mirror of
https://github.com/irmen/prog8.git
synced 2024-11-23 07:32:10 +00:00
reintroduced system reset at program exit if zeropage is clobbered
This commit is contained in:
parent
6f75413c09
commit
b6f85d10b0
@ -136,6 +136,15 @@ internal class AsmGen(private val program: Program,
|
||||
}
|
||||
}
|
||||
|
||||
if(options.zeropage !in setOf(ZeropageType.BASICSAFE, ZeropageType.DONTUSE)) {
|
||||
out("""
|
||||
; zeropage is clobbered so we need to reset the machine at exit
|
||||
lda #>${CompilationTarget.instance.name}.reset_system
|
||||
pha
|
||||
lda #<${CompilationTarget.instance.name}.reset_system
|
||||
pha""")
|
||||
}
|
||||
|
||||
out(" jmp main.start ; start program / force start proc to be included")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user