[an error occurred while processing this directive] [an error occurred while processing this directive] PDP-8 Paper Tape Instructions [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive]
[an error occurred while processing this directive] (none)
   [an error occurred while processing this directive]

The Digital Equipment Corporation PDP-8

[an error occurred while processing this directive]

Paper Tape Instructions

[an error occurred while processing this directive] Part of [an error occurred while processing this directive] the PDP-8 Programmer's Reference Manual
[an error occurred while processing this directive] See also [an error occurred while processing this directive] (none)
[an error occurred while processing this directive] [an error occurred while processing this directive] (none) Douglas W. Jones [an error occurred while processing this directive] (none)
[an error occurred while processing this directive] (none)
THE UNIVERSITY OF IOWA Department of Computer Science [an error occurred while processing this directive] and (none) [an error occurred while processing this directive]

(none) [an error occurred while processing this directive]

Copyright © (none) This work may be transmitted or stored in electronic form on any computer attached to the Internet or World Wide Web so long as this notice is included in the copy. Individuals may make single copies for their own use. All other rights are reserved.

[an error occurred while processing this directive]
[an error occurred while processing this directive]

This document describes the high speed paper-tape reader-punch interface of the PDP-8, including the PC8E (M840) interface for the Omnibus machines (the PDP-8/E,F,M and A) as well as earlier models. The IOmec (Digitronics) 9602-1 interface is an extension of this.

Index


Device Registers

The high speed paper-tape reader-punch interface consists of two largely independent devices, the reader device and the punch device. In some cases, the reader and punch are independent hardware devices. In other cases, the reader and punch are combined into a single unit. The computer interacts with these devices through 16 IOT instructions; these instructions, in turn, reference the registers described below.

Note: Most of these registers are accessed via the accumulator; such registers are illustrated as their contents appears when loaded in the accumulator.

Reader Buffer

            00 01 02 03 04 05 06 07 08 09 10 11
            ___________________________________
           | 0| 0| 0| 0|  |  |  |  |  |  |  |  |
           |__|__|__|__|__|__|__|__|__|__|__|__|
           |           |                       |
           |  Unused   |    Keyboard Buffer    |
The reader buffer register holds the character most recently read from the paper tape. While a character is being read, the contents of this register are unpredictable.

Reader Flag

The reader flag bit is set when a character has been read into the reader buffer. The console-reset or power-on operation clears this flag. If interrupts are enabled, this flag generates an interrupt request when set.

Punch Buffer

            00 01 02 03 04 05 06 07 08 09 10 11
            ___________________________________
           |  |  |  |  |  |  |  |  |  |  |  |  |
           |__|__|__|__|__|__|__|__|__|__|__|__|
           |           |                       |
           |  Ignored  |    Keyboard Buffer    |
The punch buffer register holds the character that is to be punched on tape. Modifying this register while it is being used to generate output may produce unpredictable results.

Punch Flag

The punch flag bit is set when the character most recently loaded in the punch buffer has been output. The console-reset or power-on operation clears this flag. If interrupts are enabled, this flag generates an interrupt request when set.

Interrupt Enable

This register is not present on high-speed paper-tape reader punch interfaces prior to the PC8E (M840).

End-of-tape flag

This register is only present in the IOmec paper-tape interface. Set by end-of-tape if enabled and if the attached reader is equipped to detect this condition. The console-reset or power-on operation clears this flag. If interrupts are enabled, this flag generates an interrupt request when set.

Reader command register

            00 01 02 03 04 05 06 07 08 09 10 11
            ___________________________________
           |  |  |  |  |  |  |  |  |  |  |  |  |
           |__|__|__|__|__|__|__|__|__|__|__|__|
           |                          |  |  |  |
           |         Ignored          |RE FE D |
This register is only present in the IOmec paper-tape interface. The register is set to zero on reset, and can be ignored for most IOmec readers. The 3 bits are: The end-of-tape enable bits are cleared when the end-of-tape flag is set, and the end-of-tape flag cannot be set unless at least one of these bits is one. Some paper-tape readers may be configured to use the end-of-tape enable bits to enable tape movement in the indicated direction.

Instruction Format

            00 01 02 03 04 05 06 07 08 09 10 11
            ___________________________________
           | 1| 1| 0| 0| 0| 0| 0| x| x|  |  |  |
           |__|__|__|__|__|__|__|__|__|__|__|__|
           |        |                 |        |
           |  IOT   |      Device     |   Op   |
The high-speed paper-tape reader/punch is always connected as devices 01 and 02.

