diff --git a/src/waforth.wat b/src/waforth.wat index 9ad55e6..db72cdd 100644 --- a/src/waforth.wat +++ b/src/waforth.wat @@ -64,7 +64,7 @@ ;; COMPILE_CALL_INDEX := 5 ;; PUSH_INDIRECT_INDEX := 6 ;; END_DO_INDEX := 9 - (table (export "table") 0xae funcref) + (table (export "table") 0xaf funcref) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -202,29 +202,38 @@ ;; Execution tokens are addresses of dictionary entries ;; + ;; [6.2.0455](https://forth-standard.org/standard/core/ColonNONAME) + (func $:NONAME (param $tos i32) (result i32) + (call $create (i32.const 0x0) (i32.const 0) (i32.const 0x0) (global.get $nextTableIndex)) + (call $startColon (i32.const 0)) + (call $push (local.get $tos) (global.get $latest)) + (call $right-bracket)) + (data (i32.const 0x20094) "\00\00\00\00" "\07" ":NONAME" "\10\00\00\00") + (elem (i32.const 0x10) $:NONAME) + ;; [6.1.0010](https://forth-standard.org/standard/core/Store) (func $! (param $tos i32) (result i32) (local $bbtos i32) (i32.store (i32.load (i32.sub (local.get $tos) (i32.const 4))) (i32.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8))))) (local.get $bbtos)) - (data (i32.const 0x20094) "\00\00\00\00" "\01" "! " "\10\00\00\00") - (elem (i32.const 0x10) $!) + (data (i32.const 0x200a4) "\94\00\02\00" "\01" "! " "\11\00\00\00") + (elem (i32.const 0x11) $!) ;; [6.2.0620](https://forth-standard.org/standard/core/qDO) (func $?DO (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileDo (i32.const 1))) - (data (i32.const 0x200a0) "\94\00\02\00" "\83" (; F_IMMEDIATE ;) "?DO" "\11\00\00\00") - (elem (i32.const 0x11) $?DO) + (data (i32.const 0x200b0) "\a4\00\02\00" "\83" (; F_IMMEDIATE ;) "?DO" "\12\00\00\00") + (elem (i32.const 0x12) $?DO) ;; [6.2.0200](https://forth-standard.org/standard/core/Dotp) (func $.p (param $tos i32) (result i32) (call $type (call $parse (i32.const 0x29 (; = ')' ;)))) (local.get $tos)) - (data (i32.const 0x200ac) "\a0\00\02\00" "\82" (; F_IMMEDIATE ;) ".( " "\12\00\00\00") - (elem (i32.const 0x12) $.p) + (data (i32.const 0x200bc) "\b0\00\02\00" "\82" (; F_IMMEDIATE ;) ".( " "\13\00\00\00") + (elem (i32.const 0x13) $.p) ;; [6.1.0030](https://forth-standard.org/standard/core/num) (func $# (param $tos i32) (result i32) @@ -233,7 +242,7 @@ (local $bbtos i32) (local $m i64) (local $npo i32) - (local.set $base (i64.extend_i32_u (i32.load (i32.const 0x203ac (; = body(BASE) ;))))) + (local.set $base (i64.extend_i32_u (i32.load (i32.const 0x203bc (; = body(BASE) ;))))) (local.set $v (i64.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8))))) (local.set $m (i64.rem_u (local.get $v) (local.get $base))) (local.set $v (i64.div_u (local.get $v) (local.get $base))) @@ -242,16 +251,16 @@ (i64.store (local.get $bbtos) (local.get $v)) (global.set $po (local.get $npo)) (local.get $tos)) - (data (i32.const 0x200b8) "\ac\00\02\00" "\01" "# " "\13\00\00\00") - (elem (i32.const 0x13) $#) + (data (i32.const 0x200c8) "\bc\00\02\00" "\01" "# " "\14\00\00\00") + (elem (i32.const 0x14) $#) ;; [6.1.0040](https://forth-standard.org/standard/core/num-end) (func $#> (param $tos i32) (result i32) (i32.store (i32.sub (local.get $tos) (i32.const 8)) (global.get $po)) (i32.store (i32.sub (local.get $tos) (i32.const 4)) (i32.sub (i32.add (global.get $here) (i32.const 0x200 (; = PICTURED_OUTPUT_OFFSET ;))) (global.get $po))) (local.get $tos)) - (data (i32.const 0x200c4) "\b8\00\02\00" "\02" "#> " "\14\00\00\00") - (elem (i32.const 0x14) $#>) + (data (i32.const 0x200d4) "\c8\00\02\00" "\02" "#> " "\15\00\00\00") + (elem (i32.const 0x15) $#>) ;; [6.1.0050](https://forth-standard.org/standard/core/numS) (func $#S (param $tos i32) (result i32) @@ -260,7 +269,7 @@ (local $bbtos i32) (local $m i64) (local $po i32) - (local.set $base (i64.extend_i32_u (i32.load (i32.const 0x203ac (; = body(BASE) ;))))) + (local.set $base (i64.extend_i32_u (i32.load (i32.const 0x203bc (; = body(BASE) ;))))) (local.set $v (i64.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8))))) (local.set $po (global.get $po)) (loop $loop @@ -272,22 +281,22 @@ (i64.store (local.get $bbtos) (local.get $v)) (global.set $po (local.get $po)) (local.get $tos)) - (data (i32.const 0x200d0) "\c4\00\02\00" "\02" "#S " "\15\00\00\00") - (elem (i32.const 0x15) $#S) + (data (i32.const 0x200e0) "\d4\00\02\00" "\02" "#S " "\16\00\00\00") + (elem (i32.const 0x16) $#S) ;; [6.1.0070](https://forth-standard.org/standard/core/Tick) (func $' (param $tos i32) (result i32) (i32.store (local.get $tos) (drop (call $find! (call $parseName)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x200dc) "\d0\00\02\00" "\01" "' " "\16\00\00\00") - (elem (i32.const 0x16) $') + (data (i32.const 0x200ec) "\e0\00\02\00" "\01" "' " "\17\00\00\00") + (elem (i32.const 0x17) $') ;; [6.1.0080](https://forth-standard.org/standard/core/p) (func $paren (param $tos i32) (result i32) (drop (drop (call $parse (i32.const 0x29 (; = ')' ;))))) (local.get $tos)) - (data (i32.const 0x200e8) "\dc\00\02\00" "\81" (; F_IMMEDIATE ;) "( " "\17\00\00\00") - (elem (i32.const 0x17) $paren) + (data (i32.const 0x200f8) "\ec\00\02\00" "\81" (; F_IMMEDIATE ;) "( " "\18\00\00\00") + (elem (i32.const 0x18) $paren) ;; [6.1.0090](https://forth-standard.org/standard/core/Times) (func $* (param $tos i32) (result i32) @@ -297,8 +306,8 @@ (i32.mul (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))) (i32.load (local.get $bbtos)))) (local.get $btos)) - (data (i32.const 0x200f4) "\e8\00\02\00" "\01" "* " "\18\00\00\00") - (elem (i32.const 0x18) $*) + (data (i32.const 0x20104) "\f8\00\02\00" "\01" "* " "\19\00\00\00") + (elem (i32.const 0x19) $*) ;; [6.1.0100](https://forth-standard.org/standard/core/TimesDiv) (func $*/ (param $tos i32) (result i32) @@ -311,8 +320,8 @@ (i64.extend_i32_s (i32.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8)))))) (i64.extend_i32_s (i32.load (i32.sub (local.get $tos) (i32.const 4))))))) (local.get $bbtos)) - (data (i32.const 0x20100) "\f4\00\02\00" "\02" "*/ " "\19\00\00\00") - (elem (i32.const 0x19) $*/) + (data (i32.const 0x20110) "\04\01\02\00" "\02" "*/ " "\1a\00\00\00") + (elem (i32.const 0x1a) $*/) ;; [6.1.0110](https://forth-standard.org/standard/core/TimesDivMOD) (func $*/MOD (param $tos i32) (result i32) @@ -329,8 +338,8 @@ (local.tee $x2 (i64.extend_i32_s (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))))))))) (i32.store (local.get $bbtos) (i32.wrap_i64 (i64.div_s (local.get $x1) (local.get $x2)))) (local.get $btos)) - (data (i32.const 0x2010c) "\00\01\02\00" "\05" "*/MOD " "\1a\00\00\00") - (elem (i32.const 0x1a) $*/MOD) + (data (i32.const 0x2011c) "\10\01\02\00" "\05" "*/MOD " "\1b\00\00\00") + (elem (i32.const 0x1b) $*/MOD) ;; [6.1.0120](https://forth-standard.org/standard/core/Plus) (func $+ (param $tos i32) (result i32) @@ -340,8 +349,8 @@ (i32.add (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))) (i32.load (local.get $bbtos)))) (local.get $btos)) - (data (i32.const 0x2011c) "\0c\01\02\00" "\01" "+ " "\1b\00\00\00") - (elem (i32.const 0x1b) $+) + (data (i32.const 0x2012c) "\1c\01\02\00" "\01" "+ " "\1c\00\00\00") + (elem (i32.const 0x1c) $+) ;; [6.1.0130](https://forth-standard.org/standard/core/PlusStore) (func $+! (param $tos i32) (result i32) @@ -351,16 +360,16 @@ (i32.add (i32.load (local.get $addr)) (i32.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8)))))) (local.get $bbtos)) - (data (i32.const 0x20128) "\1c\01\02\00" "\02" "+! " "\1c\00\00\00") - (elem (i32.const 0x1c) $+!) + (data (i32.const 0x20138) "\2c\01\02\00" "\02" "+! " "\1d\00\00\00") + (elem (i32.const 0x1d) $+!) ;; [6.1.0140](https://forth-standard.org/standard/core/PlusLOOP) (func $+LOOP (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compilePlusLoop)) - (data (i32.const 0x20134) "\28\01\02\00" "\85" (; F_IMMEDIATE ;) "+LOOP " "\1d\00\00\00") - (elem (i32.const 0x1d) $+LOOP) + (data (i32.const 0x20144) "\38\01\02\00" "\85" (; F_IMMEDIATE ;) "+LOOP " "\1e\00\00\00") + (elem (i32.const 0x1e) $+LOOP) ;; [6.1.0150](https://forth-standard.org/standard/core/Comma) (func $comma (param $tos i32) (result i32) @@ -369,8 +378,8 @@ (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (global.set $here (i32.add (global.get $here) (i32.const 4))) (i32.sub (local.get $tos) (i32.const 4))) - (data (i32.const 0x20144) "\34\01\02\00" "\01" ", " "\1e\00\00\00") - (elem (i32.const 0x1e) $comma) + (data (i32.const 0x20154) "\44\01\02\00" "\01" ", " "\1f\00\00\00") + (elem (i32.const 0x1f) $comma) ;; [6.1.0160](https://forth-standard.org/standard/core/Minus) (func $- (param $tos i32) (result i32) @@ -380,8 +389,8 @@ (i32.sub (i32.load (local.get $bbtos)) (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $btos)) - (data (i32.const 0x20150) "\44\01\02\00" "\01" "- " "\1f\00\00\00") - (elem (i32.const 0x1f) $-) + (data (i32.const 0x20160) "\54\01\02\00" "\01" "- " "\20\00\00\00") + (elem (i32.const 0x20) $-) ;; [6.1.0180](https://forth-standard.org/standard/core/d) (func $. (param $tos i32) (result i32) @@ -392,19 +401,19 @@ (then (call $shell_emit (i32.const 0x2d)) (local.set $v (i32.sub (i32.const 0) (local.get $v))))) - (call $U._ (local.get $v) (i32.load (i32.const 0x203ac (; = body(BASE) ;)))) + (call $U._ (local.get $v) (i32.load (i32.const 0x203bc (; = body(BASE) ;)))) (call $shell_emit (i32.const 0x20))) - (data (i32.const 0x2015c) "\50\01\02\00" "\01" ". " "\20\00\00\00") - (elem (i32.const 0x20) $.) + (data (i32.const 0x2016c) "\60\01\02\00" "\01" ". " "\21\00\00\00") + (elem (i32.const 0x21) $.) ;; [6.1.0190](https://forth-standard.org/standard/core/Dotq) (func $.q (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $Sq) - (call $emitICall (i32.const 0) (i32.const 0x9c (; = index("TYPE") ;)))) - (data (i32.const 0x20168) "\5c\01\02\00" "\82" (; F_IMMEDIATE ;) ".\22 " "\21\00\00\00") - (elem (i32.const 0x21) $.q) + (call $emitICall (i32.const 0) (i32.const 0x9d (; = index("TYPE") ;)))) + (data (i32.const 0x20178) "\6c\01\02\00" "\82" (; F_IMMEDIATE ;) ".\22 " "\22\00\00\00") + (elem (i32.const 0x22) $.q) ;; [15.6.1.0220](https://forth-standard.org/standard/tools/DotS) (func $.S (param $tos i32) (result i32) @@ -413,13 +422,13 @@ (block $endLoop (loop $loop (br_if $endLoop (i32.ge_u (local.get $p) (local.get $tos))) - (call $U._ (i32.load (local.get $p)) (i32.load (i32.const 0x203ac (; = body(BASE) ;)))) + (call $U._ (i32.load (local.get $p)) (i32.load (i32.const 0x203bc (; = body(BASE) ;)))) (call $shell_emit (i32.const 0x20)) (local.set $p (i32.add (local.get $p) (i32.const 4))) (br $loop))) (local.get $tos)) - (data (i32.const 0x20174) "\68\01\02\00" "\02" ".S " "\22\00\00\00") - (elem (i32.const 0x22) $.S) + (data (i32.const 0x20184) "\78\01\02\00" "\02" ".S " "\23\00\00\00") + (elem (i32.const 0x23) $.S) ;; [6.1.0230](https://forth-standard.org/standard/core/Div) (func $/ (param $tos i32) (result i32) @@ -431,8 +440,8 @@ (i32.store (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8))) (i32.div_s (i32.load (local.get $bbtos)) (local.get $divisor))) (local.get $btos)) - (data (i32.const 0x20180) "\74\01\02\00" "\01" "/ " "\23\00\00\00") - (elem (i32.const 0x23) $/) + (data (i32.const 0x20190) "\84\01\02\00" "\01" "/ " "\24\00\00\00") + (elem (i32.const 0x24) $/) ;; [6.1.0240](https://forth-standard.org/standard/core/DivMOD) (func $/MOD (param $tos i32) (result i32) @@ -446,8 +455,8 @@ (i32.const 4))))))) (i32.store (local.get $btos) (i32.div_s (local.get $n1) (local.get $n2))) (local.get $tos)) - (data (i32.const 0x2018c) "\80\01\02\00" "\04" "/MOD " "\24\00\00\00") - (elem (i32.const 0x24) $/MOD) + (data (i32.const 0x2019c) "\90\01\02\00" "\04" "/MOD " "\25\00\00\00") + (elem (i32.const 0x25) $/MOD) ;; [6.2.0500](https://forth-standard.org/standard/core/ne) (func $<> (param $tos i32) (result i32) @@ -459,8 +468,8 @@ (then (i32.store (local.get $bbtos) (i32.const 0))) (else (i32.store (local.get $bbtos) (i32.const -1)))) (local.get $btos)) - (data (i32.const 0x2019c) "\8c\01\02\00" "\02" "<> " "\25\00\00\00") - (elem (i32.const 0x25) $<>) + (data (i32.const 0x201ac) "\9c\01\02\00" "\02" "<> " "\26\00\00\00") + (elem (i32.const 0x26) $<>) ;; [6.1.0250](https://forth-standard.org/standard/core/Zeroless) (func $0< (param $tos i32) (result i32) @@ -471,8 +480,8 @@ (then (i32.store (local.get $btos) (i32.const -1))) (else (i32.store (local.get $btos) (i32.const 0)))) (local.get $tos)) - (data (i32.const 0x201a8) "\9c\01\02\00" "\02" "0< " "\26\00\00\00") - (elem (i32.const 0x26) $0<) + (data (i32.const 0x201b8) "\ac\01\02\00" "\02" "0< " "\27\00\00\00") + (elem (i32.const 0x27) $0<) ;; [6.2.0260](https://forth-standard.org/standard/core/Zerone) (func $0<> (param $tos i32) (result i32) @@ -481,8 +490,8 @@ (then (i32.store (local.get $btos) (i32.const -1))) (else (i32.store (local.get $btos) (i32.const 0)))) (local.get $tos)) - (data (i32.const 0x201b4) "\a8\01\02\00" "\03" "0<>" "\27\00\00\00") - (elem (i32.const 0x27) $0<>) + (data (i32.const 0x201c4) "\b8\01\02\00" "\03" "0<>" "\28\00\00\00") + (elem (i32.const 0x28) $0<>) ;; [6.1.0270](https://forth-standard.org/standard/core/ZeroEqual) (func $0= (param $tos i32) (result i32) @@ -491,8 +500,8 @@ (then (i32.store (local.get $btos) (i32.const -1))) (else (i32.store (local.get $btos) (i32.const 0)))) (local.get $tos)) - (data (i32.const 0x201c0) "\b4\01\02\00" "\02" "0= " "\28\00\00\00") - (elem (i32.const 0x28) $0=) + (data (i32.const 0x201d0) "\c4\01\02\00" "\02" "0= " "\29\00\00\00") + (elem (i32.const 0x29) $0=) ;; [6.2.0280](https://forth-standard.org/standard/core/Zeromore) (func $0> (param $tos i32) (result i32) @@ -503,8 +512,8 @@ (then (i32.store (local.get $btos) (i32.const -1))) (else (i32.store (local.get $btos) (i32.const 0)))) (local.get $tos)) - (data (i32.const 0x201cc) "\c0\01\02\00" "\02" "0> " "\29\00\00\00") - (elem (i32.const 0x29) $0>) + (data (i32.const 0x201dc) "\d0\01\02\00" "\02" "0> " "\2a\00\00\00") + (elem (i32.const 0x2a) $0>) ;; [6.1.0290](https://forth-standard.org/standard/core/OnePlus) (func $1+ (param $tos i32) (result i32) @@ -512,8 +521,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.add (i32.load (local.get $btos)) (i32.const 1))) (local.get $tos)) - (data (i32.const 0x201d8) "\cc\01\02\00" "\02" "1+ " "\2a\00\00\00") - (elem (i32.const 0x2a) $1+) + (data (i32.const 0x201e8) "\dc\01\02\00" "\02" "1+ " "\2b\00\00\00") + (elem (i32.const 0x2b) $1+) ;; [6.1.0300](https://forth-standard.org/standard/core/OneMinus) (func $1- (param $tos i32) (result i32) @@ -521,15 +530,15 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.sub (i32.load (local.get $btos)) (i32.const 1))) (local.get $tos)) - (data (i32.const 0x201e4) "\d8\01\02\00" "\02" "1- " "\2b\00\00\00") - (elem (i32.const 0x2b) $1-) + (data (i32.const 0x201f4) "\e8\01\02\00" "\02" "1- " "\2c\00\00\00") + (elem (i32.const 0x2c) $1-) ;; [6.1.0310](https://forth-standard.org/standard/core/TwoStore) (func $2! (param $tos i32) (result i32) (local.get $tos) (call $SWAP) (call $OVER) (call $!) (call $CELL+) (call $!)) - (data (i32.const 0x201f0) "\e4\01\02\00" "\02" "2! " "\2c\00\00\00") - (elem (i32.const 0x2c) $2!) + (data (i32.const 0x20200) "\f4\01\02\00" "\02" "2! " "\2d\00\00\00") + (elem (i32.const 0x2d) $2!) ;; [6.1.0320](https://forth-standard.org/standard/core/TwoTimes) (func $2* (param $tos i32) (result i32) @@ -537,8 +546,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.shl (i32.load (local.get $btos)) (i32.const 1))) (local.get $tos)) - (data (i32.const 0x201fc) "\f0\01\02\00" "\02" "2* " "\2d\00\00\00") - (elem (i32.const 0x2d) $2*) + (data (i32.const 0x2020c) "\00\02\02\00" "\02" "2* " "\2e\00\00\00") + (elem (i32.const 0x2e) $2*) ;; [6.1.0330](https://forth-standard.org/standard/core/TwoDiv) (func $2/ (param $tos i32) (result i32) @@ -546,8 +555,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.shr_s (i32.load (local.get $btos)) (i32.const 1))) (local.get $tos)) - (data (i32.const 0x20208) "\fc\01\02\00" "\02" "2/ " "\2e\00\00\00") - (elem (i32.const 0x2e) $2/) + (data (i32.const 0x20218) "\0c\02\02\00" "\02" "2/ " "\2f\00\00\00") + (elem (i32.const 0x2f) $2/) ;; [6.1.0350](https://forth-standard.org/standard/core/TwoFetch) (func $2@ (param $tos i32) (result i32) @@ -557,8 +566,8 @@ (call $@) (call $SWAP) (call $@)) - (data (i32.const 0x20214) "\08\02\02\00" "\02" "2@ " "\2f\00\00\00") - (elem (i32.const 0x2f) $2@) + (data (i32.const 0x20224) "\18\02\02\00" "\02" "2@ " "\30\00\00\00") + (elem (i32.const 0x30) $2@) ;; [6.2.0340](https://forth-standard.org/standard/core/TwotoR) (func $2>R (param $tos i32) (result i32) @@ -568,14 +577,14 @@ (i32.load (local.tee $tos (i32.sub (local.get $tos) (i32.const 8))))) (global.set $tors (i32.add (global.get $tors) (i32.const 8))) (local.get $tos)) - (data (i32.const 0x20220) "\14\02\02\00" "\03" "2>R" "\30\00\00\00") - (elem (i32.const 0x30) $2>R) + (data (i32.const 0x20230) "\24\02\02\00" "\03" "2>R" "\31\00\00\00") + (elem (i32.const 0x31) $2>R) ;; [6.1.0370](https://forth-standard.org/standard/core/TwoDROP) (func $2DROP (param $tos i32) (result i32) (i32.sub (local.get $tos) (i32.const 8))) - (data (i32.const 0x2022c) "\20\02\02\00" "\05" "2DROP " "\31\00\00\00") - (elem (i32.const 0x31) $2DROP) + (data (i32.const 0x2023c) "\30\02\02\00" "\05" "2DROP " "\32\00\00\00") + (elem (i32.const 0x32) $2DROP) ;; [6.1.0380](https://forth-standard.org/standard/core/TwoDUP) (func $2DUP (param $tos i32) (result i32) @@ -584,8 +593,8 @@ (i32.store (i32.add (local.get $tos) (i32.const 4)) (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (i32.add (local.get $tos) (i32.const 8))) - (data (i32.const 0x2023c) "\2c\02\02\00" "\04" "2DUP " "\32\00\00\00") - (elem (i32.const 0x32) $2DUP) + (data (i32.const 0x2024c) "\3c\02\02\00" "\04" "2DUP " "\33\00\00\00") + (elem (i32.const 0x33) $2DUP) ;; [6.1.0400](https://forth-standard.org/standard/core/TwoOVER) (func $2OVER (param $tos i32) (result i32) @@ -594,8 +603,8 @@ (i32.store (i32.add (local.get $tos) (i32.const 4)) (i32.load (i32.sub (local.get $tos) (i32.const 12)))) (i32.add (local.get $tos) (i32.const 8))) - (data (i32.const 0x2024c) "\3c\02\02\00" "\05" "2OVER " "\33\00\00\00") - (elem (i32.const 0x33) $2OVER) + (data (i32.const 0x2025c) "\4c\02\02\00" "\05" "2OVER " "\34\00\00\00") + (elem (i32.const 0x34) $2OVER) ;; [6.2.0415](https://forth-standard.org/standard/core/TwoRFetch) (func $2R@ (param $tos i32) (result i32) @@ -605,8 +614,8 @@ (i32.store (i32.add (local.get $tos) (i32.const 4)) (i32.load (i32.add (local.get $bbtors) (i32.const 4)))) (i32.add (local.get $tos) (i32.const 8))) - (data (i32.const 0x2025c) "\4c\02\02\00" "\03" "2R@" "\34\00\00\00") - (elem (i32.const 0x34) $2R@) + (data (i32.const 0x2026c) "\5c\02\02\00" "\03" "2R@" "\35\00\00\00") + (elem (i32.const 0x35) $2R@) ;; [6.2.0410](https://forth-standard.org/standard/core/TwoRfrom) (func $2R> (param $tos i32) (result i32) @@ -617,8 +626,8 @@ (i32.load (i32.add (local.get $bbtors) (i32.const 4)))) (global.set $tors (local.get $bbtors)) (i32.add (local.get $tos) (i32.const 8))) - (data (i32.const 0x20268) "\5c\02\02\00" "\03" "2R>" "\35\00\00\00") - (elem (i32.const 0x35) $2R>) + (data (i32.const 0x20278) "\6c\02\02\00" "\03" "2R>" "\36\00\00\00") + (elem (i32.const 0x36) $2R>) ;; [6.1.0430](https://forth-standard.org/standard/core/TwoSWAP) (func $2SWAP (param $tos i32) (result i32) @@ -635,32 +644,29 @@ (i32.store (i32.sub (local.get $tos) (i32.const 4)) (local.get $x2)) (local.get $tos)) - (data (i32.const 0x20274) "\68\02\02\00" "\05" "2SWAP " "\36\00\00\00") - (elem (i32.const 0x36) $2SWAP) + (data (i32.const 0x20284) "\78\02\02\00" "\05" "2SWAP " "\37\00\00\00") + (elem (i32.const 0x37) $2SWAP) ;; [6.1.0450](https://forth-standard.org/standard/core/Colon) (func $: (param $tos i32) (result i32) - (local.get $tos) - (call $CREATE) - (call $hidden) - - ;; Turn off (default) data flag - (i32.store - (i32.add (global.get $latest) (i32.const 4)) - (i32.xor - (i32.load (i32.add (global.get $latest) (i32.const 4))) - (i32.const 0x40 (; = F_DATA ;)))) - - ;; Store the code pointer already - ;; The code hasn't been loaded yet, but since nothing can affect the next table - ;; index, we can assume the index will be correct. This allows semicolon to be - ;; agnostic about whether it is compiling a word or a DOES>. - (i32.store (call $body (global.get $latest)) (global.get $nextTableIndex)) - + (local $nameAddr i32) + (local $nameLen i32) + (local.set $nameAddr (local.set $nameLen (call $parseName))) + (if (i32.eqz (local.get $nameLen)) + (call $fail (i32.const 0x2001d (; = str("incomplete input") ;)))) + (call $create + (local.get $nameAddr) + (local.get $nameLen) + (i32.const 0x20 (; = F_HIDDEN ;)) + ;; Store the code pointer already + ;; The code hasn't been loaded yet, but since nothing can affect the next table + ;; index, we can assume the index will be correct. This allows semicolon to be + ;; agnostic about whether it is compiling a word or a DOES>. + (global.get $nextTableIndex)) (call $startColon (i32.const 0)) - (call $right-bracket)) - (data (i32.const 0x20284) "\74\02\02\00" "\01" ": " "\37\00\00\00") - (elem (i32.const 0x37) $:) + (call $right-bracket (local.get $tos))) + (data (i32.const 0x20294) "\84\02\02\00" "\01" ": " "\38\00\00\00") + (elem (i32.const 0x38) $:) ;; [6.1.0460](https://forth-standard.org/standard/core/Semi) (func $semicolon (param $tos i32) (result i32) @@ -669,8 +675,8 @@ (call $endColon) (call $hidden) (call $left-bracket)) - (data (i32.const 0x20290) "\84\02\02\00" "\81" (; F_IMMEDIATE ;) "; " "\38\00\00\00") - (elem (i32.const 0x38) $semicolon) + (data (i32.const 0x202a0) "\94\02\02\00" "\81" (; F_IMMEDIATE ;) "; " "\39\00\00\00") + (elem (i32.const 0x39) $semicolon) ;; [6.1.0480](https://forth-standard.org/standard/core/less) (func $< (param $tos i32) (result i32) @@ -681,15 +687,15 @@ (then (i32.store (local.get $bbtos) (i32.const -1))) (else (i32.store (local.get $bbtos) (i32.const 0)))) (local.get $btos)) - (data (i32.const 0x2029c) "\90\02\02\00" "\01" "< " "\39\00\00\00") - (elem (i32.const 0x39) $<) + (data (i32.const 0x202ac) "\a0\02\02\00" "\01" "< " "\3a\00\00\00") + (elem (i32.const 0x3a) $<) ;; [6.1.0490](https://forth-standard.org/standard/core/num-start) (func $<# (param $tos i32) (result i32) (global.set $po (i32.add (global.get $here) (i32.const 0x200 (; = PICTURED_OUTPUT_OFFSET ;)))) (local.get $tos)) - (data (i32.const 0x202a8) "\9c\02\02\00" "\02" "<# " "\3a\00\00\00") - (elem (i32.const 0x3a) $<#) + (data (i32.const 0x202b8) "\ac\02\02\00" "\02" "<# " "\3b\00\00\00") + (elem (i32.const 0x3b) $<#) ;; [6.1.0530](https://forth-standard.org/standard/core/Equal) (func $= (param $tos i32) (result i32) @@ -700,8 +706,8 @@ (then (i32.store (local.get $bbtos) (i32.const -1))) (else (i32.store (local.get $bbtos) (i32.const 0)))) (local.get $btos)) - (data (i32.const 0x202b4) "\a8\02\02\00" "\01" "= " "\3b\00\00\00") - (elem (i32.const 0x3b) $=) + (data (i32.const 0x202c4) "\b8\02\02\00" "\01" "= " "\3c\00\00\00") + (elem (i32.const 0x3c) $=) ;; [6.1.0540](https://forth-standard.org/standard/core/more) (func $> (param $tos i32) (result i32) @@ -712,8 +718,8 @@ (then (i32.store (local.get $bbtos) (i32.const -1))) (else (i32.store (local.get $bbtos) (i32.const 0)))) (local.get $btos)) - (data (i32.const 0x202c0) "\b4\02\02\00" "\01" "> " "\3c\00\00\00") - (elem (i32.const 0x3c) $>) + (data (i32.const 0x202d0) "\c4\02\02\00" "\01" "> " "\3d\00\00\00") + (elem (i32.const 0x3d) $>) ;; [6.1.0550](https://forth-standard.org/standard/core/toBODY) (func $>BODY (param $tos i32) (result i32) @@ -721,11 +727,11 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.add (call $body (i32.load (local.get $btos))) (i32.const 4))) (local.get $tos)) - (data (i32.const 0x202cc) "\c0\02\02\00" "\05" ">BODY " "\3d\00\00\00") - (elem (i32.const 0x3d) $>BODY) + (data (i32.const 0x202dc) "\d0\02\02\00" "\05" ">BODY " "\3e\00\00\00") + (elem (i32.const 0x3e) $>BODY) ;; [6.1.0560](https://forth-standard.org/standard/core/toIN) - (data (i32.const 0x202dc) "\cc\02\02\00" "\43" (; F_DATA ;) ">IN" "\03\00\00\00" (; = pack(PUSH_DATA_ADDRESS_INDEX) ;) "\00\00\00\00") + (data (i32.const 0x202ec) "\dc\02\02\00" "\43" (; F_DATA ;) ">IN" "\03\00\00\00" (; = pack(PUSH_DATA_ADDRESS_INDEX) ;) "\00\00\00\00") ;; [6.1.0570](https://forth-standard.org/standard/core/toNUMBER) (func $>NUMBER (param $tos i32) (result i32) @@ -746,16 +752,16 @@ (i32.store (local.get $bbtos) (local.get $rest)) (i64.store (local.get $bbbbtos) (local.get $value)) (local.get $tos)) - (data (i32.const 0x202ec) "\dc\02\02\00" "\07" ">NUMBER" "\3e\00\00\00") - (elem (i32.const 0x3e) $>NUMBER) + (data (i32.const 0x202fc) "\ec\02\02\00" "\07" ">NUMBER" "\3f\00\00\00") + (elem (i32.const 0x3f) $>NUMBER) ;; [6.1.0580](https://forth-standard.org/standard/core/toR) (func $>R (param $tos i32) (result i32) (local.tee $tos (i32.sub (local.get $tos) (i32.const 4))) (i32.store (global.get $tors) (i32.load (local.get $tos))) (global.set $tors (i32.add (global.get $tors) (i32.const 4)))) - (data (i32.const 0x202fc) "\ec\02\02\00" "\02" ">R " "\3f\00\00\00") - (elem (i32.const 0x3f) $>R) + (data (i32.const 0x2030c) "\fc\02\02\00" "\02" ">R " "\40\00\00\00") + (elem (i32.const 0x40) $>R) ;; [6.1.0630](https://forth-standard.org/standard/core/qDUP) (func $?DUP (param $tos i32) (result i32) @@ -767,8 +773,8 @@ (i32.add (local.get $tos) (i32.const 4))) (else (local.get $tos)))) - (data (i32.const 0x20308) "\fc\02\02\00" "\04" "?DUP " "\40\00\00\00") - (elem (i32.const 0x40) $?DUP) + (data (i32.const 0x20318) "\0c\03\02\00" "\04" "?DUP " "\41\00\00\00") + (elem (i32.const 0x41) $?DUP) ;; [6.1.0650](https://forth-standard.org/standard/core/Fetch) (func $@ (param $tos i32) (result i32) @@ -776,26 +782,26 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.load (i32.load (local.get $btos)))) (local.get $tos)) - (data (i32.const 0x20318) "\08\03\02\00" "\01" "@ " "\41\00\00\00") - (elem (i32.const 0x41) $@) + (data (i32.const 0x20328) "\18\03\02\00" "\01" "@ " "\42\00\00\00") + (elem (i32.const 0x42) $@) ;; [6.1.0670](https://forth-standard.org/standard/core/ABORT) (func $ABORT (param $tos i32) (result i32) (global.set $error (i32.const 0x3 (; = ERR_ABORT ;))) (call $quit (i32.const 0x10000 (; = STACK_BASE ;)))) - (data (i32.const 0x20324) "\18\03\02\00" "\05" "ABORT " "\42\00\00\00") - (elem (i32.const 0x42) $ABORT) + (data (i32.const 0x20334) "\28\03\02\00" "\05" "ABORT " "\43\00\00\00") + (elem (i32.const 0x43) $ABORT) ;; [6.1.0680](https://forth-standard.org/standard/core/ABORTq) (func $ABORTq (param $tos i32) (result i32) (local.get $tos) (call $compileIf) (call $Sq) - (call $emitICall (i32.const 0) (i32.const 0x9c (; = index("TYPE") ;))) - (call $emitICall (i32.const 0) (i32.const 0x42 (; = index("ABORT") ;))) + (call $emitICall (i32.const 0) (i32.const 0x9d (; = index("TYPE") ;))) + (call $emitICall (i32.const 0) (i32.const 0x43 (; = index("ABORT") ;))) (call $compileThen)) - (data (i32.const 0x20334) "\24\03\02\00" "\86" (; F_IMMEDIATE ;) "ABORT\22 " "\43\00\00\00") - (elem (i32.const 0x43) $ABORTq) + (data (i32.const 0x20344) "\34\03\02\00" "\86" (; F_IMMEDIATE ;) "ABORT\22 " "\44\00\00\00") + (elem (i32.const 0x44) $ABORTq) ;; [6.1.0690](https://forth-standard.org/standard/core/ABS) (func $ABS (param $tos i32) (result i32) @@ -807,8 +813,8 @@ (local.tee $y (i32.shr_s (local.get $v) (i32.const 31)))) (local.get $y))) (local.get $tos)) - (data (i32.const 0x20344) "\34\03\02\00" "\03" "ABS" "\44\00\00\00") - (elem (i32.const 0x44) $ABS) + (data (i32.const 0x20354) "\44\03\02\00" "\03" "ABS" "\45\00\00\00") + (elem (i32.const 0x45) $ABS) ;; [6.1.0695](https://forth-standard.org/standard/core/ACCEPT) (func $ACCEPT (param $tos i32) (result i32) @@ -832,15 +838,15 @@ (br_if $loop (i32.lt_u (local.get $p) (local.get $endp))))) (i32.store (local.get $bbtos) (i32.sub (local.get $p) (local.get $addr))) (local.get $btos)) - (data (i32.const 0x20350) "\44\03\02\00" "\06" "ACCEPT " "\45\00\00\00") - (elem (i32.const 0x45) $ACCEPT) + (data (i32.const 0x20360) "\54\03\02\00" "\06" "ACCEPT " "\46\00\00\00") + (elem (i32.const 0x46) $ACCEPT) ;; [6.1.0705](https://forth-standard.org/standard/core/ALIGN) (func $ALIGN (param $tos i32) (result i32) (global.set $here (call $aligned (global.get $here))) (local.get $tos)) - (data (i32.const 0x20360) "\50\03\02\00" "\05" "ALIGN " "\46\00\00\00") - (elem (i32.const 0x46) $ALIGN) + (data (i32.const 0x20370) "\60\03\02\00" "\05" "ALIGN " "\47\00\00\00") + (elem (i32.const 0x47) $ALIGN) ;; [6.1.0706](https://forth-standard.org/standard/core/ALIGNED) (func $ALIGNED (param $tos i32) (result i32) @@ -848,8 +854,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (call $aligned (i32.load (local.get $btos)))) (local.get $tos)) - (data (i32.const 0x20370) "\60\03\02\00" "\07" "ALIGNED" "\47\00\00\00") - (elem (i32.const 0x47) $ALIGNED) + (data (i32.const 0x20380) "\70\03\02\00" "\07" "ALIGNED" "\48\00\00\00") + (elem (i32.const 0x48) $ALIGNED) ;; [6.1.0710](https://forth-standard.org/standard/core/ALLOT) (func $ALLOT (param $tos i32) (result i32) @@ -857,8 +863,8 @@ (local.get $tos) (local.set $v (call $pop)) (global.set $here (i32.add (global.get $here) (local.get $v)))) - (data (i32.const 0x20380) "\70\03\02\00" "\05" "ALLOT " "\48\00\00\00") - (elem (i32.const 0x48) $ALLOT) + (data (i32.const 0x20390) "\80\03\02\00" "\05" "ALLOT " "\49\00\00\00") + (elem (i32.const 0x49) $ALLOT) ;; [6.1.0720](https://forth-standard.org/standard/core/AND) (func $AND (param $tos i32) (result i32) @@ -868,25 +874,25 @@ (i32.and (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))) (i32.load (local.get $bbtos)))) (local.get $btos)) - (data (i32.const 0x20390) "\80\03\02\00" "\03" "AND" "\49\00\00\00") - (elem (i32.const 0x49) $AND) + (data (i32.const 0x203a0) "\90\03\02\00" "\03" "AND" "\4a\00\00\00") + (elem (i32.const 0x4a) $AND) ;; [6.1.0750](https://forth-standard.org/standard/core/BASE) - (data (i32.const 0x2039c) "\90\03\02\00" "\44" (; F_DATA ;) "BASE " "\03\00\00\00" (; = pack(PUSH_DATA_ADDRESS_INDEX) ;) "\0a\00\00\00" (; = pack(10) ;)) + (data (i32.const 0x203ac) "\a0\03\02\00" "\44" (; F_DATA ;) "BASE " "\03\00\00\00" (; = pack(PUSH_DATA_ADDRESS_INDEX) ;) "\0a\00\00\00" (; = pack(10) ;)) ;; [6.1.0760](https://forth-standard.org/standard/core/BEGIN) (func $BEGIN (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileBegin)) - (data (i32.const 0x203b0) "\9c\03\02\00" "\85" (; F_IMMEDIATE ;) "BEGIN " "\4a\00\00\00") - (elem (i32.const 0x4a) $BEGIN) + (data (i32.const 0x203c0) "\ac\03\02\00" "\85" (; F_IMMEDIATE ;) "BEGIN " "\4b\00\00\00") + (elem (i32.const 0x4b) $BEGIN) ;; [6.1.0770](https://forth-standard.org/standard/core/BL) (func $BL (param $tos i32) (result i32) (call $push (local.get $tos) (i32.const 32))) - (data (i32.const 0x203c0) "\b0\03\02\00" "\02" "BL " "\4b\00\00\00") - (elem (i32.const 0x4b) $BL) + (data (i32.const 0x203d0) "\c0\03\02\00" "\02" "BL " "\4c\00\00\00") + (elem (i32.const 0x4c) $BL) ;; [6.1.0850](https://forth-standard.org/standard/core/CStore) (func $C! (param $tos i32) (result i32) @@ -894,8 +900,8 @@ (i32.store8 (i32.load (i32.sub (local.get $tos) (i32.const 4))) (i32.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8))))) (local.get $bbtos)) - (data (i32.const 0x203cc) "\c0\03\02\00" "\02" "C! " "\4c\00\00\00") - (elem (i32.const 0x4c) $C!) + (data (i32.const 0x203dc) "\d0\03\02\00" "\02" "C! " "\4d\00\00\00") + (elem (i32.const 0x4d) $C!) ;; [6.1.0860](https://forth-standard.org/standard/core/CComma) (func $Cc (param $tos i32) (result i32) @@ -903,8 +909,8 @@ (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (global.set $here (i32.add (global.get $here) (i32.const 1))) (i32.sub (local.get $tos) (i32.const 4))) - (data (i32.const 0x203d8) "\cc\03\02\00" "\02" "C, " "\4d\00\00\00") - (elem (i32.const 0x4d) $Cc) + (data (i32.const 0x203e8) "\dc\03\02\00" "\02" "C, " "\4e\00\00\00") + (elem (i32.const 0x4e) $Cc) ;; [6.2.0855](https://forth-standard.org/standard/core/Cq) (func $Cq (param $tos i32) (result i32) @@ -922,8 +928,8 @@ (call $compilePushConst (global.get $here)) (global.set $here (call $aligned (i32.add (i32.add (global.get $here) (i32.const 1)) (local.get $len))))) - (data (i32.const 0x203e4) "\d8\03\02\00" "\82" (; F_IMMEDIATE ;) "C\22 " "\4e\00\00\00") - (elem (i32.const 0x4e) $Cq) + (data (i32.const 0x203f4) "\e8\03\02\00" "\82" (; F_IMMEDIATE ;) "C\22 " "\4f\00\00\00") + (elem (i32.const 0x4f) $Cq) ;; [6.1.0870](https://forth-standard.org/standard/core/CFetch) (func $C@ (param $tos i32) (result i32) @@ -931,8 +937,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.load8_u (i32.load (local.get $btos)))) (local.get $tos)) - (data (i32.const 0x203f0) "\e4\03\02\00" "\02" "C@ " "\4f\00\00\00") - (elem (i32.const 0x4f) $C@) + (data (i32.const 0x20400) "\f4\03\02\00" "\02" "C@ " "\50\00\00\00") + (elem (i32.const 0x50) $C@) ;; [6.1.0880](https://forth-standard.org/standard/core/CELLPlus) (func $CELL+ (param $tos i32) (result i32) @@ -940,8 +946,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.add (i32.load (local.get $btos)) (i32.const 4))) (local.get $tos)) - (data (i32.const 0x203fc) "\f0\03\02\00" "\05" "CELL+ " "\50\00\00\00") - (elem (i32.const 0x50) $CELL+) + (data (i32.const 0x2040c) "\00\04\02\00" "\05" "CELL+ " "\51\00\00\00") + (elem (i32.const 0x51) $CELL+) ;; [6.1.0890](https://forth-standard.org/standard/core/CELLS) (func $CELLS (param $tos i32) (result i32) @@ -949,8 +955,8 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.shl (i32.load (local.get $btos)) (i32.const 2))) (local.get $tos)) - (data (i32.const 0x2040c) "\fc\03\02\00" "\05" "CELLS " "\51\00\00\00") - (elem (i32.const 0x51) $CELLS) + (data (i32.const 0x2041c) "\0c\04\02\00" "\05" "CELLS " "\52\00\00\00") + (elem (i32.const 0x52) $CELLS) ;; [6.1.0895](https://forth-standard.org/standard/core/CHAR) (func $CHAR (param $tos i32) (result i32) @@ -962,20 +968,20 @@ (call $fail (i32.const 0x2001d (; = str("incomplete input") ;))))) (i32.store (local.get $tos) (i32.load8_u (local.get $addr))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x2041c) "\0c\04\02\00" "\04" "CHAR " "\52\00\00\00") - (elem (i32.const 0x52) $CHAR) + (data (i32.const 0x2042c) "\1c\04\02\00" "\04" "CHAR " "\53\00\00\00") + (elem (i32.const 0x53) $CHAR) ;; [6.1.0897](https://forth-standard.org/standard/core/CHARPlus) (func $CHAR+ (param $tos i32) (result i32) (call $1+ (local.get $tos))) - (data (i32.const 0x2042c) "\1c\04\02\00" "\05" "CHAR+ " "\53\00\00\00") - (elem (i32.const 0x53) $CHAR+) + (data (i32.const 0x2043c) "\2c\04\02\00" "\05" "CHAR+ " "\54\00\00\00") + (elem (i32.const 0x54) $CHAR+) ;; [6.1.0898](https://forth-standard.org/standard/core/CHARS) (func $CHARS (param $tos i32) (result i32) (local.get $tos)) - (data (i32.const 0x2043c) "\2c\04\02\00" "\05" "CHARS " "\54\00\00\00") - (elem (i32.const 0x54) $CHARS) + (data (i32.const 0x2044c) "\3c\04\02\00" "\05" "CHARS " "\55\00\00\00") + (elem (i32.const 0x55) $CHARS) ;; [6.1.0950](https://forth-standard.org/standard/core/CONSTANT) (func $CONSTANT (param $tos i32) (result i32) @@ -986,8 +992,8 @@ (local.set $v (call $pop)) (i32.store (global.get $here) (local.get $v)) (global.set $here (i32.add (global.get $here) (i32.const 4)))) - (data (i32.const 0x2044c) "\3c\04\02\00" "\08" "CONSTANT " "\55\00\00\00") - (elem (i32.const 0x55) $CONSTANT) + (data (i32.const 0x2045c) "\4c\04\02\00" "\08" "CONSTANT " "\56\00\00\00") + (elem (i32.const 0x56) $CONSTANT) ;; [6.1.0980](https://forth-standard.org/standard/core/COUNT) (func $COUNT (param $tos i32) (result i32) @@ -998,64 +1004,53 @@ (i32.const 4))))))) (i32.store (local.get $btos) (i32.add (local.get $addr) (i32.const 1))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20460) "\4c\04\02\00" "\05" "COUNT " "\56\00\00\00") - (elem (i32.const 0x56) $COUNT) + (data (i32.const 0x20470) "\5c\04\02\00" "\05" "COUNT " "\57\00\00\00") + (elem (i32.const 0x57) $COUNT) ;; [6.1.0990](https://forth-standard.org/standard/core/CR) (func $CR (param $tos i32) (result i32) (call $push (local.get $tos) (i32.const 10)) (call $EMIT)) - (data (i32.const 0x20470) "\60\04\02\00" "\02" "CR " "\57\00\00\00") - (elem (i32.const 0x57) $CR) + (data (i32.const 0x20480) "\70\04\02\00" "\02" "CR " "\58\00\00\00") + (elem (i32.const 0x58) $CR) ;; [6.1.1000](https://forth-standard.org/standard/core/CREATE) (func $CREATE (param $tos i32) (result i32) - (local $addr i32) - (local $len i32) - (local $here i32) - - (i32.store (global.get $here) (global.get $latest)) - (global.set $latest (global.get $here)) - (global.set $here (i32.add (global.get $here) (i32.const 4))) - - (local.set $addr (local.set $len (call $parseName))) - (if (i32.eqz (local.get $len)) + (local $nameAddr i32) + (local $nameLen i32) + (local.set $nameAddr (local.set $nameLen (call $parseName))) + (if (i32.eqz (local.get $nameLen)) (call $fail (i32.const 0x2001d (; = str("incomplete input") ;)))) - (i32.store8 (global.get $here) (local.get $len)) - (memory.copy - (local.tee $here (i32.add (global.get $here) (i32.const 1))) - (local.get $addr) - (local.get $len)) - (global.set $here (call $aligned (i32.add (local.get $here) (local.get $len)))) - (i32.store (global.get $here) (i32.const 0x3 (; = PUSH_DATA_ADDRESS_INDEX ;))) - (global.set $here (i32.add (global.get $here) (i32.const 4))) - (i32.store (global.get $here) (i32.const 0)) - (call $setFlag (i32.const 0x40 (; = F_DATA ;))) + (call $create + (local.get $nameAddr) + (local.get $nameLen) + (i32.const 0x40 (; = F_DATA ;)) + (i32.const 0x3 (; = PUSH_DATA_ADDRESS_INDEX ;))) (local.get $tos)) - (data (i32.const 0x2047c) "\70\04\02\00" "\06" "CREATE " "\58\00\00\00") - (elem (i32.const 0x58) $CREATE) + (data (i32.const 0x2048c) "\80\04\02\00" "\06" "CREATE " "\59\00\00\00") + (elem (i32.const 0x59) $CREATE) ;; [6.1.1170](https://forth-standard.org/standard/core/DECIMAL) (func $DECIMAL (param $tos i32) (result i32) - (i32.store (i32.const 0x203ac (; = body(BASE) ;)) (i32.const 10)) + (i32.store (i32.const 0x203bc (; = body(BASE) ;)) (i32.const 10)) (local.get $tos)) - (data (i32.const 0x2048c) "\7c\04\02\00" "\07" "DECIMAL" "\59\00\00\00") - (elem (i32.const 0x59) $DECIMAL) + (data (i32.const 0x2049c) "\8c\04\02\00" "\07" "DECIMAL" "\5a\00\00\00") + (elem (i32.const 0x5a) $DECIMAL) ;; [6.1.1200](https://forth-standard.org/standard/core/DEPTH) (func $DEPTH (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.shr_u (i32.sub (local.get $tos) (i32.const 0x10000 (; = STACK_BASE ;))) (i32.const 2))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x2049c) "\8c\04\02\00" "\05" "DEPTH " "\5a\00\00\00") - (elem (i32.const 0x5a) $DEPTH) + (data (i32.const 0x204ac) "\9c\04\02\00" "\05" "DEPTH " "\5b\00\00\00") + (elem (i32.const 0x5b) $DEPTH) ;; [6.1.1240](https://forth-standard.org/standard/core/DO) (func $DO (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileDo (i32.const 0))) - (data (i32.const 0x204ac) "\9c\04\02\00" "\82" (; F_IMMEDIATE ;) "DO " "\5b\00\00\00") - (elem (i32.const 0x5b) $DO) + (data (i32.const 0x204bc) "\ac\04\02\00" "\82" (; F_IMMEDIATE ;) "DO " "\5c\00\00\00") + (elem (i32.const 0x5c) $DO) ;; [6.1.1250](https://forth-standard.org/standard/core/DOES) (func $DOES> (param $tos i32) (result i32) @@ -1066,37 +1061,37 @@ (call $endColon) (call $startColon (i32.const 1)) (call $compilePushLocal (i32.const 1))) - (data (i32.const 0x204b8) "\ac\04\02\00" "\85" (; F_IMMEDIATE ;) "DOES> " "\5c\00\00\00") - (elem (i32.const 0x5c) $DOES>) + (data (i32.const 0x204c8) "\bc\04\02\00" "\85" (; F_IMMEDIATE ;) "DOES> " "\5d\00\00\00") + (elem (i32.const 0x5d) $DOES>) ;; [6.1.1260](https://forth-standard.org/standard/core/DROP) (func $DROP (param $tos i32) (result i32) (i32.sub (local.get $tos) (i32.const 4))) - (data (i32.const 0x204c8) "\b8\04\02\00" "\04" "DROP " "\5d\00\00\00") - (elem (i32.const 0x5d) $DROP) + (data (i32.const 0x204d8) "\c8\04\02\00" "\04" "DROP " "\5e\00\00\00") + (elem (i32.const 0x5e) $DROP) ;; [6.1.1290](https://forth-standard.org/standard/core/DUP) (func $DUP (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x204d8) "\c8\04\02\00" "\03" "DUP" "\5e\00\00\00") - (elem (i32.const 0x5e) $DUP) + (data (i32.const 0x204e8) "\d8\04\02\00" "\03" "DUP" "\5f\00\00\00") + (elem (i32.const 0x5f) $DUP) ;; [6.1.1310](https://forth-standard.org/standard/core/ELSE) (func $ELSE (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $emitElse)) - (data (i32.const 0x204e4) "\d8\04\02\00" "\84" (; F_IMMEDIATE ;) "ELSE " "\5f\00\00\00") - (elem (i32.const 0x5f) $ELSE) + (data (i32.const 0x204f4) "\e8\04\02\00" "\84" (; F_IMMEDIATE ;) "ELSE " "\60\00\00\00") + (elem (i32.const 0x60) $ELSE) ;; [6.1.1320](https://forth-standard.org/standard/core/EMIT) (func $EMIT (param $tos i32) (result i32) (call $shell_emit (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (i32.sub (local.get $tos) (i32.const 4))) - (data (i32.const 0x204f4) "\e4\04\02\00" "\04" "EMIT " "\60\00\00\00") - (elem (i32.const 0x60) $EMIT) + (data (i32.const 0x20504) "\f4\04\02\00" "\04" "EMIT " "\61\00\00\00") + (elem (i32.const 0x61) $EMIT) ;; [6.1.1345](https://forth-standard.org/standard/core/ENVIRONMENTq) (func $ENVIRONMENT? (param $tos i32) (result i32) @@ -1120,8 +1115,8 @@ (else (i32.store (local.get $bbtos) (i32.const 0)) (local.get $btos)))))) - (data (i32.const 0x20504) "\f4\04\02\00" "\0c" "ENVIRONMENT? " "\61\00\00\00") - (elem (i32.const 0x61) $ENVIRONMENT?) + (data (i32.const 0x20514) "\04\05\02\00" "\0c" "ENVIRONMENT? " "\62\00\00\00") + (elem (i32.const 0x62) $ENVIRONMENT?) ;; [6.2.1350](https://forth-standard.org/standard/core/ERASE) (func $ERASE (param $tos i32) (result i32) @@ -1131,8 +1126,8 @@ (i32.const 0) (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (local.get $bbtos)) - (data (i32.const 0x2051c) "\04\05\02\00" "\05" "ERASE " "\62\00\00\00") - (elem (i32.const 0x62) $ERASE) + (data (i32.const 0x2052c) "\14\05\02\00" "\05" "ERASE " "\63\00\00\00") + (elem (i32.const 0x63) $ERASE) ;; [6.1.1360](https://forth-standard.org/standard/core/EVALUATE) (func $EVALUATE (param $tos i32) (result i32) @@ -1144,44 +1139,44 @@ ;; Save input state (local.set $prevSourceID (global.get $sourceID)) - (local.set $prevIn (i32.load (i32.const 0x202e8 (; = body(>IN) ;)))) + (local.set $prevIn (i32.load (i32.const 0x202f8 (; = body(>IN) ;)))) (local.set $prevInputBufferSize (global.get $inputBufferSize)) (local.set $prevInputBufferBase (global.get $inputBufferBase)) (global.set $sourceID (i32.const -1)) (global.set $inputBufferBase (i32.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8))))) (global.set $inputBufferSize (i32.load (i32.sub (local.get $tos) (i32.const 4)))) - (i32.store (i32.const 0x202e8 (; = body(>IN) ;)) (i32.const 0)) + (i32.store (i32.const 0x202f8 (; = body(>IN) ;)) (i32.const 0)) (call $interpret (local.get $bbtos)) ;; Restore input state (global.set $sourceID (local.get $prevSourceID)) - (i32.store (i32.const 0x202e8 (; = body(>IN) ;)) (local.get $prevIn)) + (i32.store (i32.const 0x202f8 (; = body(>IN) ;)) (local.get $prevIn)) (global.set $inputBufferBase (local.get $prevInputBufferBase)) (global.set $inputBufferSize (local.get $prevInputBufferSize))) - (data (i32.const 0x2052c) "\1c\05\02\00" "\08" "EVALUATE " "\63\00\00\00") - (elem (i32.const 0x63) $EVALUATE) + (data (i32.const 0x2053c) "\2c\05\02\00" "\08" "EVALUATE " "\64\00\00\00") + (elem (i32.const 0x64) $EVALUATE) ;; [6.1.1370](https://forth-standard.org/standard/core/EXECUTE) (func $EXECUTE (param $tos i32) (result i32) (call $execute (call $pop (local.get $tos)))) - (data (i32.const 0x20540) "\2c\05\02\00" "\07" "EXECUTE" "\64\00\00\00") - (elem (i32.const 0x64) $EXECUTE) + (data (i32.const 0x20550) "\3c\05\02\00" "\07" "EXECUTE" "\65\00\00\00") + (elem (i32.const 0x65) $EXECUTE) ;; [6.1.1380](https://forth-standard.org/standard/core/EXIT) (func $EXIT (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $emitReturn)) - (data (i32.const 0x20550) "\40\05\02\00" "\84" (; F_IMMEDIATE ;) "EXIT " "\65\00\00\00") - (elem (i32.const 0x65) $EXIT) + (data (i32.const 0x20560) "\50\05\02\00" "\84" (; F_IMMEDIATE ;) "EXIT " "\66\00\00\00") + (elem (i32.const 0x66) $EXIT) ;; [6.2.1485](https://forth-standard.org/standard/core/FALSE) (func $FALSE (param $tos i32) (result i32) (call $push (local.get $tos) (i32.const 0x0))) - (data (i32.const 0x20560) "\50\05\02\00" "\05" "FALSE " "\66\00\00\00") - (elem (i32.const 0x66) $FALSE) + (data (i32.const 0x20570) "\60\05\02\00" "\05" "FALSE " "\67\00\00\00") + (elem (i32.const 0x67) $FALSE) ;; [6.1.1540](https://forth-standard.org/standard/core/FILL) (func $FILL (param $tos i32) (result i32) @@ -1191,8 +1186,8 @@ (i32.load (i32.sub (local.get $tos) (i32.const 4))) (i32.load (i32.sub (local.get $tos) (i32.const 8)))) (local.get $bbbtos)) - (data (i32.const 0x20570) "\60\05\02\00" "\04" "FILL " "\67\00\00\00") - (elem (i32.const 0x67) $FILL) + (data (i32.const 0x20580) "\70\05\02\00" "\04" "FILL " "\68\00\00\00") + (elem (i32.const 0x68) $FILL) ;; [6.1.1550](https://forth-standard.org/standard/core/FIND) (func $FIND (param $tos i32) (result i32) @@ -1208,8 +1203,8 @@ (else (i32.store (i32.sub (local.get $tos) (i32.const 4)) (local.get $xt)))) (i32.store (local.get $tos) (local.get $r)) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20580) "\70\05\02\00" "\04" "FIND " "\68\00\00\00") - (elem (i32.const 0x68) $FIND) + (data (i32.const 0x20590) "\80\05\02\00" "\04" "FIND " "\69\00\00\00") + (elem (i32.const 0x69) $FIND) ;; [6.1.1561](https://forth-standard.org/standard/core/FMDivMOD) (func $FM/MOD (param $tos i32) (result i32) @@ -1236,22 +1231,22 @@ (i32.store (local.get $bbbtos) (local.get $mod)) (i32.store (i32.sub (local.get $tos) (i32.const 8)) (local.get $q)) (local.get $btos)) - (data (i32.const 0x20590) "\80\05\02\00" "\06" "FM/MOD " "\69\00\00\00") - (elem (i32.const 0x69) $FM/MOD) + (data (i32.const 0x205a0) "\90\05\02\00" "\06" "FM/MOD " "\6a\00\00\00") + (elem (i32.const 0x6a) $FM/MOD) ;; [6.1.1650](https://forth-standard.org/standard/core/HERE) (func $HERE (param $tos i32) (result i32) (i32.store (local.get $tos) (global.get $here)) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x205a0) "\90\05\02\00" "\04" "HERE " "\6a\00\00\00") - (elem (i32.const 0x6a) $HERE) + (data (i32.const 0x205b0) "\a0\05\02\00" "\04" "HERE " "\6b\00\00\00") + (elem (i32.const 0x6b) $HERE) ;; [6.2.1660](https://forth-standard.org/standard/core/HEX) (func $HEX (param $tos i32) (result i32) - (i32.store (i32.const 0x203ac (; = body(BASE) ;)) (i32.const 16)) + (i32.store (i32.const 0x203bc (; = body(BASE) ;)) (i32.const 16)) (local.get $tos)) - (data (i32.const 0x205b0) "\a0\05\02\00" "\03" "HEX" "\6b\00\00\00") - (elem (i32.const 0x6b) $HEX) + (data (i32.const 0x205c0) "\b0\05\02\00" "\03" "HEX" "\6c\00\00\00") + (elem (i32.const 0x6c) $HEX) ;; [6.1.1670](https://forth-standard.org/standard/core/HOLD) (func $HOLD (param $tos i32) (result i32) @@ -1262,30 +1257,30 @@ (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))))) (global.set $po (local.get $npo)) (local.get $btos)) - (data (i32.const 0x205bc) "\b0\05\02\00" "\04" "HOLD " "\6c\00\00\00") - (elem (i32.const 0x6c) $HOLD) + (data (i32.const 0x205cc) "\c0\05\02\00" "\04" "HOLD " "\6d\00\00\00") + (elem (i32.const 0x6d) $HOLD) ;; [6.1.1680](https://forth-standard.org/standard/core/I) (func $I (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.load (i32.sub (global.get $tors) (i32.const 4)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x205cc) "\bc\05\02\00" "\01" "I " "\6d\00\00\00") - (elem (i32.const 0x6d) $I) + (data (i32.const 0x205dc) "\cc\05\02\00" "\01" "I " "\6e\00\00\00") + (elem (i32.const 0x6e) $I) ;; [6.1.1700](https://forth-standard.org/standard/core/IF) (func $IF (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileIf)) - (data (i32.const 0x205d8) "\cc\05\02\00" "\82" (; F_IMMEDIATE ;) "IF " "\6e\00\00\00") - (elem (i32.const 0x6e) $IF) + (data (i32.const 0x205e8) "\dc\05\02\00" "\82" (; F_IMMEDIATE ;) "IF " "\6f\00\00\00") + (elem (i32.const 0x6f) $IF) ;; [6.1.1710](https://forth-standard.org/standard/core/IMMEDIATE) (func $IMMEDIATE (param $tos i32) (result i32) (call $setFlag (i32.const 0x80 (; = F_IMMEDIATE ;))) (local.get $tos)) - (data (i32.const 0x205e4) "\d8\05\02\00" "\09" "IMMEDIATE " "\6f\00\00\00") - (elem (i32.const 0x6f) $IMMEDIATE) + (data (i32.const 0x205f4) "\e8\05\02\00" "\09" "IMMEDIATE " "\70\00\00\00") + (elem (i32.const 0x70) $IMMEDIATE) ;; [6.1.1720](https://forth-standard.org/standard/core/INVERT) (func $INVERT (param $tos i32) (result i32) @@ -1293,52 +1288,52 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.xor (i32.load (local.get $btos)) (i32.const -1))) (local.get $tos)) - (data (i32.const 0x205f8) "\e4\05\02\00" "\06" "INVERT " "\70\00\00\00") - (elem (i32.const 0x70) $INVERT) + (data (i32.const 0x20608) "\f4\05\02\00" "\06" "INVERT " "\71\00\00\00") + (elem (i32.const 0x71) $INVERT) ;; [6.1.1730](https://forth-standard.org/standard/core/J) (func $J (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.load (i32.sub (global.get $tors) (i32.const 8)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20608) "\f8\05\02\00" "\01" "J " "\71\00\00\00") - (elem (i32.const 0x71) $J) + (data (i32.const 0x20618) "\08\06\02\00" "\01" "J " "\72\00\00\00") + (elem (i32.const 0x72) $J) ;; [6.1.1750](https://forth-standard.org/standard/core/KEY) (func $KEY (param $tos i32) (result i32) (i32.store (local.get $tos) (call $shell_key)) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20614) "\08\06\02\00" "\03" "KEY" "\72\00\00\00") - (elem (i32.const 0x72) $KEY) + (data (i32.const 0x20624) "\18\06\02\00" "\03" "KEY" "\73\00\00\00") + (elem (i32.const 0x73) $KEY) (func $LATEST (param $tos i32) (result i32) (i32.store (local.get $tos) (global.get $latest)) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20620) "\14\06\02\00" "\06" "LATEST " "\73\00\00\00") - (elem (i32.const 0x73) $LATEST) + (data (i32.const 0x20630) "\24\06\02\00" "\06" "LATEST " "\74\00\00\00") + (elem (i32.const 0x74) $LATEST) ;; [6.1.1760](https://forth-standard.org/standard/core/LEAVE) (func $LEAVE (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileLeave)) - (data (i32.const 0x20630) "\20\06\02\00" "\85" (; F_IMMEDIATE ;) "LEAVE " "\74\00\00\00") - (elem (i32.const 0x74) $LEAVE) + (data (i32.const 0x20640) "\30\06\02\00" "\85" (; F_IMMEDIATE ;) "LEAVE " "\75\00\00\00") + (elem (i32.const 0x75) $LEAVE) ;; [6.1.1780](https://forth-standard.org/standard/core/LITERAL) (func $LITERAL (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compilePushConst (call $pop))) - (data (i32.const 0x20640) "\30\06\02\00" "\87" (; F_IMMEDIATE ;) "LITERAL" "\75\00\00\00") - (elem (i32.const 0x75) $LITERAL) + (data (i32.const 0x20650) "\40\06\02\00" "\87" (; F_IMMEDIATE ;) "LITERAL" "\76\00\00\00") + (elem (i32.const 0x76) $LITERAL) ;; [6.1.1800](https://forth-standard.org/standard/core/LOOP) (func $LOOP (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileLoop)) - (data (i32.const 0x20650) "\40\06\02\00" "\84" (; F_IMMEDIATE ;) "LOOP " "\76\00\00\00") - (elem (i32.const 0x76) $LOOP) + (data (i32.const 0x20660) "\50\06\02\00" "\84" (; F_IMMEDIATE ;) "LOOP " "\77\00\00\00") + (elem (i32.const 0x77) $LOOP) ;; [6.1.1805](https://forth-standard.org/standard/core/LSHIFT) (func $LSHIFT (param $tos i32) (result i32) @@ -1348,8 +1343,8 @@ (i32.shl (i32.load (local.get $bbtos)) (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $btos)) - (data (i32.const 0x20660) "\50\06\02\00" "\06" "LSHIFT " "\77\00\00\00") - (elem (i32.const 0x77) $LSHIFT) + (data (i32.const 0x20670) "\60\06\02\00" "\06" "LSHIFT " "\78\00\00\00") + (elem (i32.const 0x78) $LSHIFT) ;; [6.1.1810](https://forth-standard.org/standard/core/MTimes) (func $M* (param $tos i32) (result i32) @@ -1359,8 +1354,8 @@ (i64.extend_i32_s (i32.load (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $tos)) - (data (i32.const 0x20670) "\60\06\02\00" "\02" "M* " "\78\00\00\00") - (elem (i32.const 0x78) $M*) + (data (i32.const 0x20680) "\70\06\02\00" "\02" "M* " "\79\00\00\00") + (elem (i32.const 0x79) $M*) ;; [6.1.1870](https://forth-standard.org/standard/core/MAX) (func $MAX (param $tos i32) (result i32) @@ -1373,8 +1368,8 @@ (then (i32.store (local.get $bbtos) (local.get $v)))) (local.get $btos)) - (data (i32.const 0x2067c) "\70\06\02\00" "\03" "MAX" "\79\00\00\00") - (elem (i32.const 0x79) $MAX) + (data (i32.const 0x2068c) "\80\06\02\00" "\03" "MAX" "\7a\00\00\00") + (elem (i32.const 0x7a) $MAX) ;; [6.1.1880](https://forth-standard.org/standard/core/MIN) (func $MIN (param $tos i32) (result i32) @@ -1387,8 +1382,8 @@ (then (i32.store (local.get $bbtos) (local.get $v)))) (local.get $btos)) - (data (i32.const 0x20688) "\7c\06\02\00" "\03" "MIN" "\7a\00\00\00") - (elem (i32.const 0x7a) $MIN) + (data (i32.const 0x20698) "\8c\06\02\00" "\03" "MIN" "\7b\00\00\00") + (elem (i32.const 0x7b) $MIN) ;; [6.1.1890](https://forth-standard.org/standard/core/MOD) (func $MOD (param $tos i32) (result i32) @@ -1398,8 +1393,8 @@ (i32.rem_s (i32.load (local.get $bbtos)) (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $btos)) - (data (i32.const 0x20694) "\88\06\02\00" "\03" "MOD" "\7b\00\00\00") - (elem (i32.const 0x7b) $MOD) + (data (i32.const 0x206a4) "\98\06\02\00" "\03" "MOD" "\7c\00\00\00") + (elem (i32.const 0x7c) $MOD) ;; [6.1.1900](https://forth-standard.org/standard/core/MOVE) (func $MOVE (param $tos i32) (result i32) @@ -1409,8 +1404,8 @@ (i32.load (local.tee $bbbtos (i32.sub (local.get $tos) (i32.const 12)))) (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (local.get $bbbtos)) - (data (i32.const 0x206a0) "\94\06\02\00" "\04" "MOVE " "\7c\00\00\00") - (elem (i32.const 0x7c) $MOVE) + (data (i32.const 0x206b0) "\a4\06\02\00" "\04" "MOVE " "\7d\00\00\00") + (elem (i32.const 0x7d) $MOVE) ;; [6.1.1910](https://forth-standard.org/standard/core/NEGATE) (func $NEGATE (param $tos i32) (result i32) @@ -1418,15 +1413,15 @@ (i32.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i32.sub (i32.const 0) (i32.load (local.get $btos)))) (local.get $tos)) - (data (i32.const 0x206b0) "\a0\06\02\00" "\06" "NEGATE " "\7d\00\00\00") - (elem (i32.const 0x7d) $NEGATE) + (data (i32.const 0x206c0) "\b0\06\02\00" "\06" "NEGATE " "\7e\00\00\00") + (elem (i32.const 0x7e) $NEGATE) ;; [6.2.1930](https://forth-standard.org/standard/core/NIP) (func $NIP (param $tos i32) (result i32) (local.get $tos) (call $SWAP) (call $DROP)) - (data (i32.const 0x206c0) "\b0\06\02\00" "\03" "NIP" "\7e\00\00\00") - (elem (i32.const 0x7e) $NIP) + (data (i32.const 0x206d0) "\c0\06\02\00" "\03" "NIP" "\7f\00\00\00") + (elem (i32.const 0x7f) $NIP) ;; [6.1.1980](https://forth-standard.org/standard/core/OR) (func $OR (param $tos i32) (result i32) @@ -1436,23 +1431,23 @@ (i32.or (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))) (i32.load (local.get $bbtos)))) (local.get $btos)) - (data (i32.const 0x206cc) "\c0\06\02\00" "\02" "OR " "\7f\00\00\00") - (elem (i32.const 0x7f) $OR) + (data (i32.const 0x206dc) "\d0\06\02\00" "\02" "OR " "\80\00\00\00") + (elem (i32.const 0x80) $OR) ;; [6.1.1990](https://forth-standard.org/standard/core/OVER) (func $OVER (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.load (i32.sub (local.get $tos) (i32.const 8)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x206d8) "\cc\06\02\00" "\04" "OVER " "\80\00\00\00") - (elem (i32.const 0x80) $OVER) + (data (i32.const 0x206e8) "\dc\06\02\00" "\04" "OVER " "\81\00\00\00") + (elem (i32.const 0x81) $OVER) ;; [6.2.2000](https://forth-standard.org/standard/core/PAD) (func $PAD (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.add (global.get $here) (i32.const 0x304 (; = PAD_OFFSET ;)))) (i32.add (local.get $tos) (i32.const 0x4))) - (data (i32.const 0x206e8) "\d8\06\02\00" "\03" "PAD" "\81\00\00\00") - (elem (i32.const 0x81) $PAD) + (data (i32.const 0x206f8) "\e8\06\02\00" "\03" "PAD" "\82\00\00\00") + (elem (i32.const 0x82) $PAD) ;; [6.2.2008](https://forth-standard.org/standard/core/PARSE) (func $PARSE (param $tos i32) (result i32) @@ -1465,8 +1460,8 @@ (i32.store (local.get $btos) (local.get $addr)) (i32.store (local.get $tos) (local.get $len)) (i32.add (local.get $tos) (i32.const 0x4))) - (data (i32.const 0x206f4) "\e8\06\02\00" "\05" "PARSE " "\82\00\00\00") - (elem (i32.const 0x82) $PARSE) + (data (i32.const 0x20704) "\f8\06\02\00" "\05" "PARSE " "\83\00\00\00") + (elem (i32.const 0x83) $PARSE) ;; [6.2.2020](https://forth-standard.org/standard/core/PARSE-NAME) (func $PARSE-NAME (param $tos i32) (result i32) @@ -1476,8 +1471,8 @@ (i32.store (local.get $tos) (local.get $addr)) (i32.store (i32.add (local.get $tos) (i32.const 0x4)) (local.get $len)) (i32.add (local.get $tos) (i32.const 0x8))) - (data (i32.const 0x20704) "\f4\06\02\00" "\0a" "PARSE-NAME " "\83\00\00\00") - (elem (i32.const 0x83) $PARSE-NAME) + (data (i32.const 0x20714) "\04\07\02\00" "\0a" "PARSE-NAME " "\84\00\00\00") + (elem (i32.const 0x84) $PARSE-NAME) ;; [6.2.2030](https://forth-standard.org/standard/core/PICK) (func $PICK (param $tos i32) (result i32) @@ -1488,8 +1483,8 @@ (local.get $tos) (i32.shl (i32.add (i32.load (local.get $btos)) (i32.const 2)) (i32.const 2))))) (local.get $tos)) - (data (i32.const 0x20718) "\04\07\02\00" "\04" "PICK " "\84\00\00\00") - (elem (i32.const 0x84) $PICK) + (data (i32.const 0x20728) "\14\07\02\00" "\04" "PICK " "\85\00\00\00") + (elem (i32.const 0x85) $PICK) ;; [6.1.2033](https://forth-standard.org/standard/core/POSTPONE) (func $POSTPONE (param $tos i32) (result i32) @@ -1504,44 +1499,44 @@ (else (call $emitConst (local.get $FINDToken)) (call $emitICall (i32.const 1) (i32.const 0x5 (; = COMPILE_CALL_INDEX ;)))))) - (data (i32.const 0x20728) "\18\07\02\00" "\88" (; F_IMMEDIATE ;) "POSTPONE " "\85\00\00\00") - (elem (i32.const 0x85) $POSTPONE) + (data (i32.const 0x20738) "\28\07\02\00" "\88" (; F_IMMEDIATE ;) "POSTPONE " "\86\00\00\00") + (elem (i32.const 0x86) $POSTPONE) ;; [6.1.2050](https://forth-standard.org/standard/core/QUIT) (func $QUIT (param $tos i32) (result i32) (global.set $error (i32.const 0x2 (; = ERR_QUIT ;))) (call $quit (local.get $tos))) - (data (i32.const 0x2073c) "\28\07\02\00" "\04" "QUIT " "\86\00\00\00") - (elem (i32.const 0x86) $QUIT) + (data (i32.const 0x2074c) "\38\07\02\00" "\04" "QUIT " "\87\00\00\00") + (elem (i32.const 0x87) $QUIT) ;; [6.1.2060](https://forth-standard.org/standard/core/Rfrom) (func $R> (param $tos i32) (result i32) (global.set $tors (i32.sub (global.get $tors) (i32.const 4))) (i32.store (local.get $tos) (i32.load (global.get $tors))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x2074c) "\3c\07\02\00" "\02" "R> " "\87\00\00\00") - (elem (i32.const 0x87) $R>) + (data (i32.const 0x2075c) "\4c\07\02\00" "\02" "R> " "\88\00\00\00") + (elem (i32.const 0x88) $R>) ;; [6.1.2070](https://forth-standard.org/standard/core/RFetch) (func $R@ (param $tos i32) (result i32) (i32.store (local.get $tos) (i32.load (i32.sub (global.get $tors) (i32.const 4)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x20758) "\4c\07\02\00" "\02" "R@ " "\88\00\00\00") - (elem (i32.const 0x88) $R@) + (data (i32.const 0x20768) "\5c\07\02\00" "\02" "R@ " "\89\00\00\00") + (elem (i32.const 0x89) $R@) ;; [6.1.2120](https://forth-standard.org/standard/core/RECURSE) (func $RECURSE (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileRecurse)) - (data (i32.const 0x20764) "\58\07\02\00" "\87" (; F_IMMEDIATE ;) "RECURSE" "\89\00\00\00") - (elem (i32.const 0x89) $RECURSE) + (data (i32.const 0x20774) "\68\07\02\00" "\87" (; F_IMMEDIATE ;) "RECURSE" "\8a\00\00\00") + (elem (i32.const 0x8a) $RECURSE) ;; [6.2.2125](https://forth-standard.org/standard/core/REFILL) (func $REFILL (param $tos i32) (result i32) (local $char i32) (global.set $inputBufferSize (i32.const 0)) - (i32.store (i32.const 0x202e8 (; = body(>IN) ;)) (i32.const 0)) + (i32.store (i32.const 0x202f8 (; = body(>IN) ;)) (i32.const 0)) (local.get $tos) (if (param i32) (result i32) (i32.eq (global.get $sourceID) (i32.const -1)) (then @@ -1554,16 +1549,16 @@ (if (param i32) (result i32) (i32.eqz (global.get $inputBufferSize)) (then (call $push (i32.const 0))) (else (call $push (i32.const -1))))) - (data (i32.const 0x20774) "\64\07\02\00" "\06" "REFILL " "\8a\00\00\00") - (elem (i32.const 0x8a) $REFILL) + (data (i32.const 0x20784) "\74\07\02\00" "\06" "REFILL " "\8b\00\00\00") + (elem (i32.const 0x8b) $REFILL) ;; [6.1.2140](https://forth-standard.org/standard/core/REPEAT) (func $REPEAT (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileRepeat)) - (data (i32.const 0x20784) "\74\07\02\00" "\86" (; F_IMMEDIATE ;) "REPEAT " "\8b\00\00\00") - (elem (i32.const 0x8b) $REPEAT) + (data (i32.const 0x20794) "\84\07\02\00" "\86" (; F_IMMEDIATE ;) "REPEAT " "\8c\00\00\00") + (elem (i32.const 0x8c) $REPEAT) ;; [6.1.2160](https://forth-standard.org/standard/core/ROT) (func $ROT (param $tos i32) (result i32) @@ -1578,8 +1573,8 @@ (i32.load (local.tee $bbtos (i32.sub (local.get $tos) (i32.const 8))))) (i32.store (local.get $bbtos) (local.get $tmp)) (local.get $tos)) - (data (i32.const 0x20794) "\84\07\02\00" "\03" "ROT" "\8c\00\00\00") - (elem (i32.const 0x8c) $ROT) + (data (i32.const 0x207a4) "\94\07\02\00" "\03" "ROT" "\8d\00\00\00") + (elem (i32.const 0x8d) $ROT) ;; [6.1.2162](https://forth-standard.org/standard/core/RSHIFT) (func $RSHIFT (param $tos i32) (result i32) @@ -1589,8 +1584,8 @@ (i32.shr_u (i32.load (local.get $bbtos)) (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $btos)) - (data (i32.const 0x207a0) "\94\07\02\00" "\06" "RSHIFT " "\8d\00\00\00") - (elem (i32.const 0x8d) $RSHIFT) + (data (i32.const 0x207b0) "\a4\07\02\00" "\06" "RSHIFT " "\8e\00\00\00") + (elem (i32.const 0x8e) $RSHIFT) ;; [6.1.2165](https://forth-standard.org/standard/core/Sq) (func $Sq (param $tos i32) (result i32) @@ -1605,8 +1600,8 @@ (call $compilePushConst (local.get $len)) (global.set $here (call $aligned (i32.add (global.get $here) (local.get $len))))) - (data (i32.const 0x207b0) "\a0\07\02\00" "\82" (; F_IMMEDIATE ;) "S\22 " "\8e\00\00\00") - (elem (i32.const 0x8e) $Sq) + (data (i32.const 0x207c0) "\b0\07\02\00" "\82" (; F_IMMEDIATE ;) "S\22 " "\8f\00\00\00") + (elem (i32.const 0x8f) $Sq) ;; [6.1.2170](https://forth-standard.org/standard/core/StoD) (func $S>D (param $tos i32) (result i32) @@ -1614,15 +1609,15 @@ (i64.store (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))) (i64.extend_i32_s (i32.load (local.get $btos)))) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x207bc) "\b0\07\02\00" "\03" "S>D" "\8f\00\00\00") - (elem (i32.const 0x8f) $S>D) + (data (i32.const 0x207cc) "\c0\07\02\00" "\03" "S>D" "\90\00\00\00") + (elem (i32.const 0x90) $S>D) (func $SCALL (param $tos i32) (result i32) (global.set $tos (local.get $tos)) (call $shell_call) (global.get $tos)) - (data (i32.const 0x207c8) "\bc\07\02\00" "\05" "SCALL " "\90\00\00\00") - (elem (i32.const 0x90) $SCALL) + (data (i32.const 0x207d8) "\cc\07\02\00" "\05" "SCALL " "\91\00\00\00") + (elem (i32.const 0x91) $SCALL) ;; [6.1.2210](https://forth-standard.org/standard/core/SIGN) (func $SIGN (param $tos i32) (result i32) @@ -1633,8 +1628,8 @@ (i32.store8 (local.tee $npo (i32.sub (global.get $po) (i32.const 1))) (i32.const 0x2d (; = '-' ;))) (global.set $po (local.get $npo)))) (local.get $btos)) - (data (i32.const 0x207d8) "\c8\07\02\00" "\04" "SIGN " "\91\00\00\00") - (elem (i32.const 0x91) $SIGN) + (data (i32.const 0x207e8) "\d8\07\02\00" "\04" "SIGN " "\92\00\00\00") + (elem (i32.const 0x92) $SIGN) ;; [6.1.2214](https://forth-standard.org/standard/core/SMDivREM) ;; @@ -1655,29 +1650,29 @@ (i32.wrap_i64 (i64.div_s (local.get $n1) (local.get $n2)))) (local.get $btos)) - (data (i32.const 0x207e8) "\d8\07\02\00" "\06" "SM/REM " "\92\00\00\00") - (elem (i32.const 0x92) $SM/REM) + (data (i32.const 0x207f8) "\e8\07\02\00" "\06" "SM/REM " "\93\00\00\00") + (elem (i32.const 0x93) $SM/REM) ;; [6.1.2216](https://forth-standard.org/standard/core/SOURCE) (func $SOURCE (param $tos i32) (result i32) (local.get $tos) (call $push (global.get $inputBufferBase)) (call $push (global.get $inputBufferSize))) - (data (i32.const 0x207f8) "\e8\07\02\00" "\06" "SOURCE " "\93\00\00\00") - (elem (i32.const 0x93) $SOURCE) + (data (i32.const 0x20808) "\f8\07\02\00" "\06" "SOURCE " "\94\00\00\00") + (elem (i32.const 0x94) $SOURCE) ;; [6.2.2218](https://forth-standard.org/standard/core/SOURCE-ID) (func $SOURCE-ID (param $tos i32) (result i32) (call $push (local.get $tos) (global.get $sourceID))) - (data (i32.const 0x20808) "\f8\07\02\00" "\09" "SOURCE-ID " "\94\00\00\00") - (elem (i32.const 0x94) $SOURCE-ID) + (data (i32.const 0x20818) "\08\08\02\00" "\09" "SOURCE-ID " "\95\00\00\00") + (elem (i32.const 0x95) $SOURCE-ID) ;; [6.1.2220](https://forth-standard.org/standard/core/SPACE) (func $SPACE (param $tos i32) (result i32) (local.get $tos) (call $BL) (call $EMIT)) - (data (i32.const 0x2081c) "\08\08\02\00" "\05" "SPACE " "\95\00\00\00") - (elem (i32.const 0x95) $SPACE) + (data (i32.const 0x2082c) "\18\08\02\00" "\05" "SPACE " "\96\00\00\00") + (elem (i32.const 0x96) $SPACE) ;; [6.1.2230](https://forth-standard.org/standard/core/SPACES) (func $SPACES (param $tos i32) (result i32) @@ -1690,11 +1685,11 @@ (call $SPACE) (local.set $i (i32.sub (local.get $i) (i32.const 1))) (br $loop)))) - (data (i32.const 0x2082c) "\1c\08\02\00" "\06" "SPACES " "\96\00\00\00") - (elem (i32.const 0x96) $SPACES) + (data (i32.const 0x2083c) "\2c\08\02\00" "\06" "SPACES " "\97\00\00\00") + (elem (i32.const 0x97) $SPACES) ;; [6.1.2250](https://forth-standard.org/standard/core/STATE) - (data (i32.const 0x2083c) "\2c\08\02\00" "\45" (; F_DATA ;) "STATE " "\03\00\00\00" (; = pack(PUSH_DATA_ADDRESS_INDEX) ;) "\00\00\00\00" (; = pack(0) ;)) + (data (i32.const 0x2084c) "\3c\08\02\00" "\45" (; F_DATA ;) "STATE " "\03\00\00\00" (; = pack(PUSH_DATA_ADDRESS_INDEX) ;) "\00\00\00\00" (; = pack(0) ;)) ;; [6.1.2260](https://forth-standard.org/standard/core/SWAP) (func $SWAP (param $tos i32) (result i32) @@ -1706,16 +1701,16 @@ (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))))) (i32.store (local.get $btos) (local.get $tmp)) (local.get $tos)) - (data (i32.const 0x20850) "\3c\08\02\00" "\04" "SWAP " "\97\00\00\00") - (elem (i32.const 0x97) $SWAP) + (data (i32.const 0x20860) "\4c\08\02\00" "\04" "SWAP " "\98\00\00\00") + (elem (i32.const 0x98) $SWAP) ;; [6.1.2270](https://forth-standard.org/standard/core/THEN) (func $THEN (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileThen)) - (data (i32.const 0x20860) "\50\08\02\00" "\84" (; F_IMMEDIATE ;) "THEN " "\98\00\00\00") - (elem (i32.const 0x98) $THEN) + (data (i32.const 0x20870) "\60\08\02\00" "\84" (; F_IMMEDIATE ;) "THEN " "\99\00\00\00") + (elem (i32.const 0x99) $THEN) ;; [6.2.2295](https://forth-standard.org/standard/core/TO) (func $TO (param $tos i32) (result i32) @@ -1726,21 +1721,21 @@ (i32.store (i32.add (call $body (local.get $xt)) (i32.const 4)) (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))))) (local.get $btos)) - (data (i32.const 0x20870) "\60\08\02\00" "\02" "TO " "\99\00\00\00") - (elem (i32.const 0x99) $TO) + (data (i32.const 0x20880) "\70\08\02\00" "\02" "TO " "\9a\00\00\00") + (elem (i32.const 0x9a) $TO) ;; [6.2.2298](https://forth-standard.org/standard/core/TRUE) (func $TRUE (param $tos i32) (result i32) (call $push (local.get $tos) (i32.const 0xffffffff))) - (data (i32.const 0x2087c) "\70\08\02\00" "\04" "TRUE " "\9a\00\00\00") - (elem (i32.const 0x9a) $TRUE) + (data (i32.const 0x2088c) "\80\08\02\00" "\04" "TRUE " "\9b\00\00\00") + (elem (i32.const 0x9b) $TRUE) ;; [6.2.2300](https://forth-standard.org/standard/core/TUCK) (func $TUCK (param $tos i32) (result i32) (local.get $tos) (call $SWAP) (call $OVER)) - (data (i32.const 0x2088c) "\7c\08\02\00" "\04" "TUCK " "\9b\00\00\00") - (elem (i32.const 0x9b) $TUCK) + (data (i32.const 0x2089c) "\8c\08\02\00" "\04" "TUCK " "\9c\00\00\00") + (elem (i32.const 0x9c) $TUCK) ;; [6.1.2310](https://forth-standard.org/standard/core/TYPE) (func $TYPE (param $tos i32) (result i32) @@ -1750,16 +1745,16 @@ (local.set $len (call $pop)) (local.set $p (call $pop)) (call $type (local.get $p) (local.get $len))) - (data (i32.const 0x2089c) "\8c\08\02\00" "\04" "TYPE " "\9c\00\00\00") - (elem (i32.const 0x9c) $TYPE) + (data (i32.const 0x208ac) "\9c\08\02\00" "\04" "TYPE " "\9d\00\00\00") + (elem (i32.const 0x9d) $TYPE) ;; [6.1.2320](https://forth-standard.org/standard/core/Ud) (func $U. (param $tos i32) (result i32) (local.get $tos) - (call $U._ (call $pop) (i32.load (i32.const 0x203ac (; = body(BASE) ;)))) + (call $U._ (call $pop) (i32.load (i32.const 0x203bc (; = body(BASE) ;)))) (call $shell_emit (i32.const 0x20))) - (data (i32.const 0x208ac) "\9c\08\02\00" "\02" "U. " "\9d\00\00\00") - (elem (i32.const 0x9d) $U.) + (data (i32.const 0x208bc) "\ac\08\02\00" "\02" "U. " "\9e\00\00\00") + (elem (i32.const 0x9e) $U.) ;; [6.1.2340](https://forth-standard.org/standard/core/Uless) (func $U< (param $tos i32) (result i32) @@ -1770,8 +1765,8 @@ (then (i32.store (local.get $bbtos) (i32.const -1))) (else (i32.store (local.get $bbtos) (i32.const 0)))) (local.get $btos)) - (data (i32.const 0x208b8) "\ac\08\02\00" "\02" "U< " "\9e\00\00\00") - (elem (i32.const 0x9e) $U<) + (data (i32.const 0x208c8) "\bc\08\02\00" "\02" "U< " "\9f\00\00\00") + (elem (i32.const 0x9f) $U<) ;; [6.1.2360](https://forth-standard.org/standard/core/UMTimes) (func $UM* (param $tos i32) (result i32) @@ -1781,8 +1776,8 @@ (i64.extend_i32_u (i32.load (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $tos)) - (data (i32.const 0x208c4) "\b8\08\02\00" "\03" "UM*" "\9f\00\00\00") - (elem (i32.const 0x9f) $UM*) + (data (i32.const 0x208d4) "\c8\08\02\00" "\03" "UM*" "\a0\00\00\00") + (elem (i32.const 0xa0) $UM*) ;; [6.1.2370](https://forth-standard.org/standard/core/UMDivMOD) (func $UM/MOD (param $tos i32) (result i32) @@ -1801,50 +1796,50 @@ (i32.wrap_i64 (i64.div_u (local.get $n1) (local.get $n2)))) (local.get $btos)) - (data (i32.const 0x208d0) "\c4\08\02\00" "\06" "UM/MOD " "\a0\00\00\00") - (elem (i32.const 0xa0) $UM/MOD) + (data (i32.const 0x208e0) "\d4\08\02\00" "\06" "UM/MOD " "\a1\00\00\00") + (elem (i32.const 0xa1) $UM/MOD) ;; [6.1.2380](https://forth-standard.org/standard/core/UNLOOP) (func $UNLOOP (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $emitICall (i32.const 0) (i32.const 0x9 (; = END_DO_INDEX ;)))) - (data (i32.const 0x208e0) "\d0\08\02\00" "\86" (; F_IMMEDIATE ;) "UNLOOP " "\a1\00\00\00") - (elem (i32.const 0xa1) $UNLOOP) + (data (i32.const 0x208f0) "\e0\08\02\00" "\86" (; F_IMMEDIATE ;) "UNLOOP " "\a2\00\00\00") + (elem (i32.const 0xa2) $UNLOOP) ;; [6.1.2390](https://forth-standard.org/standard/core/UNTIL) (func $UNTIL (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileUntil)) - (data (i32.const 0x208f0) "\e0\08\02\00" "\85" (; F_IMMEDIATE ;) "UNTIL " "\a2\00\00\00") - (elem (i32.const 0xa2) $UNTIL) + (data (i32.const 0x20900) "\f0\08\02\00" "\85" (; F_IMMEDIATE ;) "UNTIL " "\a3\00\00\00") + (elem (i32.const 0xa3) $UNTIL) ;; [6.2.2395](https://forth-standard.org/standard/core/UNUSED) (func $UNUSED (param $tos i32) (result i32) (local.get $tos) (call $push (i32.shr_s (i32.sub (i32.const 0x6400000 (; = MEMORY_SIZE ;)) (global.get $here)) (i32.const 2)))) - (data (i32.const 0x20900) "\f0\08\02\00" "\06" "UNUSED " "\a3\00\00\00") - (elem (i32.const 0xa3) $UNUSED) + (data (i32.const 0x20910) "\00\09\02\00" "\06" "UNUSED " "\a4\00\00\00") + (elem (i32.const 0xa4) $UNUSED) ;; [6.2.2405](https://forth-standard.org/standard/core/VALUE) - (data (i32.const 0x20910) "\00\09\02\00" "\05" "VALUE " "\55\00\00\00" (; = pack(index("CONSTANT")) ;)) + (data (i32.const 0x20920) "\10\09\02\00" "\05" "VALUE " "\56\00\00\00" (; = pack(index("CONSTANT")) ;)) ;; [6.1.2410](https://forth-standard.org/standard/core/VARIABLE) (func $VARIABLE (param $tos i32) (result i32) (local.get $tos) (call $CREATE) (global.set $here (i32.add (global.get $here) (i32.const 4)))) - (data (i32.const 0x20920) "\10\09\02\00" "\08" "VARIABLE " "\a4\00\00\00") - (elem (i32.const 0xa4) $VARIABLE) + (data (i32.const 0x20930) "\20\09\02\00" "\08" "VARIABLE " "\a5\00\00\00") + (elem (i32.const 0xa5) $VARIABLE) ;; [6.1.2430](https://forth-standard.org/standard/core/WHILE) (func $WHILE (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) (call $compileWhile)) - (data (i32.const 0x20934) "\20\09\02\00" "\85" (; F_IMMEDIATE ;) "WHILE " "\a5\00\00\00") - (elem (i32.const 0xa5) $WHILE) + (data (i32.const 0x20944) "\30\09\02\00" "\85" (; F_IMMEDIATE ;) "WHILE " "\a6\00\00\00") + (elem (i32.const 0xa6) $WHILE) ;; [6.1.2450](https://forth-standard.org/standard/core/WORD) (func $WORD (param $tos i32) (result i32) @@ -1864,8 +1859,8 @@ (local.get $len)) (i32.store8 (local.get $wordBase) (local.get $len)) (call $push (local.get $wordBase))) - (data (i32.const 0x20944) "\34\09\02\00" "\04" "WORD " "\a6\00\00\00") - (elem (i32.const 0xa6) $WORD) + (data (i32.const 0x20954) "\44\09\02\00" "\04" "WORD " "\a7\00\00\00") + (elem (i32.const 0xa7) $WORD) ;; 15.6.1.2465 (func $WORDS (param $tos i32) (result i32) @@ -1886,8 +1881,8 @@ (local.set $entryP (i32.load (local.get $entryP))) (br_if $loop (local.get $entryP))) (local.get $tos)) - (data (i32.const 0x20954) "\44\09\02\00" "\05" "WORDS " "\a7\00\00\00") - (elem (i32.const 0xa7) $WORDS) + (data (i32.const 0x20964) "\54\09\02\00" "\05" "WORDS " "\a8\00\00\00") + (elem (i32.const 0xa8) $WORDS) ;; [6.1.2490](https://forth-standard.org/standard/core/XOR) (func $XOR (param $tos i32) (result i32) @@ -1897,16 +1892,16 @@ (i32.xor (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4)))) (i32.load (local.get $bbtos)))) (local.get $btos)) - (data (i32.const 0x20964) "\54\09\02\00" "\03" "XOR" "\a8\00\00\00") - (elem (i32.const 0xa8) $XOR) + (data (i32.const 0x20974) "\64\09\02\00" "\03" "XOR" "\a9\00\00\00") + (elem (i32.const 0xa9) $XOR) ;; [6.1.2500](https://forth-standard.org/standard/core/Bracket) (func $left-bracket (param $tos i32) (result i32) (local.get $tos) (call $ensureCompiling) - (i32.store (i32.const 0x2084c (; = body(STATE) ;)) (i32.const 0))) - (data (i32.const 0x20970) "\64\09\02\00" "\81" (; F_IMMEDIATE ;) "[ " "\a9\00\00\00") - (elem (i32.const 0xa9) $left-bracket) + (i32.store (i32.const 0x2085c (; = body(STATE) ;)) (i32.const 0))) + (data (i32.const 0x20980) "\74\09\02\00" "\81" (; F_IMMEDIATE ;) "[ " "\aa\00\00\00") + (elem (i32.const 0xaa) $left-bracket) ;; [6.1.2510](https://forth-standard.org/standard/core/BracketTick) (func $bracket-tick (param $tos i32) (result i32) @@ -1914,8 +1909,8 @@ (call $ensureCompiling) (call $') (call $compilePushConst (call $pop))) - (data (i32.const 0x2097c) "\70\09\02\00" "\83" (; F_IMMEDIATE ;) "[']" "\aa\00\00\00") - (elem (i32.const 0xaa) $bracket-tick) + (data (i32.const 0x2098c) "\80\09\02\00" "\83" (; F_IMMEDIATE ;) "[']" "\ab\00\00\00") + (elem (i32.const 0xab) $bracket-tick) ;; [6.1.2520](https://forth-standard.org/standard/core/BracketCHAR) (func $bracket-char (param $tos i32) (result i32) @@ -1923,22 +1918,22 @@ (call $ensureCompiling) (call $CHAR) (call $compilePushConst (call $pop))) - (data (i32.const 0x20988) "\7c\09\02\00" "\86" (; F_IMMEDIATE ;) "[CHAR] " "\ab\00\00\00") - (elem (i32.const 0xab) $bracket-char) + (data (i32.const 0x20998) "\8c\09\02\00" "\86" (; F_IMMEDIATE ;) "[CHAR] " "\ac\00\00\00") + (elem (i32.const 0xac) $bracket-char) ;; [6.2.2535](https://forth-standard.org/standard/core/bs) (func $\ (param $tos i32) (result i32) (drop (drop (call $parse (i32.const 0x0a (; '\n' ;))))) (local.get $tos)) - (data (i32.const 0x20998) "\88\09\02\00" "\81" (; F_IMMEDIATE ;) "\5c " "\ac\00\00\00") - (elem (i32.const 0xac) $\) + (data (i32.const 0x209a8) "\98\09\02\00" "\81" (; F_IMMEDIATE ;) "\5c " "\ad\00\00\00") + (elem (i32.const 0xad) $\) ;; [6.1.2540](https://forth-standard.org/standard/right-bracket) (func $right-bracket (param $tos i32) (result i32) - (i32.store (i32.const 0x2084c (; = body(STATE) ;)) (i32.const 1)) + (i32.store (i32.const 0x2085c (; = body(STATE) ;)) (i32.const 1)) (local.get $tos)) - (data (i32.const 0x209a4) "\98\09\02\00" "\01" "] " "\ad\00\00\00") - (elem (i32.const 0xad) $right-bracket) + (data (i32.const 0x209b4) "\a8\09\02\00" "\01" "] " "\ae\00\00\00") + (elem (i32.const 0xae) $right-bracket) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1976,7 +1971,7 @@ ;; It's a number. Are we compiling? (then (local.set $number) - (if (i32.load (i32.const 0x2084c (; = body(STATE) ;))) + (if (i32.load (i32.const 0x2085c (; = body(STATE) ;))) (then ;; We're compiling. Pop it off the stack and ;; add it to the compiled list @@ -1992,7 +1987,7 @@ ;; Name found in the dictionary. ;; Are we compiling and is the word non-immediate? (if (i32.and - (i32.load (i32.const 0x2084c (; = body(STATE) ;))) + (i32.load (i32.const 0x2085c (; = body(STATE) ;))) (i32.ne (local.get $FINDResult) (i32.const 1))) (then ;; We're compiling a non-immediate. @@ -2050,7 +2045,7 @@ (local $n i32) (local.set $p (local.get $addr)) (local.set $end (i32.add (local.get $p) (local.get $length))) - (local.set $base (i32.load (i32.const 0x203ac (; = body(BASE) ;)))) + (local.set $base (i32.load (i32.const 0x203bc (; = body(BASE) ;)))) ;; Read first character (if (i32.eq (local.tee $char (i32.load8_u (local.get $p))) (i32.const 0x2d (; = '-' ;))) @@ -2094,7 +2089,7 @@ (global.set $tos (local.get $tos)) (global.set $tors (i32.const 0x2000 (; = RETURN_STACK_BASE ;))) (global.set $sourceID (i32.const 0)) - (i32.store (i32.const 0x2084c (; = body(STATE) ;)) (i32.const 0)) + (i32.store (i32.const 0x2085c (; = body(STATE) ;)) (i32.const 0)) (unreachable)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2115,9 +2110,9 @@ (global $sourceID (mut i32) (i32.const 0)) ;; Dictionary pointers - (global $latest (mut i32) (i32.const 0x209a4)) - (global $here (mut i32) (i32.const 0x209b0)) - (global $nextTableIndex (mut i32) (i32.const 0xae)) + (global $latest (mut i32) (i32.const 0x209b4)) + (global $here (mut i32) (i32.const 0x209c0)) + (global $nextTableIndex (mut i32) (i32.const 0xaf)) ;; Pictured output pointer (global $po (mut i32) (i32.const -1)) @@ -2574,6 +2569,8 @@ (func $stringEqual (param $addr1 i32) (param $len1 i32) (param $addr2 i32) (param $len2 i32) (result i32) (local $end1 i32) (local $end2 i32) + (if (i32.eqz (local.get $len1)) + (return (i32.const 0))) (if (i32.ne (local.get $len1) (local.get $len2)) (return (i32.const 0))) (local.set $end1 (i32.add (local.get $addr1) (local.get $len1))) @@ -2602,6 +2599,30 @@ (call $shell_emit (i32.const 0x0a)) (drop (call $ABORT (i32.const -1) (; unused ;)))) + ;; Create an entry in the dictionary, with given name, flags, and function index + (func $create (param $nameAddr i32) (param $nameLen i32) (param $flags i32) (param $func i32) + (local $here i32) + ;; Store `prev` pointer + (i32.store (local.tee $here (global.get $here)) (global.get $latest)) + (global.set $latest (local.get $here)) + (local.set $here (i32.add (local.get $here) (i32.const 4))) + + ;; Store `len` + `flags` + (i32.store8 (local.get $here) (i32.or (local.get $nameLen) (local.get $flags))) + + ;; Store name + (memory.copy + (local.tee $here (i32.add (local.get $here) (i32.const 1))) + (local.get $nameAddr) + (local.get $nameLen)) + (local.set $here (call $aligned (i32.add (local.get $here) (local.get $nameLen)))) + + ;; Store function index + (i32.store (local.get $here) (local.get $func)) + (local.set $here (i32.add (local.get $here) (i32.const 4))) + + (global.set $here (local.get $here))) + (func $type (param $p i32) (param $len i32) (local $end i32) (local.set $end (i32.add (local.get $p) (local.get $len))) @@ -2621,7 +2642,7 @@ (func $ensureCompiling (param $tos i32) (result i32) (local.get $tos) - (if (param i32) (result i32) (i32.eqz (i32.load (i32.const 0x2084c (; = body(STATE) ;)))) + (if (param i32) (result i32) (i32.eqz (i32.load (i32.const 0x2085c (; = body(STATE) ;)))) (call $fail (i32.const 0x2002e (; = str("word not supported in interpret mode") ;))))) ;; Toggle the hidden flag @@ -2711,7 +2732,7 @@ (local $delimited i32) (local.set $p (local.tee $addr (i32.add (global.get $inputBufferBase) - (i32.load (i32.const 0x202e8 (; = body(>IN) ;)))))) + (i32.load (i32.const 0x202f8 (; = body(>IN) ;)))))) (local.set $end (i32.add (global.get $inputBufferBase) (global.get $inputBufferSize))) (local.set $delimited (i32.const 0)) (block $endOfInput @@ -2723,7 +2744,7 @@ (br_if $delimiter (i32.eq (local.get $c) (i32.const 0xa))) (br_if $read (i32.ne (local.get $c) (local.get $delim))))) (local.set $delimited (i32.const 1))) - (i32.store (i32.const 0x202e8 (; = body(>IN) ;)) + (i32.store (i32.const 0x202f8 (; = body(>IN) ;)) (i32.sub (local.get $p) (global.get $inputBufferBase))) (local.get $addr) (i32.sub @@ -2737,7 +2758,7 @@ (local $c i32) (local.set $p (local.tee $addr (i32.add (global.get $inputBufferBase) - (i32.load (i32.const 0x202e8 (; = body(>IN) ;)))))) + (i32.load (i32.const 0x202f8 (; = body(>IN) ;)))))) (local.set $end (i32.add (global.get $inputBufferBase) (global.get $inputBufferSize))) (block $endLoop (loop $loop @@ -2747,7 +2768,7 @@ (local.set $p (i32.add (local.get $p) (i32.const 1))) ;; Eat up a newline (br_if $loop (i32.ne (local.get $c) (i32.const 0xa))))) - (i32.store (i32.const 0x202e8 (; = body(>IN) ;)) + (i32.store (i32.const 0x202f8 (; = body(>IN) ;)) (i32.sub (local.get $p) (global.get $inputBufferBase)))) ;; Returns xt, type (0 = not found, 1 = immediate, -1 = non-immediate) @@ -2829,7 +2850,7 @@ ;; Show prompt (if (i32.eqz (local.get $silent)) (then - (if (i32.ge_s (i32.load (i32.const 0x2084c (; = body(STATE) ;))) (i32.const 0)) + (if (i32.ge_s (i32.load (i32.const 0x2085c (; = body(STATE) ;))) (i32.const 0)) (then ;; Write ok (call $shell_emit (i32.const 111)) diff --git a/src/web/tests/forth2012-test-suite/coreexttest.fth b/src/web/tests/forth2012-test-suite/coreexttest.fth index cc714d3..6c01de5 100644 --- a/src/web/tests/forth2012-test-suite/coreexttest.fth +++ b/src/web/tests/forth2012-test-suite/coreexttest.fth @@ -479,20 +479,20 @@ T{ : VD3 VAL3 LITERAL ; VD3 -> 123 }T \ T{ : CS6 CASE 1 OF ENDOF 2 ENDCASE ; 1 CS6 -> }T \ T{ : CS7 CASE 3 OF ENDOF 2 ENDCASE ; 1 CS7 -> 1 }T -\ \ ----------------------------------------------------------------------------- -\ TESTING :NONAME RECURSE +\ ----------------------------------------------------------------------------- +TESTING :NONAME RECURSE -\ VARIABLE NN1 -\ VARIABLE NN2 -\ :NONAME 1234 ; NN1 ! -\ :NONAME 9876 ; NN2 ! -\ T{ NN1 @ EXECUTE -> 1234 }T -\ T{ NN2 @ EXECUTE -> 9876 }T +VARIABLE NN1 +VARIABLE NN2 +:NONAME 1234 ; NN1 ! +:NONAME 9876 ; NN2 ! +T{ NN1 @ EXECUTE -> 1234 }T +T{ NN2 @ EXECUTE -> 9876 }T -\ T{ :NONAME ( n -- 0,1,..n ) DUP IF DUP >R 1- RECURSE R> THEN ; -\ CONSTANT RN1 -> }T -\ T{ 0 RN1 EXECUTE -> 0 }T -\ T{ 4 RN1 EXECUTE -> 0 1 2 3 4 }T +T{ :NONAME ( n -- 0,1,..n ) DUP IF DUP >R 1- RECURSE R> THEN ; + CONSTANT RN1 -> }T +T{ 0 RN1 EXECUTE -> 0 }T +T{ 4 RN1 EXECUTE -> 0 1 2 3 4 }T \ :NONAME ( n -- n1 ) \ Multiple RECURSEs in one definition \ 1- DUP diff --git a/src/web/tests/forth2012-test-suite/coreplustest.fth b/src/web/tests/forth2012-test-suite/coreplustest.fth index b3f9e18..2227d90 100644 --- a/src/web/tests/forth2012-test-suite/coreplustest.fth +++ b/src/web/tests/forth2012-test-suite/coreplustest.fth @@ -193,9 +193,9 @@ T{ 123 CONSTANT IW1 IMMEDIATE IW1 -> 123 }T T{ : IW2 IW1 LITERAL ; IW2 -> 123 }T T{ VARIABLE IW3 IMMEDIATE 234 IW3 ! IW3 @ -> 234 }T T{ : IW4 IW3 [ @ ] LITERAL ; IW4 -> 234 }T -\ T{ :NONAME [ 345 ] IW3 [ ! ] ; DROP IW3 @ -> 345 }T +T{ :NONAME [ 345 ] IW3 [ ! ] ; DROP IW3 @ -> 345 }T T{ CREATE IW5 456 , IMMEDIATE -> }T -\ T{ :NONAME IW5 [ @ IW3 ! ] ; DROP IW3 @ -> 456 }T +T{ :NONAME IW5 [ @ IW3 ! ] ; DROP IW3 @ -> 456 }T T{ : IW6 CREATE , IMMEDIATE DOES> @ 1+ ; -> }T T{ 111 IW6 IW7 IW7 -> 112 }T T{ : IW8 IW7 LITERAL 1+ ; IW8 -> 113 }T diff --git a/src/web/tests/suite.js b/src/web/tests/suite.js index 812a04a..0f63089 100644 --- a/src/web/tests/suite.js +++ b/src/web/tests/suite.js @@ -1571,6 +1571,13 @@ function loadTests() { }); }); + describe(":NONAME", () => { + it("should work", () => { + run(":NONAME 1234 ; EXECUTE"); + expect(stackValues()).to.eql([1234]); + }); + }); + describe("system", () => { it("should run sieve", () => { run(sieve);