aboutsummaryrefslogtreecommitdiff
path: root/ia32/macro.sts
blob: 3842a5c83708920e0e3ac804d83c2fe75bf677b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
[ 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 ?!
]

[ else 0
    branch ?$ # 0 ?.
    ?swap ?$ ?swap ?!
]

[ do 0
    ?$
]

[ untilod 0
    0branch ?.
]

[ until 0
    0 = 0branch ?$ # 0 ?.
]

[ od 0
    branch ?swap ?.
    ?$ ?swap ?!
]