]> git.sur5r.net Git - cc65/blob - libsrc/common/abs.s
This commit was generated by cvs2svn to compensate for changes in r2,
[cc65] / libsrc / common / abs.s
1 ;
2 ; Ullrich von Bassewitz, 17.06.1998
3 ;
4 ; int abs (int x);
5 ;
6
7         .export         _abs
8         .import         negax
9
10 _abs:   dex
11         inx                     ; test hi byte
12         bpl     L1
13         jmp     negax           ; Negate if negative
14 L1:     rts
15
16
17