|
Simple Operating System
|
Kernel's interruptions. More...
#include "lib.asm"#include "boot/io.asm"
Go to the source code of this file.
Functions | |
| void | addInterrupt (number, function) |
| add interruption More... | |
| void | setInterrupts (void) |
| Set system interruptions. More... | |
| void | syscall (void) |
| System interruption 0x20. More... | |
Kernel's interruptions.
About interrupts:
When interrupt handler is called on stack are: [esp]=old eip [esp+2]=old cs [esp+4] old flags
to use local interrupt's variables DS must be changed to local i.e. KERNEL_ADDRESS
all cs of interrupt handler are KERNEL_ADDRESS - only kernel should handle
Definition in file interrupts-asm.c.
| void addInterrupt | ( | number | , |
| function | |||
| ) |
add interruption
set *(number*4)=function
set *(number*4+2)=KERNEL_ADDRESS - only kernel can handle interruptions
| number | new interruption number [ebp+8] |
| function | interruption handler [ebp+12] |
Definition at line 23 of file interrupts-asm.c.
| void setInterrupts | ( | void | ) |
Set system interruptions.
set syscall and errors handles
Definition at line 32 of file interrupts-asm.c.