This commit is contained in:
Niklas Gollenstede
2025-10-31 22:37:36 +01:00
commit 174fe17e89
197 changed files with 79558 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
[SECTION .text]
[EXTERN handle_keyboard]
[GLOBAL handle_keyboard_asm]
; entry point for an interrupt to trigger a kernelpanic
;
align 16
handle_keyboard_asm:
; The interrupt may be triggered asynchronously, therefore the whole context
; has to be saved and restored, or the interrupted code might not be able to
; continue. The C++ compiler will only generates code to preserve
; non-scratch registers in the high-level interrupt handler -- the scratch
; registers have to be saved (and restored later) manually!
push rax
push rcx
push rdx
push rsi
push rdi
push r8
push r9
push r10
push r11
; Clear direction flag for string operations
cld
; Call the high-level handler routine
call handle_keyboard
; Restore scratch registers
pop r11
pop r10
pop r9
pop r8
pop rdi
pop rsi
pop rdx
pop rcx
pop rax
iretq