rom4x/rom5x/B1_DB63_reset5x.s

45 lines
1.3 KiB
ArmAsm
Raw Normal View History

2017-03-19 03:00:43 +00:00
.code
.psc02
.include "iic+.defs"
2017-12-11 02:01:37 +00:00
.org reset5x ; max 157 bytes
stz power2 + rx_mslot ; action = normal reset
lda #>(rst5xrtn-1) ; common case
pha
lda #<(rst5xrtn-1)
pha ; note that this stays on stack
asl butn1 ; option (closed apple)
bcs ckdiag
exitrst: jmp swrts2
; check to see if cmd_option (both apples) are down
2017-12-11 02:01:37 +00:00
ckdiag: bit butn0 ; command (open apple)
bmi exitrst ; return to RESET.X
2017-02-12 19:53:47 +00:00
; present menu because only closed apple is down
2017-12-11 02:01:37 +00:00
menu: jsr menu5x ; display menu
jsr gkey5x
cmp #$b0 ; "0"
bne ckkey1
ldx #$ff ; reset stack
txs
txa
jmp $fb3c ; now has crash-to-monitor function
ckkey1: cmp #$b2 ; "2"
beq doconf
cmp #$b4 ; "4"
bne ckkey2
doconf: jsr conf5x
bne menu ; go back to menu4x
ckkey2: cmp #$b7 ; "7"
bne ckkey3
jsr $fd02 ; accelerator menu
bra menu
ckkey3: sec
sbc #$b0 ; ascii->number
bmi menu ; < 0 not valid
cmp #$07 ; we will use 7 for accelerator later
bpl menu ; > 7 not valid
sta power2 + rx_mslot ; for boot5x
stz softev + 1 ; deinit coldstart
stz pwerdup ; ditto
bra exitrst
2017-02-12 19:53:47 +00:00