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

25 lines
350 B
ArmAsm
Raw Normal View History

2015-11-09 14:29:15 +01:00
/*
# PIT protected mode
*/
#include "common.h"
BEGIN
STAGE2
CLEAR
PROTECTED_MODE
IDT_SETUP_48_ISRS
REMAP_PIC_32
2015-11-09 14:29:15 +01:00
OUTB $0b00110100, PORT_PIT_MODE
PIT_SET_MIN_FREQ
sti
jmp .
IDT_48_ENTRIES
interrupt_handler:
pop %eax
VGA_PRINT_HEX_4 <%eax>
OUTB $0x61, $0x20
2015-11-09 14:29:15 +01:00
PIC_EOI
add $4, %esp
2015-11-09 14:29:15 +01:00
sti
iret