cga mostly done

main
Eggert Jung 6 months ago
parent ef082a96fa
commit 16ceb1a157

@ -32,9 +32,6 @@ void getCursor(unsigned& abs_x, unsigned& abs_y) {
}
void show(unsigned abs_x, unsigned abs_y, char character, Attribute attrib) {
(void)abs_x;
(void)abs_y;
(void)character;
(void)attrib;
TEXT_BUFFER_BASE[abs_x + (COLUMNS * abs_y)] = Cell(character, attrib);
}
}; // namespace CGA

@ -136,5 +136,5 @@ struct Cell {
/*! \brief Base address for linear text buffer in video memory
*/
Cell* const TEXT_BUFFER_BASE = nullptr;
Cell* const TEXT_BUFFER_BASE = reinterpret_cast<CGA::Cell*>(0xb8000);
}; // namespace CGA

@ -10,13 +10,15 @@ extern "C" int main() {
unsigned int numCPUs = Core::count();
DBG_VERBOSE << "Number of CPUs: " << numCPUs << endl;
CGA::setCursor(0, 0);
//test cga implemantation
CGA::setCursor(1, 2);
unsigned x,y;
CGA::getCursor(x, y);
CGA::setCursor(x+1, y+1);
for(uint8_t i = 0; i < 10; i++)
CGA::show(i, i, i+0x30, CGA::Attribute());
/* Start application processors
* To avoid unexpected behaviour, make sure that interrupts are not
* enabled before the APs are booted. Otherwise it might interfere with the

Loading…
Cancel
Save