X-Git-Url: https://git.kengrimes.com/?p=watForth.git;a=blobdiff_plain;f=forth.wat;h=d5240604c57bf028b397437c4469e8dc47c8641d;hp=75c30099e730b466b92ade16f4996bf68d94aafd;hb=b1197f8636a1b46b1eabc565cd41f0a30944cac4;hpb=2a1f14a4ef5efe8084d6cd0468af00c8828b2bb5 diff --git a/forth.wat b/forth.wat index 75c3009..d524060 100644 --- a/forth.wat +++ b/forth.wat @@ -145,9 +145,9 @@ (data (i32.const 16740) "\01\00\00\00") ;; RET (data (i32.const 16744) "\20\00\00\00") ;; 2DROP <-- donum_err (data (i32.const 16748) "\02\00\00\00") ;; LIT - (data (i32.const 16752) "\04\30\00\00") ;; INBUFSIZE LOCATION + (data (i32.const 16752) "\00\00\00\00") ;; 0 (data (i32.const 16756) "\02\00\00\00") ;; LIT - (data (i32.const 16760) "\00\00\00\00") ;; 0 + (data (i32.const 16760) "\04\30\00\00") ;; INBUFSIZE LOCATION (data (i32.const 16764) "\0b\00\00\00") ;; ! (data (i32.const 16768) "\19\00\00\00") ;; BYE (data (i32.const 16772) "\00\00\00\00") ;; @@ -454,6 +454,7 @@ block $echostring block $strstart block $strput block $strend block $fetchinc block $setinc block $finddoes block $definedoes block $stacktrace block $webfetch block $outchan block $read block $openchannel block $rpush_op block $fetch8_u + block $negrot get_local $eax br_table $op0 $ret (;2;)$lit $rinit (;4;)$logword $key (;6;)$dup $plus (;8;)$jmp $emit (;10;)$fetch $set (;12;)$execute $noop (;14;)$jz $jnz @@ -463,7 +464,19 @@ (;34;)$subtract $inchan (;36;)$sethere $eqbool (;38;)$echostring $strstart (;40;)$strput $strend (;42;)$fetchinc $setinc (;44;)$finddoes $definedoes (;46;)$stacktrace $webfetch (;48;)$outchan $read (;50;)$awaiting $openchannel - (;52;)$rpush_op $fetch8_u $default + (;52;)$rpush_op $fetch8_u (;54;)$negrot $default + end ;; negrot + call $pop + call $pop + set_local $eax + call $pop + get_local $eax + call $push + set_local $eax + call $push + get_local $eax + call $push + br $next end ;; fetch8_u call $pop i32.load8_u @@ -588,11 +601,9 @@ call $push br $next end ;; setinc - call $pop - call $rpush call $pop tee_local $eax - call $rpop + call $pop i32.store get_local $eax i32.const 4 @@ -975,9 +986,7 @@ br $next end ;; set call $pop - set_local $eax call $pop - get_local $eax i32.store br $next end ;; fetch