View Single Post
Old 13 January 2020, 14:02   #9
sparhawk
Registered User

sparhawk's Avatar
 
Join Date: Sep 2019
Location: Essen/Germany
Age: 51
Posts: 321
Quote:
Originally Posted by KONEY View Post
YES that was the problem!!! Actually you can do the addition with odd values but further operations on the A register would make everything crash...

Yes. of course. You can have an address register with an odd value. You just can't use this address to access word or longs.


so this is fine:

Code:
move.l #1,a0
.loop:
   move.b (a0)+,d0
   bne .loop

But this would crash:

Code:
move.l #1,a0
.loop:
   move.w/l (a0)+,d0
   bne .loop
Actually, thereotically you could write a trap handler, which catches this, and fixes the access, but that would not be a good idea in the usual case.
sparhawk is offline  
 
Page generated in 0.04181 seconds with 11 queries