Sleeping in real-mode
Posted: Sun Jul 01, 2012 3:12 pm
Hello everybody,
I'm working on a boot sector, related to the "512 byte challenge" as posted here: http://forum.osdev.org/viewtopic.php?f=1&t=25492
For that I wondered if I could code snake in 512 bytes, so I went ahead to work on that. But now I need to sleep for some interval. I found an interrupt providing a timer that ticks at approximately 18.2 Hz, but I need something more accurate. Is there any way provided by the BIOS to sleep, or to retrieve the approximate time in milliseconds?
Worst case I'll run the same instruction(s) for a larger number of times, but I'd rather have a better solution.
Any ideas?
Thanks in advance
I'm working on a boot sector, related to the "512 byte challenge" as posted here: http://forum.osdev.org/viewtopic.php?f=1&t=25492
For that I wondered if I could code snake in 512 bytes, so I went ahead to work on that. But now I need to sleep for some interval. I found an interrupt providing a timer that ticks at approximately 18.2 Hz, but I need something more accurate. Is there any way provided by the BIOS to sleep, or to retrieve the approximate time in milliseconds?
Worst case I'll run the same instruction(s) for a larger number of times, but I'd rather have a better solution.
Any ideas?
Thanks in advance