summaryrefslogtreecommitdiffhomepage
path: root/dev/user/src/SystemCalls+IO.asm
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-23 15:57:42 +0200
committerAmlal El Mahrouss <amlal@nekernel.org>2025-05-23 16:00:35 +0200
commite2bd3c7b6fcd6147fcbf699be087a475608ffdf7 (patch)
tree962ce7dd6efeda9dc6b96b9d0e47dfcc241f1c11 /dev/user/src/SystemCalls+IO.asm
parent80f5f9dfdaaf68d9e63a7bc3ba1187ca447eadc9 (diff)
feat(krnl, libSystem, boot): Make space for LibSystem inside Handover
boot structure. what: - Mostly related to the libSystem.sys library. - Updated the implementation of it, the specs, and added new APIs. - Fixed the hooks inside AsmProc.h Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/user/src/SystemCalls+IO.asm')
-rw-r--r--dev/user/src/SystemCalls+IO.asm21
1 files changed, 21 insertions, 0 deletions
diff --git a/dev/user/src/SystemCalls+IO.asm b/dev/user/src/SystemCalls+IO.asm
index 77e22b59..9126b7de 100644
--- a/dev/user/src/SystemCalls+IO.asm
+++ b/dev/user/src/SystemCalls+IO.asm
@@ -19,17 +19,31 @@ global sci_syscall_arg_3
global sci_syscall_arg_4
sci_syscall_arg_1:
+ push rbp
+ mov rbp, rsp
+
mov r8, rcx
syscall
+
+ pop rbp
+
ret
sci_syscall_arg_2:
+ push rbp
+ mov rbp, rsp
+
mov r8, rcx
mov r9, rdx
syscall
+ pop rbp
+
ret
sci_syscall_arg_3:
+ push rbp
+ mov rbp, rsp
+
mov rbx, r8
mov r8, rcx
@@ -37,9 +51,14 @@ sci_syscall_arg_3:
mov r10, rbx
syscall
+ pop rbp
+
ret
sci_syscall_arg_4:
+ push rbp
+ mov rbp, rsp
+
mov rbx, r8
mov rax, r9
@@ -49,4 +68,6 @@ sci_syscall_arg_4:
mov r11, rax
syscall
+ pop rbp
+
ret