summaryrefslogtreecommitdiffhomepage
path: root/dev/SCIKit
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-11-09 10:30:58 +0100
committerAmlal El Mahrouss <amlal.elmahrouss@icloud.com>2024-11-09 10:30:58 +0100
commit67716b2871b1117510b26bc1aaf6fce7195272dc (patch)
tree4bbc0a51e0d8cb6234a830baa713377dad3de325 /dev/SCIKit
parenta2013145412c7cf7eb461833f7853d80caa88723 (diff)
META: Important refactors and include SCIKit.dylib when building bootloader.
Diffstat (limited to 'dev/SCIKit')
-rw-r--r--dev/SCIKit/Foundation.h4
-rw-r--r--dev/SCIKit/ReadMe.md5
-rw-r--r--dev/SCIKit/doc/SCIKit.drawio (renamed from dev/SCIKit/SCIKit.drawio)0
-rw-r--r--dev/SCIKit/sci.json (renamed from dev/SCIKit/build.json)2
-rw-r--r--dev/SCIKit/src/DispatchSysCalls.asm4
-rw-r--r--dev/SCIKit/src/Makefile10
-rw-r--r--dev/SCIKit/src/MemoryMgr.cc (renamed from dev/SCIKit/src/Foundation.cc)4
7 files changed, 17 insertions, 12 deletions
diff --git a/dev/SCIKit/Foundation.h b/dev/SCIKit/Foundation.h
index ce61413f..4a283992 100644
--- a/dev/SCIKit/Foundation.h
+++ b/dev/SCIKit/Foundation.h
@@ -39,13 +39,13 @@ IMPORT_C Void LdrCloseDLLHandle(_Input SCIObject* dll_handle);
/// @brief Opens a file from a drive.
/// @param fs_path the filesystem path.
-/// @param drive_letter drive name, use NULL to use default one.
+/// @param drive_letter drive name, use NULL to use default drive location.
/// @return the file descriptor of the file.
IMPORT_C SCIObject IoOpenFile(const Char* fs_path, const Char* drive_letter);
/// @brief Closes a file and flushes its content.
/// @param file_desc the file descriptor.
-/// @return void.
+/// @return Function doesn't return a type.
IMPORT_C Void IoCloseFile(_Input SCIObject file_desc);
/// @brief Write data to a file.
diff --git a/dev/SCIKit/ReadMe.md b/dev/SCIKit/ReadMe.md
deleted file mode 100644
index 26e3c220..00000000
--- a/dev/SCIKit/ReadMe.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# ZKA's SCI.
-
-System Call and Component Interface, used maninly to communicate with Kernel and registered objects.
-
-###### (c) Amlal EL Mahrouss, all rights reserved.
diff --git a/dev/SCIKit/SCIKit.drawio b/dev/SCIKit/doc/SCIKit.drawio
index 9b58cc72..9b58cc72 100644
--- a/dev/SCIKit/SCIKit.drawio
+++ b/dev/SCIKit/doc/SCIKit.drawio
diff --git a/dev/SCIKit/build.json b/dev/SCIKit/sci.json
index 12390d73..eb8bece9 100644
--- a/dev/SCIKit/build.json
+++ b/dev/SCIKit/sci.json
@@ -3,7 +3,7 @@
"compiler_std": "c++20",
"headers_path": ["../"],
"sources_path": ["src/*.cc", "src/*.obj"],
- "output_name": "SCIKit.dll",
+ "output_name": "SCIKit.dylib",
"compiler_flags": [
"-fPIC",
"-ffreestanding",
diff --git a/dev/SCIKit/src/DispatchSysCalls.asm b/dev/SCIKit/src/DispatchSysCalls.asm
index f1668e21..d56f283f 100644
--- a/dev/SCIKit/src/DispatchSysCalls.asm
+++ b/dev/SCIKit/src/DispatchSysCalls.asm
@@ -1,7 +1,7 @@
;; /*
;; * ========================================================
;; *
-;; * ZKA
+;; * SCI
;; * Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved., all rights reserved.
;; *
;; * ========================================================
@@ -9,6 +9,8 @@
[bits 64]
+section .text
+
global sci_syscall_arg_1
global sci_syscall_arg_2
global sci_syscall_arg_3
diff --git a/dev/SCIKit/src/Makefile b/dev/SCIKit/src/Makefile
index 68a6407b..90da7b01 100644
--- a/dev/SCIKit/src/Makefile
+++ b/dev/SCIKit/src/Makefile
@@ -1,3 +1,11 @@
+##################################################
+# (c) Amlal EL Mahrouss, all rights reserved.
+# This is the bootloader makefile.
+##################################################
+
+ASM=nasm
+FLAGS=-f win64
+
.PHONY: syscall_unit
syscall_unit:
- nasm -f win64 DispatchSysCalls.asm -o DispatchSysCalls.obj
+ $(ASM) $(FLAGS) DispatchSysCalls.asm -o DispatchSysCalls.obj
diff --git a/dev/SCIKit/src/Foundation.cc b/dev/SCIKit/src/MemoryMgr.cc
index e280aab8..bf8e1142 100644
--- a/dev/SCIKit/src/Foundation.cc
+++ b/dev/SCIKit/src/MemoryMgr.cc
@@ -6,8 +6,8 @@
#include <SCIKit/Foundation.h>
-/// @file Foundation.cc
-/// @brief Foundation source file for SCI Kit.
+/// @file MemoryMgr.cc
+/// @brief Source file for the memory functions.
/// @brief Copy memory region.
IMPORT_C VoidPtr MmCopyMemory(_Input VoidPtr dest, _Input VoidPtr src, _Input SizeT len)