further aliases cleanup
This commit is contained in:
1 parent
1130db35e0
commit
4f58088207
21 files changed
+321
-330
No files matched your search
@@ -4,28 +4,28 @@ basic_shift_mem_down_and_relink:
|
||||
|
||||
// Destination is basic_current_line_ptr
|
||||
lda basic_current_line_ptr+0
|
||||
sta memmove_dst+0
|
||||
sta __memmove_dst+0
|
||||
lda basic_current_line_ptr+1
|
||||
sta memmove_dst+1
|
||||
sta __memmove_dst+1
|
||||
|
||||
// Source is that plus X
|
||||
txa
|
||||
pha // also keep for later
|
||||
clc
|
||||
adc basic_current_line_ptr+0
|
||||
sta memmove_src+0
|
||||
sta __memmove_src+0
|
||||
lda basic_current_line_ptr+1
|
||||
adc #0
|
||||
sta memmove_src+1
|
||||
sta __memmove_src+1
|
||||
|
||||
// Size is distance from source to end of BASIC text.
|
||||
lda basic_end_of_text_ptr+0
|
||||
sec
|
||||
sbc memmove_src+0
|
||||
sta memmove_size+0
|
||||
sbc __memmove_src+0
|
||||
sta __memmove_size+0
|
||||
lda basic_end_of_text_ptr+1
|
||||
sbc memmove_src+1
|
||||
sta memmove_size+1
|
||||
sbc __memmove_src+1
|
||||
sta __memmove_size+1
|
||||
|
||||
// jsr printf
|
||||
// .text "TOP OF BASIC = $"
|
||||
@@ -33,14 +33,14 @@ basic_shift_mem_down_and_relink:
|
||||
// .byte $f0,<basic_end_of_text_ptr,>basic_end_of_text_ptr
|
||||
// .byte $0d
|
||||
// .text "SHIFTING DOWN $"
|
||||
// .byte $f1,<memmove_size,>memmove_size
|
||||
// .byte $f0,<memmove_size,>memmove_size
|
||||
// .byte $f1,<__memmove_size,>__memmove_size
|
||||
// .byte $f0,<__memmove_size,>__memmove_size
|
||||
// .text " BYTES FROM $"
|
||||
// .byte $f1,<memmove_src,>memmove_src
|
||||
// .byte $f0,<memmove_src,>memmove_src
|
||||
// .byte $f1,<__memmove_src,>__memmove_src
|
||||
// .byte $f0,<__memmove_src,>__memmove_src
|
||||
// .text " TO $"
|
||||
// .byte $f1,<memmove_dst,>memmove_dst
|
||||
// .byte $f0,<memmove_dst,>memmove_dst
|
||||
// .byte $f1,<__memmove_dst,>__memmove_dst
|
||||
// .byte $f0,<__memmove_dst,>__memmove_dst
|
||||
// .byte $0d,0
|
||||
|
||||
// The copy routine that copies under the ROMs is as simple
|
||||
@@ -54,50 +54,50 @@ basic_shift_mem_down_and_relink:
|
||||
// This means we have to then reduce the source and
|
||||
// target pointers by the same amount
|
||||
|
||||
lda memmove_size+0
|
||||
lda __memmove_size+0
|
||||
eor #$ff
|
||||
sta tokenise_work3
|
||||
sta memmove_size+0
|
||||
sta __tokenise_work3
|
||||
sta __memmove_size+0
|
||||
|
||||
lda memmove_src+0
|
||||
lda __memmove_src+0
|
||||
sec
|
||||
sbc tokenise_work3
|
||||
sta memmove_src+0
|
||||
lda memmove_src+1
|
||||
sbc __tokenise_work3
|
||||
sta __memmove_src+0
|
||||
lda __memmove_src+1
|
||||
sbc #0
|
||||
sta memmove_src+1
|
||||
sta __memmove_src+1
|
||||
|
||||
lda memmove_dst+0
|
||||
lda __memmove_dst+0
|
||||
sec
|
||||
sbc tokenise_work3
|
||||
sta memmove_dst+0
|
||||
lda memmove_dst+1
|
||||
sbc __tokenise_work3
|
||||
sta __memmove_dst+0
|
||||
lda __memmove_dst+1
|
||||
sbc #0
|
||||
sta memmove_dst+1
|
||||
sta __memmove_dst+1
|
||||
|
||||
// Increase copy page count so we can post-decrement compare with $00
|
||||
inc memmove_size+1
|
||||
inc __memmove_size+1
|
||||
|
||||
// jsr printf
|
||||
// .text "REVISED BOUNDS $"
|
||||
// .byte $f1,<memmove_size,>memmove_size
|
||||
// .byte $f0,<memmove_size,>memmove_size
|
||||
// .byte $f1,<__memmove_size,>__memmove_size
|
||||
// .byte $f0,<__memmove_size,>__memmove_size
|
||||
// .text " BYTES FROM $"
|
||||
// .byte $f1,<memmove_src,>memmove_src
|
||||
// .byte $f0,<memmove_src,>memmove_src
|
||||
// .byte $f1,<__memmove_src,>__memmove_src
|
||||
// .byte $f0,<__memmove_src,>__memmove_src
|
||||
// .text " TO $"
|
||||
// .byte $f1,<memmove_dst,>memmove_dst
|
||||
// .byte $f0,<memmove_dst,>memmove_dst
|
||||
// .byte $f1,<__memmove_dst,>__memmove_dst
|
||||
// .byte $f0,<__memmove_dst,>__memmove_dst
|
||||
// .byte $0d,0
|
||||
|
||||
// Get Y value ready for the copy
|
||||
ldy memmove_size+0
|
||||
ldy __memmove_size+0
|
||||
|
||||
jsr shift_mem_down
|
||||
|
||||
// Get length of deletion back
|
||||
pla
|
||||
sta tokenise_work3
|
||||
sta __tokenise_work3
|
||||
|
||||
// Check if we still have any lines left
|
||||
ldy #0
|
||||
@@ -112,7 +112,7 @@ relink_down_next_line:
|
||||
// inc $d020
|
||||
// jmp relink_down_next_line
|
||||
|
||||
// Subtract tokenise_work3 from the pointer
|
||||
// Subtract __tokenise_work3 from the pointer
|
||||
ldy #0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
@@ -123,8 +123,8 @@ relink_down_next_line:
|
||||
#endif
|
||||
|
||||
sec
|
||||
sbc tokenise_work3
|
||||
sta memmove_src+0
|
||||
sbc __tokenise_work3
|
||||
sta __memmove_src+0
|
||||
iny
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
@@ -134,10 +134,10 @@ relink_down_next_line:
|
||||
#endif
|
||||
|
||||
sbc #0
|
||||
sta memmove_src+1
|
||||
sta __memmove_src+1
|
||||
|
||||
ldy #0
|
||||
lda memmove_src+0
|
||||
lda __memmove_src+0
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<basic_current_line_ptr+0
|
||||
@@ -147,7 +147,7 @@ relink_down_next_line:
|
||||
#endif
|
||||
|
||||
iny
|
||||
lda memmove_src+1
|
||||
lda __memmove_src+1
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
jsr poke_under_roms
|
||||
@@ -157,9 +157,9 @@ relink_down_next_line:
|
||||
|
||||
relink_down_loop:
|
||||
// Now advance pointer to the next line,
|
||||
lda memmove_src+0
|
||||
lda __memmove_src+0
|
||||
sta basic_current_line_ptr+0
|
||||
lda memmove_src+1
|
||||
lda __memmove_src+1
|
||||
sta basic_current_line_ptr+1
|
||||
|
||||
// Have we run out of lines to patch?
|
||||
|
||||
Reference in new issue
Block a user