IBM PC-DOS 0.9 "HAL" question

Discuss MS-DOS, Windows 1, 2 and 3.
Post Reply
Posts: 8
Joined: Thu Sep 03, 2020 1:47 am

IBM PC-DOS 0.9 "HAL" question

Post by AltairMan »

While I was on The Starman's site the other day ( looking for something, I re-read the part on 20HAL which is the program Microsoft used to upload code from their DECSYSTEM-20 to IBM in Boca Raton. When examining the code for 20HAL, I noticed the following frequently-called subroutine:

{lots of PUSHing of registers}
9663:0589 B1 06 mov cl,6
9663:058B 8A D0 mov dl,al
9663:058D E8 FA75 call $-588h
{plenty of POPping}

The negative-offset call from the disassembler is odd, but it's basically a "call cs:5" to the PSP which is the CP/M service request vector. In CP/M, a call to BDOS (the MS-DOS equivalent) was made through a "CALL 0005" after setting up the registers. The register setup is pure CP/M (on the Z80, C=6=Direct Console I/O and E=character to print). So, this is a "print character" routine.

Was the 20HAL program a translation of a CP/M program (i.e., Z80->8086), or was it developed on a CP/M-86 platform (it would have to be a pre-release version because I think CP/M-86 came out later in 1981)? I have to check for other odd register usage that's an artifact of using TRANS86. Often the BC register pair is translated to CX and DE to DX, so using CL and DL makes sense and quite possibly, a translation.

Post Reply