]> git.sur5r.net Git - cc65/blob - libsrc/runtime/and.s
Fixed a bug
[cc65] / libsrc / runtime / and.s
1 ;
2 ; Ullrich von Bassewitz, 05.08.1998
3 ;
4 ; CC65 runtime: and on ints
5 ;
6
7         .export         tosanda0, tosandax
8         .import         addysp1
9         .importzp       sp, ptr4
10
11 tosanda0:
12         ldx     #$00
13 tosandax:
14 .ifpc02
15         and     (sp)            ; 65C02 version, saves 2 cycles and 1 byte
16         ldy     #1
17 .else
18         ldy     #0
19         and     (sp),y
20         iny
21 .endif
22         pha
23         txa
24         and     (sp),y
25         tax
26         pla
27         jmp     addysp1         ; drop TOS, set condition codes
28