diff options
Diffstat (limited to 'forth/step0_repl.fs')
| -rw-r--r-- | forth/step0_repl.fs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/forth/step0_repl.fs b/forth/step0_repl.fs new file mode 100644 index 0000000..42c33f5 --- /dev/null +++ b/forth/step0_repl.fs @@ -0,0 +1,23 @@ +s" types.fs" included + +: read ; +: eval ; +: print ; + +: rep + read + eval + print ; + +create buff 128 allot + +: read-lines + begin + ." user> " + buff 128 stdin read-line throw + while + buff swap + rep type cr + repeat ; + +read-lines
\ No newline at end of file |
