bios_tick_count.S 384 B

123456789101112131415161718192021
  1. /*
  2. # BIOS tick count
  3. Method mentioned at: http://stackoverflow.com/a/9973442/895245
  4. TODO Not working on QEMU 2.3.0: the value does not get updated!
  5. But if I run qemu many times in a sequence, it does seem to get incremented...
  6. */
  7. #include "common.h"
  8. BEGIN
  9. start:
  10. mov 0x046C, %ax
  11. #cmp %ax, %bx
  12. #je start
  13. PRINT_WORD_HEX
  14. PRINT_NEWLINE
  15. #mov %ax, %bx
  16. jmp start