2019-07-19 00:00:00 +00:00
|
|
|
/* https://github.com/cirosantilli/x86-bare-metal-examples#pit_sleep_ticks */
|
2018-12-04 09:46:27 +00:00
|
|
|
|
2015-11-11 09:23:01 +01:00
|
|
|
#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
|