(Mostly) Forth-2012 Core Interpreter (no standard system, some quirks are here because of the nature of JS and because I chose to implement double-cell integers as BigInts) providing the .(, 0<>, 0>, 2>r, 2r>, 2r@, <>, false, hex, true, u> and \ words from the Core Extensions word set as well as the words from the Programming-Tools word set. Own words: not ( flag -- flag ) (shortcut for 0=), push-input ( c-addr u -- ) (push string into input queue where key and accept is read from), push-input" ( "ccc<quote>" -- ) (equivalent to : tmp s" ccc" push-input ; tmp), limit-input ( -- ) (add CR (the newline) to input, marking an end for accept), reset (self-explanatory).
.(
0<>
0>
2>r
2r>
2r@
<>
false
hex
true
u>
\
not ( flag -- flag )
push-input ( c-addr u -- )
key
accept
push-input" ( "ccc<quote>" -- )
: tmp s" ccc" push-input ; tmp
limit-input ( -- )
CR
reset
Copyright (C) 2026 Samuel Fiedler. Licensed under the MIT License. Repository on Codeberg