From 531707345b7faa7308245289603ecdb97446fa3c Mon Sep 17 00:00:00 2001 From: jede Date: Sun, 12 May 2024 14:58:52 +0200 Subject: [PATCH] fix/bug_basic10 --- src/commands/basic11.asm | 15 +++++++++++++-- src/shell.asm | 6 ++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/commands/basic11.asm b/src/commands/basic11.asm index 3b77bf9..0d01f48 100644 --- a/src/commands/basic11.asm +++ b/src/commands/basic11.asm @@ -24,7 +24,8 @@ .define BASIC11_OFFSET_ROOT_PATH $FE70 .define BASIC11_OFFSET_LENGTH_ROOT_PATH BASIC11_OFFSET_ROOT_PATH-1 -.define BASIC10_OFFSET_ROOT_PATH $FCEC +.define BASIC10_OFFSET_ROOT_PATH $FCED +.define BASIC10_OFFSET_LENGTH_ROOT_PATH BASIC10_OFFSET_ROOT_PATH-1 .define BASIC11_OFFSET_FOR_ID_OF_ROM_TO_LOAD $F2 .define BASIC11_MAX_LENGTH_DEFAULT_PATH 16 ; MAX : 32 @@ -867,9 +868,11 @@ basic11_driver: lda basic11_mode cmp #BASIC11_ROM beq @forge_path_for_atmos + lda basic11_tmp - sta BASIC10_OFFSET_ROOT_PATH,y + sta BASIC10_OFFSET_ROOT_PATH,y ; Put char of the path in BASIC10 path bne @skip_basic11_forge_path + beq @end_start_with_default_path @forge_path_for_atmos: lda basic11_tmp @@ -881,6 +884,14 @@ basic11_driver: @end_start_with_default_path: ; Store the length of the string + lda basic11_mode + cmp #BASIC11_ROM + beq @set_length_to_atmosrom_path + + sty BASIC10_OFFSET_LENGTH_ROOT_PATH + bne @manage_others_cases + +@set_length_to_atmosrom_path: sty BASIC11_OFFSET_LENGTH_ROOT_PATH beq @let_s_start_atmos diff --git a/src/shell.asm b/src/shell.asm index 382602a..3aabfba 100644 --- a/src/shell.asm +++ b/src/shell.asm @@ -220,8 +220,7 @@ RETURN_BANK_READ_BYTE_FROM_OVERLAY_RAM := $78 ; lda bash_struct_command_line_ptr ; ldy bash_struct_command_line_ptr+1 ; BRK_KERNEL XEXEC - ldx #$00 - exec (bash_struct_command_line_ptr) + system (bash_struct_command_line_ptr) jsr external_cmd jmp loop .endproc @@ -276,8 +275,7 @@ RETURN_BANK_READ_BYTE_FROM_OVERLAY_RAM := $78 ; lda bash_struct_ptr ; ldy bash_struct_ptr+1 ; BRK_KERNEL XEXEC - ldx #$00 - exec (bash_struct_ptr) + system (bash_struct_ptr) jsr external_cmd