Missing DR-DOS Power Management Source Code Found In Patent

A DR-DOS console showing the IDLE command

Modern processors come with all kinds of power management features, which you don’t typically notice as a user until you start a heavy program and hear the CPU fan spin up. Back in the early 1990s however, power management was largely unheard of, meaning that a CPU with nothing to do would run through an idle loop that dissipated about as much power as a real computing task. [Michal Necasek] noticed this while experimenting with DR-DOS 6.0 in a virtual machine – his laptop fan would start running on full blast whenever he opened the VM. His search for a solution to this annoyance led him down a fascinating journey into the intricacies of DOS power management.

As it turned out, DR-DOS 6.0 does have functionality built in for putting the CPU in power saving mode when it’s idle. This feature is not complete, however: Digital Research required each computer manufacturer to develop an IDLE driver customized to their specific hardware platform in order to enable power management. Sadly, no manufacturer ever bothered to do so, leaving [Michal] with no option other than writing a driver himself. While there was some documentation available, it didn’t include any example code or sufficient detail to write a driver from scratch.

A snippet of x86 assembly code found in a patentWhat it did include was a reference to U.S. Patent No. 5,355,501. Normally this sort of information is of interest only to those planning to sell a competing system, but this specific patent happens to include dozens of pages of well-documented but poorly-scanned x86 assembly code, including source code for a basic IDLE86.SYS driver. As [Michal] wasn’t looking forward to chasing bugs caused by OCR errors, he simply copied the source code by hand, then ran it through an assembler. The end result was a working IDLE driver, which is now available for download from his website.

[Michal]’s blog post also includes lots of details on early power saving implementations, including all the DOS interrupt calls involved in the process. Patents might seem boring in contrast, but they sometimes contain surprising amounts of usable information. You might find enough details to reverse-engineer a wireless protocol, or even to help track down an obscure instrument’s original designer.

