]> git.sur5r.net Git - cc65/blob - libsrc/runtime/lcompl.s
This commit was generated by cvs2svn to compensate for changes in r2,
[cc65] / libsrc / runtime / lcompl.s
1 ;
2 ; Ullrich von Bassewitz, 06.08.1998
3 ;
4 ; CC65 runtime: long complement
5 ;
6
7         .export         compleax
8         .importzp       sreg
9
10 ; eax = ~eax
11
12 compleax:
13         eor     #$FF
14         pha
15         txa
16         eor     #$FF
17         tax
18         lda     sreg
19         eor     #$FF
20         sta     sreg
21         lda     sreg+1
22         eor     #$FF
23         sta     sreg+1
24         pla
25         rts
26