6 ms·
When a DOS VM does not have any power management, the laptop quickly lets me know by kicking up the fan speed. An examination of the source code for the PC/AT
by userbinator 4y ago
When a DOS VM does not have any power management, the laptop quickly lets me know by kicking up the fan speed.
An examination of the source code for the PC/AT BIOS reveals what it actually does when waiting for input on INT 16/AH=0 --- it polls the keyboard buffer in a loop that also appears to repeatedly update the keyboard LED indicator status, and one of the instructions that it executes (with interrupts enabled) is a NOP. Naturally, that makes one wonder whether simply replacing that NOP with a HLT would be sufficient to idle the CPU, and if so, why didn't IBM do that originally; and what newer BIOSes do.
The 6A69MV39 AWARD BIOS I inspected (from 1999) looks similar, but loops with a "delay" created by reading from I/O port 0EBh.
- bombcar 4y agoWhat would unHLT it? The next timer tick?
- userbinator 4y agoIt stops execution until an interrupt occurs. https://en.wikipedia.org/wiki/HLT_(x86_instruction) https://en.wikipedia.org/wiki/HLT_(x86_instruction)