Compile FIND
This commit is contained in:
39
wipforth.wat
39
wipforth.wat
@@ -1267,6 +1267,45 @@
|
|||||||
;; SWAP @ BRANCH [-108] \ Follow link and loop
|
;; SWAP @ BRANCH [-108] \ Follow link and loop
|
||||||
;; ;
|
;; ;
|
||||||
|
|
||||||
|
(data (i32.const 0x078c)
|
||||||
|
"\60\07\00\00"
|
||||||
|
"\04FIND\00\00\00"
|
||||||
|
"\00\00\00\00"
|
||||||
|
"\98\05\00\00" ;; LATEST
|
||||||
|
"\cc\03\00\00" ;; @
|
||||||
|
"\f0\05\00\00" ;; TUCK
|
||||||
|
"\70\07\00\00" ;; NAME-LEN
|
||||||
|
"\54\02\00\00" ;; OVER
|
||||||
|
"\08\03\00\00" ;; <>
|
||||||
|
"\b4\04\00\00" ;; 0BRANCH
|
||||||
|
"\30\00\00\00" ;; 48
|
||||||
|
"\54\02\00\00" ;; OVER
|
||||||
|
"\18\04\00\00" ;; LIT
|
||||||
|
"\05\00\00\00" ;; 5
|
||||||
|
"\c0\02\00\00" ;; +
|
||||||
|
"\54\02\00\00" ;; OVER
|
||||||
|
"\28\02\00\00" ;; SWAP
|
||||||
|
"\ac\05\00\00" ;; WORDBUF
|
||||||
|
"\f4\06\00\00" ;; STRING=
|
||||||
|
"\b4\04\00\00" ;; 0BRANCH
|
||||||
|
"\0c\00\00\00" ;; 12
|
||||||
|
"\18\02\00\00" ;; DROP
|
||||||
|
"\0c\04\00\00" ;; EXIT
|
||||||
|
"\54\02\00\00" ;; OVER
|
||||||
|
"\cc\03\00\00" ;; @
|
||||||
|
"\44\03\00\00" ;; 0=
|
||||||
|
"\b4\04\00\00" ;; 0BRANCH
|
||||||
|
"\0c\00\00\00" ;; 12
|
||||||
|
"\18\02\00\00" ;; DROP
|
||||||
|
"\0c\04\00\00" ;; EXIT
|
||||||
|
"\28\02\00\00" ;; SWAP
|
||||||
|
"\cc\03\00\00" ;; @
|
||||||
|
"\a4\04\00\00" ;; BRANCH
|
||||||
|
"\94\ff\ff\ff" ;; -108
|
||||||
|
"\0c\04\00\00") ;; EXIT
|
||||||
|
|
||||||
|
;; => 0x90 bytes
|
||||||
|
|
||||||
;; : >CFA ( entry -- cfa )
|
;; : >CFA ( entry -- cfa )
|
||||||
;; DUP NAME-LEN \ Get name length
|
;; DUP NAME-LEN \ Get name length
|
||||||
;; 5 + + \ Increment address to end of name
|
;; 5 + + \ Increment address to end of name
|
||||||
|
|||||||
Reference in New Issue
Block a user