From: Jonas Hvid Date: Mon, 5 Oct 2020 01:38:54 +0000 (+0200) Subject: Implement UTF16" to store UEFI-compatible string X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=4a9ccd4fd3b9b19c696a2f37e0b46eecc1fdd671;p=rrq%2Fjonasforth.git Implement UTF16" to store UEFI-compatible string --- 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()