49 static const size_t VGA_WIDTH = 80;
50 static const size_t VGA_HEIGHT = 25;
54 uint16_t *
const m_Buffer = (uint16_t *) 0xB8000;
57 VgaColor EntryColor(
COLOR Fore,
COLOR Back)
const;
59 VgaChar Entry(
unsigned char uc, VgaColor Color)
const;
61 void Fill(
const VgaChar Char);
63 void PutChar(
unsigned char Char);
71 #ifndef TEST_BUILD // TODO: temporary until we mock vga's direct memory map 79 void Puts(
const char *Str);
86 void PutChar(VgaChar Char,
size_t Row,
size_t Col);
92 void SetColor(VgaColor Color);
95 inline VgaColor Vga::EntryColor(
COLOR Fore,
COLOR Back)
const 97 return static_cast<VgaColor
>(Fore)
98 | static_cast<VgaColor>(Back) << 4;
101 inline VgaChar Vga::Entry(
unsigned char uc, VgaColor Color)
const 103 return static_cast<VgaChar
> (uc)
104 | static_cast<VgaChar> (Color) << 8;
107 inline void Vga::PutChar(VgaChar Char,
size_t Row,
size_t Col)
109 m_Buffer[Row * VGA_WIDTH + Col] = Char;
127 #endif //KERNOS_VGA_H
void SetColor(VgaColor Color)
Set text color.
Video Graphics Array namespace.
COLOR
VGA text buffer convention.
Manages access to VGA driver.
contains all kernel initialization routines
void VGA()
Clear VGA display, and print kernel banner.