2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 05.08.1998
|
|
|
|
;
|
|
|
|
; CC65 runtime: and on ints
|
|
|
|
;
|
|
|
|
|
|
|
|
.export tosanda0, tosandax
|
|
|
|
.import addysp1
|
|
|
|
.importzp sp, ptr4
|
|
|
|
|
2003-10-10 17:52:12 +00:00
|
|
|
.macpack cpu
|
|
|
|
|
2000-05-28 13:40:48 +00:00
|
|
|
tosanda0:
|
|
|
|
ldx #$00
|
|
|
|
tosandax:
|
2003-10-10 17:52:12 +00:00
|
|
|
.if (.cpu .bitand CPU_ISET_65SC02)
|
|
|
|
and (sp) ; 65SC02 version, saves 2 cycles and 1 byte
|
2000-11-27 22:59:03 +00:00
|
|
|
ldy #1
|
|
|
|
.else
|
|
|
|
ldy #0
|
2000-05-28 13:40:48 +00:00
|
|
|
and (sp),y
|
2000-11-27 22:59:03 +00:00
|
|
|
iny
|
|
|
|
.endif
|
|
|
|
pha
|
|
|
|
txa
|
|
|
|
and (sp),y
|
2000-05-28 13:40:48 +00:00
|
|
|
tax
|
2000-11-27 22:59:03 +00:00
|
|
|
pla
|
2000-05-28 13:40:48 +00:00
|
|
|
jmp addysp1 ; drop TOS, set condition codes
|
|
|
|
|