improved syntax in MONITOR

This commit is contained in:
FeralChild64 committed 2021-01-25 21:44:56 +01:00
1 parent 6193fdcf7b
commit 91468574fd
11 files changed
+41 -8

No files matched your search

+2 -2
View File
@@ -49,7 +49,7 @@ Mon_Load_Verify:
jsr SELDEV ; set default unit
stx FA
jsr Get_Val_To_LAC
jsr Get_DecVal_To_LAC
beq @got_unit
jsr Syntax_Byte_AC
lda Long_AC+0
@@ -93,7 +93,7 @@ Mon_Save:
; Determine unit
jsr Get_Val_To_LAC
jsr Get_DecVal_To_LAC
+beq Mon_Error
jsr Syntax_Byte_AC
lda Long_AC+0
+39 -6
View File
@@ -2,6 +2,26 @@
; Based on BSM (Bit Shifter's Monitor)
Get_DecVal_To_LAC:
phx
phy
phz
jsr Get_Val_To_LAC_reset
; Enforce decimal system
jsr Get_Glyph
+beq @exit
dec Buf_Index
lda #'+' ; set numbric system to decimal
@exit:
bra Get_Val_To_LAC_common
Got_Val_To_LAC: ; to be used when first byte already fetched
dec Buf_Index
@@ -13,18 +33,20 @@ Get_Val_To_LAC:
phx
phy
phz
lda #$00
sta Dig_Cnt ; count columns read
sta Long_AC+0 ; clear result Long_AC
sta Long_AC+1
sta Long_AC+2
sta Long_AC+3
jsr Get_Val_To_LAC_reset
jsr Get_Glyph ; get 1st. character
; FALLTROUGH
Get_Val_To_LAC_common:
+beq @exit
ldy #$03 ; here we allow '$', '+', '&', and '%' prefixes
; FALLTROUGH
@loop_prefix:
cmp Cons_Prefix,Y ; Y = base index
@@ -155,3 +177,14 @@ Get_Val_To_LAC:
lda Dig_Cnt ; allow to easily check if a parameter was given
clc
rts
Get_Val_To_LAC_reset:
lda #$00
sta Dig_Cnt ; count columns read
sta Long_AC+0 ; clear result Long_AC
sta Long_AC+1
sta Long_AC+2
sta Long_AC+3
rts