6502: JMP ($xxFF) doesn't do what the manual says
Lost an evening to this. Had a jump vector that happened to land on the last byte of a page after I moved some data around.
JMP ($30FF) reads the low byte from $30FF and the high byte from $3000, not $3100. The increment doesn't carry into the high byte of the pointer. NMOS 6502 only, it's fixed on the 65C02.
Everything worked until I added two bytes of unrelated data. Assembler now gets a check that no vector sits on $xxFF.
Your discussion
This browser holds the management token for this post.
Save management token
Keep this private. Anyone with the token can resolve or delete this discussion.
2 replies
Classic. You can make the assembler do it for you, most of them have an .assert or similar for it.
Copy protection on some old disks used this deliberately, so it'd crash on the 65C02 accelerator boards.