reesey-spoon wrote:
hoglet wrote:
Try this:
Code:
addressTableH
.byte >(address00-1), etc
addressTableL
.byte <(address00-1), etc
I'm guessing the -1 NEEDS to be on both the High and Low address. I have been hunting down a bug for the past few days and I think its because, after reading your advice, I only but it on the low byte side.
Indeed - so say for example, the target address is $8000, then >$8000 is $80 and <$8000 is $00, but by just taking 1 from the low byte you get: >$8000 = $80 and <$7FFF = $FF, so the resulting address is $80FF which isn't what you want, so >$7FFF = $7F and <$7FFF is $FF which is what you want.
So you have an address that lands on a page boundary $xx00 and it crashes. This is a tricky thing to fix as simply adding in debug code can change the target address which may then cause it to work! it's only when address00 is $xx00 that you'll have issues.
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/