rename "sp" to "spc", avoid conflict with 4510 opcodes
This commit is contained in:
@@ -59,8 +59,8 @@ start:
|
||||
|
||||
lda #<(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
|
||||
ldx #>(__MAIN_START__ + __MAIN_SIZE__ + __STACKSIZE__)
|
||||
sta sp
|
||||
stx sp+1
|
||||
sta spc
|
||||
stx spc+1
|
||||
|
||||
.else
|
||||
|
||||
@@ -75,11 +75,11 @@ start:
|
||||
lda MEMTOP
|
||||
sbc #<__RESERVED_MEMORY__
|
||||
sta APPMHI ; initialize our APPMHI value
|
||||
sta sp ; set up runtime stack part 1
|
||||
sta spc ; set up runtime stack part 1
|
||||
lda MEMTOP+1
|
||||
sbc #>__RESERVED_MEMORY__
|
||||
sta APPMHI+1
|
||||
sta sp+1 ; set up runtime stack part 2
|
||||
sta spc+1 ; set up runtime stack part 2
|
||||
|
||||
.endif
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
.export sectsizetab
|
||||
.import ___oserror, __sio_call, _dio_read
|
||||
.import pushax, addysp, subysp
|
||||
.importzp ptr2, sp
|
||||
.importzp ptr2, spc
|
||||
.include "atari.inc"
|
||||
|
||||
|
||||
@@ -78,10 +78,10 @@ _dio_open:
|
||||
ldy #128
|
||||
jsr subysp ; allocate buffer on the stack
|
||||
|
||||
lda sp
|
||||
lda spc
|
||||
pha
|
||||
lda sp+1
|
||||
pha ; save sp (buffer address) on processor stack
|
||||
lda spc+1
|
||||
pha ; save spc (buffer address) on processor stack
|
||||
|
||||
lda ptr2
|
||||
ldx ptr2+1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
.include "atari.inc"
|
||||
.include "fd.inc"
|
||||
.importzp tmp1,tmp2,tmp3,ptr4,sp
|
||||
.importzp tmp1,tmp2,tmp3,ptr4,spc
|
||||
.import fd_table,fd_index
|
||||
.import fdt_to_fdi
|
||||
.export clriocb
|
||||
@@ -229,7 +229,7 @@ freefnd:txa
|
||||
beq l2
|
||||
|
||||
l1: ldy #0
|
||||
lda (sp),y ; get device
|
||||
lda (spc),y ; get device
|
||||
l2: sta fd_table+ft_dev,x ; set device
|
||||
lda #1
|
||||
sta fd_table+ft_usa,x ; set usage counter
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -241,11 +241,11 @@ MOVE: php
|
||||
jsr CMOVEY ; Set it
|
||||
|
||||
ldy #$01
|
||||
lda (sp),y
|
||||
lda (spc),y
|
||||
sta XPos+1
|
||||
tax
|
||||
dey
|
||||
lda (sp),y
|
||||
lda (spc),y
|
||||
sta XPos ; New X position
|
||||
jsr CMOVEX ; Move the cursor
|
||||
|
||||
|
||||
@@ -399,12 +399,12 @@ MOVE: php
|
||||
jsr CMOVEY ; Set it
|
||||
|
||||
ldy #$01
|
||||
lda (sp),y
|
||||
lda (spc),y
|
||||
sta XPos+1
|
||||
sta XPosWrk+1
|
||||
tax
|
||||
dey
|
||||
lda (sp),y
|
||||
lda (spc),y
|
||||
sta XPos ; New X position
|
||||
sta XPosWrk
|
||||
jsr CMOVEX ; Move the cursor
|
||||
|
||||
@@ -236,11 +236,11 @@ MOVE: php
|
||||
jsr CMOVEY ; Set it
|
||||
|
||||
ldy #$01
|
||||
lda (sp),y
|
||||
lda (spc),y
|
||||
sta XPos+1
|
||||
tax
|
||||
dey
|
||||
lda (sp),y
|
||||
lda (spc),y
|
||||
sta XPos ; New X position
|
||||
jsr CMOVEX ; Move the cursor
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
.include "atari.inc"
|
||||
.import findfreeiocb
|
||||
.importzp tmp4, sp, ptr2, ptr3
|
||||
.importzp tmp4, spc, 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 (sp),y
|
||||
sta (spc),y
|
||||
beq copyend
|
||||
iny
|
||||
bne con
|
||||
|
||||
copyend:lda #$20 ; space
|
||||
sta (sp),y
|
||||
sta (spc),y
|
||||
iny
|
||||
tya ; get current offset (beyond old name)
|
||||
clc
|
||||
adc sp
|
||||
adc spc
|
||||
sta ptr3
|
||||
lda sp+1
|
||||
lda spc+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 sp
|
||||
lda spc
|
||||
sta ICBAL,x
|
||||
lda sp+1
|
||||
lda spc+1
|
||||
sta ICBAH,x
|
||||
lda #RENAME
|
||||
sta ICCOM,x
|
||||
@@ -160,13 +160,13 @@ copend2:ldx tmp4
|
||||
|
||||
; clean up stack
|
||||
|
||||
lda sp
|
||||
lda spc
|
||||
clc
|
||||
adc sspc
|
||||
sta sp
|
||||
lda sp+1
|
||||
sta spc
|
||||
lda spc+1
|
||||
adc sspc+1
|
||||
sta sp+1
|
||||
sta spc+1
|
||||
|
||||
; handle status
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
.importzp tmp2
|
||||
.import __defdev
|
||||
.endif
|
||||
.importzp tmp3,ptr4,sp
|
||||
.importzp tmp3,ptr4,spc
|
||||
.import subysp,addysp
|
||||
.export ucase_fn
|
||||
|
||||
@@ -63,13 +63,13 @@ hasdev:
|
||||
ldy #0
|
||||
|
||||
loop2: lda (ptr4),y
|
||||
sta (sp),y
|
||||
sta (spc),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 (sp),y ; store back
|
||||
sta (spc),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 (sp),y ; insert device name, number and ':'
|
||||
sta (spc),y ; insert device name, number and ':'
|
||||
dey
|
||||
bpl cpdev
|
||||
hasdev2:
|
||||
.endif
|
||||
|
||||
; leave A and X pointing to the modified filename
|
||||
lda sp
|
||||
ldx sp+1
|
||||
lda spc
|
||||
ldx spc+1
|
||||
clc ; indicate success
|
||||
rts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user