diff --git a/c64/basic/basic_commands/cmd_list.s b/c64/basic/basic_commands/cmd_list.s index a1fcdb1d..93a1fdf3 100644 --- a/c64/basic/basic_commands/cmd_list.s +++ b/c64/basic/basic_commands/cmd_list.s @@ -11,9 +11,6 @@ cmd_list: // Set current line pointer to start of memory jsr init_oldtxt - // Always start with empty line, for readability - jsr print_return - list_loop: ldy #1 diff --git a/c64/basic/basic_commands/cmd_load_verify.s b/c64/basic/basic_commands/cmd_load_verify.s index 8730cc7e..e77a22e4 100644 --- a/c64/basic/basic_commands/cmd_load_verify.s +++ b/c64/basic/basic_commands/cmd_load_verify.s @@ -53,7 +53,7 @@ cmd_load_got_params: // input for tape wedge lda VERCKB // LOAD or VERIFY jsr JLOAD - jsr cmd_load_save_handle_result + bcs_16 do_kernal_error cmd_load_no_error: @@ -94,19 +94,3 @@ cmd_load_no_error: cmd_load_end: jmp basic_main_loop - - -// -// Handle result from Kernal - common for LOAD/VERIFY/SAVE -// - -cmd_load_save_handle_result: - - php - pha - jsr print_return - pla - plp - bcs_16 do_kernal_error - - rts diff --git a/c64/basic/basic_commands/cmd_save.s b/c64/basic/basic_commands/cmd_save.s index 1f06cf23..eae7c785 100644 --- a/c64/basic/basic_commands/cmd_save.s +++ b/c64/basic/basic_commands/cmd_save.s @@ -32,7 +32,7 @@ cmd_save: // Perform saving jsr JSAVE - jsr cmd_load_save_handle_result + bcs_16 do_kernal_error // The end diff --git a/c64/basic/engine/do_error.s b/c64/basic/engine/do_error.s index 1d0c153e..6458b90c 100644 --- a/c64/basic/engine/do_error.s +++ b/c64/basic/engine/do_error.s @@ -171,12 +171,6 @@ do_basic_error: // error code in .X ldx CURLIN+0 jsr print_integer !: - // New lines - - jsr print_return - lda #$00 - jsr JCHROUT - // Reset stack, and go back to main loop ldx #$FE diff --git a/c64/basic/init/basic_warm_start_internal.s b/c64/basic/init/basic_warm_start_internal.s index 79257cd1..75fc68c5 100644 --- a/c64/basic/init/basic_warm_start_internal.s +++ b/c64/basic/init/basic_warm_start_internal.s @@ -26,7 +26,5 @@ basic_warm_start_real: jsr print_hex_byte lda CMP0+0 jsr print_hex_byte - jsr print_return - !: jmp basic_main_loop diff --git a/c64/basic/init/initmsg_real.s b/c64/basic/init/initmsg_real.s index 332ef462..62e612d4 100644 --- a/c64/basic/init/initmsg_real.s +++ b/c64/basic/init/initmsg_real.s @@ -167,10 +167,9 @@ initmsg_real: ldx #$08 ldy #$00 jsr plot_set - jsr print_features - jmp print_return + jmp print_features #else - ldx #$08 + ldx #$07 ldy #$00 jmp plot_set #endif diff --git a/c64/basic/print/list_single_line.s b/c64/basic/print/list_single_line.s index cf13147b..454b9cbb 100644 --- a/c64/basic/print/list_single_line.s +++ b/c64/basic/print/list_single_line.s @@ -13,7 +13,8 @@ list_single_line: #else - // Print line number + // Print line number - in a new line + jsr print_return ldy #3 #if ROM_LAYOUT_M65 @@ -121,8 +122,8 @@ list_is_literal: bne list_print_loop list_end_of_line: - // Print end of line - jmp print_return + + rts #endif // ROM layout diff --git a/c64/basic/wedge/wedge_dos.s b/c64/basic/wedge/wedge_dos.s index a7a787d8..0e9b5d3d 100644 --- a/c64/basic/wedge/wedge_dos.s +++ b/c64/basic/wedge/wedge_dos.s @@ -70,7 +70,6 @@ wedge_dos_command: !: // Retrieve status, print it if not OK jsr JCLALL - jsr print_return jsr wedge_dos_status_get lda BUF+0 cmp #$30 // '0' @@ -97,11 +96,14 @@ wedge_dos_change_drive: jmp do_ILLEGAL_DEVICE_NUMBER_error !: sta FA - jsr print_return jmp basic_main_loop wedge_dos_status_get: + // New line - separate status from current display + + jsr print_return + // Here the flow is mostly the same as in the example from // https://codebase64.org/doku.php?id=base:reading_the_error_channel_of_a_disk_drive @@ -131,17 +133,20 @@ wedge_dos_status_get: jsr JCHRIN bcc wedge_dos_x1 jmp wedge_dos_basic_error // XXX try to optimize this + wedge_dos_x1: sta BUF, y iny jmp !- !: + // Strip ending RETURN + + dey rts wedge_dos_status: jsr wedge_dos_status_get - jsr print_return // FALLTROUGH wedge_dos_status_print: @@ -186,9 +191,6 @@ wedge_dos_directory: jsr JCHRIN bcs wedge_dos_basic_error - // Print new line - jsr print_return - wedge_dos_directory_line: // Load a single line, reuse BASIC input buffer diff --git a/c64/kernal/assets/kernal_messages.s b/c64/kernal/assets/kernal_messages.s index 3c876dc9..16cca4ce 100644 --- a/c64/kernal/assets/kernal_messages.s +++ b/c64/kernal/assets/kernal_messages.s @@ -97,12 +97,10 @@ __msg_kernaloksearching: __msg_kernalpal: .text "PAL" - .byte $0D .byte $80 + $0D // end of string mark + return __msg_kernalntsc: .text "NTSC" - .byte $0D .byte $80 + $0D // end of string mark + return #endif // CONFIG_SHOW_PAL_NTSC diff --git a/tools/generate_strings.cc b/tools/generate_strings.cc index cc5f3586..e0c9da64 100644 --- a/tools/generate_strings.cc +++ b/tools/generate_strings.cc @@ -307,11 +307,11 @@ const StringEntryList GLOBAL_MiscStrings = { ListType::STRINGS_BASIC, "misc", { // STD M65 X16 --- misc strings as on CBM machines { true, true, true, "STR_BYTES", " BASIC BYTES FREE" }, // https://github.com/stefanhaustein/expressionparser - { true, true, true, "STR_READY", "READY.\r" }, // https://www.ibm.com/support/knowledgecenter/zosbasics/com.ibm.zos.zconcepts/zconc_whatistsonative.htm https://github.com/stefanhaustein/expressionparser + { true, true, true, "STR_READY", "\rREADY.\r" }, // https://www.ibm.com/support/knowledgecenter/zosbasics/com.ibm.zos.zconcepts/zconc_whatistsonative.htm https://github.com/stefanhaustein/expressionparser { true, true, true, "STR_ERROR", " ERROR" }, // simply the word error that is attached to the other parts of messages https://fjkraan.home.xs4all.nl/comp/apple2faq/app2asoftfaq.html { true, true, true, "STR_IN", " IN " }, // STD M65 X16 --- misc strings specific to OpenROMs, not present in CBM ROMs - { true, true, true, "STR_BRK_AT", "BRK AT $" }, + { true, true, true, "STR_BRK_AT", "\rBRK AT $" }, } };