improved zero page address addresses for floating point support mode

This commit is contained in:
Irmen de Jong 2019-02-09 17:55:18 +01:00
parent ee497d2ffb
commit bcdf3f2b83
2 changed files with 11 additions and 2 deletions

View File

@ -186,6 +186,15 @@ class AsmGen(val options: CompilationOptions, val program: IntermediateProgram,
}
}
if(zeropage.exitProgramStrategy!=Zeropage.ExitProgramStrategy.CLEAN_EXIT) {
// disable shift-commodore charset switching and run/stop key
out(" lda #$80")
out(" lda #$80")
out(" sta 657\t; disable charset switching")
out(" lda #239")
out(" sta 808\t; disable run/stop key")
}
out(" ldx #\$ff\t; init estack pointer")
out(" ; initialize the variables in each block")
for(block in program.blocks) {

View File

@ -34,8 +34,8 @@ class C64Zeropage(options: CompilationOptions) : Zeropage(options) {
}
override val exitProgramStrategy: ExitProgramStrategy = when(options.zeropage) {
ZeropageType.BASICSAFE, ZeropageType.FLOATSAFE -> ExitProgramStrategy.CLEAN_EXIT
ZeropageType.KERNALSAFE, ZeropageType.FULL -> ExitProgramStrategy.SYSTEM_RESET
ZeropageType.BASICSAFE -> ExitProgramStrategy.CLEAN_EXIT
ZeropageType.FLOATSAFE, ZeropageType.KERNALSAFE, ZeropageType.FULL -> ExitProgramStrategy.SYSTEM_RESET
}