small cleanup in BASIC

This commit is contained in:
FeralChild64 committed 2020-06-05 22:26:08 +02:00
1 parent 580cd65941
commit 0436b5c62e
13 files changed
+319 -278

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Fetches device number and secondary address - if they are present
//
fetch_device_secondary:
// Fetch the device number
jsr injest_comma
bcs fetch_secondary
jsr basic_parse_line_number
lda LINNUM+1
bne_16 do_ILLEGAL_QUANTITY_error
lda LINNUM+0
sta FA
// FALLTROUGH
fetch_secondary:
// Fetch secondary address
jsr injest_comma
bcs fetch_device_secondary_done
jsr basic_parse_line_number
lda LINNUM+1
bne_16 do_ILLEGAL_QUANTITY_error
lda LINNUM+0
sta SA
// FALLTROUGH
fetch_device_secondary_done:
rts