From d98f46ce647846b0aa30b2e16a30fd4e152a1bf5 Mon Sep 17 00:00:00 2001 From: Carlos Maiolino Date: Thu, 10 Jul 2025 22:55:07 +0200 Subject: Add new code Signed-off-by: Carlos Maiolino --- PGU/CHAP3/exit.s | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 PGU/CHAP3/exit.s (limited to 'PGU/CHAP3/exit.s') diff --git a/PGU/CHAP3/exit.s b/PGU/CHAP3/exit.s new file mode 100644 index 0000000..df2addb --- /dev/null +++ b/PGU/CHAP3/exit.s @@ -0,0 +1,23 @@ +# Program does not but exit() call with a status code +# returned to kernel + +# No inputs or outputs + +# Variables +# +# %rax - holds syscall number +# %rdi - holds return status + +.section .data +#No data + +.section .text +.globl _start + +_start: +movq $60, %rax # %rax used to hold syscall numbers + # 60 is exit() syscall + +movq $245, %rdi # Exit status (BYTE MAX) + +syscall -- cgit v1.2.3