The A20-Gate: It Wasn’t WordStar

Although WordStar was long suspected to be the reason (or at least one of the major reasons) for implementing the A20 gate hardware on the PC/AT and all the associated problems later on, it is now all but certain that that wasn’t the case.

To recap, the earliest versions of WordStar for the IBM PC were 3.02 (probably April or May 1982), and 3.20 (likely Summer 1982). Whatever version 3.02 did or didn’t do, it was not compatible with PC DOS 1.1 or later, and thus could not have been relevant when the PC/AT was being designed. WordStar 3.20 has now been examined and found not to use the CALL 5 system call interface or do anything else that would cause problems on the PC/AT. WordStar 3.2x did use the word at offset 6 in the PSP to query the available memory, but not the call at offset 5.

Then it turned out that a crucial piece of evidence has been hiding in (almost) plain sight all along. Richard Wells highlighted U.S. Patent 4,779,187, “Method and operating system for executing programs in a multi-mode microprocessor” by Gordon Letwin. The filing date of the patent is April 10, 1985, less than a year after the IBM PC/AT was introduced, when these sorts of problems would have been in fresh memory.

The patent contains the following text: Some programs written for the 8086 rely on [address wrap-around] to run properly. Unfortunately, memory locations extend above 1 megabyte in the real mode of the 80286 and are not wrapped to low memory locations. Consequently, programs including those written in MicroSoft PASCAL and programs which use the “Call 5 ” feature of MS-DOS will fail on the standard 80286 system.

Microsoft Pascal, huh? Two paragraphs later, Pascal is mentioned again, explaining how one might work around the problems: For example, no PASCAL programs are loaded into memory below 64K, and a special instruction is placed in the lower memory locations above 1 megabyte–for example, address 100000h or 100010h.

So… Pascal programs might have trouble when loaded below 64K? What does that have to do with the A20 line? A lot, it turns out. Continue reading

Posted in 286, IBM, Microsoft, PC history, WordStar | 30 Comments

Microsoft Editor

(This is a guest post by Antoni Sawicki aka Tenox)

In a recent blog post I lamented the lack of a good console/cmd/PowerShell text editor for Windows. During the process I made a rather interesting discovery, that in a fact there IS a “native” Windows, 32bit, console based text editor and it was available since earliest days of NT or even before. But let’s start from…

…in the beginning there was Z editor. Developed by Steve Wood for TOPS20 operating system in 1981. Some time after that, Steve sold the source code to Microsoft, which was then ported to MS-DOS by Mark Zbikowski (aka the MZ guy) to become the M editor.

M editor

Continue reading

Posted in Development, DOS, Editors, Microsoft, NT, OS/2, Source code, Uncategorized | 16 Comments

Making The Simpsons Sing

The talk is, in case it wasn’t clear, about the Kurzweil VGM MIDI synthesizer board. The two larger synthesizer chips are named Homer and Marge, and the three smaller ROM chips are Bart, Lisa, and Maggie. The VGM looks a lot like a typical Wave Blaster compatible daughterboard, but it’s not, and it wasn’t designed as such. It was in fact designed an expansion board for the Kurzweil PC88 keyboard, providing additional voices (the ‘V’) and General MIDI compatibility (the ‘GM’).

The Musical Simpsons Family

The VGM has a Wave Blaster style 26-pin connector, but can’t be attached to a standard WB-compatible sound card. The connector is the original mirrored version used by the E-mu Soundengine. The VGM can obviously be plugged into the PC88 keyboard. Which I don’t have. What I do have is the Soundengine module, and although the VGM does not really fit inside the chassis, it works just fine.

Actually, no, it doesn’t. The VGM in fact behaves rather strangely. Some MIDI sequences play more or less normally. Some sound wrong. Some produce no sound, and seem to completely turn the VGM off. What the heck is going on? Continue reading

Posted in E-mu, Kurzweil, MIDI, Sound | 2 Comments

Pascal Out Of Memory

Suppose you want to run the original 1981 vintage IBM Pascal 1.0 (supplied by Microsoft) on a PC that is less than 30 years old. Upon execution, PAS1.EXE may well fail with the following error:

