forth

A WIP implementation of Forth targeting UEFI x86-64.
git clone git://git.christianermann.dev/forth
Log | Files | Refs

commit 56302df696f373955d894acabd53ba29d235cf43
parent d3727ac45a0773a291326f3056a42a60c508f479
Author: Christian Ermann <christianermann@gmail.com>
Date:   Sat, 25 Nov 2023 10:51:49 -0500

Fix sys_read_char

Diffstat:
Mefi.asm | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/efi.asm b/efi.asm @@ -230,10 +230,6 @@ sys_read_char: ; The EFI ReadKeyStroke function actually returns a UTF-16 character but I only ; want to deal with ASCII characters for now. ; - mov rcx, [system_table] - mov rcx, [rcx + EFI_SYSTEM_TABLE.ConIn] - mov rbx, [rcx + SIMPLE_INPUT_INTERFACE.ReadKeyStroke] - mov rdx, .input_key .read_key: ; Call the EFI ReadKeyStroke function until a key is pressed. @@ -242,6 +238,11 @@ sys_read_char: ; read, it is stored in the `.input_key` local variable through a pointer in ; the RDX register. ; + mov rcx, [system_table] + mov rcx, [rcx + EFI_SYSTEM_TABLE.ConIn] + mov rbx, [rcx + SIMPLE_INPUT_INTERFACE.ReadKeyStroke] + mov rdx, .input_key + sub rsp, 32 call rbx add rsp, 32