You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
196 B
ArmAsm

;
; Ullrich von Bassewitz, 17.06.1998
;
; int abs (int x);
;
.export _abs
.import negax
_abs: cpx #$00 ; test hi byte
bpl L1
jmp negax ; Negate if negative
L1: rts