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

27 lines
497 B
ArmAsm
Raw Normal View History

/* https://github.com/cirosantilli/x86-bare-metal-examples#pit_sleep_ticks */
2018-12-04 09:46:27 +00:00
2015-11-11 12:12:40 +01:00
#include "common.h"
BEGIN
STAGE2
CLEAR
PROTECTED_MODE
IDT_SETUP_48_ISRS
REMAP_PIC_32
PIT_GENERATE_FREQUENCY
PIT_SET_FREQ 1000
sti
loop:
VGA_PRINT_STRING $message
PIT_SLEEP_TICKS $500
jmp loop
IDT_48_ENTRIES
PIT_SLEEP_TICKS_GLOBALS
interrupt_handler:
cmp PIT_ISR_NUMBER, 4(%esp)
jne not_pit
PIT_SLEEP_TICKS_HANDLER_UPDATE
not_pit:
ret
message:
.asciz "a"