]> git.sur5r.net Git - cc65/blob - libsrc/runtime/pusha.s
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / libsrc / runtime / pusha.s
1 ;
2 ; Ullrich von Bassewitz, 26.10.2000
3 ;
4 ; CC65 runtime: Push value in a onto the stack
5 ;
6
7         .export         pusha0sp, pushaysp, pusha
8         .importzp       sp
9
10         .macpack        cpu
11
12 ; Beware: The optimizer knows about this function!
13
14 pusha0sp:
15         ldy     #$00
16 pushaysp:
17         lda     (sp),y
18 pusha:  ldy     sp              ; (3)
19         beq     @L1             ; (6)
20         dec     sp              ; (11)
21         ldy     #0              ; (13)
22         sta     (sp),y          ; (19)
23         rts                     ; (25)
24
25 @L1:    dec     sp+1            ; (11)
26         dec     sp              ; (16)
27         sta     (sp),y          ; (22)
28         rts                     ; (28)
29