2000-11-01 22:03:22 +00:00
|
|
|
;
|
|
|
|
; Ullrich von Bassewitz, 22.06.1998
|
|
|
|
;
|
|
|
|
; CC65 runtime: Store eax at the address on top of stack with index
|
|
|
|
;
|
|
|
|
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export steaxspidx
|
2018-05-20 13:30:18 +00:00
|
|
|
.import popptr1
|
2013-05-09 11:56:54 +00:00
|
|
|
.importzp sreg, ptr1, tmp1, tmp2, tmp3
|
|
|
|
|
|
|
|
|
|
|
|
.proc steaxspidx
|
|
|
|
|
|
|
|
sta tmp1
|
|
|
|
stx tmp2
|
|
|
|
sty tmp3
|
2018-05-20 13:30:18 +00:00
|
|
|
jsr popptr1 ; get the pointer
|
2013-05-09 11:56:54 +00:00
|
|
|
ldy tmp3
|
|
|
|
lda tmp1
|
|
|
|
sta (ptr1),y
|
|
|
|
iny
|
|
|
|
lda tmp2
|
|
|
|
sta (ptr1),y
|
|
|
|
iny
|
|
|
|
tax
|
|
|
|
lda sreg
|
|
|
|
sta (ptr1),y
|
|
|
|
iny
|
|
|
|
lda sreg+1
|
|
|
|
sta (ptr1),y
|
|
|
|
lda tmp1
|
|
|
|
rts
|
2000-11-01 22:03:22 +00:00
|
|
|
|
|
|
|
.endproc
|
|
|
|
|
|
|
|
|