2018-12-04 09:46:27 +00:00
|
|
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#idt */
|
|
|
|
|
|
2015-10-21 21:41:07 +02:00
|
|
|
#include "common.h"
|
|
|
|
|
BEGIN
|
|
|
|
|
STAGE2
|
|
|
|
|
CLEAR
|
|
|
|
|
PROTECTED_MODE
|
2015-10-23 17:57:12 +02:00
|
|
|
IDT_SETUP_ENTRY $0, $handler
|
2015-10-21 21:41:07 +02:00
|
|
|
lidt idt_descriptor
|
|
|
|
|
int $0
|
|
|
|
|
jmp .
|
2015-10-23 17:57:12 +02:00
|
|
|
IDT_START
|
|
|
|
|
IDT_ENTRY
|
|
|
|
|
IDT_END
|
2015-10-21 21:41:07 +02:00
|
|
|
handler:
|
|
|
|
|
VGA_PRINT_STRING $message
|
|
|
|
|
iret
|
|
|
|
|
message:
|
2015-10-28 18:36:31 +01:00
|
|
|
.asciz "int 0 handled"
|