decspX will no longer save a
git-svn-id: svn://svn.cc65.org/cc65/trunk@662 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
c18453ebcb
commit
0bac28d96f
2 changed files with 20 additions and 16 deletions
|
@ -18,18 +18,22 @@ _strdup:
|
||||||
; Since we need some place to store the intermediate results, allocate a
|
; Since we need some place to store the intermediate results, allocate a
|
||||||
; stack frame. To make this somewhat more efficient, create the stackframe
|
; stack frame. To make this somewhat more efficient, create the stackframe
|
||||||
; as needed for the final call to the memcpy function.
|
; as needed for the final call to the memcpy function.
|
||||||
|
|
||||||
|
pha ; decsp will destroy A (but not X)
|
||||||
jsr decsp4 ; Target/source
|
jsr decsp4 ; Target/source
|
||||||
|
|
||||||
; Store the pointer into the source slot
|
; Store the pointer into the source slot
|
||||||
|
|
||||||
ldy #0
|
ldy #1
|
||||||
sta (sp),y
|
|
||||||
iny
|
|
||||||
pha
|
|
||||||
txa
|
txa
|
||||||
sta (sp),y
|
sta (sp),y
|
||||||
pla
|
pla
|
||||||
|
.ifpc02
|
||||||
|
sta (sp)
|
||||||
|
.else
|
||||||
|
dey
|
||||||
|
sta (sp),y
|
||||||
|
.endif
|
||||||
|
|
||||||
; Get length of S (which is still in a/x)
|
; Get length of S (which is still in a/x)
|
||||||
|
|
||||||
|
|
|
@ -16,19 +16,19 @@ push0ax:
|
||||||
sty sreg
|
sty sreg
|
||||||
sty sreg+1
|
sty sreg+1
|
||||||
pusheax:
|
pusheax:
|
||||||
|
pha ; decsp will destroy A (but not X)
|
||||||
jsr decsp4
|
jsr decsp4
|
||||||
pha
|
ldy #3
|
||||||
ldy #0
|
|
||||||
sta (sp),y
|
|
||||||
iny
|
|
||||||
txa
|
|
||||||
sta (sp),y
|
|
||||||
iny
|
|
||||||
lda sreg
|
|
||||||
sta (sp),y
|
|
||||||
iny
|
|
||||||
lda sreg+1
|
lda sreg+1
|
||||||
sta (sp),y
|
sta (sp),y
|
||||||
|
dey
|
||||||
|
lda sreg
|
||||||
|
sta (sp),y
|
||||||
|
dey
|
||||||
|
txa
|
||||||
|
sta (sp),y
|
||||||
|
dey
|
||||||
pla
|
pla
|
||||||
|
sta (sp),y
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue