saved several bytes in BASIC editor
This commit is contained in:
1 parent
758c0a9343
commit
d397e3abfc
1 file changed
+6
-32
@@ -17,42 +17,16 @@ find_line:
|
||||
lda TXTTAB+1
|
||||
sta OLDTXT+1
|
||||
|
||||
// Check if BASIC text actually contains any program
|
||||
|
||||
lda #$00
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<OLDTXT+0
|
||||
jsr peek_under_roms
|
||||
cmp #$00
|
||||
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||
jsr peek_under_roms_via_OLDTXT
|
||||
cmp #$00
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
bne find_line_loop
|
||||
|
||||
iny
|
||||
|
||||
#if CONFIG_MEMORY_MODEL_60K
|
||||
ldx #<OLDTXT+0
|
||||
jsr peek_under_roms
|
||||
cmp #$00
|
||||
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||
jsr peek_under_roms_via_OLDTXT
|
||||
cmp #$00
|
||||
#else // CONFIG_MEMORY_MODEL_38K
|
||||
lda (OLDTXT),y
|
||||
#endif
|
||||
|
||||
beq find_line_fail
|
||||
|
||||
// FALLTROUGH
|
||||
|
||||
find_line_loop:
|
||||
|
||||
// Check if line is not empty
|
||||
|
||||
jsr peek_line_pointer_null_check
|
||||
bcc find_line_fail
|
||||
|
||||
|
||||
// Fetch the high byte of line number and compare
|
||||
ldy #$03
|
||||
|
||||
|
||||
Reference in new issue
Block a user