mirror of
https://github.com/mi57730/a2d.git
synced 2024-12-01 05:50:24 +00:00
Fix Show Image File - restore deleted code
This commit is contained in:
parent
17f096890f
commit
f37d997e2c
@ -33,6 +33,32 @@ dst: sta start,y ; self-modified
|
||||
bne src
|
||||
.endproc
|
||||
|
||||
call_main_trampoline := $20 ; installed on ZP, turns off auxmem and calls...
|
||||
call_main_addr := call_main_trampoline+7 ; address patched in here
|
||||
|
||||
;;; Copy the following "call_main_template" routine to $20
|
||||
.scope
|
||||
sta RAMWRTON
|
||||
sta RAMRDON
|
||||
ldx #sizeof_routine
|
||||
loop: lda routine,x
|
||||
sta call_main_trampoline,x
|
||||
dex
|
||||
bpl loop
|
||||
jmp call_init
|
||||
.endscope
|
||||
|
||||
.proc routine
|
||||
sta RAMRDOFF
|
||||
sta RAMWRTOFF
|
||||
jsr $1000 ; overwritten (in zp version)
|
||||
sta RAMRDON
|
||||
sta RAMWRTON
|
||||
rts
|
||||
.endproc
|
||||
sizeof_routine := * - routine ; can't .sizeof(proc) before declaration
|
||||
;; https://github.com/cc65/cc
|
||||
|
||||
.proc call_init
|
||||
;; run the DA
|
||||
jsr init
|
||||
|
Loading…
Reference in New Issue
Block a user