Implement BlClearConsoleLine() routine
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 27s
Builds / ExectOS (i686) (push) Successful in 24s

This commit is contained in:
2023-12-23 10:01:28 +01:00
parent ec861c6296
commit 10aaf7e24e
4 changed files with 35 additions and 0 deletions

View File

@@ -9,6 +9,34 @@
#include <xtldr.h>
/**
* Clears a specified line on the UEFI text console.
*
* @param LineNo
* Supplies a line number to clear.
*
* @return This routine does not return any value.
*
* @since XT 1.0
*/
XTCDECL
VOID
BlClearConsoleLine(IN ULONGLONG LineNo)
{
UINT_PTR Index, ResX, ResY;
/* Query console mode */
BlQueryConsoleMode(&ResX, &ResY);
/* Set cursor position and clear line */
BlSetCursorPosition(0, LineNo);
for(Index = 0; Index < ResX; Index++)
{
/* Clear line */
BlConsoleWrite(L" ");
}
}
/**
* This routine clears the UEFI console screen.
*

View File

@@ -16,6 +16,10 @@
typedef VOID (BMPRINTCHAR)(IN USHORT Character);
/* XTLDR routines forward references */
XTCDECL
VOID
BlClearConsoleLine(IN ULONGLONG LineNo);
XTCDECL
VOID
BlClearConsoleScreen();

View File

@@ -90,6 +90,7 @@ BlpRegisterXtLoaderProtocol()
EFI_HANDLE Handle = NULL;
/* Set all routines available via loader protocol */
LdrProtocol.Console.ClearLine = BlClearConsoleLine;
LdrProtocol.Console.ClearScreen = BlClearConsoleScreen;
LdrProtocol.Console.DisableCursor = BlDisableConsoleCursor;
LdrProtocol.Console.EnableCursor = BlEnableConsoleCursor;