Learn Something Old Every Day, Part III

As part of a hobby project, I set out to reconstruct assembly source code that should be built with an old version of MASM and exactly match an existing old binary. In the process I learned how old MASM versions worked, and why programmers hated MASM. Note that “old versions” in this context means MASM 5.x and older, i.e. older than MASM 6.0.

The way old MASM works is relatively straightforward but its documentation often explains it very poorly or not at all. MASM is a two-pass assembler, and that indirectly explains almost everything about its quirks. This is different from more modern N-pass assemblers which automatically run multiple passes to resolve ambiguities.

The core of the problem is that MASM tries to be clever, but it’s not nearly clever enough. It is very questionable whether MASM’s cleverness is a solution or a problem; other assemblers are stricter, relying on programmers to resolve ambiguities. This perhaps puts slightly more of a burden on the programmer but results in more readable, consistent source code.

Most ambiguities result from the fact that like most assemblers, MASM does not require symbols to be declared before they’re referenced. In the first pass, MASM generates “provisional” code, making guesses about what unknown symbols are. At the end of the first pass, all symbols are known (if they’re not, the assembly will fail).

In the second pass, MASM applies what it learned in the first pass and generates the final object code. If the guesses made in the first pass turn out to be incompatible with the second pass, MASM will report the dreaded “phase error”. More about that later.

Continue reading
Posted in Assembler, Development, Microsoft, PC history | 11 Comments

PC-86-DOS

A number of years ago, an 8″ disk containing Seattle Computer Products (SCP) 86-DOS 1.0 was successfully imaged. The newest files on the disk are dated April 30, 1981, making the disk the oldest complete release of what was soon to be known as PC DOS and MS-DOS, about a month older than a pre-release of PC DOS from early June 1981.

While it is possible to run the 8″ disk image with 86-DOS version 1.00 under an emulator, it of course doesn’t run on a PC or any PC emulator/virtualizer. That’s a shame because most of the utilities included with SCP’s 86-DOS run under DOS just fine. In theory, it should be possible to provide a PC compatible “BIOS” component (IBMBIO.COM or IO.SYS equivalent) and run the rest of the system more or less unmodified on a PC.

In practice, it can in fact be done. Behold PC-86-DOS 1.00, running from this disk image:

SCP’s 86-DOS 1.00 on a PC

Actually achieving this wasn’t complicated but there was one non-trivial snag.

Continue reading
Posted in Development, DOS, IBM, PC history | 18 Comments

The Dual-Drive IDE Hell

I have perhaps inaccurate but very strong memories from my PC-building days (in the early to mid-1990s) that one of the most failure-prone and frustrating endeavors was trying to get two IDE drives working together on a single cable as a master/slave pair, or as Device 0/1 in the language of the ATA Standard.

It’s not that it was fundamentally impossible… but it was insanely random and unpredictable. No one could tell in advance whether any given pair of IDE drives would work. Mixing drive vendors seemed to increase the likelihood of failure, but using two drives from the same vendor was by no means a guarantee of success.

Various jumpers used for configuring IDE hard disks

There were two major reasons for why this was the case:

  • The whole thing started out as a giant hack, pretending that two separate IDE drives are really two drives attached to a single AT style controller.
  • The vast majority of IDE users only ever had one drive, thus not putting enough pressure on IDE vendors to get their act together.

Eventually, by the late 1990s, things did work reasonably well. The key ingredient was cable select and (barely) special cables which allowed all drives to be configured identically and work as either master or slave depending on their cable position. This was not exactly a revolutionary concept; PC floppy drives and ST506 interface hard disks used the same idea, using a twist in the cable, since the early 1980s.

Continue reading
Posted in IDE, PC hardware, PC history | 20 Comments

Drive Price Mystery

While digging into the history of DoubleSpace and DriveSpace, I came across a handy article about the rocky relationship between Stac Electronics and Microsoft. Only I was distracted by the bold claim (certainly claimed in very bold letters) that a 40 MB drive cost $1,200 in 1989. Now, I don’t have a good sense of what cost how much in the US of A in 1989, but that just did not sound right.

