@@ -164,7 +164,6 @@ start_32bit:
movl $0x03fffff0, %ebp
movl $0x03fffff0, %esp
-# TODO: move REAL KERNEL to 0x100000
movl $__loader_end, %eax
movl $__real_kernel_start, %ebx
@@ -1,4 +1,4 @@
-#include "kernel/vga.h"
+#include <kernel/tty.h>
#include <asm/port_io.h>
#include <kernel/event/event.h>
#include <kernel/input/input_event.h>
@@ -31,8 +31,7 @@ void dispatch_event(void)
for (auto iter = input_event_queue.begin(); iter != input_event_queue.end(); ++iter) {
const auto& item = *iter;
snprintf(buf, 1024, "\rinput event: type%x, data%x, code%x\r", item.type, item.data, item.code);
- // TODO: change to tty
- vga_print(buf, 0x0fu);
+ tty_print(console, buf);
input_event_queue.erase(iter);
}
@@ -43,9 +43,9 @@ static inline void check_a20_status(void)
result = check_a20_on();
if (result) {
+ tty_print(console, "a20 is on");
} else {
+ tty_print(console, "a20 is NOT on");
@@ -174,8 +174,7 @@ void kernel_main(void)
printkf("Testing k_malloc...\n");
char* k_malloc_buf = (char*)k_malloc(sizeof(char) * 128);
snprintf(k_malloc_buf, 128, "This text is printed on the heap!\n");
- // vga_printk(k_malloc_buf, 0x0fu);
+ tty_print(console, k_malloc_buf);
k_free(k_malloc_buf);
void* kernel_stack = k_malloc(KERNEL_STACK_SIZE);