mirror of
https://github.com/cfenollosa/os-tutorial.git
synced 2025-12-17 20:34:36 +03:00
Lesson 23, step 6
This commit is contained in:
@@ -15,6 +15,7 @@ isr_common_stub:
|
||||
mov gs, ax
|
||||
|
||||
; 2. Call C handler
|
||||
cld ; C code following the sysV ABI requires DF to be clear on function entry
|
||||
call isr_handler
|
||||
|
||||
; 3. Restore state
|
||||
@@ -25,7 +26,6 @@ isr_common_stub:
|
||||
mov gs, ax
|
||||
popa
|
||||
add esp, 8 ; Cleans up the pushed error code and pushed ISR number
|
||||
sti
|
||||
iret ; pops 5 things at once: CS, EIP, EFLAGS, SS, and ESP
|
||||
|
||||
; Common IRQ code. Identical to ISR code except for the 'call'
|
||||
@@ -47,7 +47,6 @@ irq_common_stub:
|
||||
mov gs, bx
|
||||
popa
|
||||
add esp, 8
|
||||
sti
|
||||
iret
|
||||
|
||||
; We don't get information about which interrupt was caller
|
||||
@@ -328,97 +327,81 @@ isr31:
|
||||
|
||||
; IRQ handlers
|
||||
irq0:
|
||||
cli
|
||||
push byte 0
|
||||
push byte 32
|
||||
jmp irq_common_stub
|
||||
|
||||
irq1:
|
||||
cli
|
||||
push byte 1
|
||||
push byte 33
|
||||
jmp irq_common_stub
|
||||
|
||||
irq2:
|
||||
cli
|
||||
push byte 2
|
||||
push byte 34
|
||||
jmp irq_common_stub
|
||||
|
||||
irq3:
|
||||
cli
|
||||
push byte 3
|
||||
push byte 35
|
||||
jmp irq_common_stub
|
||||
|
||||
irq4:
|
||||
cli
|
||||
push byte 4
|
||||
push byte 36
|
||||
jmp irq_common_stub
|
||||
|
||||
irq5:
|
||||
cli
|
||||
push byte 5
|
||||
push byte 37
|
||||
jmp irq_common_stub
|
||||
|
||||
irq6:
|
||||
cli
|
||||
push byte 6
|
||||
push byte 38
|
||||
jmp irq_common_stub
|
||||
|
||||
irq7:
|
||||
cli
|
||||
push byte 7
|
||||
push byte 39
|
||||
jmp irq_common_stub
|
||||
|
||||
irq8:
|
||||
cli
|
||||
push byte 8
|
||||
push byte 40
|
||||
jmp irq_common_stub
|
||||
|
||||
irq9:
|
||||
cli
|
||||
push byte 9
|
||||
push byte 41
|
||||
jmp irq_common_stub
|
||||
|
||||
irq10:
|
||||
cli
|
||||
push byte 10
|
||||
push byte 42
|
||||
jmp irq_common_stub
|
||||
|
||||
irq11:
|
||||
cli
|
||||
push byte 11
|
||||
push byte 43
|
||||
jmp irq_common_stub
|
||||
|
||||
irq12:
|
||||
cli
|
||||
push byte 12
|
||||
push byte 44
|
||||
jmp irq_common_stub
|
||||
|
||||
irq13:
|
||||
cli
|
||||
push byte 13
|
||||
push byte 45
|
||||
jmp irq_common_stub
|
||||
|
||||
irq14:
|
||||
cli
|
||||
push byte 14
|
||||
push byte 46
|
||||
jmp irq_common_stub
|
||||
|
||||
irq15:
|
||||
cli
|
||||
push byte 15
|
||||
push byte 47
|
||||
jmp irq_common_stub
|
||||
|
||||
Reference in New Issue
Block a user