diff --git a/.idea/libraries/Maven__info_picocli_picocli_4_2_0.xml b/.idea/libraries/Maven__info_picocli_picocli_4_5_2.xml
similarity index 68%
rename from .idea/libraries/Maven__info_picocli_picocli_4_2_0.xml
rename to .idea/libraries/Maven__info_picocli_picocli_4_5_2.xml
index c6d887975..85754e65a 100644
--- a/.idea/libraries/Maven__info_picocli_picocli_4_2_0.xml
+++ b/.idea/libraries/Maven__info_picocli_picocli_4_5_2.xml
@@ -1,13 +1,13 @@
-
+
-
+
-
+
-
+
\ No newline at end of file
diff --git a/kickc.iml b/kickc.iml
index 0468924bf..8e57f98ea 100644
--- a/kickc.iml
+++ b/kickc.iml
@@ -23,7 +23,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index d69b6c4c9..10d475aad 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,7 +49,7 @@
info.picocli
picocli
- 4.2.0
+ 4.5.2
javax.json
diff --git a/src/main/fragment/cache/fragment-cache-mos6502x.asm b/src/main/fragment/cache/fragment-cache-mos6502x.asm
index e58058f69..a262c04d6 100644
--- a/src/main/fragment/cache/fragment-cache-mos6502x.asm
+++ b/src/main/fragment/cache/fragment-cache-mos6502x.asm
@@ -19956,3 +19956,16 @@ bne !-
clc
adc #2
sta {z1}
+//FRAGMENT vbuz1=pbuc1_derefidx_vbum2
+ldy {m2}
+lda {c1},y
+sta {z1}
+//FRAGMENT vbuaa=pbuc1_derefidx_vbum1
+ldy {m1}
+lda {c1},y
+//FRAGMENT vbuxx=pbuc1_derefidx_vbum1
+ldy {m1}
+ldx {c1},y
+//FRAGMENT vbuyy=pbuc1_derefidx_vbum1
+ldx {m1}
+ldy {c1},x
diff --git a/src/main/java/dk/camelot64/kickc/KickC.java b/src/main/java/dk/camelot64/kickc/KickC.java
index a139e92ca..175eab9e4 100644
--- a/src/main/java/dk/camelot64/kickc/KickC.java
+++ b/src/main/java/dk/camelot64/kickc/KickC.java
@@ -53,6 +53,9 @@ public class KickC implements Callable {
@CommandLine.Option(names = {"-a"}, description = "Assemble the output file using KickAssembler. Produces a binary file.")
private boolean assemble = false;
+ @CommandLine.Option(names = {"-Xassembler"}, description = "Passes the next option to the assembler. The option should generally be quoted. This option can be repeated to pass multiple options.")
+ private List assemblerOptions = null;
+
@CommandLine.Option(names = {"-e"}, description = "Execute the assembled binary file using an appropriate emulator. The emulator chosen depends on the target platform.")
private boolean execute = false;
@@ -181,6 +184,8 @@ public class KickC implements Callable {
public static void main(String[] args) {
final CommandLine commandLine = new CommandLine(new KickC());
+ commandLine.setTrimQuotes(true);
+ commandLine.setUnmatchedOptionsAllowedAsOptionParameters(true);
final int exitCode = commandLine.execute(args);
System.exit(exitCode);
}
@@ -438,6 +443,10 @@ public class KickC implements Callable {
assembleCommand.add("-vicesymbols");
assembleCommand.add("-showmem");
assembleCommand.add("-debugdump");
+ // Add passed options
+ if(assemblerOptions !=null)
+ assembleCommand.addAll(assemblerOptions);
+
if(verbose) {
System.out.print("Assembling command: java -jar KickAss.jar ");
for(String cmd : assembleCommand) {
@@ -465,7 +474,6 @@ public class KickC implements Callable {
// Execute the binary file if instructed
if(emulator != null) {
-
// Find commandline options for the emulator
String emuOptions = "";
if(emulator.equals("C64Debugger")) {
@@ -478,7 +486,6 @@ public class KickC implements Callable {
Path viceSymbolsPath = outputDir.resolve(outputFileNameBase + ".vs");
emuOptions = "-moncommands " + viceSymbolsPath.toAbsolutePath().toString() + " ";
}
-
System.out.println("Executing " + outputBinaryFilePath + " using " + emulator);
String executeCommand = emulator + " " + emuOptions + outputBinaryFilePath.toAbsolutePath().toString();
if(verbose) {