View Single Post
Old 03 August 2021, 10:31   #13
bebbo
bye
 
Join Date: Jun 2016
Location: Some / Where
Posts: 680
Quote:
Originally Posted by Photon View Post
SUB and CMP should use the exact same logic, cmp is sub without store. From memory there is no time gain (or loss of time loss ) for An as there is for Dn (on 68000) because of the extra operations (also includes ADD). I.e. if you go by 6c instead of 8c check footnotes.

Code:
move.l #$0ffffffff,a0
sub.w a0,a0
move.l #$ffff0fff,a1
sub.w a1,a1

a0=$10000000
a1=$ffff0000
SUB and SUBA -> SUBA instruction, according to AsmOne debugger. Is there a way to get a separate, different SUB <ea>,An opcode?

a0 = $00000000


the sub.w a0,a0 uses a0.w sign extended
$ffff -> $ffffffff
$ffffffff - $ffffffff = $00000000


the word used in adda/suba is sign extended before a long add/sub is calculated
bebbo is offline  
 
Page generated in 0.04217 seconds with 11 queries