summaryrefslogtreecommitdiff
path: root/tnslc/main.tnsl
blob: cf2e8ac8b6d243af90290e6e120a25c4fb44e0ff (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
:import "c_wrap_linux.tnsl"
:import "vector.tnsl"

/; push_char(Vector` a, uint8 c)
	a.push(~c)
;/

/; main [int]
	Vector a
	a.init(1)
	
	push_char(~a, 'h')
	push_char(~a, 'e')
	push_char(~a, 'l')
	push_char(~a, 'l')
	push_char(~a, 'o')
	push_char(~a, ' ')
	push_char(~a, 'w')
	push_char(~a, 'o')
	push_char(~a, 'r')
	push_char(~a, 'l')
	push_char(~a, 'd')
	push_char(~a, '\n')
	push_char(~a, 0)
	_printf(a.data)

	a.end()
	return 0
;/