rename "sp" to "spc", avoid conflict with 4510 opcodes

This commit is contained in:
Gorilla Sapiens
2025-06-04 02:06:40 +00:00
parent 58171691d0
commit 3d118dc6e5
204 changed files with 908 additions and 908 deletions

View File

@@ -6,7 +6,7 @@
.export tosulong, toslong
.import decsp2
.importzp sp
.importzp spc
.macpack cpu
@@ -16,25 +16,25 @@ tosulong:
pha
jsr decsp2 ; Make room
ldy #2
lda (sp),y
lda (spc),y
.if (.cpu .bitand CPU_ISET_65SC02)
sta (sp) ; 65C02 version
sta (spc) ; 65C02 version
iny ; Y = 3
.else
ldy #0
sta (sp),y
sta (spc),y
ldy #3
.endif
lda (sp),y
lda (spc),y
toslong1:
ldy #1
sta (sp),y
sta (spc),y
lda #0 ; Zero extend
toslong2:
iny
sta (sp),y
sta (spc),y
iny
sta (sp),y
sta (spc),y
pla
rts
@@ -42,19 +42,19 @@ toslong:
pha
jsr decsp2 ; Make room
ldy #2
lda (sp),y
lda (spc),y
.if (.cpu .bitand CPU_ISET_65SC02)
sta (sp) ; 65C02 version
sta (spc) ; 65C02 version
iny ; Y = 3
.else
ldy #0
sta (sp),y
sta (spc),y
ldy #3
.endif
lda (sp),y
lda (spc),y
bpl toslong1 ; Jump if positive, high word is zero
ldy #1
sta (sp),y
sta (spc),y
lda #$FF
bne toslong2 ; Branch always