fix debug windows

main
Eggert Jung 6 months ago
parent 6b2d3dc8ed
commit 0666fc30c7

@ -8,6 +8,8 @@ TextWindow::TextWindow(unsigned from_col, unsigned to_col, unsigned from_row,
this->from_row = from_row;
this->to_row = to_row;
this->use_cursor = use_cursor;
setPos(0,0);
}
void TextWindow::setPos(unsigned rel_x, unsigned rel_y) {
@ -63,7 +65,7 @@ void TextWindow::print(const char* str, size_t length, CGA::Attribute attrib) {
return;
}
CGA::show(x_now, y_now, str[i], attrib);
CGA::show(from_col + x_now, from_row + y_now, str[i], attrib);
if(from_col+x_now >= to_col-1){
x_now = 0;
if(from_row + y_now >= to_row-1){

@ -69,8 +69,6 @@ extern "C" int main() {
<< " -> 0x1badcafefee1dead" << endl;
kout << "smiley: " << static_cast<char>(1) << endl;
dout[0] << "test main!\n";
/* 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
@ -102,7 +100,8 @@ extern "C" int main_ap() {
//uint8_t from = static_cast<int>(LAPIC::getID()) * 20;
//uint8_t to = from+20;
//dout[LAPIC::getID()] = TextStream(from, to, 0, 6, false);
dout[LAPIC::getID()] << "test\n";
dout[LAPIC::getID()] << "test\n" << flush;
dout[LAPIC::getID()] << static_cast<int>(LAPIC::getID()) << flush;
return 0;
}

Loading…
Cancel
Save