From 405c4f104975e5456ce6b28ad31fd996d3f4b657 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Fri, 16 Oct 2020 12:45:33 +0300 Subject: Initial --- ia32/macro.sts | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 ia32/macro.sts (limited to 'ia32/macro.sts') 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 ?! +] -- cgit v1.2.3