This gem returns the absoulte value of any integer value you may send to the routine. This is the smallest version and probably the fastest (atleast on a MC68000 and the number is negative), neg.l is 6 cycles, branch taken 10, not taken 8.;
; returns the absolute value of input
;
; input:
; d0.l = in value
;
; output:
; d0.l = absolute value of in value
;
; destroys:
; flags
;
.localloop
neg.l d0
bmi .localloop