1
0
mirror of https://github.com/cc65/cc65.git synced 2026-04-25 06:17:58 +00:00

changed "spc" to "c_sp"

This commit is contained in:
Gorilla Sapiens
2025-06-04 06:37:59 +00:00
parent 3d118dc6e5
commit b6f42f9ab2
204 changed files with 913 additions and 909 deletions
+4 -4
View File
@@ -59,8 +59,8 @@ start:
lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
sta spc
stx spc+1
sta c_sp
stx c_sp+1
.else
@@ -75,11 +75,11 @@ start:
lda MEMTOP
sbc #<__RESERVED_MEMORY__
sta APPMHI ; initialize our APPMHI value
sta spc ; set up runtime stack part 1
sta c_sp ; set up runtime stack part 1
lda MEMTOP+1
sbc #>__RESERVED_MEMORY__
sta APPMHI+1
sta spc+1 ; set up runtime stack part 2
sta c_sp+1 ; set up runtime stack part 2
.endif
+4 -4
View File
@@ -16,7 +16,7 @@
.export sectsizetab
.import ___oserror, __sio_call, _dio_read
.import pushax, addysp, subysp
.importzp ptr2, spc
.importzp ptr2, c_sp
.include "atari.inc"
@@ -78,10 +78,10 @@ _dio_open:
ldy #128
jsr subysp ; allocate buffer on the stack
lda spc
lda c_sp
pha
lda spc+1
pha ; save spc (buffer address) on processor stack
lda c_sp+1
pha ; save c_sp (buffer address) on processor stack
lda ptr2
ldx ptr2+1
+2 -2
View File
@@ -6,7 +6,7 @@
.include "atari.inc"
.include "fd.inc"
.importzp tmp1,tmp2,tmp3,ptr4,spc
.importzp tmp1,tmp2,tmp3,ptr4,c_sp
.import fd_table,fd_index
.import fdt_to_fdi
.export clriocb
@@ -229,7 +229,7 @@ freefnd:txa
beq l2
l1: ldy #0
lda (spc),y ; get device
lda (c_sp),y ; get device
l2: sta fd_table+ft_dev,x ; set device
lda #1
sta fd_table+ft_usa,x ; set usage counter
+7 -7
View File
@@ -8,7 +8,7 @@
;
.include "atari.inc"
.importzp spc
.importzp c_sp
.export _mouse_pm_callbacks
.constructor pm_init, 27
.destructor pm_down
@@ -193,22 +193,22 @@ pm_init:
.else
; use top of memory and lower spc accordingly
sta spc
; use top of memory and lower c_sp accordingly
sta c_sp
sta MOUSE_PM_BASE
lda spc+1
lda c_sp+1
and #7 ; offset within 2K
cmp #3 + MOUSE_PM_RAW + 1 ; can we use it?
bcc @decr ; no
lda spc+1
lda c_sp+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 spc+1
sta c_sp+1
bne @cont ; jump always
@decr: lda spc+1
@decr: lda c_sp+1
and #$F8
sbc #8 - 1 ; CF is clear, subtracts 8
bcs @set ; jump always
+2 -2
View File
@@ -241,11 +241,11 @@ MOVE: php
jsr CMOVEY ; Set it
ldy #$01
lda (spc),y
lda (c_sp),y
sta XPos+1
tax
dey
lda (spc),y
lda (c_sp),y
sta XPos ; New X position
jsr CMOVEX ; Move the cursor
+2 -2
View File
@@ -399,12 +399,12 @@ MOVE: php
jsr CMOVEY ; Set it
ldy #$01
lda (spc),y
lda (c_sp),y
sta XPos+1
sta XPosWrk+1
tax
dey
lda (spc),y
lda (c_sp),y
sta XPos ; New X position
sta XPosWrk
jsr CMOVEX ; Move the cursor
+2 -2
View File
@@ -236,11 +236,11 @@ MOVE: php
jsr CMOVEY ; Set it
ldy #$01
lda (spc),y
lda (c_sp),y
sta XPos+1
tax
dey
lda (spc),y
lda (c_sp),y
sta XPos ; New X position
jsr CMOVEX ; Move the cursor
+11 -11
View File
@@ -6,7 +6,7 @@
.include "atari.inc"
.import findfreeiocb
.importzp tmp4, spc, ptr2, ptr3
.importzp tmp4, c_sp, ptr2, ptr3
.import incsp2, subysp, addysp, popax
.ifdef UCASE_FILENAME
.importzp tmp3
@@ -118,19 +118,19 @@ L1: jsr subysp ; make room on the stack
; copy old name
ldy #0
con: lda (ptr3),y
sta (spc),y
sta (c_sp),y
beq copyend
iny
bne con
copyend:lda #$20 ; space
sta (spc),y
sta (c_sp),y
iny
tya ; get current offset (beyond old name)
clc
adc spc
adc c_sp
sta ptr3
lda spc+1
lda c_sp+1
adc #0
sta ptr3+1 ; ptr3 now contains pointer to space for new filename
@@ -143,9 +143,9 @@ cnn: lda (ptr2),y
bne cnn
copend2:ldx tmp4
lda spc
lda c_sp
sta ICBAL,x
lda spc+1
lda c_sp+1
sta ICBAH,x
lda #RENAME
sta ICCOM,x
@@ -160,13 +160,13 @@ copend2:ldx tmp4
; clean up stack
lda spc
lda c_sp
clc
adc sspc
sta spc
lda spc+1
sta c_sp
lda c_sp+1
adc sspc+1
sta spc+1
sta c_sp+1
; handle status
+6 -6
View File
@@ -24,7 +24,7 @@
.importzp tmp2
.import __defdev
.endif
.importzp tmp3,ptr4,spc
.importzp tmp3,ptr4,c_sp
.import subysp,addysp
.export ucase_fn
@@ -63,13 +63,13 @@ hasdev:
ldy #0
loop2: lda (ptr4),y
sta (spc),y
sta (c_sp),y
beq copy_end
bmi L1 ; Not lowercase (also, invalid, should reject)
cmp #'a'
bcc L1 ; Not lowercase
and #$DF ; make upper case char, assume ASCII chars
sta (spc),y ; store back
sta (c_sp),y ; store back
L1:
iny
bpl loop2 ; bpl: this way we only support a max. length of 127
@@ -93,15 +93,15 @@ copy_end:
jsr subysp ; adjust stack pointer
dey
cpdev: lda __defdev,y
sta (spc),y ; insert device name, number and ':'
sta (c_sp),y ; insert device name, number and ':'
dey
bpl cpdev
hasdev2:
.endif
; leave A and X pointing to the modified filename
lda spc
ldx spc+1
lda c_sp
ldx c_sp+1
clc ; indicate success
rts