aboutsummaryrefslogtreecommitdiff
path: root/ia32/macro.sts
diff options
context:
space:
mode:
Diffstat (limited to 'ia32/macro.sts')
-rw-r--r--ia32/macro.sts50
1 files changed, 50 insertions, 0 deletions
diff --git a/ia32/macro.sts b/ia32/macro.sts
new file mode 100644
index 0000000..befcccb
--- /dev/null
+++ b/ia32/macro.sts
@@ -0,0 +1,50 @@
+[ next 0
+ # ad ?' # ff ?' # 20 ?'
+]
+
+[ defasm 1
+ [ %1% 0
+ _%0% ?.
+ \]
+ ?$ ?? _%1%
+ ?$ # 4 ?+ ?.
+]
+
+[ defword 1
+ [ %1% 0
+ _%0% ?.
+ \]
+ ?$ ?? _%1%
+ _docol # 4 ?+ ?.
+]
+
+[ defarr 2
+ _data_segment ?choose
+ ?$ ?? _%1%_arr
+ # %2% # 4 ?* ?res
+ _code_segment ?choose
+ defasm %1%
+ ; push _%1%_arr
+ # 68 ?' _%1%_arr ?.
+ next
+]
+
+[ defvar 1
+ defarr %1% 1
+]
+
+[ literal 0
+ lit # %1% ?.
+]
+
+[ set_entry 0
+ ?$ _threaded_code_entry ?!
+]
+
+[ if 0
+ 0branch ?$ # 0 ?.
+]
+
+[ fi 0
+ ?$ ?swap ?!
+]