Files
x86-bare-metal-examples/test_pit_sleep.S
2015-11-11 12:15:29 +01:00

25 lines
363 B
ArmAsm

/*
Test PIT_SLEEP_TICKS.
Expected output: `a\n` gets printed with frequency 2Hz.
*/
#include "common.h"
BEGIN
IVT_PIT_SETUP
PIT_GENERATE_FREQUENCY
PIT_SET_FREQ 1000
sti
loop:
PUTC $'a
PUTC $'\n
PIT_SLEEP_TICKS $500
jmp loop
PIT_SLEEP_TICKS_GLOBALS
handler:
cli
PIT_SLEEP_TICKS_HANDLER_UPDATE
PIC_EOI
sti
iret