handler asm code for saving the volatile registers created
This commit is contained in:
@@ -11,4 +11,27 @@ handle_keyboard_asm:
|
|||||||
; continue. The C++ compiler will only generates code to preserve
|
; continue. The C++ compiler will only generates code to preserve
|
||||||
; non-scratch registers in the high-level interrupt handler -- the scratch
|
; non-scratch registers in the high-level interrupt handler -- the scratch
|
||||||
; registers have to be saved (and restored later) manually!
|
; registers have to be saved (and restored later) manually!
|
||||||
; TODO(12): Implement the context save and restore for the keyboard interrupt
|
; TODO: Implement the context save and restore for the keyboard interrupt
|
||||||
|
;
|
||||||
|
;
|
||||||
|
push rax;
|
||||||
|
push rdi;
|
||||||
|
push rsi;
|
||||||
|
push rdx;
|
||||||
|
push rcx;
|
||||||
|
push r8;
|
||||||
|
push r9;
|
||||||
|
push r10;
|
||||||
|
push r11;
|
||||||
|
call handle_keyboard;
|
||||||
|
pop r11;
|
||||||
|
pop r10;
|
||||||
|
pop r9;
|
||||||
|
pop r8;
|
||||||
|
pop rcx;
|
||||||
|
pop rdx;
|
||||||
|
pop rsi;
|
||||||
|
pop rdi;
|
||||||
|
pop rax;
|
||||||
|
|
||||||
|
iret ;
|
||||||
|
|||||||
Reference in New Issue
Block a user