bios_sleep.S 355 B

123456789101112131415161718192021
  1. #include "common.h"
  2. BEGIN
  3. /* Must enable interrupts, since BIOS uses
  4. * them to increment the timer.
  5. */
  6. sti
  7. mov $0, %dx
  8. infinite:
  9. mov $18, %cx
  10. mov 0x046C, %bx
  11. one_sec:
  12. mov 0x046C, %ax
  13. cmp %ax, %bx
  14. je one_sec
  15. mov %ax, %bx
  16. loop one_sec
  17. PRINT_WORD_HEX <%dx>
  18. PRINT_NEWLINE
  19. inc %dx
  20. jmp infinite