home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Emulators / Supnik_2.2 / sim.doc < prev   
Encoding:
Internet Message Format  |  1996-01-27  |  45.4 KB

  1. To:    Users
  2. From:    The Author
  3. Subj:    Simulator Usage, V2.2
  4. Date:    27-Jan-96
  5.  
  6. This memorandum documents the PDP-8, PDP-11, PDP 18b, and Nova simulators.
  7. These simulators are freeware; commercial use is prohibited, and support is
  8. not available.  The best way to fix problems or add features is to read
  9. and modify the sources yourself.  Alternately, you can send Internet mail
  10. to dsmaint@pa.dec.com; but responses are NOT guaranteed.
  11.  
  12. The simulators use a common command interface.  The memorandum first
  13. describes the common features of the command interface and then provides
  14. information on each of the individual simulators.
  15.  
  16.  
  17. 1. Compiling And Running A Simulator
  18.  
  19. The simulators have been tested on VAX VMS, Alpha VMS, Alpha UNIX,
  20. and Intel LINUX.  Porting to other environments will require changes
  21. to the operating system dependent code in scp_tty.c.
  22.  
  23. To compile the simulators on Alpha UNIX, use these commands (note that
  24. separate compilations are required for each of the 18b PDP's):
  25.  
  26.     % cc pdp8*.c scp*.c -lm -o pdp8
  27.     % cc pdp11*.c scp*.c -o pdp11
  28.     % cc nova*.c scp*.c -lm -o nova
  29.     % cc -DPDP{4,7,9,15} pdp18b*.c scp*.c -lm -o pdp{4,7,9,15}
  30.  
  31. To compile the simulators on LINUX, use these commands:
  32.  
  33.     % cc -DLINUX pdp8*.c scp*.c -lm -lbsd -o pdp8
  34.     % cc -DLINUX pdp11*.c scp*.c -lbsd -o pdp11
  35.     % cc -DLINUX nova*.c scp*.c -lm -lbsd -o nova
  36.     % cc -DPDP{4,7,9,15} -DLINUX pdp18b*.c scp*.c -lm -o pdp{4,7,9,15}
  37.  
  38. To start the simulator, simply type its name.  The simulator takes
  39. one optional argument, a startup command file.  If specified, this
  40. file should contain a series of non-interactive simulator commands,
  41. one per line.  These command can be used to set up standard parameters,
  42. for example, disk sizes.
  43.  
  44.     % pdp8 <startup file>(cr)        or
  45.     % pdp11 <startup file>(cr)        or
  46.     % nova <startup file>(cr)        or
  47.     % pdp{4,7,9,15} <startup file>(cr)
  48.  
  49. The simulator types out its name and version, executes the commands
  50. in the startup file, if any, and then prompts for input with
  51.  
  52.     sim>
  53.  
  54. 2. Simulator Conventions
  55.  
  56. A simulator consists of a series of devices, the first of which is always
  57. the CPU.  A device consists of named registers and one or more numbered
  58. units.  Registers correspond to device state, units to device address
  59. spaces.  Thus, the CPU device might have registers like PC, ION, etc,
  60. and a unit corresponding to main memory; a disk device might have
  61. registers like BUSY, DONE, etc, and units corresponding to individual
  62. disk drives.  Except for main memory, device address spaces are simulated
  63. as unstructured binary disk files in the host file system.  (Thus, files
  64. with data widths greater than 8b are endian dependent.)  The SHOW CONFIG
  65. command displays the simulator configuration.
  66.  
  67. A simulator keeps time in terms of arbitrary units, usually one time unit
  68. per instruction executed.  Simulated events (such as completion of I/O)
  69. are scheduled at some number of time units in the future.  The simulator
  70. executes synchronously, invoking event processors when simulated events
  71. are scheduled to occur.  Even asynchronous events, like keyboard input,
  72. are handled by polling at synchronous intervals.  The SHOW QUEUE command
  73. displays the simulator event queue.
  74.  
  75. 3. Commands
  76.  
  77. 3.1 Loading Programs
  78.  
  79. The LOAD command (abbreviation LO) loads a file in binary paper-tape
  80. loader format:
  81.  
  82.     sim> load <filename>(cr)
  83.  
  84. 3.2 Saving and Restoring State
  85.  
  86. The SAVE command (abbreviation SA) save the complete state of the
  87. simulator to a file.  This includes the contents of main memory and
  88. all registers, and the I/O connections of devices:
  89.  
  90.     sim> save <filename>(cr)
  91.  
  92. The RESTORE command (abbreviation REST, alternately GET) restores a
  93. previously saved simulator state:
  94.  
  95.     sim> restore <filename>(cr)
  96.  
  97. Note: SAVE file format compresses zeroes to minimize file size.
  98.  
  99. 3.3 Resetting Devices
  100.  
  101. The RESET command (abbreviation RE) resets a device or the entire
  102. simulator to a predefined condition:
  103.  
  104.     sim> RESET(cr)            -- reset all devices
  105.     sim> RESET ALL(cr)        -- reset all devices
  106.     sim> RESET <device>(cr)        -- reset specified device
  107.  
  108. Typically, RESET stops any in-progress I/O operation, clears any
  109. interrupt request, and returns the device to a quiescent state.  It
  110. does not clear main memory or affect I/O connections.
  111.  
  112. 3.4 Connecting and Disconnecting Devices
  113.  
  114. Except for main memory, simulated unit address spaces are simulated as
  115. unstructured binary disk files in the host file file system.  Before using
  116. a simulated unit the user must specify the file to be used by a particular
  117. unit.  The ATTACH (abbreviation AT) command associates a unit and a file:
  118.  
  119.     sim> ATTACH <device><unit number> <filename>(cr)
  120.  
  121. If the file does not exist, it is created, and an appropriate message
  122. is printed.
  123.  
  124. The DETACH (abbreviation DET) command breaks the association between a
  125. unit and a file and closes the file:
  126.  
  127.     sim> DETACH ALL(cr)            -- detach all units
  128.     sim> DETACH <device><unit number>(cr)    -- detach specified unit
  129.  
  130. The EXIT command performs an automatic DETACH ALL.
  131.  
  132. 3.5 Examining and Changing State
  133.  
  134. There are four commands to examine and change state:
  135.  
  136.     EXAMINE (abbreviated E) examines state
  137.     DEPOSIT (abbreviated D) changes state
  138.     IEXAMINE (interactive examine, abbreviated IE) examines state
  139.         and allows the user to interactively change it
  140.     IDEPOSIT (interactive deposit, abbreviated ID) allows the user
  141.         to interactively change state
  142.  
  143. All four commands take the form
  144.  
  145.     command {-switches} {<device>{<unit number>}} <state list>
  146.  
  147. Deposit must also include a deposit value at the end of the command.
  148.  
  149. The examine and deposit commands can work on the address space of any
  150. unit.  If no device is specified, the CPU (main memory) is selected; if
  151. a device but no unit is specified, unit 0 of the specified device is
  152. selected.  The "state list" consists of one or more of the following,
  153. separated by commas:
  154.  
  155.     register        the specified register
  156.     register1-register2    all the registers starting at register1
  157.                 up to and including register2
  158.     address            the specified location
  159.     address1-address2    all locations starting at address1 up to
  160.                 and including address2
  161.     STATE            all registers in the device
  162.     ALL            all locations in the unit
  163.  
  164. Switches can be used to control the format of display information:
  165.  
  166.     -a            display as ASCII
  167.     -c            display as character string
  168.     -m            display as instruction mnemonics
  169.  
  170. The simulators typically accept symbolic input (see simulator sections).
  171.  
  172. Examples:
  173.  
  174.     sim> ex 1000-1100        -- examine 1100:1100
  175.     sim> de PC 1040            -- set PC to 1040
  176.     sim> ie 40-50            -- interactively examine 40:50
  177.     sim> ex rx0 50060        -- examine 50060, RX unit 0
  178.     sim> de all 0            -- set main memory to 0
  179.  
  180. Note: to terminate an interactive command, simply type a bad value (eg,
  181. XXX) when input is requested.
  182.  
  183. 3.6 Running Programs
  184.  
  185. The RUN command (abbreviated RU) resets all devices, deposits its argument
  186. (if given) in the PC, and starts execution.  If no argument is given,
  187. execution starts at the current PC.
  188.  
  189. The GO command does NOT reset devices, deposits its argument (if given) in
  190. the PC, and starts execution.  If no argument is given, execution starts at
  191. the current PC.
  192.  
  193. The CONT command (abbreviated CO) does NOT reset devices and resumes
  194. execution at the current PC.
  195.  
  196. The STEP command (abbreviated S) resumes execution at the current PC for
  197. the number of instructions given by its argument.  If no argument is
  198. supplied, one instruction is executed.
  199.  
  200. The BOOT command (abbreviated BO) bootstraps the device and unit given
  201. by its argument.  If no unit is supplied, unit 0 is boostrapped.  The
  202. specified unit must be attached to a file.
  203.  
  204. 3.7 Stopping Programs
  205.  
  206. Programs run until the simulator detects an error or stop condition, or
  207. until the user forces a stop condition.
  208.  
  209. 3.7.1 Simulator Detected Stop Conditions
  210.  
  211. These simulator-detected conditions stop simulation:
  212.  
  213. o HALT instruction.  If a HALT instruction is decoded, simulation stops.
  214.  
  215. o Breakpoint.  The IBKPT register provides a single virtual address
  216.   breakpoint.  If the PC matches the contents of the IBKPT register,
  217.   simulation stops.  The breakpoint is automatically disabled for
  218.   the next instruction execution.
  219.  
  220. o I/O error.  If an I/O error occurs during simulation of an I/O operation,
  221.   and the device stop-on-I/O-error flag is set, simulation usually stops.
  222.  
  223. o Processor condition.  Certain processor conditions can stop simulation;
  224.   these are described with the individual simulators.
  225.  
  226. 3.7.2 User Specified Stop Conditions
  227.  
  228. Typing the interrupt character stops simulation.  The interrupt character
  229. is defined by the WRU (where are you) register and is initially set to
  230. 005 (^E).
  231.  
  232. 3.8 Setting Device Parameters
  233.  
  234. The SET command (abbreviated SE) changes the status of a device parameter:
  235.  
  236.     sim> SET <unit> <parameter>
  237.  
  238. The parameters are simulator and device specific.  Disk drives, for
  239. example, can usually be set write ENABLED or write LOCKED; if a device
  240. supports multiple drive types, the SET command can be used to specify
  241. the drive type.
  242.  
  243. 3.8 Displaying Parameters and Status
  244.  
  245. The SHOW CONFIGURATION command shows the simulator configuration and the
  246. status of all simulated I/O devices.
  247.  
  248. The SHOW <device> command shows the status of the named simulated I/O
  249. device.
  250.  
  251. The SHOW QUEUE command shows the state of the simulator event queue.  Times
  252. are in "simulation units", typically one unit per instruction execution,
  253. relative to the current simulation time.
  254.  
  255. The SHOW TIME command shows the number of time units elapsed since
  256. the last RUN command.
  257.  
  258. 3.9 Exiting The Simulator
  259.  
  260. EXIT (synonyms QUIT and BYE) returns control to the operating system.
  261.  
  262. 4. PDP-8 Features
  263.  
  264. The PDP-8 simulator is configured as follows:
  265.  
  266. device        simulates
  267. name(s)
  268.  
  269. CPU        PDP-8/E CPU with 32KW of memory
  270. -        KE8E extended arithmetic element (EAE)
  271. -        KM8E memory management and timeshare control
  272. PTR,PTP        PC8E paper tape reader/punch
  273. TTI,TTO        KL8E console terminal
  274. LPT        LE8E line printer
  275. CLK        DK8E line frequency clock (also PDP-8/A compatible)
  276. RK        RK8E/RK05 cartridge disk controller with four drives
  277. RF        RF08/RS08 fixed head disk controller with four platters
  278. RX        RX8E/RX01 floppy disk controller with two drives
  279. MT        TM8E/TU10 magnetic tape controller with eight drives
  280.  
  281. The PDP-8 simulator implements one unique stop condition: if an undefined
  282. instruction (unimplemented IOT or OPR) is decoded, and register STOP_INST
  283. is set, the simulator halts.
  284.  
  285. 4.1 CPU
  286.  
  287. The only CPU options are the presense of the EAE and the size of main memory;
  288. the memory extension and time-share control is always included, even if
  289. memory size is 4K.
  290.  
  291.     SET CPU EAE        enable EAE
  292.     SET CPU NOEAE        disable EAE
  293.     SET CPU 4K        set memory size = 4K
  294.     SET CPU 8K        set memory size = 8K
  295.     SET CPU 12K        set memory size = 12K
  296.     SET CPU 16K        set memory size = 16K
  297.     SET CPU 20K        set memory size = 20K
  298.     SET CPU 24K        set memory size = 24K
  299.     SET CPU 28K        set memory size = 28K
  300.     SET CPU 32K        set memory size = 32K
  301.  
  302. If memory size is being reduced, and the memory being truncated contains
  303. non-zero data, the simulator asks for confirmation.  Data in the truncated
  304. portion of memory is lost.  Initial memory size is 32K.
  305.  
  306. CPU registers include the visible state of the processor as well as the
  307. control registers for the interrupt system.
  308.  
  309.     name        size    comments
  310.  
  311.     PC        15    program counter, including IF as high 3 bits
  312.     AC        12    accumulator
  313.     MQ        12    multiplier-quotient
  314.     L        1    link
  315.     SR        12    front panel switches
  316.     IF        3    instruction field
  317.     DF        3    data field
  318.     IB        3    instruction field buffer
  319.     SF        7    save field
  320.     UF        1    user mode flag
  321.     UB        1    user mode buffer
  322.     SC        5    EAE shift counter
  323.     GTF        1    EAE greater than flag
  324.     EMODE        1    EAE mode (0 = A, 1 = B)
  325.     ION        1    interrupt enable
  326.     ION_DELAY    1    interrupt enable delay for ION
  327.     CIF_DELAY    1    interrupt enable delay for CIF
  328.     PWR_INT        1    power fail interrupt
  329.     UF_INT        1    user mode violation interrupt
  330.     INT        15    interrupt pending flags
  331.     DONE        15    device done flags
  332.     ENABLE        15    device interrupt enable flags
  333.     OLDPC        15    PC prior to last JMP, JMS, or interrupt
  334.     STOP_INST    1    stop on undefined instruction
  335.     BREAK        16    breakpoint address (177777 to disable)
  336.     WRU        8    interrupt character
  337.  
  338. 4.2 Programmed I/O Devices (PTR, PTP, TTI, TTO, CLK, LPT)
  339.  
  340. The paper tape reader (PTR), paper tape punch (PTP), and line printer
  341. (LPT) read data from or write data to disk files.  The POS register
  342. specifies the number of the next data item to be read or written.  Thus,
  343. by changing POS, the user can backspace or advance these devices.
  344.  
  345. The programmed I/O devices typically implement these registers:
  346.  
  347.     name        size    comments
  348.  
  349.     BUF        8    last data item processed
  350.     INT        1    interrupt pending flag
  351.     DONE        1    device done flag
  352.     ENABLE        1    interrupt enable flag
  353.     TIME        24    time from I/O initiation to interrupt
  354.                 (for keyboard, polling interval)
  355.     POS        32    position in the input or output file
  356.     STOP_IOE    1    stop on I/O error
  357.  
  358. For the serial devices, error handling is as follows:
  359.  
  360.     type    error         STOP_IOE    processed as
  361.  
  362.     in,out    not attached    1    report error and stop
  363.                 0    out of tape or paper
  364.  
  365.     in    end of file    1    report error and stop
  366.                 0    out of tape or paper
  367.  
  368.     in,out    OS I/O error    x    report error and stop
  369.  
  370. 4.3 RK8E/RK05
  371.  
  372. RK8E options include the ability to place units online or offline,
  373. write enabled or write locked:
  374.  
  375.     SET RKn OFFLINE        set unit n offline
  376.     SET RKn ONLINE        set unit n online
  377.     SET RKn LOCKED        set unit n write locked
  378.     SET RKn ENABLED        set unit n write enabled
  379.  
  380. The RK8E implements these registers:
  381.  
  382.     name        size    comments
  383.  
  384.     STA        12    status
  385.     DA        12    disk address
  386.     MA        12    current memory address
  387.     CMD        12    disk command
  388.     BUSY        1    control busy flag
  389.     INT        1    interrupt pending flag
  390.     STIME        24    seek time, per cylinder
  391.     RTIME        24    rotational delay
  392.     STOP_IOE    1    stop on I/O error
  393.  
  394. Error handling is as follows:
  395.  
  396.     error         STOP_IOE    processed as
  397.  
  398.     not attached    1    report error and stop
  399.             0    disk not ready
  400.  
  401.     end of file    x    assume rest of disk is zero
  402.  
  403.     OS I/O error    x    report error and stop
  404.  
  405. 4.4 RX8E/RX01
  406.  
  407. RX8E options include the ability to set units write enabled or write locked:
  408.  
  409.     SET RXn LOCKED        set unit n write locked
  410.     SET RXn ENABLED        set unit n write enabled
  411.  
  412. The RX8E implements these registers:
  413.  
  414.     name        size    comments
  415.  
  416.     RXCS        12    status
  417.     RXDB        12    data buffer
  418.     RXES        8    error status
  419.     RXTA        8    current track
  420.     RXSA        8    current sector
  421.     STAPTR        3    controller state
  422.     BUFPTR        3    buffer pointer
  423.     INT        1    interrupt pending flag
  424.     DONE        1    device done flag
  425.     ENABLE        1    interrupt enable flag
  426.     TR        1    transfer ready flag
  427.     ERR        1    error flag
  428.     CTIME        24    command completion time
  429.     STIME        24    seek time, per track
  430.     XTIME        24    transfer ready delay
  431.     STOP_IOE    1    stop on I/O error
  432.  
  433. Error handling is as follows:
  434.  
  435.     error         STOP_IOE    processed as
  436.  
  437.     not attached    1    report error and stop
  438.             0    disk not ready
  439.  
  440. RX01 data files are buffered in memory; therefore, end of file and OS
  441. I/O errors cannot occur.
  442.  
  443. 4.5 RF08/RS08
  444.  
  445. The RF08 implements these registers:
  446.  
  447.     name        size    comments
  448.  
  449.     STA        12    status
  450.     DA        20    current disk address
  451.     MA        12    memory address (in memory)
  452.     WC        12    word count (in memory)
  453.     WLK        32    write lock switches
  454.     INT        1    interrupt pending flag
  455.     DONE        1    device done flag
  456.     TIME        24    rotational delay, per word
  457.     BURST        1    burst flag
  458.     STOP_IOE    1    stop on I/O error
  459.  
  460. The RF08 is a three-cycle data break device.  If BURST = 0, word transfers
  461. are scheduled individually; if BURST = 1, the entire transfer occurs in
  462. a single data break.
  463.  
  464. Error handling is as follows:
  465.  
  466.     error         STOP_IOE    processed as
  467.  
  468.     not attached    1    report error and stop
  469.             0    disk not ready
  470.  
  471. RF08 data files are buffered in memory; therefore, end of file and OS
  472. I/O errors cannot occur.
  473.  
  474. 4.6 Magnetic Tape (MT)
  475.  
  476. Magnetic tape options include the ability to place units write enabled or
  477. or write locked.
  478.  
  479.     SET MTn LOCKED        set unit n write locked
  480.     SET MTn ENABLED        set unit n write enabled
  481.  
  482. The magnetic tape controller implements these registers:
  483.  
  484.     name        size    comments
  485.  
  486.     CMD        12    command
  487.     FNC        12    function
  488.     CA        12    memory address
  489.     WC        12    word count
  490.     DB        12    data buffer
  491.     STA        12    main status
  492.     STA2        6    secondary status
  493.     DONE        1    device done flag
  494.     INT        1    interrupt pending flag
  495.     STOP_IOE    1    stop on I/O error
  496.     TIME        24    record delay
  497.     UST0..7        24    unit status, units 0..n
  498.  
  499. Error handling is as follows:
  500.  
  501.     error        processed as
  502.  
  503.     not attached    tape not ready
  504.  
  505.     end of file    (read or space) end of physical tape
  506.             (write) ignored
  507.  
  508.     OS I/O error    report error and stop
  509.  
  510. 4.7 Symbolic Display and Input
  511.  
  512. The PDP-8 simulator implements symbolic display and input.  Display is
  513. controlled by command line switches:
  514.  
  515.     -a            display as ASCII character
  516.     -c            display as (sixbit) character string
  517.     -m            display instruction mnemonics
  518.  
  519. Input parsing is controlled by the first character typed in:
  520.  
  521.     '            ASCII character
  522.     "            two character sixbit string
  523.     alphabetic        instruction mnemonic
  524.     numeric            octal number
  525.  
  526. Instruction input uses standard PDP-8 assembler syntax.  There are four
  527. instruction classes: memory reference, IOT, field change, and operate.
  528.  
  529. Memory reference instructions have the format
  530.  
  531.     memref {I} {T/Z} address
  532.  
  533. where I signifies indirect, T a current page reference, and Z a zero page
  534. reference.  The address is an octal number in the range 0 - 07777; if T or
  535. Z is specified, the address is a page offset in the range 0 - 177.  Normally,
  536. T is not needed; the simulator figures out from the address what mode to use.
  537. However, when referencing memory outside the CPU (eg, disks), there is no
  538. valid PC, and T must be used to specify current page addressing.
  539.  
  540. IOT instructions consist of single mnemonics, eg, KRB, TLS.  IOT instructions
  541. may be or'd together
  542.  
  543.     iot iot iot...
  544.  
  545. The simulator does not check the legality of the proposed combination.  IOT's
  546. for which there is no opcode may be specified as IOT n, where n is an octal
  547. number in the range 0 - 0777.
  548.  
  549. Field change instructions (CIF, CDF) have the format
  550.  
  551.     fldchg field
  552.  
  553. where field is an octal number in the range 0 - 7.  Field change instructions
  554. may be or'd together.
  555.  
  556. Operate instructions have the format
  557.  
  558.     opr opr opr...
  559.  
  560. The simulator does not check the legality of the proposed combination.  EAE
  561. mode A and B mnemonics may be specified regardless of the EAE mode.  The
  562. operands for MUY and DVI must be deposited explicitly.
  563.  
  564. 5. PDP-11 Features
  565.  
  566. The PDP-11 simulator is configured as follows:
  567.  
  568. device        simulates
  569. name(s)
  570.  
  571. CPU        J-11 CPU with 256KB of memory
  572. -        FP11 floating point unit (FPA)
  573. PTR,PTP        PC11 paper tape reader/punch
  574. TTI,TTO        DL11 console terminal
  575. LPT        LP11 line printer
  576. CLK        line frequency clock
  577. RK        RK11/RK05 cartridge disk controller with eight drives
  578. RL        RLV12/RL01(2) cartridge disk controller with four drives
  579. RX        RX11/RX01 floppy disk controller with two drives
  580.  
  581. The PDP-11 simulator implements several unique stop conditions:
  582.  
  583.     - abort during exception vector fetch, and register STOP_VEC is set
  584.     - abort during exception stack push, and register STOP_SPA is set
  585.     - trap condition 'n' occurs, and register STOP_TRAP<n> is set
  586.     - wait state entered, and no I/O operations outstanding
  587.       (ie, no interrupt can ever occur)
  588.  
  589. 5.1 CPU
  590.  
  591. Memory size is a compile time parameter in pdp11_defs.h; the standard
  592. memory size is 248KB.
  593.  
  594. These switches are recognized when examining or depositing in CPU memory:
  595.  
  596.     -v            interpret address as virtual
  597.     -d            if mem mgt enabled, force data space
  598.     -k            if mem mgt enabled, force kernel mode
  599.     -s            if mem mgt enabled, force supervisor mode
  600.     -u            if mem mgt enabled, force user mode
  601.     -p            if mem mgt enabled, force previous mode
  602.  
  603. CPU registers include the visible state of the processor as well as the
  604. control registers for the interrupt system.
  605.  
  606.     name        size    comments
  607.  
  608.     PC        16    program counter
  609.     R0..R5        16    R0..R5, first register set
  610.     R10..R15    16    R0..R5, second register set
  611.     KSP        16    kernel stack pointer
  612.     SSP        16    supervisor stack pointer
  613.     USP        16    user stack pointer
  614.     PSW        16    processor status word
  615.       CM        2      current mode, PSW<15:14>
  616.       PM        2      previous mode, PSW<13:12>
  617.       RS        2      register set, PSW<11>
  618.       IPL        3      interrupt priority level, PSW<7:5>
  619.       T        1      trace bit, PSW<4>
  620.       N        1      negative flag, PSW<3>
  621.       Z        1      zero flag, PSW<2>
  622.       V        1      overflow flag, PSW<1>
  623.       C        1      carry flag, PSW<0>
  624.     SR        16    front panel switches
  625.     DR        16    front panel display
  626.     MEMERR        16    memory error register
  627.     CCR        16    cache control register
  628.     MAINT        16    maintenance register
  629.     HITMISS        16    hit/miss register
  630.     CPUERR        16    CPU error register
  631.     PIRQ        16    programmed interrupt requests
  632.     FAC0H..FAC5H    32    FAC0..FAC5, high 32 bits
  633.     FAC0L..FAC5L    32    FAC0..FAC5, low 32 bits
  634.     FPS        16    floating point status
  635.     FEA        16    floating exception address
  636.     FEC        4    floating exception code
  637.     MMR0..3        16    memory management registers 0..3
  638.     {K/S/U}{I/D}{PAR/PDR}{0..7}
  639.             16    memory management registers
  640.     INT        32    interrupt pending flags
  641.     TRAP        18    trap pending flags
  642.     WAIT        0    wait state flag
  643.     WAIT_ENABLE    0    wait state enable flag
  644.     STOP_TRAPS    18    stop on trap flags
  645.     STOP_VECA    1    stop on read abort in trap or interrupt
  646.     STOP_SPA    1    stop on stack push abort in trap or interrupt
  647.     OLDPC        16    PC prior to last JMP, JMS, or interrupt
  648.     BREAK        16    breakpoint address (1 to disable)
  649.     WRU        8    interrupt character
  650.  
  651. 5.2 Programmed I/O Devices (PTR, PTP, TTI, TTO, CLK, LPT)
  652.  
  653. The paper tape reader (PTR), paper tape punch (PTP), and line printer
  654. (LPT) read data from or write data to disk files.  The POS register
  655. specifies the number of the next data item to be read or written.  Thus,
  656. by changing POS, the user can backspace or advance these devices.
  657.  
  658. The programmed I/O devices typically implement these registers:
  659.  
  660.     name        size    comments
  661.  
  662.     BUF        8    last data item processed
  663.     CSR        16    control/status register
  664.     INT        1    interrupt pending flag
  665.     ERR        1    error flag (CSR<15>)
  666.     DONE        1    device done flag (CSR<7>)
  667.     IE        1    interrupt enable flag (CSR<6>)
  668.     TIME        24    time from I/O initiation to interrupt
  669.                 (for keyboard, polling interval)
  670.     POS        32    position in the input or output file
  671.     STOP_IOE    1    stop on I/O error
  672.  
  673. For the serial devices, error handling is as follows:
  674.  
  675.     type    error         STOP_IOE    processed as
  676.  
  677.     in,out    not attached    1    report error and stop
  678.                 0    out of tape or paper
  679.  
  680.     in    end of file    1    report error and stop
  681.                 0    out of tape or paper
  682.  
  683.     in,out    OS I/O error    x    report error and stop
  684.  
  685. 5.3 RK11/RK05
  686.  
  687. RK11 options include the ability to place units online or offline,
  688. write enabled or write locked:
  689.  
  690.     SET RKn OFFLINE        set unit n offline
  691.     SET RKn ONLINE        set unit n online
  692.     SET RKn LOCKED        set unit n write locked
  693.     SET RKn ENABLED        set unit n write enabled
  694.  
  695. The RK11 implements these registers:
  696.  
  697.     name        size    comments
  698.  
  699.     RKCS        16    control/status
  700.     RKDA        16    disk address
  701.     RKBA        16    memory address
  702.     RKWC        16    word count
  703.     RKDS        16    drive status
  704.     RKER        16    error status
  705.     INTQ        9    interrupt queue
  706.     DRVN        3    number of last selected drive
  707.     INT        1    interrupt pending flag
  708.     ERR        1    error flag (CSR<15>)
  709.     DONE        1    device done flag (CSR<7>)
  710.     IE        1    interrupt enable flag (CSR<6>)
  711.     INT        1    interrupt pending flag
  712.     STIME        24    seek time, per cylinder
  713.     RTIME        24    rotational delay
  714.     STOP_IOE    1    stop on I/O error
  715.  
  716. Error handling is as follows:
  717.  
  718.     error         STOP_IOE    processed as
  719.  
  720.     not attached    1    report error and stop
  721.             0    disk not ready
  722.  
  723.     end of file    x    assume rest of disk is zero
  724.  
  725.     OS I/O error    x    report error and stop
  726.  
  727. 5.4 RX11/RX01
  728.  
  729. RX11 options include the ability to make units write enabled or write locked:
  730.  
  731.     SET RXn LOCKED        set unit n write locked
  732.     SET RXn ENABLED        set unit n write enabled
  733.  
  734. The RX11 implements these registers:
  735.  
  736.     name        size    comments
  737.  
  738.     RXCS        12    status
  739.     RXDB        8    data buffer
  740.     RXES        8    error status
  741.     RXERR        8    error code
  742.     RXTA        8    current track
  743.     RXSA        8    current sector
  744.     STAPTR        3    controller state
  745.     BUFPTR        3    buffer pointer
  746.     INT        1    interrupt pending flag
  747.     ERR        1    error flag (CSR<15>)
  748.     TR        1    transfer ready flag (CSR<7>)
  749.     IE        1    interrupt enable flag (CSR<6>)
  750.     DONE        1    device done flag (CSR<5>)
  751.     CTIME        24    command completion time
  752.     STIME        24    seek time, per track
  753.     XTIME        24    transfer ready delay
  754.     STOP_IOE    1    stop on I/O error
  755.  
  756. Error handling is as follows:
  757.  
  758.     error         STOP_IOE    processed as
  759.  
  760.     not attached    1    report error and stop
  761.             0    disk not ready
  762.  
  763. RX01 data files are buffered in memory; therefore, end of file and OS
  764. I/O errors cannot occur.
  765.  
  766. 5.5 RL11(V12)/RL01,RL02
  767.  
  768. RL11 options include the ability to set units write enabled or write locked,
  769. and to set the drive size to RL01, RL02, or autosize:
  770.  
  771.     SET RLn LOCKED        set unit n write locked
  772.     SET RLn ENABLED        set unit n write enabled
  773.     SET RLn RL01        set size to RL01
  774.     SET RLn RL02        set size to RL02
  775.     SET RLn AUTOSIZE    set size based on file size at attach
  776.  
  777. The size options can be used only when a unit is not attached to a file.
  778.  
  779. The RL11 implements these registers:
  780.  
  781.     name        size    comments
  782.  
  783.     RLCS        16    control/status
  784.     RLDA        16    disk address
  785.     RLBA        16    memory address
  786.     RLBAE        6    memory address extension (RLV12)
  787.     RLMP..RLMP2    16    multipurpose register queue
  788.     INT        1    interrupt pending flag
  789.     ERR        1    error flag (CSR<15>)
  790.     DONE        1    device done flag (CSR<7>)
  791.     IE        1    interrupt enable flag (CSR<6>)
  792.     INT        1    interrupt pending flag
  793.     STIME        24    seek time, per cylinder
  794.     RTIME        24    rotational delay
  795.     STOP_IOE    1    stop on I/O error
  796.  
  797. Error handling is as follows:
  798.  
  799.     error         STOP_IOE    processed as
  800.  
  801.     not attached    1    report error and stop
  802.             0    disk not ready
  803.  
  804.     end of file    x    assume rest of disk is zero
  805.  
  806.     OS I/O error    x    report error and stop
  807.  
  808. 5.6 Symbolic Display and Input
  809.  
  810. The PDP-11 simulator implements symbolic display and input.  Display is
  811. controlled by command line switches:
  812.  
  813.     -a            display as ASCII character
  814.     -c            display as two character ASCII string
  815.     -m            display instruction mnemonics
  816.  
  817. Input parsing is controlled by the first character typed in:
  818.  
  819.     '            ASCII character
  820.     "            two character ASCII string
  821.     alphabetic        instruction mnemonic
  822.     numeric            octal number
  823.  
  824. Instruction input uses standard PDP-11 assembler syntax.  There are sixteen
  825. instruction classes:
  826.  
  827. class        operands        examples        comments
  828.  
  829. no operands    none            HALT, RESET
  830. 3b literal    literal, 0 - 7        SPL
  831. 6b literal    literal, 0 - 077    MARK
  832. 8b literal    literal, 0 - 0377    EMT, TRAP
  833. register    register        RTS
  834. sop        specifier        SWAB, CLR, ASL
  835. reg-sop        register, specifier    JSR, XOR, MUL
  836. fop        flt specifier        ABSf, NEGf
  837. ac-fop        flt reg, flt specifier    LDf, MULf
  838. ac-sop        flt reg, specifier    LDEXP, STEXP
  839. ac-moded sop    flt reg, specifier    LDCif, STCfi
  840. dop        specifier, specifier    MOV, ADD, BIC
  841. cond branch    address            BR, BCC, BNE
  842. sob        register, address    SOB
  843. cc clear    cc clear instructions    CLC, CLV, CLZ, CLN    combinable
  844. cc set        cc set instructions    SEC, SEV, SEZ, SEN    combinable
  845.  
  846. For floating point opcodes, F and D variants, and I and L variants, may be
  847. specified regardless of the state of FPS.
  848.  
  849. The syntax for specifiers is as follows:
  850.  
  851. syntax        specifier    displacement    comments
  852.  
  853. Rn        0n        -
  854. Fn        0n        -        only in flt reg classes
  855. (Rn)        1n        -
  856. @(Rn)        7n        0        equivalent to @0(Rn)
  857. (Rn)+        2n        -
  858. @(Rn)+        3n              -
  859. -(Rn)        4n              -
  860. @-(Rn)        5n              -
  861. {+/-}d(Rn)    6n        {+/-}d
  862. @{+/-}d(Rn)    7n        {+/-}d
  863. #n        27        n
  864. @#n        37        n
  865. .+/-n        67        +/-n - 4
  866. @.+/-n        77        +/-n - 4
  867. {+/-}n        67        {+/-}n - PC - 4    if on disk, 37 and n
  868. @{+/-}n        77        {+/-}n - PC - 4    if on disk, invalid
  869.  
  870. 6. Nova Features
  871.  
  872. The Nova simulator is configured as follows:
  873.  
  874. device        simulates
  875. name(s)
  876.  
  877. CPU        Nova CPU with 32KW of memory
  878. -        hardware multiply/divide
  879. PTR,PTP        paper tape reader/punch
  880. TTI,TTO        console terminal
  881. LPT        line printer
  882. CLK        real-time clock
  883. DK        head-per-track disk controller
  884. DP        moving head disk controller with four drives
  885. MT        magnetic tape controller with eight drives
  886.  
  887. The Nova simulator implements these unique stop conditions:
  888.  
  889.     - reference to undefined I/O device, and STOP_DEV is set
  890.     - more than INDMAX indirect addresses are detected during
  891.       an interrupt
  892.     - more than INDMAX indirect addresses are detected during
  893.       memory reference address decoding
  894.  
  895. 6.1 CPU
  896.  
  897. The only CPU options are the presense of the multiply/divide instructions
  898. and the size of main memory.
  899.  
  900.     SET CPU MDV        enable multiply/divide
  901.     SET CPU NOMDV        disable multiply/divide
  902.     SET CPU 4K        set memory size = 4K
  903.     SET CPU 8K        set memory size = 8K
  904.     SET CPU 12K        set memory size = 12K
  905.     SET CPU 16K        set memory size = 16K
  906.     SET CPU 20K        set memory size = 20K
  907.     SET CPU 24K        set memory size = 24K
  908.     SET CPU 28K        set memory size = 28K
  909.     SET CPU 32K        set memory size = 32K
  910.  
  911. If memory size is being reduced, and the memory being truncated contains
  912. non-zero data, the simulator asks for confirmation.  Data in the truncated
  913. portion of memory is lost.  Initial memory size is 32K.
  914.  
  915. CPU registers include the visible state of the processor as well as the
  916. control registers for the interrupt system.
  917.  
  918.     name        size    comments
  919.  
  920.     PC        15    program counter
  921.     AC0..AC3    16    accumulators 0..3
  922.     C        1    carry
  923.     SR        16    front panel switches
  924.     PI        16    priority interrupt mask
  925.     ION        1    interrupt enable
  926.     ION_DELAY    1    interrupt enable delay for ION
  927.     PWR        1    power fail interrupt
  928.     INT        15    interrupt pending flags
  929.     BUSY        15    device busy flags
  930.     DONE        15    device done flags
  931.     DISABLE        15    device interrupt disable flags
  932.     STOP_DEV    1    stop on undefined IOT
  933.     INDMAX        15    maximum number of nested indirects
  934.     OLDPC        15    PC prior to last JMP, JMS, or interrupt
  935.     BREAK        16    breakpoint address (177777 to disable)
  936.     WRU        8    interrupt character
  937.  
  938. 6.2 Programmed I/O Devices (PTR, PTP, TTI, TTO, CLK, LPT)
  939.  
  940. The paper tape reader (PTR), paper tape punch (PTP), and line printer
  941. (LPT) read data from or write data to disk files.  The POS register
  942. specifies the number of the next data item to be read or written.  Thus,
  943. by changing POS, the user can backspace or advance these devices.
  944.  
  945. The programmed I/O devices typically implement these registers:
  946.  
  947.     name        size    comments
  948.  
  949.     BUF        8    last data item processed
  950.     BUSY        1    device busy flag
  951.     DONE        1    device done flag
  952.     DISABLE        1    interrupt disable flag
  953.     INT        1    interrupt pending flag
  954.     TIME        24    time from I/O initiation to interrupt
  955.                 (for keyboard, polling interval)
  956.     POS        32    position in the input or output file
  957.     STOP_IOE    1    stop on I/O error
  958.  
  959. For the serial devices, error handling is as follows:
  960.  
  961.     type    error         STOP_IOE    processed as
  962.  
  963.     in,out    not attached    1    report error and stop
  964.                 0    out of tape or paper
  965.  
  966.     in    end of file    1    report error and stop
  967.                 0    out of tape or paper
  968.  
  969.     in,out    OS I/O error    x    report error and stop
  970.  
  971. Terminal options include the ability to set limited Dasher compatibility
  972. mode or normal mode:
  973.  
  974.     SET TTI ANSI        normal mode
  975.     SET TTI DASHER        Dasher mode
  976.     SET TTO ANSI        normal mode
  977.     SET TTO DASHER        Dasher mode
  978.  
  979. Setting either TTI or TTO changes both devices.  In Dasher mode, carriage
  980. return is changed to newline on input, and ^X is changed to backspace.
  981.  
  982. 6.3 Fixed Head Disk (DK)
  983.  
  984. The fixed head disk controller implements these registers:
  985.  
  986.     name        size    comments
  987.  
  988.     STAT        16    status
  989.     DA        16    disk address
  990.     MA        16    memory address
  991.     BUSY        1    device busy flag
  992.     DONE        1    device done flag
  993.     DISABLE        1    device disable flag
  994.     INT        1    interrupt pending flag
  995.     WLK        8    write lock switches
  996.     TIME        24    rotational delay, per sector
  997.     STOP_IOE    1    stop on I/O error
  998.  
  999. Error handling is as follows:
  1000.  
  1001.     error         STOP_IOE    processed as
  1002.  
  1003.     not attached    1    report error and stop
  1004.             0    disk not ready
  1005.  
  1006. Fixed head disk data files are buffered in memory; therefore, end of file
  1007. and OS I/O errors cannot occur.
  1008.  
  1009. 6.4 Moving Head Disk (DP)
  1010.  
  1011. Moving head disk options include the ability to place units online or
  1012. offline, write enabled or write locked, and to select the type of drive:
  1013.  
  1014.     SET DPn OFFLINE        set unit n offline
  1015.     SET DPn ONLINE        set unit n online
  1016.     SET DPn LOCKED        set unit n write locked
  1017.     SET DPn ENABLED        set unit n write enabled
  1018.     SET DPn FLOPPY        set unit n to floppy disk
  1019.     SET DPn D31        set unit n to Diablo 31
  1020.     SET DPn D44        set unit n to Diablo 44
  1021.     SET DPn C111        set unit n to Century 111
  1022.     SET DPn C114        set unit n to Century 114
  1023.  
  1024. All drives have 256 16b words per sector.  The other disk parameters are:
  1025.  
  1026.     drive cylinders surfaces sectors size (MW)     DG models
  1027.  
  1028.     floppy    77    1    8      .158        6038
  1029.     D31    203    2    12     1.247        4047, 4237, 4238
  1030.     D44    408    4    12     5.014        4234, 6045
  1031.     C111    203    10    6     3.118        4048
  1032.     C114    203    20    12    12.472        4057, 2314
  1033.  
  1034. The moving head disk controller implements these registers:
  1035.  
  1036.     name        size    comments
  1037.  
  1038.     FCCY        16    flags, command, cylinder
  1039.     USSC        16    unit, surface, sector, count
  1040.     STAT        16    status
  1041.     MA        16    memory address
  1042.     BUSY        1    device busy flag
  1043.     DONE        1    device done flag
  1044.     DISABLE        1    interrupt disable flag
  1045.     INT        1    interrupt pending flag
  1046.     STIME        24    seek time, per cylinder
  1047.     RTIME        24    rotational delay
  1048.  
  1049. Error handling is as follows:
  1050.  
  1051.     error        processed as
  1052.  
  1053.     not attached    disk not ready
  1054.  
  1055.     end of file    assume rest of disk is zero
  1056.  
  1057.     OS I/O error    report error and stop
  1058.  
  1059. 6.5 Magnetic Tape (MT)
  1060.  
  1061. Magnetic tape options include the ability to place units write enabled or
  1062. or write locked.
  1063.  
  1064.     SET MTn LOCKED        set unit n write locked
  1065.     SET MTn ENABLED        set unit n write enabled
  1066.  
  1067. The magnetic tape controller implements these registers:
  1068.  
  1069.     name        size    comments
  1070.  
  1071.     CU        16    command, unit
  1072.     MA        16    memory address
  1073.     WC        16    word count
  1074.     STA1        16    status word 1
  1075.     STA2        16    status word 2
  1076.     EP        1    extended polling mode (not supported)
  1077.     BUSY        1    device busy flag
  1078.     DONE        1    device done flag
  1079.     DISABLE        1    interrupt disable flag
  1080.     INT        1    interrupt pending flag
  1081.     STOP_IOE    1    stop on I/O error
  1082.     CTIME        24    controller delay
  1083.     RTIME        24    record delay
  1084.     UST0..7        32    unit status, units 0..n
  1085.  
  1086. Error handling is as follows:
  1087.  
  1088.     error        processed as
  1089.  
  1090.     not attached    tape not ready
  1091.  
  1092.     end of file    (read or space) end of physical tape
  1093.             (write) ignored
  1094.  
  1095.     OS I/O error    report error and stop
  1096.  
  1097. 6.6 Symbolic Display and Input
  1098.  
  1099. The Nova simulator implements symbolic display and input.  Display is
  1100. controlled by command line switches:
  1101.  
  1102.     -a            display as ASCII character
  1103.     -c            display as two character ASCII string
  1104.     -m            display instruction mnemonics
  1105.  
  1106. Input parsing is controlled by the first character typed in:
  1107.  
  1108.     '            ASCII character
  1109.     "            two character ASCII string
  1110.     alphabetic        instruction mnemonic
  1111.     numeric            octal number
  1112.  
  1113. Instruction input uses standard Nova assembler syntax.  There are three
  1114. instruction classes: memory reference, IOT, and operate.
  1115.  
  1116. Memory reference instructions have the format
  1117.  
  1118.     memref {ac,}{@}address{,index}
  1119.  
  1120. LDA and STA require an initial register; ISZ, DSZ, JSR, and JMP do not.
  1121. The syntax for addresses and indices is as follows:
  1122.  
  1123. syntax        mode    displacement    comments
  1124.  
  1125. 0 <= n < 0400    0    n
  1126. {+/-}n >= 0400    1    {+/-}n - PC    must be in range [-200, 177]
  1127.                     invalid on disk
  1128. .+/-n        1    {+/-}n        must be in range [-200, 177]
  1129. {+/-}n,2    2    {+/-}n        must be in range [-200, 177]
  1130. {+/-}n,3    3    {+/-}n        must be in range [-200, 177]
  1131.  
  1132. IOT instructions have one of four formats
  1133.  
  1134.     syntax            example
  1135.  
  1136.     iot            HALT
  1137.     iot reg            INTA
  1138.     iot device        SKPDN
  1139.     iot reg,device        DOAS
  1140.  
  1141. Devices may be specified as mnemonics or as numbers in the range 0 - 077.
  1142.  
  1143. Operate instructions have the format
  1144.  
  1145.     opcode{#} reg,reg{,skip}
  1146.  
  1147. In all Nova instructions, blanks may be substituted for commas as field
  1148. delimiters.
  1149.  
  1150. 7. 18b PDP Features
  1151.  
  1152. The four 18b PDP's (PDP-4, PDP-7, PDP-9, PDP-15) are very similar and
  1153. are configured as follows:
  1154.  
  1155. system    device        simulates
  1156.     name(s)
  1157.  
  1158. PDP-4    CPU        PDP-4 CPU with 8KW of memory
  1159.     PTR,PTP        integral paper tape/Type 75 punch
  1160.     TTI,TTO        KSR28 console terminal (Baudot code)
  1161.     LPT        Type 62 line printer (Hollerith code)
  1162.     CLK        integral real-time clock
  1163.  
  1164. PDP-7    CPU        PDP-7 CPU with 32KW of memory
  1165.     -        Type 177 extended arithmetic element (EAE)
  1166.     -        Type 148 memory extension
  1167.     PTR,PTP        Type 444 paper tape reader/Type 75 punch
  1168.     TTI,TTO        KSR 33 console terminal
  1169.     LPT        Type 647 line printer
  1170.     CLK        integral real-time clock
  1171.     DRM        Type 24 serial drum
  1172.  
  1173. PDP-9    CPU        PDP-9 CPU with 32KW of memory
  1174.     -        KE09A extended arithmetic element (EAE)
  1175.     -        KG09B memory extension
  1176.     -        KP09A power detection
  1177.     -        KX09A memory protection
  1178.     PTR,PTP        PC09A paper tape reader/punch
  1179.     TTI,TTO        KSR 33 console terminal
  1180.     LPT        Type 647E line printer
  1181.     CLK        integral real-time clock
  1182.     RF        RF09/RS09 fixed-head disk
  1183.     MT        TC59/TU10 magnetic tape
  1184.  
  1185. PDP-15    CPU        PDP-15 CPU with 32KW of memory
  1186.     -        KE15 extended arithmetic element (EAE)
  1187.     -        KF15 power detection
  1188.     -        KM15 memory protection
  1189.     PTR,PTP        PC15 paper tape reader/punch
  1190.     TTI,TTO        KSR 35 console terminal
  1191.     LPT        LP15 line printer
  1192.     CLK        integral real-time clock
  1193.     RP        RP15/RP02 disk pack
  1194.     RF        RF15/RS09 fixed-head disk
  1195.     MT        TC59/TU10 magnetic tape
  1196.  
  1197. The 18b PDP simulators implement one unique stop condition: if an undefined
  1198. instruction (unimplemented OPR) is decoded, and register STOP_INST is set,
  1199. the simulator halts.
  1200.  
  1201. 7.1 CPU
  1202.  
  1203. The only CPU options are the presense of the EAE and the size of main memory.
  1204.  
  1205.     SET CPU EAE        enable EAE
  1206.     SET CPU NOEAE        disable EAE
  1207.     SET CPU 4K        set memory size = 4K
  1208.     SET CPU 8K        set memory size = 8K
  1209.     SET CPU 12K        set memory size = 12K
  1210.     SET CPU 16K        set memory size = 16K
  1211.     SET CPU 20K        set memory size = 20K
  1212.     SET CPU 24K        set memory size = 24K
  1213.     SET CPU 28K        set memory size = 28K
  1214.     SET CPU 32K        set memory size = 32K
  1215.     SET CPU 48K        set memory size = 48K
  1216.     SET CPU 64K        set memory size = 64K
  1217.     SET CPU 80K        set memory size = 80K
  1218.     SET CPU 96K        set memory size = 96K
  1219.     SET CPU 112K        set memory size = 112K
  1220.     SET CPU 128K        set memory size = 128K
  1221.  
  1222. Memory sizes greater than 8K are only available on the PDP-7, PDP-9, and
  1223. PDP-15; memory sizes greater than 32KW are only available on the PDP-15.
  1224. If memory size is being reduced, and the memory being truncated contains
  1225. non-zero data, the simulator asks for confirmation.  Data in the truncated
  1226. portion of memory is lost.  Initial memory size is 8K for the PDP-4, 32K
  1227. for the PDP-7 and PDP-9, and 128K for the PDP-15.
  1228.  
  1229. CPU registers include the visible state of the processor as well as the
  1230. control registers for the interrupt system.
  1231.  
  1232.     system    name        size    comments
  1233.  
  1234.     all    PC        addr    program counter
  1235.     7,9    PC        15    program counter
  1236.     15    PC        17    program counter
  1237.     all    AC        18    accumulator
  1238.     7,9,15    MQ        18    multiplier-quotient
  1239.     7,9,15    SC        6    shift counter
  1240.     7,9,15    EAE_AC_SIGN    1    EAE AC sign
  1241.     all    L        1    link
  1242.     7,9    EXTM        1    extend mode
  1243.     15    BANKM        1    bank mode
  1244.     7    TRAPM        1    trap mode
  1245.     9,15    USMD        1    user mode
  1246.     9,15    USMDBUF        1    user mode buffer
  1247.     9,15    BR        addr    memory protection bounds
  1248.     7,9,15    TRAPP        1    trap pending
  1249.     9,15    NEXM        1    non-existent memory violation
  1250.     9,15    PRVN        1    privilege violation
  1251.     7,9    EMIRP        1    EMIR instruction pending
  1252.     9,15    RESTP        1    DBR or RES instruction pending
  1253.     15    XR        18    index register
  1254.     15    LR        18    limit register
  1255.     all    SR        18    front panel switches
  1256.     all    INT        32    interrupt requests
  1257.     all    IORS        18    IORS register
  1258.     all    ION        1    interrupt enable
  1259.     all    ION_DELAY    2    interrupt enable delay
  1260.     all    OLDPC        addr    PC prior to last transfer
  1261.     all    STOP_INST    1    stop on undefined instruction
  1262.     all    BREAK        18    breakpoint address (177777 to disable)
  1263.     all    WRU        8    interrupt character
  1264.  
  1265. "addr" signifies the address width of the system (13b for the PDP-4, 15b for
  1266. the PDP-7 and PDP-9, 17b for the PDP-15).
  1267.  
  1268. 7.2 Programmed I/O Devices (PTR, PTP, TTI, TTO, CLK, LPT)
  1269.  
  1270. The paper tape reader (PTR), paper tape punch (PTP), and line printer
  1271. (LPT) read data from or write data to disk files.  The POS register
  1272. specifies the number of the next data item to be read or written.  Thus,
  1273. by changing POS, the user can backspace or advance these devices.
  1274.  
  1275. The programmed I/O devices typically implement these registers:
  1276.  
  1277.     name        size    comments
  1278.  
  1279.     BUF        8    last data item processed
  1280.     INT        1    interrupt pending flag
  1281.     DONE        1    device done flag
  1282.     TIME        24    time from I/O initiation to interrupt
  1283.                 (for keyboard, polling interval)
  1284.     POS        32    position in the input or output file
  1285.     STOP_IOE    1    stop on I/O error
  1286.  
  1287. For the serial devices, error handling is as follows:
  1288.  
  1289.     type    error         STOP_IOE    processed as
  1290.  
  1291.     in,out    not attached    1    report error and stop
  1292.                 0    out of tape or paper
  1293.  
  1294.     in    end of file    1    report error and stop
  1295.                 0    out of tape or paper
  1296.  
  1297.     in,out    OS I/O error    x    report error and stop
  1298.  
  1299. 7.3 RP15/RP02
  1300.  
  1301. RP15 options include the ability to place units write enabled or
  1302. write locked:
  1303.  
  1304.     SET RPn LOCKED        set unit n write locked
  1305.     SET RPn ENABLED        set unit n write enabled
  1306.  
  1307. The RP15 implements these registers:
  1308.  
  1309.     name        size    comments
  1310.  
  1311.     STA        18    status A
  1312.     STB        18    status B
  1313.     DA        18    disk address
  1314.     MA        18    current memory address
  1315.     WC        18    word count
  1316.     INT        1    interrupt pending flag
  1317.     BUSY        1    control busy flag
  1318.     STIME        24    seek time, per cylinder
  1319.     RTIME        24    rotational delay
  1320.     STOP_IOE    1    stop on I/O error
  1321.  
  1322. Error handling is as follows:
  1323.  
  1324.     error         STOP_IOE    processed as
  1325.  
  1326.     not attached    1    report error and stop
  1327.             0    disk not ready
  1328.  
  1329.     end of file    x    assume rest of disk is zero
  1330.  
  1331.     OS I/O error    x    report error and stop
  1332.  
  1333. 7.4 DRM
  1334.  
  1335. The drum has no options.  It implements these registers:
  1336.  
  1337.     name        size    comments
  1338.  
  1339.     DA        9    drum address (sector number)
  1340.     MA        15    current memory address
  1341.     INT        1    interrupt pending flag
  1342.     DONE        1    device done flag
  1343.     ERR        1    error flag
  1344.     WLK        32    write lock switches
  1345.     TIME        24    rotational latency, per word
  1346.     STOP_IOE    1    stop on I/O error
  1347.  
  1348. Error handling is as follows:
  1349.  
  1350.     error         STOP_IOE    processed as
  1351.  
  1352.     not attached    1    report error and stop
  1353.             0    disk not ready
  1354.  
  1355. Drum data files are buffered in memory; therefore, end of file and OS
  1356. I/O errors cannot occur.
  1357.  
  1358. 7.5 RF09/RF15/RS09
  1359.  
  1360. The RF09/RF15 implements these registers:
  1361.  
  1362.     name        size    comments
  1363.  
  1364.     STA        18    status
  1365.     DA        21    current disk address
  1366.     MA        18    memory address (in memory)
  1367.     WC        18    word count (in memory)
  1368.     BUF        18    data buffer (diagnostic only)
  1369.     INT        1    interrupt pending flag
  1370.     WLK0..7        16    write lock switches for disks 0..7
  1371.     TIME        24    rotational delay, per word
  1372.     BURST        1    burst flag
  1373.     STOP_IOE    1    stop on I/O error
  1374.  
  1375. The RF15/RF09 is a three-cycle data break device.  If BURST = 0, word
  1376. transfers are scheduled individually; if BURST = 1, the entire transfer
  1377. occurs in a single data break.
  1378.  
  1379. Error handling is as follows:
  1380.  
  1381.     error         STOP_IOE    processed as
  1382.  
  1383.     not attached    1    report error and stop
  1384.             0    disk not ready
  1385.  
  1386. RF15/RF09 data files are buffered in memory; therefore, end of file and OS
  1387. I/O errors cannot occur.
  1388.  
  1389. 7.6 Magnetic Tape (MT)
  1390.  
  1391. Magnetic tape options include the ability to place units write enabled or
  1392. or write locked.
  1393.  
  1394.     SET MTn LOCKED        set unit n write locked
  1395.     SET MTn ENABLED        set unit n write enabled
  1396.  
  1397. The magnetic tape controller implements these registers:
  1398.  
  1399.     name        size    comments
  1400.  
  1401.     CMD        18    command
  1402.     STA        18    main status
  1403.     MA        18    memory address (in memory)
  1404.     WC        18    word count (in memory)
  1405.     INT        1    interrupt pending flag
  1406.     STOP_IOE    1    stop on I/O error
  1407.     TIME        24    record delay
  1408.     UST0..7        24    unit status, units 0..n
  1409.  
  1410. Error handling is as follows:
  1411.  
  1412.     error        processed as
  1413.  
  1414.     not attached    tape not ready
  1415.  
  1416.     end of file    (read or space) end of physical tape
  1417.             (write) ignored
  1418.  
  1419.     OS I/O error    report error and stop
  1420.  
  1421. 7.7 Symbolic Display and Input
  1422.  
  1423. The 18b PDP simulators implement symbolic display and input.  Display is
  1424. controlled by command line switches:
  1425.  
  1426.     -a            display as ASCII character
  1427.     -c            display as (sixbit) character string
  1428.     -m            display instruction mnemonics
  1429.  
  1430. The PDP-15 also recognizes an additional switch:
  1431.  
  1432.     -p            display as packed ASCII (five 7b ASCII
  1433.                 characters in two 18b words)
  1434.  
  1435. Input parsing is controlled by the first character typed in:
  1436.  
  1437.     '            ASCII character
  1438.     "            three character sixbit string
  1439.     alphabetic        instruction mnemonic
  1440.     numeric            octal number
  1441.  
  1442. The PDP-15 also recognizes an additional input mode:
  1443.  
  1444.     #            five character packed ASCII string in
  1445.                 two 18b words
  1446.  
  1447. Instruction input uses standard 18b PDP assembler syntax.  There are six
  1448. instruction classes: memory reference, EAE, index (PDP-15 only), IOT,
  1449. operate, and LAW.
  1450.  
  1451. Memory reference instructions have the format
  1452.  
  1453.     memref {I/@} address{,X}
  1454.  
  1455. where I (PDP-4, PDP-7, PDP-9) /@ (PDP-15) signifies indirect reference,
  1456. and X signifies indexing (PDP-15 in page mode only).  The address is an
  1457. octal number in the range 0 - 017777 (PDP-4, PDP-7, PDP-9, and PDP-15 in
  1458. bank mode) or 0 - 07777 (PDP-15 in page mode).
  1459.  
  1460. IOT instructions consist of single mnemonics, eg, KRB, TLS.  IOT instructions
  1461. may be or'd together
  1462.  
  1463.     iot iot iot...
  1464.  
  1465. IOT's may also include the number 10, signifying clear the accumulator
  1466.  
  1467.     iot 10
  1468.  
  1469. The simulator does not check the legality of IOT combinations.  IOT's for
  1470. which there is no opcode may be specified as IOT n, where n is an octal
  1471. number in the range 0 - 07777.
  1472.  
  1473. EAE instructions have the format
  1474.  
  1475.     eae {+/- shift count}
  1476.  
  1477. EAE instructions may be or'd together
  1478.  
  1479.     eae eae eae...
  1480.  
  1481. The simulator does not check the legaility of EAE combinations.  EAE's for
  1482. which there is no opcode may be specified as EAE n, where n is an octal
  1483. number in the range 0 - 037777.
  1484.  
  1485. Index instructions (PDP-15 only) have the format
  1486.  
  1487.     index {immediate}
  1488.  
  1489. The immediate, if allowed, must be in the range of -0400 to +0377.
  1490.  
  1491. Operate instructions have the format
  1492.  
  1493.     opr opr opr...
  1494.  
  1495. The simulator does not check the legality of the proposed combination.  The
  1496. operands for MUY and DVI must be deposited explicitly.
  1497.  
  1498. Finally, the LAW instruction has the format
  1499.  
  1500.     LAW immediate
  1501.  
  1502. where immediate is in the range of 0 to 017777.
  1503.  
  1504. Appendix 1: Notes On File Representations
  1505.  
  1506. 1. Disks
  1507.  
  1508. Disks are represented as unstructured binary files of 16b data items.  Thus,
  1509. simulated disks are endian dependent.  To share a disk file between versions
  1510. of the simulator running on big and little endian systems, each 16b word
  1511. must be byte swapped prior to use.
  1512.  
  1513. 2. Magnetic tapes
  1514.  
  1515. Magnetic tapes are represented as unstructured binary files of 16b data
  1516. items.  Each record consists of a 16b byte count n, followed by (n + 1)/2
  1517. 16b words of data.  If the byte count is odd, the last byte in the record
  1518. is undefined.
  1519.  
  1520. Magnetic tapes are endian dependent.  To share a magnetic tape file between
  1521. versions of the simulator running on big and little endian systems, each
  1522. 16b word must be byte swapped prior to use.
  1523.  
  1524. Note that the representation of magnetic tapes is only consistent within
  1525. each simulator family.  On a little endian system, a magnetic tape produced
  1526. by the Nova simulator will appear to be "correct" for the PDP-11 simulator,
  1527. even though on real hardware the results would be byte swapped.  Interchange
  1528. of tapes between simulators is not supported.
  1529.  
  1530. Revision History (since Rev 1.1)
  1531.  
  1532. Rev 2.2 Jan, 96    Added register buffers for save/restore
  1533.         Added 18b PDP's
  1534.         Guaranteed TTI, CLK times are non-zero
  1535.         Fixed breakpoint/RUN interaction bug
  1536.         Fixed magnetic tape backspace to EOF bug
  1537.         Fixed ISZ/DCA inversion in PDP-8 symbol table
  1538.         Fixed sixbit conversion in PDP-8 examine/deposit
  1539.         Fixed unit number calculation bug in SCP and in
  1540.             Nova, PDP-11, 18b PDP moving head disks
  1541.  
  1542. Rev 2.1    Dec, 95    Fixed PTR bug (setting done on EOF) in PDP-8, Nova
  1543.         Fixed RX bug (setting error on INIT if drive 1 is
  1544.             not attached) in PDP-8, PDP-11
  1545.         Fixed RF treatment of photocell flag in PDP-8
  1546.         Fixed autosize bug (always chose smallest disk if new
  1547.             file) in PDP-11, Nova
  1548.         Fixed not attached bug (reported as not attachable) in
  1549.             most mass storage devices
  1550.         Fixed Nova boot ROMs
  1551.         Fixed bug in RESTORE (didn't requeue if delay = 0)
  1552.         Fixed bug in RESTORE (clobbered device position)
  1553.         Declared static constant arrays as static const
  1554.         Added PDP-8, Nova magnetic tape simulators
  1555.         Added Dasher mode to Nova terminal simulator
  1556.         Added LINUX support
  1557.  
  1558. Rev 2.0    May, 95    Added symbolic assembly/disassembly
  1559.