Further examining the mystery of boot sectors supposedly starting with byte value 69h, I considered the possibility that the check could have been added for MSX machines. The MSX platform ticks a lot of boxes: It wasn’t 8086 (but rather Z80), used 3.5″ floppies, used FAT format, appeared around 1985, and Microsoft was involved in it.
But looking closer, MSX is quite unlikely for one simple reason: Microsoft was clearly concerned about data exchange with PCs, and solved the problem differently. MSX floppy boot sectors actually start with the usual 8086 instructions, and if they’re booted on an MSX machine, the boot sector starts execution at offset 1Eh.
Not only that, but the MSX BIOS in fact requires that the floppy boot sector must start with byte EBh or E9h to be considered bootable at all.
The above is clearly documented in the MSX Technical Data Book (published by Sony in 1984). Extant MSX floppy images confirm the documentation—MSX floppies use 8086 opcodes in the first three bytes.
A while ago I griped about a strangely ill-behaved Intel DX79SR Stormville board. To recap, the board simply refused to take any memory in the 4th memory channel. Since then, there have been very interesting new development in the story.
I found another complaint about these boards that exactly matches my symptoms. I missed it at first because it doesn’t mention the DX79SR board (it’s about DX79SI/TO). To recap, in 2011, Intel came out with two boards based on the X79 chipset, DX79SI (Siler) and a slightly stripped down and cheaper DX79TO (Toler). In 2012, the DX79SI was replaced by DX79SR with more USB 3.0 ports and more 6Gbps SATA ports. The three boards all use the same PCB, same BIOS, and are for most intents and purposes identical. It is therefore unsurprising that they’d also have the same problems.
Worth noting is that near the end of the discussion, a user claimed to have fixed just such problem by straightening a bent pin in the CPU socket. Since the memory controller is on the CPU, that is not implausible, although I could not find any sign of a bent pin on my Stormville board.
This blog has previouslyexamined a very very strange code fragment in the BIOS module of DOS. To recap, when deciding whether a boot sector might have a valid BPB, DOS checks whether the first byte is a relative jump (opcode E9h) or a short jump (opcode EBh), both used by different DOS versions. But it also checks for a “direct jump” with 69h opcode.
The code looks like this in the MS-DOS 3.21 OAK, source file dated May 1, 1987:
cmp byte ptr cs:[DiskSector],069H ; Is it a direct jump?
je Check_Signature ; don't need to find a NOP
cmp byte ptr cs:[DiskSector],0E9H ; DOS 2.0 jump?
je Check_Signature ; no need for NOP
cmp byte ptr cs:[DiskSector],0EBH ; How about a short jump.
jne BadDisk
cmp byte ptr cs:[DiskSector]+2,090H ; Is next one a NOP?
jne BadDisk
The code is not materially different in the MS-DOS 3.3 OAK, source file dated July 24, 1987:
cmp byte ptr cs:[DiskSector],069H ; Is it a direct jump?
JE Check_bpb_MediaByte ; DON'T NEED TO FIND A NOP
cmp byte ptr cs:[DiskSector],0E9H ; DOS 2.0 jump?
JE Check_bpb_MediaByte ; NO NEED FOR NOP
cmp byte ptr cs:[DiskSector],0EBH ; How about a short jump.
JNE INVALIDBOOTSEC
cmp byte ptr cs:[DiskSector]+2,090H ; Is next one a NOP?
JNE INVALIDBOOTSEC
The labels are different but the logic is identical. But of course there is no such “direct jump” on x86, and the 69h opcode (undocumented on 8086, IMUL on later CPUs) makes no sense whatsoever. So what is it?
Some time ago, the OS/2 Museum obtained a 10 GB Seagate ST310014ACE hard disk (IDE 3.5″ low profile). The disk was unusable because it was locked. That is, it needed an unknown password to gain access to the medium.
After a few quick searches it turned out that this problem is surprisingly common. The particular model of hard disk was used in the first generation Xbox consoles and indeed it was locked there, which meant that after taking it out of the Xbox the disk was no longer usable.
Except there is a way to unlock these drives, using a serial terminal, a special adapter, and a couple of magic commands. How does that work?
The OS/2 Museum recently acquired a Quantum Bigfoot TS hard disk in mint condition. The Bigfoot drives, as some readers may remember, were rather oddball late-1990s 5.25″ IDE drives that were cheap, slow, and relatively big. There was a sticker on the disk that suggested the drive once lived inside a Compaq machine. After attaching the disk to a Linux system, it turned out that the drive was not empty but the contents were too foreign for Linux to handle.
After hooking up the image of the drive to a VM, it turned out that the drive is not only bootable but actually boots into some… bizarre thing that Compaq and SCO cooked up. Here’s what the screen looks like when booted up:
Not much to see there. At all. After switching the virtual terminal (with Alt-F2, where did you think Linux stole that idea?) it turned out to be a curious mix of an off-the-shelf OS with some heavy custom tweaking:
Okay, so it’s SCO OpenServer Release 5, but with some sort of Compaq modifications. With the “ASOS” keyword there’s something to search for. It turns out the hard disk came out of a Compaq Prosignia NeoServer, an oddball late-1990s network server. In other words, a low-powered cheapo Celeron PC running a web server, file server, print server, etc., all remotely manageable. For whatever reason, Compaq decided to base that on top of SCO OpenServer. The NeoServer looked a bit like a shredder or a trash can but it was 1999 and it said “network” and “internet” so it had to be good. A significant chunk of the NeoServer functionality relied on a product called VisionFS, which was roughly similar to Samba.
Several years ago I got two Supermicro X7DBE boards at a bargain price. These are nice dual Socket 771 boards of circa 2007 vintage, built around the Intel 5000P Blackford chipset and using FB-DIMMs with up to 32GB memory supported.
Recently I pulled one of the boards out of storage and installed two quad-core Harpertown Xeon E5450 processors in it, primarily for the purpose of verifying that newly arrived FB-DIMMs work. The memory worked just fine… but something else didn’t.
The CPUs ran at only 1.2 GHz (instead of 3.0 GHz), and even worse, one of the CPUs was not recognized. I swapped the CPUs around but that didn’t change anything—one was still not recognized. I plugged in two slightly slower Xeon E5430 CPUs… and one still wasn’t recognized, and instead of 2.66 GHz the CPUs ran at 1.06 GHz. I thought the board perhaps got damaged during moving and didn’t investigate further.
Sometime later I pulled out the other X7DBE board. It had two E5430 Xeons installed already. When I first tried it, both CPUs were recognized, running at 2.66 GHz as they should. Board clearly working.
So I thought, let’s put the faster E5450s in it. I did… and one of them wasn’t recognized, while the other ran at 1.2 GHz! I put the original E5430s back, but oops, one wasn’t recognized and the other ran at 1.06 GHz.
Okay, this is really weird. In desperation, I put in two Dempsey 5080 Xeons, the latest and greatest (if such a thing can be said) NetBurst Xeons. And again, one of them was not recognized, although the other at least ran at the full 3.73 GHz. Hmm…
So after some furious disassembling, assembling, and linking, things got this far:
It took longer than it ought to have because although IDA is great, I couldn’t figure out how to make it work with GW-BASIC’s bizarre segment usage. The problem is that the BASIC data segment is tacked onto the end of the code, and during initialization, CS equals DS and variables have high offsets in the segment. But after initialization, CS no longer equals DS and DS points at the beginning of the data, which means variables are at low offsets within DS. I failed to convince IDA that the same data is accessed through completely different offsets at different points in the code. After a lot of trying and failing, I’m still unsure if I’m doing something wrong or if it’s really a situation that IDA can’t adequately handle.
At any rate, I ended up with a bit over four thousand lines of a GW-BASIC OEM module, lovingly borrowed from Compaq’s BASICA.EXE version 1.13.
The Object Module Format (OMF), used by most DOS development tools, and eventually displaced by COFF/ELF in the 32-bit world, is quite old. It is a somewhat strange format because of its age, and it is quite complex, both because it was designed for the segmented 8086 architecture and because it evolved over many years.
The LINK.EXE linker supplied with DOS 1.0 (1981) used OMF as the input format and Microsoft’s development tools (MASM, Pascal, etc.) produced it. Just about all major 16-bit 8086 compilers use OMF by default. OMF must be at least as old as DOS then.
Wikipedia claims that OMF “was originally developed by Intel in 1981” and bases the claim on the fact that Intel published an 8086 OMF specification in 1981. Anyone actually reading that specification will wonder why a specification supposedly developed in 1981 and published that year is already at version 4.0.
The answer is of course that OMF is several years older than that and was likely developed closer to the mid-1970s than to 1981.
When I learned that Microsoft released the GW-BASIC source code, I was mildly curious to find out what is or isn’t there. The short answer is that there’s a whole lot, but a lot is also missing. Spelling note: Both “GW-BASIC” and “GW BASIC” can be found in the source code. The hyphenated spelling will be used here for consistency.
The first question is: When is the source code from? Microsoft marked the source files February 10, 1983, but that’s almost guaranteed to be wrong. The date comes from comments in the code: “This translation created 10-Feb-83 by Version 4.3”. That reflects running some sort of master BASIC source code through a translator generating 8086 code. The source code was almost certainly modified after that date.
My current best guess is that the source code is roughly from mid-1983. But that’s only a guess.
Not long ago the OS/2 Museum acquired a boxed copy of the IBM PC LAN Program (PCLP) version 1.3 (1988) on 3.5″ floppies. The IBM PC Network Program (1985), later renamed to the IBM LAN Program, was IBM’s first PC LAN networking software, notable for using NETBIOS and the SMB protocol. Because of its reliance on the NETBIOS software interface, PCLP survived the transition from the original IBM PC Network hardware to Token Ring and later to Ethernet (“later” because IBM supported Token Ring first, not because Token Ring is older than Ethernet).
Rather unusually, it is easy to find a copy of the original PC Network Program and PC LAN Program 1.1 online, but not version 1.2 or the last one, 1.3. PC LAN Program 1.3 is notable for being sold by IBM until 1997 and overlapping with the OS/2 LAN Server in the market. In fact either the DOS LAN Requester shipped with LAN Server or PCLP 1.3 could be used as a LAN Server client.
PCLP 1.3 is also significantly different from the earlier PCLP releases in that it can still be used as a more or less unstructured peer-to-peer network, but also supports “Extended Services” with domains, dedicated servers, user logons, and remote booting (RPL/RIPL) of diskless workstations. At $225 (or $90 upgrade), PCLP 1.3 was not even all that expensive.
The catch with PCLP 1.3 is that came out in 1988, very shortly after DOS 4.0. It supports DOS 3.3 or 4.0 servers and workstations. Now the problem is that DOS 3.3 (at least IBM’s) only supports 32MB partitions, and DOS 4.0 is a memory hog. PCLP itself consumes quite a lot of memory and it is next to impossible to start a PCLP server and still run the user interface required to manage it (the interface can be also run remotely, but that’s an extra inconvenience):
The obvious solution would be to run PCLP 1.3 on top of DOS 5.0 with UMBs. But of course that does not work out of the box because PCLP is too tightly integrated with DOS (notably using the DOS 4.0 IFS interface which is not present in DOS 5.0). And, of course, given that PCLP was sold into the mid-1990s, IBM did have updates that made PCLP 1.3 compatible with DOS 5.0, and the updates are even mentioned in the IBM DOS 5.0 announcement letter. It is finding those updates that turned out to be nearly impossible.