To: Users From: Bob Supnik Subj: IBM 7094 Simulator Usage Date: 15-Jul-2005 COPYRIGHT NOTICE The following copyright notice applies to both the SIMH source and binary: Original code published in 1993-2005, written by Robert M Supnik Copyright (c) 1993-20054, Robert M Supnik Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ROBERT M SUPNIK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Robert M Supnik shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Robert M Supnik. This memorandum documents the IBM 7094 simulator. 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 2. IBM 7094 Features The IBM 7094 simulator is configured as follows: device simulates name(s) CPU 7094 CPU with 32KW/64KW of memory CLK interval timer (RPQ F89349) and Chronolog clock CHANA 7607 channel (required) CHANB..CHANH additional 7607, 7289, or 7909 channels MTA magnetic tape controller, channel A (required) MTB..MTH additional magnetic tape controllers, channels B..H CDR 711 card reader CDP 721 card punch LPT 716 line printer DSK 7631 file control with up to 10 modules (disks or drums) DRM 7289 fast drum control COM 7750 communications control COML 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 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. 2.1 CPU The CPU options allow the user to a standard CPU or the customized CPU used by the CTSS project: SET CPU STANDARD Standard CPU SET CPU CTSS CTSS CPU Memory size is 32KW on a standard 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 PC 15 program counter AC 38 accumulator MQ 36 multiplier-quotient SI 36 storage indicators KEYS 36 front panel keys XR1..XR7 15 index registers 1..7 SS1..SS6 1 sense switches 1..6 SL1..4 1 sense lights 1..4 OVF 1 AC overflow indicator MQO 1 MQ overflow indicator DVC 1 divide check indicator IOC 1 I/O check indicator TTRAP 1 transfer trap enable CTRAP 1 copy trap enable STRAP 1 select trap enable FTRAP 1 floating point trap enable STORN 1 storage nullification mode enable MULTI 1 multiple-tag mode enable CHREQ 8 channel request flags CHTR_PEND 1 channel trap pending CHTR_INHT 1 channel trap inhibit CHTR_INHI 1 channel trap instruction inhibit CHTR_ENAB 30 channel trap enable flags USERM 1 (CTSS) user mode flag IMEM 1 (CTSS) instruction B-core flag DMEM 1 (CTSS) data B-core flag RELOC 8 (CTSS) relocation base block START 8 (CTSS) address start block LIMIT 8 (CTSS) address limit block OLDPC 15 PC at start of instruction PCQ[0:63] 15 PC prior to last jump or interrupt; most recent PC change first HTPEND 1 halt and transfer pending HTADDR 15 halt and transfer address XECMAX 8 XEC chain limit WRU 8 interrupt character STOP_ILL 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. 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 TRAP 0 interval timer trap flag TIME 24 tick delay 2.3 I/O Channels (CHANA..CHANH) The 7094 supports up to 8 channels. Channel models include 7607 standard multiplexor 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{=[729|TAPE|7289|DRUM|7631|FILE|7750|COMM]} If no device type is specified, 729 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 STATE all 8 channel state DSC 7607,7289 4 data select DSU 7607,7289 9 data select unit NDSC 7607,7289 4 non-data select NDSU 7607,7289 9 non-data select unit FLAGS all 30 channel flags OP all 5 channel opcode CLC all 15 channel location counter WC all 15 channel word counter CA all 16 channel current address AR all 36 channel assembly register CND 7909 6 channel interrupt conditions LCC 7909 6 channel control counter SMS 7909 7 channel options mask 2.4 Channel A Devices 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 set text mode ATT CDR .TXT set text mode ATT -C CDR set column binary mode ATT CDR .CBN set column binary mode The card reader implements these registers: name size comments STATE 2 punch state BPTR 5 binary buffer pointer BUF[0:23] 36 binary buffer POS 32 position in the output file TSTART 24 card start delay TSTOP 24 card stop delay TLEFT 24 delay between row halves TRIGHT 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 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 set text mode ATT CDP .TXT set text mode ATT -C CDR set column binary mode ATT CDP .CBN set column binary mode The card punch implements these registers: name size comments STATE 2 reader state CHOB 36 channel output buffer BPTR 5 binary buffer pointer BUF[0:23] 36 binary buffer POS 32 position in the input file TSTART 24 card start delay TSTOP 24 card stop delay TLEFT 24 delay between row halves TRIGHT 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 2.4.3 716 Line Printer (LPT) The line printer (CDP) 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 punch. The line printer implements these registers: name size comments STATE 2 printer state CMD 2 printer command CHOB 36 channel output buffer BPTR 5 binary buffer pointer BUF[0:23] 36 binary buffer EBUF[0:22] 36 echo buffer POS 32 position in the input file TSTART 24 line start delay TSTOP 24 line print delay TLEFT 24 delay between row halves TRIGHT 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 2.5 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 STATE 6 file control state ACCESS 1 currently selected access MODULE 4 currently selected module (0-9) RECORD 36 record address (6 BCD characters) MODE 4 disk I/O mode SENSE 60 sense data (10 BCD characters) BCDCMD 60 most recent command (10 BCD characters) CHOB 36 channel output buffer STOP 1 channel stop flag FCNTR 13 format track character counter BUF[0:999] 36 track buffer RBASE 10 offset to record base RPTR 10 offset to current word RLIM 10 offset to record end STIME 24 seek delay RTIME 24 rotational delay WTIME 24 inter-word delay GTIME 24 end-of-sector (gap) delay CTIME 24 command processing delay TRACK[0:19] 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 2.6 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 STATE 2 drum state DA 18 drum address register OP 1 read/write flag CHOB 36 channel output buffer TIME 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. 2.7 7750 Communications Controller (COM and COML) The 7750 is modelled as a terminal multiplexor with 33 lines. It consists of two device: COM is the multiplexor controller, and COML is the indivdual 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 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 twp modes: KSR-35 and KSR-37. In KSR-35 mode, lower case input and output characters are converted automatically to upper case, and parity is ignored. In KSR-37 mode, lower case 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 connections. The connections remain 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 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 ENABLE 1 enable flag STATE 6 controller state MSGNUM 12 input message sequence number CHOB 36 channel output buffer STOP 1 channel stop flag BUF[0:119] 36 channel buffer BPTR 7 channel buffer pointer BLIM 7 channel buffer limit FREEQ[0:1] 16 free queue header INPQ[0:1] 16 input queue header OUTQ[0:65] 16 output queue headers, lines 0..32 PKTB[0:32767] 16 character buffer entries Queue headers consist of two 16b 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 16b 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 12b character. The lines (COML) implements these registers: name size comments TIME[0:32] 24 transmit time, lines 0..32 The additional terminals do 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. 2.9 Symbolic Display and Input The IBM 7094 simulator implements symbolic display and input. Display is controlled by command line switches: -c display as BCD character -s display as BCD character string -m display instruction mnemonics -i display as 7607 IO instruction -n display as 7909 IO instruction Input parsing is controlled by the first character typed in or by command line switches: ' or -c BCD character " or -s BCD 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.