retrocmp

Font Size

Layout

Menu Style

Cpanel
You are here: Home -> PDP-11 -> 11/70 Console panel -> Tools -> PDP11GUI

PDP11GUI

PDP11GUI

PDP11GUI is an integrated development environment (IDE) for PDP-11’s, running under MS Windows.

You can write programms in assembler and load them onto the PDP-11, run programs or single step them, disassemble code, load, dump and display memory and inspect registers.

You can use it in conjunction with SimH to learn about PDP-11’s, or you can attach it to a real PDP-11 as an handy hardware investigation and diagnostic tool.

First I’ve written PDP11GUI for some diagnostic tasks on my 11/44, then it developed its own momentum and kept me busy for nearly a year. And it’s still growing.

For download check out the attachement. Then proceed through installation instructions and the tutorial.

The current version of PDP11GUI is 1.31.1.

pdp11gui

No switch toggling, no typing?

PDP11GUI is attached to the target PDP-11 console over serial line (COM port) or over telnet.

The system console gives you complete control over a PDP-11 by implementing just a few commands: You can examine and change (“deposit”) memory locations and also CPU or controller registers. And you can run and stop programs, or single step through code. With those few basic features you would do tasks like

  • check and understand how the CPU executes code.

  • type-in bootloaders in binary form

  • checking presence of hardware like disk controllers or memory cards

  • testing devices by manipulation controller register bits

  • starting bootloaders from several devices

  • breaking into the operation system or user code

  • get notified if the processor halts.

Early computers had consoles which consisted of lights to indicate addresses and data content, and switches to toggle in addresses and data words. (The “Reset” button and the power LED on modern PC’s are the last remain of a “blinken light console”) While those are very fascinating to look at, they really are a pain to work with. So they were replaced by video terminals attached to serial RS232 lines, and a console processor which controlled the main CPU on user input. This is called “ASCII-console”, and if a machine has one, an external PC can connect to it via serial line. The PDP-11 is under complete software control by an IBM PC then.
Ken Olsen would not like it ...

There are many flavours of serial consoles in the DEC world, but they are mostly doing the same. PDP11GUI supports these:

  • The 11/34 has a limited serial “console emulator”, which mimics very closely the switch operations on their physical console.

  • The PDP-11/44 has a quite elaborated console, implemented with an independent micro controller. (Here is a good documentation).

  • QBus PDP-11’s (11/03, 23, 73, 93) have a so-called “ODT” (octal debugger technique) consoles. They are running on the PDP-11 processor itself, so they are somewhat limited.

  • SimH’s command window implements lot of functions, but has also the basic Examine/Deposit/Run/Halt/SingleStep command set in its own syntax.

 

Look at all those windows!

PDP11GUI has a modular design. Function is distributed on many small “tool windows”. In good DEC-style those tool windows form an “orthogonal instruction set”, meaning the functionality of the tool windows does not overlap, and for most task you need more than one tool window. Enough abstraction! I implemented those tool windows:

  • a Connection window, which let you connect to the target machine in several ways.

  • a Terminal window, which shows the data traffic to and from the PDP-11 console. You may also use it to type directly commands to the console and look at the unfiltered answers.

  • The Register window lists a set of register addresses of a physical device (CPU, cache, disk controller and the like) in symbolic form. Symbol information is held in a ”machine  description file”. There are as many Register windows as are defined in the machine description file.

  • Four blocks of consecutive memory addresses each are shown and edited in the four Memory windows.

  • Often a peripheral register contains not a single scalar 16 bit value, but is segmented into different bitgroups. The Bitfields window shows and edits those bitgroups. The bitfield information is held in the machine description file as well.
    It is synchronized with the Memory and Register windows.

  • For writing assembler programs, source code can be loaded, saved and edited in the MACRO-11 Source window. A MACRO-11 clone can be called to translated the program source.

  • Output of a MACRO-11 run is shown in the MACRO-11 Listing window. There you can  transmit the generated code to the target machine’s memory.

  • The Execution Control window allows executing the program. There are Reset, Run, Halt and Single-Step buttons. The current execution address is also highlited in the MACRO11 source, MACRO11 listing and Disassembly window.

  • The Disassembly window shows disassembled code around an selected address. It’s synchronized with the Execution Window.

  • The Memory Loader window contains logic to load data from external files into memory. Several file formats are implemented.

  • The Memory Dump window contains logic to dump data from memory to external files. Several file formats are implemented.
    Loader and Dumper together can be used as a file format converter.

  • The Memory Management window shows the state of the “virtual to physical” memory map unit of later PDP11’s. This is important, because addresses for program executions are virtual 16 bit addresses, but register adresses for loading program code into pdp11 memory are physical 22 bit addresses.

  • The I/O Page Scanner window scans every even address in the I/O page and reports existing addresses.

  • The Disk Image read/write window allows to transfer disk or tape images between host PC and PDP.11.

  • The 11/44 µCode window shows in detail the function bit groups for all micro instructions of the 11/44. If you micro step through a single PDP11 instruction, you can get an understanding of the CPU’s internal operation.

  • The 11/70 Console panel window let you operate PDP11GUI through a the console panel of a PDP-11/70.

  • Finally a Log window tells you what PDP11GUI did so far.

