6502 Relative Address mode wrapping
6502, assembly
Solution
Crossing a page boundary with a relative branch will incur an extra cycle, but it doesn't make any difference whether the page-crossing branch is a forward branch or a backwards branch.
You can try this out in Visual6502. Enter the program `A9 00 F0 EC` (`LDA #00` / `BEQ $FFF0`) at address 0000, single-step through the code and see where it ends up after the `BEQ`. If you only trust real hardware you could easily verify this on something like a Nintendo Entertainment System.
Obviously to be able to reach page FF with a relative branch you'd have to be executing out of zeropage RAM, and you probably don't want to waste ZP RAM on code since it needs to fit your most frequently accessed data. So that would make this particular scenario unlikely.
Problem
Reading the documentation on the 6502, and I havent been able to find this answered anywhere. It's possible to wrap when using relative addressing. But is it possible to wrap around both ends? I am guessing that is possible however unlikely though. And when I mean both ends, I mean I know you can wrap from a high PC to a low PC. But could you also wrap from a low PC to a high PC?