small cleanup in BASIC

This commit is contained in:
FeralChild64 committed 2020-06-22 18:45:24 +02:00
1 parent 37b32759dc
commit 524d532433
8 files changed
+64 -48

No files matched your search

+2 -17
View File
@@ -11,7 +11,7 @@ fetch_device_secondary:
// Fetch the device number
jsr fetch_device_secondary_uint8
jsr fetch_coma_uint8
bcs fetch_device_secondary_done
sta FA
@@ -22,7 +22,7 @@ fetch_secondary:
// Fetch secondary address
jsr fetch_device_secondary_uint8
jsr fetch_coma_uint8
bcs fetch_device_secondary_done
sta SA
@@ -32,18 +32,3 @@ fetch_secondary:
fetch_device_secondary_done:
rts
fetch_device_secondary_uint8: // also called by 'cmd_merge'
jsr injest_comma
bcs !+
jsr injest_spaces
jsr basic_parse_line_number
lda LINNUM+1
bne_16 do_ILLEGAL_QUANTITY_error
lda LINNUM+0
clc
!:
rts
-42
View File
@@ -1,42 +0,0 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Fetches file name, Carry set if not found
//
fetch_filename:
// Check if end of statement
jsr end_of_statement_check
bcs fetch_filename_done
// Call the expression parser, make sure it returned a string
jsr FRMEVL
lda VALTYP
bpl_16 do_SYNTAX_error
// Set the filename address and pointer
lda __FAC1+0
sta FNLEN
lda __FAC1+1
sta FNADDR+0
lda __FAC1+2
sta FNADDR+1
// Mark success
clc
// FALLTROUGH
fetch_filename_done:
rts
+27
View File
@@ -0,0 +1,27 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Fetches 8-bit unsigned integer
//
fetch_coma_uint8:
jsr injest_comma
bcs !+
// FALLTROUGH
fetch_uint8:
jsr injest_spaces
jsr basic_parse_line_number
// XXX this should also detect errors
lda LINNUM+1
bne_16 do_ILLEGAL_QUANTITY_error
lda LINNUM+0
clc
!:
rts