diff --git a/wipforth.wat b/wipforth.wat index c8e3968..8397e3a 100644 --- a/wipforth.wat +++ b/wipforth.wat @@ -1820,6 +1820,24 @@ ;; => 0x48 bytes + ;; : HIDDEN 4+ DUP C@ 32 XOR SWAP C! ; + + (data (i32.const 0x0c98) + "\50\0c\00\00" + "\06HIDDEN\00" + "\00\00\00\00" + "\a8\02\00\00" ;; 4+ + "\08\02\00\00" ;; DUP + "\fc\03\00\00" ;; C@ + "\18\04\00\00" ;; LIT + "\20\00\00\00" ;; 32 + "\a4\03\00\00" ;; XOR + "\28\02\00\00" ;; SWAP + "\f0\03\00\00" ;; C! + "\0c\04\00\00") ;; EXIT + + ;; => 0x34 bytes + ;; The trampoline is a workaround for WebAssembly's lack of indirect ;; jumps and code addresses. Instead of jumping into the next ;; codeword, NEXT sets the $fn global to the function index of the