mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-26 12:49:21 +00:00
Added some missing fragments.
This commit is contained in:
parent
5e6ac1a0cd
commit
ee18c2c414
@ -0,0 +1,8 @@
|
||||
clc
|
||||
ldy #0
|
||||
adc ({z2}),y
|
||||
sta {m1}
|
||||
tya
|
||||
iny
|
||||
adc ({z2}),y
|
||||
sta {m1}+1
|
@ -0,0 +1,10 @@
|
||||
clc
|
||||
ldy #0
|
||||
adc ({z1}),y
|
||||
pha
|
||||
tya
|
||||
iny
|
||||
adc ({z1}),y
|
||||
sta {z1}+1
|
||||
pla
|
||||
sta {z1}
|
4
src/main/fragment/mos6502-common/pptm1=pptm2.asm
Normal file
4
src/main/fragment/mos6502-common/pptm1=pptm2.asm
Normal file
@ -0,0 +1,4 @@
|
||||
lda {m2}
|
||||
sta {m1}
|
||||
lda {m2}+1
|
||||
sta {m1}+1
|
19
src/main/fragment/mos6502-common/vdsm1=vdsm2_minus_vwsm3.asm
Normal file
19
src/main/fragment/mos6502-common/vdsm1=vdsm2_minus_vwsm3.asm
Normal file
@ -0,0 +1,19 @@
|
||||
lda {m3}+1
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
sec
|
||||
lda {m2}
|
||||
sbc {m3}
|
||||
sta {m1}
|
||||
lda {m2}+1
|
||||
sbc {m3}+1
|
||||
sta {m1}+1
|
||||
lda {m2}+2
|
||||
sbc $ff
|
||||
sta {m1}+2
|
||||
lda {m2}+3
|
||||
sbc $ff
|
||||
sta {m1}+3
|
19
src/main/fragment/mos6502-common/vdsm1=vdsm2_plus_vwsm3.asm
Normal file
19
src/main/fragment/mos6502-common/vdsm1=vdsm2_plus_vwsm3.asm
Normal file
@ -0,0 +1,19 @@
|
||||
lda {m3}+1
|
||||
ora #$7f
|
||||
bmi !+
|
||||
lda #0
|
||||
!:
|
||||
sta $ff
|
||||
clc
|
||||
lda {m2}
|
||||
adc {m3}
|
||||
sta {m1}
|
||||
lda {m2}+1
|
||||
adc {m3}+1
|
||||
sta {m1}+1
|
||||
lda {m2}+2
|
||||
adc $ff
|
||||
sta {m1}+2
|
||||
lda {m2}+3
|
||||
adc $ff
|
||||
sta {m1}+3
|
@ -87,16 +87,12 @@ public class VariableBuilderConfig {
|
||||
*/
|
||||
public static void defaultPostConfig(VariableBuilderConfig config, CompileLog log) {
|
||||
// Arrays are always load/store variables in main memory
|
||||
// TODO: Theoretically some program may want an array on ZP. How to support that?
|
||||
config.addSetting("array_ma_mem", log, StatementSource.NONE);
|
||||
// Global struct values are always load/store variables in main memory
|
||||
// TODO: Global structs can be SSA (and then unwound) which can optimize some programs. How to support that?
|
||||
config.addSetting("global_struct_ma_mem", log, StatementSource.NONE);
|
||||
// Parameters are always passed using single-static-assignment
|
||||
// TODO: Compilation Unit support will require parameters that are not SSA. How to specify that?
|
||||
config.addSetting("parameter_ssa", log, StatementSource.NONE);
|
||||
// Pointers are always on zeropage
|
||||
// TODO: Pointers can technically exist in main-memory and be moved to ZP on every use. How to specify that?
|
||||
config.addSetting("pointer_zp", log, StatementSource.NONE);
|
||||
}
|
||||
|
||||
|
@ -97,9 +97,6 @@ public class Pass0GenerateStatementSequence extends KickCParserBaseVisitor<Objec
|
||||
if(program.getLog().isVerboseParse()) {
|
||||
program.getLog().append("Importing " + importFileName);
|
||||
}
|
||||
// The Parser / Lexer will automatically add the import file content here in the token stream
|
||||
//Path currentPath = file.toPath().getParent();
|
||||
//SourceLoader.loadAndParseFile(importFileName, currentPath, program);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user