diff --git a/src/waforth.wat b/src/waforth.wat index ffc8f11..8bff50b 100644 --- a/src/waforth.wat +++ b/src/waforth.wat @@ -64,7 +64,7 @@ ;; COMPILE_EXECUTE_INDEX := 5 ;; PUSH_INDIRECT_INDEX := 6 ;; END_DO_INDEX := 9 - (table (export "table") 0xb2 funcref) + (table (export "table") 0xb3 funcref) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -411,7 +411,7 @@ (local.get $tos) (call $ensureCompiling) (call $Sq) - (call $compileCall (i32.const 0) (i32.const 0x9e (; = index("TYPE") ;)))) + (call $compileCall (i32.const 0) (i32.const 0x9f (; = index("TYPE") ;)))) (data (i32.const 0x20178) "\6c\01\02\00" "\82" (; F_IMMEDIATE ;) ".\22 " "\22\00\00\00") (elem (i32.const 0x22) $.q) @@ -800,7 +800,7 @@ (local.get $tos) (call $compileIf) (call $Sq) - (call $compileCall (i32.const 0) (i32.const 0x9e (; = index("TYPE") ;))) + (call $compileCall (i32.const 0) (i32.const 0x9f (; = index("TYPE") ;))) (call $compileCall (i32.const 0) (i32.const 0x43 (; = index("ABORT") ;))) (call $compileThen)) (data (i32.const 0x20344) "\34\03\02\00" "\86" (; F_IMMEDIATE ;) "ABORT\22 " "\44\00\00\00") @@ -897,14 +897,22 @@ (data (i32.const 0x203d0) "\c0\03\02\00" "\02" "BL " "\4c\00\00\00") (elem (i32.const 0x4c) $BL) + ;; [6.2.0825](https://forth-standard.org/standard/core/BUFFERColon) + (func $BUFFER: (param $tos i32) (result i32) + (local.get $tos) + (call $CREATE) + (call $ALLOT)) + (data (i32.const 0x203dc) "\d0\03\02\00" "\07" "BUFFER:" "\4d\00\00\00") + (elem (i32.const 0x4d) $BUFFER:) + ;; [6.1.0850](https://forth-standard.org/standard/core/CStore) (func $C! (param $tos i32) (result i32) (local $bbtos i32) (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 0x203dc) "\d0\03\02\00" "\02" "C! " "\4d\00\00\00") - (elem (i32.const 0x4d) $C!) + (data (i32.const 0x203ec) "\dc\03\02\00" "\02" "C! " "\4e\00\00\00") + (elem (i32.const 0x4e) $C!) ;; [6.1.0860](https://forth-standard.org/standard/core/CComma) (func $Cc (param $tos i32) (result i32) @@ -912,8 +920,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 0x203e8) "\dc\03\02\00" "\02" "C, " "\4e\00\00\00") - (elem (i32.const 0x4e) $Cc) + (data (i32.const 0x203f8) "\ec\03\02\00" "\02" "C, " "\4f\00\00\00") + (elem (i32.const 0x4f) $Cc) ;; [6.2.0855](https://forth-standard.org/standard/core/Cq) (func $Cq (param $tos i32) (result i32) @@ -931,8 +939,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 0x203f4) "\e8\03\02\00" "\82" (; F_IMMEDIATE ;) "C\22 " "\4f\00\00\00") - (elem (i32.const 0x4f) $Cq) + (data (i32.const 0x20404) "\f8\03\02\00" "\82" (; F_IMMEDIATE ;) "C\22 " "\50\00\00\00") + (elem (i32.const 0x50) $Cq) ;; [6.1.0870](https://forth-standard.org/standard/core/CFetch) (func $C@ (param $tos i32) (result i32) @@ -940,8 +948,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 0x20400) "\f4\03\02\00" "\02" "C@ " "\50\00\00\00") - (elem (i32.const 0x50) $C@) + (data (i32.const 0x20410) "\04\04\02\00" "\02" "C@ " "\51\00\00\00") + (elem (i32.const 0x51) $C@) ;; [6.1.0880](https://forth-standard.org/standard/core/CELLPlus) (func $CELL+ (param $tos i32) (result i32) @@ -949,8 +957,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 0x2040c) "\00\04\02\00" "\05" "CELL+ " "\51\00\00\00") - (elem (i32.const 0x51) $CELL+) + (data (i32.const 0x2041c) "\10\04\02\00" "\05" "CELL+ " "\52\00\00\00") + (elem (i32.const 0x52) $CELL+) ;; [6.1.0890](https://forth-standard.org/standard/core/CELLS) (func $CELLS (param $tos i32) (result i32) @@ -958,8 +966,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 0x2041c) "\0c\04\02\00" "\05" "CELLS " "\52\00\00\00") - (elem (i32.const 0x52) $CELLS) + (data (i32.const 0x2042c) "\1c\04\02\00" "\05" "CELLS " "\53\00\00\00") + (elem (i32.const 0x53) $CELLS) ;; [6.1.0895](https://forth-standard.org/standard/core/CHAR) (func $CHAR (param $tos i32) (result i32) @@ -971,26 +979,26 @@ (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 0x2042c) "\1c\04\02\00" "\04" "CHAR " "\53\00\00\00") - (elem (i32.const 0x53) $CHAR) + (data (i32.const 0x2043c) "\2c\04\02\00" "\04" "CHAR " "\54\00\00\00") + (elem (i32.const 0x54) $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 0x2043c) "\2c\04\02\00" "\05" "CHAR+ " "\54\00\00\00") - (elem (i32.const 0x54) $CHAR+) + (data (i32.const 0x2044c) "\3c\04\02\00" "\05" "CHAR+ " "\55\00\00\00") + (elem (i32.const 0x55) $CHAR+) ;; [6.1.0898](https://forth-standard.org/standard/core/CHARS) (func $CHARS (param $tos i32) (result i32) (local.get $tos)) - (data (i32.const 0x2044c) "\3c\04\02\00" "\05" "CHARS " "\55\00\00\00") - (elem (i32.const 0x55) $CHARS) + (data (i32.const 0x2045c) "\4c\04\02\00" "\05" "CHARS " "\56\00\00\00") + (elem (i32.const 0x56) $CHARS) ;; [6.2.0945](https://forth-standard.org/standard/core/COMPILEComma) (func $COMPILEComma (param $tos i32) (result i32) (call $compileExecute (call $pop (local.get $tos)))) - (data (i32.const 0x2045c) "\4c\04\02\00" "\08" "COMPILE, " "\56\00\00\00") - (elem (i32.const 0x56) $COMPILEComma) + (data (i32.const 0x2046c) "\5c\04\02\00" "\08" "COMPILE, " "\57\00\00\00") + (elem (i32.const 0x57) $COMPILEComma) ;; [6.1.0950](https://forth-standard.org/standard/core/CONSTANT) (func $CONSTANT (param $tos i32) (result i32) @@ -1001,8 +1009,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 0x20470) "\5c\04\02\00" "\08" "CONSTANT " "\57\00\00\00") - (elem (i32.const 0x57) $CONSTANT) + (data (i32.const 0x20480) "\6c\04\02\00" "\08" "CONSTANT " "\58\00\00\00") + (elem (i32.const 0x58) $CONSTANT) ;; [6.1.0980](https://forth-standard.org/standard/core/COUNT) (func $COUNT (param $tos i32) (result i32) @@ -1013,15 +1021,15 @@ (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 0x20484) "\70\04\02\00" "\05" "COUNT " "\58\00\00\00") - (elem (i32.const 0x58) $COUNT) + (data (i32.const 0x20494) "\80\04\02\00" "\05" "COUNT " "\59\00\00\00") + (elem (i32.const 0x59) $COUNT) ;; [6.1.0990](https://forth-standard.org/standard/core/CR) (func $CR (param $tos i32) (result i32) (call $shell_emit (i32.const 0x0a)) (local.get $tos)) - (data (i32.const 0x20494) "\84\04\02\00" "\02" "CR " "\59\00\00\00") - (elem (i32.const 0x59) $CR) + (data (i32.const 0x204a4) "\94\04\02\00" "\02" "CR " "\5a\00\00\00") + (elem (i32.const 0x5a) $CR) ;; [6.1.1000](https://forth-standard.org/standard/core/CREATE) (func $CREATE (param $tos i32) (result i32) @@ -1036,31 +1044,31 @@ (i32.const 0x40 (; = F_DATA ;)) (i32.const 0x3 (; = PUSH_DATA_ADDRESS_INDEX ;))) (local.get $tos)) - (data (i32.const 0x204a0) "\94\04\02\00" "\06" "CREATE " "\5a\00\00\00") - (elem (i32.const 0x5a) $CREATE) + (data (i32.const 0x204b0) "\a4\04\02\00" "\06" "CREATE " "\5b\00\00\00") + (elem (i32.const 0x5b) $CREATE) ;; [6.1.1170](https://forth-standard.org/standard/core/DECIMAL) (func $DECIMAL (param $tos i32) (result i32) (i32.store (i32.const 0x203bc (; = body(BASE) ;)) (i32.const 10)) (local.get $tos)) - (data (i32.const 0x204b0) "\a0\04\02\00" "\07" "DECIMAL" "\5b\00\00\00") - (elem (i32.const 0x5b) $DECIMAL) + (data (i32.const 0x204c0) "\b0\04\02\00" "\07" "DECIMAL" "\5c\00\00\00") + (elem (i32.const 0x5c) $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 0x204c0) "\b0\04\02\00" "\05" "DEPTH " "\5c\00\00\00") - (elem (i32.const 0x5c) $DEPTH) + (data (i32.const 0x204d0) "\c0\04\02\00" "\05" "DEPTH " "\5d\00\00\00") + (elem (i32.const 0x5d) $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 0x204d0) "\c0\04\02\00" "\82" (; F_IMMEDIATE ;) "DO " "\5d\00\00\00") - (elem (i32.const 0x5d) $DO) + (data (i32.const 0x204e0) "\d0\04\02\00" "\82" (; F_IMMEDIATE ;) "DO " "\5e\00\00\00") + (elem (i32.const 0x5e) $DO) ;; [6.1.1250](https://forth-standard.org/standard/core/DOES) (func $DOES> (param $tos i32) (result i32) @@ -1071,37 +1079,37 @@ (call $endColon) (call $startColon (i32.const 1)) (call $compilePushLocal (i32.const 1))) - (data (i32.const 0x204dc) "\d0\04\02\00" "\85" (; F_IMMEDIATE ;) "DOES> " "\5e\00\00\00") - (elem (i32.const 0x5e) $DOES>) + (data (i32.const 0x204ec) "\e0\04\02\00" "\85" (; F_IMMEDIATE ;) "DOES> " "\5f\00\00\00") + (elem (i32.const 0x5f) $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 0x204ec) "\dc\04\02\00" "\04" "DROP " "\5f\00\00\00") - (elem (i32.const 0x5f) $DROP) + (data (i32.const 0x204fc) "\ec\04\02\00" "\04" "DROP " "\60\00\00\00") + (elem (i32.const 0x60) $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 0x204fc) "\ec\04\02\00" "\03" "DUP" "\60\00\00\00") - (elem (i32.const 0x60) $DUP) + (data (i32.const 0x2050c) "\fc\04\02\00" "\03" "DUP" "\61\00\00\00") + (elem (i32.const 0x61) $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 0x20508) "\fc\04\02\00" "\84" (; F_IMMEDIATE ;) "ELSE " "\61\00\00\00") - (elem (i32.const 0x61) $ELSE) + (data (i32.const 0x20518) "\0c\05\02\00" "\84" (; F_IMMEDIATE ;) "ELSE " "\62\00\00\00") + (elem (i32.const 0x62) $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 0x20518) "\08\05\02\00" "\04" "EMIT " "\62\00\00\00") - (elem (i32.const 0x62) $EMIT) + (data (i32.const 0x20528) "\18\05\02\00" "\04" "EMIT " "\63\00\00\00") + (elem (i32.const 0x63) $EMIT) ;; [6.1.1345](https://forth-standard.org/standard/core/ENVIRONMENTq) (func $ENVIRONMENT? (param $tos i32) (result i32) @@ -1125,8 +1133,8 @@ (else (i32.store (local.get $bbtos) (i32.const 0)) (local.get $btos)))))) - (data (i32.const 0x20528) "\18\05\02\00" "\0c" "ENVIRONMENT? " "\63\00\00\00") - (elem (i32.const 0x63) $ENVIRONMENT?) + (data (i32.const 0x20538) "\28\05\02\00" "\0c" "ENVIRONMENT? " "\64\00\00\00") + (elem (i32.const 0x64) $ENVIRONMENT?) ;; [6.2.1350](https://forth-standard.org/standard/core/ERASE) (func $ERASE (param $tos i32) (result i32) @@ -1136,8 +1144,8 @@ (i32.const 0) (i32.load (i32.sub (local.get $tos) (i32.const 4)))) (local.get $bbtos)) - (data (i32.const 0x20540) "\28\05\02\00" "\05" "ERASE " "\64\00\00\00") - (elem (i32.const 0x64) $ERASE) + (data (i32.const 0x20550) "\38\05\02\00" "\05" "ERASE " "\65\00\00\00") + (elem (i32.const 0x65) $ERASE) ;; [6.1.1360](https://forth-standard.org/standard/core/EVALUATE) (func $EVALUATE (param $tos i32) (result i32) @@ -1165,28 +1173,28 @@ (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 0x20550) "\40\05\02\00" "\08" "EVALUATE " "\65\00\00\00") - (elem (i32.const 0x65) $EVALUATE) + (data (i32.const 0x20560) "\50\05\02\00" "\08" "EVALUATE " "\66\00\00\00") + (elem (i32.const 0x66) $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 0x20564) "\50\05\02\00" "\07" "EXECUTE" "\66\00\00\00") - (elem (i32.const 0x66) $EXECUTE) + (data (i32.const 0x20574) "\60\05\02\00" "\07" "EXECUTE" "\67\00\00\00") + (elem (i32.const 0x67) $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 0x20574) "\64\05\02\00" "\84" (; F_IMMEDIATE ;) "EXIT " "\67\00\00\00") - (elem (i32.const 0x67) $EXIT) + (data (i32.const 0x20584) "\74\05\02\00" "\84" (; F_IMMEDIATE ;) "EXIT " "\68\00\00\00") + (elem (i32.const 0x68) $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 0x20584) "\74\05\02\00" "\05" "FALSE " "\68\00\00\00") - (elem (i32.const 0x68) $FALSE) + (data (i32.const 0x20594) "\84\05\02\00" "\05" "FALSE " "\69\00\00\00") + (elem (i32.const 0x69) $FALSE) ;; [6.1.1540](https://forth-standard.org/standard/core/FILL) (func $FILL (param $tos i32) (result i32) @@ -1196,8 +1204,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 0x20594) "\84\05\02\00" "\04" "FILL " "\69\00\00\00") - (elem (i32.const 0x69) $FILL) + (data (i32.const 0x205a4) "\94\05\02\00" "\04" "FILL " "\6a\00\00\00") + (elem (i32.const 0x6a) $FILL) ;; [6.1.1550](https://forth-standard.org/standard/core/FIND) (func $FIND (param $tos i32) (result i32) @@ -1213,8 +1221,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 0x205a4) "\94\05\02\00" "\04" "FIND " "\6a\00\00\00") - (elem (i32.const 0x6a) $FIND) + (data (i32.const 0x205b4) "\a4\05\02\00" "\04" "FIND " "\6b\00\00\00") + (elem (i32.const 0x6b) $FIND) ;; [6.1.1561](https://forth-standard.org/standard/core/FMDivMOD) (func $FM/MOD (param $tos i32) (result i32) @@ -1241,22 +1249,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 0x205b4) "\a4\05\02\00" "\06" "FM/MOD " "\6b\00\00\00") - (elem (i32.const 0x6b) $FM/MOD) + (data (i32.const 0x205c4) "\b4\05\02\00" "\06" "FM/MOD " "\6c\00\00\00") + (elem (i32.const 0x6c) $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 0x205c4) "\b4\05\02\00" "\04" "HERE " "\6c\00\00\00") - (elem (i32.const 0x6c) $HERE) + (data (i32.const 0x205d4) "\c4\05\02\00" "\04" "HERE " "\6d\00\00\00") + (elem (i32.const 0x6d) $HERE) ;; [6.2.1660](https://forth-standard.org/standard/core/HEX) (func $HEX (param $tos i32) (result i32) (i32.store (i32.const 0x203bc (; = body(BASE) ;)) (i32.const 16)) (local.get $tos)) - (data (i32.const 0x205d4) "\c4\05\02\00" "\03" "HEX" "\6d\00\00\00") - (elem (i32.const 0x6d) $HEX) + (data (i32.const 0x205e4) "\d4\05\02\00" "\03" "HEX" "\6e\00\00\00") + (elem (i32.const 0x6e) $HEX) ;; [6.1.1670](https://forth-standard.org/standard/core/HOLD) (func $HOLD (param $tos i32) (result i32) @@ -1267,23 +1275,23 @@ (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 0x205e0) "\d4\05\02\00" "\04" "HOLD " "\6e\00\00\00") - (elem (i32.const 0x6e) $HOLD) + (data (i32.const 0x205f0) "\e4\05\02\00" "\04" "HOLD " "\6f\00\00\00") + (elem (i32.const 0x6f) $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 0x205f0) "\e0\05\02\00" "\01" "I " "\6f\00\00\00") - (elem (i32.const 0x6f) $I) + (data (i32.const 0x20600) "\f0\05\02\00" "\01" "I " "\70\00\00\00") + (elem (i32.const 0x70) $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 0x205fc) "\f0\05\02\00" "\82" (; F_IMMEDIATE ;) "IF " "\70\00\00\00") - (elem (i32.const 0x70) $IF) + (data (i32.const 0x2060c) "\00\06\02\00" "\82" (; F_IMMEDIATE ;) "IF " "\71\00\00\00") + (elem (i32.const 0x71) $IF) ;; [6.1.1710](https://forth-standard.org/standard/core/IMMEDIATE) (func $IMMEDIATE (param $tos i32) (result i32) @@ -1292,8 +1300,8 @@ (i32.load (i32.add (global.get $latest) (i32.const 4))) (i32.const 0x80 (; = F_IMMEDIATE ;)))) (local.get $tos)) - (data (i32.const 0x20608) "\fc\05\02\00" "\09" "IMMEDIATE " "\71\00\00\00") - (elem (i32.const 0x71) $IMMEDIATE) + (data (i32.const 0x20618) "\0c\06\02\00" "\09" "IMMEDIATE " "\72\00\00\00") + (elem (i32.const 0x72) $IMMEDIATE) ;; [6.1.1720](https://forth-standard.org/standard/core/INVERT) (func $INVERT (param $tos i32) (result i32) @@ -1301,52 +1309,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 0x2061c) "\08\06\02\00" "\06" "INVERT " "\72\00\00\00") - (elem (i32.const 0x72) $INVERT) + (data (i32.const 0x2062c) "\18\06\02\00" "\06" "INVERT " "\73\00\00\00") + (elem (i32.const 0x73) $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 0x2062c) "\1c\06\02\00" "\01" "J " "\73\00\00\00") - (elem (i32.const 0x73) $J) + (data (i32.const 0x2063c) "\2c\06\02\00" "\01" "J " "\74\00\00\00") + (elem (i32.const 0x74) $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 0x20638) "\2c\06\02\00" "\03" "KEY" "\74\00\00\00") - (elem (i32.const 0x74) $KEY) + (data (i32.const 0x20648) "\3c\06\02\00" "\03" "KEY" "\75\00\00\00") + (elem (i32.const 0x75) $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 0x20644) "\38\06\02\00" "\06" "LATEST " "\75\00\00\00") - (elem (i32.const 0x75) $LATEST) + (data (i32.const 0x20654) "\48\06\02\00" "\06" "LATEST " "\76\00\00\00") + (elem (i32.const 0x76) $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 0x20654) "\44\06\02\00" "\85" (; F_IMMEDIATE ;) "LEAVE " "\76\00\00\00") - (elem (i32.const 0x76) $LEAVE) + (data (i32.const 0x20664) "\54\06\02\00" "\85" (; F_IMMEDIATE ;) "LEAVE " "\77\00\00\00") + (elem (i32.const 0x77) $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 0x20664) "\54\06\02\00" "\87" (; F_IMMEDIATE ;) "LITERAL" "\77\00\00\00") - (elem (i32.const 0x77) $LITERAL) + (data (i32.const 0x20674) "\64\06\02\00" "\87" (; F_IMMEDIATE ;) "LITERAL" "\78\00\00\00") + (elem (i32.const 0x78) $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 0x20674) "\64\06\02\00" "\84" (; F_IMMEDIATE ;) "LOOP " "\78\00\00\00") - (elem (i32.const 0x78) $LOOP) + (data (i32.const 0x20684) "\74\06\02\00" "\84" (; F_IMMEDIATE ;) "LOOP " "\79\00\00\00") + (elem (i32.const 0x79) $LOOP) ;; [6.1.1805](https://forth-standard.org/standard/core/LSHIFT) (func $LSHIFT (param $tos i32) (result i32) @@ -1356,8 +1364,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 0x20684) "\74\06\02\00" "\06" "LSHIFT " "\79\00\00\00") - (elem (i32.const 0x79) $LSHIFT) + (data (i32.const 0x20694) "\84\06\02\00" "\06" "LSHIFT " "\7a\00\00\00") + (elem (i32.const 0x7a) $LSHIFT) ;; [6.1.1810](https://forth-standard.org/standard/core/MTimes) (func $M* (param $tos i32) (result i32) @@ -1367,8 +1375,8 @@ (i64.extend_i32_s (i32.load (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $tos)) - (data (i32.const 0x20694) "\84\06\02\00" "\02" "M* " "\7a\00\00\00") - (elem (i32.const 0x7a) $M*) + (data (i32.const 0x206a4) "\94\06\02\00" "\02" "M* " "\7b\00\00\00") + (elem (i32.const 0x7b) $M*) ;; [6.1.1870](https://forth-standard.org/standard/core/MAX) (func $MAX (param $tos i32) (result i32) @@ -1381,8 +1389,8 @@ (then (i32.store (local.get $bbtos) (local.get $v)))) (local.get $btos)) - (data (i32.const 0x206a0) "\94\06\02\00" "\03" "MAX" "\7b\00\00\00") - (elem (i32.const 0x7b) $MAX) + (data (i32.const 0x206b0) "\a4\06\02\00" "\03" "MAX" "\7c\00\00\00") + (elem (i32.const 0x7c) $MAX) ;; [6.1.1880](https://forth-standard.org/standard/core/MIN) (func $MIN (param $tos i32) (result i32) @@ -1395,8 +1403,8 @@ (then (i32.store (local.get $bbtos) (local.get $v)))) (local.get $btos)) - (data (i32.const 0x206ac) "\a0\06\02\00" "\03" "MIN" "\7c\00\00\00") - (elem (i32.const 0x7c) $MIN) + (data (i32.const 0x206bc) "\b0\06\02\00" "\03" "MIN" "\7d\00\00\00") + (elem (i32.const 0x7d) $MIN) ;; [6.1.1890](https://forth-standard.org/standard/core/MOD) (func $MOD (param $tos i32) (result i32) @@ -1406,8 +1414,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 0x206b8) "\ac\06\02\00" "\03" "MOD" "\7d\00\00\00") - (elem (i32.const 0x7d) $MOD) + (data (i32.const 0x206c8) "\bc\06\02\00" "\03" "MOD" "\7e\00\00\00") + (elem (i32.const 0x7e) $MOD) ;; [6.1.1900](https://forth-standard.org/standard/core/MOVE) (func $MOVE (param $tos i32) (result i32) @@ -1417,8 +1425,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 0x206c4) "\b8\06\02\00" "\04" "MOVE " "\7e\00\00\00") - (elem (i32.const 0x7e) $MOVE) + (data (i32.const 0x206d4) "\c8\06\02\00" "\04" "MOVE " "\7f\00\00\00") + (elem (i32.const 0x7f) $MOVE) ;; [6.1.1910](https://forth-standard.org/standard/core/NEGATE) (func $NEGATE (param $tos i32) (result i32) @@ -1426,8 +1434,8 @@ (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 0x206d4) "\c4\06\02\00" "\06" "NEGATE " "\7f\00\00\00") - (elem (i32.const 0x7f) $NEGATE) + (data (i32.const 0x206e4) "\d4\06\02\00" "\06" "NEGATE " "\80\00\00\00") + (elem (i32.const 0x80) $NEGATE) ;; [6.2.1930](https://forth-standard.org/standard/core/NIP) (func $NIP (param $tos i32) (result i32) @@ -1435,8 +1443,8 @@ (i32.store (i32.sub (local.get $tos) (i32.const 8)) (i32.load (local.tee $btos (i32.sub (local.get $tos) (i32.const 4))))) (local.get $btos)) - (data (i32.const 0x206e4) "\d4\06\02\00" "\03" "NIP" "\80\00\00\00") - (elem (i32.const 0x80) $NIP) + (data (i32.const 0x206f4) "\e4\06\02\00" "\03" "NIP" "\81\00\00\00") + (elem (i32.const 0x81) $NIP) ;; [6.1.1980](https://forth-standard.org/standard/core/OR) (func $OR (param $tos i32) (result i32) @@ -1446,23 +1454,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 0x206f0) "\e4\06\02\00" "\02" "OR " "\81\00\00\00") - (elem (i32.const 0x81) $OR) + (data (i32.const 0x20700) "\f4\06\02\00" "\02" "OR " "\82\00\00\00") + (elem (i32.const 0x82) $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 0x206fc) "\f0\06\02\00" "\04" "OVER " "\82\00\00\00") - (elem (i32.const 0x82) $OVER) + (data (i32.const 0x2070c) "\00\07\02\00" "\04" "OVER " "\83\00\00\00") + (elem (i32.const 0x83) $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 0x2070c) "\fc\06\02\00" "\03" "PAD" "\83\00\00\00") - (elem (i32.const 0x83) $PAD) + (data (i32.const 0x2071c) "\0c\07\02\00" "\03" "PAD" "\84\00\00\00") + (elem (i32.const 0x84) $PAD) ;; [6.2.2008](https://forth-standard.org/standard/core/PARSE) (func $PARSE (param $tos i32) (result i32) @@ -1475,8 +1483,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 0x20718) "\0c\07\02\00" "\05" "PARSE " "\84\00\00\00") - (elem (i32.const 0x84) $PARSE) + (data (i32.const 0x20728) "\1c\07\02\00" "\05" "PARSE " "\85\00\00\00") + (elem (i32.const 0x85) $PARSE) ;; [6.2.2020](https://forth-standard.org/standard/core/PARSE-NAME) (func $PARSE-NAME (param $tos i32) (result i32) @@ -1486,8 +1494,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 0x20728) "\18\07\02\00" "\0a" "PARSE-NAME " "\85\00\00\00") - (elem (i32.const 0x85) $PARSE-NAME) + (data (i32.const 0x20738) "\28\07\02\00" "\0a" "PARSE-NAME " "\86\00\00\00") + (elem (i32.const 0x86) $PARSE-NAME) ;; [6.2.2030](https://forth-standard.org/standard/core/PICK) (func $PICK (param $tos i32) (result i32) @@ -1498,8 +1506,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 0x2073c) "\28\07\02\00" "\04" "PICK " "\86\00\00\00") - (elem (i32.const 0x86) $PICK) + (data (i32.const 0x2074c) "\38\07\02\00" "\04" "PICK " "\87\00\00\00") + (elem (i32.const 0x87) $PICK) ;; [6.1.2033](https://forth-standard.org/standard/core/POSTPONE) (func $POSTPONE (param $tos i32) (result i32) @@ -1514,38 +1522,38 @@ (else (call $emitConst (local.get $FINDToken)) (call $compileCall (i32.const 1) (i32.const 0x5 (; = COMPILE_EXECUTE_INDEX ;)))))) - (data (i32.const 0x2074c) "\3c\07\02\00" "\88" (; F_IMMEDIATE ;) "POSTPONE " "\87\00\00\00") - (elem (i32.const 0x87) $POSTPONE) + (data (i32.const 0x2075c) "\4c\07\02\00" "\88" (; F_IMMEDIATE ;) "POSTPONE " "\88\00\00\00") + (elem (i32.const 0x88) $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 0x20760) "\4c\07\02\00" "\04" "QUIT " "\88\00\00\00") - (elem (i32.const 0x88) $QUIT) + (data (i32.const 0x20770) "\5c\07\02\00" "\04" "QUIT " "\89\00\00\00") + (elem (i32.const 0x89) $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 0x20770) "\60\07\02\00" "\02" "R> " "\89\00\00\00") - (elem (i32.const 0x89) $R>) + (data (i32.const 0x20780) "\70\07\02\00" "\02" "R> " "\8a\00\00\00") + (elem (i32.const 0x8a) $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 0x2077c) "\70\07\02\00" "\02" "R@ " "\8a\00\00\00") - (elem (i32.const 0x8a) $R@) + (data (i32.const 0x2078c) "\80\07\02\00" "\02" "R@ " "\8b\00\00\00") + (elem (i32.const 0x8b) $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 0x20788) "\7c\07\02\00" "\87" (; F_IMMEDIATE ;) "RECURSE" "\8b\00\00\00") - (elem (i32.const 0x8b) $RECURSE) + (data (i32.const 0x20798) "\8c\07\02\00" "\87" (; F_IMMEDIATE ;) "RECURSE" "\8c\00\00\00") + (elem (i32.const 0x8c) $RECURSE) ;; [6.2.2125](https://forth-standard.org/standard/core/REFILL) (func $REFILL (param $tos i32) (result i32) @@ -1564,16 +1572,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 0x20798) "\88\07\02\00" "\06" "REFILL " "\8c\00\00\00") - (elem (i32.const 0x8c) $REFILL) + (data (i32.const 0x207a8) "\98\07\02\00" "\06" "REFILL " "\8d\00\00\00") + (elem (i32.const 0x8d) $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 0x207a8) "\98\07\02\00" "\86" (; F_IMMEDIATE ;) "REPEAT " "\8d\00\00\00") - (elem (i32.const 0x8d) $REPEAT) + (data (i32.const 0x207b8) "\a8\07\02\00" "\86" (; F_IMMEDIATE ;) "REPEAT " "\8e\00\00\00") + (elem (i32.const 0x8e) $REPEAT) ;; [6.1.2160](https://forth-standard.org/standard/core/ROT) (func $ROT (param $tos i32) (result i32) @@ -1588,8 +1596,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 0x207b8) "\a8\07\02\00" "\03" "ROT" "\8e\00\00\00") - (elem (i32.const 0x8e) $ROT) + (data (i32.const 0x207c8) "\b8\07\02\00" "\03" "ROT" "\8f\00\00\00") + (elem (i32.const 0x8f) $ROT) ;; [6.1.2162](https://forth-standard.org/standard/core/RSHIFT) (func $RSHIFT (param $tos i32) (result i32) @@ -1599,8 +1607,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 0x207c4) "\b8\07\02\00" "\06" "RSHIFT " "\8f\00\00\00") - (elem (i32.const 0x8f) $RSHIFT) + (data (i32.const 0x207d4) "\c8\07\02\00" "\06" "RSHIFT " "\90\00\00\00") + (elem (i32.const 0x90) $RSHIFT) ;; [6.1.2165](https://forth-standard.org/standard/core/Sq) (func $Sq (param $tos i32) (result i32) @@ -1615,8 +1623,8 @@ (call $compilePushConst (local.get $len)) (global.set $here (call $aligned (i32.add (global.get $here) (local.get $len))))) - (data (i32.const 0x207d4) "\c4\07\02\00" "\82" (; F_IMMEDIATE ;) "S\22 " "\90\00\00\00") - (elem (i32.const 0x90) $Sq) + (data (i32.const 0x207e4) "\d4\07\02\00" "\82" (; F_IMMEDIATE ;) "S\22 " "\91\00\00\00") + (elem (i32.const 0x91) $Sq) ;; [6.1.2170](https://forth-standard.org/standard/core/StoD) (func $S>D (param $tos i32) (result i32) @@ -1624,15 +1632,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 0x207e0) "\d4\07\02\00" "\03" "S>D" "\91\00\00\00") - (elem (i32.const 0x91) $S>D) + (data (i32.const 0x207f0) "\e4\07\02\00" "\03" "S>D" "\92\00\00\00") + (elem (i32.const 0x92) $S>D) (func $SCALL (param $tos i32) (result i32) (global.set $tos (local.get $tos)) (call $shell_call) (global.get $tos)) - (data (i32.const 0x207ec) "\e0\07\02\00" "\05" "SCALL " "\92\00\00\00") - (elem (i32.const 0x92) $SCALL) + (data (i32.const 0x207fc) "\f0\07\02\00" "\05" "SCALL " "\93\00\00\00") + (elem (i32.const 0x93) $SCALL) ;; [6.1.2210](https://forth-standard.org/standard/core/SIGN) (func $SIGN (param $tos i32) (result i32) @@ -1643,8 +1651,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 0x207fc) "\ec\07\02\00" "\04" "SIGN " "\93\00\00\00") - (elem (i32.const 0x93) $SIGN) + (data (i32.const 0x2080c) "\fc\07\02\00" "\04" "SIGN " "\94\00\00\00") + (elem (i32.const 0x94) $SIGN) ;; [6.1.2214](https://forth-standard.org/standard/core/SMDivREM) ;; @@ -1665,29 +1673,29 @@ (i32.wrap_i64 (i64.div_s (local.get $n1) (local.get $n2)))) (local.get $btos)) - (data (i32.const 0x2080c) "\fc\07\02\00" "\06" "SM/REM " "\94\00\00\00") - (elem (i32.const 0x94) $SM/REM) + (data (i32.const 0x2081c) "\0c\08\02\00" "\06" "SM/REM " "\95\00\00\00") + (elem (i32.const 0x95) $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 0x2081c) "\0c\08\02\00" "\06" "SOURCE " "\95\00\00\00") - (elem (i32.const 0x95) $SOURCE) + (data (i32.const 0x2082c) "\1c\08\02\00" "\06" "SOURCE " "\96\00\00\00") + (elem (i32.const 0x96) $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 0x2082c) "\1c\08\02\00" "\09" "SOURCE-ID " "\96\00\00\00") - (elem (i32.const 0x96) $SOURCE-ID) + (data (i32.const 0x2083c) "\2c\08\02\00" "\09" "SOURCE-ID " "\97\00\00\00") + (elem (i32.const 0x97) $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 0x20840) "\2c\08\02\00" "\05" "SPACE " "\97\00\00\00") - (elem (i32.const 0x97) $SPACE) + (data (i32.const 0x20850) "\3c\08\02\00" "\05" "SPACE " "\98\00\00\00") + (elem (i32.const 0x98) $SPACE) ;; [6.1.2230](https://forth-standard.org/standard/core/SPACES) (func $SPACES (param $tos i32) (result i32) @@ -1700,11 +1708,11 @@ (call $SPACE) (local.set $i (i32.sub (local.get $i) (i32.const 1))) (br $loop)))) - (data (i32.const 0x20850) "\40\08\02\00" "\06" "SPACES " "\98\00\00\00") - (elem (i32.const 0x98) $SPACES) + (data (i32.const 0x20860) "\50\08\02\00" "\06" "SPACES " "\99\00\00\00") + (elem (i32.const 0x99) $SPACES) ;; [6.1.2250](https://forth-standard.org/standard/core/STATE) - (data (i32.const 0x20860) "\50\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 0x20870) "\60\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) @@ -1716,16 +1724,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 0x20874) "\60\08\02\00" "\04" "SWAP " "\99\00\00\00") - (elem (i32.const 0x99) $SWAP) + (data (i32.const 0x20884) "\70\08\02\00" "\04" "SWAP " "\9a\00\00\00") + (elem (i32.const 0x9a) $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 0x20884) "\74\08\02\00" "\84" (; F_IMMEDIATE ;) "THEN " "\9a\00\00\00") - (elem (i32.const 0x9a) $THEN) + (data (i32.const 0x20894) "\84\08\02\00" "\84" (; F_IMMEDIATE ;) "THEN " "\9b\00\00\00") + (elem (i32.const 0x9b) $THEN) ;; [6.2.2295](https://forth-standard.org/standard/core/TO) (func $TO (param $tos i32) (result i32) @@ -1736,14 +1744,14 @@ (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 0x20894) "\84\08\02\00" "\02" "TO " "\9b\00\00\00") - (elem (i32.const 0x9b) $TO) + (data (i32.const 0x208a4) "\94\08\02\00" "\02" "TO " "\9c\00\00\00") + (elem (i32.const 0x9c) $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 0x208a0) "\94\08\02\00" "\04" "TRUE " "\9c\00\00\00") - (elem (i32.const 0x9c) $TRUE) + (data (i32.const 0x208b0) "\a4\08\02\00" "\04" "TRUE " "\9d\00\00\00") + (elem (i32.const 0x9d) $TRUE) ;; [6.2.2300](https://forth-standard.org/standard/core/TUCK) (func $TUCK (param $tos i32) (result i32) @@ -1754,8 +1762,8 @@ (i32.load (i32.sub (local.get $tos) (i32.const 8)))) (i32.store (i32.sub (local.get $tos) (i32.const 8)) (local.get $v)) (i32.add (local.get $tos) (i32.const 4))) - (data (i32.const 0x208b0) "\a0\08\02\00" "\04" "TUCK " "\9d\00\00\00") - (elem (i32.const 0x9d) $TUCK) + (data (i32.const 0x208c0) "\b0\08\02\00" "\04" "TUCK " "\9e\00\00\00") + (elem (i32.const 0x9e) $TUCK) ;; [6.1.2310](https://forth-standard.org/standard/core/TYPE) (func $TYPE (param $tos i32) (result i32) @@ -1765,16 +1773,16 @@ (local.set $len (call $pop)) (local.set $p (call $pop)) (call $type (local.get $p) (local.get $len))) - (data (i32.const 0x208c0) "\b0\08\02\00" "\04" "TYPE " "\9e\00\00\00") - (elem (i32.const 0x9e) $TYPE) + (data (i32.const 0x208d0) "\c0\08\02\00" "\04" "TYPE " "\9f\00\00\00") + (elem (i32.const 0x9f) $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 0x203bc (; = body(BASE) ;)))) (call $shell_emit (i32.const 0x20))) - (data (i32.const 0x208d0) "\c0\08\02\00" "\02" "U. " "\9f\00\00\00") - (elem (i32.const 0x9f) $U.) + (data (i32.const 0x208e0) "\d0\08\02\00" "\02" "U. " "\a0\00\00\00") + (elem (i32.const 0xa0) $U.) ;; [6.1.2340](https://forth-standard.org/standard/core/Uless) (func $U< (param $tos i32) (result i32) @@ -1785,8 +1793,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 0x208dc) "\d0\08\02\00" "\02" "U< " "\a0\00\00\00") - (elem (i32.const 0xa0) $U<) + (data (i32.const 0x208ec) "\e0\08\02\00" "\02" "U< " "\a1\00\00\00") + (elem (i32.const 0xa1) $U<) ;; [6.2.2350](https://forth-standard.org/standard/core/Umore) (func $U> (param $tos i32) (result i32) @@ -1797,8 +1805,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 0x208e8) "\dc\08\02\00" "\02" "U> " "\a1\00\00\00") - (elem (i32.const 0xa1) $U>) + (data (i32.const 0x208f8) "\ec\08\02\00" "\02" "U> " "\a2\00\00\00") + (elem (i32.const 0xa2) $U>) ;; [6.1.2360](https://forth-standard.org/standard/core/UMTimes) (func $UM* (param $tos i32) (result i32) @@ -1808,8 +1816,8 @@ (i64.extend_i32_u (i32.load (i32.sub (local.get $tos) (i32.const 4)))))) (local.get $tos)) - (data (i32.const 0x208f4) "\e8\08\02\00" "\03" "UM*" "\a2\00\00\00") - (elem (i32.const 0xa2) $UM*) + (data (i32.const 0x20904) "\f8\08\02\00" "\03" "UM*" "\a3\00\00\00") + (elem (i32.const 0xa3) $UM*) ;; [6.1.2370](https://forth-standard.org/standard/core/UMDivMOD) (func $UM/MOD (param $tos i32) (result i32) @@ -1828,50 +1836,50 @@ (i32.wrap_i64 (i64.div_u (local.get $n1) (local.get $n2)))) (local.get $btos)) - (data (i32.const 0x20900) "\f4\08\02\00" "\06" "UM/MOD " "\a3\00\00\00") - (elem (i32.const 0xa3) $UM/MOD) + (data (i32.const 0x20910) "\04\09\02\00" "\06" "UM/MOD " "\a4\00\00\00") + (elem (i32.const 0xa4) $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 $compileCall (i32.const 0) (i32.const 0x9 (; = END_DO_INDEX ;)))) - (data (i32.const 0x20910) "\00\09\02\00" "\86" (; F_IMMEDIATE ;) "UNLOOP " "\a4\00\00\00") - (elem (i32.const 0xa4) $UNLOOP) + (data (i32.const 0x20920) "\10\09\02\00" "\86" (; F_IMMEDIATE ;) "UNLOOP " "\a5\00\00\00") + (elem (i32.const 0xa5) $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 0x20920) "\10\09\02\00" "\85" (; F_IMMEDIATE ;) "UNTIL " "\a5\00\00\00") - (elem (i32.const 0xa5) $UNTIL) + (data (i32.const 0x20930) "\20\09\02\00" "\85" (; F_IMMEDIATE ;) "UNTIL " "\a6\00\00\00") + (elem (i32.const 0xa6) $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 0x20930) "\20\09\02\00" "\06" "UNUSED " "\a6\00\00\00") - (elem (i32.const 0xa6) $UNUSED) + (data (i32.const 0x20940) "\30\09\02\00" "\06" "UNUSED " "\a7\00\00\00") + (elem (i32.const 0xa7) $UNUSED) ;; [6.2.2405](https://forth-standard.org/standard/core/VALUE) - (data (i32.const 0x20940) "\30\09\02\00" "\05" "VALUE " "\57\00\00\00" (; = pack(index("CONSTANT")) ;)) + (data (i32.const 0x20950) "\40\09\02\00" "\05" "VALUE " "\58\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 0x20950) "\40\09\02\00" "\08" "VARIABLE " "\a7\00\00\00") - (elem (i32.const 0xa7) $VARIABLE) + (data (i32.const 0x20960) "\50\09\02\00" "\08" "VARIABLE " "\a8\00\00\00") + (elem (i32.const 0xa8) $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 0x20964) "\50\09\02\00" "\85" (; F_IMMEDIATE ;) "WHILE " "\a8\00\00\00") - (elem (i32.const 0xa8) $WHILE) + (data (i32.const 0x20974) "\60\09\02\00" "\85" (; F_IMMEDIATE ;) "WHILE " "\a9\00\00\00") + (elem (i32.const 0xa9) $WHILE) ;; [6.2.2440](https://forth-standard.org/standard/core/WITHIN) (func $WITHIN (param $tos i32) (result i32) @@ -1892,8 +1900,8 @@ (else (i32.const 0)))) (local.get $bbtos)) - (data (i32.const 0x20974) "\64\09\02\00" "\06" "WITHIN " "\a9\00\00\00") - (elem (i32.const 0xa9) $WITHIN) + (data (i32.const 0x20984) "\74\09\02\00" "\06" "WITHIN " "\aa\00\00\00") + (elem (i32.const 0xaa) $WITHIN) ;; [6.1.2450](https://forth-standard.org/standard/core/WORD) (func $WORD (param $tos i32) (result i32) @@ -1913,8 +1921,8 @@ (local.get $len)) (i32.store8 (local.get $wordBase) (local.get $len)) (call $push (local.get $wordBase))) - (data (i32.const 0x20984) "\74\09\02\00" "\04" "WORD " "\aa\00\00\00") - (elem (i32.const 0xaa) $WORD) + (data (i32.const 0x20994) "\84\09\02\00" "\04" "WORD " "\ab\00\00\00") + (elem (i32.const 0xab) $WORD) ;; 15.6.1.2465 (func $WORDS (param $tos i32) (result i32) @@ -1935,8 +1943,8 @@ (local.set $entryP (i32.load (local.get $entryP))) (br_if $loop (local.get $entryP))) (local.get $tos)) - (data (i32.const 0x20994) "\84\09\02\00" "\05" "WORDS " "\ab\00\00\00") - (elem (i32.const 0xab) $WORDS) + (data (i32.const 0x209a4) "\94\09\02\00" "\05" "WORDS " "\ac\00\00\00") + (elem (i32.const 0xac) $WORDS) ;; [6.1.2490](https://forth-standard.org/standard/core/XOR) (func $XOR (param $tos i32) (result i32) @@ -1946,16 +1954,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 0x209a4) "\94\09\02\00" "\03" "XOR" "\ac\00\00\00") - (elem (i32.const 0xac) $XOR) + (data (i32.const 0x209b4) "\a4\09\02\00" "\03" "XOR" "\ad\00\00\00") + (elem (i32.const 0xad) $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 0x20870 (; = body(STATE) ;)) (i32.const 0))) - (data (i32.const 0x209b0) "\a4\09\02\00" "\81" (; F_IMMEDIATE ;) "[ " "\ad\00\00\00") - (elem (i32.const 0xad) $left-bracket) + (i32.store (i32.const 0x20880 (; = body(STATE) ;)) (i32.const 0))) + (data (i32.const 0x209c0) "\b4\09\02\00" "\81" (; F_IMMEDIATE ;) "[ " "\ae\00\00\00") + (elem (i32.const 0xae) $left-bracket) ;; [6.1.2510](https://forth-standard.org/standard/core/BracketTick) (func $bracket-tick (param $tos i32) (result i32) @@ -1963,8 +1971,8 @@ (call $ensureCompiling) (call $') (call $compilePushConst (call $pop))) - (data (i32.const 0x209bc) "\b0\09\02\00" "\83" (; F_IMMEDIATE ;) "[']" "\ae\00\00\00") - (elem (i32.const 0xae) $bracket-tick) + (data (i32.const 0x209cc) "\c0\09\02\00" "\83" (; F_IMMEDIATE ;) "[']" "\af\00\00\00") + (elem (i32.const 0xaf) $bracket-tick) ;; [6.1.2520](https://forth-standard.org/standard/core/BracketCHAR) (func $bracket-char (param $tos i32) (result i32) @@ -1972,22 +1980,22 @@ (call $ensureCompiling) (call $CHAR) (call $compilePushConst (call $pop))) - (data (i32.const 0x209c8) "\bc\09\02\00" "\86" (; F_IMMEDIATE ;) "[CHAR] " "\af\00\00\00") - (elem (i32.const 0xaf) $bracket-char) + (data (i32.const 0x209d8) "\cc\09\02\00" "\86" (; F_IMMEDIATE ;) "[CHAR] " "\b0\00\00\00") + (elem (i32.const 0xb0) $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 0x209d8) "\c8\09\02\00" "\81" (; F_IMMEDIATE ;) "\5c " "\b0\00\00\00") - (elem (i32.const 0xb0) $\) + (data (i32.const 0x209e8) "\d8\09\02\00" "\81" (; F_IMMEDIATE ;) "\5c " "\b1\00\00\00") + (elem (i32.const 0xb1) $\) ;; [6.1.2540](https://forth-standard.org/standard/right-bracket) (func $right-bracket (param $tos i32) (result i32) - (i32.store (i32.const 0x20870 (; = body(STATE) ;)) (i32.const 1)) + (i32.store (i32.const 0x20880 (; = body(STATE) ;)) (i32.const 1)) (local.get $tos)) - (data (i32.const 0x209e4) "\d8\09\02\00" "\01" "] " "\b1\00\00\00") - (elem (i32.const 0xb1) $right-bracket) + (data (i32.const 0x209f4) "\e8\09\02\00" "\01" "] " "\b2\00\00\00") + (elem (i32.const 0xb2) $right-bracket) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2025,7 +2033,7 @@ ;; It's a number. Are we compiling? (then (local.set $number) - (if (i32.load (i32.const 0x20870 (; = body(STATE) ;))) + (if (i32.load (i32.const 0x20880 (; = body(STATE) ;))) (then ;; We're compiling. Pop it off the stack and ;; add it to the compiled list @@ -2041,7 +2049,7 @@ ;; Name found in the dictionary. ;; Are we compiling and is the word non-immediate? (if (i32.and - (i32.load (i32.const 0x20870 (; = body(STATE) ;))) + (i32.load (i32.const 0x20880 (; = body(STATE) ;))) (i32.ne (local.get $FINDResult) (i32.const 1))) (then ;; We're compiling a non-immediate. @@ -2080,7 +2088,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 0x20870 (; = body(STATE) ;)) (i32.const 0)) + (i32.store (i32.const 0x20880 (; = body(STATE) ;)) (i32.const 0)) (unreachable)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2101,9 +2109,9 @@ (global $sourceID (mut i32) (i32.const 0)) ;; Dictionary pointers - (global $latest (mut i32) (i32.const 0x209e4)) - (global $here (mut i32) (i32.const 0x209f0)) - (global $nextTableIndex (mut i32) (i32.const 0xb2)) + (global $latest (mut i32) (i32.const 0x209f4)) + (global $here (mut i32) (i32.const 0x20a00)) + (global $nextTableIndex (mut i32) (i32.const 0xb3)) ;; Pictured output pointer (global $po (mut i32) (i32.const -1)) @@ -2625,7 +2633,7 @@ (func $ensureCompiling (param $tos i32) (result i32) (local.get $tos) - (if (param i32) (result i32) (i32.eqz (i32.load (i32.const 0x20870 (; = body(STATE) ;)))) + (if (param i32) (result i32) (i32.eqz (i32.load (i32.const 0x20880 (; = body(STATE) ;)))) (call $fail (i32.const 0x2002e (; = str("word not supported in interpret mode") ;))))) ;; LEB128 with fixed 4 bytes (with padding bytes) @@ -2895,7 +2903,7 @@ ;; Show prompt (if (i32.eqz (local.get $silent)) (then - (if (i32.ge_s (i32.load (i32.const 0x20870 (; = body(STATE) ;))) (i32.const 0)) + (if (i32.ge_s (i32.load (i32.const 0x20880 (; = 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 6fc93ec..9e07669 100644 --- a/src/web/tests/forth2012-test-suite/coreexttest.fth +++ b/src/web/tests/forth2012-test-suite/coreexttest.fth @@ -394,13 +394,13 @@ T{ -1 2 0 QD6 -> 2 2 2 2 2 2 6 }T T{ -1 2 1 QD6 -> 2 3 4 5 6 7 6 }T T{ 2 -1 1 QD6 -> -1 0 1 3 }T -\ \ ----------------------------------------------------------------------------- -\ TESTING BUFFER: +\ ----------------------------------------------------------------------------- +TESTING BUFFER: -\ T{ 8 BUFFER: BUF:TEST -> }T -\ T{ BUF:TEST DUP ALIGNED = -> TRUE }T -\ T{ 111 BUF:TEST ! 222 BUF:TEST CELL+ ! -> }T -\ T{ BUF:TEST @ BUF:TEST CELL+ @ -> 111 222 }T +T{ 8 BUFFER: BUF:TEST -> }T +T{ BUF:TEST DUP ALIGNED = -> TRUE }T +T{ 111 BUF:TEST ! 222 BUF:TEST CELL+ ! -> }T +T{ BUF:TEST @ BUF:TEST CELL+ @ -> 111 222 }T \ ----------------------------------------------------------------------------- TESTING VALUE TO