summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlal@softwarelabs.com>2024-06-15 11:07:19 +0200
committerAmlal EL Mahrouss <amlal@softwarelabs.com>2024-06-15 11:07:19 +0200
commit999877265276c8a5ae78eb01c92d1d9928a13576 (patch)
tree1f80bea80726dfc3fe12d14809160619dcc40174
parent1efed3cbec879134d55aee8e13c6bbc6da9b6ef6 (diff)
MHR-31: ARM Support: Removing API from repository.
Signed-off-by: Amlal EL Mahrouss <amlal@softwarelabs.com>
-rw-r--r--Meta/Zeta.pdfbin35543 -> 28882 bytes
-rw-r--r--Usr/Sys/CoreCxxRuntime/Sources/New+Delete.cxx6
-rw-r--r--Usr/Sys/CoreSystem/.gitkeep0
-rw-r--r--Usr/Sys/CoreSystem/AMD64/CoreAssembly.s28
-rw-r--r--Usr/Sys/CoreSystem/ARM64/.gitkeep0
-rw-r--r--Usr/Sys/CoreSystem/Headers/Alert.h25
-rw-r--r--Usr/Sys/CoreSystem/Headers/Defines.h240
-rw-r--r--Usr/Sys/CoreSystem/Headers/File.h57
-rw-r--r--Usr/Sys/CoreSystem/Headers/Heap.h39
-rw-r--r--Usr/Sys/CoreSystem/Headers/Hint.h20
-rw-r--r--Usr/Sys/CoreSystem/Headers/Intl.h29
-rw-r--r--Usr/Sys/CoreSystem/Headers/Math.h27
-rw-r--r--Usr/Sys/CoreSystem/Headers/Rsrc.h12
-rw-r--r--Usr/Sys/CoreSystem/Headers/Thread.h47
-rw-r--r--Usr/Sys/CoreSystem/Headers/Transport.h48
-rw-r--r--Usr/Sys/CoreSystem/POWER/CoreAssembly.s23
-rw-r--r--Usr/Sys/CoreSystem/Private.xml4
-rw-r--r--Usr/Sys/CoreSystem/RISCV/.gitkeep0
-rw-r--r--Usr/Sys/CoreSystem/ReadMe.md13
-rw-r--r--Usr/Sys/CoreSystem/Sources/App.c31
-rw-r--r--Usr/Sys/CoreSystem/Sources/CRTStartup.c12
-rw-r--r--Usr/Sys/CoreSystem/Sources/File.c69
-rw-r--r--Usr/Sys/CoreSystem/Sources/Heap.c54
-rw-r--r--Usr/Sys/CoreSystem/Sources/Math.c14
-rw-r--r--Usr/Sys/CoreSystem/Sources/Thread.c9
-rw-r--r--Usr/Sys/CoreSystem/amd64.mk22
-rw-r--r--Usr/Sys/CoreSystem/compile_flags.txt4
27 files changed, 3 insertions, 830 deletions
diff --git a/Meta/Zeta.pdf b/Meta/Zeta.pdf
index 238f6f78..339651d5 100644
--- a/Meta/Zeta.pdf
+++ b/Meta/Zeta.pdf
Binary files differ
diff --git a/Usr/Sys/CoreCxxRuntime/Sources/New+Delete.cxx b/Usr/Sys/CoreCxxRuntime/Sources/New+Delete.cxx
index cd864c70..8941274a 100644
--- a/Usr/Sys/CoreCxxRuntime/Sources/New+Delete.cxx
+++ b/Usr/Sys/CoreCxxRuntime/Sources/New+Delete.cxx
@@ -13,7 +13,7 @@ void* operator new[](size_t sz)
if (sz == 0)
++sz;
- return RtHeapAllocate(sz, kStandardAllocation);
+ return CSAllocateHeap(sz, kStandardAllocation);
}
void* operator new(size_t sz)
@@ -21,7 +21,7 @@ void* operator new(size_t sz)
if (sz == 0)
++sz;
- return RtHeapAllocate(sz, kArrayAllocation);
+ return CSAllocateHeap(sz, kArrayAllocation);
}
void operator delete[](void* ptr)
@@ -29,5 +29,5 @@ void operator delete[](void* ptr)
if (ptr == nullptr)
return;
- RtHeapFree(ptr);
+ CSFreeHeap(ptr);
} \ No newline at end of file
diff --git a/Usr/Sys/CoreSystem/.gitkeep b/Usr/Sys/CoreSystem/.gitkeep
deleted file mode 100644
index e69de29b..00000000
--- a/Usr/Sys/CoreSystem/.gitkeep
+++ /dev/null
diff --git a/Usr/Sys/CoreSystem/AMD64/CoreAssembly.s b/Usr/Sys/CoreSystem/AMD64/CoreAssembly.s
deleted file mode 100644
index a2cf12f1..00000000
--- a/Usr/Sys/CoreSystem/AMD64/CoreAssembly.s
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
- Purpose: AMD64 low level I/O
-
-------------------------------------------- */
-
-.text
-
-.globl RtGetAppPointer
-.globl RtAssertTriggerInterrupt
-
-/* @brief Application getter */
-/* @throws: ApptError: appartement error. */
-RtGetAppPointer:
- mov $0x10, %rcx /* sysGetProcessObject */
- int $0x32
-
- /* rax gets saved and returned. */
- ret
-
-RtAssertTriggerInterrupt:
- mov $0x11, %rcx /* sysTerminateCurrentProcess */
- int $0x32
-
- ret
-
diff --git a/Usr/Sys/CoreSystem/ARM64/.gitkeep b/Usr/Sys/CoreSystem/ARM64/.gitkeep
deleted file mode 100644
index e69de29b..00000000
--- a/Usr/Sys/CoreSystem/ARM64/.gitkeep
+++ /dev/null
diff --git a/Usr/Sys/CoreSystem/Headers/Alert.h b/Usr/Sys/CoreSystem/Headers/Alert.h
deleted file mode 100644
index 3b2922d2..00000000
--- a/Usr/Sys/CoreSystem/Headers/Alert.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-/*************************************************************
- *
- * File: Alert.h
- * Purpose: New OS alert dialog.
- * Date: 3/26/24
- *
- * Copyright Zeta Electronics Corporation, all rights reserved.
- *
- *************************************************************/
-
-#pragma once
-
-#include <Headers/Defines.h>
-
-/// @brief Shows an alert box, as provided by the OS.
-/// @param fmt The alert formating.
-/// @param
-/// @return
-CS_EXTERN_C VoidType UiAlert(const CharacterTypeUTF8* fmt, ...);
diff --git a/Usr/Sys/CoreSystem/Headers/Defines.h b/Usr/Sys/CoreSystem/Headers/Defines.h
deleted file mode 100644
index f659fa76..00000000
--- a/Usr/Sys/CoreSystem/Headers/Defines.h
+++ /dev/null
@@ -1,240 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#pragma once
-
-#ifdef CS_MUST_PASS
-#undef CS_MUST_PASS
-#endif
-
-#ifdef _DEBUG
-#define CS_MUST_PASS(e) \
- { \
- if (!e) \
- { \
- UiAlert("Assertion failed.\nExpression :%s\nFile: %s\nLine: %i", #e, __FILE__, __LINE__) RtAssertTriggerInterrupt() \
- } \
- }
-#else
-#define CS_MUST_PASS(e) CS_UNREFERENCED_PARAMETER(e)
-#endif
-
-#ifdef __cplusplus
-
-#define CS_EXTERN_C extern "C"
-
-#else
-
-#define CS_EXTERN_C extern
-
-#endif
-
-#include <Headers/Alert.h>
-
-struct ApplicationInterface;
-struct GUID;
-
-CS_EXTERN_C void RtAssertTriggerInterrupt(void);
-
-#define CS_STDCALL __attribute__((stdcall))
-#define CS_CDECL __attribute__((cdecl))
-#define CS_MSCALL __attribute__((ms_abi))
-
-#define PACKED __attribute__((packed))
-
-#define CS_PASCAL CS_STDCALL
-
-#include <Headers/Hint.h>
-
-typedef __UINT8_TYPE__ ByteType;
-typedef __UINT16_TYPE__ WordType;
-typedef __UINT32_TYPE__ DWordType;
-typedef __UINT64_TYPE__ QWordType;
-typedef __SIZE_TYPE__ SizeType;
-
-typedef char CharacterTypeUTF8;
-typedef CharacterTypeUTF8* PtrCharacterType;
-
-typedef void* PtrVoidType;
-typedef void VoidType;
-
-#ifdef __SINGLE_PRECISION__
-typedef float FloatType;
-typedef float PositionType;
-#else
-typedef double FloatType;
-typedef double PositionType;
-#endif
-
-typedef __UINTPTR_TYPE__ UIntPtrType;
-typedef __INTPTR_TYPE__ IntPtrType;
-typedef __UINT64_TYPE__ UInt64Type;
-typedef __INT64_TYPE__ Int64Type;
-typedef __UINT32_TYPE__ UInt32Type;
-typedef __INT32_TYPE__ Int32Type;
-
-typedef CharacterTypeUTF8 BooleanType;
-
-#define Yes 1
-#define No 0
-
-#define CS_PTR *
-
-#define CS_UNREFERENCED_PARAMETER(e) ((VoidType)(e))
-
-#ifdef __x86_64__
-
-#define CS_FAR __far
-#define CS_NEAR __near
-
-#define _M_AMD64 2
-#else
-
-#define CS_FAR
-#define CS_NEAR
-
-#endif
-
-#ifdef __aarch64__
-#define _M_AARCH64 3
-#endif
-
-#ifdef __powerpc64__
-#define _M_PPC64 4
-#endif
-
-#ifdef __64x0__
-#define _M_64000 5
-#endif
-
-#ifdef __riscv__
-#define _M_RISCV 6
-#endif
-
-#define CS_STATIC static
-#define CS_INLINE inline
-#define CS_CONST const
-
-#ifdef __cplusplus
-#define CS_CONSTEXPR constexpr
-#else
-#define CS_CONSTEXPR
-#endif // __cplusplus
-
-enum
-{
- kCallAllocPtr = 1,
- kCallFreePtr,
- kCallSizePtr,
- kCallCheckPtr,
- kCallAllocStack,
- /// @brief Open a specific handle
- /// (can be used as sel to call methods related to it.)
- kCallOpenFile,
- kCallCloseFile,
- kCallOpenDir,
- kCallCloseDir,
- kCallOpenDevice,
- kCallCloseDevice,
- kCallCreateWindow,
- kCallCloseWindow,
- kCallCreateMenu,
- kCallCloseMenu,
- kCallRandomNumberGenerator,
- kCallGetArgsCount,
- kCallGetArgsPtr,
- kCallFileExists,
- kCallDirectoryExists,
- kCallSymlinkExists,
- kCallDeviceExists,
- kCallDriveExists,
- /// @brief Number of process calls.
- kCallCount,
-};
-
-/**
- * @brief GUID type, something you can also find in CFKit.
- * @author Amlal El Mahrouss
- */
-typedef struct GUID
-{
- DWordType Data1;
- WordType Data2;
- WordType Data3;
- ByteType Data4[8];
-} GUIDType, *PtrGUIDType;
-
-/// \brief Application Interface.
-/// \author Amlal El Mahrouss
-typedef struct ApplicationInterface
-{
- VoidType (*Release)(struct ApplicationInterface* Self, DWordType ExitCode);
- IntPtrType (*Invoke)(struct ApplicationInterface* Self, DWordType Sel, ...);
- VoidType (*Query)(struct ApplicationInterface* Self, PtrVoidType* Dst, SizeType SzDst, struct GUID* GuidOf);
-} ApplicationInterface, *ApplicationInterfaceRef;
-
-#ifdef __cplusplus
-
-#define CS_COPY_DELETE(KLASS) \
- KLASS& operator=(const KLASS&) = delete; \
- KLASS(const KLASS&) = delete;
-
-#define CS_COPY_DEFAULT(KLASS) \
- KLASS& operator=(const KLASS&) = default; \
- KLASS(const KLASS&) = default;
-
-#define CS_MOVE_DELETE(KLASS) \
- KLASS& operator=(KLASS&&) = delete; \
- KLASS(KLASS&&) = delete;
-
-#define CS_MOVE_DEFAULT(KLASS) \
- KLASS& operator=(KLASS&&) = default; \
- KLASS(KLASS&&) = default;
-
-#define app_cast reinterpret_cast<ApplicationInterfaceRef>
-
-template <SizeType N>
-using StrType = CharacterTypeUTF8[N];
-
-#else
-
-#define app_cast(X) (ApplicationInterfaceRef)(X)
-
-#endif // ifdef C++
-
-/// @brief Get app singleton.
-/// @param
-/// @return
-CS_EXTERN_C ApplicationInterfaceRef RtGetAppPointer(VoidType);
-
-/// @brief Get argument count
-/// @param
-/// @return
-CS_EXTERN_C SizeType RtGetAppArgumentsCount(VoidType);
-
-/// @brief Get argument pointer.
-/// @param
-/// @return
-CS_EXTERN_C CharacterTypeUTF8** RtGetAppArgumentsPtr(VoidType);
-
-/// @brief Shared application interface.
-CS_EXTERN_C ApplicationInterfaceRef kSharedApplication;
-
-/// @brief 255 length string type.
-typedef CharacterTypeUTF8 StrType255[255];
-
-#define True 1
-#define False 0
-#define Bool BooleanType
-
-#define NullPtr ((PtrVoidType)0)
-
-#ifndef kInvalidRef
-#define kInvalidRef 0
-#endif
-
-/// @brief Result type.
-typedef UInt64Type ResultType;
diff --git a/Usr/Sys/CoreSystem/Headers/File.h b/Usr/Sys/CoreSystem/Headers/File.h
deleted file mode 100644
index 12dfb033..00000000
--- a/Usr/Sys/CoreSystem/Headers/File.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#pragma once
-
-#include <Headers/Defines.h>
-
-#define kMaxForkNameLength (256U) /* long fork names. */
-
-struct _Fork;
-
-/// @brief Filesystem wrapper.
-
-typedef QWordType FSRef;
-
-/// @brief Opens a new file.
-/// @param path where to find it.
-/// @param rest the restrict (rw, rwe, r+, w+, r, w)
-/// @return FSRef the file.
-CS_EXTERN_C FSRef CSOpenFile(const CharacterTypeUTF8* path, const CharacterTypeUTF8* r);
-
-/// @brief Closes the file and flushes it to the said file.
-/// @param refCS the filesystem reference.
-/// @return
-CS_EXTERN_C VoidType CSCloseFile(FSRef refCS);
-
-/// @brief A fork information header.
-typedef struct _Fork
-{
- Int32Type forkFlags;
- Int32Type forkKind;
- CharacterTypeUTF8 forkName[kMaxForkNameLength];
- SizeType forkSize;
- CharacterTypeUTF8 forkData[];
-} ForkType, ForkTypePtr;
-
-typedef ForkType* FSForkRef;
-
-/// @brief Gets the fork inside a file.
-/// @param refCS the filesystem ref
-/// @param forkName the fork's name
-/// @return the fork data.
-CS_EXTERN_C FSForkRef CSGetFork(FSRef refCS, const CharacterTypeUTF8* forkName);
-
-/// @brief Check if the filesystem path is valid.
-/// @return if not return false, or true.
-CS_EXTERN_C BooleanType CSIsValidPath(const CharacterTypeUTF8* path);
-
-/// @brief Flush file
-/// @param refCS the file reference.
-/// @return
-CS_EXTERN_C VoidType CSFlushFile(FSRef refCS);
-
-/// END OF FILE
diff --git a/Usr/Sys/CoreSystem/Headers/Heap.h b/Usr/Sys/CoreSystem/Headers/Heap.h
deleted file mode 100644
index afb8e6e4..00000000
--- a/Usr/Sys/CoreSystem/Headers/Heap.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#pragma once
-
-#include <Headers/Defines.h>
-
-#define cAllocationKindCount (2U)
-
-enum CsAllocationKind
-{
- kStandardAllocation = 0xC,
- kArrayAllocation = 0xD,
-};
-
-/// @brief Allocates a new pointer from process pool.
-/// @param sz the size
-/// @param flags the allocation flags.
-/// @return
-CS_EXTERN_C PtrVoidType CSAllocateHeap(QWordType sz,
- DWordType flags);
-
-/// @brief Check if the pointer exists.
-/// @param ptr the pointer to free.
-/// @return
-CS_EXTERN_C BooleanType CSIsHeapValid(PtrVoidType ptr);
-
-/// @brief Gets the size of the process' pointer.
-/// @param ptr the pointer to free.
-/// @return
-CS_EXTERN_C QWordType CSGetHeapSize(PtrVoidType ptr);
-
-/// @brief Frees the process pointer.
-/// @param ptr the pointer to free.
-/// @return
-CS_EXTERN_C VoidType CSFreeHeap(PtrVoidType ptr);
diff --git a/Usr/Sys/CoreSystem/Headers/Hint.h b/Usr/Sys/CoreSystem/Headers/Hint.h
deleted file mode 100644
index db582035..00000000
--- a/Usr/Sys/CoreSystem/Headers/Hint.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#pragma once
-
-#pragma compiler(hint_manifest)
-
-#define _Input
-#define _Output
-
-#define _Optional
-
-#define _StrictCheckInput
-#define _StrictCheckOutput
-
-#define _InOut
-#define _StrictInOut
diff --git a/Usr/Sys/CoreSystem/Headers/Intl.h b/Usr/Sys/CoreSystem/Headers/Intl.h
deleted file mode 100644
index afc7431c..00000000
--- a/Usr/Sys/CoreSystem/Headers/Intl.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#pragma once
-
-/// @brief Intlization primitives.
-
-#include <Headers/Defines.h>
-
-typedef UInt64Type IntlRef;
-
-/// @brief Get app locale.
-/// @param name locale name.
-/// @return
-IntlRef IntlGetLocale(const char* name);
-
-/// @brief Set app locale.
-/// @param intl the locale
-/// @return
-BooleanType IntlSetLocale(const IntlRef intl);
-
-/// @brief locale helpers.
-
-/// @brief translate a string from a locale.
-const CharacterTypeUTF8* Intl(const CharacterTypeUTF8* input,
- const IntlRef locale);
diff --git a/Usr/Sys/CoreSystem/Headers/Math.h b/Usr/Sys/CoreSystem/Headers/Math.h
deleted file mode 100644
index e3a203dc..00000000
--- a/Usr/Sys/CoreSystem/Headers/Math.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#pragma once
-
-#include <Headers/Defines.h>
-
-///////////////////////////////////////////////////////////////////////
-/// Random number generators functions ///
-///////////////////////////////////////////////////////////////////////
-
-/// @brief Number generator helper.
-/// @return Random generated number.
-CS_EXTERN_C SizeType MathRand(VoidType);
-
-///////////////////////////////////////////////////////////////////////
-/// Mathematical functions ///
-///////////////////////////////////////////////////////////////////////
-
-CS_EXTERN_C FloatType Sqrt(FloatType number);
-
-CS_EXTERN_C FloatType Cosine(FloatType number);
-CS_EXTERN_C FloatType Sine(FloatType number);
-CS_EXTERN_C FloatType Tangent(FloatType number); \ No newline at end of file
diff --git a/Usr/Sys/CoreSystem/Headers/Rsrc.h b/Usr/Sys/CoreSystem/Headers/Rsrc.h
deleted file mode 100644
index fafdcc7c..00000000
--- a/Usr/Sys/CoreSystem/Headers/Rsrc.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#pragma once
-
-#include <Headers/Defines.h>
-
-/// @file Rsrc.h
-/// @brief RXML forks. \ No newline at end of file
diff --git a/Usr/Sys/CoreSystem/Headers/Thread.h b/Usr/Sys/CoreSystem/Headers/Thread.h
deleted file mode 100644
index 26b6477f..00000000
--- a/Usr/Sys/CoreSystem/Headers/Thread.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-//
-// Created by Amlal on 3/18/24
-//
-
-#ifndef __THREAD__
-#define __THREAD__
-
-#include <Headers/Defines.h>
-
-#define kThreadErrorExit (-33)
-
-/// @brief Thread reference.
-typedef QWordType ThreadRef;
-
-/// @brief Main application thread.
-CS_EXTERN_C ThreadRef kMainThread;
-
-typedef VoidType (*ThreadEntrypointKind)(VoidType);
-
-/// @brief Creates a new thread, and runs the code.
-/// @param threadName the thread's name.
-/// @param threadStart where to start.
-/// @return
-CS_EXTERN_C ThreadRef CSThreadCreate(const CharacterTypeUTF8* threadName, ThreadEntrypointKind threadStart);
-
-/// @brief Dispoes the thread, and exits with code kThreadErrorExit
-/// @param ref the thread reference.
-/// @return nothing.
-CS_EXTERN_C VoidType CSThreadRelease(ThreadRef ref);
-
-/// @brief Waits for the thread to complete.
-/// @param ref the thread reference.
-/// @return nothing.
-CS_EXTERN_C VoidType CSThreadJoin(ThreadRef ref);
-
-/// @brief Yields the current thread.
-/// @param ref the thead reference.
-/// @return
-CS_EXTERN_C VoidType CSThreadYield(ThreadRef ref);
-
-#endif // __THREAD__
diff --git a/Usr/Sys/CoreSystem/Headers/Transport.h b/Usr/Sys/CoreSystem/Headers/Transport.h
deleted file mode 100644
index 996e69cc..00000000
--- a/Usr/Sys/CoreSystem/Headers/Transport.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-//
-// Created by Amlal on 5/12/24
-//
-
-#ifndef __TRANSPORT__
-#define __TRANSPORT__
-
-/// @file: Transport.h
-/// @brief Open Transport Layer, an alternative to berkeley sockets.
-
-#include <Headers/Defines.h>
-
-typedef QWordType TptStreamType;
-
-/// @brief Opens a new socket
-/// @param afType address family
-/// @param sockType type of socket
-/// @param sockProto socket protocol.
-/// @return The STREAMS socket.
-/// @note return is const.
-CS_EXTERN_C CS_CONST TptStreamType CSOpenSocket(UInt32Type afType, UInt32Type sockType, UInt32Type sockProto);
-
-/// @brief Close a STREAMS socket.
-/// @param streams The streams socket.
-/// @return
-CS_EXTERN_C VoidType CSCloseSocket(CS_CONST TptStreamType streams);
-
-/// @brief Get OpenTransport version.
-/// @param void
-/// @return
-CS_EXTERN_C CS_CONST Int32Type CSGetVersion(VoidType);
-
-enum
-{
- TrSocketProtoTCP, /// TCP socket
- TrSocketProtoUDP, /// UDP socket
- TrSocketProtoUN, /// IPC socket
- TrSocketProtoRaw, /// Raw socket
- TrSocketProtoCount,
-};
-
-#endif // __TRANSPORT__ \ No newline at end of file
diff --git a/Usr/Sys/CoreSystem/POWER/CoreAssembly.s b/Usr/Sys/CoreSystem/POWER/CoreAssembly.s
deleted file mode 100644
index 3262cbb4..00000000
--- a/Usr/Sys/CoreSystem/POWER/CoreAssembly.s
+++ /dev/null
@@ -1,23 +0,0 @@
-; /* -------------------------------------------
-;
-; Copyright Zeta Electronics Corporation
-;
-; Purpose: POWER low level I/O
-;
-; ------------------------------------------- */
-
-/* @brief Application getter */
-/* @throws: ApptError: appartement error. */
-export .code64 RtGetAppPointer:
- mflr r3
- stw 0x10, 0(r3) /* sysGetProcessObject */
- sc
-
- blr
-
-export .code64 RtAssertTriggerInterrupt:
- mflr r3
- stw 0x11, 0(r3) /* sysTerminateCurrentProcess */
- sc
-
- blr
diff --git a/Usr/Sys/CoreSystem/Private.xml b/Usr/Sys/CoreSystem/Private.xml
deleted file mode 100644
index 4be6c388..00000000
--- a/Usr/Sys/CoreSystem/Private.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-<SourceDeploy>
- <File name="Headers/Hint.h" hidden="true"/>
- <Directory name="Sources/" hidden="true"/>
-</SourceDeploy> \ No newline at end of file
diff --git a/Usr/Sys/CoreSystem/RISCV/.gitkeep b/Usr/Sys/CoreSystem/RISCV/.gitkeep
deleted file mode 100644
index e69de29b..00000000
--- a/Usr/Sys/CoreSystem/RISCV/.gitkeep
+++ /dev/null
diff --git a/Usr/Sys/CoreSystem/ReadMe.md b/Usr/Sys/CoreSystem/ReadMe.md
deleted file mode 100644
index ae5df339..00000000
--- a/Usr/Sys/CoreSystem/ReadMe.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# CoreSystem
-## Core System framework.
-
-Currently contains:
-
-- Heap API.
-- File API.
-- Data API.
-- Threading API.
-
-Needs to have:
-- Device API
-- Drive API. \ No newline at end of file
diff --git a/Usr/Sys/CoreSystem/Sources/App.c b/Usr/Sys/CoreSystem/Sources/App.c
deleted file mode 100644
index 3334dad4..00000000
--- a/Usr/Sys/CoreSystem/Sources/App.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#include <Headers/Defines.h>
-
-/// @brief Main Application object, retrieved from the RtGetAppPointer symbol.
-ApplicationInterfaceRef kSharedApplication = NullPtr;
-
-/// @brief Gets the app arguments count.
-/// @param void no arguments.
-/// @return The number of arguments given to the application.
-CS_EXTERN_C SizeType RtGetAppArgumentsCount(VoidType)
-{
- CS_MUST_PASS(kSharedApplication);
-
- return kSharedApplication->Invoke(kSharedApplication, kCallGetArgsCount);
-}
-
-/// @brief Gets the app arguments pointer.
-/// @param void no arguments.
-/// @return
-CS_EXTERN_C CharacterTypeUTF8** RtGetAppArgumentsPtr(VoidType)
-{
- CS_MUST_PASS(kSharedApplication);
-
- return (CharacterTypeUTF8**)kSharedApplication->Invoke(kSharedApplication,
- kCallGetArgsPtr);
-}
diff --git a/Usr/Sys/CoreSystem/Sources/CRTStartup.c b/Usr/Sys/CoreSystem/Sources/CRTStartup.c
deleted file mode 100644
index 2dc9b1c4..00000000
--- a/Usr/Sys/CoreSystem/Sources/CRTStartup.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#include <Headers/Defines.h>
-
-VoidType __DllMainCRTStartup(VoidType)
-{
- kSharedApplication = RtGetAppPointer();
-} \ No newline at end of file
diff --git a/Usr/Sys/CoreSystem/Sources/File.c b/Usr/Sys/CoreSystem/Sources/File.c
deleted file mode 100644
index 2e34d782..00000000
--- a/Usr/Sys/CoreSystem/Sources/File.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#include <Headers/Defines.h>
-#include <Headers/File.h>
-
-enum FileOp
-{
- kFlushFile,
- kReadFork,
- kWriteFork,
- kOpenFork,
- kCloseFork,
-};
-
-/// @brief Opens a new file.
-/// @param path where to find it.
-/// @param rest the restrict (rw, rwe, r+, w+, r, w)
-/// @return FSRef file reference.
-CS_EXTERN_C FSRef CSOpenFile(const CharacterTypeUTF8* path,
- const CharacterTypeUTF8* rest)
-{
- CS_MUST_PASS(kSharedApplication);
- CS_MUST_PASS(path && CSIsValidPath(path) == Yes);
- CS_MUST_PASS(rest);
-
- return kSharedApplication->Invoke(kSharedApplication, kCallOpenFile, path,
- rest);
-}
-
-/// @brief Closes the file and flushes it to the said file.
-/// @param refCS the filesystem reference.
-/// @return void
-CS_EXTERN_C VoidType CSCloseFile(FSRef refCS)
-{
- CS_MUST_PASS(kSharedApplication);
-
- CSFlushFile(refCS);
-
- kSharedApplication->Invoke(kSharedApplication, kCallCloseFile, refCS);
-}
-
-/// @brief Flush file
-/// @param refCS the file reference.
-/// @return void
-CS_EXTERN_C VoidType CSFlushFile(FSRef refCS)
-{
- CS_MUST_PASS(kSharedApplication);
-
- kSharedApplication->Invoke(kSharedApplication, refCS, kFlushFile);
-}
-
-/// @brief Check if filesystem path is valid.
-/// @param path the filesystem path.
-/// @return if the path is valid or not.
-CS_EXTERN_C BooleanType CSIsValidPath(const CharacterTypeUTF8* path)
-{
- CS_MUST_PASS(kSharedApplication);
- CS_MUST_PASS(path);
-
- return kSharedApplication->Invoke(kSharedApplication, kCallFileExists, path) ||
- kSharedApplication->Invoke(kSharedApplication, kCallDirectoryExists, path) ||
- kSharedApplication->Invoke(kSharedApplication, kCallSymlinkExists, path) ||
- kSharedApplication->Invoke(kSharedApplication, kCallDriveExists, path) ||
- kSharedApplication->Invoke(kSharedApplication, kCallDeviceExists, path);
-} \ No newline at end of file
diff --git a/Usr/Sys/CoreSystem/Sources/Heap.c b/Usr/Sys/CoreSystem/Sources/Heap.c
deleted file mode 100644
index 1f96648d..00000000
--- a/Usr/Sys/CoreSystem/Sources/Heap.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#include <Headers/Defines.h>
-#include <Headers/Heap.h>
-
-/// @brief Allocate from the user's heap.
-/// @param sz size of object.
-/// @param flags flags.
-/// @return
-CS_EXTERN_C PtrVoidType CSAllocateHeap(QWordType sz, DWordType flags)
-{
- CS_MUST_PASS(kSharedApplication);
- CS_MUST_PASS(sz);
- CS_MUST_PASS(flags);
-
- return (PtrVoidType)kSharedApplication->Invoke(kSharedApplication,
- kCallAllocPtr, sz, flags);
-}
-
-/// @brief Free pointer from the user's heap.
-/// @param ptr the pointer to free.
-CS_EXTERN_C VoidType CSFreeHeap(PtrVoidType ptr)
-{
- CS_MUST_PASS(kSharedApplication);
- CS_MUST_PASS(ptr);
-
- CS_UNREFERENCED_PARAMETER(
- kSharedApplication->Invoke(kSharedApplication, kCallFreePtr, ptr));
-}
-
-/// @brief Get pointer size.
-/// @param ptr the pointer to find.
-/// @return the size.
-CS_EXTERN_C QWordType CSGetHeapSize(PtrVoidType ptr)
-{
- CS_MUST_PASS(kSharedApplication);
-
- CS_MUST_PASS(ptr);
- return kSharedApplication->Invoke(kSharedApplication, kCallSizePtr, ptr);
-}
-
-/// @brief Check if the pointer exists.
-/// @param ptr the pointer to check.
-/// @return if it exists
-CS_EXTERN_C BooleanType CSIsHeapValid(PtrVoidType ptr)
-{
- CS_MUST_PASS(kSharedApplication);
- CS_MUST_PASS(ptr);
- return kSharedApplication->Invoke(kSharedApplication, kCallCheckPtr, ptr);
-}
diff --git a/Usr/Sys/CoreSystem/Sources/Math.c b/Usr/Sys/CoreSystem/Sources/Math.c
deleted file mode 100644
index 2d9536f6..00000000
--- a/Usr/Sys/CoreSystem/Sources/Math.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#include <Headers/Math.h>
-
-/// @brief Number generator helper.
-/// @return Random generated number.
-CS_EXTERN_C SizeType MathRand(VoidType)
-{
- return kSharedApplication->Invoke(kSharedApplication, kCallRandomNumberGenerator);
-} \ No newline at end of file
diff --git a/Usr/Sys/CoreSystem/Sources/Thread.c b/Usr/Sys/CoreSystem/Sources/Thread.c
deleted file mode 100644
index 630787e1..00000000
--- a/Usr/Sys/CoreSystem/Sources/Thread.c
+++ /dev/null
@@ -1,9 +0,0 @@
-/* -------------------------------------------
-
- Copyright Zeta Electronics Corporation
-
-------------------------------------------- */
-
-#include <Headers/Thread.h>
-
-ThreadRef kMainThread = 0;
diff --git a/Usr/Sys/CoreSystem/amd64.mk b/Usr/Sys/CoreSystem/amd64.mk
deleted file mode 100644
index 65642c2e..00000000
--- a/Usr/Sys/CoreSystem/amd64.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-##################################################
-# (C) Zeta Electronics Corporation, all rights reserved.
-# This is the CoreSystem Makefile.
-##################################################
-
-CC=x86_64-w64-mingw32-gcc
-AR=x86_64-w64-mingw32-ar
-CCINC=-I./
-CCFLAGS=-D__SINGLE_PRECISION__ -nostdlib -std=c17 -ffreestanding -Xlinker --subsystem=17 -e __DllMainCRTStartup -shared
-OUTPUT=CoreSystem.lib
-
-.PHONY: all
-all: build-core-amd64
- @echo "[CoreSystem.lib] Build done."
-
-.PHONY: build-core-amd64
-build-core-amd64:
- $(CC) $(CCINC) $(CCFLAGS) $(wildcard Sources/*.c) $(wildcard AMD64/*.s) -o $(OUTPUT)
-
-.PHONY: clean
-clean:
- rm -f $(wildcard *.lib)
diff --git a/Usr/Sys/CoreSystem/compile_flags.txt b/Usr/Sys/CoreSystem/compile_flags.txt
deleted file mode 100644
index 749a500e..00000000
--- a/Usr/Sys/CoreSystem/compile_flags.txt
+++ /dev/null
@@ -1,4 +0,0 @@
--I./
--I../
--I../../../Kernel
--std=c17