]> git.sur5r.net Git - cc65/blob - libsrc/runtime/tosint.s
Removed initialization code to set the screen size and replaced it by a
[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 ; Convert TOS from long to int by cutting of the high 16bit
12
13 tosint: pha
14         ldy     #0
15         lda     (sp),y          ; sp+1
16         ldy     #2
17         sta     (sp),y
18         ldy     #1
19         lda     (sp),y
20         ldy     #3
21         sta     (sp),y
22         pla
23         jmp     incsp2          ; Drop 16 bit
24