summaryrefslogtreecommitdiffhomepage
path: root/dev/libSystem
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-06-15 16:03:38 +0200
committerGitHub <noreply@github.com>2025-06-15 16:03:38 +0200
commiteb9df5eea339812513c25a8d3b2eeb03c633e7ac (patch)
treeefcdaaa25d08daadcd27e0597a0fb20defc49a23 /dev/libSystem
parent6511afbf405c31513bc88ab06bca58218610a994 (diff)
parentf7e5542dc13519cc78c204b4062acb0b71296a58 (diff)
Merge pull request #41 from nekernel-org/dev
NeKernel v0.0.3e1
Diffstat (limited to 'dev/libSystem')
-rw-r--r--dev/libSystem/SystemKit/System.h10
-rw-r--r--dev/libSystem/libSystem.json2
-rw-r--r--dev/libSystem/src/Makefile2
-rw-r--r--dev/libSystem/src/SystemAPI.cc (renamed from dev/libSystem/src/SystemImpl.cc)0
4 files changed, 9 insertions, 5 deletions
diff --git a/dev/libSystem/SystemKit/System.h b/dev/libSystem/SystemKit/System.h
index 91899efe..421868ae 100644
--- a/dev/libSystem/SystemKit/System.h
+++ b/dev/libSystem/SystemKit/System.h
@@ -309,16 +309,20 @@ IMPORT_C SInt32 PwrSendCode(_Output SInt32& code);
// CD-ROM API.
// ------------------------------------------------------------------------------------------ //
-IMPORT_C SInt32 CdEjectDrive(_Input Char drv_letter);
+#define kCDDevicePath "/devices/dvd{}"
-IMPORT_C SInt32 CdOpenTray(Void);
+IMPORT_C IORef CdOpenTray(Void);
+
+IMPORT_C SInt32 CdEjectDrive(_Input IORef cdrom);
IMPORT_C SInt32 CdCloseTray(Void);
// ------------------------------------------------------------------------------------------ //
-// Printer API.
+// TTY API.
// ------------------------------------------------------------------------------------------ //
+#define kPrintDevicePath "/devices/tty{}"
+
IMPORT_C SInt32 PrintOut(IORef file /* nullptr to direct to stdout */, const Char* fmt, ...);
IMPORT_C SInt32 PrintIn(IORef file /* nullptr to direct to stdout */, const Char* fmt, ...);
diff --git a/dev/libSystem/libSystem.json b/dev/libSystem/libSystem.json
index fdcd2a56..9df1b8f0 100644
--- a/dev/libSystem/libSystem.json
+++ b/dev/libSystem/libSystem.json
@@ -3,7 +3,7 @@
"compiler_std": "c++20",
"headers_path": ["../", "./"],
"sources_path": ["src/*.cc", "src/*.stub.obj"],
- "output_name": "libSystem.sys",
+ "output_name": "libSystem.dll",
"compiler_flags": [
"-ffreestanding",
"-shared",
diff --git a/dev/libSystem/src/Makefile b/dev/libSystem/src/Makefile
index 39af446b..64ef02cc 100644
--- a/dev/libSystem/src/Makefile
+++ b/dev/libSystem/src/Makefile
@@ -1,6 +1,6 @@
##################################################
# (c) Amlal El Mahrouss, all rights reserved.
-# This file is for libSystem.sys's syscall stubs.
+# This file is for libSystem.dll's syscall stubs.
##################################################
ASM=nasm
diff --git a/dev/libSystem/src/SystemImpl.cc b/dev/libSystem/src/SystemAPI.cc
index d0682830..d0682830 100644
--- a/dev/libSystem/src/SystemImpl.cc
+++ b/dev/libSystem/src/SystemAPI.cc