Home
  Software
    HowTo
      Bootstrap
        Bootstrap

Language:
  EspaƱol

Accesing a DOS machine without floppy

If you happen to have a machine without a floppy (eg. a laptop without floppy, or a broken controller), but with a serial port, then you'll find here a method to communicate...

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:

  1. Download vtemu.zip from the link below, and unpack (at least) vtemu.hex.
  2. On the remote machine, start reception using the command COPY COM1 VTEMU.HEX.
  3. Send vtemu.hex to the remote machine with any communications program (hyperterminal, or whatever you have available). I suspect a simple COPY VTEMU.HEX COM1 would work too.
    Note that the remote machine will expect 9600Bd, even parity, and 7 bits of data '9600,e,7,1'.
  4. Wait for the transfer to end - about 15 - 20 seconds. In some com programs it will be necessary to send the end-of-file manually (Ctrl-Z and maybe an extra enter).
  5. On the remote machine, the COPY command should end. Start Qbasic and enter the program fmhex.bas (see below). Save it to disk, just in case!
  6. Using the newly entered program, convert vtemu.hex into binary. (start the conversion from QBasic with Shift-F5).
  7. That's it! Exit QBasic, and try to start vtemu. Don't worry - the initial working screen of vtemu is completely blank!
    Alt-P opens a parameters configuration menu. Alt-X exits. Alt-R and Alt-T allow you to receive and send files with the Kermit protocol.
Quick guido to QBasic: start with qbasic. Skip - if wanted - the initial menu with Esc. Type in the program. Each line entered will be immediately checked for errors by QBasic. To save, enter the menu. Entering the menu is done by pressing and releasing the Alt key (weird, huh?). Shift-F5 while in the editor starts the program.

fmhex.bas

<pre><b><tt>        INPUT &quot;Input archive - &quot;, inf$
        INPUT &quot;output archve - &quot;, outf$
        OPEN inf$ FOR INPUT AS #1
        OPEN outf$ FOR OUTPUT AS #2
        DO
          INPUT #1, line$
          IF LEFT$(line$, 1) &lt;&gt; &quot;:&quot; THEN 100

          c = 2
          WHILE c &lt; LEN(line$)
            a = ASC(MID$(line$, c, 1)) - 48
            IF a &gt; 9 THEN a = a - 7
            b = ASC(MID$(line$, c + 1, 1)) - 48
            IF b &gt; 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>

Download links

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).
11276
(c) John Coppens ON6JC/LW3HAZ mail