Skip to content
This repository was archived by the owner on Jun 1, 2022. It is now read-only.

Commit 3dea19f

Browse files
committed
Handle boot file returning to eeprom
1 parent f94ac16 commit 3dea19f

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

roms/boot.s

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,11 @@ bootdrive:
334334
; Checks and boots from a drive
335335
lda $D000
336336
cmp #$00
337-
beq @boot
337+
beq :+
338338
rts
339-
@boot: copys_up bootmsg, $E003, .sizeof(bootmsg)
339+
: copys_up bootmsg, $E003, .sizeof(bootmsg)
340+
pla ; Remove address from stack
341+
pla ; We're not returning to havemem
340342
lda #$01 ; Setup Copy Engine
341343
sta $E041
342344
lda #$D0
@@ -355,17 +357,21 @@ bootdrive:
355357
sta $E040
356358

357359
stz $E046
358-
jmp $0200 ; Boot
360+
jsr $0200 ; Boot
361+
jmp fschk
359362

360363
bootfs:
361364
; Boots from a file
362365
lda $D000
363366
cmp #$00
364-
beq @boot
367+
beq :+
365368
rts ; No file opened
366-
@boot: copys_up bootmsg, $E003, .sizeof(bootmsg)
369+
: copys_up bootmsg, $E003, .sizeof(bootmsg)
370+
pla ; Remove address from stack
371+
pla ; We're not returning to fschk
367372
jsr loadfile
368-
jmp $0200 ; Boot
373+
jsr $0200 ; Boot
374+
jmp commands
369375

370376
reset:
371377
; Display boot greeting
@@ -471,6 +477,7 @@ inc_y:
471477

472478
failboot:
473479
copys_up noboot, $E003, .sizeof(noboot)
480+
commands:
474481
stz $E001 ; Drop all input
475482
stz curlow
476483
lda #$02

0 commit comments

Comments
 (0)