1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-05 08:05:51 +00:00
cc65/libsrc/runtime/and.s
cuz b4163d0e4e Added some 65C02 code.
git-svn-id: svn://svn.cc65.org/cc65/trunk@484 b7a2c559-68d2-44c3-8de9-860c34a00d81
2000-11-27 22:59:03 +00:00

29 lines
407 B
ArmAsm

;
; Ullrich von Bassewitz, 05.08.1998
;
; CC65 runtime: and on ints
;
.export tosanda0, tosandax
.import addysp1
.importzp sp, ptr4
tosanda0:
ldx #$00
tosandax:
.ifpc02
and (sp) ; 65C02 version, saves 2 cycles and 1 byte
ldy #1
.else
ldy #0
and (sp),y
iny
.endif
pha
txa
and (sp),y
tax
pla
jmp addysp1 ; drop TOS, set condition codes