20 thoughts on “Missing DR-DOS Power Management Source Code Found In Patent

    1. DR-DOS allowed me to run 4 instances of WWIV BBS on a 486DX2. Two Zyxel and two US Robotics modems. 20GB of downloads (on request, CD/tape library), 450 feeds/channels. I still have my source code for the last refresh. A tweaker stole the hardware and I never dialed a BBS again, but it was fun while it lasted.

      1. Almost every BBS Sysop I know still has a backup copy of their old board sitting on a shelf in case they can ever bring it back. They were amazing communities, and I miss them.

        1. Yeah, I have some 3.5’s around somewhere, buried, I’m sure…. maybe even a ZIP cartridge. I wonder how much data has been lost? I would love to get back my copy of TheDraw and all the art I did with it, if not my two WWIV and TAG boards.

          NPD4life :P

  1. Despite the Alice Supreme Court decision to stop software patents, the USPTO keep granting them.

    In Europe, software patents is coming back with the installation of the Unified Patent Court (UPC), where the issue of software patents cannot go to the CJEU, because it’s a deal between some countries, and the EU is not signatory of the European Patent Convention, and its disputed articles EPC52.2 (computer programs) and EPC52.3 (as such). The EPO has used the “as such” loophole to grant sofware patents anyhow, and after failing to change the law with the failed 2005 software patent directive, the patent lobby prefered to change the judges instead of changing the law. Now we have Nokia (and Airbus or Bose patent attorneys) as a part time judges in such a court:


    Now we need to go back to Court on the 1st of June when they launch the new Court as EU law cannot be removed out of National Courts (art19.1 TEU (clarified in 2011 in the previous attempt to build such a court in Opinion 1/09) and art267TFEU (National Courts being deprived to interpret EU law)). Last time National Courts were deprived to interpret EU law, it did not end up well, in Achmea (2017), the CJEU found that intra-EU investment courts that had to interpret EU law were not “common courts”, and not part of the judicial system part provided by art19.1 TEU:


    Basically the patent lobby wanted its own court to do whatever they wanted, without any control of the CJEU, the European Parliament or the Council of Ministers.

    Specialized patent courts are the ones pushing for patent trolls, as this new court will also be self-financed, meaning the more litigation it creates, the more money it gets to finance the high salary of the judges. Guess why the court fees are 20.000EUR instead of the 500EUR that you find in several countries around Europe.

    We have to stop them.

  2. Well done finding it in the patent. Over on the physical hardware side building devices based on their patents has yielded extremely mixed results. I don’t understand why people choose to obfuscate these. The patent documentation will long outlive your product’s utility; make the damn thing useful.

    1. The idea is that if a competitor can actually glean useful information from the patent, they might be able to use something they learned from the patent while designing their product to just not quite infringe on it. This incentivises patents that are vague enough that a competitor can’t learn anything useful from them, yet broad enough that if they do end up learning something they can’t easily get around the patent by changing their approach.

      How any of this is meant to encourage innovation, the theoretical goal of the patent system, is beyond me. I guess it creates a lot of inventive ways to write patents.

      1. The original idea behind patents are that instead of keeping your invention secret (a trade secret), you publish it and get a ~20 year monopoly for utilizing it in exchange. This is supposed to foster innovation through sharing ideas. Others could build on your invention, etc. Also, the intent was to protect small inventors from large, powerful corporations.

        Now, needless to say, it hasn’t been the way for a long time this game is played. Lawyers and companies figured out a way to both say nothing informative in the patent but cover as much as they can and also to try to hide how trivial the so called invention is a lot of the time.

  3. To those using MS-DOS 6.x in a VM.. There’s a third-party utility called “DOSIDLE”.
    It will detect when programs are idling and either uses APM BIOS or the HLT instruction directly.

    For Windows 3.1x running 386 Enchanted Mode, there’s “WQGHLT”.
    For Windows 9.x, there’s Rain, Watterfall or amnhltm.vxd.

  4. I’d look into neural networks with assembly with human interaction and how they can be viewed without actually being at a machine doing exercises. Hallucination at it’s worst but just a simple message being viewed by individuals about, “continue anyway,” driver continuing to be viewable but limited to computer networks or individuals with the implant of they want that.

    1. I wonder when AI algorithms will start to analyze their own code base. Will it be like self-modifying code in the early CISC days, when the first computer viruses/trojans appeared in the wild (say i386 days, before internal CPU caches got in the way)?

  5. “Back in the early 1990s however, power management was largely unheard of, meaning that a CPU with nothing to do would run through an idle loop that dissipated about as much power as a real computing task.”

    That’s not wrong, I suppose, but I think I must explain something to the younger readers here:

    PCs in the early 90s ranged from 8088 to 80486 systems (486DX2).
    And contrary to popular belief, they weren’t power hungry monstrosities. Rather the contrary.

    Such old PCs had not seldomly 150W PSUs installed and their CPUs had passive cooling, if at all. Yes, you read correctly. If at all. The majority of 808x-80386 systems had no heatsinks installed. The components got hand-warm, usually. Likewise, graphics cards drew little power. They didn’t need a separate power chord, even.

    I think that’s to be kept in mind if we talk about old systems not having power savings.

    That being said, HDDs of the early 90s already had their own power-management. Spin-down was either done via HDD itself, without asking PC for permission. Or through setting the spin-down time-out in CMOS Setup Utility.

    Also, processors like the 80286 existed in low-power versions. 80L286, for example. These CPUs had a static-design sometimes and could be underclocked/halted no problem. The 80386 also had introduce 386SL models, which were low-power and supported SMM, which could be used to put a system into hibernation.

    Another thing to consider:
    Are changes in temperature good for microchips and other electric components?
    I have my doubts. A PC that runs at a constant load without up-/down clocking causes less spikes on the mains.

    Secondly, PC monitors of the time did see screensaver use, which already was an upgrade compared to the 80s. However, it’s not as if modern monitors of the early 90s had no power savings. They had. If no VGA signal was seen (blank screen and/or no sync) they would go into stand-by mode.

    On systems like Windows 3.x or PC GEOS, someone simply had to select a “blank” screen saver to trigger the stand-by feature of a semi-modern PC monitor.

    You see, the people back then weren’t stupid. They considered workarounds to get things working years before official standards like APM BIOS or ACPI had been introduced and in common use.

  6. I have several DOS virtual machines. When it comes to idling, POWER.EXE that came with MS-DOS 6 and PC DOS 7 indeed do well in taming the host CPU. Conversely, DR DOS 6.0 gets the fans whirring in a hurry. I’ve tried DOSidle (as well as a few similar programs) within DR DOS, all without success. I’m wondering if anyone has a CPU idle utility working with DR DOS 6.0 (BTW, I use VMware Workstation)?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.