1. IBM 7090/7094 simulator usage¶
- Date:
2008-12-01
- Revision:
$Format:%H$
- Copyright:
See LICENSE.txt for terms of use.
This memorandum documents the IBM 7094 simulator.
1.1. Simulator files¶
To compile the IBM 7094,
you must define USE_INT64
as part of the compilation command-line.
sim/
scp.h
sim_console.h
sim_defs.h
sim_fio.h
sim_rev.h
sim_sock.h
sim_tape.h
sim_timer.h
sim_tmxr.h
scp.c
sim_console.c
sim_fio.c
sim_sock.c
sim_tape.c
sim_timer.c
sim_tmxr.c
sim/i7094/
i7094_defs.h
i7094_dat.h
i7094_cd.c
i7094_clk.c
i7094_com.c
i7094_cpu.c
i7094_cpu1.c
i7094_drm.c
i7094_dsk.c
i7094_io.c
i7094_lp.c
i7094_mt.c
i7094_sys.c
1.2. IBM 7090/7094 features¶
The IBM 7090/7094 simulator is configured as follows:
Device name(s) |
Simulates |
---|---|
|
7090, 7094, or 7094 with CTSS RPQ’s CPU with 32KW, 32KW, or 64KW of memory, respectively |
|
Interval timer (RPQ F89349) and Chronolog clock |
|
7607 channel (required) |
|
Additional 7607, 7289, or 7909 channels |
|
Magnetic tape controller, channel A (required) |
|
Additional magnetic tape controllers, channels B to H |
|
711 card reader |
|
721 card punch |
|
716 line printer |
|
7631 file control with up to 10 modules (disks or drums) |
|
7289 fast drum control |
|
7750 communications control |
|
7750 communications lines |
Channels B through H, the corresponding magnetic tape controllers, and the file control, drum control, and communications control are initially set DISABLED. The file control, drum control, and communications control can be assigned to any channel in the range B through H.
The 7090/7094 simulator implements several unique stop condition:
Undefined CPU instruction
Undefined channel instruction
XEC nesting exceeds limit
Divide check on a divide and halt instruction
Select of a non-existent channel
7607 select of a 7909 channel
Write select of a write protected device
Invalid file control format
Invalid message to 7750
No buffer storage available for input character on 7750
No buffer storage available for output character on 7750
The LOAD
command is not implemented.
1.2.1. CPU¶
The CPU options allow the user to specify a 7090, a 7094, or a 7094 with CTSS RPQs.
SET CPU 7090 7090
SET CPU 7094 Standard 7094
SET CPU CTSS 7094 with CTSS RPQs
Memory size is 32KW on a 7090 or 7094 CPU, 64KW on a CTSS CPU. CTSS mode enables access to the Chronolog clock as magtape unit A7.
CPU registers include the visible state of the processor as well as the control registers for the interrupt system.
Name |
Size |
Comments |
---|---|---|
|
15 |
Program counter |
|
38 |
Accumulator |
|
36 |
Multiplier-quotient |
|
36 |
Storage indicators |
|
36 |
Front panel keys |
|
15 |
Index registers 1 to 7
[7090 uses only |
|
1 |
Sense switches 1 to 6 |
|
1 |
Sense lights 1 to 4 |
|
1 |
AC overflow indicator |
|
1 |
MQ overflow indicator |
|
1 |
Divide check indicator |
|
1 |
I/O check indicator |
|
1 |
Transfer trap enable |
|
1 |
Copy trap enable |
|
1 |
Select trap enable |
|
1 |
Floating point trap enable |
|
1 |
Storage nullification mode enable |
|
1 |
Multiple-tag mode enable [always 1 on 7090] |
|
8 |
Channel request flags |
|
1 |
Channel trap pending |
|
1 |
Channel trap inhibit |
|
1 |
Channel trap instruction inhibit |
|
30 |
Channel trap enable flags |
|
1 |
User mode flag [CTSS only] |
|
1 |
Instruction B-core flag [CTSS only] |
|
1 |
Data B-core flag [CTSS only] |
|
8 |
Relocation base block [CTSS only] |
|
8 |
Address start block [CTSS only] |
|
8 |
Address limit block [CTSS only] |
|
15 |
PC at start of instruction |
|
15 |
PC prior to last jump or interrupt; Most recent PC change first |
|
1 |
Halt and transfer pending |
|
15 |
Halt and transfer address |
|
8 |
XEC chain limit |
|
8 |
Interrupt character |
|
1 |
Stop on undefined instruction |
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:
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
If switch -C
is set,
channel commands are also included in the CPU history.
The maximum length for the history is 262144 entries.
1.2.2. Interval timer (CLK
)¶
The timer (CLK
) implements a 60Hz interval timer.
It is disabled by default.
The timer has the following registers:
Name |
Size |
Comments |
---|---|---|
|
1 |
Interval timer trap flag |
|
24 |
Tick delay |
1.2.3. I/O channels (CHANA
..CHANH
)¶
The 709X supports up to 8 channels. Channel models include:
7607 Standard multiplexer channel
7289 High speed drum channel
7909 Advanced capabilities channel
Channel A is required and is always a 7607. Channels B through H are disabled by default. Channels B through H can be enabled. When a channel is enabled, the attached device must also be specified:
SET CHANx ENABLED{=[729|TAPE|7289|DRUM|7631|FILE|7750|COMM]}
If no device type is specified,
TAPE
is assumed.
Setting a channel to 729 (synonym TAPE
) defines the channel as a 7607 and enables the corresponding magnetic tape controller.
Setting a channel to 7289 (synonym DRUM
) defines the channel as a 7289 and enables the high-speed drum control.
Setting a channel to 7631 defines the channel as a 7909 and enables the file control.
Setting a channel to 7750 (synonym COMM
) defines the channel as a 7909 and enables the communications control.
Only one high-speed drum control,
one file control,
and one communications control are supported per system.
As an example, the following commands set up the 1971 CTSS configuration:
SET CPU CTSS
SET CLK ENABLED
SET CHANB ENABLED=TAPE
SET CHANC ENABLED=DISK
SET CHANE ENABLED=COMM
SET CHANG ENABLED=DRUM
Channels have the following registers:
Name |
Type |
Size |
Comments |
---|---|---|---|
|
All |
8 |
Channel state |
|
7607,7289 |
4 |
Data select |
|
7607,7289 |
9 |
Data select unit |
|
7607,7289 |
4 |
Non-data select |
|
7607,7289 |
9 |
Non-data select unit |
|
All |
30 |
Channel flags |
|
All |
2 |
Input data flags |
|
All |
5 |
Channel opcode |
|
All |
16 |
Channel location counter |
|
All |
15 |
Channel word counter |
|
All |
16 |
Channel current address |
|
All |
36 |
Channel assembly register |
|
7909 |
6 |
Channel interrupt conditions |
|
7909 |
6 |
Channel control counter |
|
7909 |
7 |
Channel options mask |
1.2.4. Channel A devices¶
1.2.4.1. 711 card reader (CDR
)¶
The card reader (CDR
) reads data from a disk file.
Cards are simulated as ASCII lines with terminating newlines.
The POS
register specifies the number of the next data item to be read.
Thus, by changing POS
,
the user can backspace or advance the reader.
Card reader files can either be text
(one character per column)
or column binary
(two characters per column).
The file type can be specified with a SET
command:
SET CDR TEXT Set text mode
SET CDR BINARY Set column binary mode
or in the ATTACH
command:
ATT -T CDR <file> Set text mode
ATT CDR <file>.TXT Set text mode
ATT -C CDR <file> Set column binary mode
ATT CDR <file>.CBN Set column binary mode
The card reader supports the BOOT
command.
BOOT CDR
starts the standard card reader bootstrap at location 0.
The card reader implements these registers:
Name |
Size |
Comments |
---|---|---|
|
2 |
Reader state |
|
5 |
Binary buffer pointer |
|
36 |
Binary buffer |
|
32 |
Position in the input file |
|
24 |
Card start delay |
|
24 |
Card stop delay |
|
24 |
Delay between row halves |
|
24 |
Delay between rows |
Error handling is as follows:
Error |
Processed as |
---|---|
Not attached |
Report error and stop |
End-of-file |
Out of cards |
OS I/O error |
Report error and stop |
1.2.4.2. 721 card punch (CDP
)¶
The card reader (CDP
) writes data to a disk file.
Cards are simulated as ASCII lines with terminating newlines.
The POS
register specifies the number of the next data item to be written.
Thus, by changing POS
,
the user can backspace or advance the punch.
Card punch files can either be text
(one character per column)
or column binary
(two characters per column).
The file type can be specified with a SET
command:
SET CDP TEXT Set text mode
SET CDP BINARY Set column binary mode
or in the ATTACH
command:
ATT -T CDP <file> Set text mode
ATT CDP <file>.TXT Set text mode
ATT -C CDR <file> Set column binary mode
ATT CDP <file>.CBN Set column binary mode
The card punch supports both the business (1403 print chain A) and Fortran (1403 print chain H) character sets:
SET CDP BUSINESS Business character set
SET CDP FORTRAN Fortran character set
The Fortran character set is the default.
The card punch implements these registers:
Name |
Size |
Comments |
---|---|---|
|
2 |
Reader state |
|
36 |
Channel output buffer |
|
1 |
Output buffer valid flag |
|
5 |
Binary buffer pointer |
|
36 |
Binary buffer |
|
32 |
Position in the output file |
|
24 |
Card start delay |
|
24 |
Card stop delay |
|
24 |
Delay between row halves |
|
24 |
Delay between rows |
Error handling is as follows:
Error |
Processed as |
---|---|
Not attached |
Report error and stop |
OS I/O error |
Report error and stop |
1.2.4.3. 716 line printer (LPT
)¶
The line printer (LPT
) writes data to a disk file as ASCII text with terminating newlines.
The POS
register specifies the number of the next data item to be written.
Thus, by changing POS
,
the user can backspace or advance the printer.
The line printer implements both 48- and 64-character print chains:
SET LPT 64 64-character print chain
SET LPT 48 48-character print chain
The line printer also implements both the business (1403 print chain A) and Fortran (1403 H chain) character sets:
SET LPT BUSINESS Business print character set
SET LPT FORTRAN Fortran character set
The default is 64 characters, Fortran set.
Finally, because the line printer was used for status output messages, its output can be redirected to the controlling terminal window if no file is attached:
SET LPT DEFAULT Default output to console window
SET LPT NODEFAULT No default output, error if not attached
The line printer implements these registers:
Name |
Size |
Comments |
---|---|---|
|
2 |
Printer state |
|
2 |
Printer command |
|
36 |
Channel output buffer |
|
1 |
Output buffer valid flag |
|
5 |
Binary buffer pointer |
|
36 |
Binary buffer |
|
36 |
Echo buffer |
|
32 |
Position in the output file |
|
24 |
Line start delay |
|
24 |
Line print delay |
|
24 |
Delay between row halves |
|
24 |
Delay between rows |
Error handling is as follows:
Error |
Processed as |
---|---|
Not attached |
Report error and stop |
OS I/O error |
Report error and stop |
1.2.5. 729 magnetic tape (MTA
…MTH
)¶
Every 7607 channel can support up to ten seven-track magnetic tape units (MTx1
…MTx10
).
Magnetic tape options include the ability to make units write enabled or write locked.
SET MTn LOCKED Set unit n write locked
SET MTn WRITEENABLED Set unit n write enabled
Magnetic tape units can be set to a specific reel capacity in MB, or to unlimited capacity:
SET MTn CAPAC=m Set unit n capacity to m MB (0 = unlimited)
SHOW MTn CAPAC Show unit n capacity in MB
Units can also be set ENABLED
or DISABLED
.
The magnetic tape simulator supports the BOOT
command.
BOOT MTxn
starts the standard magnetic tape load program at location 0.
The magnetic tape controllers implement the following registers:
Name |
Size |
Comments |
---|---|---|
|
5 |
Unit select code |
|
36 |
Channel output buffer |
|
1 |
Output buffer valid flag |
|
16 |
Buffer pointer |
|
16 |
Buffer length |
|
7 |
Character buffer (with parity) |
|
24 |
Wait time for end of file |
|
24 |
Wait time for “immediate” commands |
|
24 |
Wait time for unit start |
|
24 |
Wait time for unit stop |
|
24 |
Wait time between word transfers |
|
5 |
Unit state, drives 1 to 10 |
|
32 |
Position, drives 1 to 10 |
Error handling is as follows:
Error |
Processed as |
---|---|
Not attached |
Report error and stop |
End-of-file |
Set error indicator |
OS I/O error |
Print error message
Set error indicator
Report error and stop
|
1.2.6. 7631 file control (DSK
)¶
The 7631 file control supports up to ten devices,
which can be 7320 drums,
1301 disks,
1302 disks,
or 2302 disks.
Unit types are specified with the SET
command.
The type can be set only if the unit
(and the next unit in sequence)
is unattached,
and the unit number is even:
SET DSKn 7320 Unit n is a drum (unit n+1 is disabled)
SET DSKn 1301 Unit n is a 1301 disk (unit n+1 is the same)
SET DSKn 1302 Unit n is a 1302 disk (unit n+1 is the same)
SET DSKn 2302 Unit n is a 2302 disk (unit n+1 is the same)
Units can be SET ENABLED
or DISABLED
.
In addition,
units can be set to enable or disable formatting:
SET DSKn FORMAT Enable formatting
SET DSKn NOFORMAT Disable formatting
Formatting is disabled by default. The current format can be shown with the command:
SHOW DSKn FORMAT Display format information
The 7631 implements the following registers:
Name |
Size |
Comments |
---|---|---|
|
6 |
File control state |
|
1 |
Currently selected access |
|
4 |
Currently selected module (0-9) |
|
36 |
Record address (6 BCD characters) |
|
4 |
Disk I/O mode |
|
60 |
Sense data (10 BCD characters) |
|
60 |
Most recent command (10 BCD characters) |
|
36 |
Channel output buffer |
|
1 |
Output buffer valid flag |
|
1 |
Channel stop flag |
|
13 |
Format track character counter |
|
36 |
Track buffer |
|
10 |
Offset to record base |
|
10 |
Offset to current word |
|
10 |
Offset to record end |
|
24 |
Seek delay |
|
24 |
Rotational delay |
|
24 |
Inter-word delay |
|
24 |
End-of-sector (gap) delay |
|
24 |
Command processing delay |
|
10 |
Current track number
[0:9] module n, access 0
[10:19] module n, access 1
|
Error handling is as follows:
Error |
Processed as |
---|---|
Not attached |
Report error and stop |
OS I/O error |
Report error and stop |
1.2.7. 7289 high-speed drum (DRM
)¶
The 7289 (also known as the 7320A) high-speed drum was a late addition to CTSS. Very little is known about the device, other than what is used in the CTSS sources.
The drum implements these registers:
Name |
Size |
Comments |
---|---|---|
|
2 |
Drum state |
|
18 |
Drum address register |
|
1 |
Read/write flag |
|
36 |
Channel output buffer |
|
1 |
Output buffer valid flag |
|
24 |
Inter-word delay |
Error handling is as follows:
Error |
Processed as |
---|---|
Not attached |
Report error and stop |
Drum data files are buffered in memory; therefore, end of file and OS I/O errors cannot occur.
1.2.8. 7750 communications controller (COM
and COML
)¶
The 7750 is modeled as a terminal multiplexer with 33 lines.
It consists of two devices:
COM
is the multiplexer controller,
and COML
is the individual lines.
For the first 32 lines,
the 7750 performs input and output through Telnet sessions connected via a user-specified listening port;
the 33rd line is permanently attached to the simulator console window.
The ATTACH
command specifies the port to be used for Telnet sessions:
ATTACH COM <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.
Each line (each unit of COML
) can be set to one of two modes:
KSR-35 and KSR-37.
In KSR-35 mode,
lowercase input and output characters are converted automatically to uppercase,
and parity is ignored.
In KSR-37 mode,
lowercase characters are left alone,
and even parity is generated on input.
KSR-37 is the default.
Once COM
is attached and the simulator is running,
the 7750 listens for connections on the specified port.
It assumes that any incoming connection is a Telnet connection.
A connection remains open until disconnected either by the Telnet client,
a SET COM DISCONNECT
command,
or a DETACH COM
command.
The 7750 implements the following special SHOW
commands:
SHOW COM CONNECTIONS Displays current connections to the 7750
SHOW COM STATISTICS Displays statistics for active connections
SHOW COM FREEQ Displays the character buffer free list
SHOW COM INPQ Displays the character input queue
SHOW COM OUTQ Displays the output queues for all lines
SHOW COMn OUTQ Displays the output queue for line n
The 7750 implements the following special SET
commands:
SET COM DISCONNECT=n Disconnect line n
SET COMLn DISCONNECT Disconnect line n
SET COMLn LOG=filename Log output of line n to filename
SET COMLn NOLOG Disable logging and close log file
SET COMLn KSR35 Set line n to KSR-35
SET COMLn KSR37 Set line n to KSR-37
The controller (COM
) implements these registers:
Name |
Size |
Comments |
---|---|---|
|
1 |
Enable flag |
|
6 |
Controller state |
|
12 |
Input message sequence number |
|
36 |
Channel output buffer |
|
1 |
Output buffer valid flag |
|
1 |
Channel stop flag |
|
36 |
Channel buffer |
|
7 |
Channel buffer pointer |
|
7 |
Channel buffer limit |
|
16 |
Free queue header |
|
16 |
Input queue header |
|
16 |
Output queue headers, lines 0 to 32 |
|
16 |
Character buffer entries |
Queue headers consist of two 16-bit words; both are subscripts into the character buffer array. The first word is the buffer subscript for the queue head; the second is the buffer subscript for the queue tail. In an empty queue, both words are 0.
Character buffer entries also consist of two 16-bit words. The first is the buffer subscript for the next entry in the queue; 0 indicates end of queue. The second is the data element, typically a 12-bit character.
The lines (COML
) implements these registers:
Name |
Size |
Comments |
---|---|---|
|
24 |
Transmit time, lines 0 to 32 |
The 7750 does not support save and restore.
All open connections,
except the permanent connection to the console window,
are lost when the simulator shuts down or COM
is detached.
1.3. Symbolic display and input¶
The IBM 7094 simulator implements symbolic display and input. Display is controlled by command-line switches:
|
Display as character |
|
Display as character string |
|
Display instruction mnemonics |
|
Display as 7607 IO instruction |
|
Display as 7909 IO instruction |
Character and string display is further qualified by switches that specify the character coding and conversion conventions:
|
BCD data (default is nine-code) |
|
Business character set (default is Fortran) |
The default data coding is nine-code, and the default character set is Fortran. Note that 7094 BCD and IBM 1401 BCD differ in one important regard: the 7094 interprets 0 as code 20, the 1401 as code 12.
Input parsing is controlled by the first character typed in or by command-line switches:
|
Character |
|
String |
Alphabetic |
Instruction mnemonic |
Numeric |
Octal number |
Instruction input uses standard 7094 assembler syntax. There are two basic instruction classes: memory reference and index reference.
Memory reference instructions have the format
memref{*} address{,tag}
Index reference instructions have the format
idxref{*} address,{tag},decrement
Specific instructions may disallow indirect addressing or limit the size of the tag, address, or decrement fields.
Channel (I/O) instructions have the same basic two formats.
1.4. Character sets¶
The IBM 7094 uses a 6-bit character code called 9-code, a variation (with permuted zones) of the ubiquitous BCD (binary coded decimal). The 7094 also uses BCD for communicating with the card reader/punch and the line printer. In both 9-code and BCD, some of the characters have no equivalent in ASCII and require different representations:
9-code |
ASCII representation |
IBM 7094 character |
Print chains |
---|---|---|---|
00 |
|
||
01 |
|
||
02 |
|
||
03 |
|
||
04 |
|
||
05 |
|
||
06 |
|
||
07 |
|
||
10 |
|
||
11 |
|
||
12 |
|
||
13 |
|
|
|
14 |
|
|
|
15 |
|
Blank in A, H 48 char |
|
16 |
|
Blank in A, H 48 char |
|
17 |
|
Tape mark |
Blank in A, H 48 char |
20 |
|
|
|
21 |
|
||
22 |
|
||
23 |
|
||
24 |
|
||
25 |
|
||
26 |
|
||
27 |
|
||
30 |
|
||
31 |
|
||
32 |
|
||
33 |
|
||
34 |
|
||
35 |
|
Blank in A, H 48 char |
|
36 |
|
Blank in A, H 48 char |
|
37 |
|
Group mark |
Blank in A, H 48 char |
40 |
|
||
41 |
|
||
42 |
|
||
43 |
|
||
44 |
|
||
45 |
|
||
46 |
|
||
47 |
|
||
50 |
|
||
51 |
|
||
52 |
|
||
53 |
|
||
54 |
|
||
55 |
|
Blank in A, H 48 char |
|
56 |
|
Blank in A, H 48 char |
|
57 |
|
Delta |
Blank in A, H 48 char |
60 |
Space |
||
61 |
|
||
62 |
|
||
63 |
|
||
64 |
|
||
65 |
|
||
66 |
|
||
67 |
|
||
70 |
|
||
71 |
|
||
72 |
|
Record mark |
|
73 |
|
||
74 |
|
|
|
75 |
|
Blank in A, H 48 char |
|
76 |
|
Blank in A, H 48 char |
|
77 |
|
Blank in A, H 48 char |
BCD code |
ASCII representation |
IBM 7094 character |
Print chains |
---|---|---|---|
00 |
Space |
||
01 |
|
||
02 |
|
||
03 |
|
||
04 |
|
||
05 |
|
||
06 |
|
||
07 |
|
||
10 |
|
||
11 |
|
||
12 |
|
||
13 |
|
|
|
14 |
|
|
|
15 |
|
Blank in A, H 48 char |
|
16 |
|
Blank in A, H 48 char |
|
17 |
|
Tape mark |
Blank in A, H 48 char |
20 |
|
Blank in A, H 48 char |
|
21 |
|
||
22 |
|
||
23 |
|
||
24 |
|
||
25 |
|
||
26 |
|
||
27 |
|
||
30 |
|
||
31 |
|
||
32 |
|
Record mark |
|
33 |
|
||
34 |
|
|
|
35 |
|
Blank in A, H 48 char |
|
36 |
|
Blank in A, H 48 char |
|
37 |
|
Blank in A, H 48 char |
|
40 |
|
||
41 |
|
||
42 |
|
||
43 |
|
||
44 |
|
||
45 |
|
||
46 |
|
||
47 |
|
||
50 |
|
||
51 |
|
||
52 |
|
||
53 |
|
||
54 |
|
||
55 |
|
Blank in A, H 48 char |
|
56 |
|
Delta |
Blank in A, H 48 char |
57 |
|
Blank in A, H 48 char |
|
60 |
|
||
61 |
|
||
62 |
|
||
63 |
|
||
64 |
|
||
65 |
|
||
66 |
|
||
67 |
|
||
70 |
|
||
71 |
|
||
72 |
|
||
73 |
|
||
74 |
|
||
75 |
|
Blank in A, H 48 char |
|
76 |
|
Blank in A, H 48 char |
|
77 |
|
Group mark |
Blank in A, H 48 char |