variable support cleanup
This commit is contained in:
1 parent
51aec45c8d
commit
09f85cea8a
64 files changed
+266
-87
No files matched your search
@@ -1,53 +0,0 @@
|
||||
// #LAYOUT# STD * #TAKE-HIGH
|
||||
// #LAYOUT# * BASIC_0 #TAKE-HIGH
|
||||
// #LAYOUT# * * #IGNORE
|
||||
|
||||
// This has to go $E000 or above - routines below banks out the main BASIC ROM!
|
||||
|
||||
//
|
||||
// Helper routine for string concatenation
|
||||
//
|
||||
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||
|
||||
helper_add_concat:
|
||||
|
||||
// Unmap BASIC lower ROM
|
||||
|
||||
lda #$26
|
||||
sta CPU_R6510
|
||||
|
||||
// Copy data from the first string
|
||||
|
||||
ldy #$00
|
||||
!:
|
||||
lda (__FAC2+1),y
|
||||
sta (INDEX),y
|
||||
iny
|
||||
cpy __FAC2+0
|
||||
bne !-
|
||||
|
||||
// Increase INDEX pointer by the size of the 1st string
|
||||
|
||||
tya
|
||||
jsr varstr_INDEX_up_A
|
||||
|
||||
// Copy data from the second string
|
||||
|
||||
ldy #$00
|
||||
!:
|
||||
lda (__FAC1+1),y
|
||||
sta (INDEX),y
|
||||
iny
|
||||
cpy __FAC1+0
|
||||
bne !-
|
||||
|
||||
// Restore default memory mapping
|
||||
|
||||
lda #$27
|
||||
sta CPU_R6510
|
||||
|
||||
rts
|
||||
|
||||
#endif
|
||||
@@ -36,13 +36,18 @@ oper_add_strings:
|
||||
|
||||
pla
|
||||
sta __FAC2+0
|
||||
beq oper_add_strings_end // if string 2 is empty, we have nothing to do
|
||||
|
||||
// If string 2 is empty, release it and quit
|
||||
|
||||
beq oper_add_strings_end
|
||||
|
||||
// If string 1 is empty, just copy the metadata
|
||||
|
||||
lda __FAC1+0
|
||||
bne !+
|
||||
|
||||
jsr tmpstr_free_FAC1
|
||||
|
||||
lda __FAC2+0
|
||||
sta __FAC1+0
|
||||
lda __FAC2+1
|
||||
@@ -88,7 +93,7 @@ oper_add_strings:
|
||||
// Increase INDEX pointer by the size of the 1st string
|
||||
|
||||
tya
|
||||
jsr varstr_INDEX_up_A
|
||||
jsr helper_INDEX_up_A
|
||||
|
||||
// Copy data from the second string
|
||||
|
||||
@@ -104,7 +109,7 @@ oper_add_strings:
|
||||
|
||||
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||
|
||||
jsr helper_add_concat
|
||||
jsr helper_strconcat
|
||||
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
|
||||
@@ -121,7 +126,7 @@ oper_add_strings:
|
||||
// Increase INDEX pointer by the size of the 1st string
|
||||
|
||||
tya
|
||||
jsr varstr_INDEX_up_A
|
||||
jsr helper_INDEX_up_A
|
||||
|
||||
// Copy data from the second string
|
||||
|
||||
@@ -135,11 +140,9 @@ oper_add_strings:
|
||||
|
||||
#endif
|
||||
|
||||
// Free old strings - if they are temporary
|
||||
// Free old FAC1 string - if it was temporary
|
||||
|
||||
// XXX
|
||||
// XXX
|
||||
// XXX
|
||||
jsr tmpstr_free_FAC1
|
||||
|
||||
// Copy the descriptor to __FAC1
|
||||
|
||||
@@ -150,6 +153,9 @@ oper_add_strings:
|
||||
dey
|
||||
bpl !-
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
oper_add_strings_end:
|
||||
|
||||
jsr tmpstr_free_FAC2
|
||||
jmp FRMEVL_continue
|
||||
Reference in new issue
Block a user