From c1c2a973906812ff31faf534c4bc384e895cadfe Mon Sep 17 00:00:00 2001 From: Syndamia Date: Thu, 20 Mar 2025 17:08:15 +0200 Subject: feat: Demo video and accompanying example assembly --- examples/example2.s | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 examples/example2.s (limited to 'examples/example2.s') 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 -- cgit v1.3.1-26-gb76a