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

@@ -17,7 +17,7 @@
.constructor initstkchk, 25
.import __STACKSIZE__ ; Linker defined
.import pusha0, _exit
.importzp sp
.importzp spc
; Use macros for better readability
.macpack generic
@@ -32,11 +32,11 @@
.proc initstkchk
lda sp
lda spc
sta initialsp
sub #<__STACKSIZE__
sta lowwater
lda sp+1
lda spc+1
sta initialsp+1
sbc #>__STACKSIZE__
.if (.cpu .bitand ::CPU_ISET_65SC02)
@@ -70,7 +70,7 @@ cstkchk:
; Check the high byte of the software stack
@L0: lda lowwater+1
cmp sp+1
cmp spc+1
bcs @L1
rts
@@ -78,7 +78,7 @@ cstkchk:
@L1: bne CStackOverflow
lda lowwater
cmp sp
cmp spc
bcs CStackOverflow
Done: rts
@@ -87,9 +87,9 @@ Done: rts
CStackOverflow:
lda initialsp
sta sp
sta spc
lda initialsp+1
sta sp+1
sta spc+1
; Generic abort entry. We should output a diagnostic here, but this is
; difficult, since we're operating at a lower level here.