diff options
-rw-r--r-- | apps/arith.mu | 5 | ||||
-rw-r--r-- | apps/tile/main.mu | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/apps/arith.mu b/apps/arith.mu index b7a7c81d..551753de 100644 --- a/apps/arith.mu +++ b/apps/arith.mu @@ -32,6 +32,7 @@ # Error handling is non-existent. This is just a prototype. fn main -> exit-status/ebx: int { + enable-keyboard-immediate-mode var look/esi: grapheme <- copy 0 # lookahead var n/eax: int <- copy 0 # result of each expression print-string 0, "press ctrl-c or ctrl-d to exit\n" @@ -50,6 +51,7 @@ fn main -> exit-status/ebx: int { # loop } + enable-keyboard-type-mode exit-status <- copy 0 } @@ -244,8 +246,9 @@ fn skip-spaces _look: grapheme -> look/esi: grapheme { fn get-char -> look/esi: grapheme { var tmp/eax: grapheme <- read-key-from-real-keyboard + print-grapheme-to-real-screen tmp look <- copy tmp - compare look, 0 + compare look, 4 { break-if-!= print-string 0, "^D\n" diff --git a/apps/tile/main.mu b/apps/tile/main.mu index b02dc386..2e51eba1 100644 --- a/apps/tile/main.mu +++ b/apps/tile/main.mu @@ -87,10 +87,10 @@ fn test { fn repl { { # prompt - var line-storage: (stream byte 0x100) - var line/ecx: (addr stream byte) <- address line-storage print-string-to-real-screen "> " # read + var line-storage: (stream byte 0x100) + var line/ecx: (addr stream byte) <- address line-storage clear-stream line read-line-from-real-keyboard line var done?/eax: boolean <- stream-empty? line |