Hi all,
So I was just patching a data transfer routine to insert a delay which had been forgotten. I'd freed 5 bytes into which a delay of 13 cycles had to be coded. As everything except Y was available this was straightforward:
Code:
LSR $0D52 ;wait 6.5 microseconds
PHA
PLA
Then I remembered from somewhere that some later MPUs could write back the shifted value on the fifth cycle and skip the sixth, while the ALU updates the flags in parallel, but INC and DEC have to go through the ALU; so to be sure of a consistent delay I plumped for INC, which also preserves C.
Browsing the datasheets hasn't revealed any parts with this speed-up; but to rule out the chips this code might run on, do you know which, if any, do? At this point I'm not sure where I got the idea.
Thanks,
Greg