1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-23 19:29:37 +00:00
cc65/libsrc/runtime/tosint.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

32 lines
440 B
ArmAsm

;
; Ullrich von Bassewitz, 25.10.2000
;
; CC65 runtime: Convert tos from long to int
;
.export tosint
.import incsp2
.importzp sp
; Convert TOS from long to int by cutting of the high 16bit
.proc tosint
pha
.ifpc02
lda (sp)
.else
ldy #0
lda (sp),y ; sp+1
.endif
ldy #2
sta (sp),y
dey
lda (sp),y
ldy #3
sta (sp),y
pla
jmp incsp2 ; Drop 16 bit
.endproc