]> git.sur5r.net Git - cc65/blob - libsrc/runtime/steaxspp.s
Split of the lruntime module
[cc65] / libsrc / runtime / steaxspp.s
1 ;
2 ; Ullrich von Bassewitz, 22.06.1998
3 ;
4 ; CC65 runtime: Store eax at the address on top of stack.
5 ;
6
7
8         .export         steaxspp
9         .import         popax
10         .importzp       sreg, ptr1
11
12 .proc   steaxspp
13
14         pha
15         txa
16         pha
17         jsr     popax           ; get address
18         sta     ptr1
19         stx     ptr1+1
20         ldy     #3
21         lda     sreg+1
22         sta     (ptr1),y
23         dey
24         lda     sreg
25         sta     (ptr1),y
26         dey
27         pla
28         tax
29         sta     (ptr1),y
30         dey
31         pla
32         sta     (ptr1),y
33         rts
34
35 .endproc
36
37