Error: Compiler Out Of Memory

Given that the compiler was designed to run on the original IBM PC and only required 128K memory, why is it failing on a system with a lot more? The real reason is of course not that there isn’t enough memory, the problem is that there’s too much. Let’s see how that works (or rather doesn’t work) exactly. Continue reading

Posted in Bugs, Corrections, IBM, Microsoft, PC history | 38 Comments

Frequently Given Misleading Answers

The other day I came across this FGA item describing how to detect virtualized environments. It includes interesting comments which make Microsoft, Intel, and AMD sound stupid, but perhaps only reflect on the author being either deliberately misleading, or trying far too hard to sound smarter than everyone else.

Quoting the FGA:

According to Microsoft, a flag bit in the ECX register (bit #31, “Hypervisor present”), after executing CPUID with the EAX register set to 0x000000001, will be set to 1 in a (Microsoft) virtual machine and set to 0 on real hardware. This is indeed the official Hypervisor detection mechanism. It’s also the official detection mechanism for VMWare.

But here Microsoft and VMWare are incorrectly relying upon an accident of hardware implementation. Both Intel’s and AMD’s CPUID specifications state that bit #31 of the ECX register is reserved. Intel’s specification even explicitly states that one should not count on the value of the bit. That includes not counting on the fact of it being zero on real hardware. As such, Microsoft’s “official” detection mechanism is bogus.

Sadly, only the FGA itself is bogus. It makes several bold assumptions: Microsoft has absolutely no idea how to design software, Microsoft has zero influence on development of future CPUs, Intel and AMD have no idea how to design CPUs, and Intel and AMD have no idea how their existing CPUs work. Let’s take a look at the claims in detail. Continue reading

Posted in Corrections, Documentation, Virtualization | 8 Comments

Wanted: Console Text Editor for Windows

(This is a guest post by Antoni Sawicki aka Tenox)

Since 2012 or so Microsoft is pushing concept of running Windows Server headless without GUI and administering everything through PowerShell. I remember sitting through countless TechEd / Ignite sessions year after year and all I could see were blue PowerShell command prompts everywhere. No more wizards and forms, MMC and GUI based administration is suddenly thing of a past. Just take a look at Server Core, WinPE, Nano, PS Remoting, Windows SSH server, Recovery Console and Emergency Management Services. Even System Center is a front end for PowerShell. Nowadays everything seems to be text mode.

This overall is good news and great improvement since previous generations of Windows, but what if you need to create or edit a PowerShell, CMD script or some config file?

Oooops, looks like you are screwed. Seems that Redmond forgot to include most crucial tool in sysadmin’s job – a simple text mode editor. WTF Microsoft?

So, are there any 3rd party alternatives? Yes, and there are and quite a lot of them! Unfortunately none are perfect and most are old and unmaintained. This article aims to be a grand tour of whatever is available out there.

Continue reading

Posted in Editors, Microsoft, NT, Watcom | 15 Comments

Dumping Ensoniq Soundscape ROMs

Let us posit that one has a need to obtain an image of the instrument ROM of an Ensoniq Soundscape S-2000, Elite, or OPUS sound card. There are two basic approaches: A) Desolder or cut off the ROM chip, plug into a PROM reader, extract the data; or B) Design and write software to read the ROM contents and leave the hardware intact. Method A) is crude but effective—very simple but potentially destroys the card. So let’s see how method B) might be done.

First it is necessary to understand the architecture of the Ensoniq Soundscape. This text will focus on the original S-2000 and Elite, with a brief note on the newer Opus and VIVO cards.

Key components of Ensoniq S-2000 (1994)

The S-2000 is a 16-bit sound card with an onboard synthesizer and instrument ROM. The card is compatible with Sound Blaster and AdLib (Yamaha OPL2/OPL3) standards, as well as MPU-401 and General MIDI, but the compatibility is implemented purely in software (firmware in fact). The S-2000 has four major chips, clearly seen in the above photo: Ensoniq ODIE (ES 5706), the system interface and control gate array; Ensoniq OTTO (ES 5506), the wavetable synthesizer chip; Analog Devices AD1848, the audio codec; and Motorola 68EC000, the OBP (On-Board Processor). There is also 128KB of DRAM for use by the OBP, and an instrument ROM with 1 or 2 MB of data (our target).

