To: Users From: Richard Cornwell Subj: IBM 7080 Simulator Usage Date: 01-May-2007 COPYRIGHT NOTICE The following copyright notice applies to both the SIMH source and binary: Original code published in 1993-2007, written by Robert M Supnik Copyright (c) 1993-2007, Robert M Supnik IBM 7080 simulator written by Richard Cornwell 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 OR RICHARD CORNWELL 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 or Richard Cornwell shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from both Robert M Supnik and Richard Cornwell. This memorandum documents the IBM 7080 simulator. 1. Simulator Files 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/i7090/ i7080_defs.h i7080_cpu.c 7080 CPU, Channel, interface. i7080_chan.c i7080_sys.c i7080_drum.c 702/5 Drum i7000_defs.h Generic 7000 peripherals i7000_chan.c i7000_chron.c i7000_com.c i7000_dsk.c i7000_ht.c i7000_mt.c i7000_urec.c 2. IBM 7080 Features The IBM 7080 simulator is configured as follows: device simulates name(s) CPU 7080 CPU with up to 30K of memory CH0* 700 devices. CH1..CH4 754/7621 tape channels. CH5..CH7 7908 channels MTA 729 magnetic tape controller, channel 20 MTB 729 magnetic tape controller, channel 21 MTC 729 magnetic tape controller, channel 22 MTD 729 magnetic tape controller, channel 23 HTA 7340 hypertape controller. CR 711 card reader CP 721 card punch LP 716 line printer DR 733 drum for 702/705 DKn 1301/2302/7304 disk. COM 7750 communications control COML 7750 communications lines Channels B through D, are mag tape channels 1,2,3,4. Channels E & F, are 7908 channels for disk, hypertape or 7750. The 7080 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 will load a card binary image file into memory. 2.1 CPU The CPU options include setting memory size and cpu type. SET CPU 702 Sets cpu to emualte 702. SET CPU 705 Sets cpu to emualte 705-I/II. SET CPU 7053 Sets cpu to emualte 705-III. SET CPU 7080 Sets cpu to emualte 7080. SET CPU 10K Sets memory to 10K SET CPU 20K Sets memory to 20K SET CPU 40K Sets memory to 40K SET CPU 80K Sets memory to 80K SET CPU 120K Sets memory to 120K SET CPU 160K Sets memory to 160K SET CPU NO/EMU40K Sets emulated memory limit to 40k SET CPU EMU705 Sets cpu to emulate a 705-I/II. SET CPU EMU7053 Sets cpu to emulate a 705-III. The 702 can support only 10k of memory. All 705's modes can support up to 40K of memory. The 7080 can support up to 160k of memory. When in 7080 mode the machine starts as either a 705-I/II or a 705-III depending on mode of EMU705/EMU7053 switch. Also the EMU40K fixes the maximum memory for the 7080 to 40K until it enters 80 mode with EEM instruction. CPU registers include the visible state of the processor as well as the control registers for the interrupt system. name size comments IC 20 program counter A 256 accumulators 1 SW911..SW916 1 sense switches 911..916 SW 6 sense switches STOP 6 Stop flags STOPx 1 stop flags 900-905 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 2.2 I/O Channels (CH0..CH6) The 7080 supports up to 10 channels. Channel 0 is for unit record devices. Channels 1 through 4 are for tape drives. These support the option of SET CHn UREC tapes are on unit record device. SET CHn 7261 tapes are on Data Synchronizer. SET CHn 754 tapes are standard 705 drives. Channels 5-10 are for 7908 devices. For CPU channels are defined as: Channel CPU address 0 0-1999 1 2000 or 0200 if unit record or not 7080. 2 2100 or 0210 if unit record or not 7080. 3 2200 or 0220 if unit record or not 7080. 4 2300 or 0230 if unit record or not 7080. 5 4000 7908 high speed channel. 6 4100 7908 high speed channel. 7 4400 7908 channel. 8 4500 7908 channel. 9 4600 7908 channel. 10 4700 7908 channel. Channels have the following registers: name type size comments ADDR all 20 channel data address. CMD all 8 channel command. ASM all 32 current channel assembly register. FLAGS all 32 channel device status. For meaning of bits in FLAGS see i7000_defs.h. 2.3 Unit record devices. 2.3.1 711 Card Reader (CR) The card reader (CR) reads data from a disk file. Cards are simulated as ASCII lines with terminating newlines. 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 CR TEXT set text mode SET CR BINARY set column binary mode SET CR AUTO sets auto detect binary/text data. or in the ATTACH command: ATT CR attaches a file The card reader can be booted with the: BOOT CR loads either the first 2 words or 3 words depending on channel. 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.3.2 721 Card Punch (CP) The card reader (CP) writes data to a disk file. Cards are simulated as ASCII lines with terminating newlines. 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 CP TEXT set text mode SET CP BINARY set column binary mode SET CP AUTO set auto detect binary/text data. or in the ATTACH command: ATT CP attaches a file Error handling is as follows: error processed as not attached report error and stop OS I/O error report error and stop 2.3.3 716 Line Printer (LP) The line printer (LP) writes data to a disk file as ASCII text with terminating newlines. Currently set to handle standard signals to control paper advance. SET LP NO/ECHO Sets echoing to console of lineprinter output. Error handling is as follows: error processed as not attached report error and stop OS I/O error report error and stop 2.3.4 729 Magnetic Tape (MTA-D) These come in groups of 10 units each. The controller defines which channel the devices will be on. Each individual tape drive support several options: MTA used as an example. SET MTAn ONLINE Sets the mag tape drive online. SET MTAn OFFLINE Sets the mag tape drive offline and not ready. SET MTAn REWIND Sets the mag tape to the load point. SET MTAn LOCKED Sets the mag tape to be read only. SET MTAn WRITEENABLE Sets the mag tape to be writeable. SET MTAn LOW Sets mag tape to low density. SET MTAn HIGH Sets mag tape to high density. Options: Density LOW/HIGH does not change format of how tapes are written. And is only for informational purposes only. Tape drives can be booted with: BOOT MTAn 2.3.4 ChronoClock. Disabled by default. This is a special 729 tape drive which returns the current time. It supports the option of setting the channel and drive that it will occupy. Note: You must disable the real 729 drive that is is replacing. SET CHRON CHAN=n Set channel for chrono clock. SET CHRON UNIT=n Sets the unit for the chrono clock. Example: To set Chronoclock to unit A9 do the following: SET MTA9 DISABLE SET CHRON UNIT=9 CHAN=A 2.4 7908 Devices These devices must be attached to a 7908 channel to work. 2.4.1 1301/1302/2302/7320 Disk devices 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. SET DKn TYPE=7320 unit n is a drum SET DKn TYPE=7320-2 unit n is a drum (two modules). SET DKn TYPE=1301 unit n is a 1301 disk SET DKn TYPE=130l-2 unit n is a 1301-2 disk (two modules). SET DKn TYPE=1302 unit n is a 1302 disk SET DKn TYPE=1302-2 unit n is a 1302-2 disk (two modules). SET DKn TYPE=2302 unit n is a 2302 disk Units can be SET ENABLED or DISABLED. In addition, units can be set to enable or disable formatting: SET DKn FORMAT enable formatting SET DKn NOFORMAT disable formatting SET DKn HA2 enable writing of home address 2 SET DKn NOHA2 disable writing of home address 2 SET DKn MODULE=n sets modules for unit, modules can only be even. 0 to 8. SET DKn CHAN=n sets channel for unit (40-47). Formatting is disabled by default. All Disk units support bootsrapping with boot command. Bootstrap code is build based on whether CPU is in CTSS mode or not. BOOT DKn Error handling is as follows: error processed as not attached report error and stop OS I/O error report error and stop 2.4.2 Hypertape 7340 Tape drive (HTA/B) These come in groups of 10 units each. The controller defines which channel the devices will be on. SET HTx CHAN=n Set magtape to channel n. x = 40-47 Each individual tape drive support several options: HTA used as an example. SET HTAn LOCKED Sets the mag tape to be read only. SET HTAn WRITEENABLE Sets the mag tape to be writeable. NOTE: Hypertape drives may not be working correctly since there is very little documentation available on them. Hypertape drives can be booted with: BOOT HTxn 2.4.3 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 SET COM CHAN=n set channel for com controller. 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.6 Symbolic Display and Input The IBM 7080 simulator implements symbolic display and input. Display is controlled by command line switches: -c display as BCD character -m display instruction mnemonics 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 7090 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. 2.7 Sim Load The load command looks at the extension of the file to determine how to load the file. .dck Loads autocode loader deck. .sym Loads a 7080 symbolic deck. address instruction. address BCD string address OCT octal, octal,....