Input Instructions

6010 - RPE Reader Punch Enable

	RPE

The interrupt enable bit is set. This is not supported by the interfaces on PDP-8 models prior to the PDP-8/E, and thus should be avoided in portable code.

6011 - RSF Reader Skip if Flag

	RSF

If the reader flag is set, indicating that input data is ready, the next instruction in sequence is skipped. All PDP-8 reader interfaces support this operation.

6012 - RRB Read Reader Buffer

	RRB

The reader buffer is ored with the accumulator. All PDP-8 paper tape interfaces support this operation. This instruction also clears the reader flag.

6013 - RRB RSF (IOmec only)

For pre-omnibus DEC reader interfaces, this was a never used microcoded combination of RRB and RSF. For DEC's PC8E interface, it was undefined. IOmec stole this combination and used it to load a command from the accumulator into the reader's command register.

6014 - RFC Reader Flag Clear

	RFC

Clear the reader flag and initiate the reading of the next character from tape. The reader flag will be set by the completion of the read operation. All PDP-8 paper tape interfaces support this operation.

6015 - RFC RSF (IOmec only)

For pre-omnibus DEC reader interfaces, this was a rarely used microcoded combination of RFC and RSF. For DEC's PC8E interface, it was undefined. IOmec stole this combination and used it to skip the next instruciton in sequence if the end-of-tape flag was set.

6016 - RRB RFC read buffer and continue

	RRB RFC

The reader buffer is ored to the accumulator, the reader flag is cleared, and the read of the next character is initiated. This operation is documented as a microcoded combination of RRB and RFC; but in the PC8E interface, it is decoded as a distinct operation. All PDP-8 paper tape interfaces support this operation.

6017 - RFC RRB RSF (IOmec only)

For pre-omnibus DEC reader interfaces, this was a never used microcoded combination of RFC, RRB and RSF. For DEC's PC8E interface, it was undefined. IOmec stole this combination and used it to clear the end-of-tape flag.

Output Instructions

6020 - PCE Punch Clear Enable

	PCE

The interrupt enable bit is reset. This is not supported by the interfaces on PDP-8 models prior to the PDP-8/E, and thus should be avoided in portable code.

6021 - PSF Punch Skip if Flag

	PSF

If the punch flag is set, indicating output is complete, the next instruction in sequence is skipped. All PDP-8 punch interfaces support this operation.

6022 - PCF Punch Clear Flag

	PCF

The punch flag is reset. All PDP-8 paper tape interfaces support this operation.

6024 - PPC Punch Put Character

	PPC

The least significant 8-bits of the accumulator is copied to the punch buffer, initiating output. All PDP-8 paper tape interfaces support this operation.

6026 - PLS Punch Load Sequence

	PLS

The least significant 8 bits of the accumulator are copied to the punch buffer, initiating output, and the punch flag is reset. This operation is a microcoded combination of PCF and PPC; but in the PC8E interface, it is decoded as a distinct operation. All PDP-8 paper tape interfaces support this operation.

Programming Conventions

Typical PDP-8 assembly language programs begin by defining the necessary IOT instructions. In the case of the paper-tape reader-punch, most PDP-8 assemblers predefine these symbols appropriately, as follows:
	RSF=	6011	/ Reader Skip if Flag
	RRB=	6012	/ Read Reader Buffer
	RFC=	6014	/ Reader Flag Clear
	PSF=	6021	/ Punch Skip if Flag
	PCF=	6022	/ Punch Clear Flag
	PPC=	6024	/ Punch Put Character
	PLS=	6026	/ Punch Load Sequence

One problem with the design of the punch interface is that the punch flag, like all device flags, is cleared on reset and powerup, but for many purposes, it would be better to have this flag set, indicating that, at startup time, the punch buffer register is ready to receive one character of output. The traditional startup code accomplishes this by outputting a null, since, on input, nulls are usually expected as leader:

	/ initialize the punch for output
		CLA
		PPC		/ output null
Given this initialization, the following two subroutines (or variations on them) are commonly used in most PDP-8 programs for polled paper tape input-output:
	PTRIN,	.-.		/Read from paper tape reader
	/			  returns character in ac
	PTRLP,	RSF		/ await input ready
		JMP	PTRLP
		CLA
		RRB RFC		/ read character
		JMP I	PTRIN

	PTPOUT,	.-.		/Write to paper tape punch
	/			  given character in ac
	PTPLP,	PSF		/ await input ready
		JMP	PTPLP
		PLS		/ write character
		JMP I	PTPOUT