From 0ac3d1dfd83882154ef7a6b3eb4d7c1023057230 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Sun, 6 Oct 2019 15:41:51 +0200 Subject: [PATCH] fixed MSGFLG handling, prevents FB64 display glitches --- c64/basic/basic_main_loop.s | 4 ++++ c64/basic/cmd_load.s | 9 --------- c64/basic/cmd_run.s | 9 +++++---- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/c64/basic/basic_main_loop.s b/c64/basic/basic_main_loop.s index 4318aa78..911e0f7f 100644 --- a/c64/basic/basic_main_loop.s +++ b/c64/basic/basic_main_loop.s @@ -7,6 +7,10 @@ basic_main_loop: // Tell user we are ready jsr ready_message + // Enable Kernal messages + lda #$80 + jsr JSETMSG + basic_read_next_line: // Read a line of input ldx #$00 diff --git a/c64/basic/cmd_load.s b/c64/basic/cmd_load.s index 2af77bd3..d54960a4 100644 --- a/c64/basic/cmd_load.s +++ b/c64/basic/cmd_load.s @@ -11,15 +11,6 @@ cmd_load: // middle of a program. For safety, we do. jsr basic_do_clr - // Setup Kernal to print control messages or not - lda #$80 // display control messages and omit error messages - ldx CURLIN+1 - cpx #$FF - beq !+ - lda #$00 // direct mode - don't display anything -!: - jsr JSETMSG - // Set filename and length lda #$00 sta FNLEN diff --git a/c64/basic/cmd_run.s b/c64/basic/cmd_run.s index fefd6e6d..6e718c81 100644 --- a/c64/basic/cmd_run.s +++ b/c64/basic/cmd_run.s @@ -2,11 +2,12 @@ cmd_run: // RUN clears all variables jsr basic_do_clr cmd_goto: + // Disable Kernal messages + lda #$00 + jsr JSETMSG + // Reset line pointer to first line of program. - lda TXTTAB+0 - sta OLDTXT+0 - lda TXTTAB+1 - sta OLDTXT+1 + jsr init_oldtxt jsr basic_end_of_statement_check bcs !+