vga now working with term and shell program

This commit is contained in:
2026-07-16 23:19:54 -05:00
parent 3246dbbd19
commit b6681b74c9
12 changed files with 196 additions and 53 deletions

View File

@@ -1,6 +1,7 @@
#include <stdint.h>
#include <stddef.h>
#include "drivers/serial/serial.h"
#include "lib/memory.h"
#include "lib/ringbuf.h"
@@ -25,11 +26,12 @@ typedef struct registers {
static int32_t sys_exit(int status) {
process_t* task = current_task();
task->state = STATE_ZOMBIE;
task->exit_status = status;
if (task->waiting) {
wake(task->waiting);
}
task->state = STATE_DEAD;
// task->exit_status = status;
// if (task->waiting) {
// wake(task->waiting);
// }
kprintf("task %d exited with status %d\n", task->pid, status);
exit();
return 0;
}
@@ -212,6 +214,7 @@ static int32_t sys_exec(registers_t* regs, const char* prgm) {
regs->eip = eip;
regs->useresp = (uint32_t)u_esp;
print_serial("returning from exec\n");
return 0;
}
@@ -253,7 +256,7 @@ static int32_t sys_mmap(int fd) {
if (!(file->node->flags & VFS_CHARDEVICE)) return 0;
uint32_t map_vaddr = 0x3FF00000;
uint32_t map_vaddr = 0x20000000;
return file->node->mmap(file->node, map_vaddr);
}