Merge pull request #2674 from GorillaSapiens/c_sp
rename "sp" to "c_sp", avoid conflict with 4510 opcodes
This commit is contained in:
@@ -54,7 +54,7 @@ exit: ldx #$02
|
||||
; Copy back the zero-page stuff.
|
||||
ldx #zpspace-1
|
||||
: lda zpsave,x
|
||||
sta sp,x
|
||||
sta c_sp,x
|
||||
dex
|
||||
bpl :-
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
; Save the zero-page locations that we need.
|
||||
init: ldx #zpspace-1
|
||||
: lda sp,x
|
||||
: lda c_sp,x
|
||||
sta zpsave,x
|
||||
dex
|
||||
bpl :-
|
||||
@@ -82,8 +82,8 @@ basic: lda HIMEM
|
||||
ldx HIMEM+1
|
||||
|
||||
; Set up the C stack.
|
||||
: sta sp
|
||||
stx sp+1
|
||||
: sta c_sp
|
||||
stx c_sp+1
|
||||
|
||||
; ProDOS TechRefMan, chapter 5.3.5:
|
||||
; "Your system program should place in the RESET vector the
|
||||
|
||||
@@ -42,9 +42,9 @@ _exec:
|
||||
; binary programs so we should do the same too in any case
|
||||
; especially as _we_ rely on it in mainargs.s for argv[0]
|
||||
ldy #$00
|
||||
lda (sp),y
|
||||
lda (c_sp),y
|
||||
tay
|
||||
: lda (sp),y
|
||||
: lda (c_sp),y
|
||||
sta $0280,y
|
||||
dey
|
||||
bpl :-
|
||||
|
||||
@@ -34,8 +34,8 @@ pushname:
|
||||
sta mliparam + MLI::ON_LINE::UNIT_NUM
|
||||
|
||||
; Use allocated pathname buffer
|
||||
lda sp
|
||||
ldx sp+1
|
||||
lda c_sp
|
||||
ldx c_sp+1
|
||||
sta mliparam + MLI::ON_LINE::DATA_BUFFER
|
||||
stx mliparam + MLI::ON_LINE::DATA_BUFFER+1
|
||||
|
||||
@@ -46,16 +46,16 @@ pushname:
|
||||
bcs addsp65
|
||||
|
||||
; Get volume name length
|
||||
lda (sp),y
|
||||
lda (c_sp),y
|
||||
and #15 ; Max volume name length
|
||||
|
||||
; Bracket volume name with slashes to form prefix
|
||||
sta tmp1
|
||||
lda #'/'
|
||||
sta (sp),y
|
||||
sta (c_sp),y
|
||||
ldy tmp1
|
||||
iny ; Leading slash
|
||||
sta (sp),y
|
||||
sta (c_sp),y
|
||||
iny ; Trailing slash
|
||||
|
||||
; Adjust source pointer for copy
|
||||
@@ -69,7 +69,7 @@ pushname:
|
||||
|
||||
; Copy source to allocated pathname buffer
|
||||
copy: lda (ptr1),y
|
||||
sta (sp),y
|
||||
sta (c_sp),y
|
||||
beq setlen
|
||||
iny
|
||||
cpy #FILENAME_MAX
|
||||
@@ -86,7 +86,7 @@ addsp65:ldy #FILENAME_MAX
|
||||
setlen: tya
|
||||
jsr decsp1 ; Preserves A
|
||||
ldy #$00
|
||||
sta (sp),y
|
||||
sta (c_sp),y
|
||||
|
||||
; Return success
|
||||
tya
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
; Returns with carry set on error, and sets errno
|
||||
mli_file_info_direct:
|
||||
; Set pushed name
|
||||
lda sp
|
||||
ldx sp+1
|
||||
lda c_sp
|
||||
ldx c_sp+1
|
||||
sta mliparam + MLI::INFO::PATHNAME
|
||||
stx mliparam + MLI::INFO::PATHNAME+1
|
||||
|
||||
|
||||
@@ -341,10 +341,10 @@ MOVE:
|
||||
ldy #$00 ; Start at top of stack
|
||||
|
||||
; Set x
|
||||
lda (sp),y
|
||||
lda (c_sp),y
|
||||
iny
|
||||
sta pos1_lo,x
|
||||
lda (sp),y
|
||||
lda (c_sp),y
|
||||
sta pos1_hi,x
|
||||
|
||||
; Update cursor
|
||||
|
||||
@@ -101,8 +101,8 @@ found: tya
|
||||
bne oserr1
|
||||
|
||||
; Set pushed name
|
||||
lda sp
|
||||
ldx sp+1
|
||||
lda c_sp
|
||||
ldx c_sp+1
|
||||
sta mliparam + MLI::OPEN::PATHNAME
|
||||
stx mliparam + MLI::OPEN::PATHNAME+1
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ __syschdir:
|
||||
bne oserr
|
||||
|
||||
; Set pushed name
|
||||
lda sp
|
||||
ldx sp+1
|
||||
lda c_sp
|
||||
ldx c_sp+1
|
||||
sta mliparam + MLI::PREFIX::PATHNAME
|
||||
stx mliparam + MLI::PREFIX::PATHNAME+1
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ __sysmkdir:
|
||||
bne oserr
|
||||
|
||||
; Set pushed name
|
||||
lda sp
|
||||
ldx sp+1
|
||||
lda c_sp
|
||||
ldx c_sp+1
|
||||
sta mliparam + MLI::CREATE::PATHNAME
|
||||
stx mliparam + MLI::CREATE::PATHNAME+1
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@ __sysremove:
|
||||
bne oserr
|
||||
|
||||
; Set pushed name
|
||||
lda sp
|
||||
ldx sp+1
|
||||
lda c_sp
|
||||
ldx c_sp+1
|
||||
sta mliparam + MLI::DESTROY::PATHNAME
|
||||
stx mliparam + MLI::DESTROY::PATHNAME+1
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ __sysrename:
|
||||
bne oserr1
|
||||
|
||||
; Save pushed oldname
|
||||
lda sp
|
||||
ldx sp+1
|
||||
lda c_sp
|
||||
ldx c_sp+1
|
||||
sta ptr3
|
||||
stx ptr3+1
|
||||
|
||||
@@ -40,8 +40,8 @@ __sysrename:
|
||||
stx mliparam + MLI::RENAME::PATHNAME+1
|
||||
|
||||
; Set pushed newname
|
||||
lda sp
|
||||
ldx sp+1
|
||||
lda c_sp
|
||||
ldx c_sp+1
|
||||
sta mliparam + MLI::RENAME::NEW_PATHNAME
|
||||
stx mliparam + MLI::RENAME::NEW_PATHNAME+1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user