blob: 235f46b9b423ebb5ca0367e676c6f84ef95d6035 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
section .asm
extern int21h_handler
extern default_int_handler
global int21h
global default_handler
global idt_load
idt_load:
push ebp
mov ebp, esp
mov ebx, [ebp + 8]
lidt [ebx]
pop ebp
ret
int21h:
cli
pushad ; Push all general-purpose registers to the stack
call int21h_handler
popad
sti
iret
default_handler:
cli
pushad ; Push all general-purpose registers to the stack
call default_int_handler
popad
sti
iret
|