66 lines
1.1 KiB
ArmAsm
66 lines
1.1 KiB
ArmAsm
.feature c_comments
|
|
.include "../../build/loadersymbols-c64.inc"
|
|
|
|
CODE_START_ADDR = $e000
|
|
|
|
.segment "CODE"
|
|
|
|
ZP=$e0
|
|
offset = ZP+0
|
|
ZX0_src = ZP+2
|
|
ZX0_dst = ZP+4
|
|
bitr = ZP+6
|
|
pntr = ZP+7
|
|
|
|
|
|
.org $080d
|
|
|
|
copy_start:
|
|
sei
|
|
lda #$35
|
|
sta $01
|
|
|
|
lda #<code
|
|
sta ZX0_src
|
|
lda #>code
|
|
sta ZX0_src+1
|
|
lda #<CODE_START_ADDR
|
|
sta ZX0_dst
|
|
lda #>CODE_START_ADDR
|
|
jsr zx02
|
|
|
|
inc $01
|
|
cli
|
|
jsr install
|
|
sei
|
|
dec $01
|
|
jmp CODE_START_ADDR
|
|
|
|
.include "zx02.asm"
|
|
|
|
check_return:
|
|
; for some reason GETIN enable interrupts back
|
|
lda #0
|
|
sta $d01a
|
|
asl $d019
|
|
lda #$36
|
|
sta $01
|
|
:
|
|
jsr $ff9f ; SCNKEY
|
|
jsr $ffe4 ; GETIN
|
|
cmp #$0d
|
|
bne :-
|
|
dec $01
|
|
jmp CODE_START_ADDR
|
|
|
|
.assert zx02 = $082f, error, .sprintf("change zx02 address to $%04x", zx02)
|
|
.assert check_return = $08b5, error, .sprintf("change check_return address to $%04x", check_return)
|
|
|
|
.res loadraw - *
|
|
.incbin "../../build/loader-c64.prg", 2
|
|
|
|
.res install - *
|
|
.incbin "../../build/install-c64.prg", 2
|
|
|
|
code: .incbin "main.zx0"
|