Files
x86-bare-metal-examples/pit_once.S
2018-12-04 09:46:27 +00:00

21 lines
403 B
ArmAsm

/* https://github.com/cirosantilli/x86-bare-metal-examples# */
#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