Files
x86-bare-metal-examples/interrupt.S

17 lines
336 B
ArmAsm
Raw Normal View History

2018-12-04 09:46:27 +00:00
/* https://github.com/cirosantilli/x86-bare-metal-examples#interrupts */
2015-09-21 09:43:03 +02:00
#include "common.h"
BEGIN
CLEAR
DBG
/* Set address of the handler for interrupt 0. */
2015-09-21 09:43:03 +02:00
movw $handler, 0x00
/* Set code segment of the handler for interrupt 0. */
2015-10-04 19:59:15 +02:00
mov %cs, 0x02
2015-09-24 10:17:28 +02:00
int $0
PUTC $'b
hlt
2015-09-21 09:43:03 +02:00
handler:
PUTC $'a
2015-09-24 10:17:28 +02:00
iret