Revision of 17-Feb-2022
Copyright Notice
The SIMH source code and documentation is made available under a X11-style open source license; the precise terms are available at:
https://github.com/open-simh/simh/blob/master/LICENSE.txt
The DEC PDP-10/KS10 simulator was written by Richard Cornwell.
3.7 Terminal Multiplexer I/O Devices
3.7.1 DZ11 Terminal Controller
3.8.1 IMP Interface Message Processor
3.8.3 KMC11 communications controller
Originally the DEC PDP-10 computer started as the PDP-6. This was a 36 bit computer that was designed for timesharing, which was introduced in 1964. The original goal of the machine was to allow for processing of many 6 bit characters at a time. 36 bits were also common in machines like the IBM 7090, GE 645, and Univac 11xx lines. Several influences shaped the design of the PDP-6, including CTSS, Lisp, and support for larger memory.
The PDP-6 was canceled by DEC due to production problems. The engineers designed a smaller replacement, which happened to be a 36 bit computer that looked very much like the PDP-6. This was called the PDP-10, later renamed to "DECSystem-10". The system supported up to 256K 36-bit words of memory.
The first PDP-10 was labeled the KA10, and added a few instructions to the PDP-6. Both the PDP-6 and PDP-10 used a base and limit relocation scheme. The KA10 generally offered two registers, one for user data and the second for user shared code. These were referred to as the Low-Segment and High-Segment. The High-Segment could be shared with several jobs.
The next version was called KI10 for Integrated. This added support for paging and double precision floating point instructions. It also added 4 sets of registers to improve context switching time. It could also support up to 4 megawords of memory.
Following the KI10 was the KL10 (for Low-Cost). The KL10 added double precision integer instructions and instructions to improve COBOL performance. This was the first version which was microcoded. The KL10 was extended to support user programs larger than 256K.
The final version to make it to market was the KS10 (for Small). This was a bit-slice version of the PDP-10 which used Unibus devices which were cheaper than the KL10 devices.
The original operating system for the PDP-6/PDP-10 was just called "Monitor". It was designed to fit into 6K words. Around the third release swapping was added. The sixth release saw the addition of virtual memory. Around the fourth release it was given the name "TOPS-10". Around this time BBN was working on a paging system and implemented it on the PDP-10. This was called "TENEX". This was later adopted by DEC and became "TOPS-20".
During the mid 1960s a group at MIT, who were not happy with how Multics was being developed, decided to create their own operating system, which they called Incompatible Timesharing System, or "ITS". The name was a play on an earlier project called the Compatible Timesharing System, or "CTSS". CTSS was implemented by MIT on their IBM 7090 as an experimental system that allowed multiple time sharing users to co-exist on the same machine running batch processing, hence the term "Compatible".
Also during the mid 1960s a group at Stanford Artificial Intelligence Laboratory (SAIL), started with a version of TOPS-10 and heavily modified it to become WAITS.
During the 1970s, Tymshare modified TOPS-10 to support random access files, paging with working sets, and spawnable processes. This ran on the KI10, KL10, and KS10.
The PDP-10 was ultimately replaced by the VAX.
To compile the DEC PDP-10/KS10 simulator, you must define USE_INT64
as part of the compilation command line.
| Subdirectory | File | Contains |
|---|---|---|
PDP10 |
||
kx10_defs.h |
KL10 simulator definitions | |
kx10_cpu.c |
KL10 CPU. | |
kx10_disk.h |
Disk formatter definitions | |
kx10_disk.c |
Disk formatter routine. | |
kx10_sys.c |
KS10 System interface | |
kx10_rp.c |
RH10/RH20 Disk controller, RP04/5/6 Disks. | |
kx10_tu.c |
RH10/RH20 TM03 Magnetic tape controller. | |
kx10_rh.c |
RH11 Controller. | |
ks10_lp.c |
LP 10 Line printer. | |
ks10_dz.c |
DZ11 communications controller. | |
ks10_cty.c |
KS10 front panel. | |
ks10_uba.c |
KS10 Unibus interface. | |
kx10_imp.c |
IMP11 interface to ethernet. | |
ks10_ch11.c |
Chaosnet 11 interface. | |
ks10_dup.c |
DUP11 interface. | |
ks10_dup.h |
Header file for DUP11 interface | |
pdp11_ddcmp.h |
Header to define interface for Decnet. | |
ks10_kmc.c |
KMC communications controller. |
The KS10 simulator is configured as follows:
| Device Name(s) | Simulates |
|---|---|
CPU |
KS10 CPU with 256KW of memory |
CTY |
Console TTY. |
LP20 |
LP10 Line Printer |
RPA |
RH10/RH20 Disk controllers via RH10 |
TUA |
TM02 Tape controller via RH10/RH20 |
DZ |
DZ11 communications controller. |
IMP |
IMP network interface |
CH |
CH11 Chaosnet interface |
DUP |
DUP11 interface. |
KDP |
KMC11 interface. |
The CPU options include setting memory size and O/S customization.
| command | action | OS Type |
|---|---|---|
SET CPU 256K |
Sets memory to 256K | |
SET CPU 512K |
Sets memory to 512K | |
SET CPU 1024K |
Set memory to 1024K | |
SET CPU ITS |
Adds ITS Pager and instruction support to KS | ITS |
SET CPU NOIDLE |
Disables Idle detection | |
SET CPU IDLE |
Enables Idle detection |
CPU registers include the visible state of the processor as well as the control registers for the interrupt system.
| Name | Size | Comments | OS Type |
|---|---|---|---|
PC |
18 | Program Counter | |
FLAGS |
18 | Flags | |
FM0-FM17 |
36 | Fast Memory | |
SW |
36 | Console SW Register | |
MI |
36 | Monitor Display | |
PIR |
8 | Priority Interrupt Request | |
PIH |
8 | Priority Interrupt Hold | |
PIE |
8 | Priority Interrupt Enable | |
PIENB |
1 | Enable Priority System | |
BYF5 |
1 | Byte Flag | |
UUO |
1 | UUO Cycle | |
NXM |
1 | Non-existing memory access | |
CLK |
1 | Clock interrupt | |
OV |
1 | Overflow enable | |
FOV |
1 | Floating overflow enable | |
APRIRQ |
3 | APR Interrupt number | |
UB |
22 | User Base Pointer | |
EB |
22 | Executive Base Pointer | |
FMSEL |
8 | Register set selection | |
SERIAL |
10 | System serial number | |
PAGE_ENABLE |
1 | Paging system enabled | |
PAGE_FAULT |
1 | Page fault flag. | |
FAULT_DATA |
36 | Page fault data | |
SPT |
18 | Special Page table | |
CST |
18 | Memory Status table | |
PU |
36 | User data | |
CSTM |
36 | Status Mask |
The CPU can maintain a history of the most recently executed instructions.
This is controlled by the SET CPU HISTORY and SHOW CPU HISTORY
commands:
| command | action |
|---|---|
SET CPU HISTORY |
clear history buffer |
SET CPU HISTORY=0 |
disable history |
SET CPU HISTORY=n |
enable history, length = n |
SHOW CPU HISTORY |
print CPU history |
SHOW CPU HISTORY=n |
print first n entries of CPU history |
Instruction tracing shows the Program Counter, the contents of AC
selected, the computed effective address. AR is generally the
contents the memory location referenced by EA. RES is the result
of the instruction. FLAGS shows the flags after the instruction is
executed. IR shows the instruction being executed.
The console station allows for communications with the operating system.
| command | action |
|---|---|
SET CTY 7B |
7 bit characters, space parity. |
SET CTY 8B |
8 bit characters, space parity. |
SET CTY 7P |
7 bit characters, space parity. |
SET CTY UC |
Translate lower case to upper case. |
The CTY also supports a method for stopping the TOPS-10 operating
system.
| command | action |
|---|---|
SET CTY STOP |
Deposit 1 in location 30. |
The line printer (LP20) writes data to a disk file as ASCII text with
terminating newlines. It currently handles standard signals to control
paper advance. Currently only one line printer device is
supported.
| command | action |
|---|---|
SET LP20 LC |
Allow printer to print lower case |
SET LP20 UC |
Print only upper case |
SET LP20 LINESPERPAGE=n |
Sets the number of lines before an auto form feed is generated. There is an automatic margin of 6 lines. There is a maximum of 100 lines per page. |
SET LP20 NORMAL |
Allows the VFU to be loading into the printer. |
SET LP20 OPTICAL |
VFU is fixed in the printer. |
SET LP20 ADDR=value |
Sets the Unibus address of device. (default: 775400) |
SET LP20 VECT=value |
Sets the interrupt vector of device. (default: 754) |
SET LP20 BR=value |
Sets the interrupt priority of device. (default: 5) |
SET LP20 CTL=value |
Sets the Unibus adapter number. (default: 3) |
These characters control the skipping of various number of lines.
| Character | Effect |
|---|---|
014 |
Skip to top of form. |
013 |
Skip mod 20 lines. |
020 |
Skip mod 30 lines. |
021 |
Skip to even line. |
022 |
Skip to every 3 line |
023 |
Same as line feed (12), but ignore margin. |
The PDP-10 supported many disk controllers. The KS10 supports only Massbus devices.
Massbus devices are attached via RH11s.
The KS10 supports one RH11 controller with up to 8 RP drives.
Disks can be stored in one of
several file formats, SIMH, DBD9 and DLD9. The latter two are for
compatibility with other simulators.
| command | action |
|---|---|
SET RPAn RP04 |
Sets this unit to be an RP04 (19MWords) |
SET RPAn RP06 |
Sets this unit to be an RP06 (39MWords) |
SET RPAn RP07 |
Sets this unit to be an RP07 (110MWords) |
SET RPAn LOCKED |
Sets this unit to be read only. |
SET RPAn WRITEENABLE |
Sets this unit to be writable. |
SET RPA ADDR=value |
Sets the Unibus address of device. (default: 776700) |
SET RPA VECT=value |
Sets the interrupt vector of device. (default: 254) |
SET RPA BR=value |
Sets the interrupt priority of device. (default: 6) |
SET RPA CTL=value |
Sets the Unibus adapter number. (default: 1) |
To attach a disk use the ATTACH command:
| command | action |
|---|---|
ATTACH RPAn <file> |
Attaches a file |
ATTACH RPAn -f <format> <file> |
Attaches a file with the given format. |
ATTACH RPAn -n <file> |
Creates a blank disk. |
Format can be SIMH, DBD9, DLD9.
The TU is a Massbus tape controller using a TM03 formatter.
| command | action |
|---|---|
SET TUAn LOCKED |
Sets the magtape to be read only. |
SET TUAn WRITEENABLE |
Sets the magtape to be writable. |
SET TUA ADDR=value |
Sets the Unibus address of device. (default: 772440) |
SET TUA VECT=value |
Sets the interrupt vector of device. (default: 224) |
SET TUA BR=value |
Sets the interrupt priority of device. (default: 6) |
SET TUA CTL=value |
Sets the Unibus adapter number. (default: 3) |
All terminal multiplexers must be attached in order to work. The
ATTACH command specifies the port to be used for Telnet sessions:
| command | action |
|---|---|
ATTACH <device> <port> |
set up listening port |
where port is a decimal number between 1 and 65535 that is not being
used for other TCP/IP activities.
Once attached and the simulator is running, the multiplexer listens
for connections on the specified port. It assumes that any incoming
connection is a Telnet connection. The connections remain open until
disconnected either by the Telnet client, a SET <device> DISCONNECT
command, or a DETACH <device> command.
| command | action |
|---|---|
SET <device> DISCONNECT=n |
Disconnect line n |
The <device> implements the following special SHOW commands:
| command | action |
|---|---|
SHOW <device> CONNECTIONS |
Displays current connections to the <device> |
SHOW <device> STATISTICS |
Displays statistics for active connections |
SHOW <device> LOG |
Displays logging for all lines. |
Logging can be controlled as follows:
| command | action |
|---|---|
SET <device> LOG=n=filename |
Log output of line n to filename |
SET <device> NOLOG |
Disable logging and close log file |
The DZ device was the standard terminal multiplexer for the
KS10. Lines came in groups of 8. A max of 32 lines can be supported.
| command | action |
|---|---|
SET DZ LINES=n |
Set the number of lines on the DZ11, multiple of 8. |
SET DZ ADDR=value |
Sets the Unibus address of device. (default: 760000) |
SET DZ VECT=value |
Sets the interrupt vector of device. (default: 340) |
SET DZ BR=value |
Sets the interrupt priority of device. (default: 5) |
SET DZ CTL=value |
Sets the Unibus adapter number. (default: 3) |
This allows the KA/KI to connect to the Internet. Currently only
supported under ITS. ITS and other OS that used the IMP did not
support modern protocols and typically required a complete rebuild to
change the IP address. Because of this the IMP processor includes
built in NAT and DHCP support. For ITS the system generated IP packets
which are translated to the local network. If the HOST is set to
0.0.0.0 there will be no translation. If HOST is set to an IP
address then it will be mapped into the address set in IP. If DHCP
is enabled the IMP will issue a DHCP request at startup and set IP
to the address that is provided. DHCP is enabled by default.
| command | action |
|---|---|
SET IMP MAC=xx:xx:xx:xx:xx:xx |
Set the MAC address of the IMP to the value given. |
SET IMP IP=ddd.ddd.ddd.ddd/dd |
Set the external IP address of the IMP along with the net mask in bits. |
SET IMP GW=ddd.ddd.ddd.ddd |
Set the Gateway address for the IMP. |
SET IMP HOST=ddd.ddd.ddd.ddd |
Sets the IP address of the PDP-10 system. |
SET IMP DHCP |
Allows the IMP to acquire an IP address from the local network via DHCP. Only HOST must be set if this feature is used. |
SET IMP NODHCP |
Disables the IMP from making DHCP queries |
SET IMP ARP=ddd.ddd.ddd.ddd=xx:xx:xx:xx:xx:xx |
Creates a static ARP entry for the IP address with the indicated MAC address. |
SET IMP ADDR=value |
Sets the Unibus address of device. (default: 767600) |
SET IMP VECT=value |
Sets the interrupt vector of device. (default: 250) |
SET IMP BR=value |
Sets the interrupt priority of device. (default: 6) |
SET IMP CTL=value |
Sets the Unibus adapter number. (default: 3) |
SHOW IMP ARP |
Displays the IP address to MAC address table. |
The IMP device must be attached to an available Ethernet interface. To
determine which devices are available use the SHOW ETHERNET to list
the potential interfaces. Check out the 0readme_ethernet.txt from
the top of the source directory.
The IMP device can be configured in several ways. Either it can
connect directly to an ethernet port (via TAP) or it can be
connected via a TUN interface. If configured via TAP interface the
IMP will behave like any other ethernet interface and if asked
obtain its own address. In environments where this is not desired, the TUN
interface can be used. When configured under a TUN interface the
simulated network is a collection of ports on the local host. These
can be mapped based on configuration options, see the
0readme_ethernet.txt file as to options.
With the IMP interface, the IP address of the simulated system is
static, and under ITS is configured into the system at compile
time. This address should be given to the IMP with the SET IMP HOST=<ip>, the IMP will direct all traffic it sees to this
address. If this address is not the same as the address of the system
as seen by the network, then this address can be set with SET IMP IP=<ip>, and SET IMP GW=<ip>, or SET IMP DHCP which will allow
the IMP to request an address from a local DHCP server. The IMP
will translate the packets it receives and sends to look like they
appeared from the desired address. The IMP will also correctly translate FTP
requests in this configuration.
When running under a TUN interface, IMP is on a virtual 10.0.2.0
network. The default gateway is 10.0.2.1, with the default IMP at
10.0.2.15. For this mode DHCP can be used.
Chaosnet was another method of network access for ITS. Chaosnet can be connected to another ITS system or a VAX/PDP-11 running BSD Unix or VMS. Chaosnet runs over UDP protocol under UNIX. You must specify a node number, peer to talk to and your local UDP listening port. All UDP packets are sent to the peer for further processing.
| command | action |
|---|---|
SET CH NODE=n |
Set the Node number for this system. |
SET CH PEER=ddd.ddd.ddd.ddd:dddd |
Set the Peer address and port number. |
SET CH ADDR=value |
Sets the Unibus address of device. (default: 764140) |
SET CH VECT=value |
Sets the interrupt vector of device. (default: 270) |
SET CH BR=value |
Sets the interrupt priority of device. (default: 6) |
SET CH CTL=value |
Sets the Unibus adapter number. (default: 3) |
The CH device must be attached to a UDP port number. This is where
it will receive UDP packets from its peer.
The KMC11-A is a general purpose microprocessor that is used in several DEC products. The KDP is an emulation of one of those products: COMM IOP-DUP. The COMM IOP-DUP microcode controls and supervises 1 - 16 DUP-11 synchronous communications line interfaces, providing scatter/gather DMA, message framing, modem control, CRC validation, receiver resynchronization, and address recognition. The DUP-11 lines are assigned to the KMC11 by the (emulated) operating system, but SimH must be told how to connect them.
DUP11 devices are used by DECNET to link machines together. They are a synchronous serial interface. This is implemented by UDP to send packets to the remote machine.
| command | action |
|---|---|
SET DUP LINES=n |
Sets number of DUP11 lines supported; current max is 2. |
SET DUPn SPEED=bits/sec |
Set speed of link, default of 0 means no restrictions. |
SET DUPn CORRUPTION=factor |
Specify corruption factor. |
SET DUPn W3 |
Enable Reset option |
SET DUPn NOW3 |
Disable reset option |
SET DUPn W5 |
Enable A dataset control option. |
SET DUPn NOW5 |
Disable A dataset control option. |
SET DUPn W6 |
Enable A & B dataset control option. |
SET DUPn NOW6 |
Disable A & B dataset control option. |
SET DUP ADDR=value |
Sets the Unibus address of device. (default: 760300) |
SET DUP VECT=value |
Sets the interrupt vector of device. (default: 570) |
SET DUP BR=value |
Sets the interrupt priority of device. (default: 5) |
SET DUP CTL=value |
Sets the Unibus adapter number. (default: 3) |
The DUP device must be attached to a UDP port number. This is where
it will receive UDP packets from its peer.
The communication line performs input and output through a TCP session
(or UDP session) connected to a user-specified port. The ATTACH
command specifies the port to be used as well as the peer address:
ATTACH DUP0 {interface:}port{,UDP},Connect=peerhost:port
where port is a decimal number between 1 and 65535 that is not being
used for other TCP/IP activities.
Specifying symmetric attach configuration (with both a listen port and a peer address) will cause the side receiving an incoming connection to validate that the connection actually comes from the connection to the destination system.
A symmetric attach configuration is required when using UDP packet transport.
The default connection uses TCP transport between the local system and
the peer. Alternatively, UDP can be used by specifying UDP on the
ATTACH command.
For more connection options, view the Help attach command for the DUP.
The KS10 simulator implements symbolic display and input. These are
controlled by the following switches to the EXAMINE and DEPOSIT
commands:
| switch | action |
|---|---|
-v |
Looks up the address via translation, will return nothing if address is not valid. |
-u |
With the -v option, use user space instead of executive space. |
-a |
Display/Enter ASCII data. |
-p |
Display/Enter packed ASCII data. |
-c |
Display/Enter Sixbit character data. |
-m |
Display/Enter symbolic instructions. |
default |
Display/Enter octal data. |
Symbolic instructions can be of the formats:
opcode ac, operandopcode operandsi/o_opcode device, address
Operands can be one or more of the following in order:
- Optional
@for indirection. +or-to set sign.- Octal number
- Optional
(AC)for indexing.
Breakpoints can be set at real memory address. The PDP-10 supports
three types of breakpoints. Execution, Memory Access and Memory
Modify. The default is execution. Adding -R to the breakpoint
command will stop the simulator on access to that memory location,
either via fetch, indirection or operand access. Adding -w will stop
the simulator when the location is modified.
The simulator can load RIM files, SAV files, EXE files, WAITS octal
DMP files, and MIT SBLK files.
When instruction history is enabled, the history trace shows internal status of various registers at the start of the instruction execution.
| field | meaning |
|---|---|
PC |
Shows the PC of the instruction executed. |
AC |
The contents of the referenced AC. |
EA |
The final computed Effective address. |
AR |
Generally the operand that was computed. |
RES |
The AR register after the instruction was complete. |
FLAGS |
The values of the FLAGS register before execution of the instruction. |
IR |
The fetched instruction followed by the disassembled instruction. |
The PDP-10 simulator allows for memory reference and memory modify
breakpoints with the -r and -w options given to the break command.
To run ITS, the CPU must be SET CPU ITS. This will enable the ITS
pager.