Re: Assembler that automatically select what to put in ZP
Posted: Tue Dec 29, 2015 7:23 pm
GARTHWILSON wrote:
However, I don't remember ever having to page-align anything in 65c02 anyway. The only use I can think of for page alignment is if something had to be cycle-exact for timing a loop or process, . . .
- Branching in cycle-exact code -- timing only
- Table access in cycle-exact code (outside ZP) -- timing only
- Keeping indexed tables within ZP --a must, not about timing
- Interfacing with other code that assumes whole-page alignment (passing only the page, supplying 00 as the low byte) -- also not optional
- Boundaries relating to ROM or RAM areas... but this is more a matter of locating segments correctly, not about the code requiring alignment for correct execution.
Yes, it's probably not a great idea to trust a tool to make correct choices relating to cycle-exact code, I'd have to consider that more closely. It is already so detail-oriented that the care around aligning it should be as great. I chose page alignment as an example because it is relatively easy to understand, and was similar to the OP's premise.
GARTHWILSON wrote:
. . . and the extra cycle taken by branching or indexing across a page boundary would be a problem.