4 ms·
Idle DR-DOS
- PreInternet01 4y agoI continue to be amazed by Michal Necasek's ability to deeply care about things that literally nobody has even thought about for decades. Kudos! Power management under DOS on early x86 laptops was downright primitive. There were no standards of any kind (I'd never even heard of the DR-DOS $IDLE$ device until now, but it doesn't seem like that gained any kind of traction at the time), not even BIOS-based abstractions. Just vendor-provided 'drivers' (in name only: it's not like DOS made any distinction between system and user code) that directly communicated with the hardware. Unsurprisingly, that all broke down as soon as you did anything even remotely interesting. Run QEMM386? No power management for you! Have a certain PCMCIA card inserted? Ditto! And shipping any kind of updates took forever at that time (literally FedExing floppies...), so getting a working system was pretty much impossible.
- mysterydip 4y agoWhat I find interesting is things like the Atari Portfolio and HP 200LX could run their versions of DOS for quite a while on a couple AA batteries.
- bombcar 4y agoIIRC they had some basic "suspend to RAM" where when they closed they just barely kept the RAM alive and didn't power anything else.
- p_l 4y agoWhile Atari Portfolio used the CMOS version of 8088, I believe HP ones made the jump to 80186 (or compatibles) which AFAIK had, among other things, dynamic frequency setting
- bombcar 4y agoCorrect - the x00LX (I think the 95 also) were one of the few mass produced computers to use the rare 186.
- bitwize 4y agoThe HP 200LX and similar used a 186-compatible CPU called "Hornet". Using an actual 80186 in a PC compatible would have been damn near impossible; the 186 was a system-on-chip design that had built-in timers, an interrupt controller, and other gubbins. Some of these were mapped to devices that had other devices mapped to them in the PC design, so building a 186-based system that met the common threshold for PC compatibility (i.e. it ran the IBM versions of Lotus and Flight Simulator acceptably well) was a nearly insurmountable task. Because it acted more like a real OS, with user programs calling through driver APIs rather than touching the hardware directly, with the right driver support Windows could run on a 186-based system; one (the Tandy 2000) was used to develop Windows 1.0's color modes because it had a high-resolution 8-color display before the EGA came out: https://www.1000bit.it/lista/t/tandy/tandy2000_ad.jpg https://www.1000bit.it/lista/t/tandy/tandy2000_ad.jpg ISA-compatible "clones" of the 186, like the NEC V40 and the "Hornet", did not have the SoC problem and could be used in PC-compatible system designs.
- userbinator 4y agoIn other words, it has a 186-class ISA but isn't the actual 186 SoC.
- pdw 4y agoIt was never really clear to me if the "Hornet" was a custom design Intel did for HP or if "Hornet" was just the codename for the 80C186EA, a 186 with added powersaving support. Either way those palmtops were quite cool machines.
- rep_lodsb 4y agoFor what it's worth, I've used a HP 200LX to confirm that some undocumented details (found by disassembling microcode) work as expected: REP BOUND only compares against lower bound REP MUL result in AH (byte) or SP (word) REP IMUL result in CH (byte) or BP (word) REP IMUL reg,r/m,i16 first operand ignored, 32 bit result in DX:AX REP IMUL reg,r/m,i8 first op ign., AH=result bit 23..16, AL=bit 7..0 AAM 00H no "divide by zero" exception, AH=FFh, AL unchanged So it's certainly based on the 80186 microcode, as none of these instructions do the same on any other x86 chip.
- davidthewatson 4y agoDitto. Same feeling here. Kudos, indeed!
- bradneuberg 4y agoThis is pretty epic work, nicely done!
- NelsonMinar 4y agoThis must be the first time in history when the technical information in a software patent was actually useful.
- bombcar 4y agoA requirement that a software patent compile and run would be a welcome one.
- qingcharles 4y agoThis is an awesome article, but I was hoping for a copy of the final source and MAKE files on Github...
- unnouinceput 4y agoSpoon-fed kids nowadays, sheesh. In my days an .img file was a godsend. You'd took it as your precious and ran away with it. A bit of disassembler and you were good to go. I recommend Ghidra, you'll learn a valuable skill, namely reverse engineering, trust me, will give a very nice thrill of the hunt.
- qingcharles 4y agoBelieve me, I've done my time in the trenches. I've disassembled enough x86 machine code to get my sick kicks. And I did a lot of it using DEBUG.EXE, the monster that I am!
- bombcar 4y agoMemories of inputting small COM programs with debug so I could jump start serial communications and bring over bigger guns - good bad times!
- iforgotpassword 4y agoShould I feel uncool now for having used gwbasic for that? ;)
- bombcar 4y agoLook at this fancy dude having gwbasic ha! We were lucky to find a DEBUG laying around, some poor slobs were stuck with EDLIN.
- tonyarkles 4y agoI remember back in the day magazines would provide small utility programs as statements to enter into DEBUG.
- userbinator 4y agoWhen 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)