From 7e5be1572c043484293ee0cdd840dd41f54e87ee Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Fri, 29 Mar 2024 17:01:55 +0100 Subject: Kernel and SystemLib: See below. What has been done: - Rename most System.Core to SystemLib. - Reworked it's API and the concept of ObjectRef to become the ApplicationRef object. - Remove unused ODF and XIFF file format from tree, ODF will be part of the text editing program. - Update Readme for SystemLib. - Add Support folder on NewFS partitions. What is next: - NewFS filesystem support. - Program loading. - Preemptive scheduler on non-SMP systems using timers. Signed-off-by: Amlal El Mahrouss --- Public/Developer/SystemLib/Sources/Application.c | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Public/Developer/SystemLib/Sources/Application.c (limited to 'Public/Developer/SystemLib/Sources/Application.c') diff --git a/Public/Developer/SystemLib/Sources/Application.c b/Public/Developer/SystemLib/Sources/Application.c new file mode 100644 index 00000000..d7a83d3e --- /dev/null +++ b/Public/Developer/SystemLib/Sources/Application.c @@ -0,0 +1,25 @@ +/* ------------------------------------------- + + Copyright Mahrouss Logic + +------------------------------------------- */ + +#include + +/// @brief Main Application object, retrieved from the RtGetAppObject symbol. +ApplicationRef kSharedApplication = NullPtr; + +/// @brief Gets the app arguments count. +/// @param void no arguments. +/// @return +CA_EXTERN_C SizeType RtGetAppArgumentsCount(VoidType) { + return kSharedApplication->Invoke(kSharedApplication, kCallGetArgsCount); +} + +/// @brief Gets the app arguments pointer. +/// @param void no arguments. +/// @return +CA_EXTERN_C CharacterTypeUTF8* RtGetAppArgumentsPtr(VoidType) { + return (CharacterTypeUTF8*)kSharedApplication->Invoke(kSharedApplication, + kCallGetArgsPtr); +} \ No newline at end of file -- cgit v1.2.3