diff options
Diffstat (limited to 'dev/SCIKit')
| -rw-r--r-- | dev/SCIKit/LPC.h | 3 | ||||
| -rw-r--r-- | dev/SCIKit/build.json | 2 | ||||
| -rw-r--r-- | dev/SCIKit/src/Syscall.asm | 48 |
3 files changed, 52 insertions, 1 deletions
diff --git a/dev/SCIKit/LPC.h b/dev/SCIKit/LPC.h index e602156d..832deb99 100644 --- a/dev/SCIKit/LPC.h +++ b/dev/SCIKit/LPC.h @@ -6,6 +6,9 @@ #pragma once +/// @file LPC.h +/// @brief Local Process Codes. +/// #define ErrLocalIsOk() (kLastError == kErrorSuccess) #define ErrLocalFailed() (kLastError != kErrorSuccess) #define ErrLocal() (kLastError) diff --git a/dev/SCIKit/build.json b/dev/SCIKit/build.json index 104be044..8f2af775 100644 --- a/dev/SCIKit/build.json +++ b/dev/SCIKit/build.json @@ -2,7 +2,7 @@ "compiler_path": "x86_64-w64-mingw32-g++", "compiler_std": "c++20", "headers_path": ["../"], - "sources_path": ["src/*.cc"], + "sources_path": ["src/*.cc", "src/*.obj"], "output_name": "sci.dll", "compiler_flags": [ "-fPIC", diff --git a/dev/SCIKit/src/Syscall.asm b/dev/SCIKit/src/Syscall.asm new file mode 100644 index 00000000..d1928191 --- /dev/null +++ b/dev/SCIKit/src/Syscall.asm @@ -0,0 +1,48 @@ +;; /* +;; * ======================================================== +;; * +;; * ZKA +;; * Copyright EL Mahrouss Logic., all rights reserved. +;; * +;; * ======================================================== +;; */ + +[bits 64] + +global sci_syscall_1 +global sci_syscall_2 +global sci_syscall_3 +global sci_syscall_4 + +sci_syscall_1: + mov r8, rcx + syscall + ret + +sci_syscall_2: + mov r8, rcx + mov r9, rdx + syscall + ret + +sci_syscall_3: + mov rbx, r8 + + mov r8, rcx + mov r9, rdx + mov r10, rbx + + syscall + ret + +sci_syscall_4: + mov rbx, r8 + mov rax, r9 + + mov r8, rcx + mov r9, rdx + mov r10, rbx + mov r11, rax + + syscall + ret |
