Skip to content

Commit 9fcb6f0

Browse files
committed
Support copySectorToSwap on the TI-73
1 parent 6960491 commit 9fcb6f0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/00/flash.asm

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ _: pop af
439439
ld bc, 0x4000
440440
.inner_loop:
441441
ld a, (hl) ; source sector
442+
ld (flashFunctions + 0xFF), a
442443
ex af, af'
443444
ld a, e ; swap sector
444445
setBankA
@@ -453,16 +454,18 @@ _: pop af
453454
ex af, af'
454455
ld (hl), a
455456
.poll:
457+
ld a, (flashFunctions + 0xFF)
456458
xor (hl)
457459
bit 7, a
458-
jr z, _
460+
jr z, .continue
459461
bit 5, a
460462
jr z, .poll
461-
; Error, abort
463+
ld a, (flashFunctions + 0xFF)
464+
bit 7, a
465+
jr z, .continue
466+
; Error, skip this byte
467+
.continue:
462468
ld a, 0xF0
463-
ld (0), a
464-
jp .return
465-
_: ld a, 0xF0
466469
ld (hl), a
467470
468471
inc hl

0 commit comments

Comments
 (0)