System Components, from the DEC "PDP 11/20 Handbook", 1969
copy at http://research.microsoft.com/%7Egbell/Digital/DECMuseum.htm

SYSTEM COMPONENTS

KA11 CENTRAL PROCESSOR

UNIBUS - There are.. concepts that are very important for understanding both the hardware and software implications of the Unibus. [It is a single bus, with bidirectional lines, a master-slave relation and with interlocked communication.]

CORE MEMORY -The PDP-11 allows both 16.bit word and 8-bit byte ad- dressing. The address space may be filled by core memory and peripheral device registers. The top 4,096 words generally are reserved for peripheral device registers. The remainder of address space can be used for read-write core memory or read-only core memory. Read-write core memory is currently available in 4,096 16-bit word segments. This memory has a cycle time of 1.2 microseconds and an access time of 500 nanoseconds. It is a standard part of a PDP-11/20 system.

PERIPHERAL DEVICES -The ASR-33 Teletype with low-speed paper tape reader and punch is provided in the basic PDP-11/20 system. Options for the PDP-11 include a paper tape reader capable of reading 300 characters per second, a paper tape punch with an output capacity of 50 characters per second, and additional Teletype units. Provision is made for the addition of numerous peripheral devices. These include standard DEC peripherals as well as other devices which will be unique to the PDP-11.

TELETYPE (MODEL LT33-DC/DD)

The standard Teletype Model 33 ASR (Automatic Send-Receive) can be used to type in or print out information at a rate of up to ten characters per sec- ond, or to read in or punch out perforated paper tape at a ten characters per second rate. Signals transferred between the 33 ASR and the control logic are standard serial, 11-unit code Teletype signals. The signals consist of "marks" and "spaces" which correspond to idle and bias current in the Teletype serial line, and to Os and ls in the control and computer. The start mark and subsequent eight bits are each one unit of time duration and are followed by the stop mark which is two units.

The 8-bit-code used by the Model 33 ASR Teletype unit is the American Standard Code for Information Interchange (ASCII) modified. To convert the ASCII code to Teletype code, add 200 octal (ASCII + 200s = Teletype).

TELETYPE CONTROL (MODEL KL11)

TELETYPE CONTROL - Serial information read or written by a Teletype unit is assembled or disassembled by the control for parallel transfer on the Unibus. The control also provides the flags which cause a priority interrupt and indicate the availability of the teletype.

KEYBOARD/READER -The Teletype control contains an 8-bit buffer (TKB) which assembles and holds the code for the last character struck on the keyboard or read from the tape. Teletype characters from the keyboard/ reader are received serially by the 8-bit -shift register TKB. The code of -a Teletype character is loaded into the TKB so that "spaces" correspond to binary Os and holes, "marks," correspond to binary 1s. Upon program command, the contents of the TKB may be transferred in parallel to a memory location or a general register.

A character is read from the low-speed reader by setting the Teletype reader enable bit, (RDR ENB), to a 1. This sets the busy bit (BUSY) to a 1. When a Teletype character starts to enter, the control de-energizes a relay in the Teletype unit to release the tape feed latch. When released the latch mechanism stops tape motion only when a complete character has been sensed, and before sensing of the next character is started. When the charac- ter is available in buffer (TKB), the busy bit (BUSY) i$ cleared and the done flag (DONE) is set. If the interrupt is enabled, a request is made for the bus at level 4 (BR4). The interrupt vector is at location 60,. The DONE bit is cleared by any instruction which reads the contents of the buffer (TKB) into the processor. If the DONE flag is cleared before the interrupt is granted, no interrupt will occur. The keyboard must be read within 18 milliseconds of DONE to ensure no loss of information.

TELEPRINTER/PUNCH - On program command, a character is sent in parel- lel from a memory location (or a general register) to the TPB shift register for transmission to the teleprinter/punch unit. The control generates the . . start "space," then shifts the eight bits serially into the Teletype unit, and then generates the stop "marks." This transfer of information from the TPB into the teleprinter/punch unit is accomplished at the normal Teletype rate and requires 100 milliseconds for completion. The READY flag in the tele- printer/punch indicates that the TP8 is ready to receive a new character. A maintenance mode is provided which connects the TPB output to the TKB input so that the parallel serial and serial parallel shifting may be verified.

HIGH-SPEED PERFORATED TAPE READER PUNCH AND CONTROL (TYPE PC11)

TAPE READER - This device senses 8-hole perforated paper or Mylar tape photo-electrically at 300 characters per second. The reader control requests reader movement, transfers data from the reader into the reader buffer (PRB), and signals the computer when incoming data is present. It does this by setting a DONE bit. If the interrupt is enabled and the interrupt is granted, the processor traps to location 70, and may immediately begin executing the service routine for the paper tape reader.

TAPE PUNCH -This option of a Royal McBee paper tape punch that per- forates 8-hole tape at a rate of 50 characters per second. Information to be punched on a line of tape is loaded in an 8-bit punch buffer (PPB) from a memory location or one of the general registers. The punch flag, READY, becomes a 1 at the completion of punching action, signaling new information may be transferred into the punch buffer and punching initiated.

LINE FREQUENCY CLOCK (TYPE KW11-L)

The KW11-L real timeclock provides a method of measuring time intervals at line frequency. This clock consists of a frequency source and control logic. When enabled the clock causes an interrupt every 16.6 or 20 milliseconds, depending upon line frequency.

PROGRAMMING EXAMPLE

A paper tape reader interrupt service could appear as follows: First the user must initialize the service routine by specifying an address pointer and a word count.

INIT:	MOV #BUFADR, #0 	; set up address pointer
        POINTR = . - 2 	; in third word of MOV instruction.
        MOV #CNTR, #0 	; set up character count in
        CRCNT=.-2 		; third word of MOV instruction.
        MOV #lOl, PRS 	; read a character with interrupt
				 enabled.

When the interrupt request occurs and is acknowledged, the processor stores the current PC and PS on the stack. Next it picks up the interrupt vector or new PC and PS beginning at location 70.. The next instruction executed is the first instruction of the device service routine at PRSER.

PRSER:	TST PRS		; test for error
        BMI ERROR I		; branch to error routine if
			; bit 15 of PRS is set
        MOVB PRB, @POINTR	; move character (byte)
			; from reader to buffer
        INC POINTR		; increment pointer 
        DEC CRCNT		; decrement character count
        BEQ DONE		; branch when input done
        INC PRS		; start reader for next character
DONE:	RTI		; return from interrupt