-
Notifications
You must be signed in to change notification settings - Fork 1
/
snippets.txt
102 lines (83 loc) · 1.15 KB
/
snippets.txt
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
cat
[LF][Space][Space][Space][LF]
[Space][Space][Space][Tab][LF]
[Tab][LF][Tab][Space]
[Space][Space][Space][Tab][LF]
[Tab][Tab][Tab]
[Tab][LF][Space][Space]
[Space][Space][Space][Tab][LF]
[Tab][Tab][Tab]
[LF][Tab][Space][Tab][LF]
[LF][Space][LF][Space][LF]
[LF][Space][Space][Tab][LF]
[LF][LF][LF]
cat
label loop
push 0
readc
retrieve 0
dup
outc
jumpnp loop
truth-machine
[Space][Space][Space][LF]
[Space][LF][Space]
[Tab][LF][Tab][Tab]
[Tab][Tab][Tab]
[LF][Tab][Space][Space][LF]
[LF][Space][Space][Tab][LF]
[Space][Space][Space][Tab][LF]
[Tab][LF][Space][Tab]
[LF][Space][LF][Tab][LF]
[LF][Space][Space][Space][LF]
[Space][Space][Space][LF]
[Tab][LF][Space][Tab]
[LF][LF][LF]
; hello world
include memory
include io
push 100
call malloc
dup
storestr hello world!
dup
call printsln
pop
; hello world in 2 stages
include memory
include io
push 6
call malloc
dup
storestr hello
push 7
call malloc
dup
storestr world!
swap
call print_two
call mfree
pop
push 4
call malloc
dup
storestr hey
call print_two
call mfree
pop
push 8
call malloc
dup
storestr welcome
call print_two
exit
label print_two
dup
call prints
push ' '
outc
swap
dup
call printsln
swap
ret