blob: b173469f683874958098aff88cc1d60ffd0b8b8c (
plain) (
blame)
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
|
/*
testing grounds for the ir2 assembler
i still don't know whether it's a compiler, an IR emitter, or an assembler
hmmm...
*/
macro puts(2) {
@1 = 0; // write
@2 = /1/; // ptr
@3 = /2/; // size
system();
}
macro putchar(1) {
@1 = 0; // write
@2 = 10; // ptr
@3 = 1; // size
@10 = /1/; // value
system();
}
let count = 5;
while (count) {
count--;
puts(["hello"], [5]);
putchar([10]);
}
exit(0);
|