From ccc7d9d199c56473997b40f49c6bfc79d9799fd2 Mon Sep 17 00:00:00 2001 From: Chouser Date: Thu, 5 Feb 2015 18:47:32 -0500 Subject: forth: Add step 0 --- forth/step0_repl.fs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 forth/step0_repl.fs (limited to 'forth/step0_repl.fs') 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 -- cgit v1.2.3 From 59038a10f0e3ad65675cafdb149eb61405e334d3 Mon Sep 17 00:00:00 2001 From: Chouser Date: Fri, 6 Feb 2015 00:38:34 -0500 Subject: forth: Added lists, ints, symbols for step 1 --- forth/step0_repl.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'forth/step0_repl.fs') diff --git a/forth/step0_repl.fs b/forth/step0_repl.fs index 42c33f5..2483c12 100644 --- a/forth/step0_repl.fs +++ b/forth/step0_repl.fs @@ -1,4 +1,4 @@ -s" types.fs" included +require types.fs : read ; : eval ; -- cgit v1.2.3