aboutsummaryrefslogtreecommitdiff
path: root/ia32/macro.sts
blob: befcccb49e3708960fde23f24ed11b10e2e5d083 (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
[ 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 ?!
]