aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/lib/chain-stack-test.frt
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/common/lib/chain-stack-test.frt')
-rw-r--r--amforth-6.5/common/lib/chain-stack-test.frt17
1 files changed, 17 insertions, 0 deletions
diff --git a/amforth-6.5/common/lib/chain-stack-test.frt b/amforth-6.5/common/lib/chain-stack-test.frt
new file mode 100644
index 0000000..5a0f250
--- /dev/null
+++ b/amforth-6.5/common/lib/chain-stack-test.frt
@@ -0,0 +1,17 @@
+\ demonstate the chains with a configuration stack
+
+\ first create and allocate a chain storage
+4 chain: kette
+
+\ now populate the chain with some execution
+\ tokens.
+' ver ' cr ' ver 3 chain>id kette set-stack
+
+\ there is no easy way to show the content of
+\ a stack
+
+\ now execute the stack. The TOS element is
+\ called first
+
+kette \ emits the version string twice and a newline between them
+