|
|
|
|
@ -4,6 +4,7 @@
|
|
|
|
|
|
|
|
|
|
#include "arch/cga.h"
|
|
|
|
|
#include "arch/textwindow.h"
|
|
|
|
|
#include "arch/serial.h"
|
|
|
|
|
|
|
|
|
|
// Main function
|
|
|
|
|
// (the bootstrap processor starts here)}
|
|
|
|
|
@ -19,19 +20,22 @@ extern "C" int main() {
|
|
|
|
|
//for(uint8_t i = 0; i < 10; i++)
|
|
|
|
|
// CGA::show(i, i, i+0x30, CGA::Attribute());
|
|
|
|
|
|
|
|
|
|
//test textwindow implemantation
|
|
|
|
|
TextWindow tw_global = TextWindow(0, 80, 0, 25, true);
|
|
|
|
|
tw_global.reset(' ', CGA::Attribute(CGA::LIGHT_GREEN, CGA::BLUE, false));
|
|
|
|
|
|
|
|
|
|
TextWindow tw = TextWindow(0, 10, 0, 10, true);
|
|
|
|
|
tw.reset();
|
|
|
|
|
tw.setPos(0,0);
|
|
|
|
|
tw.print("lorem ipsum dolor sit amit", 26);
|
|
|
|
|
tw.setPos(0,-1);
|
|
|
|
|
tw.print("test", 4, CGA::Attribute(CGA::BLACK, CGA::BLUE));
|
|
|
|
|
int x,y;
|
|
|
|
|
tw.getPos(x,y);
|
|
|
|
|
tw.setPos(x+1,y);
|
|
|
|
|
////test textwindow implemantation
|
|
|
|
|
//TextWindow tw_global = TextWindow(0, 80, 0, 25, true);
|
|
|
|
|
//tw_global.reset(' ', CGA::Attribute(CGA::LIGHT_GREEN, CGA::BLUE, false));
|
|
|
|
|
//TextWindow tw = TextWindow(0, 10, 0, 10, true);
|
|
|
|
|
//tw.reset();
|
|
|
|
|
//tw.setPos(0,0);
|
|
|
|
|
//tw.print("lorem ipsum dolor sit amit", 26);
|
|
|
|
|
//tw.setPos(0,-1);
|
|
|
|
|
//tw.print("test", 4, CGA::Attribute(CGA::BLACK, CGA::BLUE));
|
|
|
|
|
//int x,y;
|
|
|
|
|
//tw.getPos(x,y);
|
|
|
|
|
//tw.setPos(x+1,y);
|
|
|
|
|
|
|
|
|
|
//test Serial
|
|
|
|
|
Serial s = Serial();
|
|
|
|
|
s.write('a');
|
|
|
|
|
|
|
|
|
|
/* Start application processors
|
|
|
|
|
* To avoid unexpected behaviour, make sure that interrupts are not
|
|
|
|
|
|