cga mostly done
This commit is contained in:
@@ -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 show(unsigned abs_x, unsigned abs_y, char character, Attribute attrib) {
|
||||||
(void)abs_x;
|
TEXT_BUFFER_BASE[abs_x + (COLUMNS * abs_y)] = Cell(character, attrib);
|
||||||
(void)abs_y;
|
|
||||||
(void)character;
|
|
||||||
(void)attrib;
|
|
||||||
}
|
}
|
||||||
}; // namespace CGA
|
}; // namespace CGA
|
||||||
|
|||||||
@@ -136,5 +136,5 @@ struct Cell {
|
|||||||
|
|
||||||
/*! \brief Base address for linear text buffer in video memory
|
/*! \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
|
}; // namespace CGA
|
||||||
|
|||||||
8
main.cc
8
main.cc
@@ -10,13 +10,15 @@ extern "C" int main() {
|
|||||||
unsigned int numCPUs = Core::count();
|
unsigned int numCPUs = Core::count();
|
||||||
DBG_VERBOSE << "Number of CPUs: " << numCPUs << endl;
|
DBG_VERBOSE << "Number of CPUs: " << numCPUs << endl;
|
||||||
|
|
||||||
CGA::setCursor(0, 0);
|
//test cga implemantation
|
||||||
|
CGA::setCursor(1, 2);
|
||||||
unsigned x,y;
|
unsigned x,y;
|
||||||
CGA::getCursor(x, y);
|
CGA::getCursor(x, y);
|
||||||
|
|
||||||
CGA::setCursor(x+1, y+1);
|
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
|
/* Start application processors
|
||||||
* To avoid unexpected behaviour, make sure that interrupts are not
|
* To avoid unexpected behaviour, make sure that interrupts are not
|
||||||
* enabled before the APs are booted. Otherwise it might interfere with the
|
* enabled before the APs are booted. Otherwise it might interfere with the
|
||||||
|
|||||||
Reference in New Issue
Block a user