88 lines
888 B
ArmAsm
Executable File
88 lines
888 B
ArmAsm
Executable File
%macro ISR 1
|
|
global isr%1
|
|
isr%1:
|
|
cli
|
|
push byte 0
|
|
push byte %1
|
|
jmp isr_common
|
|
%endmacro
|
|
|
|
%macro ISR_ERR 1
|
|
global isr%1
|
|
isr%1:
|
|
cli
|
|
push byte %1
|
|
jmp isr_common
|
|
%endmacro
|
|
|
|
%macro IRQ 2
|
|
global irq%1
|
|
irq%1:
|
|
cli
|
|
push byte 0
|
|
push byte %2
|
|
jmp isr_common
|
|
%endmacro
|
|
|
|
ISR 0
|
|
ISR 1
|
|
ISR 2
|
|
ISR 3
|
|
ISR 4
|
|
ISR 5
|
|
ISR 6
|
|
ISR 7
|
|
ISR_ERR 8
|
|
ISR 9
|
|
ISR_ERR 10
|
|
ISR_ERR 11
|
|
ISR_ERR 12
|
|
ISR_ERR 13
|
|
ISR_ERR 14
|
|
ISR 15
|
|
ISR 16
|
|
ISR_ERR 17
|
|
ISR 18
|
|
ISR 19
|
|
ISR 20
|
|
ISR 21
|
|
ISR 22
|
|
ISR 23
|
|
ISR 24
|
|
ISR 25
|
|
ISR 26
|
|
ISR 27
|
|
ISR 28
|
|
ISR 29
|
|
ISR_ERR 30
|
|
ISR 31
|
|
|
|
|
|
extern fault_handler
|
|
|
|
isr_common:
|
|
pusha
|
|
push ds
|
|
push es
|
|
push fs
|
|
push gs
|
|
mov ax, 0x10
|
|
mov ds, ax
|
|
mov es, ax
|
|
mov fs, ax
|
|
mov gs, ax
|
|
mov eax, esp
|
|
push eax
|
|
|
|
mov eax, fault_handler
|
|
call eax
|
|
|
|
pop eax
|
|
pop gs
|
|
pop fs
|
|
pop es
|
|
pop ds
|
|
popa
|
|
add esp, 8
|
|
iret
|