Fixed the serial port bug that caused a FIFO overflow in Bochs.

This commit is contained in:
2020-06-19 13:49:10 -05:00
parent 84f64badaf
commit 4c4054451c
3 changed files with 7 additions and 5 deletions
+5 -3
View File
@@ -7,11 +7,11 @@ void kmain()
{
set_serial_baud_rate(COM1_PORT, 0x03);
configure_serial_line(COM1_PORT);
write_to_com(COM1_PORT, "Info From Kernel: Set up COM1 for messaging.\n");
write_to_com(COM1_PORT, "Set up COM1 for messaging.\n");
clear_screen();
write_to_com(COM1_PORT, "Info From Kernel: Clearing screen.\n");
write_to_com(COM1_PORT, "Clearing screen.\n");
print_banner();
write_to_com(COM1_PORT, "Info From Kernel: Displaying OS banner.\n");
write_to_com(COM1_PORT, "Displaying OS banner.\n");
//draw_rect(20, 5, 50, 7, 0x4, 0xF);
draw_rect(0, 5, 5, 13, 0xF, 0x4);
draw_rect(5, 8, 10, 10, 0x4, 0xF);
@@ -37,8 +37,10 @@ void kmain()
//draw_s("And 2nd Row. Now the 3rd row.", 2, 9);
move_cursor(0, 3);
draw_string("Installing GDT...\n", 0xF, 0x0);
write_to_com(COM1_PORT, "Installing the GDT.\n");
gdt_install();
move_cursor(0, 4);
write_to_com(COM1_PORT, "GDT installed.\n");
draw_string("Installed GDT\n", 0xf, 0x0);
asm("hlt");