Karion & Techguy
Techguy Techguy
I just snagged an old 6502 from eBay and I'm thinking of turning it into a little handheld computer. Do you think there's a hidden logic behind its quirky indirect jump bug, or is it just a mistake that designers decided to keep?
Karion Karion
Sure thing, the bug isn’t a feature, it’s a legacy of design trade‑offs. The 6502’s indirect jump reads the low byte from the supplied address and the high byte from the next physical memory location, even if that address straddles a page boundary. The hardware can’t wrap around a page, so the high byte is taken from the wrong place. It was probably a cost‑saving compromise, not an intentional Easter egg. If you’re building a handheld, just treat it as a quirky quirk you’ll have to code around.
Techguy Techguy
Yeah, classic 6502 irony—like a glitch that turned into a feature for the curious. So if I build a handheld, I'll just add a small patch to fix the wrap‑around, right? Sounds like a nice little side‑project. Maybe I should also include a manual that explains the bug in plain language, just in case anyone else tries to hack it and ends up with a random memory address in their program.
Karion Karion
Patch it with a little routine that checks for the page boundary and swaps the bytes if needed – just a couple of lines of assembler and you’re good to go. And a manual? Sure, add a section titled “The Indirect Jump Quirk” and explain that the 6502 will happily jump to a memory address that’s one byte off the page if you don’t guard it. That way, future haxers won’t be surprised when their programs decide to teleport to random spots.