mirror of
https://github.com/irmen/prog8.git
synced 2024-12-24 01:29:28 +00:00
c128: fix memory bank resetting
This commit is contained in:
parent
0bea721c2e
commit
e056a28316
@ -150,8 +150,7 @@ internal class ProgramAndVarsGen(
|
||||
asmgen.out(" rts")
|
||||
}
|
||||
"c128" -> {
|
||||
asmgen.out(" jsr main.start")
|
||||
// TODO c128: how to bank basic+kernal back in?
|
||||
asmgen.out(" jsr main.start | lda #0 | sta ${"$"}ff00")
|
||||
if(!options.noSysInit)
|
||||
asmgen.out(" jmp ${compTarget.name}.cleanup_at_exit")
|
||||
else
|
||||
|
@ -480,10 +480,8 @@ asmsub init_system() {
|
||||
%asm {{
|
||||
sei
|
||||
cld
|
||||
;;lda #%00101111 ; TODO c128 ram and rom bank selection how?
|
||||
;;sta $00
|
||||
;;lda #%00100111
|
||||
;;sta $01
|
||||
lda #0
|
||||
sta $ff00 ; select default bank 15
|
||||
jsr c64.IOINIT
|
||||
jsr c64.RESTOR
|
||||
jsr c64.CINT
|
||||
@ -549,8 +547,8 @@ sys {
|
||||
; Soft-reset the system back to initial power-on Basic prompt.
|
||||
%asm {{
|
||||
sei
|
||||
;lda #14
|
||||
;sta $01 ; bank the kernal in TODO c128 how to do this?
|
||||
lda #0
|
||||
sta $ff00 ; default bank 15
|
||||
jmp (c64.RESET_VEC)
|
||||
}}
|
||||
}
|
||||
@ -731,8 +729,8 @@ _longcopy
|
||||
inline asmsub exit(ubyte returnvalue @A) {
|
||||
; -- immediately exit the program with a return code in the A register
|
||||
%asm {{
|
||||
;lda #14
|
||||
;sta $01 ; bank the kernal in TODO c128 how to do this?
|
||||
lda #0
|
||||
sta $ff00 ; default bank 15
|
||||
jsr c64.CLRCHN ; reset i/o channels
|
||||
jsr c64.enable_runstop_and_charsetswitch
|
||||
ldx prog8_lib.orig_stackpointer
|
||||
|
Loading…
Reference in New Issue
Block a user