]> git.sur5r.net Git - cc65/blob - libsrc/runtime/steaxspi.s
Implemented line wrap.
[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         popptr1
10         .importzp       sreg, ptr1, tmp1, tmp2, tmp3
11
12
13 .proc   steaxspidx
14
15         sta     tmp1
16         stx     tmp2
17         sty     tmp3
18         jsr     popptr1          ; get the pointer
19         ldy     tmp3
20         lda     tmp1
21         sta     (ptr1),y
22         iny
23         lda     tmp2
24         sta     (ptr1),y
25         iny
26         tax
27         lda     sreg
28         sta     (ptr1),y
29         iny
30         lda     sreg+1
31         sta     (ptr1),y
32         lda     tmp1
33         rts
34
35 .endproc
36
37