From a181d37ea178aa4f6c1ee2d4ddeae3059eb70db0 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Mon, 18 Apr 2022 17:09:38 +0200 Subject: [PATCH] Tick indicator --- TODO.md | 3 +-- kernel/kernel.c | 13 +++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/TODO.md b/TODO.md index 7540e90..6399cc9 100644 --- a/TODO.md +++ b/TODO.md @@ -1,6 +1,5 @@ # TO DO - - PIC - - Interupts + - Interupt handlers - keeb? ---------------- - shell? diff --git a/kernel/kernel.c b/kernel/kernel.c index e0e84cd..891baa5 100644 --- a/kernel/kernel.c +++ b/kernel/kernel.c @@ -48,14 +48,19 @@ void print_kernel_stats() { print("x"); buf = itoa(MAX_ROWS, buf, 10); println(buf, DEFAULT_COLOR); - + + int i = 0; + while(true) { + set_cursor_pos(0, 20); + buf = itoa(i, buf, 10); + printalign(buf, 0x0f, MIDDLE); + ++i; + } } void kernel_init() { idt_init(); // Enable interupts - - vga_init(); // Initialize the screen first - // i.e. clear the screen et cetera. + vga_init(); // Initialize the screen // Allocate VGA memory range pm_malloc_range(VGA_ADDRESS, VGA_ADDRESS_MAX, true); // force alloc the VGA range