The very first IBM personal computer, the IBM 5150 – which was a business-oriented machine, came with built-in cassette port… Too bad it could only be used through cassette BASICcontained in the ROM … Or, on the contrary, thank God? Yes, this interface was soon dropped for obvious reasons. But let’s fast forward 40 years: revive this legendary machine, and why don’t we try the cassette interface … in DOS?
Since DOS itself did not have any support to work with an interface like you see, this utility allows you to access the IBM cassette port directly alongside DOS in order to read and write raw data: whether original IBM BASIC applications or something else, using the cassette port on the IBM PC, right next to the keyboard connector. The program can also work with the infamous IBM PCjr … that is, if you can find (or make yourself) a cable for their patented connector marked “C” in someone else’s trash. Although ROM BASIC was on the successors of the IBM PC, the PC / XT and PC / AT did not have a cassette port. Thus, the program will not be able to boot on anything newer than an IBM PC or PCjr, for that matter.
So how would you use this thing? First, as the name suggests, you need an original IBM 5150 PC or PCjr with DOS and a cassette deck. Or reel tape recorderwhich I used. Or, in general, any sound device capable of playing and recording … for example, a modern computer or even a smartphone.
You also need a suitable cable. In the case of the 5150, the problem is easily solved in accordance with the DIN pinout and the above diagram, similar to the Tandy TRS-80 data cable. Then you need to send the signals to your audio device, either mono or the left channel. Please note that if your device has a microphone rather than a line-in, you need to set it accordingly jumper P4 on the 5150 motherboard. Or alternatively, use a 1k resistor in series with your recorder’s mic input (which is what jumper P4 does internally anyway). Failure to do so may damage the microphone input.
DIN pins 1 and 3 on the 5150 are normally open relay contacts. Before any I / O operation, this relay actuates its contacts to turn on the cassette motor. If you are not using these pins, either listen for the click of the relay and power your device accordingly, or use the / A command line argument, which prompts and waits for you to hit PLAY (or PLAY + RECORD).
The application can be downloaded here… Or you can see the source code in my GitHub repos, however, you need the Turbo C compiler to compile it; ideally, the program is built with the BUILD.BAT batch script.
Note that the maximum sequential data that can be loaded from tape is always 64KB. This is a limitation for both real-mode addressing and BIOS tape I / O routines. Thus, IBM Cassette BASIC, which is in ROM, will not allow you to write BASIC scripts larger than 64 kilobytes. Also note that if you do not have enough memory (early motherboards 16-64KB), this value may be even lower.