]> git.sur5r.net Git - cc65/blob - libsrc/runtime/neg.s
The upper 16 bit differ between signed and unsigned multiplication, so while
[cc65] / libsrc / runtime / neg.s
1 ;
2 ; Ullrich von Bassewitz, 05.08.1998
3 ;
4 ; CC65 runtime: negation on ints
5 ;
6
7         .export         negax
8
9 negax:  clc
10         eor     #$FF
11         adc     #1
12         pha
13         txa
14         eor     #$FF
15         adc     #0
16         tax
17         pla
18         rts
19
20
21