Compile QUIT
This commit is contained in:
13
wipforth.wat
13
wipforth.wat
@@ -1638,6 +1638,19 @@
|
||||
|
||||
;; : QUIT R0 RSP! INTERPRET BRANCH [-8] ;
|
||||
|
||||
(data (i32.const 0x0b78)
|
||||
"\b4\0a\00\00"
|
||||
"\04QUIT\00\00\00"
|
||||
"\00\00\00\00"
|
||||
"\10\05\00\00" ;; R0
|
||||
"\50\04\00\00" ;; RSP!
|
||||
"\c4\0a\00\00" ;; INTERPRET
|
||||
"\a4\04\00\00" ;; BRANCH
|
||||
"\f8\ff\ff\ff" ;; -8
|
||||
"\0c\04\00\00") ;; EXIT
|
||||
|
||||
;; => 0x28 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
|
||||
|
||||
Reference in New Issue
Block a user