EMU71 and TCP/IP


While getting DOSBox setup on my Linux machines so that I could run EMU71 I noticed that DOSBox supports serial port virtualization using TCP/IP. (DOSBox is an x86/DOS emulator, a bit like Bochs, but DOS emulation is part of it and it is much easier to use. It runs on top of Linux, OS/X, Windows, and many other platforms.)

The setup is pretty straightforward (I tested this with DOSBox on Windows/XP).

Put the following in your configuration file.

serial1=nullmodem server usedtr port:5000

DOSBox uses your existing filesystem--no need to create an image. Create a dosbox directory with EMU71 (http://membres.lycos.fr/jeffcalc/emu71.html) and BNU (http://www.pcmicro.com/bnu/) installed, then mount as drive C, e.g. my dosbox directory on Linux is /home/egan/dosbox, for Windows/XP c:\home\egan\dosbox. The command for any OS to mount within dosbox is:

mount c /home/egan/dosbox
First run bnu.com. BNU provides INT 14 needed by EMU71 serial port emulation.
cd bnu
Next make sure you have SERIAL1 in your EMU71.INI file. I have mine as my 6th HPIL device.

That’s it.

To test it I created a small reverse echo service using Perl. It will run on any computer with Perl. I tested it with Windows/XP.


use strict;
use IO::Socket;
use IO::File;

my $host = shift;
my $port = shift;

my $sock = IO::Socket::INET->new(
PeerAddr => $host,
PeerPort => $port,

if(!defined($sock)) {
die "could not open socket";

while(<$sock>) {
my $line = $_;
$line =~ s/[^[:print:]]//g;
my $revline = reverse($line);
print "recv: $line\n";
print "send: $revline\n";
print $sock "$revline\n";


All this service does is connect to the host and port passed on the command line and waits for a message and then returns the reverse string of the message.

To test start up the service:

echorev.pl localhost 5000
From EMU71 type:
10 DIMA$[64] @ DIMB$[64]
30 OUTPUT :6 ;A$
40 ENTER :6 ;B$
60 GOTO 20


Example session:

Windows/XP + Cygwin/X (for Perl):

$ ./echorev.pl localhost 5000
recv: aaaabbbbCCCCddddEEEE
send: EEEEddddCCCCbbbbaaaa

Windows/XP + Dosbox + EMU71:

I am sure that there are other serial port virtualization solutions that may run natively on Windows so that EMU71 would not need to run in DOSBox.


Oh, man!

What a neat shortcut to the 71B enthusiast's dream: an HP-IL<->TCP/IP gateway!

OK, so this won't let us work on HP-IL/IP, which is what I'd really like to do. But it's very, very cool nonetheless.

You've got mail. 8)



This deserves an entry in the Articles Section.


I absolutely agree.

Egan, if you have time, could you consider transferring what you've written to the articles forum? I think it would do fine just like it is, but you'd be free to bend, fold and/or mutilate as you saw fit. 8)



I have a few more things to test first then I will post a more complete article.

Possibly Related Threads...
Thread Author Replies Views Last Post
  Update of Emu71 to v1.05 Christoph Giesselink 0 572 09-24-2013, 04:22 PM
Last Post: Christoph Giesselink
  EMU71 on a web page! hugh steers 13 2,291 07-14-2013, 12:47 PM
Last Post: Namir
  EMU71 to go71b--is there a way? Les Wright 12 2,195 06-25-2013, 07:08 AM
Last Post: Mike (Stgt)
  Update of Emu71 to v1.04 Christoph Giesselink 8 1,620 04-18-2013, 04:11 AM
Last Post: Mike (Stgt)
  Update of Emu71 to v1.03 Christoph Giesselink 6 1,420 02-24-2013, 09:12 PM
Last Post: Gerson W. Barbosa
  Update of Emu71/Win to v1.02 Christoph Giesselink 5 1,105 09-20-2012, 04:27 AM
Last Post: Mike (Stgt)
  How to: EMU71 on an Android Tablet Guenter Schink 56 7,864 06-15-2012, 08:50 AM
Last Post: Valentin Albillo
  Emu71 for Win v1.01 available Christoph Giesselink 3 973 02-01-2012, 10:48 AM
Last Post: Egan Ford
  HP 71B : How to input RPNLEX in EMU71 for Windows? Miguel Toro 3 938 12-04-2011, 02:57 PM
Last Post: Mike (Stgt)
  HP IP for sale hpnut 6 1,213 10-03-2011, 07:01 AM
Last Post: John B. Smitherman

Forum Jump: