From 74cad993376dc269e8389fbf150be9ecc36890c7 Mon Sep 17 00:00:00 2001 From: Mirek Kratochvil Date: Sun, 6 Aug 2023 00:25:53 +0200 Subject: fibs work --- include/main_exit.s | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 include/main_exit.s (limited to 'include/main_exit.s') 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 -- cgit v1.2.3