[Simh] SimH new feature: telnet interface to cmd window as automation interface

Jörg Hoppe j_hoppe at t-online.de
Mon Jul 21 01:14:36 EDT 2008


Hello SimH-world,

I implemented a new feature in SimH 3.8:
Input/output from/to the command window can be routed over a separate
telnet connection.
(This new telnet connection the SimH cmd window is not to be
confused with the existing telnet connection to the simulated machine's
console terminal)

* Motivation:  a GUI for the PDP11 console needed a standard interface
to SimH.
While restoring a PDP11/44, I felt the need to have a graphical front
end for the serial console. I programmed a MS Windows application called
"pdp11gui" (see attached screenshot) which allows access to memory,
registers and CPU in an ergonomical form.
You can also assemble and download simple MACRO-11 programs.
If you single-step, the current PC is shown in the MACRO-11 listing.

This is of great educational value for any PDP11 newbie (as I am).

The internal interface to the PDP11 console is modular, so in the future
I can write console drivers for different PDP11's (perhaps ODT?).
Connection to the PDP11 target machine can be established over physical
COM-port or over telnet (if the PDP11 is accessed through a
"serial-to-telnet" converter).

To compare my (defective?) PDP11/44 with a sound system, I needed an
interface to SimH. I added a console driver for SimH's style of
"examine/depost/single step" and I had to modify SimH so it accepts
command window input over telnet.


* Changes to the SimH-Sources:

The source code changes fall into 3 groups:
a) I touched almost *every* module, because I routed all
potential input/output to stderr and stdio through a set of central i/o
wrapper functions in sim_stdio.c
I made these replacements:
fgets() -> sim_fgeeets()
fprintf() ->  sim_fpriiintf()
fputs() -> sim_fpuuuts()
fputc() -> sim_fpuuutc()

The "funny" names of the new functions made search&replacing easier,
they should be normalized at the end of the project.

b) I created a new source module "sim_stdio.c"

c) I cloned as much of the existing telnet-logic as I needed.
Most of these changes are located in scp.c

SimH hat now new commands:

set stdio telnet=<port>
set stdio notelnet
show stdio


* Status:
- I'm afraid, my changes are still more a hack than sound software
engineering.
- I did not formatted or cleared up the sources so far, to not to cover
my tracks.
- I only compiled it under MS Visual C++ so far, and I only tested the
pdp11 module. So much more work is needed.
- I will invest more of my time, if it's of interest to other people.

What do you think of it?


kind regards,

Joerg Hoppe






-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot.jpg
Type: image/jpeg
Size: 274032 bytes
Desc: not available
URL: <http://mailman.trailing-edge.com/pipermail/simh/attachments/20080721/8bfab323/attachment-0003.jpg>


More information about the Simh mailing list