Sure enough, a PC Magazine article about mail-order hard disks published in the June 1989 issue showed that in 1989, a 40 MB hard disk that cost more than $500 was an outlier, and finding one for $399 was not difficult. It also seemed odd to pick a Western Digital hard disk as representative of 1989 drive prices, because although WD was a major force in disk controllers, and did sell its own hard disks after the acquisition of Tandon’s drive division, the clear market leader at the time was Seagate. Other common mass-market drive makers were MiniScribe, Priam, or Micropolis… but not Western Digital.

So where did the outrageous $1,200 price came from? For a moment I thought perhaps that was adjusting 1989 dollars for inflation, but even in 2021, $500 (not a great price for a 40 MB drive) in 1989 dollars would be the equivalent of $1,100, not $1,200, and the article is several years old. So it’s probably something else…

Continue reading
Posted in PC history, Storage | 16 Comments

How Not to Erase Data

From past blog posts it is fairly obvious that the OS/2 Museum occasionally purchases used hard disks. Most of the time, the disks are either completely erased (overwritten with zeros) or don’t have anything very interesting on them.

But sometimes they do. Especially old SCSI disks tend to have old data on them, simply because very few people have the necessary equipment to use them anymore. But recently I encountered a case that appears to be an epic failure to delete data.

The hard disk is a Maxtor 25128AT, a 2.5″ IDE drive with 128 MB capacity that started its life as an OEM drive in an IBM ThinkPad. It was originally set up with MS-DOS 6.20 and Windows 3.11 for Workgroups.

A 128 MB hard disk formerly found in a ThinkPad laptop

At some point in the past, someone attempted to wipe the disk by high-level formatting it, i.e. putting in place a fresh FAT file system. That normally does quite a lot of damage by destroying the root directory and FAT tables. If the file system was fragmented, recovering the files can be quite difficult and very labor intensive. Yet on this particular drive, reformatting the drive resulted in no appreciable data loss and recovering all files was fairly easy. How is that possible?

Continue reading
Posted in DOS, PC hardware, Storage | 17 Comments

The IBM PC, 41 Years Ago

No, the OS/2 Museum does not have either a time machine or difficulty doing basic math. As of this writing, it is August 2021 and the IBM PC was announced in August 1981, 40 years ago.

IBM Personal Computer (IBM promotional photo)

But in August 1980, one year earlier, IBM started putting together the design of the IBM PC. If that (one year) sounds like an awfully short development cycle for a product like the PC, that’s because it was, especially for a company like IBM where the typical product development cycle was closer to five years at the time. The tight schedule determined the PC design: No custom or not yet available chips, no major software development, favor proven and familiar technologies.

With these constraints in mind, the design of the PC was sketched out on a stack of papers on August 10, 1980. Some of those drawings—not previously published—are now presented here; see explainer at the end of this article for a glossary.

IBM PC Design, August 1980

A closer look at the drawings reveals that even though there were quite a few changes between August 1980 and August 1981, the core was all there from the beginning: A box with two floppy drives, five I/O expansion slots, and a detachable keyboard; an Intel 8088 CPU with optional 8087 FPU, 8259A interrupt controller, 8237-5 DMA controller; RAM on motherboard, with an option to install additional RAM expansion cards; a display adapter with separate monitor or TV.

Choosing these particular chips was no coincidence, and there was one very clear reason for it: The IBM System/23 Datamaster.

Continue reading
Posted in 8086/8088, BIOS, DOS, IBM, Intel, PC hardware, PC history | 60 Comments

IDENTIFY Ancient DRIVE

This article will attempt to collect IDENTIFY DRIVE dumps from antique IDE drives, with running commentary. For the purposes of this list, “antique” is defined as a drive model released in 1990 or earlier, typically with the drive itself also manufactured no later than 1990. (Limiting the list to IDE drives made in the 1980s would have made it rather short.)

Several late 1980s IDE drive designs

