]> git.sur5r.net Git - cc65/blob - libsrc/runtime/tosint.s
remove TABs
[cc65] / libsrc / runtime / tosint.s
1 ;
2 ; Ullrich von Bassewitz, 25.10.2000
3 ;
4 ; CC65 runtime: Convert tos from long to int
5 ;
6
7         .export         tosint
8         .import         incsp2
9         .importzp       sp
10
11         .macpack        cpu
12
13 ; Convert TOS from long to int by cutting of the high 16bit
14
15 .proc   tosint
16
17         pha
18 .if (.cpu .bitand ::CPU_ISET_65SC02)
19         lda     (sp)
20 .else
21         ldy     #0
22         lda     (sp),y          ; sp+1
23 .endif
24         ldy     #2
25         sta     (sp),y
26         dey
27         lda     (sp),y
28         ldy     #3
29         sta     (sp),y
30         pla
31         jmp     incsp2          ; Drop 16 bit
32
33 .endproc