A Quickstart Guide to Editing Paper Tape With the Symbolic Tape Editor on the DEC PDP-8

Before re-writable storage devices, such as tape drives, become popular for the DEC PDP-8, owners had to rely on paper tape. This was fine for loading programs on pre-punched tape, but left the problem of how to put new data onto punched tape and how to edit existing data. This could be done off-line, but a better way was to use DEC's Symbolic Editor. This made life much easier as it allowed you to interactively edit a tape in a buffer, check the alterations and then output a new tape. This editor was used for quite a few years by those wanting to edit Assembly or FORTRAN source code. What follows is a brief introduction to using this editor.

Obtaining the Symbolic Editor and Its Manual

The Symbolic Editor can be obtained from, the invaluable resource for retro software and documentation, Bitsavers. The paper-tape image is called: DEC-08-ESAB-PB.bin. This file is loadable by emulators such as SimH, but owners of a real PDP-8 will have to find a way to punch this image to paper-tape. The Symbolic Editor Programming Manual is also available from bitsavers in PDF format.

Theory of Operation

The editor works by containing the text you are editing in a buffer in memory referred to as a page. So when you read in a paper-tape, it will read as much as it can into the free memory and then ring a bell to indicate that you may begin editing. You can then edit this text and write it to a new paper tape.

The editor works a bit like the Unix editor, vi, in that it has two modes of operation: command mode and text mode. When in command mode all text typed via the teletype is interpreted as text editing commands. When in text mode all text typed in via the teletype is either adding to or altering the text in the buffer.

When the editor is first loaded it starts off in command mode, you can then type your desired command followed by RETURN to action it. Depending on the command, the editor may now switch to text mode and allow you to edit the buffer.

When in text mode you must press RETURN after each line that you enter to save it to the buffer. To return to command mode and to cancel the current line you are typing press CTRL+FORM (CTRL+L).

Starting the Editor

Instructions for Owners of a Real PDP-8

To load the editor from paper-tape on a real PDP-8 just load the Binary Loader first and then the editor from paper-tape in the normal way. The program can then be started at Octal address 200. If you have a high-speed punch or reader then you will want to set Switch Register bit 10 to high for a high-speed punch and bit 11 to high for a high-speed reader (See section 1.4 of Symbolic Editor Programming Manual).

Instructions for Those Using SimH to Emulate a PDP-8

If you are using SimH, then the following applies:

To load the editor's paper-tape image from the current directory in SimH:

sim> load DEC-08-ESAB-PB.bin

SimH emulates a high-speed punch and reader, so you will want to set Switch Register bits 10 and 11 to high to tell the editor that this is what you will be using:

sim> de sr 3

To run the editor (200 here is in Octal):

sim> run 200

Commands

The commands take the following form where `E` represents any command:
Command StructurePurpose
EPerform command E
nEPerform command E on line n
m,nEPerform command E on lines m to n, inclusive.

Below is a brief list of useful commands to get you started:

CommandDescription
AAppends the text from the teletype to the buffer, if the buffer is blank then this can be used to create a new paper-tape
CChanges the specified line or range of lines
DDeletes a line or range of lines from the buffer
IInserts text before line 1 or before the specified line
KKill the entire page buffer
LLists a page, line or range of lines from the buffer
PPunches the contents of the buffer, line or range of lines to the paper-tape punch
RReads a page of text from the paper-tape reader and appends it to the buffer

Examples

Creating a new paper-tape with source code for a FORTRAN program

Start the Editor as above, note that when it is started it doesn't come up with a prompt, so don't worry if it looks as if it isn't doing anything.

Owners of a real PDP-8, attach a blank piece of paper-tape to the punch. If using SimH, then press CTRL+E to get to the sim> prompt and attach a file to the paper-tape punch:

sim> attach ptp factorials.ft

To get back to the editor:

sim> cont

The editor starts with a blank buffer. To append the following source code to it, use the command: A, and then enter:

C;      THIS PROGRAM CALCULATES FACTORIALS
5;      TYPE 200
10;     ACCEPT 300,X
        FACT=Y=1.
        IF (X) 5,32,30
30;     IF (X-Y) 41,32,33
32;     TYPE 400,X,FACT
        GO TO 10
33;     FACT=FACT*(Y=Y+1.)
        GO TO 30
41;     PAUSE
        GO TO 5
200;    FORMAT (/, "PLEASE TYPE A POSITIVE NUMBER", /)
300;    FORMAT (E)
400;    FORMAT (/,E, "FACTORIAL IS",E)
        END

Remember to press RETURN after each line including the last line to make sure that it is saved to the buffer.

Press CTRL+FORM (CTRL+L) to go back to command mode.

Test some of the commands such as: 1,5L, to list the first 5 lines in the buffer.

Punch the buffer to paper-tape with the command: P

Reading an existing paper-tape into the editor

If the editor isn't already started do so as above, otherwise use the command: K to clear the contents of the buffer.

Owners of a real PDP-8, attach the paper-tape that you want to edit to the paper-tape reader. If using SimH, then press CTRL+E to get to the sim> prompt.

If you haven't already detached the file above from the paper-tape punch then:

sim> detach ptp

To attach the file we made previously to the paper-tape reader:

sim> attach ptr factorials.ft

To get back to the editor:

sim> cont

Read the paper-tape into the buffer with the command: R

List its contents with the command: L

Where Now?

This editor can be really quite flexible and you can even create separate tape editing tapes which will automatically run the tape editors commands over a tape to be edited. More information can be found by reading the Symbolic Editor Programming Manual. In addition if you haven't used SimH before, take a look at my article: Emulating a DEC PDP-8 with SimH. I intend to follow this article with some further articles on programming the PDP-8 and will be using this editor to do this shortly.
Creative Commons License
A Quickstart Guide to Editing Paper Tape With the Symbolic Tape Editor on the DEC PDP-8 by Lawrence Woodman is licensed under a Creative Commons Attribution 4.0 International License.

Share This Post

Feedback/Discuss

Related Articles

Running 4K FORTRAN on a DEC PDP-8

4K FORTRAN was a subset of FORTRAN II and was the first high-level language available for the DEC PDP-8. It consisted of two parts: the 4K FORTRAN Compiler (nicknamed "Fivetran") and the 4K ...   Read More

Emulating a DEC PDP-8 with SimH

The DEC PDP-8 mini-computer was launched on 22 March 1965 and was a great success. It was fairly cheap for the day and could easily be expanded. What attracts me most to the PDP-8 is its simple desig...   Read More

PDP-8 in 'Three Days of the Condor'

I watched 'Three Days of the Condor' the other night and loved seeing what I believe is a Dec PDP 8/E being used. Also featured in connection with this machine was a DecWriter, paper tape reader and p...   Read More

I Love ED on CP/M

I love ED on CP/M. It's often derided but I think it's just misunderstood and with a little practise its true value can shine through. It's elegant, easy to learn and only has about 25 commands but t...   Read More

Installing ZDE 1.6, a programmers editor for CP/M

To do any serious programming under CP/M, the first thing you need is a good programmers editor. There aren't many in the archives, but I have tried most of them and found ZDE to be the best. It is s...   Read More