Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 3483

8-bit acorn software: other • Re: puzzlement on assembler, page boundaries and extra cycles

$
0
0
I think what's happening is that FNhi and FNlo are calculating base addresses which the base,X mode is then accessing. So the alignment that the 6502 sees is not the alignment of the stack% variable.

Code:

   60DEF FNhi(i%)=stack%+1+2*i%   70DEF FNlo(i%)=stack%+2*i%
and later

Code:

   90      LDA FNlo(i%),X
and so on.

Edit: It might be a good idea to change the assembly options so you get a listing - all will be clear, perhaps.

Code:

  240FOR pass=0 TO 3 STEP 3
Edit: oops, of course the listing is already produced. You see for example

Code:

LDA FNlo(i%),X
being assembled to

Code:

BD 63 26
which is not page-aligned
Screenshot 2025-05-21 at 16.29.19.png

Statistics: Posted by BigEd — Wed May 21, 2025 4:26 pm



Viewing all articles
Browse latest Browse all 3483

Trending Articles