In general, drives listed here use the 3½″ half-height form factor common for early IDE drives unless noted otherwise. The entries are sorted alphabetically. Mostly.

Conner CP-342

This was, as far as anyone can tell, the first IDE drive available on the open market, some months after Compaq already started shipping Conner’s CP-341 IDE drives. The CP-342 was announced in mid-1987 (see InfoWorld, Jun 29, 1987, page 20, “Hard Disk Drive for ATs Speeds Transfer of Data”). There is no surviving manufacturer documentation for this drive and it does not appear in official Conner drive lists.

The IDENTIFY DRIVE command on the CP-342 goes significantly beyond the Compaq DeskPro Technical Reference from 1986-1987. It supplies the drive model, serial number, and firmware revision, as well as the buffer size (just a single sector) and type and finally ECC size.

Continue reading
Posted in IDE, PC hardware, PC history, Storage | 9 Comments

Learn Something Old Every Day, Part II

The ultimate reason why I pulled out the old Seagate ST-225 drive was because I wanted to try connecting it to the Western Digital WD1003-IWH board that I recently acquired.

A 1986 WD1003-IWH adapter board

The WD1003-IWH is a curious evolutionary half-step between ST506 interface MFM drives and IDE drives, a kind of a missing link. The Compaq Portable II (released in February 1986) appears to have been the first PC with an IDE interface but not the first PC with an IDE drive. The WD1003-IWH board facilitated the connection of a standard ST506 MFM drive, either a Miniscribe 8212 (10 MB) or Miniscribe 8425 (20 MB), to the usual 40-pin IDE connector on the Portable II’s multipurpose controller board. Here’s what that looked like.

I don’t have any Miniscribe MFM drives, but I figured the WD1003-IWH is more or less a WD1003-WAH in a different form factor and with a funny connector (40-pin IDE rather than ISA bus).

Not knowing if my WD1003-IWH was even functional, all I could try was to hook it up to the ST-225 and see what happens. But what happened was a bit weird.

Continue reading
Posted in IDE, PC hardware, PC history, Storage | 11 Comments

Learn Something Old Every Day

More or less by accident I found myself writing a very basic DOS utility to read data off of an IDE drive. It started out by just issuing the IDENTIFY DRIVE command and capturing the data, but adding the ability to read sectors was not difficult.

In case that sounds pointless, it kind of is, except it allows me to attach a secondary IDE channel to an old 486 board whose BIOS only supports primary IDE. Thus the secondary channel is open to experiments without any BIOS interference. And this kind of setup lets me work with drives that for one reason or another do not work with a semi-modern system, including broken drives that may not be able to read/write at all but still have functioning electronics.

Once I got as far as identifying and reading old IDE drives, I realized that it’s not too difficult to extend the code to work with pre-IDE drives. The catch is not relying on IDENTIFY DRIVE but instead manually supplying the drive geometry. Once that was done, the rest of the code worked unchanged with my ancient Seagate ST-225 drive (by the way, that drive is now 35 years old and still can be read with no bad sectors).

Well… the code almost worked.

Continue reading
Posted in Documentation, PC hardware, PC history, Seagate, Storage | 3 Comments

Dirty Work

As I’m slowly archiving my giant pile of floppies, I naturally come across specimens that have one kind of problem or another. After going through hundreds of floppies, I can safely say that 3½″ floppies are much less prone to mechanical damage thanks to their hard shell. 5¼″ floppies, due to their flexible nature, are much more likely to get bent or dented when they’re improperly stored, and after decades they don’t unbend easily. The surface may also be slightly more prone to damage since it is exposed when the floppy is removed from its dust jacket.

Yet despite the protective shutter, some people managed to get even 3½″ floppies dirty, as seen in Exhibit A:

A speck of dirt on floppy surface

I don’t know what the dirt is; perhaps it used to be food, at any rate it appears to be something previously sticky that hardened with time. How much trouble can a speck of dirt like that cause?

Continue reading
Posted in Archiving, Floppies | 5 Comments