vga now working with term and shell program
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user