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

@@ -25,7 +25,14 @@ void unlock_scheduler() {
enable_interrupts();
}
typedef struct registers {
uint32_t ds; // push %ds
uint32_t edi, esi, ebp, esp, ebx, edx, ecx, eax; // pushal
uint32_t eip, cs, eflags, useresp, ss; // pushed by cpu
} __attribute__((packed)) registers_t;
uint32_t switch_context(uint32_t current_esp) {
registers_t* regs = (registers_t*)current_esp;
current_process->esp = current_esp;
process_t* next_process = current_process->sched_next;
@@ -62,8 +69,6 @@ uint32_t switch_context(uint32_t current_esp) {
if (current_process->flags & PROCESS_FLAG_USER) {
tss.esp0 = current_process->kstack_top;
}
return current_process->esp;
}