In my specific case, a friend asked me to install an old program in an older 386 machine. When I got home, I found that the floppy part of the 'Multi IDE' controller didn't work at all. After some digging, I found another one, but it didn't work either. So I was left with only the serial port to communicate with the outside world.
DOS doesn't have a terminal program included, and its support of serial communications is sad (9600 Bd max). Another site explained a method of sending, but it didn't work for me. The site did include a link to an amazingly compact terminal program (vtemu, only 7 kB long!) which even had the Kermit protocol included. Once installed, this solved future transfers. Now, how to get it into the remote PC?
After several failed tries with the other site's method, I wrote a small program, tohex.pas which converts any file into a hex file which can be sent without problems. The remote PC can receive it with just its COPY command. In the remote PC I wrote a small QBasic (part of DOS, remember?) program that converts hex files back to their original form. That's it!
Here are the steps to follow:
<pre><b><tt> INPUT "Input archive - ", inf$ INPUT "output archve - ", outf$ OPEN inf$ FOR INPUT AS #1 OPEN outf$ FOR OUTPUT AS #2 DO INPUT #1, line$ IF LEFT$(line$, 1) <> ":" THEN 100 c = 2 WHILE c < LEN(line$) a = ASC(MID$(line$, c, 1)) - 48 IF a > 9 THEN a = a - 7 b = ASC(MID$(line$, c + 1, 1)) - 48 IF b > 9 THEN b = b - 7 s$ = s$ + CHR$(a * 16 + b) c = c + 2 WEND 100 LOOP UNTIL EOF(1) PRINT #2, s$ CLOSE (1) CLOSE (2) </tt></b></pre>
tohex.pas | Pascal source code of the binary to hex converter. You only need this if you want to modify or recompile this. Binary for tohex and the already converted vtemu are below. |
tohex.exe | Executable of tohex, so you don't need Turbo Pascal. |
fmhex.bas | The QBasic program to be typed into the remote machine. |
vtemu.zip | vtemu, in its original binary form, and converted into hex, ready to be sent to the remote machine. |
Dan's site | The site where I found vtemu and another method of sending files over (which sadly didn't work for me, probably lack of patience). |
(c) John Coppens ON6JC/LW3HAZ |