2018-09-28 17:05:11 +00:00
|
|
|
.setcpu "65816"
|
2020-06-07 00:30:50 +00:00
|
|
|
zero = $00
|
2018-09-28 17:05:11 +00:00
|
|
|
longsym = $123456
|
|
|
|
|
|
|
|
.org $1000
|
|
|
|
.a8
|
|
|
|
.i8
|
|
|
|
clc
|
|
|
|
xce
|
|
|
|
sep #$30
|
2020-06-07 00:30:50 +00:00
|
|
|
jml L440000
|
2018-09-28 17:05:11 +00:00
|
|
|
|
2020-06-07 00:30:50 +00:00
|
|
|
lodat: .byte $00
|
2018-09-28 17:05:11 +00:00
|
|
|
.byte $01
|
|
|
|
.byte $02
|
|
|
|
|
|
|
|
.org $440000
|
2020-06-07 00:30:50 +00:00
|
|
|
L440000: cmp L440000
|
|
|
|
L440004: lda L440000
|
|
|
|
lda a:L440000 & $ffff
|
|
|
|
lda zero
|
|
|
|
bmi L440004
|
2018-09-28 17:05:11 +00:00
|
|
|
.byte $62,$b2,$ff
|
|
|
|
.byte $d0,$b0
|
|
|
|
.byte $82,$a9,$ff
|
|
|
|
|
2020-06-07 00:30:50 +00:00
|
|
|
dat44: .word dat44 & $ffff
|
|
|
|
.faraddr dat44
|
2018-09-28 17:05:11 +00:00
|
|
|
|
|
|
|
.org $44ffc0
|
2020-06-07 00:30:50 +00:00
|
|
|
L44FFC0: cmp L44FFC0
|
|
|
|
high44: beq @L44FFCB
|
2018-09-28 17:05:11 +00:00
|
|
|
.byte $30,$3c
|
|
|
|
.byte $82,$39,$00
|
|
|
|
|
2019-11-17 01:15:03 +00:00
|
|
|
@L44FFCB: jml @L2000
|
2018-09-28 17:05:11 +00:00
|
|
|
|
|
|
|
.org $2000
|
2019-11-17 01:15:03 +00:00
|
|
|
@L2000: bit @L2000
|
2020-06-07 00:30:50 +00:00
|
|
|
pea dat44 & $ffff
|
|
|
|
pea dat44 >> 16
|
2020-07-02 00:59:12 +00:00
|
|
|
bne skip
|
2020-06-07 00:30:50 +00:00
|
|
|
jml [lodat]
|
2018-09-28 17:05:11 +00:00
|
|
|
|
2020-07-02 00:59:12 +00:00
|
|
|
skip: nop
|
2020-06-07 00:30:50 +00:00
|
|
|
jsr j2
|
|
|
|
j2: jsr j2+3
|
|
|
|
jsr j2-3
|
2018-09-28 17:05:11 +00:00
|
|
|
jsl longsym
|
2020-07-02 00:59:12 +00:00
|
|
|
jml bank54
|
|
|
|
|
|
|
|
.org $543210
|
|
|
|
bank54: cmp bank54
|
|
|
|
bra L54321C
|
|
|
|
|
|
|
|
backchk: nop
|
|
|
|
nop
|
2020-07-03 20:58:18 +00:00
|
|
|
rts
|
2020-07-02 00:59:12 +00:00
|
|
|
|
|
|
|
backval: .faraddr backchk
|
|
|
|
|
|
|
|
L54321C: lda backchk
|
|
|
|
lda f:fwdchk
|
|
|
|
lda $543216
|
|
|
|
lda $54327d
|
|
|
|
lda backchk & $ffff +1
|
|
|
|
lda backchk & $ffff -1
|
|
|
|
lda fwdchk & $ffff +1
|
|
|
|
lda fwdval & $ffff +2
|
|
|
|
nop
|
|
|
|
jsr backchk & $ffff
|
|
|
|
jsr backchk & $ffff +1
|
2020-07-03 20:58:18 +00:00
|
|
|
jsr $3218
|
2020-07-02 00:59:12 +00:00
|
|
|
jsr fwdchk & $ffff
|
|
|
|
jsr fwdchk & $ffff +1
|
2020-07-03 20:58:18 +00:00
|
|
|
jsr $327f
|
2020-07-02 00:59:12 +00:00
|
|
|
nop
|
|
|
|
ldx #$00
|
|
|
|
jsr (backval & $ffff,x)
|
|
|
|
jsr (fwdval & $ffff,x)
|
|
|
|
jsr @L54326E & $ffff
|
|
|
|
jsr @L543271 & $ffff
|
|
|
|
jsr @L543268 & $ffff
|
|
|
|
jsr @L54326B & $ffff
|
|
|
|
jsr @L543274 & $ffff
|
|
|
|
jsr @L543277 & $ffff
|
|
|
|
bra L543280
|
|
|
|
|
|
|
|
@L543268: jmp (backval & $ffff,x)
|
|
|
|
|
|
|
|
@L54326B: jmp (fwdval & $ffff,x)
|
|
|
|
|
2020-07-04 22:03:23 +00:00
|
|
|
@L54326E: jmp (lodat)
|
2020-07-02 00:59:12 +00:00
|
|
|
|
2020-07-04 22:03:23 +00:00
|
|
|
@L543271: jmp (lodat)
|
2020-07-02 00:59:12 +00:00
|
|
|
|
2020-07-04 22:03:23 +00:00
|
|
|
@L543274: jml [lodat]
|
2020-07-02 00:59:12 +00:00
|
|
|
|
2020-07-04 22:03:23 +00:00
|
|
|
@L543277: jml [lodat]
|
2020-07-02 00:59:12 +00:00
|
|
|
|
|
|
|
fwdval: .faraddr fwdchk
|
|
|
|
|
|
|
|
fwdchk: nop
|
|
|
|
nop
|
2020-07-03 20:58:18 +00:00
|
|
|
rts
|
2020-07-02 00:59:12 +00:00
|
|
|
|
|
|
|
L543280: jsr skip
|
2020-07-03 20:58:18 +00:00
|
|
|
nop
|
2020-07-20 18:54:00 +00:00
|
|
|
rep #$30
|
|
|
|
.a16
|
|
|
|
.i16
|
|
|
|
php
|
|
|
|
lda #$0000
|
|
|
|
sep #$30
|
|
|
|
.a8
|
|
|
|
.i8
|
|
|
|
lda #$00
|
|
|
|
plp
|
|
|
|
lda #$ea
|
2020-07-03 20:58:18 +00:00
|
|
|
nop
|
2020-07-20 18:54:00 +00:00
|
|
|
sep #$30
|
|
|
|
php
|
|
|
|
lda #$00
|
|
|
|
rep #$30
|
|
|
|
.a16
|
|
|
|
.i16
|
|
|
|
lda #$0000
|
|
|
|
plp
|
|
|
|
lda #$eaea
|
|
|
|
rep #$30
|
2020-07-03 20:58:18 +00:00
|
|
|
nop
|
2021-08-09 20:47:04 +00:00
|
|
|
lda skip
|
|
|
|
lda skip+20
|
|
|
|
jsr skip
|
|
|
|
jsr skip+20
|
|
|
|
jsr (skip,x)
|
|
|
|
bne @L5432B7
|
|
|
|
jmp (skip,x)
|
|
|
|
|
|
|
|
@L5432B7: jsr $edcb
|
|
|
|
lda $edcb
|
|
|
|
bne @L5432C2
|
|
|
|
jmp ($edcb,x)
|
|
|
|
|
|
|
|
@L5432C2: nop
|
2020-07-02 00:59:12 +00:00
|
|
|
rtl
|
2018-09-28 17:05:11 +00:00
|
|
|
|