This is a continuation of my series of articles on the history of personal computers.
It follows the article on MS-DOS Working with Files.
The series starts with my first CP/M article. If you have not read the previous articles, I recommend that you read them first.
As noted in the article on CP/M Version Numbers, there is a system call that returns a version number for the operating system. In CP/M this was system call 0Ch. Apparently this was changed in MS-DOS (and in DR DOS), where system call 30h returns the version number. (I assume CP/M-86 still supports system call 0Ch like CP/M-80.)
In the original article I wrote a lengthy function to convert numbers into ASCII 0-9 and A-F to display hex numbers. In this example I am using a lookup table, which is much easier to follow and easily done with 8086 assembler using the XLATB opcode.
And the result is a little programm version.com which returns the operating system version or, these days, the version the emulator pretends to be.
Windows 10 NTVDM pretends to be version 5.0. I assume it has done so for a long time.
DOSBox also reports version 5.0, most likely because that is a good idea.
DOSEMU (DOS in a BOX) is less worried and reports 7.0A.
Clearly DOS is a lot less dead than CP/M. Not only do 32 bit versions of Windows on x86 come with a built-in DOS emulator but so does Linux. DOSBox is available for a range of operating systems as well.
It is perhaps notable that in the early 1980s CP/M-80 emulators were somewhat popular including hardware-based CP/M-80 emulators for Apple computers and others. Starting in 1984 MS-DOS emulators were already becoming more popular and while CP/M-80 survived, on current supported hardware, well into the 90s, there was not much demand for running CP/M-80 programs on non-CP/M machines any more. MS-DOS had replaced CP/M as not only the standard platform but also as the previous standard platform.
To be continued...