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

21 lines
406 B
ArmAsm
Raw Normal View History

/* https://github.com/cirosantilli/x86-bare-metal-examples#pit */
2018-12-04 09:46:27 +00:00
#include "common.h"
BEGIN
IVT_PIT_SETUP
/* Operating mode: 0 rate generator. */
OUTB $0b00110000, PORT_PIT_MODE
/* TODO: Set the counter to 1. */
mov $0x01, %al
out %al, PORT_PIT_CHANNEL0
mov $0x00, %al
out %al, PORT_PIT_CHANNEL0
sti
jmp .
handler:
cli
PUTC $'a
PIC_EOI
sti
iret