This commit is contained in:
Kartik Agaram 2020-09-14 21:42:31 -07:00
parent 6b41ca6d95
commit ad1e53df8b
3 changed files with 4 additions and 4 deletions

View File

@ -119,7 +119,7 @@ $enable-keyboard-type-mode:end:
5d/pop-to-ebp
c3/return
read-key: # -> result/eax: byte
read-key-from-real-keyboard: # -> result/eax: byte
# . prologue
55/push-ebp
89/<- %ebp 4/r32/esp
@ -134,7 +134,7 @@ read-key: # -> result/eax: byte
#
(read 2 %ecx) # => eax
8b/-> *(ecx+0xc) 0/r32/eax
$read-key:end:
$read-key-from-real-keyboard:end:
# . reclaim locals
81 0/subop/add %esp 0x10/imm32
# . restore registers

2
400.mu
View File

@ -158,7 +158,7 @@ sig hide-cursor-on-real-screen
sig show-cursor-on-real-screen
sig enable-keyboard-immediate-mode
sig enable-keyboard-type-mode
sig read-key -> result/eax: byte
sig read-key-from-real-keyboard -> result/eax: byte
sig open filename: (addr array byte), write?: boolean, out: (addr handle buffered-file)
sig populate-buffered-file-containing contents: (addr array byte), out: (addr handle buffered-file)
sig new-buffered-file out: (addr handle buffered-file)

View File

@ -243,7 +243,7 @@ fn skip-spaces _look: byte -> look/esi: byte {
}
fn get-char -> look/esi: byte {
var tmp/eax: byte <- read-key
var tmp/eax: byte <- read-key-from-real-keyboard
look <- copy tmp
compare look, 0
{