Re: Would also bork legitimate code
"Back in the days of the 8-bit processor, I remember writing code (in assembler!) that would implement a 16-bit jump by pushing the target onto the stack and doing a ret."
on SOME processors, you STILL have to do that. I'm thinking 'microcontrollers' at the moment. There's no 24-bit jump instruction on an AVR, but some AVRs have 24-bit addressing. So the fastest way to jump 24-bit is to leverage the 24-bit program counter value on the stack after a call. I am pretty sure there's a 24-bit CALL function, however [can't recall at the moment]. Just no JUMP instruction. So when my bootloader does a jump to the start of code, while running within the highest 128kb page of memory, it must do the 3-byte address stack push followed by 'RET'. With '#ifdef' around it for CPUs that have a < 128kb address space. It works.