blob: 8cc5615bc1dd8c47b9271f233a2704a2f2a69f35 (
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
|
/*
testing grounds for the ir2 assembler
i still don't know whether it's a compiler, an IR emitter, or an assembler
hmmm...
*/
import lib.i2;
let initial = 5;
let count = initial;
while (count) {
count--;
print(["hello "]);
// basically equivalent to putchar(initial - count + '0' - 1)
let index = initial;
index -= count;
index += 47; // '0' - 1
putchar([index]);
putchar([10]);
}
exit(0);
|