Strange thing is, when it's running, the computer emits a strange buzzing sound, (It is *not* the PC speaker), almost like a series of fast clicks. This is slightly disturbing.
The PIT is set for approximately 1000 kHz, and fires an interrupt on every tick. The isr increments a counter, checks for things to do and then usually returns.
Also, I have an idle loop running, most of the time, that looks like this:
Code: Select all
while (some_variable != some_value)
{
asm volatile ("pushf ; sti ; hlt ; popf");
}
The code is available at ShareSource. Check out and build with:
Code: Select all
$ hg clone http://hg.sharesource.org/marionette
$ scons --help # look at build options
$ scons
If you don't have Mercurial, use this link.