I was re-reading Joel's Strategy Letter II: Chicken and Egg problems and came across this fun quote:
In fact, WordStar was ported to DOS by changing one single byte in the code. (Real Programmers can tell you what that byte was, I've long since forgotten).
I couldn't find any other references to this with a quick Google search. Is this true or just a figure of speech? In the interest of my quest to become a "Real Programmer", what was the single byte change?
Sounds a bit exaggerated, found some WordStar history here
WordStar 3.0 for MS-DOS
Apr 1982
In one single all-night session Jim Fox patched the CP/M-86 version of WordStar to make it run under MS-DOS on the IBM PC so that it could be demonstrated to Rubenstein. The actual port was done by a group of Irish programmers using Intel development systems, which ran the ISIS II operating system. The software build was done on 8" floppies and the binary (executable) files were then transferred to the IBM PC by serial cable.
But...Joel maybe meant MS-DOS 1.0 / QDOS
MS-DOS 1.0 was actually a renamed version of QDOS (Quick and Dirty Operating System), which Microsoft bought from a Seattle company, appropriately named Seattle Computer Products, in July 1981. QDOS had been developed as a clone of the CP/M eight-bit operating system in order to provide compatibility with the popular business applications of the day such as WordStar and dBase. CP/M (Control Program for Microcomputers) was written by Gary Kildall of Digital Research several years earlier and had become the first operating system for microcomputers in general use.
You'd have to change more than one byte. CP/M-86 executables (.CMD) all have a 128-byte header, which isn't anything like the .EXE header.
If you restrict all your API calls to the common subset of CP/M and DOS, then you can use conditional assembly to build CP/M and DOS versions from the same source:
bdos:
if CPM86
int 0E0h
else
mov ah, cl
int 21h
endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With