Much like it was the case with E-mu/Creative, Ensoniq’s sound cards were essentially the respective company’s cut-down synthesizers on an ISA card; in Ensoniq’s case it was the TS-10/TS-12. The Soundscape was clearly not intended for musicians (it was a consumer/gaming card) and therefore had no sampler functionality (no sample RAM), even though the OTTO synthesizer could have handled it without trouble.

Note: For reasons which are not clear, certain people think that just because a chip has ‘(C) SEQUOIA DEV GRP’ etched on it, it must be called “Sequoia”. Sequoia Development Group was in fact a company specialized in developing MIDI equipment and is known to have provided the firmware for the Logitech Soundman Wave card (Yamaha OPL4 synthesizer) or  Samsung KS0164 and KS0165 synthesizer chips. The Ensoniq chip in question is clearly called ODIE.

Continue reading

Posted in Ensoniq, Software Hacks, Sound Blaster | 5 Comments

WordStar Again

While trying to work on my DOS 5.0 article, I looked at DOS 5.0 build 224 from June 1990, which is the oldest surviving beta of DOS 5.0. And the README contains the following intriguing text, which reminded me of previous WordStar ruminations:


Due to a known problem, some older versions of WORDSTAR don't
work correctly with this pre-release version DOS 5.0. We know
what the problem is, but the fix was not incorporated in time
for this beta release.
WORDSTAR 2000 seems to work fine with DOS 5.0.

This is of course maddening because it does not mention which version of WordStar might have trouble. Version 3.x? Version 4.x, which is in fact newer than WordStar 2000? Some other version? There were more than a few. Well, let’s try WordStar 3.24 (early 1983) since that’s what I happen to have on hand:

WS 3.24 does not like DOS 5.0 build 224

Yep, there certainly is some kind of problem. But lack of memory? Unlikely. So what is it then? Continue reading

Posted in DOS, PC history, WordStar | 74 Comments


For several years now I’ve been trying to continue the DOS history series and write (or rather finish) a DOS 5 page. While tracing the history of DOS 1.0 or 2.0 is quite difficult and the amount of source material is very limited, with DOS 5.0 there’s the opposite problem, too much information. Way too much.

Thanks to various lawsuits, thousands of internal Microsoft documents were made public. Dozens if not hundreds are relevant to DOS 5. There are documents which outline the development plans in detail, and there’s even a fairly comprehensive post-mortem report which is a great source of information about what actually happened (as opposed to the usual Microsoft pie in the sky unrealized plans, like a DOS 5 release in late 1989).

Finding the relevant documents is not easy. Some are long e-mail dumps where only a few bits are pertinent. Others are awful scans which defeat any OCR, but are still readable by someone who has a bit of context information. There is a lot to go through.

The next problem is how to condense the huge amount of raw information into something informative, readable, and accurate, without ending up like the infamous Wikipedia FAT entry which bears no resemblance to an encyclopedia article and makes a solid argument that too much information its just as bad as too little.

But I’m trying.

Posted in DOS, PC history, Random Thoughts | 12 Comments

About That Warranty…

Readers have been wondering what kind of valuable warranty users of Microsoft’s Quick Pascal 1.0 (and other products) might be voiding by running it on top of DR DOS 3.3x or 3.40. I don’t have the original Quick Pascal 1.0 package, but I have a BASIC 6.0 package from 1988 which likely used identical wording. Here’s the scan:

Microsoft’s warranty for BASIC 6.0

In other words, the “valuable warranty” was a very limited 90-day warranty that actually promised next to nothing. In practice Microsoft might refuse to support DR DOS users, but those would probably have little difficulty showing that the same bug occurs when running on top of MS-DOS. Continue reading

Posted in Digital Research, Microsoft, PC history, Undocumented | 16 Comments