From 53aed3fadf1f7ad66dea9a8a0b46bf42eda921be Mon Sep 17 00:00:00 2001 From: hachem Date: Mon, 31 Aug 2026 16:56:40 +0200 Subject: feat: add memory loads via ^reg --- examples/load.hdass | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 examples/load.hdass (limited to 'examples/load.hdass') diff --git a/examples/load.hdass b/examples/load.hdass new file mode 100644 index 0000000..6e68ffc --- /dev/null +++ b/examples/load.hdass @@ -0,0 +1,17 @@ +[entry: main] + +// Stores 7 into a stack cell, loads it back through a pointer, and exits with it. +const SYS_EXIT = 60 + +proc main +{ + stack cell[8] + + rbx = 7 + rsi = cell // address of the cell + ^rsi = rbx // store + rdi = ^rsi // load it back + + rax = SYS_EXIT + syscall +} -- cgit v1.3