diff options
Diffstat (limited to 'examples/call.hdass')
| -rw-r--r-- | examples/call.hdass | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/call.hdass b/examples/call.hdass new file mode 100644 index 0000000..239a26b --- /dev/null +++ b/examples/call.hdass @@ -0,0 +1,13 @@ +// Passes an argument through a proc parameter, which exits with that value. +const SYS_EXIT = 60 + +proc exit_with(code: rdi) +{ + rax = SYS_EXIT + syscall +} + +proc main +{ + exit_with(21) +} |
