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

@@ -8,7 +8,7 @@
;
.include "atari.inc"
.importzp sp
.importzp spc
.export _mouse_pm_callbacks
.constructor pm_init, 27
.destructor pm_down
@@ -193,22 +193,22 @@ pm_init:
.else
; use top of memory and lower sp accordingly
sta sp
; use top of memory and lower spc accordingly
sta spc
sta MOUSE_PM_BASE
lda sp+1
lda spc+1
and #7 ; offset within 2K
cmp #3 + MOUSE_PM_RAW + 1 ; can we use it?
bcc @decr ; no
lda sp+1
lda spc+1
and #$F8
@set: adc #3 + MOUSE_PM_RAW - 1 ; CF is set, so adding MOUSE_PM_RAW + 3
sta MOUSE_PM_BASE+1
sta sp+1
sta spc+1
bne @cont ; jump always
@decr: lda sp+1
@decr: lda spc+1
and #$F8
sbc #8 - 1 ; CF is clear, subtracts 8
bcs @set ; jump always