diff options
| author | 2025-08-25 16:53:34 +0330 | |
|---|---|---|
| committer | 2025-08-25 16:53:34 +0330 | |
| commit | 8f73e9736317bd5d7951757357075504ea402d27 (patch) | |
| tree | b89acf08a72ab2d0195d033ce600134c78de663e /pu2/code/main.i2 | |
| parent | fixed stack overflow bug (diff) | |
cool stuff, right? multi-process support with permission levels
Diffstat (limited to 'pu2/code/main.i2')
| -rw-r--r-- | pu2/code/main.i2 | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/pu2/code/main.i2 b/pu2/code/main.i2 new file mode 100644 index 0000000..8cc5615 --- /dev/null +++ b/pu2/code/main.i2 @@ -0,0 +1,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); + |
