Gotchas: Difference between revisions

Content added Content deleted
Line 124: Line 124:


MOVE.W #$7FFF,D0 ;D0 = $12347FFF
MOVE.W #$7FFF,D0 ;D0 = $12347FFF
ADD.W #1,D0 ;D0 = $12348000
ADD.W #1,D0 ;D0 = $12348000
TRAPV ;the above operation set the overflow flag, so this instruction will call the signed overflow handler.
TRAPV ;the above operation set the overflow flag, so this instruction will call the signed overflow handler.
;Even though the entire register didn't overflow, the portion we were operating on did, so that counts.</lang>
;Even though the entire register didn't overflow, the portion we were operating on did, so that counts.</lang>