mirror of
https://github.com/cc65/cc65.git
synced 2024-11-05 08:05:51 +00:00
3f06947b36
git-svn-id: svn://svn.cc65.org/cc65/trunk@2508 b7a2c559-68d2-44c3-8de9-860c34a00d81
17 lines
196 B
ArmAsm
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
|
|
|
|
|
|
|