1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-04 17:04:58 +00:00
cc65/libsrc/common/abs.s

17 lines
256 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