The operating system variously known as ‘Multitasking MS-DOS 4.0’ or ‘European MS-DOS’, to avoid confusion with the better-known single-tasking MS-DOS 4.0, has the mildly irritating flaw that it doesn’t invoke the
HLT instruction that stops the CPU when the system is idle. This has the effect that whenever the OS is run in a virtual machine, CPU usage of the host spikes to 100%, whether the guest is actually doing anything or not, inevitably leading to my laptop CPU fan revving up with an all-too-familiar noise.
There doesn’t seem to be a simple, obvious way to remedy this. Unlike the mainstream edition of the OS, there is not an idle interrupt to which one can hook a TSR which can invoke
HLT on its own. Having studied (what I assume to be) the kernel idle loop in a debugger, there doesn’t even seem to be any room to squeeze in a
HLT instruction by patching the kernel. Here it is disassembled:
0506:3DE0 0E PUSH CS 0506:3DE1 1F POP DS 0506:3DE2 FB STI 0506:3DE3 F6066105FF TEST BYTE PTR ,FF 0506:3DE8 74F8 JZ 3DE2 0506:3DEA E832FD CALL 3B1F 0506:3DED EBF1 JMP 3DE0
Is there a way to inject a halt instruction into the idle loop somewhere?