aboutsummaryrefslogtreecommitdiff
path: root/print_123.s
blob: b87309bae16c270de6377a62b0cdf1af1f7dd4a9 (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

.include "include/uskel.s"

.include "include/data.s"
.include "include/io.s"
.include "include/intops.s"

# || -> cont
.thunkcode main
	# push a new integer
	thunkto %r11, $INT_code, $100

	# push another new integer
	thunkto %r12, $INT_code, $23

	# push the plus
	thunkto %r11, $plus, $2, %r11, %r12

	# push the print
	thunkto %r11, $print, $1, %r11

	# push a cont thunk for main_exit and set continuation for main_exit
	thunkto %rsi, $main_exit, $1, %rsi

	# evaluate into main_exit
	enter %r11

.include "include/main_exit.s"