mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 17:31:58 -05:00
Minor VGA cleanup.
This commit is contained in:
parent
b833aa4162
commit
b4f3bc078f
1 changed files with 1 additions and 10 deletions
|
@ -5,8 +5,7 @@
|
|||
#include "StdLib.h"
|
||||
#include "Task.h"
|
||||
|
||||
PRIVATE BYTE *vga_mem = 0L;
|
||||
PRIVATE BYTE current_attr = 0x07;
|
||||
static byte* vga_mem = nullptr;
|
||||
|
||||
void vga_scroll_up()
|
||||
{
|
||||
|
@ -38,14 +37,8 @@ void vga_putch_at(byte row, byte column, byte ch, byte attr)
|
|||
vga_mem[cur + 1] = attr;
|
||||
}
|
||||
|
||||
byte vga_get_attr()
|
||||
{
|
||||
return current_attr;
|
||||
}
|
||||
|
||||
void vga_init()
|
||||
{
|
||||
current_attr = 0x07;
|
||||
vga_mem = (byte*)0xb8000;
|
||||
|
||||
for (word i = 0; i < (80 * 25); ++i) {
|
||||
|
@ -69,9 +62,7 @@ WORD vga_get_cursor()
|
|||
void vga_set_cursor(WORD value)
|
||||
{
|
||||
if (value >= (80 * 25)) {
|
||||
/* XXX: If you try to move the cursor off the screen, I will go reddish pink! */
|
||||
vga_set_cursor(0);
|
||||
current_attr = 0x0C;
|
||||
return;
|
||||
}
|
||||
IO::out8(0x3d4, 0x0e);
|
||||
|
|
Loading…
Reference in a new issue