pit_once.S 339 B

12345678910111213141516171819
  1. #include "common.h"
  2. BEGIN
  3. IVT_PIT_SETUP
  4. /* Operating mode: 0 rate generator. */
  5. OUTB $0b00110000, PORT_PIT_MODE
  6. /* TODO: Set the counter to 1. */
  7. mov $0x01, %al
  8. out %al, PORT_PIT_CHANNEL0
  9. mov $0x00, %al
  10. out %al, PORT_PIT_CHANNEL0
  11. sti
  12. jmp .
  13. handler:
  14. cli
  15. PUTC $'a
  16. PIC_EOI
  17. sti
  18. iret