Some general features

The serial interface to the PDP-11 console is pretty slow. A simple click onto an button like “Examine All” can generate a lot of serial traffic. Keep an eye onto the Terminal window.

It is possible that one single memory location is displayed in more than one tool window. If such a memory location is changed, it is updated in all visible tool windows automatically.

All numbers are octal numbers.Physical addresses are 18 or 22 bit width, depending on the connected target machine.

The tool windows can be resized and repositioned and keep their place on the screen between sessions. If data tables are shown, their columns widths can be individually adapted to the grid’s content, this also is persistent.

If you have edited a memory location, so that its differerent from the locationss value on the PDP -11, its always higlighted in yellow:

For educational purposes, you can demonstrate user interface techniques from three different ages:

  • From the beginning to the mid of 1970’s, users had to use “light & switches” consoles. (Console panel window)

  • In the golden PDP-11 area, mid 1970’s to 1990, the ASCII video terminal console was used (Terminal window)

  • Since then, Windows-based GUIs were state of the art. (PDP11GUI itself )

 

 

 

PDP11GUI Installation

PDP11GUI comes as a self installing “SETUP.EXE”.

The installation contains those files

  • “pdp11gui.exe” is the core program
  • “macro11.exe” and “pdp11disas.dll” are helper programs for MACRO11 assembly/disassembly. They are needed for PDP11GUI to work. They are Copyright by others.
  • “pdp11.exe” is the special version of SimH (more).
    PDP11GUI can run without it, it is in the package for convenience. Copyright by Bob Supnik.
  • “pdp11.ini” is a prototype machine description file. Use it as template for your own one.
  • The “*.mac” are several short MACRO-11 source f iles. These are the helpers from “Hints on testing a dead PDP-11”.
  • “EY-C3012-RB-001 PDP-1144 Processor Maintenance Supplementary Listings (microcode) Apr-81.txt” contains the micro code listings for 11/44.

Because of Vista compatibility, I was forced to conform to Microsoft standards:

  • All executables are installed into “%ProgramFiles%\Joerg Hoppe\PDP11GUI”.
    “%ProgramFiles%” may expand to “c:\programs”.
  • All text files are treated as user documents and are installed in
    “%USERPROFILE%\PDP11GUI”:
    “%USERPROFILE%” may expand to “c:\documents and settings\
  • All text files are overwritten on the next update installation, so keep local copies, if you change them!

PDP11GUI Tutorial

After installation of PDP11GUI, you might follow this tutorial:

I. First steps

  1. Explore the online documentation on this web site, then return to the tutorial.
  2. Open menu “File/Load machine description" and choose the generic file "pdp11.ini" ... this should do it for the first time. Open the “I/O page” menu and check out, what devices are defined now. All entries looking like “registers” were just loaded.
  3. Verify "Connection/Settings/PDP-11 target" is set to "Internal PDP-11/44 fake"
  4. Bring up the Terminal window (Connection/Terminal). You are connected to limited fake of an 11/44 console. Arrange it on screen.
  5. In the Terminal window, play with E(xamine) and D(eposit):
    "E " shows a memory word.
    "D " sets a memory word.
    Remember: everything is entered octal. Addresses are always 22 bit wide.
    For example, “D 1000 1234” sets memory address 1000 to 1234. “E 1000” show the content of address 1000.
  6. Open the Memory/Mem1 tool window, arrange it on the screen, adjust column widths. Set “start addr” to “1000” and press “Set”. The grid is loaded with all addresses from 1000 to 1176. You can change grid cells and press “Deposit changed” to update the memory.
    The Terminal window shows the data traffic from and to the PDP-11.
  7. Open the CPU register window (I/O page/CPU registers) and press “Examine all”. Open the Bitfields window (I/O page/Bitfields).  Click in the “Value” column of Register “PSW” and check, how the Bitfields window displays PSW bitwise.
    Click on other CPU registers, and Bitfield changes. Change the Processor Status Word PSW in the CPU register window. Change PSW as a whole word, or bit wise in the Bitfields window.

