]> git.sur5r.net Git - cc65/blob - libsrc/runtime/steaxspi.s
Adjusted C declarations to the changed static driver names.
[cc65] / libsrc / runtime / steaxspi.s
1 ;
2 ; Ullrich von Bassewitz, 22.06.1998
3 ;
4 ; CC65 runtime: Store eax at the address on top of stack with index
5 ;
6
7
8         .export         steaxspidx
9         .import         popax
10         .importzp       sreg, ptr1, tmp1, tmp2, tmp3
11
12
13 .proc   steaxspidx
14
15         sta     tmp1
16         stx     tmp2
17         sty     tmp3
18         jsr     popax           ; get the pointer
19         sta     ptr1
20         stx     ptr1+1
21         ldy     tmp3
22         lda     tmp1
23         sta     (ptr1),y
24         iny
25         lda     tmp2
26         sta     (ptr1),y
27         iny
28         tax
29         lda     sreg
30         sta     (ptr1),y
31         iny
32         lda     sreg+1
33         sta     (ptr1),y
34         lda     tmp1
35         rts
36
37 .endproc
38
39