]> git.sur5r.net Git - cc65/blob - libsrc/runtime/lxor.s
More entry points for long ops that clear the high word of the lhs.
[cc65] / libsrc / runtime / lxor.s
1 ;
2 ; Ullrich von Bassewitz, 06.08.1998
3 ;
4 ; CC65 runtime: xor on longs
5 ;
6
7         .export         tosxor0ax, tosxoreax
8         .import         addysp1
9         .importzp       sp, sreg, tmp1
10
11 tosxor0ax:
12         ldy     #$00
13         sty     sreg
14         sty     sreg+1
15
16 tosxoreax:                         
17         ldy     #0
18         eor     (sp),y          ; byte 0
19         sta     tmp1
20         iny
21         txa
22         eor     (sp),y          ; byte 1
23         tax
24         iny
25         lda     sreg
26         eor     (sp),y          ; byte 2
27         sta     sreg
28         iny
29         lda     sreg+1
30         eor     (sp),y          ; byte 3
31         sta     sreg+1
32
33         lda     tmp1
34         jmp     addysp1
35
36
37