Skip to content

Commit

Permalink
fix off-by-one error
Browse files Browse the repository at this point in the history
  • Loading branch information
mooinglemur committed Mar 6, 2024
1 parent df8f930 commit d905427
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions inc/jsrfar.inc
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ jsrfarn:
phx
phy

lda $0a,S ; fetch return address
lda $09,S ; fetch return address
sta imparm
clc
adc #3
sta $0a,S ; write back return address+3
sta $09,S ; write back return address+3
ldy #1
lda (imparm),y
sta jmpfr+1
Expand All @@ -104,7 +104,7 @@ jsrfarn:
.A8
.I16
lda rom_bank
sta $09,S ; save original bank onto reserved byte
sta $08,S ; save original bank onto reserved byte
iny
iny
lda (imparm),y
Expand All @@ -118,7 +118,7 @@ jsrfar1n:
.A8
.I16
lda ram_bank
sta $09,S ; save original bank onto reserved byte
sta $08,S ; save original bank onto reserved byte
iny
iny
lda (imparm),y
Expand Down

0 comments on commit d905427

Please sign in to comment.