fix bugs with storing basic lines. Now inserting lines seems to mostly work.
This commit is contained in:
1 parent
5a5be5d8ec
commit
daaa0b51af
1 file changed
+21
-7
@@ -52,20 +52,34 @@ basic_shift_mem_up_and_relink:
|
|||||||
;; Then set Y to the number offset required
|
;; Then set Y to the number offset required
|
||||||
ldy memmove_size+0
|
ldy memmove_size+0
|
||||||
|
|
||||||
|
stx tokenise_work3
|
||||||
|
|
||||||
;; Do the copy
|
;; Do the copy
|
||||||
jsr shift_mem_up
|
jsr shift_mem_up
|
||||||
|
|
||||||
;; Now fix the pointer to the next line
|
;; Now fix the pointer to the next line
|
||||||
|
|
||||||
;; First, we need to point the current BASIC line
|
;; First, we need to point the current BASIC line
|
||||||
;; pointer to the previously present lines
|
;; pointer to itself, so that we can add the shift
|
||||||
stx tokenise_work3
|
;; to make it end up pointing to the next line
|
||||||
relink_up_next_line:
|
ldy #0
|
||||||
lda tokenise_work3
|
ldx #<basic_current_line_ptr+0
|
||||||
clc
|
lda basic_current_line_ptr+0
|
||||||
adc basic_current_line_ptr+0
|
jsr poke_under_roms
|
||||||
sta memmove_src+0
|
iny
|
||||||
lda basic_current_line_ptr+1
|
lda basic_current_line_ptr+1
|
||||||
|
jsr poke_under_roms
|
||||||
|
|
||||||
|
relink_up_next_line:
|
||||||
|
|
||||||
|
ldy #0
|
||||||
|
ldx #<basic_current_line_ptr+0
|
||||||
|
jsr peek_under_roms
|
||||||
|
clc
|
||||||
|
adc tokenise_work3
|
||||||
|
sta memmove_src+0
|
||||||
|
iny
|
||||||
|
jsr peek_under_roms
|
||||||
adc #0
|
adc #0
|
||||||
sta memmove_src+1
|
sta memmove_src+1
|
||||||
ldy #0
|
ldy #0
|
||||||
|
|||||||
Reference in new issue
Block a user