pit.S 333 B

123456789101112131415161718
  1. #include "common.h"
  2. BEGIN
  3. IVT_PIT_SETUP
  4. PIT_GENERATE_FREQUENCY
  5. PIT_SET_MIN_FREQ
  6. /* If we comment out sti, nothing happens, because the PIT interrupts are maskable. */
  7. sti
  8. jmp .
  9. handler:
  10. cli
  11. PUTC $'a
  12. PUTC $'\n
  13. /* EOI: it will not fire again unless we reset it. */
  14. PIC_EOI
  15. sti
  16. iret