Implemented a software cursor of sorts and updated the function that draws a string to honor that cursor position.
This commit is contained in:
@@ -11,6 +11,14 @@ void kmain()
|
||||
draw_rect(10, 5, 15, 13, 0x8, 0x6);
|
||||
draw_rect(20, 5, 25, 7, 0xF, 0x1);
|
||||
draw_rect(20, 8, 25, 13, 0x5, 0x3);
|
||||
set_cursor(0, 14);
|
||||
move_cursor(0, 14);
|
||||
move_cursor(0, 15);
|
||||
draw_s("Test print", 0x8, 0xF);
|
||||
move_cursor(0, 16);
|
||||
draw_s("And now the cursor has been moved to y = 16.", 0x1, 0xF);
|
||||
move_cursor(5, 20);
|
||||
draw_s("Cursor moved over 5 cells and down 4 cells.", 0xF, 0x0);
|
||||
//draw_rect(20, 5, 50, 7, 0x4, 0xF);
|
||||
//draw_rect(20, 5, 50, 7, 0x4, 0xF);
|
||||
//draw_rect(20, 5, 50, 7, 0x4, 0xF);
|
||||
@@ -30,6 +38,7 @@ void write_screen(unsigned int i, char c, unsigned char fg, unsigned char bg)
|
||||
|
||||
void move(unsigned short pos)
|
||||
{
|
||||
|
||||
outb(0x3D4, 14);
|
||||
outb(0x3D5, ((pos >> 8 ) & 0x00FF));
|
||||
outb(0x3D4, 15);
|
||||
|
||||
Reference in New Issue
Block a user