Preliminary Specifications: Programmed Data Processor Model Three (PDP-3) October, 1960
Part 3
Three-quarter inches of blank tape is written by giving either the MWA or MWB order. An end of file is written as follows: 1) Four MWA commands write three inches of blank tape. 2) Then end of file character is written by giving the MPS order.
Information is read and checked for correct parity while writing.
If too many program steps are given between the motion select command, MWA or MWB and the first MPS, the unit will deselect (or disconnect). The MPS is then a no-operation command.
_Writing Program_
As an example, a program to write k words in binary format from storage beginning in register A, using tape unit number 04, is shown. The following program is written in standard FRAP language. The program begins in register enterwrite.
enterwrite mec ,clear flags initially mwb 400 ,73000000464 lir x/-k+1 ,initialize index register x b lio x/a+k-1 ,begin loop mps ,wait for TC then write C(Z) jmp c ,error spx x/1 ,add 1 to index register x jmp b ,return of loop jmp done ,record written
c mec ,tape error ril 1 spi jmp rwcstop ,read-write error or tape fault ril 1 spi jmp b+3 ,tape end hlt ,tape parity
done ,resume programming
_Reading Information_
Information is read by giving the MRA or MRB order. Almost 10 ms. is available after a read order is given before information actually enters the TC buffer.
To read a record of unknown length, the read order is first given. The MPS order halts the program until six characters are assembled in the TC information buffer. The next instruction after the MPS, a jump instruction, transfers control from the loop when any flag is set. The next instruction deposits the IO. The record length is determined by not skipping after the MPS order on the setting of the end of record flag. The read-write check flag or the end of record flag is then interrogated to see that the tape is actually at the end of record. If a tape is not at the end of record, then the tape is either at the end of the reel, or a parity check has occurred.
_Reading Program_
Program to read j binary words into storage beginning in register d, using tape unit 10, j is unknown. The program begins in register enteread.
enteread mec ,clear flags initially mrb 1000 ,730000001060 dzm x ,put zero in memory location x e mps jmp outcheck dio x/d ,store in location modified by x snx x/+1 ,add 1 to C(x) jmp e
outcheck mec ,examine flags spi ,end of record? jmp recordend ,yes hlt ,error
recordend snx x/+1 ,to find value of j " ,resume programming C(IA) = j " " "
_Forward Spacing_
Forward spacing is done by giving an MRB or MRA order. This moves the tape forward with the read-write head positioned at the end of the following record. If n read orders are given, the tape is spaced forward n records. By giving the MEC order, parity flags are examined to see that information on tape has been read correctly.
_Backspacing_
By giving an MBA or MBB order the tape is moved backwards a record with the read-write heads positioned in the previous end of record gap. The end of record flag is set when the tape has moved backwards a record.
_Rewinding_
Rewinding is accomplished by giving the rewind order, move tape to load point, MLP. The rewind order starts a unit rewinding and does not tie up the TC. If a motion command is given which calls for a unit that is rewinding, the command is executed, but the action will not take place until the unit is available.
_Unit Availability_
A unit is unavailable to the program under the following conditions:
1. Unit is rewinding. 2. Tape is improperly loaded. 3. Cover door open. 4. Unit overloaded. 5. Unit under manual control. 6. Power off.
A selected but unavailable unit holds up the TC if a motion order is given for the unit. The TC will be held up until the unit is ready.
_Flag Positions_
_IO Bit_ _Flag_
0 EOR - End of record 1 RWF - Read-Write 2 EOT - End of Tape 3 Parity
_Connection with High Speed Channel_
The high speed channel directs the tape control, and word transfer, just as a program would. A unit is first started reading or writing. The high speed channel is given the memory location of the information, and the number of registers the words read or written will occupy. The channel effects the information transfer. Thus, a high speed channel connected to a tape control handles the programming for the unit word transfers.
Completion of the block transfer is signified by either setting a program flag, or entering the sequence break.
_Connection with Sequence Break System_
When the TC is connected to the Sequence Break System, the program is automatically interrupted each time an MPS command needs to be given.
Programming is unaffected during reading and a record may be read with no flags set. The TC initiates breaks so that an MPS may be given in time.
Similarly, the break is initiated during writing each time an MPS needs to be given.
_Motion Command Summary_
_Time before _Time between _Time after End of _Flags that first MPS_ MPS's_ Record to deselect_ may be set_
MWA 3 ms. 400 us. 10 ms. RWF (if unit MWB (longer time is deselected causes deselection) and MPS given, or unit becomes unavailable), Parity, EOT.
MRA 7 ms. < 400 us. 5 ms. RWF, (if MRB (longer time information misses information, is missed, or and unit becomes rwc set) unavailable), EOT, EOR, Parity.
MBA - - 10 ms. RWF (if unit MBB becomes unavailable), EOR, EOT.
CATHODE-RAY-TUBE DISPLAY
The PDP-3 Cathode Ray Tube Display is useful for presentation of graphical or tabular information to the operator. It uses a 16 inch round tube with magnetic deflection. For each In-Out transfer order, one point is displayed at the position indicated by the In-Out Register. Bits 0-9 of the IO indicate the X coordinate of the position, and bits 18-27 indicate the Y coordinate. The display takes 60 microseconds.
An additional display option is a Light Pen. By use of this device the computer is signaled that the operator is interested in the last point displayed. Thus the program can take appropriate action such as changing the display or shifting operation to another program.
A smaller display is available. This display uses a five inch, high resolution cathode ray tube. The tube is equipped with a mounting bezel to accept a camera or photomultiplier device. The operation of this display is similar to that of the 16 inch, except that 12 bits are decoded for each axis.
REAL TIME CLOCK
A special input register may be connected to operate as a Real Time Clock. This is a counting register operated by a crystal controlled oscillator. The clock can be reset to zero by manual operation. A toggle switch interlock prevents an accidental reset. The state of this counter may be read at any time by the appropriate In-Out Transfer instruction.
LINE PRINTER
A 72 column Anelex printer and control are available as an option for PDP-3. The control contains a one line buffer. This buffer is cleared by the completion of an order to space the paper one position (psp). The buffer is filled from the In-Out Register by a succession of 12 load buffer orders (plb). The first plb will put the six characters represented by C(IO) in the leading (left-hand) column positions of the buffer. After the buffer is loaded, the order, print (pnt), is given.
UTILITY PROGRAMS
FRAP-3 - The Assembly Program
An assembler or compiler prepares a machine language tape suitable for direct interpretation by the computer from a program tape in operator language. Generally speaking, one statement accepted by FRAP produces one instruction for the machine. A single statement written for the PDP-3 compiler, DECAL-3, may cause several instructions to be written. Thus, FRAP causes a 1 for 1 mapping of instructions for statements while DECAL may produce many instructions from one statement.
In addition to allowing program tapes to be prepared with off line equipment, an assembly program has other functions. Normally, the machine would require 36 bits or 12 octal digits to be written for each instruction used in the machine. FRAP allows mnemonic symbols to be used for the instructions. These mnemonic symbols aid the programmer by representing the instruction in an easily remembered form.
In addition to allowing mnemonic symbols to represent the instructions, variable length sequences of alphanumeric characters may be used to represent memory addresses in symbolic form. The assembly program does the address bookkeeping for the programmer. A short example of a FRAP program is on Page 29.
Since few characters limit or control the format of instructions written in FRAP-3 language, it is possible to write instructions in almost any format or style.
FRAP-3 may also be used to prepare tapes for interpretive programming, since arbitrary definitions for operation code symbols are permitted.
A feature useful both for ease of programming and for machine simulation is the ability to call for a series of instructions (macro-instruction) to be written. Frequently used instruction sequences thus need only to be defined once.
DECAL - The Compiler Program
DECAL-3 (Digital Equipment Compiler, Assembler, and Linking loader for PDP-3) is an integrated programming system for PDP-3. It incorporates in one system all of the essential features of advanced assemblers, compilers, and loaders.
DECAL is both an assembler and compiler. It combines the one-to-one translation facilities of an assembler, and the one-to-many translation facilities of a formula translation compiler. Problem oriented language statements may be freely intermixed with symbolic machine language instructions. A flexible loader is available to allow the specification of program location at load time. The programmer may specify that certain variables and constants are "systems" variables and constants. The symbols so defined are universally used in a system of many routines. Thus, communications between parts of a major program is facilitated even though these parts may be compiled separately. Storage requirements for a large program are lessened by this technique.
DECAL is an open-ended programming system and can be modified without a detailed understanding of the internal operation. This is achieved by means of a recursive definition facility based on a skeleton compiler with a small set of logical capabilities. The skeleton compiler acts as a bootstrap for introducing more sophisticated facilities.
The compiler will be delivered with a fully defined subset of formula translation operators. Additional subsets may be defined by the user to best fit his source language.
FLOATING POINT SUBROUTINES
A set of subroutines are provided with the PDP-3 to perform floating point arithmetic. In these, the PDP-3 36 bit word is divided to form a 27 bit mantissa, a, and 9 bit exponent, b. Numbers, thus, appear in the form: k = ax2^b where, a, is considered to be in fractional form in the range 1/2 <= a < 1, and b is an integer, 0 <= b < 29. This gives number, k, the range 10^{-76} < k < 10^{+76}.
The subroutines are called with one operand in the accumulator. After the subroutine has been executed, the accumulator contains the answer. Thus floating point numbers are essentially handled as regular logical works. The format of the number allows magnitude comparisons to be made by conventional arithmetic as bit 0 is the sign of the number, bits 1 to 9 the exponent, and the remaining 26 bits, together with the sign bit, the mantissa in ones complement arithmetic. The arithmetic subroutines are: add, subtract, multiply, divide, convert a floating point number to binary, convert a binary number to a floating number. Additional routines form: [square root of x], e^x, ln x, sine(~pi~/2)x, cos(~pi~/2)x, tan^{-1}x. There are also programs to convert between floating decimal numbers and PDP-3 floating numbers.
Routines which require two operands, e.g., add, subtract, multiply and divide, require an index register to specify the address of the second operand. An index register also specifies parameters in data conversions, e.g., the position of the binary point when converting a binary number to a standard floating number.
Using the floating point subroutines, additional routines may be written which handle complex floating numbers and vector and matrix algebra.
MAINTENANCE ROUTINES
Maintenance Routines are used exclusively to check the operation of the machine. These routines are operated while varying the bias supply voltages, and thus a check is made on possible degradation of all components which would affect the operation of the machine.
MISCELLANEOUS ROUTINES
A variety of additional programs are provided with PDP-3.
One of the more important programs is the Typewriter Interrogator Program (TIP). TIP allows the typewriter to be used most effectively as an input-output link by which programs and data are examined and modified. The features include request for printing of a series of registers, interrogation and modification of the contents of registers, and the ability to request new tapes after programs have been suitably modified. Communication is done completely via the typewriter in either octal numbers, decimal numbers, or alphanumeric codes. Register contents are presented in similar form.
Other miscellaneous routines handle arithmetic processes, e.g., number conversions, and communication with the input or output devices. These routines include various format print outs, paper tape and magnetic tape read in programs, and display subroutines.
* * * * *
* * * * *
Transcriber's Notes:
C (X) and C(X) standardized to C(X).
usec and usec. standardized to usec. throughout text.
Other changes to the original text are listed below.
Figure 4 is referred to in the text, but a copy could not be located.
Underlined Text is enclosed by underscores.
Superscripts are marked with carats x^2 and y^{-3}.
Greek symbols are surrounded by ~tildes~.
Transcriber Changes:
TABLE OF CONTENTS: Originally 'Operation' (=Operating= Speeds)
TABLE OF CONTENTS: Originally 'Frap' (=FRAP=)
TABLE OF CONTENTS: Originally 'Routines' (=Subroutines=)
Page 4: Originally 'theoperate' (while a program is operating by means of =the operate= instruction.)
Page 7: Added comma (The instruction base address, =Y,= is in octal digits 7 through 11.)
Page 8: Standardized from 'sub-routines' (The conversion of decimal numbers into the binary system for use by the machine may be performed automatically by =subroutines=.)
Page 8: Standardized from 'sub-routine' (the output conversion of binary numbers into decimals is done by =subroutine=.)
Page 16: Added comma (This instruction will shift the contents of the combined register right N =positions,= where N is octal digits 7-11 of the instruction word.)
Page 16: Moved comma. Was 'left, N positions' (This instruction will shift the contents of the combined registers =left N positions,= where N is octal digits 7-11 of the instruction word.)
Page 19: Was 'know' (Most in-out operations require a =known= minimum time before completion.)
Page 20: Removed inconsistent comma (These are the Test Address (15 bits), the Test Word (36 bits), and the Sense =Switches= (6 bits).)
Page 21: Changed comma to period (the computer will halt at the completion of each memory =cycle.= This switch is particularly useful in debugging programs.)
Page 28: Was 'tpae' (during reading or backspacing when the =tape= comes to an end of record gap.)
Page 29: Standardized from 'de-select' (the unit will =deselect= (or disconnect).)
Page 35: Was 'propares' (An assembler or compiler =prepares= a machine language tape suitable for direct interpretation)
Page 35: Removed comma (Frequently used instruction =sequences= thus need only to be defined once.)
Page 37: Was 'Routiines' (=Routines= which require two operands, e.g., add, subtract, multiply and divide)