i dont understand,like "AND Absolute,X" instruction that spend cycles is write "4 (+1 if page crossed)",what's mean "+1 if page crossed"?
who man can tell me,thank you very much
help!A question
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Welcome.
Perhaps an example would be best: Let's say X contains $56. AND $1000,X will AND the value in the accumulator with what is contained at address $1056. It is still in page $10, so the indexing does not cause a crossing of page boundaries. But if you do AND $10E0,X, now $10E0+$56=$1136, so you are no longer getting a value from page $10, but rather page $11. The page boundary was crossed by the indexing, and an extra cycle was required.
Perhaps an example would be best: Let's say X contains $56. AND $1000,X will AND the value in the accumulator with what is contained at address $1056. It is still in page $10, so the indexing does not cause a crossing of page boundaries. But if you do AND $10E0,X, now $10E0+$56=$1136, so you are no longer getting a value from page $10, but rather page $11. The page boundary was crossed by the indexing, and an extra cycle was required.
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Quote:
why the "INC Absolute,X" instruction dont take "(+1 if page crossed)"?
INC instruction reference:http://www.obelisk.demon.co.uk/6502/reference.html#INC
INC instruction reference:http://www.obelisk.demon.co.uk/6502/reference.html#INC
The page you linked only has the NMOS 6502 instructions. Unless you are trying to use vintage equipment like the Commodore 64, I recommend going to the CMOS 6502 (65c02) as it has more instructions and addressing modes, all the bugs fixed, onboard clock oscillator, lower power (obviously), and other enhancements.