summaryrefslogtreecommitdiffhomepage
path: root/dev/libSystem/src/SystemProc.asm
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-06-03 09:31:01 +0200
committerGitHub <noreply@github.com>2025-06-03 09:31:01 +0200
commit6511afbf405c31513bc88ab06bca58218610a994 (patch)
treee2509b7f9b59643b2a97773604aa383a2fd2e2f3 /dev/libSystem/src/SystemProc.asm
parent5c0bb7ee7b1b0fee02cc179fb21f4c57a61d6c2d (diff)
parentbebcbe04c2b47b3b4fcdc093b1736cc0295109fe (diff)
Merge pull request #36 from nekernel-org/dev
0.0.3 — NeKernel
Diffstat (limited to 'dev/libSystem/src/SystemProc.asm')
-rw-r--r--dev/libSystem/src/SystemProc.asm71
1 files changed, 71 insertions, 0 deletions
diff --git a/dev/libSystem/src/SystemProc.asm b/dev/libSystem/src/SystemProc.asm
new file mode 100644
index 00000000..299b59f9
--- /dev/null
+++ b/dev/libSystem/src/SystemProc.asm
@@ -0,0 +1,71 @@
+;; /*
+;; * ========================================================
+;; *
+;; * libSystem/src/SystemCalls+IO.asm
+;; * Copyright (C) 2024-2025, Amlal El Mahrouss, all rights reserved.
+;; *
+;; * ========================================================
+;; */
+
+[bits 64]
+
+section .text
+
+global libsys_syscall_arg_1
+global libsys_syscall_arg_2
+global libsys_syscall_arg_3
+global libsys_syscall_arg_4
+
+libsys_syscall_arg_1:
+ push rbp
+ mov rbp, rsp
+
+ mov r8, rcx
+
+ int 50
+
+ pop rbp
+
+ ret
+
+libsys_syscall_arg_2:
+ push rbp
+ mov rbp, rsp
+
+ mov r8, rcx
+ mov r9, rdx
+
+ int 50
+
+ pop rbp
+
+ ret
+
+libsys_syscall_arg_3:
+ push rbp
+ mov rbp, rsp
+
+ mov r8, rcx
+ mov r9, rdx
+ mov r10, rbx
+
+ int 50
+
+ pop rbp
+
+ ret
+
+libsys_syscall_arg_4:
+ push rbp
+ mov rbp, rsp
+
+ mov r8, rcx
+ mov r9, rdx
+ mov r10, rbx
+ mov r11, rax
+
+ int 50
+
+ pop rbp
+
+ ret