Hi,
I need an optimisation for this:
Code:
; convert d0 from 32 to 16 bit
move.l #$7fff,d1
cmp.l d1,d0
blt .low_d0
move.w d1,d0
bra .ready
.low_d0 cmp.l #$ffff8000,d0
bgt .ready
move.w #$8000,d0
.ready
I guess it converts a SIGNED 32 bit value (comes in d0) into a 16 bit value into d0. Is there a better way to do this? The problem is, values greater than $7fff should become $7fff and values smaller than $8000 should become $8000. Right?
ags