diff --git a/src/kernel/lib/task/task.c b/src/kernel/lib/task/task.c index 7830302..5d57403 100644 --- a/src/kernel/lib/task/task.c +++ b/src/kernel/lib/task/task.c @@ -26,7 +26,7 @@ Task* last = currentTask; currentTask = currentTask->nextTask; if (currentTask == 0x00) { - printf("No more tasks to run, halting . . .\n"); + puts("No more tasks to run, halting . . .\n"); while (1) { asm("hlt"); } diff --git a/src/kernel/lib/task/task.c b/src/kernel/lib/task/task.c index 7830302..5d57403 100644 --- a/src/kernel/lib/task/task.c +++ b/src/kernel/lib/task/task.c @@ -26,7 +26,7 @@ Task* last = currentTask; currentTask = currentTask->nextTask; if (currentTask == 0x00) { - printf("No more tasks to run, halting . . .\n"); + puts("No more tasks to run, halting . . .\n"); while (1) { asm("hlt"); } diff --git a/src/kernel/lib/textMode/stdio.c b/src/kernel/lib/textMode/stdio.c index 5784835..747a710 100644 --- a/src/kernel/lib/textMode/stdio.c +++ b/src/kernel/lib/textMode/stdio.c @@ -41,19 +41,6 @@ } } -void putChar(char c) { - uint16_t offset = getCursorOffset(); - putCharAtOffset(c, offset); - setCursorOffset(offset + 1); -} - -void puts(char* string) { - while (*string != 0x00) { - putChar(*string); - string++; - } -} - void shiftUp() { for (int y = 1; y < VIDEO_HEIGHT; y++) { for (int x = 0; x < VIDEO_WIDTH; x++) { @@ -78,6 +65,23 @@ setCursorPosition(x, y); } +void putChar(char c) { + if (c == '\n') { + newLine(); + return; + } + uint16_t offset = getCursorOffset(); + putCharAtOffset(c, offset); + setCursorOffset(offset + 1); +} + +void puts(char* string) { + while (*string != 0x00) { + putChar(*string); + string++; + } +} + char HEX_PREFIX[] = "0x"; char HEX_CHARS[] = "0123456789ABCDEF";