mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-04-13 03:39:12 +00:00
Separated ASM fragment system out from ASM base
This commit is contained in:
parent
1f4efe0a4f
commit
09ed57fb98
src/main/java/dk/camelot64/kickc/fragment
AsmFragment.javaAsmFragmentManager.java
asm
_star_cowo1=aby.asm_star_cowo1=coby2.asm_star_cowo1=xby.asm_star_cowo1=yby.asm_star_cowo1=zpby1.asm_star_zpptrby1=aby.asm_star_zpptrby1=coby1.asm_star_zpptrby1=xby.asm_star_zpptrby1=yby.asm_star_zpptrby1=zpby1.asmaby=_dec_aby.asmaby=_dec_zpby1.asmaby=_inc_aby.asmaby=_inc_xby.asmaby=_inc_yby.asmaby=_inc_zpby1.asmaby=_star_cowo1.asmaby=_star_zpptrby1.asmaby=aby_minus_1.asmaby=aby_minus_aby.asmaby=aby_minus_coby1.asmaby=aby_minus_xby.asmaby=aby_minus_yby.asmaby=aby_minus_zpby1.asmaby=aby_plus_1.asmaby=aby_plus_aby.asmaby=aby_plus_coby1.asmaby=aby_plus_cowo1_staridx_xby.asmaby=aby_plus_cowo1_staridx_yby.asmaby=aby_plus_xby.asmaby=aby_plus_yby.asmaby=aby_plus_zpby1.asmaby=coby1.asmaby=coby1_plus_zpby1.asmaby=coby1_star_coby2.asmaby=cowo1_staridx_aby.asmaby=cowo1_staridx_xby.asmaby=cowo1_staridx_yby.asmaby=cowo1_staridx_zpby1.asmaby=xby.asmaby=xby_minus_1.asmaby=xby_minus_aby.asmaby=xby_minus_coby1.asmaby=xby_minus_xby.asmaby=xby_minus_yby.asmaby=xby_minus_zpby1.asmaby=xby_plus_1.asmaby=xby_plus_aby.asmaby=xby_plus_coby1.asmaby=xby_plus_xby.asmaby=xby_plus_yby.asmaby=xby_plus_zpby1.asmaby=xby_ror_2.asmaby=yby.asmaby=yby_minus_1.asmaby=yby_minus_aby.asmaby=yby_minus_coby1.asmaby=yby_minus_xby.asmaby=yby_minus_yby.asmaby=yby_minus_zpby1.asmaby=yby_plus_1.asmaby=yby_plus_aby.asmaby=yby_plus_coby1.asmaby=yby_plus_xby.asmaby=yby_plus_yby.asmaby=yby_plus_zpby1.asmaby=zpby1.asmaby=zpby1_minus_1.asmaby=zpby1_minus_aby.asmaby=zpby1_minus_coby1.asmaby=zpby1_minus_xby.asmaby=zpby1_minus_yby.asmaby=zpby1_minus_zpby2.asmaby=zpby1_plus_1.asmaby=zpby1_plus_aby.asmaby=zpby1_plus_coby1.asmaby=zpby1_plus_xby.asmaby=zpby1_plus_yby.asmaby=zpby1_plus_zpby2.asmaby=zpptrby1_staridx_aby.asmaby=zpptrby1_staridx_coby1.asmaby=zpptrby1_staridx_xby.asmaby=zpptrby1_staridx_yby.asmaby=zpptrby1_staridx_zpby1.asmaby_eq_aby_then_la1.asmaby_eq_coby1_then_la1.asmaby_eq_xby_then_la1.asmaby_eq_yby_then_la1.asmaby_eq_zpby1_then_la1.asmaby_ge_coby1_then_la1.asmaby_ge_zpby1_then_la1.asmaby_gt_0_then_la1.asmaby_gt_coby1_then_la1.asmaby_le_coby1_then_la1.asmaby_lt_aby_then_la1.asmaby_lt_coby1_then_la1.asmaby_lt_zpby1_then_la1.asmaby_minus_zpby1.asm
@ -1,6 +1,7 @@
|
||||
package dk.camelot64.kickc.asm;
|
||||
package dk.camelot64.kickc.fragment;
|
||||
|
||||
import dk.camelot64.kickc.NumberParser;
|
||||
import dk.camelot64.kickc.asm.*;
|
||||
import dk.camelot64.kickc.asm.parser.Asm6502BaseVisitor;
|
||||
import dk.camelot64.kickc.asm.parser.Asm6502Parser;
|
||||
import dk.camelot64.kickc.icl.*;
|
||||
@ -25,7 +26,7 @@ public class AsmFragment {
|
||||
private Map<String, Value> bindings;
|
||||
|
||||
/**
|
||||
* The scope containing the fragment. Used when referenginv symbols defined in other scopes.
|
||||
* The scope containing the fragment. Used when referencing symbols defined in other scopes.
|
||||
*/
|
||||
private ScopeRef scope;
|
||||
|
||||
@ -585,7 +586,7 @@ public class AsmFragment {
|
||||
if (instruction != null) {
|
||||
program.addLine(instruction);
|
||||
} else {
|
||||
throw new RuntimeException("Error parsing ASM fragment line in dk/camelot64/kickc/asm/fragment/" + signature + ".asm\n - Line: " + ctx.getText());
|
||||
throw new RuntimeException("Error parsing ASM fragment line in dk/camelot64/kickc/fragment/asm/" + signature + ".asm\n - Line: " + ctx.getText());
|
||||
}
|
||||
return null;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package dk.camelot64.kickc.asm;
|
||||
package dk.camelot64.kickc.fragment;
|
||||
|
||||
import dk.camelot64.kickc.asm.parser.Asm6502Lexer;
|
||||
import dk.camelot64.kickc.asm.parser.Asm6502Parser;
|
||||
@ -137,7 +137,7 @@ public class AsmFragmentManager {
|
||||
*/
|
||||
private static CharStream loadFragment(String signature) {
|
||||
ClassLoader classLoader = AsmFragmentManager.class.getClassLoader();
|
||||
URL fragmentUrl = classLoader.getResource("dk/camelot64/kickc/asm/fragment/" + signature + ".asm");
|
||||
URL fragmentUrl = classLoader.getResource("dk/camelot64/kickc/fragment/asm/" + signature + ".asm");
|
||||
if(fragmentUrl==null) {
|
||||
return null;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user