From 4a9ccd4fd3b9b19c696a2f37e0b46eecc1fdd671 Mon Sep 17 00:00:00 2001 From: Jonas Hvid Date: Mon, 5 Oct 2020 03:38:54 +0200 Subject: [PATCH] Implement UTF16" to store UEFI-compatible string --- uefi.f | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/uefi.f b/uefi.f index bc030d1..03587a8 100644 --- a/uefi.f +++ b/uefi.f @@ -2,6 +2,16 @@ : ConOut.OutputString ConOut 8 + @ ; : ConOut.OutputString() ConOut SWAP ConOut.OutputString EFICALL2 ; -HERE @ - 97 C, 0 C, 98 C, 0 C, 99 C, 0 C, \ "ABC\0" -ConOut.OutputString() +\ Store a null-terminated UTF-16 string HERE, and return a pointer to its buffer +\ at runtime. +: UTF16" + HERE @ + BEGIN + KEY DUP C, + 0 C, + 34 = UNTIL + HERE @ 2 - HERE ! \ Remove final " + 0 C, 0 C, \ Null terminator + ; + +UTF16" Hello UEFI!" ConOut.OutputString() -- 2.39.2