diff options
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 |
