Migrate XTLDR to C++
All checks were successful
Builds / ExectOS (amd64, release) (push) Successful in 29s
Builds / ExectOS (amd64, debug) (push) Successful in 31s
Builds / ExectOS (i686, debug) (push) Successful in 31s
Builds / ExectOS (i686, release) (push) Successful in 29s

This commit is contained in:
2025-09-17 15:56:41 +02:00
parent 7117d76842
commit 86fd2b4eea
21 changed files with 195 additions and 188 deletions

50
xtldr/shell.cc Normal file
View File

@@ -0,0 +1,50 @@
/**
* PROJECT: ExectOS
* COPYRIGHT: See COPYING.md in the top level directory
* FILE: xtldr/shell.cc
* DESCRIPTION: XT Boot Loader shell
* DEVELOPERS: Rafal Kupiec <belliash@codingworkshop.eu.org>
*/
#include <xtldr.h>
/**
* Starts XTLDR shell.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlStartLoaderShell()
{
/* Initialize console */
BlInitializeConsole();
/* Print prompt */
BlpPrintShellPrompt();
for(;;);
}
/**
* Prints XTLDR shell prompt.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlpPrintShellPrompt()
{
/* Set prompt color */
BlSetConsoleAttributes(EFI_TEXT_BGCOLOR_BLACK | EFI_TEXT_FGCOLOR_YELLOW);
/* Print prompt */
BlConsolePrint(L"XTLDR> ");
/* Reset standard shell colors */
BlSetConsoleAttributes(EFI_TEXT_BGCOLOR_BLACK | EFI_TEXT_FGCOLOR_LIGHTGRAY);
}