From ea5b8c23642f1a84a8ba37fde79979e5f70f7221 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 13 Jan 2015 19:53:30 -0800 Subject: 550 - another bugfix, another pending test --- chessboard-cursor.mu | 3 +++ mu.arc | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/chessboard-cursor.mu b/chessboard-cursor.mu index 568b8224..767354a6 100644 --- a/chessboard-cursor.mu +++ b/chessboard-cursor.mu @@ -215,6 +215,8 @@ (2:channel-address/raw <- init-channel 1:literal) (fork-helper send-prints-to-stdout:fn nil:literal/globals nil:literal/limit 2:channel-address/raw) { begin + ; print any stray characters from keyboard *before* clearing screen + (flush-stdout) (clear-screen) (print-primitive (("Stupid text-mode chessboard. White pieces in uppercase; black pieces in lowercase. No checking for legal moves." literal))) (cursor-to-next-line) @@ -243,5 +245,6 @@ ; 'q' exits ; 'q' exits anywhere in move ; 'q' exits on second move +; flush stdout after printing out move and before clearing screen ; ; backspace, ctrl-u diff --git a/mu.arc b/mu.arc index 6b89a213..ee6f840d 100644 --- a/mu.arc +++ b/mu.arc @@ -1908,6 +1908,10 @@ } ) +(init-fn flush-stdout + (sleep for-some-cycles:literal 1:literal) +) + ; after all system software is loaded: (freeze system-function*) ) ; section 100 for system software -- cgit 1.4.1-2-gfad0