aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ia32/macro.sts22
-rw-r--r--main.sts10
2 files changed, 30 insertions, 2 deletions
diff --git a/ia32/macro.sts b/ia32/macro.sts
index efd062e..3842a5c 100644
--- a/ia32/macro.sts
+++ b/ia32/macro.sts
@@ -48,3 +48,25 @@
[ fi 0
?$ ?swap ?!
]
+
+[ else 0
+ branch ?$ # 0 ?.
+ ?swap ?$ ?swap ?!
+]
+
+[ do 0
+ ?$
+]
+
+[ untilod 0
+ 0branch ?.
+]
+
+[ until 0
+ 0 = 0branch ?$ # 0 ?.
+]
+
+[ od 0
+ branch ?swap ?.
+ ?$ ?swap ?!
+]
diff --git a/main.sts b/main.sts
index 9bd7a63..18964bb 100644
--- a/main.sts
+++ b/main.sts
@@ -1,8 +1,14 @@
module ia32/elf/begin.sts
set_entry
- 30 31 32
- 33 0 set 34 1 set 35 2 set
+
+ do
+ 34 sys_write
+ sys_read
+ 0 = until
+ sys_write
+ od
+ drop
sys_exit
module ia32/elf/end.sts