diff options
author | Benji Dial <benji6283@gmail.com> | 2020-09-13 03:19:57 -0400 |
---|---|---|
committer | Benji Dial <benji6283@gmail.com> | 2020-09-13 03:19:57 -0400 |
commit | 1e4a254674f668839e5de273916024c16814b045 (patch) | |
tree | 6774f4d4398a29c4aafb4120070975d864ffcde4 /src/kernel/isrs.asm | |
parent | b8284137d4e0eec11c78bc14047243fce6a51373 (diff) | |
download | portland-os-1e4a254674f668839e5de273916024c16814b045.tar.gz |
(basic, not much tested) keyboard, better panic
Diffstat (limited to 'src/kernel/isrs.asm')
-rw-r--r-- | src/kernel/isrs.asm | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/src/kernel/isrs.asm b/src/kernel/isrs.asm index 82c17fe..9a9600c 100644 --- a/src/kernel/isrs.asm +++ b/src/kernel/isrs.asm @@ -4,12 +4,15 @@ global syscall_isr global quit_isr global yield_isr global _start_user_mode +global kbd_isr extern syscall_table extern active_task extern delete_task extern advance_active_task +extern on_kbd_isr +extern make_sure_tasks n_syscalls equ 0x9 @@ -39,6 +42,7 @@ syscall_isr: quit_isr: push dword [active_task] call delete_task + call make_sure_tasks mov dword [esp], yield_isr.return_to_task jmp advance_active_task @@ -59,7 +63,7 @@ yield_isr: mov dword [eax + 4], edx mov edx, dword [esp + 12] - mov dword [eax + 4], edx + mov dword [eax + 32], edx call advance_active_task @@ -72,8 +76,8 @@ yield_isr: mov edx, dword [eax + 4] mov cr3, edx - mov edx, dword [eax + 4] - mov dword [esp + 24], edx + mov edx, dword [eax + 32] + mov dword [esp + 12], edx mov ebx, dword [eax + 8] mov ecx, dword [eax + 12] @@ -94,4 +98,19 @@ _start_user_mode: push dword 0x00000200;interrupt flag push dword 0x23 sub esp, 4 - jmp yield_isr.return_to_task
\ No newline at end of file + jmp yield_isr.return_to_task + +kbd_isr: + push eax + push ecx + push edx + + call on_kbd_isr + + mov al, 0x20 + out 0x0020, al + + pop edx + pop ecx + pop eax + iret
\ No newline at end of file |