From: Jonas Hvid Date: Mon, 9 Mar 2020 16:01:33 +0000 (+0100) Subject: Show the user's input on screen as they are typing X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=5590376dd58a32395dd2bb5a82a6441043b3ef7e;p=rrq%2Fjonasforth.git Show the user's input on screen as they are typing --- diff --git a/uefi.asm b/uefi.asm index 6584315..4ec1b57 100644 --- a/uefi.asm +++ b/uefi.asm @@ -119,7 +119,6 @@ uefi_print_string: ;; Inputs: ;; - RCX = Character buffer (1 byte) ;; -;; [TODO] Show the user's input on screen while they are typing. ;; [TODO] Handle enter key correctly (should return '\n'). uefi_read_char: mov r15, rcx @@ -139,6 +138,11 @@ uefi_read_char: mov ax, [input_key.UnicodeChar] mov [r15], al + ;; Print the character + mov rcx, r15 + mov rdx, 1 + call uefi_print_string + ret ;; Terminate with the given error code.