II. Connect to SimH

  1. Start SimH (PDP11.EXE). Default is running a 11/73 with 256MB RAM.
  2. In PDP11GUI, open "Connection/Settings" and set 
    PDP-11 target = "SimH over telnet",
    Hostname="localhost",
    Telnet port=”2000” (or any other port you like)
    Do not press OK yet!
  3. In SimH’s command window type "set stdio telnet=2000" (or the port number you choose).
    Quickly go back to PDP11GUI and press the OK button in the Settings window.
  4. Then you should see SimH's command window in PDP11GUI's Terminal window
  5. Type "help" and see SimH responding. To disconnect SimH from PDP11GUI, type “set stdio notelnet”.
  6. If the connect to SimH fails, try to connect to SimH over telnet with another terminal emulator program.
  7. Repeat the steps in I.

III. Debug a MACRO-11 program

  1. Stay connected to SimH
  2. Open the MACRO11 Source window, the Execution Control window, the Disassembly window, and  the CPU register window (all in menu “Programming”). Arrange them on screen.
  3. In MACRO11 Source, open one of the *.mac -files, best is "memsizing.mac".
    Read the comment in the header, visit the authors page.
  4. In Execution Control window, set "Initial PC" = "1000". This is the address of the "start:" label in  "memsizing.mac".
  5. In Execute Control window, press the big "New program ...." button. This will translate "memsizing.mac" with MACRO-11.
  6. The source is translated, the MACRO11 Listing window pops up, and in the Terminal window you can see how the code is DEPOSITed into memory
  7. Press  "Examine All" in the CPU register window.
  8. Step through the “memsizing”-program. Press Single Step in the Execution Control window. Check out how this translates to SimHs “STEP 1” command in the Terminal window. See how the Program Counter marker in the MACRO11 Listing window is moved. See the display of the Disassembly window being updated. Watch the changed registers R0, SP and PC by pressing "Examine All" in the CPU register window.
  9. Repeat step 8. You see the program working.
  10. Press “Continue”. The program runs until a trap or HALT occurs. The Execute Control window should register the HALT.

IV. Connect to a real PDP-11

  1. Get a standard null modem cable and connect the PDP-11 to your PC.
    (If you need a serial-to-USB-adapter, those with FTDI chip have the best reputation.)
  2. Set Settings/Connection to “Physical PDP-11/xx over COM port”, choose the correct COM port and baud rate.
  3. Try to access the machine over the Terminal window. Type something and verify the machine responds as expected.
  4. Repeat the steps in I. Verify that your PDP-11 is responding correctly to PDP11GUIs EXAMINE/DEPOSIT attempts.
    When doing EXAM/DEPOSIT manually in the Terminal window, be sure to use the commands valid for your actual machine, not those for the 11/44 used in step I.
    If this does not work, I must build a console adapter for your machine into PDP11GUI. Feel free to contact me!
  5. Repeat the steps in III.

V. Console panel play

In this tutorial, you will run a program with input and output only over the simulated PDP-11/70 console.

  1. Connect to SimH again, as in Step II.
  2. You need to simulate an old PDP-11 with console display register.
    In the Terminal window, type “set cpu 11/70” in SimH. You are now using a PDP-11/70.
  3. Open the windows for MACRO-11 program execution, as in Step III.2.
  4. In MACRO-11 source window, open the program “sum.mac”.
    This program sums up all natural numbers from 1 to n and displays the result on the console panel.
    The formula is: s = n * (n+1) / 2
    n is input over register R3. Output sum ‘s’ is 32 bit. On program HALT, the upper 16 bit of s is displayed on the “DATA” LEDs. After continuation, the program HALTs again and shows the lower 16 bit of s on the “DATA” LEDs.
  5. In the Execution Control window, press the “New program” button. The program is loaded. You surely will not do this over the panel!
  6. Open the console panel over “Tools/PDP-11/70 panel”.
  7. Prepare the panel:
    - Click onto the image of the upper rotary knob, until the LED “CONS PHY” is ON.
    - Click onto the lower rotary knob, until LED “DATA PATHS” is ON.
    - Set all switches to their standard position, they must look like the white switch.
    - Click slowly onto the white switch, and verify that all lamps are burning!
  8. Set the program start address to 1000.
    - Enter “1000” on the data switches (set only switch 9).
    - Press “LOAD ADRS”
    - The value 1000 is displayed in the ADDRESS LEDs.
  9. The value for ‘n’ is input over the DATA switches and the switch register. We first try to sum up all integers 1+2+..+100. 100 is octal “144”
    Enter  “144” on the data input switches by only setting switches 6, 5, and 2.
  10. Start the program. The start address has been loaded in step 8.
    - Be sure that “ENABLE/HALT” switch is on its upper position “ENABLE”
    - Press “START”. The program starts, calculates the sum and stops at a HALT instruction. While the program is running, the “RUN” LED is on.
  11. Let the panel show the result, which was written into the “Display Register”
    - Click onto the lower rotary knob, until the “DISPLAY REGISTER” LED is ON.
    - The “DATA” LEDs show now the upper 16 bit of the result. They are all black ... the result is < 2^16.
  12. Continue program execution to get the lower 16 bit of the result.
    - Click onto the “CONT” switch
    - the “DATA” LEDs show the lower 16 bit of the result. It is octal “11672”
    - Start the Windows calculator “calc.exe”, set it to “scientific” mode.
    - Set base to “octal”, enter “11672”, set base to “decimal” and ... voilà:
    The sum of 1..100 is 5050, just as the young C. F. Gauss calculated over 200 years ago!
  13. Since the start address remains unchanged at 1000, you can toggle in another value for ‘n’ and press START and CONT again (repeat from step 9.)

