]> git.sur5r.net Git - cc65/blob - libsrc/common/labs.s
Simplify code generated for the ?: operator when type conversion code for the
[cc65] / libsrc / common / labs.s
1 ;
2 ; Ullrich von Bassewitz, 17.06.1998
3 ;
4 ; long labs (long x);
5 ;
6
7         .export         _labs
8         .import         negeax, tsteax
9         .importzp       sreg
10
11 _labs:  ldy     sreg+1          ; test hi byte
12         bpl     L1
13         jmp     negeax          ; Negate if negative
14 L1:     rts
15