Continuing terminal I/O

- Made stdio.h work
- Moved printFiletable back into kernel.c
- TODO: Add stdio.h to all files that should use it (probably next commmit)
- Added some more global addresses. There's a memory layout, but i'm not using it
- Got cursor to be drawn
- Calc program now gets user input
This commit is contained in:
2024-05-28 17:08:49 +02:00
parent 536f6b2320
commit ff07696dc6
17 changed files with 185 additions and 203 deletions
+3 -4
View File
@@ -6,17 +6,16 @@
#include <terminal/terminal.h>
#include <keyboard/keyboard.h>
#include <memory/malloc.h>
#include <memory/addresses.h>
#include <syscall.h>
#include <stdint.h>
// Syscall(0) - Sleep()
// Args: ebx - number of miliseconds
void sys_sleep() {
uint32_t ms;
__asm__ volatile ("movl %%ebx, %0" : "=r"(ms));
__asm__ volatile ("movl %%ebx, %0" : "=r"(*sleepTimerTicks));
uint32_t requiredTicks = *timerTicks + ms;
while (*timerTicks != requiredTicks) { // Wait...
while (*sleepTimerTicks > 0) { // Wait...
__asm__ volatile ("sti;hlt;cli;");
}
}