aboutsummaryrefslogtreecommitdiff
path: root/examples/exit_code.hdass
diff options
context:
space:
mode:
Diffstat (limited to 'examples/exit_code.hdass')
-rw-r--r--examples/exit_code.hdass9
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/exit_code.hdass b/examples/exit_code.hdass
new file mode 100644
index 0000000..7c44df9
--- /dev/null
+++ b/examples/exit_code.hdass
@@ -0,0 +1,9 @@
+// Exits with status 42 and no output.
+const SYS_EXIT = 60
+
+proc main
+{
+ rax = SYS_EXIT
+ rdi = 42
+ syscall
+}