Skip to content

Commit

Permalink
correctly handle boundary case
Browse files Browse the repository at this point in the history
  • Loading branch information
mooinglemur committed Aug 27, 2024
1 parent f19096a commit 30d24e0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fat32/fat32.s
Original file line number Diff line number Diff line change
Expand Up @@ -3201,7 +3201,7 @@ x16_banked_copy:
inx ; wrap bank
; ended on wrap boundary?
cpy tmp_done
beq @end_banked_read
beq @end_wrapped
; in order to avoid an indexed write into I/O space
; on the 65C816, which could have side effects, we
; resort to an alternate method here which avoids
Expand Down Expand Up @@ -3229,6 +3229,7 @@ x16_banked_copy:
bne @wrapped_loop
pla
sta fat32_ptr
@end_wrapped:
lda #$9f
sta fat32_ptr+1
bra @end_banked_read
Expand Down Expand Up @@ -3523,7 +3524,7 @@ fat32_write:
inx ; wrap bank
; ended on wrap boundary?
cpy tmp_done
beq @end_banked_write
beq @end_wrapped
; in order to avoid an indexed read from I/O space
; on the 65C816, which could have side effects, we
; resort to an alternate method here which avoids
Expand Down Expand Up @@ -3551,6 +3552,7 @@ fat32_write:
bne @wrapped_loop
pla
sta fat32_ptr
@end_wrapped:
lda #$9f
sta fat32_ptr+1
bra @end_banked_write
Expand Down

0 comments on commit 30d24e0

Please sign in to comment.