deduplicated even more code

This commit is contained in:
FeralChild64 committed 2020-07-01 15:13:31 +02:00
1 parent 8d705f2f6d
commit eab79e05b4
9 files changed
+7 -40

No files matched your search

BIN
View File
Binary file not shown.
File renamed without changes.
File renamed without changes.
+2 -2
View File
@@ -34,11 +34,11 @@ list_loop:
jmp shell_main_loop
list_more_lines:
lda STKEY
bmi !+
jmp cmd_stop
!:
jsr list_single_line
// Now link to the next line
jsr basic_find_next_line
jsr follow_link_to_next_line
jmp list_loop
-35
View File
@@ -1,35 +0,0 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
// Advance OLDTXT by following the
// link to the next line
basic_find_next_line:
ldy #0
#if CONFIG_MEMORY_MODEL_60K
ldx #<OLDTXT+0
jsr peek_under_roms
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
jsr peek_under_roms_via_OLDTXT
#else // CONFIG_MEMORY_MODEL_38K
lda (OLDTXT),y
#endif
pha
iny
#if CONFIG_MEMORY_MODEL_60K
jsr peek_under_roms
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
jsr peek_under_roms_via_OLDTXT
#else // CONFIG_MEMORY_MODEL_38K
lda (OLDTXT),y
#endif
sta OLDTXT+1
pla
sta OLDTXT+0
rts
+1 -1
View File
@@ -18,7 +18,7 @@ update_VARTAB_do_clr:
lda OLDTXT+1
sta VARTAB+1
jsr basic_follow_link_to_next_line
jsr follow_link_to_next_line
lda OLDTXT+0
ora OLDTXT+1
+1 -1
View File
@@ -177,7 +177,7 @@ execute_statements_end_of_line:
// Advance the basic line pointer to the next line; if end,
// go to the main loop
jsr basic_follow_link_to_next_line
jsr follow_link_to_next_line
lda OLDTXT+0
ora OLDTXT+1
@@ -2,7 +2,8 @@
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
basic_follow_link_to_next_line:
follow_link_to_next_line:
ldy #0
#if CONFIG_MEMORY_MODEL_60K
@@ -28,4 +29,5 @@ basic_follow_link_to_next_line:
sta OLDTXT+1
pla
sta OLDTXT+0
rts
File renamed without changes.