VI. Further steps

In Step I., the generic machine description file “pdp11.ini” was loaded. To get most benefit from PDP11GUI, you should create a copy of this file for the I/O cards you plugged into your special PDP-11 backplane (see here). Use the I/O page scanner and document all listed addresses in the machine descrition file. This requires some hour’s of searching in the DEC documentation, but it will really pay off!

Please forward me any new devices you added to the machine description file. Then I can include them into the next release of PDP11GUI !

And while you’re into it, write a SimH script to simulate your machine.

The MMU window, the Microcode window and other tool windows were not part of this tutorial. You can use PDP11GUI without them. Explore them and the concepts behind when there’s nothing on television. Take a look onto the “Disk Image” window.

PDP11GUI Connection window

The Connection window lets you choose how PDP11GUI should connect to a target machine. After the connection is established, you should see the target machine’s console prompt in the Terminal window.

 

pdp11gui_connection

At the moment, you can connect to one of these target machines:

  • A primitive simulation of a 11/44 console. It is built right into PDP1GUI. Only main memory and Examine/Deposit commands are implemented. This can be used as selftest for PDP11GUI, or to get familiar with the tool windows.
    A baudrate can be set to simulate the timing between PDP11GUI and the target machine.
  • Primitive simulations of ODT machines with different address widths.
  • A PDP-11/44 attached directly to one of the COM-ports of the PC on wich PDP11GUI is running. This is the most straight-forward configuration. You need an null-modem cable.
  • A PDP-11/44 attached to “serial-to-telnet-server”. The serial line of the PDP-11/44 goes into the COM port of a networked PC, who is running a Telnet server and routes the COM port to the TCP/IP world. The PC PDP11GUI is running on connects to the telnet server. “Serial to telnet-server” converters are also available as dedicated hardware, mostly for industrial applications.
    I use this configuration, because my PDP-11/44 runs in the basement side-by-side with my fileserver. My office is on the 2nd floor, so a serial connection is difficult, but a network connection already exists.
  • 16-Bit ODT machines like11/03, over serial connection or over telnet.
  • 18-Bit ODT machines like11/23, over serial connection or over telnet.
  • 22-Bit ODT machines like11/53, over serial connection or over telnet.
  • SimH over telnet.
    You need a special version of SimH (see here). SimH has a command window which implements “Deposit/Examine/Run/Stop/Single Step” in a manner somewhat similar to the PDP-11/44. To connect PDP11GUI to the SimH command I/O window in telnet mode, do this:
    1. in SimH, issue “set stdio telnet=
    SimH is waiting 10 seconds for an incoming connection.
    2. in PDP11GUI, call the connection settings window (see above).
    Then you can control SimH over the terminal window
    3. to release the connection to SimH, type in the terminalw indow:
    “set stdio notelnet”
    After this, SimH accepts command input over its own console window again.

Needless to say: Use the highest possible baudrate!

The current connection settings are shown in the Terminal window’s title.

PDP11GUI Terminal window

The Terminal window is a simple terminal emulation. It is directly connected to the bidirectional serial line over which data is exchanged with the target machine.

 

pdp11gui_terminal

You can use it in two different ways:

  1. You can type directly to the target machine console, and receive directly answers. So the terminal window is a replacement for a serial video terminal.
  2. The complete data traffic between PDP11GUI tool windows and the target machine is logged in the terminal window. So you can see what PDP11GUI “types” and “sees” whenever one of the tool windows does its job.

The Terminal window is not an implementation of VT100 or VT52, it understands no control codes. It is as a simple as a teletype.

The current connection settings are shown in the title bar.

Right click brings up a pop up window wich lets you Cut&Paste. The common short cuts Control-C and Control-V can not be used because at least Control-C must be routed to the target machine to break into running programs.

You are here: Home -> PDP-11 -> 11/70 Console panel -> Tools -> PDP11GUI