1
0
mirror of https://github.com/cc65/cc65.git synced 2024-10-29 20:27:50 +00:00
cc65/libsrc/runtime/xor.s

32 lines
606 B
ArmAsm
Raw Normal View History

;
; Ullrich von Bassewitz, 05.08.1998
2017-03-12 22:21:43 +00:00
; Christian Krueger, 11-Mar-2017, added 65SC02 optimization
;
; CC65 runtime: xor on ints
;
.export tosxora0, tosxorax
.import addysp1
.importzp sp, tmp1
2017-03-12 22:21:43 +00:00
.macpack cpu
tosxora0:
ldx #$00
tosxorax:
2017-03-12 22:21:43 +00:00
.if (.cpu .bitand CPU_ISET_65SC02)
eor (sp)
ldy #1
.else
ldy #0
eor (sp),y
iny
2017-03-12 22:21:43 +00:00
.endif
sta tmp1
txa
eor (sp),y
tax
lda tmp1
jmp addysp1 ; drop TOS, set condition codes