]> git.sur5r.net Git - cc65/blobdiff - libsrc/runtime/and.s
Added mouse module from C64
[cc65] / libsrc / runtime / and.s
index cf1d10ead8004e3f4aebaabba98a8453380989d8..2b52c552ca9871577af5c990525461f96acead54 100644 (file)
 tosanda0:
        ldx     #$00
 tosandax:
-       ldy     #0
+.ifpc02
+       and     (sp)            ; 65C02 version, saves 2 cycles and 1 byte
+       ldy     #1
+.else
+       ldy     #0
                and     (sp),y
-       sta     ptr4
-       iny
-       txa
-       and     (sp),y
+       iny
+.endif
+               pha
+       txa
+       and     (sp),y
        tax
-       lda     ptr4
+       pla
        jmp     addysp1         ; drop TOS, set condition codes