diff --git a/arch/textwindow.cc b/arch/textwindow.cc index bb732e7..b9562b9 100644 --- a/arch/textwindow.cc +++ b/arch/textwindow.cc @@ -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){ diff --git a/main.cc b/main.cc index 8929433..1fb89a0 100644 --- a/main.cc +++ b/main.cc @@ -69,8 +69,6 @@ extern "C" int main() { << " -> 0x1badcafefee1dead" << endl; kout << "smiley: " << static_cast(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(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(LAPIC::getID()) << flush; return 0; }