X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=main.asm;h=54b2a5dfd8c21cf4e7de8ef30c7470ab5c3ecac0;hb=a391c86c2800f3b776bef167b7d43e33a03ec673;hp=93e576fe684543b77547aa936a2b74a109e34116;hpb=0344d8645260cfe0f81912a775d775db39fc0624;p=rrq%2Fjonasforth.git diff --git a/main.asm b/main.asm index 93e576f..54b2a5d 100644 --- a/main.asm +++ b/main.asm @@ -588,6 +588,27 @@ forth MAIN, 'MAIN' dq BRANCH, -8 * 2 dq TERMINATE +;; EFI: + +forth EFI_SYSTEM_TABLE_CONSTANT, 'SystemTable' + dq LIT, system_table, GET + dq EXIT + +forth_asm EFICALL2, 'EFICALL2' + pop rax ; function pointer + pop rdx ; 2nd argument + pop rcx ; 1st argument + + push rsi + + sub rsp, 32 + call rax + add rsp, 32 + + pop rsi + + next + ;; Built-in variables: forth STATE, 'STATE' @@ -665,6 +686,6 @@ return_stack_top: ;; include the file directly in the binary, and then interpret it at startup. sysf: file 'sys.f' -file 'example.f' +file 'uefi.f' sysf.len = $ - sysf