From daaa0b51afa39f60a82e18b399ece0e320d5785d Mon Sep 17 00:00:00 2001 From: Paul Gardner-Stephen Date: Sun, 28 Apr 2019 02:52:04 +0930 Subject: [PATCH] fix bugs with storing basic lines. Now inserting lines seems to mostly work. --- c64/basic/basic_shift_mem_up.s | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/c64/basic/basic_shift_mem_up.s b/c64/basic/basic_shift_mem_up.s index fe4df4fa..c7c64187 100644 --- a/c64/basic/basic_shift_mem_up.s +++ b/c64/basic/basic_shift_mem_up.s @@ -52,20 +52,34 @@ basic_shift_mem_up_and_relink: ;; Then set Y to the number offset required ldy memmove_size+0 + stx tokenise_work3 + ;; Do the copy jsr shift_mem_up ;; Now fix the pointer to the next line ;; First, we need to point the current BASIC line - ;; pointer to the previously present lines - stx tokenise_work3 -relink_up_next_line: - lda tokenise_work3 - clc - adc basic_current_line_ptr+0 - sta memmove_src+0 + ;; pointer to itself, so that we can add the shift + ;; to make it end up pointing to the next line + ldy #0 + ldx #