diff --git a/bin/basic_generic.rom b/bin/basic_generic.rom index 917630e0..584de4c1 100644 Binary files a/bin/basic_generic.rom and b/bin/basic_generic.rom differ diff --git a/bin/basic_generic_crt.rom b/bin/basic_generic_crt.rom index 52f90e7a..881f7fac 100644 Binary files a/bin/basic_generic_crt.rom and b/bin/basic_generic_crt.rom differ diff --git a/bin/basic_ultimate64.rom b/bin/basic_ultimate64.rom index 19e2c58d..81867495 100644 Binary files a/bin/basic_ultimate64.rom and b/bin/basic_ultimate64.rom differ diff --git a/bin/extrom_generic_crt.crt b/bin/extrom_generic_crt.crt index f0665b39..d0171a9d 100644 Binary files a/bin/extrom_generic_crt.crt and b/bin/extrom_generic_crt.crt differ diff --git a/bin/kernal_generic.rom b/bin/kernal_generic.rom index cd40bb21..efa8fda5 100644 Binary files a/bin/kernal_generic.rom and b/bin/kernal_generic.rom differ diff --git a/bin/kernal_generic_crt.rom b/bin/kernal_generic_crt.rom index dfcd4c00..badbe69a 100644 Binary files a/bin/kernal_generic_crt.rom and b/bin/kernal_generic_crt.rom differ diff --git a/bin/kernal_ultimate64.rom b/bin/kernal_ultimate64.rom index dd026ebc..82af16d8 100644 Binary files a/bin/kernal_ultimate64.rom and b/bin/kernal_ultimate64.rom differ diff --git a/bin/mega65.rom b/bin/mega65.rom index e49622a7..3c544b4a 100644 Binary files a/bin/mega65.rom and b/bin/mega65.rom differ diff --git a/bin/mega65_orfont.rom b/bin/mega65_orfont.rom index f86b75e3..d1ff4a17 100644 Binary files a/bin/mega65_orfont.rom and b/bin/mega65_orfont.rom differ diff --git a/src/mon_m65/mon_command_load_save.s b/src/mon_m65/mon_command_load_save.s index f06b2ee5..78260364 100644 --- a/src/mon_m65/mon_command_load_save.s +++ b/src/mon_m65/mon_command_load_save.s @@ -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 diff --git a/src/mon_m65/mon_helper_get_val_to_lac.s b/src/mon_m65/mon_helper_get_val_to_lac.s index 52b721a5..f189029a 100644 --- a/src/mon_m65/mon_helper_get_val_to_lac.s +++ b/src/mon_m65/mon_helper_get_val_to_lac.s @@ -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