]> git.sur5r.net Git - cc65/blob - libsrc/runtime/lpush.s
Call __seterrno instead of assigning to _errno and save a few bytes.
[cc65] / libsrc / runtime / lpush.s
1 ;
2 ; Ullrich von Bassewitz, 06.08.1998
3 ;
4 ; CC65 runtime: long push
5 ;
6
7 ;
8 ; push eax on stack
9 ;
10         .export         push0ax, pusheax
11         .import         decsp4
12         .importzp       sp, sreg
13
14 push0ax:
15         ldy     #0
16         sty     sreg
17         sty     sreg+1
18 pusheax:
19         pha                     ; decsp will destroy A (but not X)
20         jsr     decsp4
21         ldy     #3
22         lda     sreg+1
23         sta     (sp),y
24         dey
25         lda     sreg
26         sta     (sp),y
27         dey
28         txa
29         sta     (sp),y
30         dey
31         pla
32         sta     (sp),y
33         rts
34