Hello! It's me again...
I've just started working on a 6502 CPU emulator on an AVR. I want to to make a 256 entry jump-table, covering all the possible OP-codes on the 6502.
The OP look-up code I've come up with this far looks like the following...
ldi ZH, hi8(jumptable)
ld ZL, PC_6502+ ; The 6502 code is stored in external memory
icall ; execute OP-code
rjmp loop ; next OP-code
For the above code to work the jumptable _must_ be aligned to 256. The compiler complains about: "Alignment too large: 15 assumed"
Is there anyway around this?