mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2025-12-18 04:44:35 +03:00
Lesson 23, section 6
This commit is contained in:
@@ -71,7 +71,13 @@ extern void irq15();
|
||||
#define IRQ14 46
|
||||
#define IRQ15 47
|
||||
|
||||
/* Struct which aggregates many registers */
|
||||
/* Struct which aggregates many registers.
|
||||
* It matches exactly the pushes on interrupt.asm. From the bottom:
|
||||
* - Pushed by the processor automatically
|
||||
* - `push byte`s on the isr-specific code: error code, then int number
|
||||
* - All the registers by pusha
|
||||
* - `push eax` whose lower 16-bits contain DS
|
||||
*/
|
||||
typedef struct {
|
||||
uint32_t ds; /* Data segment selector */
|
||||
uint32_t edi, esi, ebp, useless, ebx, edx, ecx, eax; /* Pushed by pusha. */
|
||||
@@ -80,10 +86,10 @@ typedef struct {
|
||||
} registers_t;
|
||||
|
||||
void isr_install();
|
||||
void isr_handler(registers_t r);
|
||||
void isr_handler(registers_t *r);
|
||||
void irq_install();
|
||||
|
||||
typedef void (*isr_t)(registers_t);
|
||||
typedef void (*isr_t)(registers_t*);
|
||||
void register_interrupt_handler(uint8_t n, isr_t handler);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user