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
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:
- Download vtemu.zip from the link below, and unpack (at
- On the remote machine, start reception using the command
COPY COM1 VTEMU.HEX.
- 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'.
- 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).
- 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!
- Using the newly entered program, convert vtemu.hex
into binary. (start the conversion from QBasic with Shift-F5).
- 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
key (weird, huh?). Shift-F5 while in the editor
starts the program.
<pre><b><tt> INPUT "Input archive - ", inf$
INPUT "output archve - ", outf$
OPEN inf$ FOR INPUT AS #1
OPEN outf$ FOR OUTPUT AS #2
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
100 LOOP UNTIL EOF(1)
PRINT #2, s$
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.
Executable of tohex, so you don't need Turbo Pascal.
The QBasic program to be typed into the remote machine.
vtemu, in its original binary form, and converted into
hex, ready to be sent to the remote machine.
The site where I found vtemu and another method of sending
files over (which sadly didn't work for me, probably lack of
: mysql_connect() [function.mysql-connect
]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/jcoppens/jcoppens.com/php/std_lib.php
on line 1553
Could not connect to the database manager:
Error reported: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
(c) John Coppens ON6JC/LW3HAZ