aboutsummaryrefslogtreecommitdiff
path: root/include/main_exit.s
diff options
context:
space:
mode:
authorMirek Kratochvil <exa.exa@gmail.com>2023-08-06 00:25:53 +0200
committerMirek Kratochvil <exa.exa@gmail.com>2023-08-06 00:25:53 +0200
commit74cad993376dc269e8389fbf150be9ecc36890c7 (patch)
tree32a2dbb382836ee0f1853fe5e63036d044fea77d /include/main_exit.s
parent46d84e91ebe48ade19bd3f5e18360bf853b53968 (diff)
downloaduskel-74cad993376dc269e8389fbf150be9ecc36890c7.tar.gz
uskel-74cad993376dc269e8389fbf150be9ecc36890c7.tar.bz2
fibs work
Diffstat (limited to 'include/main_exit.s')
-rw-r--r--include/main_exit.s10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/main_exit.s b/include/main_exit.s
new file mode 100644
index 0000000..a38c5e5
--- /dev/null
+++ b/include/main_exit.s
@@ -0,0 +1,10 @@
+.ifndef _main_exit_s_file
+_main_exit_s_file:
+
+# exitcode -> | cont (unused, should be 0) |
+.thunkcode main_exit
+ mov 0x8(%rsi), %rdi # result to syscall exitcode
+ mov $0x3c, %rax # syscall 60
+ syscall # exit %rdi
+
+.endif # _main_exit_s_file