This line of code:
uword sequence_offset = &curr_sequence[sequence_curr_step]
Where curr_sequence is a uword, and sequence_curr_step is a ubyte, and all of these end up in ZP.
produces this asm output:
When the address in curr_sequence is close to a page boundary such that sequence_curr_step causes it to wrap the lower byte, it fails to increment the upper byte, because bne is incorrect here. it should be bcc.
In my case curr_sequence is $2CF9 and sequence_curr_step is $0D, and the result it ends up with is $2C06 instead of $2D06 (which is the correct value).
I was able to hand modify the code in memory using box16 while debugging, and changing the bne to bcc made it work correctly.
I am using 10.3 release.
This line of code:
uword sequence_offset = &curr_sequence[sequence_curr_step]
Wherecurr_sequence
is a uword, andsequence_curr_step
is a ubyte, and all of these end up in ZP. produces this asm output:When the address in
curr_sequence
is close to a page boundary such thatsequence_curr_step
causes it to wrap the lower byte, it fails to increment the upper byte, becausebne
is incorrect here. it should bebcc
.In my case
curr_sequence
is $2CF9 andsequence_curr_step
is $0D, and the result it ends up with is $2C06 instead of $2D06 (which is the correct value).I was able to hand modify the code in memory using box16 while debugging, and changing the
bne
tobcc
made it work correctly. I am using 10.3 release.