diff options
| Commit | c1c2a973906812ff31faf534c4bc384e895cadfe (patch) | |
|---|---|---|
| Author | 2025-03-20 17:08:15 +0200 | |
| Committer | 2025-03-20 17:08:15 +0200 | |
| Files | 54671148b989324071465ba2f3b4f1645fe294e0 /examples/example2.s | |
| tonkobali-main.tar tonkobali-main.tar.gz tonkobali-main.zip | ||
| Parent | bb8c3f02d7c3c318e67575167886de1da123b95a (diff) | |
1 files changed, 13 insertions, 0 deletions
| -rw-r--r-- | examples/example2.s | 13 |
diff --git a/examples/example2.s b/examples/example2.s new file mode 100644 index 0000000..b0213b5 --- /dev/null +++ b/examples/example2.s @@ -0,0 +1,13 @@ +; Variables allow "aliases" for arguments + +first = %1 +subleq first, %2, last +last = %3 + +; Higher-order instructions can also take in numeric constants +; Constants are automatically stored at the start of memory, +; and all references are replaced with that address + +num = 50 +add 60, num ; num += 60 +add num, 70 ; address_of(70) += num |
