DEC 11 XPTSA A D PDP Paper Tape Software Programming Handbook

DEC-11-XPTSA-A-D PDP-11 Paper Tape Software Programming Handbook DEC-11-XPTSA-A-D PDP-11 Paper Tape Software Programming Handbook

User Manual: DEC-11-XPTSA-A-D PDP-11 Paper Tape Software Programming Handbook

Open the PDF directly: View PDF PDF.
Page Count: 282

DownloadDEC-11-XPTSA-A-D PDP-11 Paper Tape Software Programming Handbook
Open PDF In BrowserView PDF
PDP-11
PAPER TAPE SOFTWARE
PROGRAMMING HANDBOOK

PDP-11
PAPER TAPE SOFTWARE
PROGRAMMING HANDBOOK

,0

(
The software described in this manual is
furnished to the purchaser under a license
for use on a single computer system and can
be copied (with inclusion of DEC's copyright
notice) only for use in such system, except
as may otherwise be provided in writing by
DEC.

(,

(

For additional copies. order No. DEC-ll-XPTSA-A-D from Digital Equipment
Corporation, Software Distribution Center, Bldg. 1-2, Maynard,
Mass.

(DIGITAL

EQUIPMENT

CORPORATION • MAYNARD, MASSACHUSETTS

First Edition, April i970
Revised, March
1971
Revised, January 1972
Revised, February,1973

Your attention is invited to the last two pages of this
document. The "How To Obtain Software Information" page
tells you how to keep up-to-date with DEC's software.
The "Reader's Comments" page, when filled in and mailed,
is beneficial to both you and DEC; all comments received
are considered when documenting subsequent manuals.

(
Copyright

©

1970, 1971, 1972,1973 by Digital Equipment
. Corpora tioD

Technical Changes from the previous version (DEC-II-GGPC-D)
are indicated with a bar in the margin of the appropriate
page.

C.·

Supporting and referenced documents:

PDP-II BASIC Programming Manual
(order: DEC-II-XBPMA-A-D)
Copies are available from DEC's Software Distribution Center,
Building 1-2, Maynard, Massachusetts 01754

(

Teletype is a registered trademark of the Teletype
Corporation

The following are registered trademarks
of Digital Equipment Corporation.
.
DEC
FLIP CHIP
COMPUTER LAB
OMNIBUS

PDP
FOCAL
DIGI~AL

(

(logo)

UNIBUS
ii

1/75-15

PRE F ACE

r-•.

This Handbook contains descriptions of the Paper Tape Software for
the PDP-II system. With this information you can load, dump, edit, assemble, and debug PAL-llA Assembly Language programs. Math routines and
input/output functions are also available to facilitate your programming
efforts.
The table of contents in the front of the Handbook directs you to the
chapter of the system program desired. There you will find a detailed
table of contents for reference while working with that chapter. For
locating items instill more detail, an Index concludes the Handbook.

~

(

The following symbols, when used herein, have the indicated meanings:
) denotes pressing the RETURN key, or indicates an ASCII
carriage return;
denotes pressing the LINE FEED key, or indicates an
ASCII line feed;
!J. denotes pressing the SPACE bar, or indicates an ASCII
space;
~ denotes typing CTRL/TAB, or indicates an ASCII tab.

'"

(

Other documentation conventions are:
1. Unless otherwise indicated, a line of user input is terminated
with the RETURN key.
2. When the distinction is useful, system printout is underlined
and user input is not underlined.

(

CTRL/U denotes holding down the CTRL key while typing the U key,
as when using the SHIFT/key combination. The slash is shown merely to
tie the actions together. CTRL is also used with certain other keys,
e.g., CTRL/P. The use of the CTRL/key combinations usually prints a t
3.

and the key typed, e.g., CTRL/U echoes tu on the printer when using ED-II
or lOX.

iii

CONTENTS

CHAPTER

(

(

(

(

I

programming the PDP-II System

2

The System Configuration

3

Writing PAL-IIA Assembly Language
Programs

4

Editing the Source Program

5

Debugging Object Programs On..-Line

6

Loading and Dumping Core Memory

7

Input/Output Programming

8

Floating-Point and Math Package Overview

9

Programming Techniques

APPENDIX
A

ASCII Character Set

B

PAL-IIA Assembly Language and
Assembler

C

Text Editor, ED-II

D

Debugging Object Programs On-Line, ODT-II
and ODT-IIX

E

Loading and Dumping Core Memory

F

Input/Output programming, lOX

G

Summary of Floating-Point and Math
Package·, FPMP-ll

H

Tape Duplication

I

Assembling the PAL-IIA Assembler

J

Standard PDP-II Abbreviations

K

Conversion Tables

TABLE
Instruction Operand Fields

3-18

1-1

PDP-II System Block Diagram

1-2

1-2

Processor Status Register

1-4

1-3

PDP-II System Unibus Block Diagram

1-5

1-4

Illustration of Push and Pop
Operations

1-10

1-5

Nested Device Servicing

1-16

2-1

The PDP-II Console

2-1

2-2

ASR-33 Teletype Console

2-6

2-3

ASR-33 Teletype Keyboard

2-7

2-4

High-Speed Paper Tape Reader Punch

2-9

2-5

Line Printer Control Panel

2-10

5-1

ODT Communication and Data Flow

5-21

6-1

Bootstrap Loader Instructions

6-2

6-2

Loading and Verifying the Bootstrap
Loader

6-4

6-3

Loading Bootstrap Tapes into Core

6-5

6-4

The Bootstrap Loader Program

6-6

Bootstrap Tape Format

6-7

3-1

FIGURE

6-5

(

(

(

,

E-3

Loading with the Absolute Loader

E-5

E-4

Dumping Using DUMPAB or DUMPTT

E-6

(
vi

CHAPTER 1
PROGRAMMING THE PDP-II SYSTEM

1.1
1.2

INTRODUCTION

1-1

SYSTEM FACILITIES

1-1

1.3
1.4

STATUS REGISTER FORMAT

1-4

UNIBUS

1-5

1.5

DEVICE INTERRUPTS

1-5

INSTRUCTION SET
1.6
ADDRESSING
1.7
1. 7.1
Registers
1. 7.2
Address Pointers
1. 7.3
Stack Operations
1. 7.4
Random Access of Tables
1. 7.5
Summary of Address Modes
1. 7.6
Accessing Unstructured Data
1.8
INSTRUCTION CAPABILITY
1.9
PROCESSOR USE OF STACKS
1. 9.1
Subroutines
1. 9.2
Interrupts
1. 9.3
Traps

1-14
1-14
1-14
1-15

1.10

1-16

PAPER TAPE SYSTEM SOFTWARE

1-i

1-6
1-6
1-7
1-8
1-9
1-10
1-11
1-11
1-13

F
\,

CHAPTER 1
PROGRAMMING THE PDP-II SYSTEM

1.1

INTRODUCTION

The PDP-II is a 16-bit, general-purpose, parallel-logic computer using
two's complement arithmetic.

Programmers can directly address 32,768

16-bit words, or 65,536 8-bit bytes.
(

All communication between system

components is done on a single high-speed bus called the Unibus.
Standard features of the system include eight general-purpose registers
which can be used as accumulators, index registers, or address pointers;
and a multi-level automatic priority interrupt system.

A simplified

block diagram of the PDP-II System is presented in Figure 1-1.

(

This chapter gives the PDP-II programmer an overview of system architecture, points out unique hardware features, and presents programming
concepts basic to the use of the

PDP~ll.

Following this is a short sum-

mary of DEC-supplied PDP-II software.

(~

1.2

SYSTEM FACILITIES

Tpe architecture of the PDP-II system and the design of its central processor provide:
•

single and double operand addressing

•

full word and byte addressing

•

simplified list and stack processing through auto-address
stepping (autoincrementing and autodecrementing)

•

eight programmable general-purpose registers

1-1

STATUS REGISTER
LINE
PRINTER

7

.CUSTOMER
EQUIPMENT

(1)

I-

::l

I

PAPER
TAPE

UNIBUS
CONTROL

'10

a

Z

I

I-'
I

::l14

tv

.;1

OTHER
DEVICES

PRIORITY
ARBITRATION

o

5

ARITHMETIC
UNIT

EIGHT
GENERAL
PURPOSE
REGISTERS

•

CORE
MEMORY

TTY

Figure 1-1.

(\

'"

,',,-....\

CENTRAL PROCESSOR

PDP-II SYSTEM BLOCK DIAGRAM

~.

J~

'[

/

'~-

(j

• data manipulation directly within external device
registers
• addressing of device registers using normal memory
reference instructions
• asynchronous operation of memory, processor and
I/O devices
• a hardware interrupt priority structure for peripheral devices
• automatic interrupt identification without device
polling
• cycle stealing direct memory access for high-speed
data transfer devices

(

• direct addressing of

32Kwords (65K bytes).

Two design features of the central processor serve to increase
system throughput:

(
a.

The eight programmable general-purpose registers within
the central processor can be used to store data and
intermediate results during the execution of a sequence
of instructions.

(

Register-to-register addressing.

provides reduced execution time for most instructions.
b.

The ability to code two addresses within a single
instruction allows operations on data within memory.
This eliminates the need to load processor registers
prior to data operations, and greatly reduces fetch
and store operations.

(
1-3

1.3

STATUS REGISTER FORMAT
The Central Processor Status Register (PS) contains in-

formation on the current priority of the processor, the result
of previous operations, and an indicator for detecting the
execution of an instruction to be trapped during program debugging.

The priority of the central processor can be set

under program control to anyone of eight levels.

This in-

formation is held in bits 5, 6, and 7 of the PS.

Four bits

are assigned to monitor different results of previous instructions.

These bits are set as follows:

(

z

if the result was zero

N

if the result was negative

C

if the operation resulted in a carry from
the most significant bit

v -- if the operation resulted in an arithmetic

(

overflow
The T bit is used in program debugging and can be set or
cleared under program control.

If this bit is set when an

instruction is fetched from memory, a processor trap will
occur at the completion of the instruction's execution.

(

II
15

14

13

12

11

10

Figure 1-2.

9

8

7

6

5

4

3

2

1

o

Processor Status Register

(
1-4

r

1.4

UNIBUS

The Unibus is a key component of the PDP-II's unique architecture.
The central Processor, memory, and all peripheral devices share
"

the same bus.

This means that device registers can be addressed

as memory, and data transfers from input to output devices can
by-pass the processor.

No special I/O instructions exist.

All

PDP-II instructions are available for I/O operations.

(

<
CENTRAL
PROCESSOR

UNIBUS

READ / WRITE
MEMORY

READ
ONLY
MEMORY

Figure 1-3

TELETYPE

PAPER
TAPE

DISK

CUSTOMER
EQUIPMENT

. ..

PDP-II system Unibus Block Diagram

(
1.5

DEVICE INTERRUPTS

Interrupt request lines provide for device interrupts at
processor priority levels 4 through 7.

Attachment of a device

to a specific line determines the device's hardware priority.
Since multiple devices can be attached to a specific line, the
priority for each is determined by position; devices closer to the
Central Processor have higher priority.

Direct memory devices, such as disk units, transfer data at the
Non-Processor Request level (NPR)

which has a higher priority

than the interrupt request lines.

Data transfers between such

devices and core memory are overlapped with Processor operations.

1-5

Peripheral device interrupts are linked to specific core memory

(-/

locations, or "interrupt vectors", in such a way that device
polling is eliminated.

When an interrupt occurs, the interrupt

vector supplies a new Processor Status word (i.e., new contents for
the Processor Status register) and a new value for the Program
Counter.

The new PC value causes execution to start at the proper

handler at the priority level indicated by the new Status register.

1.6

(

INSTRUCTION SET

The instruction set (explained fully in the PDP-II Processor Handbook;
summarized in Appendix B of this manual) provides operations that
act upon B-bit bytes andl6-bit words.

Coupled with varying

address modes -- Relative, Index, Immediate, Register, Autoincrement,
or Autodecrement,each of which can be deferred -- more than
unique instructions are available.

(

41111

Instruction length is variable

from one to three l6-bit words, depending upon the addressing
mode(s) used.

(
1.7

ADDRESSING

Every byte has its own unique address.

It is the instruction which

determines whether 8-bit bytes or l6-bit words are being referenced.
Words are addressed by their low-order (even-numbered) byte.
Although byte addressing can be to odd- or even-numbered
addresses, referencing words at odd-numbered addresses is illegal.
Bits are numbered from ° at the lowest order bit (2°), to 15 (for
a word) or 7 (for a byte) at the highest order bit (2 15 or 2 7 ).
1-6

(

Most data in programs is structured in some way; often by means of
tables consisting 6f the data itself or of addresses which point to
thed~a.

The PDP-II handles common data structures with operand address-

ing modes specifically designed for each kind of access.
(

In addition,

addressing for unstructured data permits direct random access to all
of core.

The actual formats of the modes are described in Chapter 3,

on the PAL-II Assembler.
1.7.1

(

Registers

Addressing in the PDP-II is done through the general registers.
registers can be specified by preceding a number in the range
with a %.

These

° to

7

However, it is common practice to assign to symbols the

register identities; often RO=%O, Rl=%l, etc.

Throughout this manual,

reference to RO, Rl, etc., as well as SP and PC, assumes such prior

(

direct assignment.

(See Chapter 3, Section 3.3.4.)

All eight general

registers are accessible to the programmer, but two of these have additional specialized functions (discussed below).

R6 is the processor

Stack Pointer (SP), and R7 is the Program Counter (PC).

(

To make use of a register as an accumulator, index register, or sequential
address pointer, data needs to be transferable to and from the register.
This is accomplished with Register Mode, which specifies that the instruction is to operate on the contents of the indicated register itself.
For example:

CLR R3

;CLEAR REGISTER 3 OF ITS CONTENTS

(
1-7

1.7.2

Address Pointers

(--

The instruction can be made to interpret the register contents
as the address of the data to be operated upon, by specifying that
Register Mode be deferred.

For example, if register 3 contains 1000

CLR (R3)

or

will clear the address 1000.

CLR

@R3

Moreover, if it is desired to perform

the instruction successively upon data at sequential addresses (i.e.,
in a table), Autoincrement Mode can be selected.

This will auto-

(

matically increment the contents of the register, after its use as a
pointer to the next sequential byte or word address.

Note that Auto-

increment Mode (as well as Autodecrement Mode, mentioned below) is
automatically deferred one level to cause the register contents to
function as a pOinter.

(

When it is specified that Autoincrement Mode be deferred, it is deferred two levels so that the instruction interprets the autoincremented
sequential locations as a table of addresses rather than as a table of
data, as in nondeferred Autoincrement Mode.

The instruction then

(

operates upon the data at the addresses specified by the table entries.

Each execution of the following ADD instructions increments the value
of the register contents by two, to the next word address

(always an

even number).
ACCUM:

ADD

(R~)+,

(Rl)+

;IF R~ INITIALLY CONTAINS l~~~,
;AND Rl INITIALLY CONTAINS 145~,
;THE VALUES AT LOCATIONS l~~~,
; l~~ 2 , ETC., ARE ADDED TO THOSE AT
;LOCATIONS 145~, 1452, ETC., AND
;THE RESULT STORED AT 145~, ETC.

JMP ACCUM
1-8

(

ACCUM:

ADD @ (R3) +, R2

iIF R3'INITIALLY CONTAINS l~~~,
iAND LOCATION l~~~ CONTAINS 342~,
iTHE VALUE AT LOCATION 342~ IS
iADDED TO THE CONTENTS OF R2 AND
iTHE RESULT IS STORED THERE. AT
iNEXT EXECUTION OF THE INSTRUCiTION, R3=1~~2.

JMP ACCUM
Byte instructions (such as TSTB (R2)+) using Autoincrement
Mode, increment the register contents by one.

In addition to this capability of incrementing a register's

(

contents after their use as a pointer, an address mode complementary to this exists.

Autodecrement Mode decrements the contents

of the specified register before the contents are used as a
pointer.

This mode, too, can be deferred an additional level if

the table contains addresses rather than data.

(
1. 7.3

Stack Operations

Both Autoincrement

(

and Autodecrement Modes are used in stack

operations.

Stacks, also called push-down or LIFO (Last-In-

First-Out)

lists, are important for temporarily saving values

which might otherwise be altered.

Their ·characteristic is that

the most recent piece of data saved is the fi'rst to be restored.
The PDP-II processor makes use of stack structure to save and
restore the state of the machine on interrupts, traps, and subroutines (see below).

To save, data is "pushed" onto a stack

by autodecrementing the contents of a register (e.g., MOV R3,-(R6))i
to restore, data is "popped" from a stack by autoincrementing

(

(e.g., MOV (R6)+,R3).

The register being used as the Stack

Pointer always points to the top word of the stack.
1-9

ME~~:~ { ____
1. AN EMPTY.
STACK

2. PUSHING A
DATUM ONTO
THE STACK

E2

E2

~

/

BE

EO

EO

4. ANOTHER
PUSH

Figure

1.7.4

1-4.

5. POP

3. PUSHING ANOTHER
DATUM ONTO THE
STACK
E3

~
EO

6.PUSH

E3

I

8t3
EO

7. POP

t.

Illustration of Push and Pop Operations

(

Random Access of Tables

Direct access to an entry in the middle of a stack, or indeed
any kind of table, is

accomplished through Index Mode.

The

contents of a register are added to a base (fetched from the
word or second word following the instruction) to calculate an
address.

(

with this facility, a fixed-order element of several

tables, or several elements of a single table may be accessed.

TABLE OF WORDS
TBL1:

addresses e.g. , i f R3
of entries
contains

I 4- TBLl

TBL1+2
'- TBL1+4
Eo- TBL1+6
4- TBLl + 1[1
f-

Operand code is:

[I

2
4
6

(

TBLl (R3)
in each case

1[1

·
·

·

.<>.

When d'ef'-er'red Index Mode is specified (e.g., @TBL1(R3», the
calculated address contains a pointer to the data, rather than
the data itself.

Byte tables are discussed in Section 1.8.

1-10

(

r

1.7.5

Summary of Address Modes

The address modes may now be summarized as follows:
(

Non-deferred Modes

Assembler
Syntax

(

Mode

Typical Use

(Rn) +

Register
Autoincrement

Accumulator
Sequential pointer to data
in a table; popping data
off a stack

-(Sn)

Autodecrement

A(Rn)

Index

Sequential pointer to data in
a table; pushing data on a stack.
Random access to stack or
table entry.

Rn

(
Deferred Modes

Assembler
Syntax

(

Mode

Typical Use

@iRn or (Rn)
@(Rn)+

Deferred R~gister
Deferred Autoincrement

@- (Rn)

Deferred Autodecrement

Pointer to an address
Sequential pointer to addresses
in a table; popping address
pointers off a stack.
Sequential pointer to addresses
in a table; pushing address
pointers on a stack
Random access to table of
address pointers.

Deferred Index

1.7.6

Accessing Unstructured Data.

Addressing of unstructured data becomes greatly facilitated through

1-11

the use of the Program Counter (R7)
these modes.

as the specified register in

This is particularly true of Autoincrement and Index

Modes,which are mentioned below, but discussed more fully in Chapter 3,
the PAL-II Assembler.

Autoincrement Mode using R7 is the way immediate data is assembled.
This mode causes the operand itself to be fetched from the word (or
second word) following the instruction.

It is designated by preceding

a numeric or symbolic value with #, and is known as Immediate Mode.

(

The instruction
ADD #5,0,R3
causes the value 5.0 8 to be added to the contents of register 3.
If the # is preceded by @, the immediate data is interpreted as an

(

absolute address, i.e., an address that remains constant no matter
where in memory the assembled instruction is executed.

Index Mode using

R,7

is the normal way memory addresses are assembled.

This is relative addressing because the number of byte locations between
the Program Counter (which contains the address of the current word+2)

C

and the data referenced (destination minus PC) is placed in the word (or
second word) following the instruction.
by R7 (the Program Counter).

It is this value that is indexed

((Destination-PC)+PC=Destination.)

Relative

Mode is designated by specifying a memory location either numerically or
symbolically (e.g., TST 1.0.0 or TST A).

If a memory address specifica-

tion is preceded by @, it is in deferred Relative Mode and the contents
of the location are interpreted by the instruction as a pOinter to the

(

address of the data.

1-12

r

1.8

INSTRUCTION CAPABILITY

The twelve ways of specifying an operand demonstrate the
flexibility of the PDP-II in accessing data according to how it
is structured, and even if it is not structured.
k

Each instruc-

tion adds to this versatility by acting on an operand in a way
particularly suited to its task.

For example, the task of

adding, moving, or comparing implies the use of two operands in

(

any of the twelve addressing forms; whereas the task of clearing,
testing, or negating implies only one operand.

ADD #12,GROUP(R2)
MOV MEMl, MEM2
CMP (R4)+,VALUE

Examples:

CLR R3
TST SUM
NEG @- (R5)

(
Some instructions have counterparts which operate on byte data
rather than on full words.

These byte instructions are easily

recognized by the suffixing of the letter B to the word instruction.

(

MOV is one such word instruction; e.g., MOVB #12,GROUP(R2)

would move an 8-bit value of 128 to the 8-bit byte at the address
specified.

One implication of byte instructions is that in

Autoincrement or Autodecrement Mode, a table of bytes is being
scanned.

The Autoincrement or Autodecrement therefore goes by

one in byte instructions, rather than by two.

However, because

of their specialized processor functions, R6 and R7 in these
modes always increment or decrement by two.

(
1-13

Forms other than single- or double-operand instructions include

(I

Operate instructions such as HALT and RESET, which take no
operands; Branch instructions, which transfer program control
under specified conditions (see Section 3.7); Subroutine calls
and returns; and Trap instructions (see Appendix B for complete
instruction set).

1.9

PROCESSOR USE OF STACKS

Because of the nature of last-in-first-out data structures, the

(

same stack can be used to nest multiple levels of interrupts,
traps, and subroutines.

1.9.1

Subroutines

In Subroutine calls (JSR Reg,Dest) the contents of the specified
register are saved on the stack (the processor always uses R6
as its Stack Pointer) and the value of the PC (return address
following subroutine execution) becomes the new value of the
register.

(

This allows any arguments following the call to be

referenced via the register.

The command RTS Reg causes the

return from the subroutine by moving the register value into the
PC.

It then pops the saved register contents back into the

register.

(Return from a subroutine is made through the same

register that was used in its call.)

1.9.2

Interrupts

(
When the processor acknowledges a device interrupt request, the
1-14

r

device sends an interrupt vector address to the processor.

The

processor then pushes the current Status (PS) and PC onto the
stack and picks up a new PS and PC (the interrupt vector) from
the address speclfied by the device.

Another acknowledged interrupt

before dismissal will cause the PS and PC of the running device
service routine to be pushed onto the stack and the address and
status of the new service routine to be loaded into the PC and PS.
A process can be resumed by popping the old PC and PS from the Stack
into the current PC and PS with the Return from Interrupt (RTI)

(

instruction.

1.9.3

(

Traps

Traps are processor generated interrupts.

Error conditions,

certain instructions, and the completion of an instruction fetched
while the T bit was set cause traps.

As in interrupts, the

current PC and Status are saved on the stack and a new PC and
Status are loaded from the appropriate trap vector.

(

tion

The instruc-

RTIprovides for a return from an interrupt or trap by

popping the top two words of the stack back into the PC and PS.

(
1-15

rl

O~

1. PROCESS 0 IS
RUNNING STACK
POINTER (SP)
POINTING TO
LOCATION PO.

400

SP-PO
PROGRAM

o
4. PROCESS'
INTERRUPTED
400
WITH PC=PC,
AND STATUS= PS,.
PROCESS IS
STARTED.

PCl
PSl
TEl

2.INTERRUPT STOPS

TEO

0,.....--...,

PROCESS 0 WITH
400~---I
PC=PCO AND
STATUS = PSO
STARTS PROCESS 1.
SPPCO
PSO

PO~---I

PROGRAM·

3.PROCESS , USES
0
STACK FOR
400
TEMPORARY
STORAGE !TEO. TE,).
SP'"

PSO
PO PROGRAM

~PROCESS 2

0

COMPLETES WITH 400
A RTI INSTRUCTION
(DISMISSES
INTERRUPTI.
PC IS RESET
SPTO PC, AND
STATUS IS RESET
TO PS,.
PROCESS 1 RESUMES.

(
TEl
TEO
PCO
PSO

PO PROGRAM
TEl
TEO
PCO

PO

PCO

PSO
PROGRAM

0 - - -...

6.PROCESS 1

RELEASES THE
400 I---~
TEMPORARY
STORAGE HOLDING
TEO AND TEl.
SPPCO

(

PSO
PO PROGRAM
7. PROCESS' COMPLETES
ITS OPERATION WITH A

RTI.

O~

400

PC IS RESET TO PCO
AND STATUS IS
SP-PO
RESET TO PSO·
PROGRAM
PROCESS 0 RESUMES.

Figure 1-5.

1.10

(

Nested Device Servicing

PAPER TAPE SYSTEM SOFTWARE

The paper tape system and utility programs described herein require
at least 4K of COre memory (except for the 8K version of the
PAL-llA Assembler) and an ASR-33 Teletype.

1-16

(

~

An optional high-'-speed paper-tape reader and punch is available,
as is a line printer. The operation of these input/output devices
is explained in Chapter 2.
Following are abstracts of the paper-tape software programs described in this handbook.
1.

Bootstrap Loader -- used to load into core memory,
programs punched on paper tape in bootstrap format.

\-

It is primarily used to load the Absolute Loader and
Dump programs (see Chapter 6).
2.

(

Absolute Loader -- used to load into core memory,
programs punched on paper tape in absolute binary
format.

This not only includes the binary tapes of

subsequently listed programs but also any user program
assembled using the PAL-IIA Assembler or dumped by

(

the DUMPABprogram (see Chapter 6).
3.

PAL-IIA -- the absolute assembler for PDP-II Paper
Tape Software system (see Chapter 3).

4.

ED-II -- the text editor for the PDP-II Paper Tape
Software system.

It is primarily intended for use

in producing source program tapes, but may be used

(

for any text generating and editing purposes (see
Chapter 4).
5.

ODT-ll and ODT-IIX -- these are on-line debugging
programs, enabling you to check out any object program.
You can run all or any portion of an object program,
and make corrections or modifications to it by typing
commands to ODT while at the Teletype (see Chapter 5).

(
1-17

6.

lOX -- which stands for Input/Output Executive, provides asynchronous I/O service for Teletype I/O devices and the highspeed paper tape reader and punch.
line printer.)

(IOXLPT allows also for a

It enables you to write simple I/O requests

specifying devices and data forms to accomplish interruptcontrolled data transfer concurrently with the execution of a
running user program.

It is an integral part of PAL-IIA and

ED-II (see Chapter 7).

7.

FPMP-ll--which stands for Floating-Point and Math Package,

(

PDP-II, is a comprehensive set of subroutines which enable
you to perform arithmetic operations.

The subroutines may

be used by any PDP-II object program (see Chapter 8 for overview).

8.

DUMPTT and DUMPAB -- are core dump programs which provide
dumping of specified areas of core either in octal on the
Teletype or in absolute binary on paper tape (see Chapter 6).

(

1-18

CHAPTER 2
THE SYSTEM CONFIGURATION

PDP-ll CONSOLE
2.1
Elements of the Console
2.1.1
2.1.1.1
Register Displays
2.1.1.2
Switch Register
Indicator Lights
2.1.1.3
2.1. 2
Operating the Control Switches

2-1
2-1
2-2
2-2
2-3
2-4

OPERATING THE TELETYPE
2.2
2.2.1
Power Controls
2.2.2
Printer
Keyboard
2.2.3
Paper Tape Reader
2.2.4
2.2.5
Paper Tape Punch

2-6
2-6
2-6
2-7
2-7
2-8

OPERATING THE HIGH-SPEED PAPER TAPE READER
AND PUNCH
2.3.1
Reader Unit
2.3.2
Punch Unit

2-8

2.4

THE LPll LINE PRINTER

2-10

2.5

INITIALIZING THE SYSTEM

2-12

2.3

2-i

2-9
2-9

CHAPTER 2
THE SYSTEM CONFIGURATION
This chapter explains the operation of the computer console, Teletype,
high-speed reader/punch, and line printer.
2.1

PDP-II CONSOLE

The PDP-II console is designed to achieve convenient control of the system.
Through switches and keys on the console, programs and information can be
manually inserted or modified.
computer at all times.

Indicator lamps display the status of the

The PDP-II console is shown in Figure 2-1, and each

switch, key, and display lamp is explained below.

(

Idlilsliltlalll

I

I

~

<$iJ;D.-""""COId:lon·.......,.,admassac:"'*'"

RUN

AOOR£SS REGISTER

i

i

i

i

i

i

i

i

i

i

i

i

i

i

I

SOlIRCE

DATA

i

'"

~W[R

lr-~

PANEl..
lOCI(

"

16

"

,.

" " "

,.

•

I

IT H RE I

B

7

R

• •

4

•

2

, •

....

LOAD

co.,

I I I I I I I I I I I I I II
Figure 2-1.

i

c:::c:::l

i

c::::::J

ADORESS

DESTINATION

i

EXAM

FETCH EXEC

BU'

i

'= ~
"~,

START

EJ

The PDP-II Console

(0.
2.1.1

Elements of the Console

The console has the following indicators and switches:
1.

A bank of eight indicators, indicating the following conditions or operations:
a.
b.
c.
d.
e.
f.

g.

Fetch
Execute
Bus
Run
Source
Destination
Address (two bits)

(
2-1

2.

An lS-bit ADDRESS REGISTtR display

3.

A l6-bit DATA Register display

4.

An lS-bit Switch Register

5.

Control Switches:
a.
b.
c.
d.
e.
f.
g.

:2. L 1.1

r)

LOAD ADDR (Load value set in switch Register into
address register)
(Examine contents of location)
EXAM
CONT·
(Continue execution)
ENABLE/
(Enable or halt execution)
HALT
S-INST/
(Single Instruction-Single
Cycle execution)
S-CYCLE
(Start execut1on)
START
DEI'
(D~posit valu~ set in f}wit9lJ: ~egister
1nto specif1ed memory locat1on)

Register Displays

The operator's console has an IS-bit ADDRESS REGISTER display and a l6-bit
DATA Register display. The ADDRESS REGISTER display is tied directly to
the output of an lS-bit flip .... flop register called the Bus Address Register.
This register displays the address of data examined or deposited.
2.1.1.2

( _/

Switch Register

The PDP-II is capable of referencing l6-bit addresses. However, the Unibus
has expansion capability for IS-bit addresses. Therefore, to access the
entire IS-bit address scheme; the Switch Register is IS-bits wide. These
bits are assigned as 0 through 17. The highest two bits are used only for
addressing.
A switch in the ~ position is considered to have a 1 value. A switch
in the down position is considered to have a 0 value. The condition of the
switches can be loaded into the ADDRESS REGISTER or any memory location
using the appropriate control switch described below.
1.

LOAD ADDR

Transfers the contents of the IS-bit
Switch Register into the ADDRESS REGISTER.

2.

EXAM

Displays the contents of the location
specified by the ADDRESS REGISTER.

2-2

(

3.

DEP

Deposits the contents of the low-order
l6-bits of the Switch Register into
the address displayed in the ADDRESS
REGISTER~
(This switch is actuated by
raising it.)

4•

ENABLE/HALT

Allows or prevents running of programs.
For a program to run, the switch must
be in the ENABLE position (~p). Placing
the switch in the HALT position (down)
will halt the system at the end of the
current instruction or cycle, depending
on the position of the S-INST/S-CYCLE
switch.

5.

START

Begins execution of a program when the
ENABLE/HALT switch is in the ENABLE
position. When the START switch is depressed it asserts a system initialization signal, actually starting the system when the switch is released. The
processor will start executing at the'
actdress which was last loaded by the
LOAD ADDR 'switch.

(

6.

CON'r

Allows the computer to continue without initialization from whatever state
it was in when halted.

7.

S-INST/S-CYCLE

Determines whether a single instruction
or a single cycle is performed when the
CONT switch is depressed while the COmputer is in the halt moge.

When the system is running a program, the LOAD ADDR, EXAM, and Dl!lPosit
functions are disabled to prevent disrupting the running program.

(

2.1.1. 3

r

Indicator Li2hts

The indicator lights signify specific
states. Each is .explained below.

functions, operations, or

1-

fETCH

Indicates that the central processor is
in the state of fetching an instruction.

2.

EXECUTE

Indicates that the central procesSOr is
in the state of exec~ting an instruction.

3.

BUS

Indicates that a peripheral is controllingthe bus. It is lit when Bus Busy (BBSY)
is asserted, unless the processor (incl~g­
ing the console) is asserting BBSY.

-<0

C.

comp~ter

2-3

4.

RUN

.Indicates that the processor is running.
(While executing a RESET command [20 ms.]
the RUN light is not on.)

5.

SOURCE

Indicates that the central processor is
obtaining source data.
(Not lit when
data is from an internal register.)

6.

DESTINATION

Indicates that the central processor is
obtaining destination data.
(Not lit
when data is from an internal register.)

7.

ADDRESS

Identifies the source or destination address cycle of the central processor.
When references to the addresses are made
via the Unibus, the lights tell the computer's source or destination cycle. For
an internal register reference, the address
is always zero.

2.1.2

(-

(

Operating the Control Switches

When the PDP-II has been halted at the end of an instruction, it is possible
to examine and update the contents of locations.

(You cannot EXAMine or

DEPosit at the end of a single cycle unless the cycle coincides with the
end of the instruction.)
To examine a specific location, set the Switch

(

Register to correspond to the location's address, and press LOAD ADDR,
which will transfer the contents of the Switch Register into the ADDRESS
REGISTER.

The location of the address to be examined is then displayed

in the ADDRESS REGISTER.

You can then depress EXAM, and the data in that

location will appear in the DATA register.
If you attempt to examine data from or deposit data into a nonexistent

(

memory location, an error will occur and the DATA register will reflect
location 000004, the trap location for references to nonexistent locations.
To verify this condition, deposit some number other than four in the location.

If four is still indicated, either nothing is assigned to that loca-

tion or whatever is assigned is not working properly.
By depressing EXAM again, the ADDRESS REGISTER will be incremented by
two to the next word address, and the contents of this next location may be
examined.

The ADDRESS REGISTER will always indicate the address of the

data displayed in the DATA register.

(
"

2-4

-------

~

~

-~-.~

-~~--~

~~~-

~~

-

-

The examine function is such that if LOAD ADDR is depressed and then
EXAM, the ADDRESS REGIST~R will not be incremented. In this case, the
location reflected in the ADDRESS REGISTER is examined directly. However,
on successive depressings of EXAM only, the ADDRESS REGISTER is incremented.
If you find an incorrect entry in the DATA register, you can enter the
correct data there by putting it in the Switch Register and raising the
DEP switch. The ADDRESS REGISTER will not increment when this data is
deposited. Therefore, by pressing the EXAM switch you can examine (verify)
the data just deposited. However, pressing EXAM again will increment the
register to the next word address.
When doing consecutive examines or deposits, the address will incrementby two, to successive word locations. However, when examining the
general-purpose registers (RO-R7), the system only increments by one.
The reason for this is that once the Switch Register is set properly, you
can use the automatic stepping feature of EXAM to examine general-purpose
registers from the computer console.

(

(

To start a program after it is loaded into core, load the starting
address of the program into the Switch Register, press LOAD ADDR, and
after ensuring that the ENABLE/HALT switch is in the ENABLE position, depress START. The program should start to run as soon as the START switch
is released.

(

Normally, when the system is running, not only will the RUN light be
on but other lights (FETCH, EXECUTE, SOURCE, etc.) will be flickering. If
the RUN light is on and none of the other lights are flickering, the system
could be executing a WAIT instruction which waits for an interrupt.
r

(

While in the halt mode, if you wish to do a single instruction, place
the S-INST/S-CYCLE switch in the S-INST position and depress CaNT. When
CaNT is pressed, the console momentarily passes control to the processor,
allowing it to execute one instruction before regaining control. Each time
the CaNT switch is pressed the computer will execute one instruction. If
you wish to have the computer perform a single cycle; place the S-INST/SCYCLE switch in the S-CYCLE position and press CaNT. The computer will
then perform one complete cycle and halt.

2-5

To start the program again, place the ENABLE/HALT switch in the ENABLE
position and press CONT.
2.2

Ci

OPERATING THE TELETYPE

The ASR-33 Teletype (TTY) is the basic input/output device for PDP-II computers.

It consists of a prInter, keyboard, paper tape reader, and paper

tape punch, all of which can be used either on-line under program control or
off-line.

The Teletype controls (Figure 2-2) are described as they apply

to the operation of the computer.

(

OFF

REL.

B. SP.

ON

START STOP FREE -

c
OFF

LINE

Figure 2-2.

2.2.1

2.2 ..2

0

LOCAL

(TTY switch)
ASR-33 Teletype Console

(

Power Controls
LINE

The Teletype is ene~gized and connected to
the computer as an input/output device, under
computer control.

OFF

The Teletype is de-energized.

LOCAL

The Teletype is energized for off-line operation.

Printer

The printer provides a typed copy of input and output at 10 characters per
second, maximum.

2-6

2.2.3
(~
... -

Keyboard

The Teletype keyboard is similar to a typewriter keyboard.

However, cer-

tain operational functions are shown on the upper part of some of the keytops.

These functions are activated by holding down the CTRL key while

depressing the desired key.

For example, when using the Text Editor,

CTRL/U causes the current line of text to be ignored.
Although the left and right square brackets are not visible on the
keyboard key tops, they are shown in Figure 2-3 and are generated by typing
SHIFT/K and SHIFT/M, respectively.

The ALT MODE key is identified as ESC

(ESCape) on some keyboards.

(DCDC)(DG)C)OG)G)G)C)C)®

(

@G)Qcv(f)Ci?OQCV~®@@

8Qe?GJCVeBQOCDctJc)®88
8QG)G)QG)(DCDc)c)CD8
SPACE

(
Figure 2-3.
2.2.4

ASR-33 Teletype Keyboard

Paper Tape Reader

The paper tape reader (LSR) is used to read data punched on eight chan-

(

nel

perforated paper tape at a rate of 10 characters per second, maxi-

mum.

The reader controls are shown in Figure 2-2 and described below.
START

Activates the reader; reader sprocket wheel
is engaged and operative.

STOP

Deactivates the reader; reader sprocket wheel
is engaged but not operative.

FREE

Deactivates the reader; reader sprocket wheel
is disengaged.

The following procedure describes how to properly position paper tape
in the low-speed reader.

(

a.

Raise the tape retainer cover.

2-7

2.2.5

b.

Set reader control to FREE.

c.

Position the leader portion of the tape over the read
pens with the sprocket (feed) holes over the sprocket
(feed) wheel and with the arrow on the tape (printed
or cut) pointing outward.

d.

Close the tape retainer cover.

e.

Make sure that the tape moves freely.

f.

Set reader control to START, and the tape will be read.

Paper Tape Punch

IThe paper tape punch (LSP) is used to perforate eight-channel rolled
oiled paper tape at a maximum rate of 10 characters per second.

The

punch controls are shown in Figure 2-2 and described below.
RELease

Disengages the tape to allow tape removal or
loading.

B.SP

Backspaces the tape one space for each firm
depression of the B.SP button.

ON (LOCK ON)

Activates the punch.

OFF (UNLOCK)

Deactivates the punch.

(

(

Blank leader/trailer tape is generated by:

2.3

1.

Turning the TTY switch to LOCAL

2.

Turning the LSP on

3.

Typing the HERE IS key

4.

Turning the LSP off

5.

Turning the TTY switch to LINE.

(

OPERATING THE HIGH-SPEED PAPER TAPE READER AND PUNCH UNITS

A high-speed paper tape reader and punch unit is pictured in Figure 2-4
and descriptions of the reader and punch units follow.

(
2-8

r

2.3.1

Reader Unit

The high-speed paper tape reader is used to read data from eight-channel
fan-folded (non-oiled) perforated paper tape photoelectrically at a maximum rate of 300 characters per second.

Primary power is applied to the

reader when the computer POWER switch is turned on.
program control.
(

The reader is under

However, tape can be advanced past the photoelectric

sensors without causing input by pressing the reader FEED button.

2.3.2

Punch Unit

The high-speed paper tape punch is used to record computer output on eightchannel fan-folded paper tape at a maximum rate of 50 characters per second.
(

All characters are punched under program control from the computer.

Blank

tape (feed holes only, no data) may be produced by pressing the FEED button.
Primary power is available to the punch when the computer POWER switch is
turned on.

c
FEED
ON LINE
FEED

(
PAPER TAPE

Figure 2-4.

r

OFF LINE

High-Speed Paper Tape Reader/Punch

Paper tape is loaded into the reader as explained below.

(

1.

Raise tape retainer cover.

2.

Put tape into right-hand bin with channel one of
the tape toward the rear of the bin.

3.

Place several folds of blank tape through the
reader and into the left-hand bin.
2-9

4.

Place the tape over the reader head with feed
holes engaged in the teeth of the sprocket wheel.

5.

Close the tape retainer cover.

6.

bepress the tape feed button until leader tape is
over the reader head.
CAUTION
Oiled paper tape should not be used
in the high-speed reader or punch oil collects dust and dirt which can
cause reader or punch errors.

2.4

THE LPll LINE PRINTER

The LPll is a line printer with 80 column capacity, capable of printing
(
more than 300 lines per minute at a full 80 columns, and more than 1100
lines per minute at 20 columns. The print rate is dependent upon the data
and the number of columns to be printed.
Characters are loaded into the printer memory via the Line Printer
Buffer (LPB) serially. When the memory becomes full (20 characters) the
characters are automatically printed. This continues until the 80 columns (
have been printed or a carriage return, line feed, or form feed character
is recognized.
Figure 2-5 illustrates the printer control panel on which are mounted
three indicator lights and three toggle switches.

(

•

El E1

•

ON LINE

0
TOP
OF
FORM

Figure 2-5.

8
PAPER
STEP

OFF LINE

Line Printer Control Panel
2-10

(

Operatian af the lights and switches is as fallaws:
(~.

POWER light

Glaws red to' indicate main pawer switch
(lacated inside cabinet) is at ON pasitian and pawer is available to' the printer.

READY light

Glaws white, shartly after the POWER light
gaes an to' indicate that internal campanents have reached synchranaus state and
the printer is ready to' aperate.

ON LINE light

Glaws white to' indicate that ON LINE/OFF
LINE taggle switch is in ON LINE pasitian.

ON/OFF (main pawer) switch

(

This switch cantrals line current to' the
printer. TO' gain access to' it, the printer
frant panel is unlatched, by pushing the
circular buttan an the right hand edge,
and ape ned to' the left an its hinges.
The
switch is lacated to' the left af center
appraximately faurteen inches belaw the
tap.
If pawer is available, the red POWER
light an the cantral panel will glaw when
the switch is pasitianed at ON.

(

The switch is an when in the up pasitian.
The ON and OFF labels are printed an the
stem af the switch. A graup af twa switches
and three indicatar lights, abave the main
power switch, are far the use af technicians in making initial adjustments to' the
printer.
TOP OF FORM switch

This switch is tipped taward the frant af
the cabinet to' raIl up the farm to' the tap
af the succeeding page.
It is spring returned to' center pasitian, and praduces a
single tap-af-farm aperatian each time it
is actuated.
The switch is effective anly
when the printer is aff line.

PAPER STEP switch

Operates similarly to' TOP OF FORM but praduces a single line step each time it is
actuated.
It is anly effective with
printer aff line.

ON LINE/OFF LINE switch

This twa-pasitian taggle switch is springreturned to' center.
When mamentarily pasitianed at ON LINE it lagically cannects the
printer to' the camputer and causes the ON
LINE light to' glaw.
Pasitianed mamentarily
at OFF LINE, the lagical cannectian to' the
camputer is braken, the ON LINE light gaes
aff, and the TOP OF FORM and PAPER STEP
switches are enabled.

(
\

(

2-11

2.5

INITIALIZING THE SYSTEM

Before using the computer system, it is good practice to initialize all units ~)
as specified below.
a.

Main power cord is properly plugged in

b.

Computer POWER key is ON

c.

Console switches are set:
ENABLE/HALT to HALT
SR=OOOOOO

d.

Teletype is turned to LINE

e.

Low-speed punch is OFF

f.

Low-speed reader is set to FREE

g.

High-speed reader/punch is ON

(

The system is now initialized and ready for your use.

(

(

.~.

(

CHAPTER 3
WRITING PAL-llA
ASSEMBLY LANGUAGE PROGRAMS
3.1

3-2

CHARACTER SET

STATEMENTS
3.2
Label
3.2.1
3.2.2
Operator
Operand
3.2.3
Comments
3.2.4
Format Control
3.2.5

3-2
3-3
3-3
3-4
3-5
3-5

SYMBOLS
3.3
Permanent Symbols
3.3.1
User-defined Symbols
3.3.2
Direct Assignment
3.3.3
Register Symbols
3.3.4

3-5
3-6
3-6
3-6
3-7

EXPRESSIONS
3.4
3.4.1
Numbers
Arithmetic and Logical Operators
3.4.2
ASCII Conversion
3.4.3

3-8
3-9
3-9
3-10

3.5

ASSEMBLY LOCATION COUNTER

ADDRESSING
3.6
3.6.1
Register Mode
Deferred Register Mode
3.6.2
Autoincrement Mode
3.6.3
Deferred Autoincrement Mode
3.6.4
Autodecrement Mode
3.6.5
Deferred Autodecrement Mode
3.6.6
Index Mode
3.6. 7
Deferred Index Mode
3.6.8
Immediate and Deferred Immediate Modes
3.6.9
3.6.10 Relative and Deferred Relative Modes
3.6.11 Table of Mode Formats and Codes
3.7

INSTRUCTION OPERAND FORMS

ASSEMBLER DIRECTIVES
3.8
.EOT
3.8.1
. EVEN
3.8.2
.END
3.8.3
.WORD
3.8.4
.BYTE
3.8.5
.ASCII
3.8.6
OPERATING PROCEDURES
3.9
Introduction
3.9.1
Loading PAL-llA
3.9.2
Initial Dialogue
3.9.3
Assembly Dialogue
3.9.4
Assembly Listing
3.9.5
3.10

ERROR CODES

3.11

SOFTWARE ERROR HALTS

3-10
3-11
3-12
3-13
3-13
3-14
3-14
3-14
3-15
3-15
3-15
3-16
3-17
3-18
3-19
3-19
3-20
3-20
3-20
3-21
3-22

3-22
3-22
3-23
3-23
3-29
3-31
3-32
3-33

3-i

CHAPTER 3
WRITING PAL-ILA ASSEMBLY LANGUAGE PROGRAMS
PAL-llA (Program Assembly Language for the PDP-II's Absolute Assembler) is
the "heart" of the PDP-ll/20 Paper Tape Software system.

It enables you

to write source (symbolic) programs using letters, numbers, and symbols
(

which are meaningful to you.

The source programs, generated either on-

line using the Text Editor (ED-II), or off-line, are then assembled into
object programs (in absolute binary) which are executable by the computer.
The object program is produced after two passes through the Assembler; an
optional third pass produces a complete octal/symbolic listing of the assembled program.

(~I

This listing is especially useful for documentation and

debugging purposes.
This chapter explains not only how to write PAL-llA programs but
also how to assemble the source programs into computer-acceptable object programs.

All facets of the assembly language are explained and

illustrated with many examples, and the chapter concludes with assembling procedures.

(~~,':'

In explaining how to write PAL-llA source programs

i t is necessary, especially at the outset, to make frequent forward
references.

Therefore, we recommend that you first read through the

entire chapter to get a "feel" for the language, and then reread the
chapter, this time referring to appropriate sections as indicated, for
a thorough understanding of the language and assembling procedures.
Some notable features of PAL-llA are:
1.

Selective assembly pass functions

2.

Device specification for pass functions

3.

Optional error listing on Teletype

4.

Double buffered and concurrent I/O (provided py lOX)

5.

Alphabetized, formatted symbol table listing

The PAL-llA Assembler is available in two versions:

a 4K version and

an 8K version.
The assembly language applies equally to both versions.

The 4K ver-

sion provides symbol storage for about 176 user-defined symbols, and the
8K version provides for about 1256 user-defined symbols (see Section 3.3).
3-1

In addition, the 8K version allows a line printer to be used for the program listing and/or symbol table listing.
The following discussion of the PAL-llA Assembly Language assumes
that you have read the PDP-II Processor Handbook, with emphasis on those
sections which deal with the PDP-II instruction set, formats, and timings -- a thorough knowledge of these is vital to efficient assembly
language programming.
3.1

CHARACTER SET

A PAL-llA source program is composed of symbols, numbers, expressions,
symbolic instructions, assembler directives, argument separators, and line
terminators written using the following ASCII l characters.
1.

The letters A through Z.
(Upper and lowercase letters
are acceptable, although upon input, lower case letters
will be converted to upper case letters.)

2.

The numbers 0 through 9.

3.

The characters

4.

The separating or terminating symbols:
:

=

% # @ ( )

. and
,

carriage return

3.2

$ (reserved for system software) •

+ - & !
tab
space
II

(

,

line feed

form feed

STATEMENTS

A source program is composed of a sequence of statements, where each statement is on a single line. The statement is terminated by a carriage return
character and must be immediately followed by either a line feed or form
feed character. Should a carriage return character be present and not be
followed by a line feed or form feed, the Assembler will generate a Q
error (Section 3.10) and that portion of the line following the carriage
return will be ignored. Since the carriage return is a required statement
terminator, a line feed or form feed not immediately preceded by a carriage
return will have one inserted by the Assemb1er.
It should be noted that, if the .Editor (ED-II) is being used to create
the source program (see Section 4.4.4), a typed carriage return (RETURN
lASCII stands for American Standard Code for Information Interchange.
3-2

(

,..

!

key) automatically generates a line feed character.
A statement may be composed of up to four fields which are identified
by their order of appearance and by specified terminating characters as explained below and summarized in Appendix B.
Label

The four fields are:

Operand

Operator

The label and comment fields are optional.

Comment
The operator and operand

fields are interdependent -- either may be omitted ,depending upon the contents of the other.
3.2.1
(

Label

A label is a user-defined symbol (see Section 3.3.2) which is assigned the
value of the current location counter.

It is a symbolic means of referring

to a specific location within a program.

If present, a label always occurs

first in a statement and must be terminated by a colon.

For example, if

the current location is 100S' the statement
ABCD:

(

MOV A,B

will assign the value 100 8 to the label ABCD so that subsequent reference
to ABCD will be to location lOOse More than one label may appear within
a single label field; each label within the field will have the same value.
For example, if the current location is 100, multiple labels in the state"'"

(

ment
ABC:

$DD:

A7.7:

MOV A,B

will equate each of the three labels ABC, $DD, and A7.7 with the value
lOOse

($ and. are reserved for system software.)
The error code M (multiple definition of a symbol) will be generated

during assembly if two or more labels have the same first six characters.
3.2.2

Operator

An operator follows the label field in a statement, and may be an instruction mnemonic or an assembler directive (see Appendix B).

When it is an

instruction mnemonic, it specifies what action is to be performed on any
3-3

operand(s) which follows it. When it is an assembler directive, it specifies a certain function or action to be performed during assembly.
The operator may be preceded only by one or more labels and may be
followed by one or more operands and/or a comment. An operator is legally
terminated by a space, tab, or any of the following characters.
@
# +
line feed

"

%

form feed

&

carriage return

The use of each character above will be explained in this chapter.

(

Consider the following examples:
MOV A,B
MOV@A,B

;~

(TAB) terminates operator MOV
;@terminates operator MOV

When the operator stands alone without an operand or comment, it is
terminated by a carriage return followed by a line feed or form feed charac-'
ter.
3.2.3

(

Operand

An operand is that part of a statement which is operated on by the operator -- an instruction mnemonic or assembler directive. Operands may be
symbols, expressions, or numbers. When multiple operands appear within a
statement, each is separated from the next by a comma. An operand may be
preceded by an operator and/or label, and followed by a comment.

(

The operand field is terminated by a semicolon when followed by a
comment, or by a carriage return followed by a line feed or form feed
character when the operand ends the statement. For example,
LABEL:

MOV GEORGE, BOB

;THIS IS A COMMENT

where the space between MOV and GEORGE terminated the operator field and
began the operand field; the comma separated the operands GEORGE and BOB;
the semicolon terminated the operand field and began the comment.
3-4

(

3.2.4

C--

Comments

The comment field is optional and may contain any ASCII character except
null, rubout, carriage return, line feed or form feed.

All other charac-

ters, even those with special significance are ignored by the Assembler
when used in the comment field.
The comment field may be preceded by none, any, or all of the other

{

three fields.

It must begin with the semicolon and end with a carriage

return followed by a line feed or form feed character.
LABEL:

CLR HERE

For example,

;THIS IS A $1.00 COMMENT

Comments do not affect assembly processing or program execution, but

(

they are useful in program listings for later analysis, checkout or documentation purposes.
3.2.5

Format Control

The. format is controlled by the space and tab characters.

They have no

effect on the assembling process of the source program unless they are em-

(

bedded within a symbol, number, or ASCII text; or are used as the operator
field terminator.
gram.

Thus, they can be used to provide a neat, readable pro-

A statement can be written
LABEL:MOV(SP)+,TAG;POP VALUE OFF STACK

(

or, using formatting characters it can be written
LABEL:

MOV (SP)+,TAG

;POP VALUE OFF STACK

which is much easier to read.
Page size is controlled by the form feed character.
-<.

A page of n lines

is created by inserting a form feed (CTRL/FORM keys on the keyboard) after
the nth line.

If no form feed is present, a page is terminated after 56

lines,
3.3

Symbols

There are two types of symbols, permanent and user-defined.
3-5

Both are

stored in the Assembler's. symbol table.

Initially, the symbol table con-

tains the permanent symbols, but as the source program is assembled, userdefined symbols are added to the table.
3.3.1

()

Permanent Symbols

Permanent symbols consist of the instruction mnemonics {see Appendix B.3}
and assembler directives (see Section 3.8).

These symbols are a permanent

part of the Assembler's symbol table and need not be.defined before being
used in the source program.
3 •. 3.2

User-Defined Symbols

User-defined symbols are those defined as labels {see Section 3.2.l} or by
direct assignment {see Section 3.3.3}.

These symbols are added to the sym-

bol table as they are encountered during the first pass of the assembly.
They can be composed of alphanumeric characters, dollar signs, and periods

C

only; again" dollar signs and periods are reserved for use by the system
software.

Any other character is illegal and, if used, will result in the

error message I

(see Section 3.ll).

The following rules also apply to

user-defined symbols:
1.

The first character must not be a number.

2.

Each symbol

3.

A symbo.l may be written with more than six lega 1 characters
but the seventh and subsequent characters are only checked
for legality, and are not otherwise recognized by the Assembler.

4.

Spaces and tabs must not be embedded within a symbol.

~

be unique within the first six characters.

A user-defined symbol may duplicate a permanent symbol.

(

The value as-

sociated with a permanent symbol that is also user-defined depends upon its

(

use:

..

3.3.3

1

A permanent symbol encountered in the operator field is associated with its corresponding machine op-code.

2..

If a permanent symbol in the operand field is also userdefined, its user-defined value is associated with the symbol.
If the symbol is not found to be user-defined, then the corresponding machine op-code value is associated with the symbol.
Direct Assisnment

A direct assignment s'tatement associates a symbol with a value.

When a

direct assignment statement defines a symbol for the first time, that symbol is entered into the Assembler's symbol table and the specified value is
associated with it.

A symbol may be redefined by assigning a new value to

a previously defined symboL

The newly assigned value will replace the

3-6

(_

previous value assigned to the symbol.
The general format for a direct assignment statement is
symbol

= expression

The following conventions apply:

(

1.

An equal 'sign (=) must separate the symbol from
the expression defining the symbol.

2.

A direct assignment statemen't may be preceded by
a label and may be followed by a comment.

3.

Only one symbol can be defined by anyone direct
assignment statement.

4.

Only one level of forward referencing is allowed.

Example of the two levels of forward referencing (illegal):

x=Y
=Z
=1

(

Y
Z

X and Yare both undefined throughout pass 1 and will be listed on the
printer as such at the end of that pass.

X is undefined throughout pass

2, and will cause a U error message.
Examples:
1

;THE SYMBOL A IS EQUATED WITH THE VALUE 1

B

=
=

'A-l&MASKLOW

;THE SYMBOL B IS EQUATED WITH THE EXPRESiSION'S VALUE.

D

=

3

iTHE SYMBOL D IS EQUATED WITH 3. THE
iLABELS C AND E ARE EQUATED WITH THE
iNUMERICAL MEMORY ADDRESS OF THE MOV
;COMMAND.

A

C:
E:

3.3.4

(

MOV #l,ABLE

Register Symbols

The eight general registers of the PDP-II are numbered 0 through 7.

These

registers may be referenced by use of a register symbol, that is, a symbolic name for a register.

A register symbol is defined by means of a
3-7

direct assignment, where the defining expression contains at least one
term preceded by a % or at least one term previously defined as a register

(-'

symbol.
R~=%~

iDEFINE R~ AS REGISTER ~
iDEFINE R3 AS REGISTER 3
iDEFINE R4 AS REGISTER 4
iDEFINE "THERE" AS REGISTER 2

R3=R~+3

R4=1+%3
THERE=%2

It is important to note that all register symbols must be defined before
they are referenced.

A forward reference to a register symbol will gener-

aliy cause phase errors (see Section 3.10) •
The % may be used in any expression thereby indicating a reference to
a register.

Such an expression is a register expression.

Thus, the state- (

ment
CLR %6
will clear register 6 while the statement

(
CLR 6
~ill

clear the word at memory address 6.

In certain cases a register can

be referenced without the use of a register symbol or register expression.
These cases are recognized through the context of the statement and are
thoroughly explained in Sections 3.6 and 3.7.
are:
5,SUBR

JSR
CLR

3.4

X (2')

Two obvious examples of this C,'.
"

iTHE FIRST OPERAND FIELD MUST
iALWAYS BE A REGISTER.
iANY EXPRESSION ENCLOSED IN
i( ) MUST BE A REGISTER.
IN
;THIS CASE, INDEX REGISTER 2.

EXPRESSIONS

Ari thmetic and logical operators (see Section 3.4.2) may be uS,ed to form
expressions.

A term of an expression may be a permanent or user-defined

symbol, a number, ASCII data, or the present value of the assembly location counter

represen~ed

left to right.

by the period.

Expressions are evaluated from

Parenthetical grouping is not allowed.
3-8

(

r--

Expressions are evaluated as word quantities.

The 6perands of a

.BYTE directive (Section 3.8.5) are evaluated as word expressions before
truncation to the low-order eight bits.
A missing term or expression will be interpreted as O.
The error code Q

operator will be interpreted as +.
,

will be generated for a missing operator.

A +

A missing

(~uestionable

syntax)

For example,

iOPERAND MISSING

will be evaluated as A + 0 - 100, and
TAG

(

LA 177777

will be evaluated as TAG
3.4.1
~he

c

iOPERATOR MISSING
LA+177777.

Numbers

Assembler accepts both octal and decimal numbers.

sist of the digits 0 through 7 only.

o

Octal numbers con-

Decimal numbers consist of the digits

through 9 followed by a decimal point.

If a number contains an 8 or 9

and is not followed by a decimal point, the N error code (see Section 3.10)
will be printed and the number interpreted as decimal.

Negative numbers

may be expressed as a number preceded by a minus sign rather than in a two's
complement form.

Positive numbers may be preceded by a plus sign although

this is not required.

(
If a number is too large to fit into 16 bits, the number-is truncated
from the left.

In the assembly listing the statement will be flagged with

a Truncation (T) error.
3.4.2

Arithmetic and Logical Operators

The arithmetic operators are:

+

indicates addition or a positive number
indicates subtraction or a negative number

The logical operators are defined and illustrated below.
&

indicates the logical AND operation
indicates the logical inclusive OR operation
3-9

AND
f,J

&

f,J

f,J

&

1

1
1

&

f,J

&

1

OR

=
=
=
=

f,J

f,J ! f,J

f,J

~ !

f,J

1 ! f,J
1 ! 1

1

1

=
=
=
=

f,J

1
1
1
r'

3.4.3

ASCII Conversion

When preceded by an apostrophe, any ASCII character (except null, rubout,
carriage return, line feed, or form feed) is assigned the 7-bit ASCII value
of the character (see Appendix A). For example,

(

'A

is assigned the value lOIS'
When preceded by a quotation mark, two ASCII characters (not including null, rubout, carriage return, line feed, or form feed) are assigned
the 7-bi t ASCII values of· each of the characters to be used. Each 7-bi t
value is stored in an S-bit byte and the bytes are combined to form a
word. For example, 'iAB will store the ASCII value of A in the low-order
(even) byte and the value of B in the high-order (odd) byte:
high-order byte

low-order byte
I

B's value

=

1

0

(

2

0
o ~
100
001
001
000
'---v---"
'-y--J
~
04110
I

1

~,r-~r---"_~l~~

= A's value

(

'-:

3.5

ASSEMBLY LOCATION COUNTER

The period (.) is the symbol for the assembly location counter.
(Note difference of Program Counter. . ~ PC. See Section 3.6.)
When used in the
operand field of an instruction, it represents the adqress of the first
word of the instruction. When used in the operand field of an assembler
directive, it represents the address of the current byte or word. For example,
3-10

--'------

-

A:

----------------

MOV

#.,RfJ

,. REFERS TO LOCATION A, I.E.,
;THE ADDRESS OF THE MOV INSTRUCTION

(# is explained in Section 3.6.9).
At the beginning of each assembly pass, the Assembler clears the location counter.

Normally, consecutive memory locations are assigned to each

byte of object data generqted.

However, the location where the object data

is stored may be changed by a direct assignment altering the location count,

er.
,

.=expression
The expression defining the period must not contain forward references
or symbols that vary from one pass to another.

Examples:

.=5fJfJ
FIRST:

(

MQV

. +10 ,COUNT

.=52fJ
SECOND:

(

\

MOV

;THE LABEL FIRST HAS THE VALUE 500 S
;.+10 EQUALS 5l0 S . THE CONTENTS
;OF THE LOCATION 5l0 S WILL BE DE;POSITED IN LOCATION COUNT.
;THE ASSEMBLY LOCATION COUNTER NOW
;HAS A VALUE OF 520 S .
;THE LABEL SECOND HAS THE
;THE CONTENTS OF LOCATION
;THAT IS, THE BINARY CODE
;INSTRUCTION ITSELF, WILL
;IN LOCATION INDEX.

., INDEX

VALUE 520 8 •
520 S '
FOR THE
BE DEPOSITED

Storage area may be reserved by advancing the location counter.

For

example, if the current value of the location counter is 1000, the direct
assignment statement
.=.+lfJfJ
will reserve 100 8 bytes of storage space in the program.
tion will be stored at 1100.
3.6

The next instruc-

ADDRESSING

The Program Counter (register 7 of the eight general registers) always contains the address of the next word to be fetched; Le., the address of the
next instruction to be executed, or the second or third word of the current
instruction.
3-11

In order to understand how the address modes operate and how they assemble (see Section 3.6.11), the action of the Program Counter must be
understood.

The key rule is:

Whenever the processor implicitly uses the Program Counter (PC)
to fetch a word from memory, the program Counter is automatically
incremented by two after the fetch.
That is, when an instruction is fetched, the PC is incremented by two,
so that it is pointing to the next word in memorYi and, if an instruction
uses indexing (see Sections 3.6.7, 3.6.8, and 3.6.10), the processor uses
the Program Counter to fetch the base from memory.

Hence, using the rule

above, the PC increments by two, and now points to the next word.

(

The following conventions are used in this section:
a.

Let E be any expression as defined in Section 3.4.

b.

Let R be a register expression. This is any expression containing a term preceded by a % character or
a symbol previously equated to such a term.
Examples:
iGENERAL REGISTER 0
iGENERAL REGISTER 1
iGENERAL REGISTER 2

RO = %0
Rl = RO + 1
R2 = 1 + %1

c.

Let ER be a register expression or an expression in
the range 0 to 7 inclusive.

d.

Let A be a general address specification which produces a 6-bit address field as described in the
PDP-II Handbook.

The addressing specification, A, may now be explained in terms of E,
R, and ER as defined above.

Each will be illustrated with the single oper-

and instruction CLR or double operand instruction MOV.
3.6.1

Register Mode

The register contains the operand.
Format:

R

3-12

(

Example:
RO

=

jCLEAR REGISTER 0

RO

CLR
3.6.2

jDEFINE RO AS REGISTER 0

%0

Deferred Register Mode

The register contains the address of the operand.
Format:

@R or (ER)

Example:
CLR

@Rl

jCLEAR THE WORD AT THE

(1)

iADDRESS CONTAINED IN
jREGISTER 1.

or

(

CLR
3.6.3

Autoincrement Mode

The contents of the register are incremented immediately after being used
1
as the address of the operand.
Format:

(ER) +

Examples:
CLR
CLR
CLR

(RO)+
(RO+3) +
(2)+

jCLEAR WORDS AT ADDRESSES
iCONTAINED IN REGISTERS 0, 3, lND 2 AND
jINCREMENT REGISTER CONTENTS
jBY

TWO.

1

a.
Both JMP and JSR instructions using mode 2 (non-deferred Autoincrement Mode) autoincrement the register before its use.
b.
In double operand instructions of the addressing form %R,(R)+ or
%R,-(R) where the source and destination registers are the same, the
source operand is evaluated as the autoincremented or autodecremented
valuei but the destination register, at the time it is used, still contains the originally intended effective address.
For example, if Register 0 contains 100, the following occurs:
MOV
MOV

R~, (~) +
R~,-(~)

iTHE
iTHE

QUANTITY 102 IS MOVED TO LOCATION 100
QUANTITY 76 IS MOVED TO LOCATION 76

The use of these forms should be avoided, as they are not guaranteed
to remain in future PDP-ll's.

3-13

3.6.4

Deferred Autoincrement Mode

The register contains the pointer to the address of the operand.
tents of the register are incremented after being used.
Format:

The con-

~

@(ER)+

Example:
CLR

3.6.5

@(3)+

iCONTENTS OF REGISTER 3 POINT
iTO ADDRESS OF WORD TO BE CLEARED
iBEFORE BEING INCREMENTED BY TWO

Autodecrement Mode

The contents of the register are decremented before being used as the address of the operand. l
Format:

C

-(ER)

Examples:
CLR -(RO)
CLR -(RO+3)
CLR -(2)
3.6.6

;DECREMENT CONTENTS OF REGiISTERS 0, 3, AND 2 BEFORE USING
iAS ADDRESSES OF WORDS TO BE CLEARED

(

Deferred Autodecrement Mode

The contents of the register are decremented before being used as the
pointer to the address of the operand.
Format:

1

(

@-(ER)

See previous footnote.

(
3-14

Example:
CLR

3.6.7

@- (2)

iDECREMENT CONTENTS OF REG. 2
iBEFORE USING AS POINTER TO ADDRESS
iOF WORD TO BE CLEARED

Index Mode
Format:

E (ER)

,5'

The value of an expression E is stored as the second or third word of the
instruction. The effective address is calculated as the value of E plus
the contents of +egister ER. The value E is called the base.
Examples:

(
\.

3.6.&

CLR

X+2 (Rl)

iEFFECTIVE ADDRESS IS X+2 PLUS
;THE CONTENTS OF REGISTER 1

CLR

-2(3)

iEFFECTIVE ADDRESS IS -2 PLUS
iTHE CONTENTS OF REGISTER 3

Deferred. Index Mode

An expression plus the contents of a register gives the pointer to the ad-

(

dress of the operand.
Format:

@E (ER)

Example:
CLR @14 (4)

(
3.6.9

t

iIF REGISTER 4 HOLDS 100, AND LOCAiTION 114 HOLDS 2000, LOC. 2000 IS
iCLEARED

Immediate Mode and Deferred Immediate (Absolute) Mode

The immediate mode allows the operand itself to be stored as the second or
third word of the instruction. It is assembled as an autoincrement of
register 7, the PC.
Format:

#E

Examples:

(

MOV
MOV

#100, RO
#X, RO

iMOVE AN OCTAL 100 TO REGISTER 0
iMOVE THE VALUE OF SYMBOL X TO
iREGISTER 0
3-15

The operation of this mode is explained as follows:
The statement MOV #100,R3 assembles as two words.

These are:

Just before this instruction is fetched and executed, the PC points
to the first word of the instruction. The processor fetches the first
word and increments the PC by two. The source operand mode is 27 (autoincrement the PC). Thus, the PC is used as a pointer to fetch the operand (the second word of the instruction) before being incremented by two,
to point to the next instruction.

(
If the #E is preceded by @, E specifies an absolute address.
3.6.10

Relative and Deferred Relative Modes

Relative Mode is the normal mode for memory references.
Format:

(

E

Examples:
CLR

100

iCLEAR LOCATION 100

MOV

X,Y

iMOVE

CONTENTS OF LOCATION X TO
iLOCATION Y

This mode is assembled as IndexMode, using 7, the PC, as the register.
The base of the address calculation, which is stored in the second or third
word of the instruction, is not the address of the operand. Rather, it is
the number which, when added to the PC, becomes the address of the operand.
Thus, the base is X - PC. The operation is explained as follows.

(

.",.

If the statement MOV 100,R3 is assembled at location 20, then the assembled code is:
Location 20:
Location 22:

(

The processor fetches the MOV instruction and adds two to the PC so that
3-16

~---'--'-~~~--~-------

- - - - ----- -

--

it points to location 22.
by the

r--

by the

pc. To pick up
pc and adds two

- - ---------- - - -

- --

___

~_.o...'-..o-

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __

The source operand mode i.s 67; that is, indexed

the base, the processor fetches the word pointed to
to the

pc.

pc

The

now points to location 24.

To

calculate the address of the source operand, the base is added to the desig~
That is, Base + PC

nated register.

=

54 + 24

=

100, the operand address.

Since the Assembler considers . as the address of the first word of the
instruction, an equivalent statement would be
,1 '

MOVIOO -.- 4(PC) ,R3
This mode is called relative because the operand address is calculated relative to the current

pc.

I

operand and the current

The base is the distance (in bytes) between the

pc.

If the operator and its operand are moved in

memory so that the distance between the operator and data remains constant,

(

the instruction will operate correctly.
If E is preceded by @, the expression's value is the pointer to the
address of the operand.
3.6.11

Table of Mode Forms and Codes (6-bit (A) format only - see Section 3.7)

Each instruction takes at least one word.

Operands of the first six forms

listed below do not increase the length of an instruction.

Each operand

in one of the other forms however, increases the instruction length
by one word.

(
None of these }
forms increase
the instruction
length.

Form

Mode

Meaning

R

fin

@R or (ER)
(ER)+
@ (ElU +
(ER)

In
2n
3n
4n
5n

Register
Register n deferred
Autoincrement
Autoincrement deferred
Autodecrement
Autodecrement deferred

E(ER)
@E (ER)
#E
@#E

6n
7n
27
37

E
@E

67
77

- (ER)
@-

Any of these
forms adds a
word to the
instruction
length
~

(

--

3-17

Index
Index deferred
Imm'ediate
Absolute memory
reference
Relative
Relative deferred
reference

Notes:

3.7

1.

An alternate form for @R is (ER).
is equivalent to @O(ER).

However, the form @(ER)

2.

The form @#E differs from the form E in that the second or
third word of the instruction contains the absolute address
of the operand rather than the relative distance between the
operand and the PC. Thus, the" statement CLR @#100 will
clear location 100 even if the instruction is moved from
the point at which it was assembled.

INSTRUCTION FORMS

The instruction mne~onics are given in Appendix B. This section defines
the number and nature of the operand fields for these instX'uctions.
In the table that follows, let R, E, and ER represent expressions as
defined in Section 3.4, and let A be a 6-bit address specification of the
forms:

E(ER)

@E
@R
or
@(ER)+
@- (ER)
@E (ER)

IE

@IE

E
R

(ER)+
-fER)

(R)

(

Table 3 ... 1.

Instruction Operand Fields

Instruction
pOuble Operand
~ingle Operand
Operate
Branch

Example

FoX'm
Op A,A
Op A
Op
Op E
wheX'e -l28l0~ (E- • ... 2) /2.~127l0

Subroutine Call
Subroutine Return
EMT/TRAP

(

JSR
RTS

ER,A
ER

Op or
Op E
where 0~E~377R

MOV (R6)+,@Y
CLR - (R2)
HALT
BR X+2
BLO .-4
JSR
RTS
EMT
EMT

(

PC,SUBR
PC
31

'"

(
3-18

The branch instructions are one word insuructions.

The high byte con-

tains the op code and the low byte contains an 8-bit signed offset (7 bits
plus sign) which specifies the branch address relative to the

pc.

The

hardware calculates the branch address as follows:
a)

Extend the sign of the offset through bits 8-15.

b)

Multiply the result by 2. This creates a word offset
rather than a byte offset.

c)

Add the result to the PC to form the final branch address.

The Assembler performs the reverse operation to form the byte offset
from the specified address.

Remember that when the offset is added to the

PC, the PC is pointing to the word following the branch instruction; hence
the factor -2 in the calculation.
Byte offset

= (E-PC)/2 truncated to eight bits.

Since PC = .+2, we have
Byte offset

(

=

(E-·-2)/2 truncated to eight bits.

The EMT and TRAP instructions do not use the low-order byte of the
word.

This allows information to be transferred to the trap handlers in

the low-order byte.

If EMT or TRAP is followed by an expression, the value

is put into the low-order byte of the word.

However, if the expression is

too big (>377 8 ) it is truncated to eight bits and a Truncation (T) error
occurs.

(
3.8

ASSEMBLER DIRECTIVES

Assembler directives (sometimes called pseudo-ops) direct the assembly
process and may generate data.
followed by a comment.

They may be preceded by a label and

The assembler directive occupies the operator

j'

field.

Only one directive may be placed in anyone statement.

One or

more operands may occupy the operand field or it may be void -- allowable operands vary from directive to directive.
3.8.1.

. EOT

The .EOT directive indicates the physical ~nd-Of-!ape though not the logical
(

end of the program.

If the .EOT is followed by a single line feed or

form feed, the Assembler will still read to the end of the tape, but
3-19

will not process anything past the .EOT directive. If .EOT is followed
by at least two line feeds or form feeds, the Assembler will stop before
the end of the tape. Either case is proper, but it should be understood
that even though it appears as if the Assembler has read too far, it
actually hasn't.
If a .EOT is embedded in a tape, and more information to be assembled follows it, .EOT must be immediately followed by at least two
line feeds or form feeds. Otherwise, the first line following the .EOT
will be lost.
Any operands following a .EOT dir~ctive will be ignored. The
directive allows several physically separate tapes to be assembled
program. The last tape is normally terminated by a .END directive
Section 3.8.3) but may be terminated with .EOT (see .END emulation
Section 3.9.4).
3.8.2

~

.EOT
as one
(see
in

(

• EVEN

The .EVEN directive ensures that the assembly location counter is even by
adding one if it is odd. Any operands following a .EVEN directive will
be ignored.
3.8.3

(

• END

The .END directive indicates the logical and physical end of the source
program. The .END directive may be followed by only one operand, an expression indicating the program's entry point.
At load time, the object tape will be loaded and program execution will
begin at the entry point indicated by the .END directive.

If the entry

(

point is not specified, the Loader will halt after reading in the object
tape.
3.8.4

.WORD

\

The .WORD assembler directive may have one or more operands, separated by
commas. Each operand is stored in a word of the object program. If there
is more than one operand, they are stored in successive words. The operands may be any legally formed expressions. For example,
.=142.0'
SAL=.0'
.WORD l77535,.+4,SAL

(
IN WORDS 142.0', 1422, AND
1424 WILL BE 177535, 1426, AND .0'.

iSTORED
.~

3-20

Values exceeding 16 bits will be truncated from the left, to word
length.
A .WORD directive followed by one or more void operands separated by
commas will store zeros for the void operands. For example,
.=143,0'
• WORD ,5,

iZERO, FIVE, AND ZERO ARE STORED
iIN WORDS 143,0', 1432, AND 1434 .

11.'

An operator field left blank will be interpreted as the .WORD directive if the operand field contains one or more expressions. The first
term of the first expression in the operand field must not be an instruction or assembler directive unless preceded by a +, - or one of the logical operators ! or &.For example,

(

(

.=44,0'
LABEL:

iTHE OP-CODE FOR MOV, WHICH IS ,0'1,0',0',0',0',
iIS STORED IN LOCATION 44,0'. 44,0' IS
iSTORED IN LOCATION 442.

Note that the default .WORD will occur whenever there is a leading
arithmetic or logicql operator, or whenever a leading symbol is encountered
which is not recognized as an instruction mnemonic or assembler directive.
Therefore, if an instruction mnemonic or assembler directive is misspelled,
the .WORD directive is assumed and errors will result. Assume that MOV is
spelled incorrectly as MOR:
MOR

('.

+MOV,LABEL

A,B

Two error codes can result: a Q will occur because an expression operator
is missing between MOR and A, and a U will occur if MOR is undefined. Two
words will be generated; one for MOR A and one for B.
3.8.5

. BYTE

The .BYTE assembler directive may have one or more operands separated by
commas. Each operand is stored in a byte of the object program. I.f multiple
operands are specified, they are stored in successive bytes. The operands
may be any legally formed expression with a result of 8 bits or less. For
example,
SAM=5
• =41,0'
• BYTE 48., SAM

;STORED IN LOCATION 41,0' WILL BE
i,0'6,0' (THE OCTAL EQUIVALENT OF 48) .
iIN 411 WILL BE ,0',0'5 •
3-21

If the expression has a result of more than 8 bits, it will be truncated to its low-order 8 bits and will be flagged as a T error.

If an

operand after the .BYTE directive is left void, it will be interpreted as
zero.

For example,
.=42~

. BYTE
3.8.6

iZERO WILL BE STORED IN
iBYTES 42~, 421 AND 422 .

, ,

.ASCII

The .ASCII directive translates strings of ASCII characters into their 7bit ASCII codes with the exception of null, rubout, carriage return, line
feed, and form feed. The text to be translated is delimited by a character at the beginning and the end of the text.

The delimiting character may

be any printing ASCII character except colon and equal sign and those used
in the text string.

The 7-bit ASCII code generated for each character will

be stored in successive bytes of the object program.

/YES/

•ASCII

/5+3/2/

(

iTHE ASCII CODE FOR "y" WILL BE
iSTORED IN 5~~, THE CODE FOR "E"
iIN 5~1, THE CODE FOR "S" IN 5~2 .

.=5~~

.ASCII

For example,

jTHE DELIMITING CHARACTER OCCURS
jAMONG THE OPERANDS. THE ASCII
j CODES FOR "5",
"+", AND "3" ARE
jSTORED IN BYTES 5~3, 5~4, AND
j5~5.
2/ IS NOT ASSEMBLED.

(

The .ASCII directive must be terminated by a space or a tab.
3.9
3.9.1

OPERATING PROCEDURES

(

Introduction

The Assembler enables you to assemble an ASCII tape containing PAL-1lA
statements into an absolute binary tape.
passes are necessary.

To do this, two or three

On the first pass the Assembler creates a table

of user-defined symbols and their associated values, and a list of
undefined symbols is printed on the teleprinter.

On the second pass the

Assembler assembles the program and punches out an absolute binary tape
and/or outputs an assembly listing.

During the third pass (this pass is

optional) the Assembler punches an absolute binary tape
assembly listing.

££

outputs an

The symbol table (and/or a list of errors) may be out-

put on any of these passes.

The input and output devices as well as

various options are specified during the initial dialogue (see Section 3.9.3).(
The Assembler initiates the dialogue immediately after being loaded and
after the last pass of an assembly.
3-22

3.9.2

Loading PAL-IIA

PAL-IIA is loaded by the Absolute Loader (see Chapter 6 for operating
procedures).
(

Note that the start address of the Absolute Loader must be

in the Switch Register when loading the Assembler.

This is because the

Assembler tape has an initial portion which clears all of core up to the
address specified in the Switch Register, and jumps to that address to
start loading the Assembler.
3.9.3

Initial Dialogue

After being loaded, the Assembler initiates dialogue by printing on the
teleprinter:
*S

(

meaning "What is the Source symbolic input device?"

The response may

be:
H

meaning High-speed reader

L

meaning Low-speed reader

T

meaning Teletype keyboard

(
If the response is T, the source program must be typed at the terminal
once for each pass of the assembly and it must be identical each time it
is typed.

The device specification is terminated, as is all user response, by typing the RETURN key.
If an error is made in typing at any time, typing the RUBOUT key will
erase the immediately preceding character if it is on the current line.
r

Typing CTRL/U will erase the whole line on which it occurs.
After the *S question and response, the Assembler prints:
*B

(

3-23

meaning "What is the Binary output device?1I

The responses to *B are simi-

lar to those for *8:
H

meaning High-speed punch

L

meaning Low-speed punch
meaning do not output binary tape
( ) denotes typing the RETURN key)

In addition to I/O device specification, various options may be chosen.
The binary output will occur on the second pass unless /3
third pass) is typed following the H or L.
same pass if /E is typed.

~ndicating

the

Errors will be listed on the

If /E is typed in response to more than one in-

quiry, only the last occurrence will be honored.

It is strongly suggested

that the errors be listed on the same pass as the binary output, since
errors may vary from pass to pass.
precede /E.

If both /3 and /E are typed, /3 must

The response is terminated by typing the RETURN key.

*B

L/E

Binary output on the low-speed punch and
the errors on the teleprinter, both during
the second pass.

*B

H/3/E

Binary output on the high-speed punch and
the errors on the teleprinter, both during
the third pass.

Examples:

(

(

Typing just the RETURN key will cause the Assembler
to omit binary output.
After the *B question and response, the Assembler prints!
*L

(

meaning IIWhat is the assembly Listing output device?1I
may be:
L
H

T
P

)

The response to *L

meaning Low-speed punch (outputs a tab as a tab-rubout)
meaning High-speed punch

~

meaning Teleprinter (outputs a tab as mUltiple spaces)
meaning line Printer (8K version only)
meaning do not output listing
(.J denotes typing the RETURN key)

3-24

(

After the I/O device specification, pass and error list options similar to those for *B may be chosen.

The assembly listing will be output on

pa~s

unless /2 (indicating the second pass) is typed following

H, L, T, or P,

Errors will be listed on the teleprinter during the same

the third

pass if /E is typed.

If both /2 and /E are typed, /2 must precede /E.

The response is terminated by typing the RETURN key.

Examples:

*L

L/2/E

Listing on low-speed punch and errors
on teleprinter during second pass.

*L

H

Listing on high-speed punch during
third pass.
The RETURN key alone will cause the
Assembler to omit listing output.

*L

After the *L question and response, the final question is printed on
(

the teleprinter:
*T
meaning "What is the symbol Table output device?"
is the same as for the *L question.

The device specification

The symbol table will be output at

the end of the first pass unless /2 or /3 is typed in response to *T.

(

The

first tape to be assembled should be placed in the reader before typing
the RETURN key because assembly will begin upon typing the RETURN key in
response to the *T question.
to *T. Example:
*T

(

T/3

The./E option is not a meaningful response

Symbol table output on teleprinter at
end of third pass.
Typing just the RETURN key will cause the
Assembler to omit symbol table output.

The symbol table is printed alphabetically, four symbols per line.
;'

Each symbol printed is followed by its identifying characters and by its
value.

If the symbol is undefined, six asterisks replace its value.

The

identifying characters indicate the class of the symbol; that is, whether
it is a label, direct-assignment, register symbol, etc.
(

examples show the various forms:

3-25

The following

ABCDEF
R3
DIRA8M
XYZ

=
=

R6

=
=

LABEL

-

001244
%000003
177777
******
%******
******

(Defined label)
(Register symbol)
(Direct assignment)
(Undefined direct assignment)
(Undefined register symbol)
(Undefined label)

(,

Generally, undefined symbols (including labels) will be listed
as undefined direct assignments.
Multiply-defined symbols are not flagged in the symbol table printout
but they are flagged wherever they are used in the program.

It is possible to output both the binary tape anq, the assembly listing on the same pass, thereby reducing the assembly process to two passes
(see Example 1 below). 'rhis will happen automatically unless the binary
device and the listing device are conflicting devices or the same device
_(see Example 2 below). The only conflicting devices are the teleprinter
and the low-speed punch. Even though the Assembler deduces that three
passes are necessary, the binary and listing can be forced on pass 2 by
including /2 in the responses to *B and *L (see Example 3 below).
Example l.
*8
*B
*L
*T

H
H
P
T

Example 2.
*8
*B
*L
*'1'

H
H
H
T

(

(

Runs 2 passes:
High-speed reader
High-speed punch
Line Printer
Teleprinter

(

Runs 3 passes:
High-speed reader
High-speed punch
High-speed punch
Teleprinter

3-26

(

r-

Example 3.
*S
*B
*L
*T

Runs 2 passes:

H
H/2
H/2
T

High-speed reader
High-speed punch on pass 2
High-speed punch on pass 2
Teleprinter

Note that there are several cases where the binary output can be
intermixed with ASCII output:
a.

*B
*L

H/2
H/2

Binary and
listing to punch on pass 2

b.

*B

L/E

Binary to low-speed punch and
error listing to teleprinter
(and low-speed punch)

c.

*B
*L

L/2/E
T/2

Binary, error listing, and
listing to low-speed punch.

(

(

(

The binary so generated is loadable by the Absolute Loader as long as there
are no CTRL/A characters in the so~rce program. The start of every block
on the binary tape is indicated by a 001 and the Absolute Loader ~gnores
all information until a 001 is detected.. Thus, all source and/or error
messages will be ignored if they do not contain any CTRL/A characters
(octal 001).

'.

If a character other than those mentioned is typed in response to
a question, the Assembler will ignore it and print the question again.
Example:
*S
*B
*B

H
Q

High-speed reader
Q is not a valid response
The question is repeated

If at any time you wish to restart the Assembler, type CTRL/P.
When no passes are omitted or error options specified, the Assembler
performs as follows:

PASS 1:

Assembler creates a table of user-defined symbols and
their associated values to be used in assembling the source
to object program. Undefined symbols are listed on the teleprinter at the end of the pass. The symbol table is also
listed at this time. If an illegal location statement of the
form .=expression is encountered, the line and error code will
be printed out on the teleprinter before the assembly proceeds.
An error in a location statement is usually a fatal error in
the program and should be corrected.

PASS 2:

Assembler punches the object tape, and prints the pass error
count and undefined location statements on the teleprinter.

PASS 3:

Assembler prints or punches the assembly program listing, undefined location statements, and the pass error count on the
teleprinter.

The functions of passes 2 and 3 will occur simultaneously on pass 2 if the
binary and listing devices are different, and do not conflict with each

(-

(

other (low-speed punch and Teletype printer conflict) .
The following table summarizes the initial dialogue questions:
Printout

Inquiry

(
*S

What is the input device of the Source symbolic tape?

*B

What is the output device of the Binary object tape?

*L

What is the output device of the assembly Listing?

*T

What is the output device of the symbol Table?

The following table summarizes the legal responses:

(

Response Indicated

Character
T

Teletype keyboard

or printer

L

Low-speed reader or punch

H

High-speed reader or punch

P

Line printer (8K version only)

/1

Pass 1

/2

Pass 2

/3

Pass 3

/E
)

Errors listed on same pass (not meaningful in response to *S or *T)
Omit function

3-28

(

Typical examples of complete initial dialogues:

(-"

For minimal PDP-II configuration:
*S
*B

L
L/E

*L
*T

T
T

I".

Source input on low-speed reader
Binary output on low-speed punch
Errors during same (second) pass
Listing on teleprinter during pass 3
Symbol table on teleprinter at end of pass I

For a PDP-II with high-speed I/O devices:

(

3.9.4

(

(

*S
*B

H
H/E

*L
*T

T/2

Source input on high-speed reader
Binary output on high-speed punch,
Errors during same (second) pass.
No listing
Symbol table on teleprinter at end of pass 2

Assembly Dialogue

During assembly, the Assembler will pause to print on the teleprinter various messages to indicate that you must respond in some way before the assembly process can continue. You may also type CTRL/P, at any time, if you
wish to stop the assembly process and restart the initial dialogue, as mentioned in the previous section.
When a
prints:

.EOT assembler directive is read on the tape, the assembler

\"

EOF ?
and pauses. During this pause, the next tape is placed in the reader, and
RETURN is typed to continue the assembly.
If the specified assembly listing output device is the high-speed
punch and if it is out of tape, or if the device is the Line Printer and
is out of paper, the Assembler prints on the teleprinter:
EOM ?

3-29

and waits for tape or paper to be placed in the device. Type the RETURN
key when the tape or paper has been replenished; assembly will continue.
Conditions causing the EOM ? message for an assembly listing device
are:
HSP

LPT

No power
No tape

No power
Printer drum gate open
Too hot
No paper

There is no EOM if the line printer is switched off-line; although characters may be lost for this condition as well as for an EOM. If the binary
output device is the high-speed punch and if it is out of tape, the
Assembler prints:

(

EOM ?
*S
The assembly process is aborted and the initial dialogue is begun again.
When a
prints:

C

.END assembler directive is read on the tape, the Assembler

END ?
and pauses. During the pause the first tape is placed in the reader, and
the RETURN key is typed to begin the next pass. On the last pass, the
.END directive causes the Assembler to begin the initial dialogue for the
next assembly.

c

If you are starting the binary pass and the binary is to be punched
on the low-speed punch, turn the punch on before typing the RETURN key
for starting the pass. The carriage return and line feed characters will
be punched onto the binary tape, but the Absolute Loader will ignore them.
If the last tape ends with a .EOT, the Assembler may be told to
emulatea .END assembler directive by responding with E followed by the

3-30

(_

RETURN key.

(-

The Assembler will then print:

END?
and wait for another RETURN before starting the next pass.
EOF?
END?

Example:

E

NOTE
When a .END directive is emulated with an E
response to the EOF? message, the error
counter is incremented.
To avoid incrementing the error counter,
place a paper tape containing only the line
.END in the reader and press the RETURN key
instead of using the E response.

(

3.9.5

Assembly Listing

PAL-IIA produces a side-by-side assembly listing of symbolic source state(

ments, their octal equivalents, assigned absolute addresses, and error
codes, as follows:
EELLLLLL 000000 SSS ...... S
000000
000000
The E's represent the error field.

The L's represent the absolute address.

The O's represent the object data in octal.

The

SiS

represent the source

statement.

While the Assembler accepts 72 10 characters per line on input,
the listing is reduced by the 16 characters to the left of the source statement.
The above represents a three-word statement.

The second and third

words of the statement are listed under the command word.

No addresses pre-

cede the second and third words since the address order is sequential.
The third line is omitted for a two-word statement; both second and

(

third lines are omitted for a one-word statement.

3-31

For a .BYTE directive, the object data field is three octal digits.
For a direct assignment statement, the value of the defining expression
is given in the object code field although it is not actually part of the
code of the object program.
Each page of the listing is headed by a page number.

3.10

ERROR CODES

The error codes printed beside the octal and symbolic code in the assembly
listing have the following meanings:
Error Code

Meaning

A

Addressing error.
is incorrect.

An address within the instruction

B

Bounding error. Instructions or word data are being
assembled at an odd address in memory. The location
counter is updated by +1.

D

Doubly-defined symbol referenced. Reference was made
to a symbol which is defined more than once.

I

Illegal character detected. Illegal characters which
are also non-printing are replaced by a ? on the listing.

L

Line buffer overflow. Extra characters on a line (more
'than 72 10 ) are ignored.

M

Multiple d~finition of a label. A label was encountered which was equivalent (in the first six characters) to a previously encountered label.

N

~umber

P

Phase error. A label's definition or value varies
from one pass to another.

Q

Questionable syntax. There are missing arguments or
the instruction scan was not completed or a carriage
return was not immediately followed by a line feed or
form feed.

R

Register-type error. An invalid use of or reference
to a register has been made.

S

eymbo1 table overflow. When the quantity of userdefined symbols exceeds the allocated space available
in the user's symbol table, the assembler outputs the
current source line with the S error code, then returns
to the initial dialogue.

containing 8 or 9 has no decimal point.

3-32

(

(

c

(

,~

T

!runcation error. A number generated more than 16
bits of significance or an expression generated more
than 8 bits of significance during the use of the .BYTE
directive.

U

Undefined symbol. An undefined symbol was encountered
during the evaluation of an expression. Relative to
the expression, the undefined symbol is assigned a
value of zero.

'J

3.11 SOFTWARE ERROR HALTS

PAL-IIA loads all unused trap vectors with the code

(

(

.WORD

.+2,HALT

so that if the trap does occur, the processor will halt in the second word
of the vector. The address of the,halt, displayed in the console address
register, therefore indicates the cause of the halt. In addition to the
halts which may occur in the vectors, the standard lOX error halt at location 40 may occur (see Chapter 7).
Address of Halt
12

16
26
32
40

Meaning
Reserved instruction executed
Trace trap occurred
Power fail trap
EMT executed
lOX detected error

See Appendix B for summaries of PAL-llA features.

(
3-33

CHAPTER 4
EDITING THE SOURCE PROGRAM
4.1
COMMAND MODE AND TEXT MODE
4.2
COMMAND DELIMITERS
4.2.1
Arguments
4.2.2
The Character Location Pointer (Dot)
4.2.3
Mark
4.2.4
Line-Oriented Command Properties
4.2.5
The Page Buffer
4.3
COMMANDS
4.3.1
Input and Output Commands
4.3.1.1
Open
4.3.1.2
Read
4.3.1.3
List and Punch
4. 3. 1. 4
Next
4.3.1.5
Form Feed and Trailer
4.3.1.6
Procedure with Low-Speed Punch
4.3.2
Commands to Move Dot and Mark
4.3.2.1
Beginning and End
4.3.2.2
Jump and Advance
4.3.2.3
Mark
4.3.3
Search Commands
4.3.3.1
Get
4.3.3.2
Whole
4.3.4
Commands to Modify Text
4.3.4.1
Insert
4.3.4.2
Delete and Kill
4.3.4.3
Change and Exchange

4-1
4-2
4-2
4-3
4-3
4-3
4-4
4-4
4-4
4-5
4-5
4-6

4.4
OPERATING PROCEDURES
4.4.1
Error Correction
4.4.2
Starting
4.4.3
Restarting
4.4.4
Creating a Paper Tape
4.4.5
Editing Example

4-1'2
4-12
4-13
4-14
4-14
4-14
4-22

4.5

SOFTWARE ERROR HALTS

4-i

4-7
4-7
4-7
4-7
4-7
4-7
4-8
4-8
4-8

4-9
4-9
4-9
4-10
4-11

CHAPTER 4
Editing the Source Program, ED-II
The PDP-II Text Editor program (ED-II) enables you to display your source
program (or an¥text) on the teleprinter, make corrections or additions
to it, and punch all or any portion of the program on paper tape. This
is accomplished by typing simple one-character commands on the keyboard.
The Editor commands can be grouped according to function:
1-

(

,
)

2.

\

3.

4.

input/output;
searching for strings of charac'ters;
positioning the current character location pointer;
inserting, deleting, and exchanging text portions.

All input/output functions are handled by lOX, the PDP-II Input/Output
Executive (see Chapter 7).

C

4.1

COMMAND MODE AND TEXT MODE

Whenever ED-II prints an * on the teleprinter, you may type a command
to it. (Only one command per line is acceptable.) The Editor is then
said to be in Command Mode. While most commands operate exclusively in
this mode, there are five ED-II commands that require additional information in order for the commands to be carried out. The Editor goes
into Text Mode to receive this test.
Should a nonexistent command be typed or a command appear in incorrect
format, ED-II will print a?
This will be followed by an * at thebeqinning of a new line indicating that the Editor is in Command Mode.

(~~)

Editor processing begins in Command Mode. When you type a command,
no action occurs until you follow it by typing the RETURN key (sometimes
symbolized as ) • If the command is not a text-type command, typing the
RETURN key will initiate the execution of the command and ED-II will
remain in Command Mode. However, if the command is a text-type command
(Insert, e!,change, £,hange, Qet, or w!!ole), typing the RETURN key will
cause the Editor to go into Text Mode. At this time you should type
4-1

the text to be operated on by the command. This can include the nonprinting characters discussed below, as well as spaces and tabs (up to
eight spaces generated by the CTRL/TAB keys).
Note that typing the RETURN key always causes the physical return
of the Teletype ball to the beginning of the line, and automatically
generates a line feed the~eby advancing the carriage to a new line.
In Text Mode, the RETURN key not only serves these mechanical functions,
allowing you to continue typing at the beginning of a new line, but at
the same time it enters a carriage return and line feed character into
the text.
(A carriage return not follOwed by a line feed cannot,
therefore, be entered from the keyboard.)
These are both counted as characters and can be edited along
with the printing characters (as can the form feed, discussed in
Section 4.2.5). When you wish to terminate Text Mode and reenter
Command Mode, you must type the LINE FEED key (sometimes symbolized
as +). A typed LINE FEED is not considered to be part of the text
unless it is the first character entered in Text Mode.

4.2

(

(

COMMAND DELIMITERS

4.2.1

Arguments

Some ED-II commands require an argument to specify the particular portion
of text to be affected by the command or how many times to perform the command.In other commands this specification is implicit and arguments are
not allowed ..
The ED-II command arguments are described as follows:
1.

n stands for any number from 1 to 32767'0 (2
except where noted, be preceded by a + or -.

15

-1) and may,

If no sign precedes n, it is assumed to be a positive
number.

4-2

(

- - - - ----~.-.~~~---""-:--

Where an argument is acceptable" its absence implies
an argument of 1 (or -1 if a - is present).
The role of n varies according to the command it is
associated with.
2.

o

3.

@ refers to a marked (designated) character location
(see Section 4.2.3).

4.

/ refers to the end of text in the Page Buffer.

refers to the beginning of the current line.

The roles of all arguments will be explained further with the corresponding commands which qualify them.

(

(

4.2.2

Almost all ED-II commands function with respect to a movable reference
point, Dot. This character pointer is normally located between the most
recent character operated upon and the next character; and, at any given
time, can be thought of as "where the Editor is" in your text. As will
be seen shortly, there are commands which move Dot anywhere in the t'ext,
thereby redefining the "current location" and allowing greater facility
in the use of the other commands.
4.2.3

('

\,

The Character Location Pointer (Dot)

Mark

In addition to Dot, a secondary character pointer known as Mark also exists
in ED-II. This less agile pointer is used with great effect to mark or
"remember" a location by moving to Dot and conditionally remaining there
while Dot moves on to some other place in the text. Thus, it is possible
to think of Dot as "here" and Mark as "there". Positioning of Mark, which
is referenced by means of the argument @, is discussed below in several
commands.
4.2.4

Line-Oriented Command Properties

ED-II recognizes a line as a unit by detecting a line-terminator in the
text. This means that ends of lines (line feed or form feed characters)
are counted in line...,oriented commands. This is important to know,'particularly if Dot, which is a character location pointer, is not pointing at
the first character of a line.

(
In such a case, an argument n will not affect the same number of
4-3

lines (forward) as its negative (backward).

For example, the argument-l

applies to the character string beginning with the first character following
the second previous end-of-1ine character and ending at Dot; argument +1 ap-

(_
... -

plies to the character string beginning at Dot and ending at the first endof-line character.

If Dot is located, say, in the center of a line, notice

that this would affect 1-1/2 lines back or 1/2 line forward, respectively:
Example of List Commands -lL and +lL:
Text

Command

CMPB
BEQ

ICHAR,#,033
$ALT
CMPB~HAR' # 1 7 5
BNE
LACE

Printout

*-lL

BEQ $ALT
CMPB I

CHAR,!~Dot

*+lL

t

Dot is here

remains

. . here

(
4.2.5

The Page Buffer

The Page Buffer holds the text being edited.

The unit of source data that

is read into the Page Buffer from a paper tape, is the page.

Normally, a

page is terminated, and therefore defined by a form feed (CTRL/FORM) in the
source text wherever a page is desired.
Mode character.)

(A form feed is an acceptable Text

Overflow, no-tape, or reader-off conditions can also end

a page of input (as described in Section 4.3.1.2).

(

Since more than one

page of text can be in the buffer at the same time, it should be noted that
the entire contents of the Page Buffer are available for editing.
4.3

COMMANDS

(
4.3.1

Input and Output Commands

Three commands are available for reading in a page of text.

The Read com-

mand (Section 4.3.1.2) is a specialized input command; the Next command
(Section 4.3.1.4) reads in a page after punching out the previous page;
and the wHole command (Section 4.3.3.2) reads in and punches out pages
of text as part of a search for a specified character string.
Output commands either list text or punch it on paper tape.

The List

command causes specified lines of text to be output on the teleprinter so
that they may be examined.

Paper tape commands (Next and wHole also per-

form input) provide for the output of specified pages, lines, form feeds
(for changing the amount of data that constitutes a given page), and blank
4-4

(

(-,

tape.

Note that the process of outputting text does not cause Dot to

move.
4 . 3 . 1. 1

Open

The Open command (0) should be typed whenever a new tape is put in the
reader.

This is used when the text file being edited is on more than

one paper tape.
Note also, that if the reader is off at the time an input command is
given, turning the reader on must be followed by the Open command.
4.3.1.2

(

Read

One way of getting a page of text into the Page Buffer so that it can be
edited is by means of the Read(R) command.

The command R causes a page of

text to be read from either the low-speed reader or high-speed reader (as
specified in the starting dialogue, Section 4.4.2), and appended to the
contents (if any) of the Page Buffer.

(

Text will be read in until either:
1.

A form feed character is encountered;

2.

The page buffer is 128 characters from being
filled, or a line feed is encountered after the
buffer has become 500 characters from being filled;

3.

The reader is turned off, or runs out of paper tape
(see Open command, Section 4.3.1.1).

Following execution of an R command, Dot and Mark wil: be located at
the beginning of the Page Buffer.
A 4K system can accommodate about 4000 characters of text.
tional 4K of memory will provide space for about 8000 characters.
NOTE

(

An attempt to overflow the storage area will
cause the command (in this case, R) to stop
executing. A? will then be printed, followed
by an * on the next line indicating that a command may be typed. No data will be lost.
4- 5

Each addi-

4.3.1.3

List and Punch

r

Output commands List (L) and Punch (P) can be described together, as they
differ only in that the device addressed by the former is the teleprinter,
and the device addressed by the latter is the paper tape punch.

Dot is

not moved by these commands.
nL.
nP

Lists )
Punches

the character string beginning at Dot and
ending with the nth end-of-line

-nL
-nP

Lists }
Punches

the character string beginning with the
first character following the (n+l)th previous end-of-line and terminating at Dot

OL
OP

Lists ~
Punches)

@L
@P

Lists
Punches

the character string between Dot and the
Marked location

IL

Lists }
Punches

the character string beginning at Dot and
ending with the last character in the Page
Buffer

J

IP

the character string beginning with the
first character of the current line and
ending at Dot

In addition to the above List commands, there are three special List commands that accept no arguments.

(

(

The current line is defined as the line

containing Dot, i.e., from the line feed (or form feed) preceding Dot to
the line feed (or form feed) following Dot.

v

Lists the entire line containing Dot

<

Same as -IL.
If Dot is located at the
beginning of a line, this simply lists
the line preceding the current line

>

Lists the line following the current line

(

Examples:
TEXT
CMPB ICHAR,#~33
BEQ $ALT
CMPB
HAR,#175
BN .. LACE

~.

COMMANDS

v
<

>

Dot is here.

PRINTOUT
CMPB
BEQ
CMPB
BNE
Dot remains here.

4-6

(

4.3.1.4

Next

Typing nN punches out the entire contents of the Page Buffer (followed by
a trailer of blank tape if a form feed is the last character in the buffer),
deletes the contents of the buffer, and reads the Next page into the buffer.

It performs this sequence n times.

If there are fewer than the n

pages specified, the command will be executed for the number of pages actually available, and a ? will be printed out.

Following execution of a

Next, Dot and Mark will be located at the beginning of the Page Buffer.
4.3.1.5
F
nT
4.3.1.6

(

Form Feed and Trailer
Punches out a Form feed character and four inches of
blank tape
Punches out four inches of Trailer (blank) tape n times
Procedure with Low-Speed Punch

If the low speed punch is the specified output device (see Section 4.4.2),
the Editor pauses before executing any tape command just typed (Punch,
Form feed, Trailer, Next, wHole).

The punch must be turned on at this time,

after which, typing the SPACE bar initiates the execution of the command.
Following completion of the operation, the Editor pauses again to let you
turn the punch off.
(

When the punch has been turned off, typing the SPACE

bar returns ED-II to Command Mode.
4.3.2

Commands to Move Dot and Mark

4.3.2.1

Beginning and End

B

Moves Dot to the Beginning of the Page Buffer

E

Moves Dot t9 the End of the Page Buffer (see also /J and /A
below)

4.3.2.2
nJ

Jump and Advance

nA

Jumps Dot forward past n
characters

-nJ Moves Dot backward past n
characters

OJ or OA
@J or @A
/J or /A

-nA

Advances Dot forward past n
ends-of-lines to the beginning of the succeeding line
Moves Dot backwards across n endsof-lines and positions Dot immediately after n+l ends of lines, i.e.,
at the beginning of the -n line.

Moves Dot to the beginning of the current line
Moves Dot to the Marked location
Moves Dot to the end of the Page Buffer (see also
E above)
4-7

Notice that while n moves Dot n characters in the Jump command, its role
becomes that of a line counter in the Advance command. However, because
O,@, and / are absolute, their use with these commands overrides line/
character distinctions. That is, Jump and Advance perform identical functions if both have either 0, @ or / for an argument.
4.3.2.3

Mark

The M command marks ("remembers") the current position of Dot for later
reference in a command using the argument @. Note that only one position at
a time can be in a marked state. Mark is also affected by the execution of
those commands which alter the contents of the Page Buffer:
C

4.3.3
4.3.3.1

o

H

I

K

N

R

x

(
"

Search Commands
Get

The basic search command nG starts at Dot and Gets the nth occurrence of
the specified text in the Page Buffer. If no argument is present, it is
assumed to be 1. When you type the command, followed by the RETURN key,
ED-ll will go into Text Mode. The character string to be searched for must
now be typed.
(ED-ll will accept a search object of up to 42 characters
in length.) Typing the LINE FEED key terminates Text Mode and initiates
the search.

(

(
This command sets Dot to the position immediately following the found
character string, and a OL listing is performed by ED-ll. If a carriage
return, line feed, or form feed is specified as part of the search object,
the automatic OL will only display a portion of text -- the part defined
as the last line. Where any of these characters is the last character of
the search object, the OL will of course yield no printout at all.
If the search is unsuccessful, Dot will be at the end of the Page Buffer and a ? will be printed out. The Editor then returns to Command Mode.

4-8

Examples:
Text

1.

MOV
ADD
CLR
TST
BEQ

Command

Printout

2G.J
CK'"

BEQ CK

@RMAX, @R5
#6, (R5)+
$CK3
R2
CKCR

Dot was here.
2.

CMPB
BEQ
(BR

Dot is

ICHAR,#RUBOUT
SITE
PUT

Dot

(

4.3.3.2

wHole

A second search command, H, starts at Dot and looks through the wHole text
file for the next occurrence of the character string you have specified
in Text Mode.

It combines a Get and a Next such that if the search is not

successful in the Page Buffer, the contents of the buffer are punched on

(

tape, the buffer contents are deleted, and a new page is read in, where
the search is continued.

This will proceed until the search object is found

or until the complete source text has been searched.

In either case, Mark

will be at the beginning of the Page Buffer.
If the search object is found, Dot will be located immediately following it, and a OL will be performed by ED-II.
(

As in the Get command, if

the search is not successful Dot will be at the end of the buffer and a ?
will appear on the teleprinter.
will be in Command Mode.

Upon completion of the command, the Editor

No argument is allowed.

Note that an H command

specifying a nonexistent search object can be used to close out an edit,
i.e., copy all remaining text from the input tape to the output tape.
4.3.4
4.3.4.1

Commands to Modify the Text
Insert

The Insert command lI) allows text to be inserted at Dot.

After I is typed

(followed by the typing of the RETURN key), the Editor goes into Text Mode

(c

to receive text to be inserted.
able.

Up to 80 characters per line are accept-

Execution of the command occurs when the LINE FEED key (which does

4-9

not Insert a line feed character unless it is the first key typed in Text
Mode) is typed terminating Text Mode. At this point, Dot is located in
the position immediately following the last inserted text character. If
the Marked location was anywhere after the text to be Inserted, Dot becomes
the new Marked location.
During an insert, it sometimes happens that the user accidentally types
CTRL/P rather than SHIFT/P (for @), thus deleting the entire insert (see
Section 4.4.1). To minimize the effect of such a mistake, the insert may
be terminated every few lines and then continued with a new Insert command.
As with the Read command, an attempt to overflow the Page Buffer will
cause a ? to be printed out followed by an * on the next line indicating
that a command may be typed. Allor part of the last line typed may be
lost. All previously typed lines will be inserted. Examples:

1.

Text

Command

MOV #8. 'EK~

Ij
CN+

Effect
MOV #8.,EKOC,

Dot
2.

(

Dot

Inserting a carriage return (and automatic line feed):
CLR R1LR R2

Do
3.

(

Y+

CLR Rl
CLR R2

(

Inserting a single line feed:
LOOK WHAT HAPPENS HERE

?

Dot

Ij
+
+

LOOK WHAT
tHAPPENS HERE
Dot

4.3.4.2

Delete and Kill

These commands are closely related to each other; they both erase specified
text from the Page Buffer. The Delete command (D) differs from the Kill
command (K) only in that the former accepts an argument, n, that counts
characters to be removed, while the latter accepts an argument, n, that
counts lines to be removed. 0, @, and / are also allowed as arguments.
After execution of these commands, Dot becomes the Marked location.
4-10

(

nD

Deletes the following n
characters

nK

Kills the character string
beginning at Dot and ending
at the nth end-of-line

-nD

Deletes the previous n
characters

-nK

Kills the character string
beginning with the first
character following the (n+l)th
previous end-of-line and ending at Dot

r

OD or OK

Removes the current line up to Dot

@D or @K

Removes the character string bounded by Dot and Mark

/D or /K

Removes the character string beginning at Dot and
ending with the last character in the Page Buffer

Text

Command

Effect

(
\

1.

2.

iCHECK THE MOZXDE

-2D

Dol

iCHECK THE MrE
Dot

iIS IT A TA~OR
iIS IT A CR

2K

iIS IT A

J

(

Dot
4.3.4.3

Change and eXchange

The Change (C) and eXchange (X) commands can be thought of as two-phase
commands combining, respectively, an Insert followed by a Delete, and
an Insert followed by a Kill.

After the Change or eXchange command is

typed, ED-II goes into Text Mode to receive the text to be inserted.

If

±n is used as the argument, it is then interpreted as in the Delete (character-oriented) or Kill (line-oriented), and accordingly removes the indicated
text.

0, @, and / are also allowed as arguments.
nC
xxxx
xxxx

Changes the following
n characters

nX
xxxx
xxxx

eXchanges the character
string beginning at Dot and
ending at the nth endof-line

-nC
xxx

Changes the previous
n characters

-nX
xxx

eXchanges the character
string beginning with _
the first character following the (n+l)th previous end-of-line and
ending at Dot

(
OC or OX
xxxx xxxx
xxxx xxxx

Replaces the current line up to Dot
4-11

@C
xxx
xxx

or

/C
xxx

or

@X
xxx
xxx

Replaces the character string bounded by Dot
and the Marked location

/X
xxx

Replaces the character string beginning at Dot
and ending with the last character in the Page
Buffer.

(~.

Again, the use of absolute arguments 0, @, and / overrides the line/character
distinctions that nand -n produce in these commands.
If the Insert portion of a Change or eXchange is terminated because of
attempting to overflow the Page Buffer, data from the latest line may have
been lost, and text removal will not occur.

Such buffer overflow might be

avoided by separately executing a Delete or Kill followed by an Insert, rather
than a Change or eXchange, which does an Insert followed by a Delete or Kill.

(

Examples:
Text

Command

iA LINE PEED IS HERE

-9C.)
TABi-

iTHIS
iIS ON
"POUR
\LINES

j

Effect
HERE

2X.)

P.APERi-

(

Dot
4.4

OPERATING PROCEDURES

4.4.1

Error Corrections

During the course of editing a page of the program, it may become necessary
to correct mistakes in the commands themselves.

There are four special

commands which do this:

a.

Typing the RUBOUT key removes the preceding typed character,
if it is on the current line. Successive RUBOUTs remove preceding characters on the line (including the SPACE), one character for each RUBOUT typed.

b.

The CTRL/U combination (holding down the CTRL key and typing
U) removes all the characters in the current line.

c.

CTRL/P cancels the current command in its entirety. This includes all the current command text just typed, if ED-ll was
in Text Mode. Care should be taken in not using another CTRL/P
before typing a line terminator as this will cause an ED-ll restart (see d. below).
If CTRL/P is typed while

4-12

(

a found search object of a Get or wHole is being
printed out, the normal position of Dot (just after
the specified search object) is not affected.
CTRL/P should not be used while a punch operation
is in progress as it is not possible to know exactly
how much data will be output.
d.

Two CTRL/P's not interrupted by a typed line terminator will restart ED-II, initiating the dialogue
described in Section 4.4.2.

After removing the incorrect command data, the user can, of course,
directly t~pe in the desired input.
4.4.2

(

Starting

The Editor is loaded by the Absolute Loader (see Chapter 6, Section 6.2.2)
and starts automatically. Once the Editor has been loaded, the following
sequence occurs:
ED-II Prints

(

User Types

*I

L.J

(if the Low-speed Reader is to be used for
source input)

H)

(if the High-speed Reader is to be used for
source input)
(if the Low-speed Punch is to be used for
edited output)

*0

H)

(if the High-speed Punch is to be used for
edited output) .

(

If all text is to be entered from the keyboard (i.e., via the Insert
command), either L or H may be specified for Input.
If the output device is the high-speed punch (HSP), the Editor enters
Comman¢! Mode to accept input. Otherwise, the sequence continues with:
LSP OFF?

(

~

(when Low-speed Punch (LSP) is off)

Upon input of ~ from the keyboard, the Editor enters Command Mode
and is ready to accept input.

4-13

4.4.3

Restarting

To restart ED-II, type CTRL/P twice.

This will initiate the normal start-

ing dialogue described in Section 4.4.2.

~,

If the Low-speed Reader (LSR)

is in operation it must first be turned off.

The text to be edited should

be loaded (or reloaded) at this time.
4.4.4

Creating a Paper Tape

Input commands assume that text will be read in from a paper tape by means
of the low-speed reader or high-speed reader.

However, the five commands

that go into Text Mode enable the user to input from the keyboard.
fnsert command, in particular

The

(Section 4.3.4.1) can be useful for enter-

ing large quantities of text not on paper tape.

The Page Buffer can thus

(C

be filled from the keyboard, and a paper tape actually created by then using
a command to punch out the buffer contents.
4.4.5

Editing Example

The following example consists of three parts:
a.

The marked up source program listing indicating the desired
changes.

b.

The ED-II commands to implement those changes (with comments
on the editing procedure).

(

REMINDER
Typing the RETURN key terminates Command
Mode in all cases. In commands which then
go into Text Mode, typing the LINE FEED key
(symbolized as i-) produces the terminator.
c.

The edited text.

4-14

(

PART I

$lNPUTr

Original Source for Edit
R0 IJ TI

t.ne

ICHAf~,

(R5).

r: L R

:'CLS)
(RS)+,RMAX
CR5)+,MODAOR

.UPDATE CKSUM
J CI EAR DO~,'E
.GET ADR i'AAX
,GET ADR MODE
.R5 NO~ PO 1rJTS TO POINTER

~1nv

Mnv
$ CKt~ ODE : fi I

n,

FlNE

$CKNUL: TSTB
~EGl

; IS

JNO---TRY BINARY

ICHAR

JASCII"':-IS

CK

JYES--NO GO

ASCII
C~AR

A NULL

OK0

~U8

REG!
L·! S
f'!LR

BIC

iSTB
I1EQ

r.LR
~jMP

fNo

EKOCNT
$OK
iCHAR

,VES---OONE EKO Of LAST?
IYES

iNO- .... OROP NEW CHAR

CKA _ _ _ _ _ _ _ _ _ _ _ _ _

DUN

iWHAT is THE CHAR
eMPS
RNE
MOV
TNC
MOV

RR.

CKUPP:

ICHAR,#CTRLC
CI'iWpp

-

J I SIT

j NO

I YE:S~-ECHO tC

HDUN
#ABRTAD.20(R6)
PLUS1

ioioOLE REtURN ADR

I

r.MPB
REQ

RR

Ate

#UPC,OCHA~

AR,#CTRLP

K1
REST AD
OK0
RESTAO;
ICHAR
ROUN
#UP ,OCHAR
P Sl

(

'Iii I S

R'NE

MOVe

~jSR

(

{iI".;nDIH:'F, #f'\SCI I

CK8IN

r.MPe

R"JE

SJF2CKI

11 SE

.LOOK AT MODE TO SEe: Ir
@lMODADR.#PARBtT jSlJPPOSED TO CHECK PARiTY?
PAROK
,NO
ICHAR.OCHAR
I n:S--"CK IT
R7,PARGEN
tCHAR,OCHAR
J
PAROK
iOK?
#PARERR,~"10DADR INO---SET ERR BIT
OCHAR
#177200.ICHAR
iSTRIP PARITY
@lHHRADD) • #K8D ~IS THIS KBD INPUT

SCKPARI BITh

(

hi r r 0 R

RV NON F'l U: 0 r: VICE S

leo ~ ~; 0 ~. u ~ PUT

iCHAR,#RJBOUr
CK

PUT

I~HA
,#RU

CK

i

U
AR

4-15

OV~)

"'If

2 (R5-----

CK
#9 LASH,OCHA
( 5) +
R5

EKO
~CHAR,#

CKTAB
#UPU, CHAR
ICHA
@lRM X,@)R5
#6, tR5)+

@'H
E~O
CKTAS:

r.MPR

JCHAR.#HTAB

JIS IT A TAB

RNE

CKCR

,NO
'YES---ECHO BLANKS
iSET UP COUNTER

MnV
MOV
RR

r!II

JNO-- .. TRY BINARY

TSTP.

lCHAR

flF.:C

CK

)ASCI 1·:::' ... 15 CHAR A NULL
IYES .... NO GO

RITE

RNE
MOVA
.ISH
~LJH

CLH

('C"'.I\R

11117200.!CHAR

(,,:MPR

rr·lit(RAOD) .#KRD

RNE:

l; K2!

TST~

rr(OCNT

~EQ

~Oi':

ICi-iAR

CLR

sow:

.J~?

/'

(

iOK?

#?ARERR,@"100AOR • Nn ....... SET ERR BIT

BIC

SJP2CKI

IlnOK AT MODE TO sn: IF
lc., ~1 0 !) A0 R• # PAq a I T ISUPPOSED TO C~EC!( PARITY7
,NO
rARot<
JYE'S .... ·CK IT
ICHAR,OCHAR
R7,PARGEN
ICHAR,OCHAR
J
PAKOK

F;£O
HIS

PAROl<:

CKSUM
JCIEAR on.!\lE
.GET AD~ MAX
JGF'T AOR ~~OOE
IRS NOW ponns TO POINTER
'U~OATE

@MODl'lnp, #i\SCII

SCK~"'Dr::BITB

SCKNUli

BV NON f"IlE DEVICES

.

.STRIP PARtTY
tIs THIS KBD INPUT
INCl
.VF.:S., .... DONE EKO OF' LAST?
JvrS
I NO ... ", ... OROP NEW CHAR

cKDUN

JWHAT IS THE CHAR
OK~

lIS IT A tC
,NO

t
5.3.1.2
Return to Previous Sequence, <
5.3.1.3
5.3.2
Calculating Offsets, niO
Breakpoints
5.3.3
5.3.4
Single-Instruction Mode

5-14
5-14
5-15
5-15
5-15
5-16
5-16
5-17

5.4

5-18

ERROR DETECTION

PROGRAMMING CONSIDERATIONS
5.5
Functional Organization
5.5.1
5.5.2
Breakpoints
Search
5.5.3
5.5.4
Teletype Interrupt

5-19
5-20
5-20
5-25
5-26

5.6
OPERATING PROCEDURES
Loading Procedures
5.6.1
5.6.2
Start and Restart
Assembling ODT
5.6.3

5-27
5-27
5-27
5-28

5-i

CHAPTER 5
DEBUGGING OBJECT PROGRAMS ON-LINE
5.1

INTRODUCTION

ODT-ll (On-line Debugging Technique for the PDP-ll) is a system program

-

-

--

-

which aids in debugging assembled object programs.

From the Teletype

keyboard you interact with ODT and the object program to:

(

•

print the contents of any location
alteration,

for examination or

•

run all or any portion of your object program using the
breakpoint feature,

•

search the object program for specific bit patterns,

•

search the object program for words which reference a specific
word,

•

calculate offsets for relative addresses.

During a debugging session you should have at the teleprinter the
assembly listing of the program to be debugged.

Minor corrections to the

program may be made on-line during the debugging session.

(

The program may

then be run under control of ODT to verify any change made.

Major correc-

tions, however, such as a missing subroutine, should be noted on the
assembly listing and incorporated in a subsequent updated program assembly.
A binary tape of the debugged program can be obtained by use of the
DUMPAB program (see Chapter 6, Section 6.3).

(

5.1.1

ODT-ll and ODT-llX

There are two versions of ODT included in the PDP-ll Paper Tape Software
System:

a standard version, ODT-ll, and an extended version, ODT-llX.

Both versions are independent, self-contained programs.

ODT-llX has all

the features of ODT-ll, plus some additional features.

Each version is

supplied on two separate paper tapes:
binary tape.

The purpose of the

tape~

a source tape and an absolute
and loading and starting procedures

are explained in a later section of this chapter.
ODT-ll is completely described in Section 5.2, and the additional
features of ODT-llX are covered in Section 5.3.
(

In all sections of this

chapter, except where specifically stated, reference to ODT applies to
both versions.

Concluding sections are concerned with ODT's internal
5-1

operations -- how breakpoints are effected, how it uses the "trace trap"
and the T-bit, and other useful da.ta. Such information is not necessary
to efficiently use ODT, but is available for anyone desiring such indepth information.

(~
..

The following discussion assumes that the reader is familiar with
the PDP-11 instruction formats and the PAL-11A Assembly Language as
described in Chapter 3.
5.1.2 ODT's Command Syntax
ODT's commands are composed using the following characters and symbols.
They are often used in combination with the address upon which the operation is to occur, and are offered here for familiarization prior to
their thorough coverage which follows. Unless indicated otherwise,
n below represents an octal address.
n/

open the word at location n

/

reopen last opened location

n\

(SHIFT/L) open the byte at location n (ODT-11X only)

\

reopen the last opened byte (ODT-11X only)

c
(

(LINE FEED key) open next sequential location
1

open previous location

t

RETURN

close open location and accept the next command

2

take contents of opened location, index by contents of
PC, and open that location
@

take contents of opened location as absolute address and
open that location (ODT-11X only)

>

take contents of opened location as relative branch
instruction and open referenced location (ODT-11X only)

<

return to sequence prior to last @, >, or + command
and open succeeding location (ODT-I1X only)

$n/

open general register n (0-7)

IThe circumflex, A, appears on some keyboards and printers in place
of the up~arrow.
2The underline, _, appears on some keyboards and printers in place
of the back-arrow.
5-2

(

C·

separates commands from command arguments (used with
alphabetic commands below)
i

(

B

remove Breakpoint(s)
(see description of each ODT
version for particulars)

niB

set Breakpoint at location n

nirB

set Breakpoint r at location n (ODT-llX only)

irB

remove rth !?reakpoint (ODT-llX only)

niE

search for instructions that reference Effective
address n

niW

search for

inS

enable Single-instruction mode (n can have any value
and is not significant) i disable breakpoints

is

disable

niG

Go to location n and start program run

iP

Proceed with program execution from breakpointi stop
when next breakpoint is encountered or at end of
program

~ords

with bit patterns which match n

~ingle-instruction

mode

In Single-instruction mode only (ODT-llX), Proceed to
execute next instruction only

(
niP

Proceed with program execution from breakpointi
stop after encountering the breakpoint n times.
In Single-instruction mode only (ODT-llX), Proceed to
execute next n instructions.

n/(word)miO

calculate Offset from location n to location m

$B/

ODT-ll, open Breakpoint status word
ODT-llX, open !reakpoint 0 status word

$H/

open search Mask

$S/

open location containing user program's Status register

$P/

open location containing ODT's

~riority

level

with ODT-ll, location references must be to even numbered l6-bit words.
With ODT-llX, location references may be to l6-bit words or 8 bit
bytes.
The semicolon in the above commands is ignored by ODT-ll, but is
used for the sake of consistency,

since similar commands to ODT-llX

require it.
5-3

5.2

COMMANDS AND FUNCTIONS

When ODT is started as explained in Section 5.6, it will indicate its

r

readiness to accept commands by printing an asterisk on the left margin
of the teleprinter paper.
most commands;

In response to the asterisk, you can issue

for example, you can examine and, if desired, change a

word, run the object program in its entirety or in segments, or even
search core for certain words or references to certain words.

The dis-

cussion below will first explain some elementary features before covering
the more sophisticated features.
All commands to ODT are stated using the characters and symbols

(

shown above in Section 5.1.2.
5.2.1

Opening, Changing, and Closing Locations

An open location is one whose contents ODT has printed for examination,
and whose contents are available for change.

A closed location is one

whose contents are no longer available for change.

Any even-numbered

location may be opened using ODT-ll.

(

The contents of an open location may be changed by typing the new
contents followed by a single character command which requires no argument (i.e.,

~,

~

RETURN,

+,

@, >, <).

Any command typed to open a loca-

tion when another location is already open, will first cause the
currently open location to be closed.
5.2.1.1

(

The Slash, I

One way to open a location is to type its address followed by a slash:
~10001012746

Location 1000 is open for examination and is available for change.

Note

that in all examples ODT's printout is underlined; your typed input is
not.
Should you not wish to change the contents of an open location,

5-4

t

r

merely type the RETURN key and the location will be closed; ODT will
print another asterisk and wait for another command,

However, should

you wish to change the word, simply type the new contents before
giving a command to close the location.
*1000/012746

012345

*
In the example above, location 1000 now contains 012345 and is closed
since the RETURN key was typed after entering the new contents, as

(

indicated by ODT's second asterisk.
Used alone, the slash will reopen the last location opened:
*1000/012345

~/002340

(

2340

As shown in the example above, an open location can be closed by typing
the RETURN key.

In this case, ODT changed the contents of location 1000

to 002340 and then closed the location before printing the *

We then

typed a single slash which directed ODT to reopen the last location
opened.

This allowed us to verify that the word 002340 was correctly

stored in location 1000.

(ODT supplies the leading zeroes if not

given.)
Note again that opening a location while another is currently open
will automatically close the currently open location before opening the
new location.
5.2.1.2

The LINE FEED Key

If the LINE FEED key is typed when a location is open, ODT closes the
open location and opens the next sequential location:
*1000/002340
001002/012740
(
\

+

(+

denotes typing the LINE FEED key)

In this example, the LINE FEED key instructed ODT to print the address
of the next location along with its contents and to wait for further
instructions.

After the above operation, location 1000 is closed and
5-5

1002 is open.
contents.
5.2.1.3

The open location may be modified by typing the new

The Up-Arrow,

t

The up-arrow (or circumflex) symbol is effected by typing the SHIFT
and N key combination. If the up-arrow is typed when a location is
open, ODT closes the open location and opens the previous location
(as shown by continuing from the example above) :
001002/012740
001000/002340

( t is printed by typing SHIFT and N)

t

Now location 1002 is closed and 1000 is open.
be modified by typing the new contents.
5.2.1.4

The Back-Arrow,

The open location may

(

+

The back-arrow (or underline) symbol is effected by typing the SHIFT
and 0 key combination. If the back-arrow is typed to an open location,
ODT interprets the contents of the currently open location as an
address indexed by the Program Counter (PC) and opens the location so
addressed:
*1006/000006 +
001016/100405

( + is printed by typing SHIFT and

(

0)

Notice in this example that the open location, 1006, was indexed by
the PC as if it were the operand of an instruction with address mode
67 as explained in Chapter 3.

(

A modification to the opened location can be made before a -l-, t ,
or + is typed. Also, the new contents of the location will be used
for address calculations using the + command. Example:
*100/000222 4-l000102/000111 6 t
000100/000004 100+
000202/(contents)

(modify to 4 and open next location)
(modify to 6 and open previous location)
(change to 100 and open location indexed
by PC)

5-6

(

(~.

5.2.1.5

Accessing General Registers 0-7

The program's general registers 0-7 can be opened using the following
command format:

~$n/

where n is the integer representing the desired register (in the range

o

through 7).

When opened, these registers can be examined or changed

by typing in new data as with any addressable location.

(

*$0/000033

For example:

(RO was examined and closed)

*'
and
*$4/000474

(

464

*'

(R4 was opened, changed, and closed)

The example above can be verified by typing a slash in response to
ODT's asterisk:
Y000464
The

(

+,

~

+,

or @ commands may be used when a register is open (the

@ is an ODT-llX command).

\

5.2.1.6

Accessing Internal

Re~isters

The program's Status Register contains the condition codes of the most
recent operational results and the interrupt priority level of the
object program.

It is opened using the following command:

~$S/000311

where $S represents the address of the Status Register.

In response

to $S/ in the example above, ODT printed the 16-bit word of which only
the low-order 8 bits are meaningful:

Bits 0-3 indicate whether a carry,

overflow, zero, or negative (in that order) has resulted, and bits 5-7

5-7

indicate the interrupt priority level (in the range 0-7) of the object
program.
(See Chapter 1 of this manual or the PDP-II Handbook

(i

for the Status Register format.)
The $ is used to open certain other internal locations:
$B

internal breakpoint status word (see Section 5.2.2.2)

$M

mask location for specifying which bits are to be
examined during a bit pattern search (see Section
5.2.4)

$p

location defining the operating priority of ODT
(see Section 5.2.6)

$S

location containing the condition codes (bits 0-3)
and interrupt priority level (bits 5-7)

5.2.2

(

Breakpoints

The breakpoint feature facilitates monitoring the progress of program
execution.

A breakpoint may be set at any instruction which is not

referenced by the program for data.

When a breakpoint is set, ODT

(

replaces the contents of the breakpoint location with a trap instruction so that when the program is executed and the breakpoint is
encountered, program execution is suspended, the original contents
of the breakpoint location are restored, and ODT regains control.
5.2.2.1

Setting the Breakpoint, niB

(

ODT-ll provides only one breakpoint (ODT-llX provides eight breakpOints).

However, the breakpoint may be changed at any time.

breakpoint is set

by

The

typing the address of the desired location of

the breakpoint followed by iB.

For example:

,.

*102 0 i B
'*
'

sets the breakpoint at location 1020.

The breakpoint above is

changed to location 1120 as shown below.
*1020i B
'*1120i B
'*
5-8

.

Breakpoints should not be set at locations which are referenced
by the program for data, or on an lOT, EMT, or TRAP instruction.

This

restriction is explained in Section 5.5.2.
The breakpoint is removed by typing ;B without an argument, as
shown below.
*1120;B
*;B

.~

(sets breakpoint at location 1120)
(removes breakpoint)

"*
(
5.2.2.2

Locating the Breakpoint, $B

The command

$B/ causes the ODT-ll version to print the address of

the breakpoint (see also Section 5.3.3 on $B in ODT-IIX):

(

~$B/001120

The breakpoint was set at location 1120.

$B represents the address

containing ODT-ll's breakpoint location.

Typing the RETURN key in

the example above will leave the breakpoint at location 1120 and
return control to ODT-ll, or the breakpoint could be changed to a

(

different location:
*$B/001120
'*$B/001114
'*

1114

The breakpoint was found in location 1120, changed to location 1114,
and the change was verified.
If no breakpoint was set, $B contains an address internal to
ODT-ll.

(
5-9

(-5.2.3

Running the Program, niG and niP

Program execution is under control of ODT. There are two conunands for
running the program: niG and niP. The niG command is used to start
execution (§.o) and niP to continue (E.roceed) execution after having
halted at a breakpoint.
For example:
~lOOOiG

starts execution at location 1000. The program will run until encountering a breakpoint or until program completion, unless it gets caught in
an infinite loop, where you must either restart or reenter as explained
in Section 5.6.2.

(

When a breakpoint is encountered, execution stops and ODT-ll prints
Bi followed by the address of the breakpoint. You may then examine
desired locations for expected data. For example:
*lOlOi B
'*lOOOiG
Bi001010

*

(breakpoint is set at location 1010)
(execution started at location 1000)
(execution stopped at location 1010)

c

To continue program execution from the breakpoint, type iP in
response to ODT-ll's last *
When a breakpoint is set in a loop, it may be desirable to allow
the program to execute a certain number of times through the loop before
recognizing the breakpoint. This may be done by typing the niP command
and specifying the number of times the breakpoint is to be encountered
before program execution is suspended (on the nth encounter).
(See
Section 5.3.3 for ODT-llX interpretation of this command when more
than one breakpoint is set in a loop.)

(

Example:
Bi001010
*125 0 iB

*4iP
Bi001250

*

(execution halted at breakpoint)
(set breakpoint at location 1250)
(continue execution, loop through
breakpoint 3 times and halt on the
4th occurrence of the breakpoint)
5-10

(

The breakpoint repeat count can be inspected by typing $B/ and
following that with the typing of LINE FEED. The repeat count will
then be printed. This also provides an alternative way of specifying
the count. The location, being open, can have its contents modified
in the usual manner by the typing of new contents and then the RETURN
key.
Example:
*$B/001114 +
nnnnnn/000003 6

(address of breakpoint is 1114)
(repeat count was 3, changed to 6)

*

(

Breakpoints are inserted when performing an n;G or niP command.
Upon execution of the n;G or niP command, the general registers 0-6
are set to the values in the locations specified as $0-$6 and the
processor status register is set to the value in the location specified
as $S.

(
5.2.4

Searches

With ODT you can search all or any specified portion of core memory
for any specific bit pattern or for references to a specific location.
The location represented by $M is used to specify the mask of
the search. The next two sequential locations contain the lower and
upper limits of the search. Bits set to 1 in the mask will be
examined during the search; other bits will be ignored. For example,
*$M/OOOOOO 177400
nnnnnn/OOOOOO 1000
nnnnnn/OOOOOO 1040

+
+

(+
denotes typing LINE FEED)
(starting address of search)
(last address in search)

*

(

where nnnnnn represents some location in ODT. This location varies
and is meaningful only for reference purposes. Note that in the first
line above, the slash was used to open $M which now contains 177400,
and that the LINE FEEDs opened the next two sequential locations which
now contain the lower and upper limits of the search.

5-11

5.2.4.1

Word Search n;W

Before initiating a word search, the mask and search limits must be
specified as explained above.

Then the search object and the initiat-

ing command are given using the n;W command where n is the search
object.

When a match is found, the address of the unmasked matching

word is printed.

For example:

*$M/OOOOOO 177400
nnnnnn/OOOOOO 1000
nnnnnn/OOOOOO 1040
*400;W
001010/000770
001034/000404

~

(test high order eight bits)
}
(initiating word search)

*

(

In the search process, the word currently being examined and
the search object are exclusive ORed (XORed), and the result is
ANDed to the mask.

If this result is zero, a match has been found,

and is reported on the teleprinter.

Note that if the mask is zero,

all locations within the limits will be printed.
5.2.4.2

(

Effective Address Search, n;E

ODT enables you to search for words which address a specified location.

After specifying the search limits (Section 5.2.4), the command

n;E is typed (where n is the effective address), initiating the search.
Words which are either an· absolute address (argument n itself), a

(

relative address offset, or a relative branch to the effective address
will be printed after their addresses.
*$M/177400 1nnnnnn/OOlOOO
nnnnnn/00l040
*1034;E
001016/001006
001054/002767
*1020;E
.
001022/177774
001030/001020

For example:

1010
1060
(initiating search)
(relative branch)
(relative branch)
(initiating a new search)
(relative address offset}
(ahso1ute address)

*

(
5-12

Particular attention should be given to the reported references
to the effective address because a word may have the specified bit
pattern of an effective address without actually being so used.

ODT

will report these as well.
5.2.5

Calculating Offsets, niO

Relative addressing and branching involve the use of an offset - the
number of words or bytes forward or backward from the current location
to the effective address.

During the debugging session it may be

necessary to change a relative address or branch reference by replacing one instruction offset with another.

(

ODT calculates the offsets

for you in response to its n;O command.
The command niO causes ODT to print the 16-bit and 8-bit offsets
from the currently open location to address n.
offset is printed as a 16-bit word.
*346/000034
*/000022
*20/000046

(

~20/000067

In ODT-ll, the 8-bit

For example:

414iO

000044

000022

22

200iO

000156

000067

67

In the first example, location 346 is opened and the offsets from
that location to location 414 are calculated and printed.

The contents

of location 346 are then changed to 22 and verified on the next line.

r

The 16-bit offset is printed followed by the 8-bit offset.

In the

example above, 000156 is the 16-bit offset and 000067 is the 8-bit
offset.
The 8-bit offset is printed only if the 16-bit offset is even, as
was the case above.

With ODT-ll only, the user must determine whether

the 8-bit offset is out of the range of 177600 to 000177 (-128 10 to
127 10 ), The offset of a relative branch is calculated and modified
as follows:
*1034/103421

*

1034iO

177776

177777

103777

(
Note that the modified low-order byte 377 must be combined with the
5-13

unmodified high-order byte. Location 1034 was still open after the
calculation, thus typing 103777 changed its contents; the location
was then closed.
5.2.6

ODT's Priority Level, $p

$p represents a location in ODT that contains the priority level at
which ODT operates. If $p contains the value 377, ODT will operate
at the priority level of the processor at the time ODT is entered.
Otherwise $p may contain a value between 0 and 7 corresponding to the
fixed priority at which ODT will operate.
To set ODT to the desired priority level, open $P.
print the present contents, which may then be changed:
*$P/000006

*'

ODT will

(

377

If $P is not specified, its value will be seven.
Breakpoints may be set in routines at different priority levels.
For example, a program running at a low priority level may use a
device service routine which operates at a higher priority level. If
a breakpoint occurs from a low priority routine, if ODT operates at
a low priority, and if an interrupt does oCcur from a high priority
routine, then the breakpoints in the high priority routine will not
be executed since they have been removed.
5.3

c
(

ODT-11X

ODT-11X has all the commands and features of ODT-11 as explained in
Section 5.2, plus the following.
5.3.1

Opening, Changing and Closing Locations

In addition to operating on words, ODT-11X operates on bytes.
One way to open a byte is to type the address of the byte
followed by a backs1ash:
~1001\

025

( \ is printed by typing SHIFT and L)

5-14

(

A backs1ash typed alone will reopen the last open byte.

If a word

was previously open, the backs lash will reopen its even byte.
~1002/000004\004

The LINE FEED and up-arrow (or circumflex) keys will operate on bytes
if a byte is open when the command is given.

For example:

*1001\ 025 t
001002\004 t
001001\025

*
(

5.3.1.1

Open the Addressed Location, @

The symbol @ will optionally modify, close an open word, and USe its
contents as the address of the location to open next.
*1006/001024 @
001024/000500
*1006/001024 2100 @
002100/177774

(
5.3.1.2

(open location 1024 next)
(modify to 2100 and open
location 2100)

Relative Branch Offset, >

The right angle bracket, >, will optionally modify, close an open
word, and use its even byte as a relative branch offset to the next
word opened.
*1032/000407 301 >
000636/000010

(modify to 301 and interpret as
a relative branch)

Note that 301 is a negative offset (-77).

The offset is doubled be-

fore it is added to the PC; therefore, 1034 + -176 = 636.

5.3.1.3

Return to Previous Sequence, <

The left angle bracket, <, will optionally modify, close an open
location, and open the next location of the previous sequence

@, or > command. Note that ~, @, or > will
cause a sequence change to the word opened. If a sequence change
has not occurred, < will simply open the next location as a LINE
FEED does. The command will operate on both words and bytes.
5-15
interrupted by

a~,

*1032/000407 301
000636/000010 <

(> causes a sequence change)

>

«

causes a return to original
sequence)
(@ causes a sequence change)
« now operates on byte)
« acts like + )

001034/001040 @
001040/000405\ 005 <
001035 002 < --001036 004

5.3.2

r

Calculating Offsets, niO

The command niO causes ODT to print the 16-bit and 8-bit offsets from
the currently open location to address n.

The following examples,

repeated from the ODT-ll section describing this command (see Section
5.2.5), show only a difference in printout format:

(
*346/000034
*/000022
*1034/103421
'!../103777

414;0

1034iO

000044

022

177776

22

377 \ 021

377

Note that the modified low-order byte 377 must be combined with" the

(
'-.

unmodified high-order byte.
5.3.3

Breakpoints

With ODT-IIX you can, at anyone time, have up to eight breakpoints set,
numbered 0 through 7.

The niB command used in ODT-ll to set the break-

point at address n will set the next available breakpoint in ODT-IIX.

(

Specific breakpoints may be set or changed by the nirnB command where m
is the number of the breakpoint.
*1020iB
*1030iB
*1040iB
*1032ilB

For example:
(sets breakpoint 0)
(sets breakpoint 1)
(sets breakpoint 2)
(resets breakpoint 1)

*
The iB command used in ODT-ll to remove the only breakpoint will remove
all breakpoints in ODT-IIX.

To remove only one of the breakpoints, the

inB command is used, where n is the number of the breakpoint.

5-16

For example:

(

*;2B

(removes the second breakpoint)

'*
The $B/ command will open the location containing the address of
breakpoint O.

The next seven locations contain the addresses of the

other breakpoints in order, and thus can be opened using the LINE FEED
key.

(The next location is for Single-instruction mode, explained in

the next section.)

Example:

*$B/001020 -Innnnnn/001032 -Innnnnn/(address internal to ODT)
/

~.

In this example, breakpoint 2 is not set.
address internal to ODT.

The contents will be an

After the table of breakpoints is the table

of Proceed command repeat counts for each breakpoint, and for the Sing1einstruction mode (see Section 5.3.4).

c

nnnnnn/001036
nnnnnn/nnnnnn
nnnnnn/OOOOOO
nnnnnn/OOOOOO

-I-I-I-

15 -I-

(address of breakpoint 7)
(single-instruction address)
(count for breakpoint 0)
(count for breakpoint 1)

It should be noted that a repeat count in a Proceed command refers

(

only to the breakpoint that has most recently occurred.

Execution of

other breakpoints encountered is determined by their own repeat counts.
5.3.4

Single-Instruction Mode

With this mode you can specify the number of instructions you wish
executed before suspension of the program run.

The Proceed command,

instead of specifying a repeat count for a breakpoint encounter, specifies
the number of succeeding instructions to be executed.

Note that break-

points are disabled when single-instruction mode is operative.

(
5-17

Commands for single-instruction mode follow:

(-

inS

Enables Single-instruction mode (n can have any
value and serves only to distinguish this form
from the form is); breakpoints are disabled.

niP

Proceeds with program run for next n instructions
before reentering ODT (if n is missing, it is
assumed to be 1).
(Trap instructions and
associated handlers can affect the Proceed repeat
count. See Section 5.5.2.)

is

Disables §.ingle-instruction mode

When the repeat count for Single-instruction mode is exhausted

(

and the program suspends execution, ODT prints:
B8i n

*
where n is the address of the next instruction to be executed.

The

$B breakpoint table contains this address following that of breakpoint 7.

However, unlike the table entries for breakpoints 0-7, the

(

B8 entry is not affected by direct modification.
Similarly, following the repeat count for breakpoint 7,
repeat count for Single-instruction mode.

is the

This table entry, however,

may be directly modified, and thus is an alternative way of setting
the Single-instruction mode repeat count.

In such a case, iP implies

(

the argument set in the $B repeat count table rather than the argument 1.
5.4

ERROR DETECTION

ODT-ll and ODT-llX inform you of two types of errors:

illegal or

unrecognizable command and bad breakpoint entry.
Neither ODT-ll nor ODT-I1X checks for the legality of an address
when commanded to open a location for examination or modification.
Thus, the command

(

177774/
5-18

(--

will reference nonexistent memory, thereby causing a trap through the
vector at location 4. If this vector has not been properly initialized
(by lOX, or the user program if lOX is not used), unpredictable results
will occur.
Similarly, a command such as
$20/
which references an address eight times the value represented by $2,
may cause ari illegal (nonexistent) memory reference.

(

Typing something other than a legal command will cause ODT to
ignore the command, print
?

'*
(

and wait for another command. Therefore, to cause ODT to ignore a
command just typed, type any illegal character (such as 9 or RUBOUT)
and the command will be treated as an error, i.e., ignored.
ODT suspends program execution whenever it encounters a breakpoint,
i.e., a trap to its breakpoint routine. If the breakpoint routine is
entered and no known breakpoint caused the entry, ODT prints:
BE001542

*
and waits for another command. In the example above, BE001542 denotes
Bad ~ntry from location 001542. A bad entry may be caused by an
illegal trace trap instruction, setting the T-bit in the status
register, or by a jump to the middle of ODT.
5.5

PROGRAMMING CONSIDERATIONS

Information in this section is not necessary for the efficient use of

(
5-19

ODT. However, its content does provide a better understanding of
how. ODT performs some of its functions.
5.5.1

(-~ !

Functional Organization

The internal organization of ODT is almost totally modularized into
independent subroutines. The internal structure consists of three
major functions: command decoding, command execution, and various
utility routines.
The command decoder interprets the individual commands, checks
for command errors, saves input parameters for use in command execution,
and sends control to the appropriate command execution routine.

(
The command execution routines take parameters saved by the
command decoder and use the utility routines to execute the specified
command. Command execution routines exit either to the object program
or back to the command decoder.
The utility routines are common routines such as SAVE-RESTORE
and I/O. -They are used by both the command decoder and the command
executers.

(

Communication and data flow are illustrated in Figure 5-1.
5.5.2

Breakpoints

The function of a breakpoint is to give control to ODT whenever the
user program tries to execute the instruction at the selected address.
Upon encountering a breakpoint, the user can utilize all of the ODT
commands to examine and modify his program.
When a breakpoint is executed, ODT-ll(X) removes (all) the breakpoint instruction(s} from the user's code so that the locations may
be examined and/or altered. ODT then types a message to the user of
the form Bn(Bmin for ODT-llX) where n is the breakpoint address
(and m is the breakpoint number). The breakpoints are automatically
restored when execution is resumed.
A major restriction in the use of breakpoints is that the word

5-20

(

t

(

(

c

1
INTERNAL
TABLE MANIPULATION
COMMANDS

USER

I

I

---------------------~

,---4---

ODT
INTERNAL
TABLES

t

PROGRAM

I
I

--------+----------

UTILITY

~

L.-_R_OU_T_!_N_E_S_...
_
(I/O,ETC.)

OGUUT

c

USER ENVIRONMENT

OOT
LEGEND
Flow of conlrol - - . Flow of doto
1\-0065

Figure 5-1

Communication and Data Flow
5-21

where a breakpoint has been set must not be referenced by the program
in any way since ODT has altered the word. Also, no breakpoint should
be set at the location of any instruction that clears the T-bit. For
example;
MOV ,240,177776

;SET PRIORITY TO LEVEL 5.

A breakpoint occurs when a trace trap instruction (placed in the user
program by ODT) is executed. When a breakpoint occurs, the following
steps are taken:
1.
2.
3.
4

5.
6.
7.
8.
9.
10.
11.

12.
13.
14.
15.
16.
17.
18.

Set processor priority to seven (automatically set by
trap instruction).
Save registers and set up stack.
If internal T-bit trap flag is set, go to step 13.
Remove breakpoint(s).
Reset processor priority to ODT's priority or user's
priority.
Make sure a breakpoint or, Single-instruction mode caused
the interrupt.
If the breakpoint did not cause the interrupt, go to
step 15.
Decrement repeat count.
Go to step 18 if non-zero, otherwise reset count to one.
Save Teletype status.
Type message to user about the breakpoint or Singleinstruction mode interrupt.
Go to command decoder.
Clear T-bit in stack and internal T-bit flag.
Jump to the "GO" processor.
Save Teletype status.
Type "aE,j (Bad Entry) followed by the address.
Clear the T-bit, if·set, in the user status and proceed
to the command decoder.
Go to the "proceed" processor, bypassing the TTY restore
routine.

Note that steps 1-5 inclusive take approximately 100 microseconds
during which time interrupts are not permitted to occur (ODT is running
at level 7).
5-22

(

(

(

r

When a proceed (iP) command is given, the following occurs:
1.
2.
3.

4.
5.
6.

(

When a breakpoint is placed on an lOT, EMT, TRAP, or any instruction causing a trap, the following occurs:
L

2.

(

3.

4.
5.

6.
/

(

The proceed is checked for legality.
The processor priority is set to seven.
The T-bit flags (internal and user status) are set.
The user registers, status, and Program Counter are
restored.
Control is returned to the user.
When the T-bit trap occurs, steps 1, 2, 3, 13, and 14
of the breakpoint sequence are executed, breakpoints
are restored, and program execution resumes normally.

When the breakpoint occurs as described above, ODT
is entered.
When iP is typed, the T-bit is set and the lOT, EMT, TRAP,
or other trapping instruction is executed.
This causes the current PC and status (with the T... bit
included) to be pushed on the stack.
The new PC and status (no T-bit set) are obtained from
the respective trap vector.
The whole trap service routine is executed without any
breakpoints.
When an B.TI is executed, the saved PC and PS (including
the T-bit) are restored. The instruction following the
trap-causing instruction is executed. If this instruction is not another trap-causing instruction, the T-bit
trap occurs, causing the breakpoints to be reinserted in
the user program, or the Single-instruction mode repeat
count to be decremented. If the following instruction is
a trap-causing instruction, this sequence is repeated,
starting at step 3.
.
NOTE
Exit from the trap handler must be via the RTI instruction. Otherwise, the T-bit will be lost. ODT
will not gain control again since the breakpoints
have not been reinserted yet.

In ODT-ll, the iP command is illegal if a breakpoint has not
occurred (ODT will respond with ?). In ODT--lIX, iP is legal after
any trace trap entry.

WARNING
Since ODT-ll ignores all semicolons, typing the
ODT-llX form of breakpoint command number to
ODT-ll, specifying a breakpoint number n, causes
the following error:

100iB (sets the breakpoint at location 100)
100iOB (sets the breakpoint at location 1000)
100i4B (sets the breakpoint at location 1004)
The internal breakpoint status words for ODT-ll have the following
format:
1.

2.

The first word contains the breakpoint address. If
this location points to a location within ODT, it is
assumed no breakpoint is set for the cell (specifically,
ODT has set a dummy breakpoint within itself) .

(

The next word contains the breakpoint repeat count.

For ODT-llX (with eight breakpoints) the formats are:
1.

2.

The first eight words contain the breakpoint addresses
for breakpoints 0-7.
(The ninth word contains the
address of the next instruction to be executed in
Single-instruction mode.)

(

The next eight words contain the respective repeat
counts.
(The following word contains the repeat count
for Single-instruction mode.)

These words may be changed at will by the user, either by using the
breakpoint commands or by direct manipulation with $B.
When program runaway occurs (that is, when the program is no
longer under ODT control, perhaps executing an unexpected part of
the program where a breakpoint has not been placed) ODT may be
given control by pressing the HALT key to stop the machine, and
restarting ODT (see Section 5.6.2).

ODT will print *, indicating

that it is ready to accept a command.
If the program being debugged uses the Teletype for input or
output, the program may interact with ODT to cause an error since
ODT uses the Teletype as well.

This interactive error will not

occur when the program being debugged is run without ODT.

5-24

(

1.

If the Teletype printer interrupt is enabled upon entry
to the ODT break routine, and no output interrupt is
pending when ODT is entered, ODT will generate an unexpected interrupt when returning control to the program.

2.

If the interrupt of the Teletype reader (the keyboard)
is enabled upon entry to the ODT break routine, and the
program is expecting to receive an interrupt to input a
character, both the expected interrupt and the character
will be lost.

3.

If the Teletype reader (keyboard) has just read a character into the reader data buffer when the ODT break
routine is entered, the expected character in the
reader data buffer will be lost.

5.5.3

Search

The word search allows the user to search for bit patterns in specified
sections of memory.

Using the $M/ command, the user specifies a mask,

a lower search limit ($M+2), and an upper search limit ($M+4).

The

search object is specified in the search command itself.
The word search compares selected bits (where ones appear in the

(

mask) in the word and search object.

If all of the selected bits are

equal, the unmasked word is printed.
The search algorithm is:

(

1.

Fetch a word at the current address.

2.

XOR (exclusive OR) the word and search object.

3.

AND the result of step 2 with the mask.

4.

If the result of step 3 is zero, type the address of
the unmasked word and its contents. Otherwise, proceed
to step 5.

5.

Add two to the current address.
If the current address
is greater than the upper limit, type * and return to the
command decoder, otherwise go to step 1.

Note that if the mask is zero, ODT will print every word between
t~e

limits, since a match occurs every time (i.e., the result of step

3 is always zero).

(

In the effective address search, ODT interprets every word in the

5-25

search range as an instruction which is interrogated for a possible
direct relationship to the search object.

(--'

The algorithm for the effective address search is (where (x)
denotes contents of X, and K denotes the search object) :
1.
2.
3.
4.
5.

5.5.4

Fetch a word at the current addressX.
If (X) =K [direct reference], print contents and go to
step 5.
If (X)+X+2=K [indexed by PC], print contents and go to
step 5.
If (X) is a relative branch to K, print contents.
Add two to the current address. If the current
address is greater than the upper limit, perform a
carriage return/line feed and return to the command
decoder; otherwise, go to step 1.

(

Teletype Interrupt

Upon entering the TTY SAVE routine, the following occurs:

1.
2.
3.
4.

(
Save the LSR status register (TKS).
Clear interrupt enable and maintenance bits in the TKS.
Save the TTY status register (TPS).
Clear interrupt enable and maintenance bits in the TPS.

c

To restore the TTY:
1.
2.
3.

Wait for completion of any I/O from ODT.
Restore the TKS.
Restore the TPS.
~lARNINGS

If the TTY printer interrupt is enabled upon entry to
the ODT break routine, the following may occur:
1. If no output interrupt is pending when ODT is
entered, an additional interrupt will always
occur when ODT returns control to the user.
2. If an output interrupt is pending upon entry,
the expected interrupt will occur when the user
regains control.
5-26

(

WARNINGS (cont.)
If the TTY reader (keyboard) is busy or done, the expected
character in the reader data buffer will be lost.
If the TTY reader (keyboard) interrupt is enabled upon
entry to the ODT break routine, and a character is pending, the interrupt (as well as the character) will be
lost.
5.6

OPERATING PROCEDURES

This section describes assembling and loading procedures for ODT,
restarting and reentering procedures, error recovery, and setting
the priority level of ODT.

(
5.6.1

Loading Procedures

ODT-ll and ODT-llX are supplied on source and binary tapes.
tapes are assembled as explained in Section 5.6.3.

Source

Binary tapes of

either version are loaded into core memory using the Absolute Loader,
as explained in Section 6.2.2.

(

When using ODT's binary tapes, the

object program should be loaded prior to loading ODT, since ODT is
started when loaded.
ODT-ll is loaded into core starting at location 13026, and requires
about 533 10 locations of core.
ODT-llX is loaded into core starting
at location 12054, and requires about 800 words of core.

(

5.6.2

Starting and Restartin2

After loading ODT into core, i t is automatically started by the
Absolute Loader.
printing an

ODT indicates its readiness to accept input by

*

When ODT is started at its start address, the SP register is
set to an ODT internal stack, registers RO-R5 are left untouched,
and the trace trap vector is initialized.

If ODT is started after

breakpoints have been set in a program, ODT will forget about the
breakpoints and will leave the program modified, i.e., the break(

pOint instructions will be left in the pr()gram.

5-27

There are two ways of restarting ODT:
1.

Restart at start address+2

2.

Reenter at stait address+4

To restart, key in the start address+2

c--

(13030 for ODT-ll or

12056 for ODT-IIX), press LOAD ADDRess and then START.

A restart

will save the general registers, remove all the breakpoint instructions from the user program and then forget all breakpoints, i.e.,
simulate the iB command.
To reenter, key in the load address+4

(13032 for ODT-ll or

12060 for ODT-IIX), press LOAD'ADDRess and then START.

A reenter

(

will save the general registers, remove the breakpoint instructions
from the user program, and ODT will type the BE (Bad Entry) error
message.
r~set

5.6.3

ODT will remember which breakpoints were set and will

them on the next iG command (iP is illegal after a Bad Entry).

(

Assembling ODT

If the program being debugged requires storage where the version of
ODT being used is normally loaded, it is necessary to reassemble ODT
after changing the starting location.
The source tape of ODT is in three segments, each separated from
the next by blank tape.
.=n
.EOT

The first segment contains:

(

(standard location setting statement)

where n=13026 for ODT-ll or n=12054 for ODT-IIX.

This statement

tells the Assembler to start assembling at address n.

To relocate

ODT to another starting address, substitute for segment one a source
tape consisting of:
.=n

en is the new load address for ODT)

(
5-28

C--

The

.EOT statement tells the Assembler that this is the end of the

segment but not the end of the program -- the Assembler will stop and
wait for another tape to be placed in the reader.
The second segment of tape contains the ODT source program.

This

segment is also terminated with .EOT.
The third segment of the tape consists of the statement:
.END
(.

O.ODT

where .END means "end of program" and O.ODT represents the starting
address of the program (see Section 6.2.3).
When relocating ODT, the first segment of the source tape must

(

be changed to reflect the desired load address.

The third segment

may be changed to .ENO without a start' address.

The latter will caus,e

the Loader to halt upon completion of loading.
The 'segmentation allows the following assembly forms:
1.

Assemble alone but at a new address. A new segment one
must be generated and assembled with segments two and three.

2.

Assemble immediately after the user's program to be debugged. Assemble the tape of the user,' s program (ending
with .EOT) followed by ODT's segment two and either segment
three or a new segment three.

3.

Assemble inside the program to be debugged. Assemble the
first part of the user program (ending with .EOT) followed
by ODT's second segment followed by the second part of the
user program.

When setting locations before assembling, it must be noted that
immediately preceding ODT a minimum internal stack of 40S bytes is
required for the ODT-ll and 116 a bytes is required for ODT-IIX.
Additional room must be allocated for subroutine calls and possible
interrupts while ODT is in control.

(

Twelve bytes maximum will be used

by ODT proper for subroutine calls and interrupts, giving a minimum
safe stack space of 528 bytes for ODT-ll or130 S bytes for ODT-IIX.

5-29

Once a new binary tape of ODT has been assembled, load it using

(-~-

the Absolute Loader as explained in Section 6.2.2. Normally, the
program to be debugged is loaded beforeODT, since ODT will automatically
be in control immediately after loading, unless the third segment of
ODT's source tape was alt~red before assembly. As soon as the tape is
read in, ODT will print an * on the Teletype to indicate that it is·
ready for a command.

(~

(

(

(
5-30

CHAPTER 6
LOADING AND DUMPING CORE MEMORY

6.1
THE BOOTSTRAP LOADER
Loading the Loader Into Core
6.1.1
6.1. 2
Loading Bootstrap Tapes
6.1. 3
Bootstrap Loader Operation

6-2
6-3
6-5
6-6

6.2
THE ABSOLUTE LOADER
6.2.1
Loading the Loader Into Core
Loading Absolute Tapes
6.2.2
6.2.3
Absolute Loader Operation

6-8
6-8
6-8
6-10

6.3
CORE MEMORY DUMPS
Operating Procedures
6.3.1
Output Formats
6.3.2
6.3.3
Storage Maps

6-12
6-13
6-14
6-14

6-i

CHAPTER 6
Loading and Dumping Core Memory

When your PDP-II computer is first received its core memory is completely
demagnetized -- it "knows" absolutely nothing, not even how to receive
paper tape input. However, the computer can accept data when toggled
directly into core using the console switches. Since the Bootstrap Loader
program is the very first program to be loaded, it must be toggled into
core.
The Bootstrap Loader (see Section 6.1) is a program which instructs
the computer to accept and store in core data which is punched on paper
tape in bootstrap format. The Bootstrap Loader is used to load very short
paper tape programs of 162 8 16-bit words or less -- primarily the Absolute
Loader and Memory Dump Programs. Programs longer than 162 8 16-bit words
must be assembled into absolute binary format using the PAL-IIA Assembler
and loaded into core using the Absolute Loader.
The Absolute Loader (see Section 6.2) is a system program which enables
you to load into any available core memory bank data punched on paper tape
in absolute binary format. It is used primarily to load the paper tape system softw·are (excluding certain subprograms) and object programs assembled
with PAL-llA.
The loader programs are loaded into the upper-most area of available
core so that they will be available for use with system and user programs.
When writing your programs be aware·that they should not use the locations
used by the loaders without restoring their contents; otherwise, the loaders will have to be reloaded since they would have been altered by your
object program.
Core memory dump programs {see Section 6.3) are used to print or punch
the contents of specified areas of core. For example,. when developing or
debugging user programs it is often necessary .to get a copy of the program
or portions of core. There are two dump programs supplied in the paper
tape software system: DUMPTT, which prints or punches the octal representation of all or specified portions of core, and DUMPAB, which punches all
or specified portions of core in absolute binary format suitable for loading with the Absolute Loader •.
6-1

The Bootstrap Loader should be loaded (toggled) into the highest core memory bank. The locations and corresponding instructions of the Bootstrap
Loader are listed and explained below.
Instruct,J"on

~Qc:atiQn

xx7744
xx7746
xx7750
xx7752
xx7754
xx7756
xx7760
xx7762
xX7764
xx7166
xx7770
xx7772
xx1774
xx7776
Figure 6-1.

016701
000026
012702
000352
005211
105711
100376
116162
000002
xx7400
005267
177756
000765
yyyyyy

(

Bootstrap Loader Instructions

In Figure 6-1, Xx represents the highest available memory bank.

For
example, the first location of the Load.er would be one of the following,
depend.ing on memory size, and xx in all subsequent locations would be the
same as the first.
LOca:tion
017744
037744
057744
077744
117744
137744
157744

/

(,

Mem9l:'y Siz e

o

41<

1

8K

2

12K

3

16K

4

20K

5

241<

6

28K

:Note also in Figure 6-1 that the contents of location xx7766 should reflect
the appropriate memory bank in the same manner as the location.
The contents of lOcation xx7776 (yyyyyy in the tnstruction column of
Figure 6~1) should contain the device status register address of the paper

6-2

C,J

tape reader to be used when loading the bootstrap formatted tapes.

(-

Either

paper tape reader may be used, and each is specified as follows:

6.1.1

Teletype Paper Tape Reader

177560

High-Speed Paper Tape Reader

177550

Loading the Loader Into Core

With the computer initialized for use as described in Chapter 2, toggle in
the Bootstrap Loader as explained below.

(

1.

Set xx7744 in the Switch Register (SR) and press LOAD
ADDRess (xx7744 will be displayed in the ADDRESS REGISTER.

2.

Set the first instruction, 016701, in the SR and lift
DEPosit (016701 will be displayed in the DATA register).
NOTE
When DEPositing data into consecutive words,
the DEPosit automatically increments the ADDRESS REGISTER to the next word.

(

3.

Set the next instruction, 000026, in the SR and lift
DEPosit (000026 will be displayed in the DATA register).

4.

Set the next instruction in the SR, press DEPosit, and
continue depositing subsequent instructions (ensure
that location xx7766 reflects the proper memory bank)
until after 000765 has been deposited in location xx7774.

5.

Deposit the desired device status register address in
location xx7776, the last location of the Bootstrap
Loader.

It is good progranuning practice to verify tha.t all instructions al;.e stored
correctly. This is done by proceeding at step 6 below.

(

6.

Set xx7744 in the SR and press LOAD ADDRess.

7.

Press EXAMine (the octal instruction in location xx7744
will be displayed in the DATA register so that it can
be compared to the correct instruction, 016701.
If
the instruction is correct, proceed to step 8, otherwise
go to step 10.

8.

Press EXAMine (the instruction of the location displayed
in the ADDRESS REGISTER will be displayed in the DATA
register; compare the DATA register contents to the instruction for the displayed location.
6-3

9.

Repeat step 8 until all instructions have been verified
or go to step 10 whenever the correct instruction is not
displayed.

c-

Whenever an incorrect instruction is displayed, it. can be
corrected by performing steps 10 and 11.
10.

11.
12.

With the desired location displayed in the ADDRESS REGISTER,
set the correct instruction in the SR and lift DEPosit (the
contents of the SR will be deposited in the displayed location) .
Press EXAMine to ensure that the instruction was correctly
stored (it will be displayed in the DATA register) .
Proceed at step 9 until all instructions have been
verified.

The Bootstrap Loader is now loaded into core. The procedures
above are illustrated in the flowchart of Figure 6-2.

(

Set

Load

Verify

(

Press EXAM

Set SR to 016701
Lift DEP
Set SR

Figure 6-2.

Loading and Verifying the
Bootstrap Loader
6-4

(

6.1.2

r--

Loading Bootstrap Tapes

Any paper tape punched in bootstrap format is referred to as a bootstrap
tape(see Section 6.l.3} and is loaded into core using the Bootstrap Loader.
Bootstrap tapes begin with about two feet of special bootstrap leader code
(ASCII code 351, not blank leader tape as is required by the Absolute Loader).
Wi th the Bootstrap Loader in core, the bootstrap tape will be loaded into
core starting anywhere between location xx7400 and location xx7743, i.e.,
162 8 words.

The paper tape input device used is that which is specified in

location xx7776 (see Section 6.l.l.).
Bootstrap tapes qre loaded into core as explained below.

(

(

1.

Set the ENABLE/HALT switch to HALT.

2.

Place the bootstrap ta.pe in the specified reader
with the special bootstrap leader code over the
reader sensors (under the reader station).

3.

Set the SR to xx7744 (the starting address of the
Bootstrap Loader) and press LOAD ADDRess.

4.

Set the ENABLE/HALT switch to ENABLE.

5.

Press START.
The bootstrap tape will pass through
the reader as data is being loaded into core.

6.

The bootstrap tape stops after the last frame of
data (see Figure 6-5) has been read into core.
The program on the bootstrap is now in core.

The procedures above are illustrated in the flowchart of Figure 6-3 .

.,... - - - - -I See Figure 6-2

(
Figure 6-3.

Loading Bootstrap Tapes Into Core
6-5

Should the bootstrap tape not read in immediately after depressing the
START switch( it would be due to anyone of the following:
1.

Bootstrap Loader not correctly loaded.

2.

Using the wrong input device.

3.

Code 351 not directly over the reader sensors.

4.

Bootstrap tape not properly positioned in reader.

6.1.3

Bootstrap Loader Operation

The Bootstrap Loader source program is shown below.
in the

e~ample

The starting address

denotes that the Loader is to be loaded into memory bank zero

(a 4K system) .
000001
000002
017400
'~}1~
017744

017750
017754
017756
017760
017762
017770
017774
017776

017744
016701
000026
012702
000352
005211
105711
100376
116162
000002
017400
005267
177756
000765
000000

START:
LOOP:
ENABLE:
WAIT:

Rl=%l
iUSED FOR THE DEVICE ADDRESS
"
R2=%2
iUSED FOR THE LOAD ADDRESS DISPLACEMENT
LOAD=17400
iDATA MAY BE LOADED NO LOWER
iTHAN THIS
.=17744
iSTART ADDRESS OF THE BOOTSTRAP LOADER
MOV DEVICE,Rl
iPICK UP DEVICE ADDRESS,
iPLACE IN Rl
MOV #.-LOAD+2,R2 iPICK UP ADDRESS
iDISPLACEMENT
INC @Rl
iENABLE THE PAPER TAPE
TSTB @Rl
iREADER
iWAIT UNTIL FRAME
BPL WAIT
iIS AVAILABLE
MOVB 2 (Rl) ,LOAD (R2)
iSTORE FRAME READ
iFROM TAPE IN MEMORY
INC LOOP+2

BRNCH:
DEVICE:

Figure 6-4.

BR LOOP

o

iINCREMENTLOAD ADDRESS
iDISPLACEMENT
i GO BACK AND READ MORE DATA
iADDRESS OF INPUT DEVICE

(

(

(

The Bootstrap Loader Program

The program above is a brief

e~ample

of the PAL-llA Assembly Language

which is explained in Chapter 3.
\Bootstrap tapes are coded in the following format.
351
Special bootstrap leader code (at least two feet
in length)
351
xxx

Load offset (see text below)

AM

6-6

(

BBB
CCC

ZZZ
301
035
026
000
302
025

373
yyy

Program to be loaded (up to 162 8 words or 3448
frames)

Boot overlay code, as shown.
Jump offset (see text below)

Figure 6-5.

(

Bootstrap Tape Format

The Bootstrap Loader starts by loading the device status register address into Rl and 3528 into R2. The next instruction indicates a read
operation in the device and the next two instructions form a loop to wait
for the read operation to be completed. When data is encountered it is
transferred to a location determined by the sum of the index word (xx7400)
and the contents of R2.

f

(

Because R2 is initially 352 8 , the first word is moved to location
xx7752, and it becomes the immediate data to set R2 in the neXt execution
of the loop. This immediate data is then incremented by one and the pro~
gram branches to the beginning of the loop.
The leader code, plus the increment, is equal in value to the data
placed in R2 during the initiali~ation; therefore, leader code has no effect on the lOader program. Each time leader code is read the processor
executes the same loop and the program remains unmodified. The first code
other than leader code, however, replaces the data to be loaded into R2
with some other value which acts as a pointer to the program starting lOca~
tion (loading address). Subsequent bytes are read not into the location
of the immediate data but into consecutive core locations. The program
will thus be read in byte by byte. The INC instruction which operates all.
the data for R2 puts data bytes in sequential locations, and requires that
the value of the leader code and the offset be one less than the value desired in R2.

(

The boot overlay code will overlay the first two instructions of the
Loader, because the last data byte is placed in the core location immedi-

ately preceding the Loader.

The first instruction is unchanged by the over-

lay, but the second instruction is changed to place the next byte read, jump
offset, into the lower byte of the branch instruction.

(:

By changing the off-

set in this branch instruction, the Loader can branch to the start of the
loaded program or to any point within the program.
The Bootstrap Loader is self-modifying, and the program loaded by the
Loader restores the Loader to its original condition by restoring the contents of locations xx7752 and xx7774 to 000352 and 000765 respectively.
6.2

THE ABSOLUTE LOADER

The Absolute Loader is a system program which, when in core, enables you to
load into any core memory bank data punched on paper tape in absolute binary
format.

(

It is used primarily to load the paper tape system software (exclud-

ing certain subprograms) and your object programs assembled with PAL-IIA.
~he

major features of the Absolute Loader include:

6.2.1

1.

Testing of the checksum on the input tape to assure complete,
accurate loads.

2.

Starting the loaded program upon completion of loading without additional user action, as specified by the .END in the
program just loaded.

3.

Specifying the load bias of position independent programs
at load-time rather than at assembly time, by using the desired Loader switch register option.

(

Loading the Loader Into Core

The Absolute Loader is supplied on punched paper tape in bootstrap format.
Therefore, the Bootstrap Loader is used to load the Absolute Loader into
core.

It occupies locations xx7474 through xx7743, and its starting address

is xx7500.

The Absolute Loader program is 72 10 words long, and is loaded
adjacent to the Bootstrap LOader as explained in Section 6.1.2.
6.2.2

Loading Absolute Tapes

Any paper tape punched in absolute binary format is referred to as an absolute tape,and is loaded into core using the Absolute Loader.
the Absolute Loader, there are two types of load available:
reloGated.

6-8

When using
normal and

(

A normal load occurs when the data is loaded and placed in core according
to the load addresses on the object tape. It is specified by setting bit 0
of the Switch Register to zero immediately before starting the load.
There are two types of relocated loads.
a.

Loading to continue from where the loader left off
after the previous load .This is used, for example, when the object program
being loaded is contained on more than one tape.
It is specified by setting the Switch Register to
000001 immediately before starting the load.

b.

(

Loading into a specific area of core This is normally used when loading position independent programs. A position independent program
is one which may be loaded and run anywhere in
available core. The program is written. using the
position independent instruction format (see Chapter 9). This type of load is specified by setting
the Switch Register to the .load bias and adding
1 to it (i.e., setting bit 0 to 1).

(
\,.

Optional switch register settings for the three types of loads are
listed below.
Type of Load
Normal

Switch Register
Bits 1-14
Bit 0
(ignored}

0

Relocated - continue
loading where left off

0

1

Relocated - load in
specified area of core

nnnnn
(specified
address)

1

The absolute tape may be loaded using either of the paper tape readers.
The desired reader is specified in the last word of available core memory
(xx7776), the input device status word, as explained in Section 6.1. The
input device status word may be changed at any time prior to loading the
absolute tape.
With the Absolute Loader in core as explained in Section 6.1.2, absolute tapes are loaded as explained below.
6-9

1.

Set the ENABLE/HALT switch to HALT.
To use an input device different from that used when
loading the Absolute Loader, change the address of the
device status word (in location xx7776) to reflect the
desired device, i.e., 177560 for the Teletype reader
or 177550 for the high-speed reader.

2.

Set the SR to xx7500 and press LOAD ADDR.

3.

Set the SR to reflect the desired type of load (Figure
E-3 in Appendix E) .

4.

Place the absolute tape in the proper reader with blank
leader tape directly over the reader sensors.

5.

Set ENABLE/HALT to ENABLE.

6.

Press START. The absolute tape will begin passing through
the reader station as data is being loaded into core.
.

(\
\

(

If the absolute tape does not begin passing through the reader station,
the Absolute Loader is not in core correctly. Therefore, reload the Loader
and start over at step 1 above. If it halts in the middle of the tape, a
checksum error occurred in the last block of data read in.
Normally, the absolute tape will stop passing through the reader station when it encounters the transfer address as generated by the statement,
.END, denoting the end of a program. If the system halts after loading,
check that the low byte of the DATA register is zero. If so, the tape is
correctly loaded. If not zero, a checksum error (explained later) has occurred in the block of data just loaded, indicating that some data was not
correctly loaded. Thus, the tape should be reloaded starting at step 1
above.

(

When loading a continuous relocated load, subsequent blocks of data
are loaded by placing the next tape in the appropriate reader and pressing
the CONTinue switch.
The Absolute Loader may be restarted at any time by starting at step 1
above.

6.2.3

Absolute Loader Operation

The Loader uses the eight general registers (RO-R7) and does not preserve
or restore their previous contents. Therefore, caution should be taken to
restore or load these registers when necessary after using the Loader.
!

6 ... 10

(

C--

A block of data punched on paper tape in absolute binary format has
the following format.
FRAME 1

k

2
3
4
5
6

001
000

xxx
xxx
yyy
yyy

zzz

(

(

start frame
null frame
byte count (low 8 bits)
byte count (high 8 bits)
load address (low 8 bits)
load address (high 8 bits)
data is
placed
here
last frame contains a block checksum

A program on paper tape may consist of one or more blocks of data.
Each block having a byte count (frames 3 and 4) greater than six will
cause subsequent data to be loaded into core (starting at the address specified in frames 5 and 6 under a normal load). The byte count is a positive
integer containing the total number of bytes in the block, excluding the
checksum. When the byte count of a block is equal to six the specified load
address is checked to see whether the address is to an even or to an odd
location. If even, the Loader will transfer control to the address specified.
Thus the loaded program will be run upon completion of loading. If
odd, the loader halts.
The transfer address (TRA) may be explicitly specified in the SOUrce
program by placing the desired address in the operand field following the
.END statement. For example,
.END AI,.PHA
specifies the symbolic location ALPHA as the TRA, and
. END
causes the Loader to halt.

With

.END nnnnnn

(

the Loader will also halt if the address (nnnnnn) is odd.
The checksum is displayed in the low byte of the OATA register of the
6-11

computer console.

Upon completion of a load, the low byte of the DATA

register should be all zeros (unlit).

Otherwise, a checksum error has

occurred, indicating that the load was not correct.

The checksum is the

low-order byte of the negation of the sum of all the previous bytes in the
block.

When all bytes of a block, including the checksum, are added to-

gether the low-order byte of the result should be zero.

If not, some

data was lost during the load or erroneous data was picked up; the load
was incorrect.

When a checksum error is displayed, the entire program should

be reloaded, as explained in the previous section.

The loaders occupy core

memory as illustrated below.
xx7776

I/O Device Word

(

Bootstrap Loader
xx7744
Absolute Loader
xx7500

Loader Stack

xx7474

(

User and
System
Programs

6. 3

CORE MEMORY DUMPS

A core memory dump program is a system program which enables you to dump

(

(print or punch) the contents of all or any specified portion of core memory
onto the Teletype printer and/or punch,

line printer or high-speed punch.

There are two dump programs available in the Paper Tape Software System:
1.

DUMPTT, which dumps the octal representation of the
contents of specified portions of core onto the teleprinter, low-speed punch, high-speed punch, or line
printer.

2.

DUMPAB, which dumps the absolute binary code of the
contents of specified portions of core onto the lowspeed punch or high-speed punch.

(
Both dump programs are supplied on punched paper tape in bootstrap and absolute binary formats.

The bootstrap tapes are loaded over the Absolute

6-12

Loader as explained in Section 6.1.3, and are used when it would be undesirable to alter the contents of user storage (below the Absolute
Loader).

The absolute binary tapes are position independent and may be

loaded and run anywhere in core as explained in Section 6.2.2.
DUMPTT and DUMPAB are very similar in function, and differ

prlmarl~y

in the type of output they produce.
6.3.1

Operating Procedures

Neither dump program will punch leader or trailer tape, but DUMPAB will
always punch ten blank frames of tape at the start of each block of data
dumped.

(

(

Operating procedures for both dump programs follow:
1.

Select the dump program desired and place it in the
reader specified by location xx7776 (see Section 6.1).

2.

If a bootstrap tape is selected, load it using the
Bootstrap Loader, Section 6.1.2. When the computer
halts go to ?tep 4.

3.

If an absolute binary tape is selected, load it using
the Absolute Loader (Section 6.2.2), relocating as
desired.
Place the proper start address in the Switch Register,
press LOAD ADDRess and START.
(The start addresses
are shown in Section 6.3.3).

(

4.

When the computer halts, enter the address of the
desired output device status register in the Switch
Register and press CONTinue (low-speed punch and teleprinter=177564; high-speed punch = 177554;
line
printer = 177514).

5.

When the computer halts, enter in the Switch
Register the address of the first byte to be dumped
and press CONTinue. This address must be even when
using DUMPTT.

6.

When the computer halts again enter in the Switch
Register the address of the last byte to be dumped
and press CONTinue. When using the low-speed punch,
set the punch to ON before pressing CONTinue.

7.

Dumping will now proceed on the selected output device.

8.

When dumping is complete, the computer will halt.

If further dumping is desired, proceed to step 5.
6-13

It is not necessary

to respecify the output device address except when changing to another
output device.

In such a case, proceed to the second paragraph of step 3

to restart.
If DUMPAB is being used, a transfer block must be generated as described below.

If a tape read by the Absolute Loader does not have a

transfer block, the loader will wait in an input loop.
the program may be manually initiated.

In such a case,

However, this practice is not

recommended, as there is no guarantee that load errors will not occur
when the end of the tape is read.
The transfer block is generated by performing step 5 with the transfer address in the Switch Register, and step 6 with the transfer address
minus I in the Switch Register.

If the tape is not to be self-starting,

(

an odd-numbered address must be specified in step 5 (000001, for example).
The dump programs use all eight general registers and do not restore
their original contents.

Therefore, after a dump the general registers

should be loaded as necessary prior to their use by subsequent programs.

(
6.3.2

Output Formats

The output from DUMPTT is in octal in the. following format:
xxxxxx>yyyyyy yyyyyy yyyyyy yyyyyy yyyyyy yyyyyy yyyyyy yyyyyy
where xxxxxx is the address of the first location printed or punched, and

(

yyyyyy are words of data, the first of which starts at location xxxxxx.
This is the format for every line of output.

There will be no more than

eight words of data per line, but there will be as many lines as are needed
to complete the dump.
The output from DUMPAB is in absolute binary, as explained in Section
6.2.3.
6.3.3

Storage Maps

The DUMPTT program is 87 words long.

When used in absolute format the

storage map is:

(

6-14

xx7776
xx7744
Absolute Loader
xx7500
xx7474
,-.

Loader Stack Space

xxxxxx+256
DUMPTT

(

xxxxxx
Two-word Stack Space

xxxxxx

=

desired load address

=

start address

(
When used in bootstrap format the storage map is:
xx7776
Bootstrap Loader
xx7744
DUMPTT

start
address=xx7440
xx7434

Two;"'word Stack Space

(
6... 15

The DUMPAB program is 65 10 words long.

When used in absolute format

the storage map is:

xx7776
Bootstrap Loader
xx7744

Absolute Loader
xx7500
xx7474

Loader Stack Space

(

xxxxxx+202
DUMPAB
Two-word Stack Space

xxxxxx

xxxxxx

=

desired load address

=

(
start address

When used in bootstrap format the storage map is:

(

xx7776
Bootstrap Loader
xx7744
DUMPAB
start
address=xx7500
xx7474

Two-word Stack Space

6-16

CHAPTER 7
INPUT/OUTPUT

PROG~~ING

7.1
7.1.1
7.1.2

INTRODUCTION
Loading IOX
Assembling IOX

7-1
7-3a
7-3b

7.2
7.2.1
7.2.2

THE DEVICE ASSIGNMENT TABLE
Reset
Init

7-3
7-3
7-4

7.3
7.3.1
7.3.2
7.3.3
7.3.3.1
7.3.3.2
7.3.3.3
7.3.3.4
7.3.4

BUFFER ARRANGEMENT IN DATA TRANSFER
Buffer Size
Mode Byte
Status Byte
Non-Fatal Error Codes
Done Bit
End-of-Medium Bit
End-of-File Bit
Byte Count

7.4
7.4.1
7.4.2
7.4.3
7.4.4

MODES
Formatted ASCII
Unformatted ASCII
Formatted Binary
Unformatted Binary

7-8
7-8
7-11
7-11
7-12

7.5
7.5.1
7.5.2
7.5.3
7.5.4
7.5.5
7.5.6
7.5.7
7.5.8
7.5.9

DATA TRANSFERS
Read
Write
Device Conflicts in Data Transfer Commands
Waitr (Wait, Return)
Waitr vs. Testing the Buffer Done Bit
Single Buffer Transfer on One Device
Double Buffering
Readr (Real-Time Read)
Writr (Real-Time Write)

7-12
7-12
7-13
7-13
7-14
7-15
7-16
7-17
7-17
7-18

7.6
7.6.1
7.6.2

REENABLING THE READER AND RESTARTING
Seek
Restart

7-18
7-18
7-19

7.7

FATAL ERRORS

7-19

7.8

EXAMPLE OF PROGRAM USING IOX

7-20

7.9
7.9.1
7.9.2
7.9.3
7.9.4
7.9.5
7.9.5.1
7.9.5.2
7.9.5.3

IOX INTERNAL INFORMATION
Conflict Byte/Word
Device Interrupt Table (DIT)
Device Status Table (DST)
Teletype Hardware Tab Facility
Adding Devices to IOX
Device Codes
Table Modification
Interrupt Routines

7-22
7-22
7-23
7-24
7-24
7-24
7-25
7-25
7-27

7-i

CO~mNDS

7-4
7-5
7-5
7-6
7-6
7-7
7-7
7-8
7-8

CHAPTER 7
INPUT/OUTPUT PROGRAMMING

e,

7.1

INTRODUCTION

lOX, the PDP-II Input/Output eXecutive, frees you from the details of dealing directly with the I/O devices.

It also provides certain programming

formats so that programs written for the paper tape software system may be
used in a monitor environment later with only minor coding changes.
lOX provides asynchronous I/O service for the following non-fileoriented external devices:
1.

Teletype keyboard, printer, and tape reader and

2.

High-speed paper tape reader and punch

punc~

For Line Printer handli.ng, in addition to all lOX facilities, IOXLPT is
available.
Simple I/O requests can be made, specifying devices and data forms for
interrupt-controlled data transfers, which can be occurring concurrently with
the execution of a running user program.

Multiple I/O devices may be run-

ning single or double buffered I/O processing simultaneously.
Real-time capability is provided by allowing user programs to be executed at device priority levels upon completion of a device action or data

CO',

·transfer.

'--_.""

Communication with lOX is accomplished by lOT (Input/Output Trap) instructions in the user's program.

Each lOT is followed by two or three

words consisting of one of the lOX commands and its operands.

The

rox

com-

mands can be divided into two categori.es:
1.

those concerned with establishing necessary conditions for
performing input and output (mainly initializations), and

2.

those concerned directly with the transfer of data.

When transfer of data is occurring, lOX is operating at the priority
level of the device.

The calling program runs at its priority level, either

concurrent with the data transfer, or sequentially.

7-1

Programming format for commands is:
lOT
.WORD (an address)
.BYTE (a command code),(a slot number)
Before using the data transfer commands, two preparatory tasks must
be performed:
1.

Since device specifications are made by referencing "slots"
in lOX's Device Assignment Table (DAT) rather than devices
themselves, the slots specified in your code must have devices assigned to them.

2.

The buffer, whose address is specified in your code, must
be set up with information about the data.

In those non-data-transfer commands where an address or slot number does
not apply, a 0 must be used.

(

Addresses or codes indicated can, of course,

be specified symbolically.
NOTES:

(

1.

At load time lOX loads the following interrupt and trap vectors: Teletype keyboard, Teletype printer, high-speed reader,
high-speed punch, illegal memory reference, and lOT. An error
HALT is placed in location 40.

2.

The number of words required by lOX is 634 10 ; for IOXLPT, about 725 10
words.

3.

lOX is not position-independent, but may be reassembled anywhere
in core. As supplied, its load address is 15100; IOXLPT's load
address is 34600.

(
\

The following program segment illustrates a simple input-process-output sequence.

It includes:

a.

The setting up of a single buffer

b.

All necessary initializations

c.

A formatted ASCII read into the buffer

d.

A wait for completion of the read

e.

Processing of data just read

f.

A write command from the buffer.

7-2

(

WAIT:

RESET=2
READ=ll
WAITR=4
WRITE=12

iASSIGN lOX COMMAND CODES

lOT
.WORD fJ
.BYTE RESET,fJ

iIOX RESET TO DO NECESSARY
iINITIALIZATIONS INCLUDING
iINITING SLOT 0 FOR KBD, AND 1 FOR TTY

lOT
.WORD BUFFER
.BYTE READ,fJ

iTRAP TO lOX
iSPECIFY BUFFER
iREAD FROM KBD (SLOT 0) TILL
iLINE FEED OR FORM FEED

lOT
.WORD WAIT

iTRAP TO lOX
iBUSY RETURN ADDRESS WHILE WAITING
iFOR KBD TO FINISH
iWAIT FOR KBD (SLOT 0) TO FINISH

.BYTE WAITR,fJ
(process BUFFER)

(

BUFFER:

(

lOT
.WORD BUFFER
.BYTE WRITE,l

iTRAP TO lOX
iSPECIFY BUFFER
iWRITE TO TELEPRINTER (SLOT 1)

IfJfJ
fJ
fJ
.=.+lfJfJ

iBUFFER SIZE IN BYTES
iCODE FOR FORMATTED ASCII MODE
iIOX WILL SET HERE THE NUMBER OF BYTES READ
iSTORAGE RESERVED FOR 100 BYTES

In more complex programming it is likely that more than one buffer will be
set up for the transfer of data, so that data processing can occur concurrently rather than sequentially, as here.

Note too, that there are five

lOX commands not used in this example that will help meet the requirements
of I/O problems not as straightforward as this.
7.1.1

Loading lOX

lOX (IOXLPT) is supplied on source and binary tapes.
tapes are assembled as described in Section 7.1.2.

Source
The binary

tape of lOX (IOXLPT) is loaded with the Absolute Loader and
must be in core before the user program to which it applies.
When lOX is loading, the paper tape passes through the reader
and there is no response at the terminal to indicate that
loading is completed.
IOXLPT is used instead of

rox

if a line printer is part of

the system.

7-3

7.1.2

Assembling lOX
(_.

If there is more than 4K of core available and it is desired
to load lOX (or IOXLPT) in other than the normal location,
lOX must be reassembled.
The code
.=15100
.EOT
appears at the beginning of the first lOX tape (PAl) and
contains the starting address.

Create a new tape containing

the new starting address desired; be sure to allow enough room
for 634 10 words for lOX, 725 10 for IOXLPT.

(

For example,

.=25100
.EOT
Use PAL-11A as described in Chapter 3 to assemble lOX and
substitute the new section of tape for the first part of the
old tape (PAl).

(~

After the new section is read, insert the lOX

tape in the reader so the read head is past the old starting
address and .EOT and type the RETURN key to read in the rest
of the tape.
Now read in the second tape (PA2).

(

An EOF?

message is output at the end of the second tape.
RETURN key and the END? message is printed.
for the second pass of the assembler.

Type the

Put the tapes through

The resulting binary

tape can be used as described in paragraph 7.1.1.

(
7-3a

r

lOX (IOXLPT) can also be assembled with a user program if
desired.

The .=15100 and .EOT lines must be deleted before

lOX is assembled with a user program.

lOX can be assembled into the program wherever desired but if
i t is the first tape read by the assembler, remove it from the
reader before typing the RETURN key (after the EOF? message of the
second tape.

(lOX and IOXLPT have a

assembly pass to end when read).

.END code which would cause the

Assembling a user program and

lOX together eliminates the need to read in lOX each time
the program is run.

7.2

THE DEVICE ASSIGNMENT TABLE

Use of the Device Assignment Table (DAT) serves to make your program device-independent by allowing you to reference a slot to which a device

c

has been assigned, rather than a specific device itself.

Thus, changing

the input or output device .becomes a simple matter of reassigning a different device to the slot indicated in your program.
The DAT is set up by means of the Reset and/or Init commands.

The

lOX codes for devices (listed in the description of the Init command below)
are assigned to the slots.
(

~

7.2.1

Reset
lOT
.WORD 0
.BYTE 2,0

7-3b

This command must be the first lOX command issued by a user program.

It

clears the DAT, initializes lOX, resets all devices to their state at
power-up, enables keyboard interrupts, and initializes (Inits) DAT slots

o

and 1 for the keyboard and teleprinter respectively.

7.2.2

Init
lOT
.WORD (address of device code)
.BYTE 1, (slot number)

The devic.e whose code (stored as a byte) is found at the specified address
is associated with the specified slot (numbered in the range 0-7).
device interrupt is turned off when necessary.
always remains enabled.)

The

(The keyboard interrupt

There is no restriction on the number of slots

(

that can be Inited to the same device.
DEVICE
CODE

DEVICE
Teletype Keyboard (KBD)

1

Teletype printer

(TTY)

2

Low-speed Reader

(LSR)

3

Low-Speed Punch

(LSP)

4

High-Speed Reader (HSR)

5

High-Speed Punch

(HSP)

6

Line Printer
(IOXLPT only)

(LPT)

10

Note that a device code is used only in the Init command.
commands which reference a device, do so by means of a slot.

HSRCOD:
7.3

INIT=l
lOT
.WORD HSRCOD
.BYTE INIT,3

iTRAP TO lOX
;INIT SLOT 3
iFOR HSR

.BYTE 5

iHSR

(

All other

(
'-

Example:

CODE

BUFFER ARRANGEMENT IN DATA TRANSFER COMMANDS

Use of data-transfer commands (Read, Write, Real-time Read, Real-time Write)
requires the setting up of at least one buffer.

This buffer is used not

only to store data for processing,· but to hold information regarding the

7-4

(

quantity, form, and status of the data.

~

The

~-data

portion of the buffer

is called the buffer header, and precedes the data portion.

In data trans-

fer commands, it is the address of the first word of the buffer header that
is specified in the word following the lOT of the command.
NOTE
lOx uses the buffer header while transferring
data. The user's program must not change or
reference it.
The buffer format is:
Contents

Location

(
BUFFER
HEADER

c

Buffer

Maximum number of data bytes {unsigned integer}

Buffer+2

Mode of data {byte}

Buffer+3

Status of data {byte}

Buffer+4

Number of data bytes involved in transfer (unsigned integer)

Buffer+6

Actual data begins here

BUFFER SIZE (in Bytes

I MODE

STATUS

BYTE COUNT
DATA

(

..

7.3.1

·
··

Buffer Size

The first word of the buffer contains the size {in bytes} of the data portion of the buffer as specified by the user.
this many data bytes on input.
7. 3. 2
(

lOX will not store more than

Buffer size has no meaning on output.

Mode Byte

The low-order byte of the second word holds information concerning the mode
of transfer.

A choice of four modes exists:
7-5

Coded as
a.

Formatted ASCII

0

b.
c.
d.

Formatted Binary

1

Unformatted ASCII

2

Unformatted Binary

3

r

(or 200 to suppress echo)
(or 202 to suppress echo)

The term echo applies only to the KBD.

Data transfers from other devices

neVer involve an echo.
MODE BYTE
Bits

1=

7

3

Echo

Bits

1

2

No echo

0=

7.3.3

4

5

6

=1

Unformatted

Binary

Formatted

ASCII

(

=0

Status Byte

Bits 0-4
Bit

5

Bit

6

contain the non-fatal error codes (coded octally)
1 = End-Of-File has occurred (attempt at reading
data after an End-Of-MedLum)
1 = End-of-Medium has occurred (see Section 7.3.3.3)
1

Bit 7

=

(

Done (Data Transfer complete)
STATUS BYTE

7
1 =
DONE

5

6

1 =
EOM

1 =
EOF

4

3

2

ISEE CODES

I

I

0

1
I

I

I

1

NON-FATAL ERRORS

7.3.3.1

Non-Fatal Error Codes
28 == checksum error
3 8 == truncation of a long line
48

= an

improper mode
7-6

(-

a.

A checksum error can occur only on a Forma.tted Binary read
(see Section 7.4.3).

b.

Truncation of a long line can occur on either a Formatted
Binary or Formatted ASCII read (Section 7.4.1). This error
occurs when the binary block or ASCII line is bigger than
the buffer size specified in the buffer header. In both
cases, lOX continues reading characters into the last byte
in the buffer until the end of the binary block or ASCII
line is encountered.

c.

An improper mode can occur only on a Formatted Binary read.
Such occurrence means that the first non-null character
encountered was not the proper starting character for a
Formatted Binary block (see Section 7.4.3)

(-/

/'

7.3.3.2

(

Done Bit

When the data transfer to or from the buffer is complete, the Done Bit is
set by lOX.
7.3.3.3

End-Of-Medium Bit

The following conditions cause the EOM bit to be set in the buffer Status

c··

byte associated with a data transfer command.

An EOM occurrence also sets

the Done Bit.
HSR

HSP

LSR

LPT

No tape

No tape

No paper

Off line

No power

Timeout
detected

No power
Printer drum gate open

No power

(

Overtemperature condition
An End-Of-Medium condition on an output device is cleared by a manual
operation such as putting a tape in the high-speed punch.
tain any record of an EOM on an output device.

lOX does not re-

However, an EOM on an input

device is recorded by lOX so that succeeding attempts to read from that device will cause an End-Of-File (see Section 7.3.3.4).

To reenable input

the device must be manually readied and a Seek command (Section 7.6) executed on the proper slot.

The Init and Reset commands will also clear the

EOM condition for the device.

(
7-7

See Section 7.5.3 for information on detection of conditions causing

c-/

LSR timeouts.
When an End-Of-Medium has occurred on a Read, there may be data in the
buffer.

If an EOM has occurred on a Write, there is no way of knowing how

much of the buffer was written.
7.3.3.4

End-Of-File Bit

An EOF condition appears in the Status pyte if an attempt to read is made
after an EOM has occurred.

EOF cannot occur on output.

When an EOF has oc-

curred, no data is'available in the buffer.
7.3.4

(

Byte Count

The third word contains the Byte Count:

7.4
7.4.1

Input:

In unformatted data modes, lOX reads as many data bytes
as the user has specified.
In formatted modes, lOX inserts here the number of data bytes available in the buffer.
In all modes, if an EOM occurs, lOX will set the
Byte Count equal to the number of bytes actually read.
If an EOF occurs, Byte Count will be set to o.

Output:

Byte Count determines the number of bytes output, for
all modes. An HSP end-of-tape or LPT out-of-paper condition will also terminate output, and EOM will be set
in the Status byte. lOX does not modify the Byte Count
on output.

(

MODES
Formatted ASCII

A Formatted ASCII read transfers 7-bit characters (bit 8 will be zero)
until a line feed or form feed is read.

lOX sets the Byte Count word in

the buffer header to indicate the number of characters in the buffer.

If

the line is too long, characters are read and overlaid into the last byte
of the buffer until an end-of-line (a line feed or form feed) or EOM is
detected.

Thus, if .there is no error,

th~

buffer will always contain a

line feed or form feed.
A Formatted ASCII write transfers the number of 7-bit characters
specified by the buffer Byte Count.

Bit 8 will always be output as zero.

7-8

(

Device-DeEendent Functions
Keyboard
Seven-bit characters read from the keyboard are entered in the buffer and
are echoed on the teleprinter except as follows:
Null

Ignored. This character is not echoed or
transferred to the buffer.

Tab
(CTRL/TAB
keys)

Echoes as spaces up to the next tab stop.
"Stops" are located at every 8th carriage
position.

RUBOUT

Deletes the previous character on the current line and echoes as a backs lash (').
If there are no characters to delete, RUBOUT
is ignored.

(
CTRL/U -

Deletes the current line and echoes as tu.

Carriage
Return
(RETURN key)

Echoes as a carriage return followed by a
line feed. Both characters enter the buffer.

CTRL/P

Echoes as tP and causes a jump to the restart
address, if non-zero (see 7.6.2).

The echo may be suppressed by setting bit 7 of the buffer header Mode byte.

(

If the buffer overflows, only the characters which fit into the buffer
are echoed. Of course, characters which are deleted by RUBOUT or CTRL/U
do not read into the buffer even though they are echoed. If a carriage return causes an overflow, or is typed after an overflow has occurred, a carriage return and line feed will be echoed but only the line feed will enter
the buffer.
In the following Formatted ASCII examples:
a.
b.

(

c.

assume there is room for five characters
,) indicates:
in left column, the RETURN key
in center column, the execution of a carriage return
in right column, the ASCII code for carriage return
indicates:
,
'"
in center column, the execution of a lirle feed
in right column, the ASCII code for line feed
7-9

d.
e.

RUB
OUT

indicates the RUBOUT key

CTRL

indicates the CTRL and U keys.

(~
..

U

Typed

Echoed

ABC)

ABC) i-

ABCD)
ABCDEF ).
ABCDEF RUB)
OUT

ABCD )-}

ABC) iABCDi-

ABCD ) i-

ABCDi-

Entered Buffer

ABCD' )-}

CTRL
U

RUB .J
OUT

tU) -}

ABCDEF

RUB RUB)
OUT OUT

ABCD ,\ ) i-

ABCDEF

RUB RUB RUB x)
OUT OUT OUT

ABCD ,\ \ x)i-

.ABC)-}
) i-

(
AX )i-

Low-Speed Reader and High-Speed Reader
All characters are transferred to the buffer except that nulls and rubouts
are ignored.

(I

Teleprinter
Characters are printed from the buffer as they appear except that nulls are
ignored and tabs are output as spaces up to the next tab stop.

c

Low-Speed Punch and High-Speed Punch
Characters are punched from the·buffer as they appear except that nulls are
ignored and tabs are followed by a rubout.
Line Printer (IOXLPT only)
Characters are printed from the buffer as they appear except as follows:
~ulls

Ignored

Tab

Output as spaces up to the next tab stop.

Carriage
Return

It is assumed that a line feed or form feed
Ignored.
These characters cause the line printer "carfollows.
riage" to advance.

All characters beyond the 80th are ignored except a line feed or form feed.

7-10

c

7.4.2

r

Unformatted.ASCII

Unformatted ASCII transfers the number of 7-bit characters specified by the
header Byte Count.
Device-Dependent Functions
Keyboard
Characters are read and echoed except as follows:
Tab

Echoes as spaces up to the next tab stop.

CTRL/P

Echoes as +P and causes a jump to the restart address,_if non-zero (see 7.6.2).

(

7.4.3

Formatted Binary

Formatted Binary is used to transfer

C

ters) in blocks.

checksummed binary data (8-bit charac-

A Formatted Binary block appears as follows:

Byte (Octal)

Meaning
Start of block
Always null

xxx?
(
\

XXX..)

Block Byte Count (low-order followed by highorder). Count includes data and preceding
four bytes.

DDD
DDD
Data bytes
DDD
DDD
CCC

Checksum. Negation of the sum of all preceding bytes in the block.

lOX creates the block on output, from the buffer and buffer header.

The

Byte Count word in the buffer header specifies the number of data bytes fol-

(

lowing, which are to be output.

Note that the Byte Count output is four lar-

ger than the header Byte Count.

As the block is output, lOX calculates the

checksum which is output following the last data byte.
7-11

On Formatted Binary reads, lOX ignores null characters until the first
non-null character is read.

If this character is a 001, a Formatted Binary

block is assumed to follow and is read from the device under control of
the Byte Count value.

If the first non-null character is not 001, the read

is immediately terminated arid error code 4 is set in the Status byte.

As

\

the block is read a checksum is calculated and compared to the checksum following the block.

If the checksum is incorrect, error code 2 is set in the

Status byte of the buffer header.

If the binary block is too large (Byte

Count less 4, larger than the Buffer Size specified in the header), the
last byte of the buffer is overlaid until the last data byte has been read;
error code 3 is set in the Status byte.
Device-Dependent Functions
None.

Eight-bit data characters are transferred to and from the device and

(

buffer exactly as they appear.
7.4.4

Unformatted Binary

This mode transfers 8-bit characters with no formatting or character conversions of any kind.

For both input and output, the buffer header Byte Count

determines the number of characters transferred.
Device-Dependent Functions
None.
7.5
7.5.1

DATA TRANSFERS

(

Read
lOT
.WORD (address of first word of the buffer header)
.BYTE 11, (slot number)
This command causes lOX to read from the device associated with the

specified slot according to the information found in the buffer header.
lOX initiates the transfer of data, clears the Status byte, and returns control to the calling program.

If the device on the selected slot is busy,

or a conflicting device (see Section 7.5.3) is busy, lOX retains control
until the data transfer can be initiated.

Upon completion of the Read,

the appropriate bits in the Status byte are set by lOX and the Byte Count
word indicates the number of bytes in the data buffer.
7-12

Note that use of

the KBD while an LSR Read is in progress will intersperse KBD characters

r

into the buffer unpredictably.
7.5.2

write
lOT
.WORD (address of first word of the buffer header)
.BYTE 12, (slot number)

lOX writes on the device associated with the specified slot according to
the information found in the buffer header.

Transfer of data occurs in

the amount specified by Byte Count (Buffer+4).

lOX returns control to the

calling program as soon as the transfer has been initiated.

If the device

on the selected slot is busy, or a conflicting device is busy, lOX retains

(

control until the transfer can be initiated.

Upon completion of the Writer

lOX will set the Status byte to the latest conditions.

If a Write causes

an EOM condition, the user has no way of determining how much of his buffer
has been written (the Byte Count remains the same).
7.5.3

(

Device Conflicts in Data Transfer Commands

Because there is a physical association between the devices on the ASR Teletype, certain devices cannot be in use at the same time.

When a data trans-

fer command is given, lOX simultaneously checks for two conditions before
executing the command:
a.

Is the device requested already in use?

b.

Is there some other device in use that would result in an
operational conflict?

(

and,

lOX resolves both conflict situations by waiting until the first device is no longer busy, before allowing the requested device to start functioning.

(This is an automatic Waitr command.

See next section.)

For

example, if the LSR is in use, and either a KBD request or a second request
for the LSR itself is made, lOX will wait until the current LSR read has
been completed before returning control to the calling program.

In the

particular case of the LSR, lOX also performs a timeout check while waiting for it to become available.

(

When a Read command has been issued for the LSR, lOX waits about 100
milliseconds for each character to be read.

If no character is detected

by this time (presumably because the LSR is turned·off, or out of tape),
7-13

a timeout is declared and lOX sets EOM in the appropriate buffer Status
byte.
The following is a table listing the devices.

Corresponding to each

device on the left is a list of devices (or the echo operation) which would
conflict with it iri operation.

Device

All Possible Conflicting
Devices or Operations

TTY

Echo, KBD, TTY, LSR, LSP
Echo, KBD, TTY, LSP

LSR

KBD, LSR

LSP

Echo, KBD, TTY, LSP

HSR

HSR

HSP

HSP

KBD

(

LPT (IOXLPT only)LPT
7.5.4

Waitr (Wait, Return)
lOT
.WORD (busy return address)
.BYTE 4, (slot number)

c

Waitr, like device conflict resolution, causes lOX to test the status of
the device associated with the specified slot.

If the device (or any

possible conflicting device) is not transferring data, control is passed
to the instruction following the Waitr.
control to the busy return address.

Otherwise, lOX transfers program

If it is desired to continuously

test for completion of data transfer on the device, the busy return ad-

(

dress of the immediately preceding lOT instruction can be specified,
effecting a Wait loop.
If a slot is inited to any device other than the LSR, control is
returned to the calling program about 150 microseconds after execution
of a Waitr.

For the LSR, however, the time is about 100 milliseconds.

Note that a not-busy return from Waitr normally means the device is
available.

However, in the case of a Write, this only means that the last

character has been output to the device.
of printing or punching the character.

The device is still in the process
Thus, care must be exercised when

7-14

c

performing an IOX Reset, hardware RESET, or HALT after a Write-Waitr sequence, since these may prevent the last character from being physically

r

output.
7.5.5

waitr vs. Testing the Buffer Done Bit

Since IOX permits you to have device-independent code, it may not be known,
from run to run, what devices will be assigned to the slots in your program.
Waitr tests the status, not only of the device it specifies, but also of
all possible conflicting devices.
This means that when Waitr indicates that the device is not busy, the
data transfer on the device of interest may have been done for

sometim~.

Depending on the program and what devices are assigned to the slots for a
given run, the Waitr could have been waiting an additional amount of time

(

for a conflicting device to become free.
Where this possibility exists and buffer availability is what is of
interest, testing the Done bit of the Status byte (set when buffer transfer
is complete) would be preferable to Waitr; whereas waitr would be preferable if device availability is what is of interest.

(

This distinction is made in order to write device-independent code.
In the example below:
a.

If the devices at slots 2 and 3 could be guaranteed always
to be conflicting, neither Waitr nor testing the Done bit
would be necessary, because IOX would automatically wait
for the busy device to finish before allowing the other device to begin.

b.

If these deviceR could be guaranteed never to be conflicting,
it wouldn't matter which of these methods was used, because
Waitr couldn't be waiting extra time for a conflicting device (of no interest) to become free.

(

<,

(

Example:

PROGRAM B

PROGRAM A
IOT
• WORD BUF2
. BYTE READ, SLOT2

IOT
. WORD BUF2
.BYTE READ, SLOT2

IOT
• WORD BUFI
. BYTE READ, SLOT2

IOT
• WORD BUFI
.BYTE READ, SLOT2

rOT
. WORD BUF2
• BYTE WRITE, SLOT3

IOT
. WORD BUF2
. BYTE WRITE~ SLOT3

7-15

lcont. )

PROGRAM B

PROGRAM A
DUNTST:

TSTB BUF1+3
BPL DUNTST

DEVTST:

lOT
•WORD DEVTST
.BYTE WAITR,SLOT2

r

lOT
.WORD SLOT2DEV
.BYTE INIT, SLOT4
Programs A and B do two successive reads from. the same device into two
different buffers. Since the devices are the same, lOX waits for the first
read to finish before allowing the second to begin.
In Program A, we wish to process buffer 1. To have issued a Waitr for
the device associated with slot 2 could have meant waiting also for the de..,.
vice at slot 3 if that device were in conflict. Hence, testing the Done
bit in the buffer header is the proper choice.

(

In program B, we wish control of the device at slot 2, so that it can
be assigned to another slot and so we must know its availability. Therefore,
Waitr is appropriate.
7.5.6

Single Buffer Transfer on One Device
A:

BUSY:

lOT
.WORD BUFl
.BYTE READ,SLOT3
,

lOT
.WORD BUSY
.BYTE WAITR,SLOT3
(process buffer 1)
JMP A

(

iTRAP TO lOX
iSPECIFY BUFFER
iREAD FROM DEVICE AT
iSLOT 3 INTO BUFFER
iTRAP TO lOX

iSPECIFY BUSY RETURN ADDRESS
iWAIT FOR DEVICE AT SLOT
i3 TO FINISH READING

(

The program segment above includes a Waitr which goes to a Busy Return address that is its own lOT -- continuously testing the device at slot 3 for
availability. In this instance, involving only a single device and a
single buffer, a Done condition in the Buffer 1 Status byte can be inferred
from the availability of the device at slot 3. This knowledge assures us
that all data requested for Buffer 1 is available for processing.
Testing the Done Bit of Buffer 1 might have been used instead, but was
not necessary with only one device operating. Moreover, a Waitr, unlike a
7-16

(

Done Bit test, would detect a timeout on the LSR if that device happened

(-

to be associated with slot 3.
7.5.7

Double Buffering

A:

lOT
.WORD BUFl
.BYTE READ,SLOT3

iTRAP TO lOX
iSPECIFY BUFFER 1
iREAD FROM DEVICE AT
iSLOT 3 INTO BUFFER 1

lOT
.WORD BUF2
.BYTE READ,SLOT3

iTRAP TO lOX
iSPECIFY BUFFER 2
iREAD FROM DEVICE AT SLOT
;3 INTO BUFFER 2

(process BUFl concurrent with Read into BUF2)
B:

(

lOT
.WORD BUFl
.BYTE READ,SLOT3

;TRAP TO lOX
iSPECIFY BUFFER 1
iREAD FROM DEVICE AT
; S'LOT 3 INTO BUFFER 1

(process BUF2 concurrent with Read into BUF1)
JMP A
The example above illustrates a time-saving double-buffer scheme whereby data

(

is processed in Buffer 1 at the same time as new data is being read into Buffer 2i and, sequentially, data is processed in Buffer 2 at the same time as
new data is being read into Buffer 1.
Because lOX ensures that the requested device is free before initiating
the command, the subsequent return of control from the lOT at A implies that
the read Erior to A is completei that is, that buffer 1 is available for

(

(,

processing.

Similarly, the return of control from the lOT at B implies that

buffer 2 is available.

Wai tr' s are not r,equired because lOX has automatic-

ally ensured the device's availability before initiating each Read.
7.5.8

Readr (Real-time Read)
lOT
.WORD (address of first word of the buffer header)
.BYTE 13, (slot number)
.WORD (done-address)

The Readr command functions as the Read except that upon completion of the
data transfer, program control goes to the specified Done-address at the
(

priority level of the device.

Readr is used when you wish to execute a seg-

ment of your program immediately upon completing the data transfer.
goes to the Done address by executing a JSR R7, Done-address.
7-17

lOX

The general registers, which were saved when the last character interrupt occurred, are on the SP stack in the order indicated below:
(SP) -+

(_
.. -

Return address to lOX
R5
R4
R3
R2
Rl
RO

Return to lOX is accomplished by an RTSR7 instruction.

lOX will then re-

store all registers and return to the interrupted program.

Care should be

taken in initiating another data transfer if the specified device can conflict with device requests at other priority levels.

Waitr cannot be used

to resolve conflict situations between priority levels.
7.5.9

~\Xi tr

(

(Real-time Write)

lOT
.WORD (address of first word of the buffer header)
.BYTE 14, (slot number of device)
.WORD (done address)

(

The writr command functions as the Write except that, upon completion
of the data transfer, program control goes to the specified Done-address at
the priority level of the device.
a JSR R7,Done-address.

lOX goes to the Done-address by executing

The condition of the general registers and the re-

turn to lOX are the same as for Readr.

writr is used when you wish to exe-

cute a segment of your program immediately upon completing the data trans-

(

fer.
As in the Readr, care should be taken in initiating another data transfer if the specified device can conflict with device requests at the priority level of the calling program.
7.6
7.6.1

REENABLING THE READER AND RESTARTING
Seek
lOT
.WORD fJ
. BYTE 5, (slot number of LSR or HSR)

7-18

C

!

The Seek command clears lOX's internal End-Of-Medium (EOM) indicator
on the LSR or HSR, making possible a subsequent read on those devices.
C-/--Nith no EOM, an EOF cannot occur.

The device associated with the specified

slot remains Inited.
7.6.2

Restart
lOT
.WORD (address to restart)
.BYTE 3,0

This command designates an address at which to restart your program.
this command has been issued, typing CTRL/P on the KBD will transfer

After
pro~

gram control to the restart address, providing there is no LSR read in pro-

(

gress.

In such a case, the LSR must be turned off (causing a timeout) be-

fore typing a CTRL/P.

If the Restart address is designated as 0, the CTRL/P

Restart capability is disabled.
The Restart command does not cancel any I/O in progress.
It is the program's responsibility in its restart routine to clean up any I/O by executing a RESET command and ensuring that the stack pointer is reset.
(

7.7

FATAL ERRORS

Fatal errors result in program termination and a jump to location 40 8
(loaded with a HALT by lOX), with RO set to the error code and Rl set as
follows:
If the fatal error was due to an illegal memory reference (code 0),
Rl will contain the PC at the time of the error.

(
\

""

If the fatal error was due to an error coded in the
will point to some element in the lOT argument list
struction following the argument list, depending on
finished decoding the arguments when it detects the
Fatal Error Code

(

range 1-5, Rl
or to the inwhether lOX has
error.

Reason

0

Illegal Memory Reference, SP overflow, illegal
instruction

1

Illegal lOX command

2

Slot out of range

3

Device out of range

4

Slot not inited

5

Illegal data mode

7-19

Note that the SP stack contains the value of the registers at the time of
the error, namely

r

(Sp)-+ R5
R4
R3
R2
Rl
RO
PC
Processor Status (PS)
(See Section 7.3.3.1 for a discussion of non-fatal errors.)
7.8

EXAMPLE OF PROGRAM USING lOX

This program is used to duplicate paper tape.
by changing the device code at RDEV or PDEV.

Note that it could be altered
For instance, the program

could easily be made to list a tape.

(
RO=%O
Rl=%l
R2=%2
R3=%3
R4=%4
R6=%6
KSLOT=O
TSLOT=l
RSLOT=3
PSLOT=4
RESET=2
RESTRT=3
INIT=l
WAITR=4
READ=ll
WRITE=12
EOF=20000
CR=15
LF=12

(

ASSIGNED ASCII CODE FOR CARRIAGE RETURN
iLF ASSIGNED ASCII CODE FOR LINE FEED

iCR

.=1000

MSGl:

a
o

i CANNED MESSAGE

iFORMATTED ASCII
MSGlBC: ENDl-MSGlBC-2
iBYTE COUNT
. BYTE
CR,LF
.ASCII / PLACE TAPE IN READER/
CR,LF
. BYTE
.ASCII / STRIKE CR WHEN READY/
ENDl:
. EVEN
7-20

(

o
o
o

2

;BUFFER SIZE
;FORMATTED ASCII MODE
;BC
iCR LF

RDEV:
PDEV:

5
6

iDEVICE CODE FOR HSR
iDEVICE CODE FOR HSP

BUF1:

100
3
100
.=.+100
100
3
100
.=.+100
MOV
#500,R6

BUF3:

!.

BUF2:

BEGIN:

lOT

(

o

c

.BYTE

RESET, 0

; INITIALIZATION

lOT
BEGIN
.BYTE
MOV
MOV

RESTRT,O
#100,BUF1+4
#100,BUF2+4

;"BEGIN" SPECIFIED AS RESTART
;ADDRESS FOR CTRL P
;SET UP INITIAL BC ON BUFl
;SET UP INITIAL BC ON BUF2

lOT
MSGl
.BYTE
lOT
BUF3
.BYTE

A:

(

;TYPE OUT DIRECTIONS
WRITE,TSLOT
;READ A CR,LF
READ,KSLOT
;WAIT FOR HIM TO TYPE A CARRIAGE RETURN,
;LINE FEED

lOT
A

.BYTE
lOT
RDEV
. BYTE
lOT
PDEV
. BYTE
lOT
BUFl
.BYTE
LOOP:

(

iBUFFER SIZE
;CODE FOR UNFORMATTED BINARY
.; SPECIFIES NUMBER OF BYTES FOR TRANSFER
;RESERVES STORAGE FOR DATA
;BUFFER SIZE
;CODE FOR UNFORMATTED BINARY
;SPECIFIES NUMBER OF BYTES FOR TRANSFER
;RESERVES STORAGE FOR DATA
;SPECIFY ADDRESS FOR BOTTOM OF STACK

lOT
BUF2
.BYTE

WAITR,KSLOT
;INIT READER
INIT,RSLOT
;INIT PUNCH
INIT,PSLOT
; START FIRST READ
READ,RSLOT

iREAD INTO 2ND BUFFER
READ,RSLOT

7-21

BIT
BNE

#EOF BUFl+2
BEGIN

iEND OF FILE?
iYES
iNO

(~
\

lOT
BUFI
.BYTE
C:

lOT
C
.BYTE

7.9
7.9.1

WRITE,PSLOT
iWAIT TILL DEVICE HAS FINISHED

READ, RSLOT

BIT
BNE

#EOF,BUF2+2
BEGIN

lOT
B
. BYTE
BR
. END

j

WAITR,PSLOT

lOT
BUFI
. BYTE

lOT
BUF2
. BYTE
B:

iWRITE OUT THIS BUFFER

iREAD INTO 1ST BUfFER

iEND OF FILE?
iWRITE OUT BUFFER 2

(

WRITE,PSLOT
iWAIT TILL DEVICE HAS FINISHED
WAITR,PSLOT
LOOP
BEGIN

(

lOX INTERNAL INFORMATION
Conflict Byte/Word

The lOX Conflict byte (in IOXLPT, Conflict Word) contains the status (busy
or free) of all devices as well as whether or not an echo is in progress.
Bit 0 is tne echo bit, bits 1-6 (and 8 in IOXLPT) refer to the corresponding codes for devices:

(

If Bit is Set
Bit

0

=

Echo in progress

Bit
}
Device

1

=

KBD busy

Bit
}
Device

2

=

TTY busy

Bit
Device

3

=

LSR busy

Bit
Device}

4

=

LSP busy

Bit
}
Device

5

=

HSR busy

J

7~22

(

If Bit is Set
Bit
}
Device

6

=

HSP busy

Bit
Device.

8
10 8

=

LPT busy

J

In IOXLPT, the Conflict Byte is expanded to a word in order to accommodate
the line printer, there being no bit 8 to correspond with that device's
~

(

(

code of 10 8 (the lowest available code for an output device - see Section
7.9.5.1).
All possible
Conflicting Devices

Conflict
Number

KBD

Echo, KBD, TTY, LSR, LSP

37

TTY

Echo, KBD, TTY, LSP

27

LSR

KBD, LSR

12

LSP

Echo, KBD, TTY, LSP

27

HSR

HSR

40

HSP

HSP

100

LPT

LPT

400

Device

For each of the devices in the left hand column, all the possible conflicts are listed along with thei.r respective conflict numbers.

These numbers,

representing bit patterns of the devices listed in column two above, are used
to resolve any conflicting requests for devices.
(

masked with the conflict byte.

The appropriate number is

If the result is zero, there are no conflicts

and the device being tested has its bit set allowing data transfer to begin.
7.9.2

Device Interrupt Table (DIT)

Each device interrupt handler has associated with it a Device Interrupt Table
(DIT) containing information that the handler needs:
DIT

Checksum

DIT+2

Byte size from buffer header

DIT+4

Address of Mode byte in buffer header

DIT+6

Byte Location Pointer

DIT+IO

Byte Count

I

\

7-23

DIT+12

Device code

DIT+14

Real time done-address

DIT+16

Address of device's data buffer register

(-"

The device interrupt routines gain access to the proper data by means of
the DIT entry.

When a transfer is complete, they set the appropriate bits

in the buffer header pointed to by the DIT contents.
7.9.3

Device Status Table (DST)

The Device Status Table (DST) is used by lOX to check for EOF conditions.
This table contains a word for each device indicating an EOM condition with
a 1.

When an EOM condition is recognized on input, lOX not only sets the

appropriate bit in the buffer status byte associated with the data transfer,
it also records this occurrence in the DST.

When a data transfer command

is given, lOX checks the DST for the EOM condition.

(

If the appropriate

word has a value of 1, lOX sets EOF in the Status byte of the currentcommand buffer.

Since EOF is only possible for the LSR (code 3), and HSR

(code 5), the words corresponding to those devices are the only ones that
can ever be set to 1.
7.9.4

-(

Teletype Hardware Tab Facility

If the Teletype model has a hardware tab facility, teleprinter output can
be speeded up by:
1.

For lOX, deleting the code from I.TTYCK+6 through I.TAB3+3.

2.

For IOXLPT, skipping the code from I.IOLF through I.TAB3+3
(for the teleprinter only - not the line printer).

7.9.5

Adding Devices to lOX

In order to add a device to lOX the following tasks must be done:
a.

Assign a legal code to the device

b.

Modify the lOX tables

c.

Provide an interrupt routine to handle data for the device.

The line printer (in IOXLPT) will be used as an example throughout this discussion.

7-24

(

r

7.9.5.1

Device Codes

The numbers from 7 to 178 are available for new-device codes, with the
exception of 10 8 in the IOXLPT version. This code has been assigned to
the line printer. The device code must be odd for an input device and
even for an output device.

This is so a check can be made for com-

mand/device correspondence; i.e., for a Read from an input device or a
Write to an output device.
If the newest device was assigned a number that is higher than the
codes of all the other devices, I.MAXDEV must be redefined to that value.
This is so an out-of-range device specification in an Init command
can be detected.

In IOXLPT, I.MAXDEV=lO.

(
Since each device code functions as an index in several word tables,
the entries relating to a given device must be placed at the same relative
position in each appropriate table.

That is, the code number must indicate

how many words into the table the entry for that device will be found.
This, of course, means accounting for any unused space preceding the entry,

(

if the codes are not assigned in strict sequence.

Table entries for tIle

line printer are found at the 108th word past the table tag, i.e., at
Table+20.
7.9.5.2
a.

Table Modification

I.FUNC -

Each entry is the octal value of the bit pattern in

the device Control/Status Register that enables the corresponding device and/or any interrupt facility it has.

Bit setting

this number into the device's Control/Status register turns
the device on; bit clearing turns it off.

Determine this value

for the device to be added, and place the entry in the appropriate device position in the table.

For example, the line printer

Control/Status Register has an Interrupt Enable facility in bit
6.

This pattern of 100 is the LPT entry, and is located at

LFUNC+20.
b.

I.SCRTAB - This table contains the addresses of the device
Control/Status registers.

(

The line printer entry I.LPTSCR has

the value 177514, and is located at I.SCRTAB+20.

7-25

c.

I.DST -

(Refer to Section 7.9.3.)

Create an entry of

° for

the device in the proper table location.
Inserting a word
of
at I.DST+20 created a device status entry for the line

°

(-

printer.
d.

I.CONSIT - An entry in this table is used to set or clear
a device's busy/free bit in the Conflict Byte (Conflict
Word in IOXLPT).

(See Section 7.9.1, and e. below.)

Each

value is obtained by setting one bit only - the bit number
corresponding to the device number.

The line printer, being

device lOS' has a value of 400S (bit lOS set) and is located
at I.CONSIT+20.
In the lOX version without the line printer, entries to this table
are found in the high-order bytes of Table I.CONFLC.
device entry can be added to it.

(

One more input

In IOXLPT, however, I.CONSIT is a sepa-

rate word table, allowing eight more devices (four input and four output)
to be added.

Byte operations in the lOX

I.CONSIT became word operations

in IOXLPT to adapt to this expansion.
e.

I.CONFLC -

(Refer to Section 7.9.1 on Conflict Byte/Word.)

Entries are bit patterns of conflicting devices.

(

Since

the line printer can only conflict with itself, the I.CONFLC
entry is equal to the I.CONSIT entry.

As in the I.CONSIT

table, byte operations were changed to word operations for
I.CONFLC in IOXLPT.
f.

(

Create a DIT for the device (refer to Section 7.9.2) by
assigning a DIT label and seven words of 0.

If it is an

output device, the address of the Device Buffer Register
must be added as an eighth word.
g.

I.INTAB - This is a table of DIT addresses.

Place the

label of the DIT (mentioned in f. above) in the correct
position in the table.

I.INTAB+20 contains the line

printer entry I.LPTDIT.

(
7-26

7.9.5.3

r--

I~terrupt'Routines

Write (and assign a label to) an interrupt routine for the device to:
1.

Get a character

2.

Check for errors by means of the device Control/Status register

3.

Do character interpretation

4.

Get a character in or out of the buffer

5.

Update lOX's Byte Count

6.

Compare lOX's Byte Count to User's Byte Count and Buffer size
specification

7.

Return for next character

accor~ing

to the device and mode

Place the label of the interrupt routine at the address of the device vector,
and follow it with the value of the interrupt priority in bits 7, 6, and 5.
I.LPTIR, the address of the line printer interrupt routine, is at location
200.

(

Location 202 contains the value 200 (indicating priority level 4).
If the device to be added is similar to the other single-character de-

vices, steps 3-7 above can be performed by lOX as indicated below:
There are two routines, I.INPUT and I.OUTPUT, that are called from the
interrupt routines.

These routines mainly perform common functions for

input and output devices.

(

JSR

R5,I.INPUT

They are called as follows:
and

JSR

R5,I.OUTPUT

At the location following one of these calls is the DIT for the proper device.

The routine is thus able to use R5 to reference the DIT entries.
I.INPUT and I.OUTPUT also contain device-dependent code to perform

functions such as tab counters for the teleprinter and line printer, and
deletion of carriage returns in Formatted ASCII mode for the line printer.
The device index value is used to identify the device.

For the line printer,

a symbol I.LPT, has been assigned the value 20 for convenient reference to

(

the device index.

7-27

CHAPTER 8
FLOATING-POINT MATH PACKAGE OVERVIEW

8-i

CHAPTER 8
FLOATING POINT MATH PACKAGE OVERVIEW

The new Floating-Point Math Package, FPMP-ll, is designed to
bring the 2/4 word floating point format of the FORTRAN
environment to the paper tape software system of the PDP-II.
The numerical routines in FPMP-ll are the same as those of the
DOS-II FORTRAN Operating Time System (OTS).

TRAP and error

handlers have been included to aid in interfacing with the

(

FORTRAN routines.
FPMP-ll provides an easy means of performing basic arithmetic
operations such as add, subtract, multiply, divide, and compare.
It also provides transcendental functions

c

(SIN, COS, etc.), type

conversions (integer to floating-point, 2-word to 4-word, etc.),
and ASCII conversions (ASCII to 2-word floating-point, etc.).
Floating-point notation is particularly useful for computations
involving numerous multiply and divide operations where operand
magnitudes may vary widely.

FPMP-ll stores very large and very

small numbers by saving only the significant digits and computing an exponent to account for leading and trailing zeros.
To conserve core space in a small system, FPMP-ll can be
tailored to include only those routines needed to run a particular user program.
For more information on FPMP-ll, refer to the FPMP-ll User's
Manual (DEC-ll-NFPMA-A-D and to Appendix G of this manual.

8-1

CHAPTER 9
PROGRAMMING TECHNIQUES
9.1
WRITING POSITION INDEPENDENT CODE
9.1.1
Position Independent Modes
9.1. 2
Absolute Modes
9.1. 3
Writing Automatic PIC
9.1. 4
Writing Non-Automatic PIC
9.1.4.1
Setting Up the Stack Pointer
9.1.4.2
Setting Up a Trap or Interrupt Vector
9.1.4.3
Relocating Pointers
9.2

LOADING UNUSED TRAP VECTORS

9.3
CODING TECHNIQUES
9.3.1
Altering Register Contents
9.3.2
Subroutines

9-i

9-2
9-2
9-3
9-4
9-5
9-5
9-5
9-6

9-6

9-7
9-7
9-8

~----"--~-----~--~-.,,--~

"-"----~------.-~
.. ~~-~.~~.. ---~-. ~-----.--,-~-~

(-

CHAPTER 9
PROGRAMMING

TECHNIQUES

This chapter presents various programming techniques.

They

can be used to enhance your programming and to make optimum use
of the PDP-II processor.

The reader is expected to be familiar

with the PAL-IIA language (Chapter 3).
We consider this chapter to be open-ended, i.e., we plan to
add more programming techniques at every subsequent printing of
the handbook.

Should you discover different techniques or can

improve on those already included, please submit your suggestions
for consideration using the Reader's .Comments card appended to this
handbook or by mailing them to:
Digital Equipment Corporation
Software Information Services, Bldg 3-5
146 Main Street
Maynard, Massachusetts

(
9-1

01754

9.1

WRITING POSITION INDEPENDENT CODE

When a standard program is available for different users, it often be-

r

comes useful to be able to load the program into different areas of core
and to run it there.

There are several ways to do this:

l.

Reassemble the program at the desired location.

2.

Use a relocating loader which accepts specially coded
binary from the assembler.

3.

Have the program relocate itself after it is loaded.

4.

Write code which is position independent.

On small machines, reassembly is often performed.

When the required

core is available, a relocating loader (usually called a linking loader)
is preferable.

C-

It generally is not economical to have a program relocate

itself since hundreds

o~

thousands of addresses may need adjustment.

Writing position independent code is usually not possible because of the
structure of the addressing of the object machine.

However, on the PDP-II,

position independent code (PIC) is possible.
PIC is achieved on the PDP-II by using addressing modes which form
an effective memory address relative to the Program Counter (PC).

(

Thus,

if an instruction and its object(s) are moved in such a way that the
relative distance between them is not altered, the same offset relative
to the PC can be used in all positions in memory.

Thus, PIC usually

references locations relative to the current location.

PIC may make abso-

lute references as long as the locations referenced stay in the same place
while the PIC is relocated.

For example, references to interrupt and trap

(

vectors are absolute, as are references to device registers in the external page and direct references to the general registers.
9.1.1

Position Independent Modes

There are three position independent modes or forms of instructions. They
are:
1.

Branches -- the conditional branches, as well as the unconditional
branch, BR, are position independent since the branch address is
computed as an offset to the PC.

2.

Relative Memory References -- any relative memory reference of
the form

9-2

(

Ii

(_)
...

CLR
MOV

X
X,Y

JMP

X

is position independent because the assembler assembles it as
an offset indexed by the PC. The offset is the difference between the referenced location and the PC. For example, assume
the instruction CLR 200 is at address 100:
100/ 005067
iFIRST WORD OF CLR 200
102/ 000074
iOFFSET = 200-104
The offset is added to the PC. The PC contains 104, Le., the
address of the word following the offset.
Although the form CLR X is position independent, the form
CLR @X is not. Consider the following:
S: CLR @X
i CLEAR LOCATION A

(

X:

.WORD A

iPOINTER TO A

.WORD 0
The contents of location X are used as the address of the
operand in the location labeled A. Thus, if all of the code
is relocated, the contents of location X must be altered to reflect the new address of A. If A, however, was the name associated with some fixed location (e.g., trap vector, device register), then statements S and X would be relocated and A would
remain fixed. Thus, the following code is position independent.
A = 36
i ADDRESS OF SECOND WORD OF
i TRAP VECTOR
S: CLR @X
iCLEAR LOCATION A
A:

(

)

X:
3.

9.1.2

iPOINTER TO A

.WORD A

Immediate Operands -- The assembler addressing form #X specifies
immediate data, that is, the operand is in the instruction.
Immediate data is positi.on independent since it is a part of the
instruction and is moved with the instruction. Immediate data
is fetched using the PC in the autoincrement mode.
As with direct memory references, the addressing form @#X is
not position independent. As before, the final effective address
is absolute and points to a fixed location not relative to the
PC.
Absolute Modes

Any time a memory location or register is used as a pointer to data, the
reference is absolute. If the referenced data is fixed in memory, independent of the position of the PIC (e.g., trap-interrupt vectors, device
9 ... 3

registers), the absolute modes must be used. l

If the data is relative to ~'

the PIC, the absolute modes must not be used unless the pointers involved
are modified.

The absolute modes are:

@X

Location X is a pointer

@#X

The immediate word is a pointer

(R)

The register is a pointer

(R)+

and

@(R)+

and

X(R)

R~6

- (R)

The register is a pointer

@- (R)

The register points to a pointer
The base, X, modified by (R) is
the address of the operand

or 7

The base, modified by (R), is a
pointer

@X(R)

(

The non-deferred index modes and stack operations require a little
clarification.

As described in Sections 3.6.10 and 9.1.1, the form X(7)

is the normal mode to reference memory and is a relative mode.

Index

mode, using a stack pointer (SP or other register) is also a relative
'mode and may be used conveniently in PIC.

Basically, the stack pointer

points to adynamic storage area and index mode is used to access data
relative to the pointer.

(l

The stack pointer may be ihitially set up by a

position independent program as shown in Section 9.1.4.1.

In any case,

once the pointer is set up, all data on the stack is referenced relative
to the pointer.

It should also be noted that since the form O(SP) is

considered a relative mode so is its equivalent @SP.
forms

In addition, the

(SP)+ and -(SP) are required for stack pops and pushes.

9.1.3

(

Writing Automatic PIC

Automatic PIC is code which requires no alteration of addresses or pointers.

Thus, memory references are limited to relative modes unless the

location referenced is fixed (trap-interrupt vectors, etc.).

In addition

to the above rules, the following must be observed:

1

1.

Start the program with .=0 to allow easy relocation using
the Absolute Loader (see Chapter 6).

2.

All location setting statements must be of the form .=.±X
or .= function of tags within the PIC. For example, .=A+IO
where A is a local label.

When PIC is not being written, references to fix~d locations may be
performed with either the absolute or relative forms.
9-4

'\-

(_
..

3.

There must not be any absolute location setting statements.
This means that a block of PIC cannot set up trap and/or
interrupt vectors at load time with statements such as:
.=34
.WORD

TRAPH,340

iTRAP VECTOR

The Absolute Loader, when it is relocating PIC, relocates
all data by the load bias (see Chapter 6). Thus, the data
for the vector would be relocated to some other place.
Vectors may be set at execution time (see Section 9.1.4).
9.1.4

Writing Non-Automatic PIC

Often it is not possible or economical to write totally automated PIC.

(

In these cases, some relocation may be easily performed at execution time.
Some of the required methods of solution are presented below.

Basically,

the methods operate by examining the PC to determine where the PIC is
actually located.

Then a relocation factor can be easily computed.

In

all examples, it is assumed that the code is assembled at zero and has
been relocated somewhere else by the Absolute Loader.

(

9.1.4.1

Setting Up the Stack Pointer -- Often the first task of a pro-

gram is to set the stack pointer (SP).
.=0
BEG:

9.1.4.2

MOV
TST

This may be done as follows:

iBEG IS THE FIRST INSTRUCTION OF

iTHE PROGRAM.
iSP=ADR BEG+2
iDECREMENT SP BY 2.
iA PUSH ONTO THE STACK WILL STORE
iTHE DATA AT BEG-2.

PC,SP
-(SP)

Setting Up a Trap or Interrupt Vector

Assume the first word

of the vector is to point to location INT which is in PIC.

X:

MOV PC,RO
ADD #INT-X-2,RO
MOV RO,@#VECT

iRO = ADR X+2
jADD OFFSET
jMOVE POINTER TO VECTOR

The offset INT-X-2 is equivalent to INT-(X+2) and X+2 is the value of the
PC moved by $tatement X.

If PC O is the PC that was assumed for the program when loaded at 0, and if PC is the current real PC, then the calcula-

n

tion is:

(

INT-PCO+PCn=INT+(PCn-PC O)
Thus, the relocation factor, PCn-PC O' is added to the assembled value of
INT to produce the relocated value of INT.

9-5

9.1.4.3 Relocating Pointers
If pointers must be used, they may be
relocated as shown above. For example, assume a list of data is to be
accessed with the instruction

(i

ADD (RO)+,R1
The pointer to the list, list L, may be calculated at execution time as
follows:
M:

MOV
ADD

PC,RO
#L-M-2,RO

;GET CURRENT PC
;ADD OFFSET

Another variation is to gather all pointers into a table. The relocation factor may be calculated once and then applied to all pointers in
the table in a loop.
X:

LOOP:

MOV
SUB
MOV
ADD
MOV
ADD
DEC
BGE

PC,RO
#X+2,RO
#PTRTBL,R1
RO,R1
#TBLLEN,R2
RO, (R1) +
R2
LOOP

;RELOCATE ALL ENTRIES IN PTRTBL
;CALCULATE RELOCATION FACTOR
;GET AND RELOCATE A POINTER
TO PTRTBL
;GET LENGTH OF TABLE
;RELOCATE AN ENTRY
; COUNT
;BRANCH IF NOT DONE

Care must be exercised when restarting a program which relocates a
table of pointers. The restart procedure must not include the relocating
again, i.e., the table must be relocated exactly once after each load.
9.2

(

(

LOADING UNUSED TRAP VECTORS

One of the features of thePDP-l1 is the ability to trap on various condi tions such as illegal instructions, reserved instructions, power failure, (
etc. However, if the trap vectors are not loaded with meaningful information, the occurrence of any of these traps will cause unpredictable results.
By loading the vectors as indicated below, it is possible to avoid these
problems as well as gain meaningful information about. any unexpected traps
that occur. This technique, which makes it easy to identify the source of
' '-a trap, is to load each unused trap vector with:
.=trap address
• WORD .+2,HALT

1·•

This will load the first word of the vector with the address of the second
word of the vector (which contains a HALT). Thus, for example, a halt at

(
9-6

~.

location 6 means that a trap through the vector at location 4 has occurred.
The old PC and status may be examined by looking at the stack pointed to
by register 6.
The trap vectors of interest are:
Vector
Location

(

(

9.3

Halt At
Location

Meaning
Bus Er~ori Illegal Instruction;
Stack Overflowi Nonexistent MemorYi
Nonexistent Device; Word Referenced
at Odd Address

4

6

10

12

Reserved Instruction

14

16

Trace Trap Instruction (000003) or
T-bit Set in Status Word (used by ODT)

20

22

IOT Executed (used by IOX)

24

26

Power Failure or Restoration

30

32

EMT Executed (used by FPP-ll)

34

36

TRAP Executed

CODING TECHNIQUES

Because of the great flexibility in PDP-II coding, time- and space-saving
ways of performing operations may not be immediately apparent.

Some com-

parisons follow.
9.3.1
(

Altering Register Contents

The techniques described in this section take advantage of the automatic
stepping feature of autoincrement and autodecrement modes when used
especially in TST and CMP instructions.
operands.

(

These instructions do not alter

However, it is important to make note of the following:
•

These alternative ways of altering register contents
affect the condition codes differently.

•

Register contents must be even when stepping by 2.

1.

Adding 2 to a register might be accomplished by ADD #2,RO.
However, this takes two words, whereas TST (RO)+ which
also adds 2 to a register, takes only one word.

2.

Subtracting 2 from a register can be done by the complementary instructions SUB #2,RO or TST -(RO) with the same
conditions as in adding 2.

9-7

3.

This can be extended to adding or subtracting 2 from two
different registers, or 4 from the same register, in one
single-word instruction:
CMP
CMP
CMP
CMP
CMP

4.

5.

(RO)+,(RO)+
-(R1),-(R1)
(RO)+,-lR1)
-(R3),-(R1)
(R3)+, (RO)+

;ADD 4 TO
;SUBTRACT
;ADD 2 TO
;SUBTRACT
;ADD 2 TO

(.

RO

4 FROM Rl
RO, SUBTRACT 2 FROM Rl
2 FROM BOTH R3 AND R1
BOTH R3 AND RO

Variations of the examples above can be employed if the instructions operate on bytes and one of the registers is the
Stack Pointer. These examples depend on the fact that the
Stack Pointer (as, well as the PC) is always autoincremented or
autodecremented by 2, whereas registers RO-R5 step by 1 in byte
instructions.
CMPB (SP)+, (R3)+
;ADD 2 TO SP AND 1 TO R3
CMPB - (R3),- (SP)
;SUBTRACT 1 FROM R3 AND 2 FROM SP
CMPB (R3}+,-(SP)
; ADD 1 '1'0 R3, SUBTRACT 2 FROM SP

)

(

Popping an unwanted word off the processor stack (adding 2 to regis-

ter 6) and testing another value can be two separate instructions or one
combined instruction:
TST (SP)+
TST COUNT

;POP WORD
iSET CONDITION CODES FOR COUNT

MOV COUNT, (SP) +

;POP WORD & SET CODES FOR COUNT

or

(

The differences are that the TST instructions take three words and clear
the Carry bit, and the MOV instruction takes two words and doesn't affect
the Carry bit.
9.3.2
1.

Subroutines
Condition codes set within a subroutine can be used to conditionally

c

branch upon return to the calling program, since the RTS instruction does
not affect condition codes.
JSR PC,X
BNE ABC

X:

;CALL SUBROUTINE X
;BRANCH ON CONDITION SET
;IN SUBROUTINE X
;SUBROUTINE ENTRY

.'CMP R2,DEF
RTS PC
2.

;TEST CONDITION
;RETURN TO CALLING PROGRAM

When a JSR first operand register is not the PC, data stored follow-

ing a subroutine call can be accessed within the subroutine by referencing
the register.

(The register contains the return address.)

9-8

('

JSR RS,Y
.WORD HIGH
.WORD LOW

Y:

iLATEST RS VALUE WILL POINT HERE

MOV (RS)+,R2
MOV (RS)+,R4

iVALUE OF HIGH ACCESSED
iVALUE OF LOW ACCESSED

RTS RS

iRETURN TO LOCATION
iCONTAINED IN RS

.

i,

Another possibility is:
JSR RS,SUB
BR PSTARG

iLOW-ORDER BYTE
iADDRESS, WHICH
iADDRESS OF ARG
iADDRESS OF ARG
iADDRES~ OF ARG

. WORD A
.WORD B
.WORD C

(
PSTARG:
SUB:

i

MOVB@RS, COUNT
MOV @14(R5),R2
MOV @6 (RS) ,Rl

(

RTS RS

IS OFFSET TO RETURN
EQUALS NO. OF ARGS .
A
B
C

RETURN ADDRESS

iGET NO. OF ARGS FROM LOW BYTE
iOF BR (IF DESIRED) .
iE.G., GET 6TH ARGUMENT
iGET 3RD ARGUMENT
iRETURNS TO BRANCH WHICH JUMPS PAST

iARG LIST TO REAL RETURN ADDRESS.
In the example above, the branch instruction contributes two main
advantages:

(

-"

1.

If R5 is unaltered when the ~TS is executed, return will always
'be to the branch instruction. This ensures a return to the
proper location even if the length of the argument list is
shorter or longer than expected.-

2.

The operand of the branch, being an offset past the argument
list, provides the number of arguments in the list.

Arguments can be made sharable by separating the data from the main
code.

This is easily accomplished by treating the JSR and its return as

a subroutine itself:
ARGLST:

CALL:
JSR PC,ARGLST

(
9-9

JSR RS,SUB
BR PSTARG
.WORD A

3.

The examples above all demonstrate the calling of subroutines from

a non-reentrant program.

The called subroutine can be either reentrant

or non-reentrant in each case.

The following example illustrates a

method of also allowing calling programs to be reentrant.

r'

The argu-

ments and linkage are first placed on the stack, simulating aJSR RS,
SUB, so that arguments are accessed from the subroutine via X (RS) .
Return to the calling program is executed from the stack.
CALL:
MOV RS,-(SP)
MOVJSBR,-(SP)

X:
RET:

MOV
MOV
JSR
MOV

BRN,-(SP)
SP,RS
PC,SUB
{SP)+,RS

iSAVE RS ON STACK.
iPUSH INSTRUCTION JSR R6,@R5 ON
iSTACK. PUSH ADDRESSES OF ARGUiMENTS ON STACK IN REVERSE ORDER
i (SEE BELOW).
iPUSH BRANCH INSTRUCTION ON STACK
iMOVE ADDRESS OF BRANCH TO RS.
;CALL SUB AND SAVE RETURN ON STACK.
iRESTORE OLD RS UPON RETURN.

(

iDATA AREA OF PROGRAM.
JSBR:
BRN:

JSR R6,@RS
BR .+N+N+2

;BRANCH PAST N WORD ARGUMENTS

The address of an argument can be pushed on the stack in several ways.

(

Three are shown below.
a.

b.

The arguments A, B, and C are read-only constants which are in
memory (not on the stack):
MOV #C,-(SP)
iPUSH ADDRESS OF C
MOV #B,-(SP)
iPUSH ADD~SS OF B
MOV #A,-(SP)
;PUSH ADDRESS OF A
Arguments A, B, and C have their addresses.on the stack at the
Lth, Mth., and Nth bytes from the top of the stack.
MOV N(SP),-(SP)
MOV M+2(SP),-(SP)
MOV L+4(SP),-(SP)

iPUSH ADDRESS OF C
iPUSH ADDRESS OF B
iPUSH ADDRESS OF A

Note that the displacements from the top of the stack are adjusted
by two for each previous push because the top of the stack is being moved on each push.
c.

c
'~

Arguments A, B, and C are on the· stack at the Lth, Mth, and Nth
bytes from the top but their addresses are not .
MOV
ADD
MOV
ADD
MOV
ADD

#N+2,-(SP)
SP,@SP
#M+4,-(SP)

iPUSH DISPLACEMENT TO ARGUMENT
iCALCULATE ACTUAL ADDRESS OF C

SP,~SP

iADDRESS OF B

#L+6,-(SP)
SP,@SP

iADDRESS OF A

When subroutine SUB is entered, the stack appears as follows:
9-10

f-

(

RET
BR .+N+N+2
A
B

··
·R6,@RS

JSR
old RS

.-

(

(

(

iBRANCH IS TO HERE

Subroutine SUB returns by means of an RTS RS, which places RS lnto the PC
and pops the return address from the stack into RS. This causes the execution of the branch because RS has been loaded (at location X) with the
address of the branch. The JSR branched to then returns control to the
calling program, and in so doing, moves the current PC value into the SP,
thereby removing everything above the old RS from the stack. Upon return
at RET, this too is popped, restoring the original RS and SP values.
4.
The next example is a recursive subroutine (one that calls itself).
Its function is to look for a matching right parenthesis for every left
parenthesis encountered. The subroutine is called by JSR PC,A whenever a
left parenthesis is encountered (R2 points to the character following it).
When a right parenthesis is found, an RTS PC is executed, and if the right
parenthesis is not the last legal one, another is searched for. When the
final matching parenthesis is found, the RTS returns control to the main
program.
A:
MOVB (R2)+,RO
iGET SUCCESSIVE CHARACTERS.
CMPB #' (,RO
iLOOK FOR LEFT PARENTHESIS.
BNE B
iFOUND?
JSR PC,A
iLEFT PAREN FOUND, CALL SELF.
BR A
iGO LOOK AT NEXT CHARACTER
B:
CMPB #') ,RO
iLEFT PAREN NOT FOUND, LOOK FOR
iRIGHT PAREN.
BNE A
iFOUND? IF NOT, GO TO A.
RTS PC
iRETURN PAREN FOUND. IF NOT LAST,
iGO TO B. IF LAST, GO TO MAIN PROGRAM.
S.
The example below illustrates the use of co-routines, called by
JSR PC,@(SP)+. The program uses double buffering on both input and output, performing as follows:
Write 01
}
Read II
Process 12

(,

concurrently

Write 02
I
Read 12
~
Process II

J

concurrently

JSR PC,@(SP)+ always performs a jump to the address specified on top of
the stack and replaces that address with the new return address. Each time
the JSR at B is executed, it jumps to a different locationi initially to
A and thereafter to the location following the JSR executed prior to the
one at B. All other JSR's jump to B+2.
9-11

BEGIN:

B:

r!

PC:::;%7
(do I/O resets, inits, etc.)
lOT
iREAD INTO II TO START PROCESS
.WORD II
.BYTE READ,INSLOT
MOV #A,-(6)
;INITIALIZE STACK FOR FIRST JSR
JSR PC,@(6)+
;DO I/O FOR 01 AND 11 OR 02 AND 12
perform processing

BR B
iMORE I/O
;END OF MAIN LOOP
iI/O CO-ROUTINES
A:
lOT
;READ INTO 12
.WORD 12
.BYTE READ,INSLOT
set parameters to process II, 01

(

JSR PC, @ (6) +
iRETURN TO PROCESS AT B+2
;WRITE FROM 01
lOT
• WORD 01
. BYTE WRITE,OUTSLOT
lOT
iREAD INTO II
.WORD II
.BYTE READ,INSLOT
set parameters to process 12, 02
JSR PC,@(6)+
iRETURN TO PROCESS AT B+2
;WRITE FROM 02
lOT
. WORD 02
• BYTE WRITE,OUTSLOT
BR A
iREAD INTO 12·

6.

The trap handler, below, simulates a two-word JSR instruction with

a one-word TRAP instruction.

In this example, all TRAP instructions in

the program take an operand, and trap to' the handler address at location
34.

(

(

The table of subroutine addresses (e.g., A, B, ... ) can be constructed

as follows:
TABLE:
CALA=.-TABLE
.WORD A

;CALLED BY:

TRAP CALA

CALB=.-TABLE
.WORD B

;CALLED BY:

TRAP CALB

(
9-12

Another

way to con$truct the table:
TABLE:
CALA=.-TABLE+TRAP
.WORD A
iCALL~D BY:

CALA

The TRAP handler for either of the above methods follows:
MOV @SP, 2 (SP)
i REPLACE STACKED PS WITH pet.
SUB #2,@SP
iGET POINTER TO TRAP INSTRUCTION.
MOV @(SP)+,-(SP)iREPLACE ADDRESS OF TRAP WITH
i
TRAP INST.RUC'l'ION ITSELF.
ADD #TABLE-TRAP,@SP
iCALCULATE SUBROUTINE ADDR.
MOV @(SP)+,PC
;JUMP TO SUBROUTINE.

TRAP34:

In the example above, if the third instruction had been written
MOV

(

~(SP),

(SP)

it would have taken an extra word since

Index Mode and assembles as
was executed by a

@O(SP).

MOV @(SP)+,PC

@(SP)

is in

In the final instruction, a jump

because no equivalent JMPinstruction

exists.
Following are some JMP and MOV equivalences (note that JMP does not
affect condition codes) .

(

JMP (R4)

=

JMP @(.R4)
(2 words)

1

(

MOV R4,PC
MOV (R4),PC
(l word)

none

=

MOV @(R4),PC

JMP - (R4)

=

none

JMP @(R4) +
JMP @- (R4) .

=

MOV (R4)+,PC

=

MOV -(R4) ,PC

none

=

MOV @(R4)+,PC

none

=

MOV @-(R4),PC

JMP X

=

MOV #X,PC

JMP @X

=

MOV X,PC

none

=

MOV @X,PC

Replacing the saved PS loses the T-bit status. If a breakpoint
has been set on the TRAP instruction, ODT will nOt gain control
again to reinsert the breakpoints because the T-bit trap will
not occur.

\

9-13

The TRAP handler can be useful, also, as a patching technique.
Jumping out to a patch area is often difficult because a two-word
jump must be performed. However, the one-word TRAP instruction
may be used to dispatch to patch areas. A sufficient number of
slots for patching should first be reserved in the dispatch table
of the TRAP handler. The jump can then be accomplished by' placing
the address of the patch area into the table and inserting the
proper TRAP instruction where the patch is to be made ..

C--1

(

(

(

(
9-14

APPENDICES

APPENDIX A

ASCII Character Set

A-l

APPENDIX B

PAL-llA Assembly Language and Assembler

B-1

APPENDIX C

Text Editor, ED-ll

C-l

APPENDIX D

Debugging Object Programs

D-l

APPENDIX E

Loading and Dumping Core Memory

E-l

APPENDIX F

INPUT/OUTPUT Programming, lOX

F-l

APPENDIX G

Summary of Floating-Point and Math Package,
FPMP-ll

G-l

APPENDIX H

Tape Duplication

H-l

APPENDIX I

Assembling the PAL-llA Assembler

1-1

APPENDIX J

Standard PDP-ll Abbreviations

J-l

APPENDIX K

Conversion Tables

K-l

APPENDIX L

Note to Users of Serial LA3~ and
12~~ and 24~~ Baud VT~5's

A-i

6~~,

L-l

APPENDIX A
ASCII CHARACTER SET
NOTE
The PTS systems punch ASCII with fJ in the parity bit.
When ASCII is read, the parity bit is ignored.
EVEN
PARITY
BIT

7-BIT
OCTAL
CODE

CHARACTER

fJ
1

fJfJfJ
fJfJl

NUL
SOH

1

fJfJ2

STX

fJfJ3

ETX

1

fJfJ4

EOT

fJ
fJ

~fJ5

fJfJ6
fJfJ7
fJlfJ

ENQ
ACK
BEL
BS

fJll
fJ12

HT
LF

fJ

fJ13
fJ14

VT
FF

1

fJ15

CR

1

fJ16

SO

fJ17

SI

~2fJ

fJ21

DLE
DCl

fJ22

DC2

fJ23

DC3

~24

DC4

1

fJ25

NAK

1

fJ26
fJ27

SYN
ETB

fJ3fJ
fJ31
fJ32
fJ33
fJ34

CAN
EM
SUB
ESC
FS

c1
1

1.

(

.

-~j

1

fJ
fJ
1
1

~

1

REMARKS
NULL, TAPE FEED, CONTROL SHIFT P.
START OF HEADING; ALSO SOM, START OF MESSAGE,
CONTROL A.
START OF TEXT; ALSO EOA, END OF ADDRESS,
CONTROL B.
END OF TEXT; ALSO EOM, END OF MESSAGE, CONTROL C.
END OF TRANSMISSION (END); SHUTS OFF TWX
MACHINES, CONTROL D.
ENQUIRY (ENQRY); ALSO WRU, CONTROL E.
ACKNOWLEDGE; ALSO RU, CONTROL F.
RINGS THE BELL. CONTROL G.
BACKSPACE; ALSO FEO, FORMAT EFFECTOR. BACKSPACES SOME MACHINES, CONTROL H.
HORIZONTAL TAB. CONTROL I.
LINE FEED OR LINE SPACE (NEW LINE); ADVANCES
PAPER TO NEXT LINE, DUP~ICATED BY CONTROL J.
VERTICAL TAB (VTAB). CONTROL K.
FORM FEED TO TOP OF NEXT PAGE (PAGE). CONTROL L.
CARRIAGE RETURN TO BEGINNING OF LINE. DUPLICATED BY CONTROL M.
SHIFT OUT; CHANGES RIBBON COLOR TO RED. CONTROL N.
SHIFT IN; CHANGES RIBBON COLOR TO BLACK.
CONTROL O.
DATA LINK ESCAPE. CONTROL P (DCfJ).
DEVICE CONTROL 1, TURNS TRANSMITTER (READER)
ON, CONTROL Q (X ON) .
DEVICE CONTROL 2, TURNS PUNCH OR AUXILIARY
ON. CONTROL R (TAPE, AUX ON) .
DEVICE CONTROL 3, TURNS TRANSMITTER (READER)
OFF, CONTROL S (X OFF) .
DEVICE CONTROL 4, TURNS PUNCH OR AUXILIARY
OFF. CONTROL T (JPAPE., AUX OFF) .
NEGATIVE ACKNOWLEDGE; ALSO ERR, ERROR. CONTROL U.
SYNCHRONOUS IDLE (SYNC). CONTROL V.
END OF TRANSMISSION BLOCK; ALSO LEM, LOGICAL
END OF MEDIUM. CONTROL W.
CANCEL (CANCL). CONTROL X.
END OF MEDIUM. CONTROL Y.
SUBS'l'ITUTE. CONTROL Z.
ESCAPE. PREFIX. CONTROL SHIFT K.
FILE SEPARATOR. CONTROL SHIFT L.
A-l

EVEN
PARITY
BIT

7-BIT
OCTAL
CODE

REMARKS

CHARACTER

~

(

~
~

1
1

~
~

1

~

1
1

~
~

1
1

•

~35
~36
~37

~4~
~41

!

~42
~43

"

$
%

~5~

(
)

~51

1

~52
~53
~54

~

~55

~

~6~

1
1
¢
1

~56
~57
~61

*

.

1

¢7¢
~71

~

1

8

.0'72
¢73

;

.~

~74

<

1

¢75
~76

.0'77

=
>
?

1

1¢~

@

~

1.0'1

A

1~2

B

1.0'3
1{14

C

.0'
1
.0'
1
1
{1
¢
1
1
.0
1
~

¢
1
.0
1
1
.0'
1

1~5
1~6
1~7

11.0
111
112
113
114
115
116
117
12{1
121
122
123
124

(,

9

.0'
1
1
.0'

--

/

3
4
5
6
7

~67

e'

I.

2

1

ACCENT ACUTE OR APOSTROPHE.

+

~63
~64

.0'65
¢66

~

,

&

.0'62

~
~

:1

GROUP SEPARATOR. CONTROL SHIFT M.
RECORD SEPARATOR. CONTROL SHIFT N.
UNIT SEPARATOR. CONTROL SHIFT o.
SPACE.

#

~44
~45
~46
~47

%

!

GS
RS
US
SP

(, )

D
E

F
G

.\.

It

I
J
K

L
M

N
0

P

(

Q

R
S
T

A-2

C-

EVEN
PARITY
BIT

125
126
127
13~

X

~
~

131
132
133
134
135
136
137

Y

1

~
"

1
1

~
~
~
~

1

/

REMARKS

CHARACTER

~
~

1
1

~-

7-BIT
OCTAL
CODE

U
V
W
Z
[

,
]
t

SHIFT K.
SHIFT L.
SHIFT M.

+

14~

"-

175
176
177

}

DEL

\,

ACCENT GRAVE.
THIS CODE GENERATED BY ALT MODE.
THIS CODE GENERATED BY ESC KEY (IF PRESENT)..
DELETE, RUB OUT.
LOWER CASE ALPHABET FOLLOWS (TELETYPE MODEL
37 ONLY) .

1
1
~

1

(-

~
~

1
1

~
~

1

~

1
1

~

/

(~:

15~

151
152
153
154
155
156
157

1

16~

~
~

161
162
163
164
165
166
167

1

~

1
1

"

141
142
143
144
145
146
147

~
~

1
1

~

1

17~

171
172
173
174

a
b

c
d

e
f

g
h
i
j
k
1

m
n
0

P
q
r

s
t
u

v
w
x
Y

z

{

I

A-3

APPENDIX B
PAL-llA ASSEMBLY LANGUAGE AND ASSEMBLER
B.l

SPECIAL CHARACTERS

Character

Function

form feed

Source line terminator

line feed

Source line terminator

carriage return

Source statement terminator
Label terminator

(

(

=

Direct assignment indicator

%

Register term indicator

tab

Item terminator
Field terminator

space

Item terminator
Field terminator

#

Immediate expression indicator

@

Deferred addressing indicator
Initial register indicator
Terminal register indicator
Operand field separator

(

Comment field indicator

+

Arithmetic addition oper'ator
Arithmetic subtraction operator

&

Logical AND operator
Logical OR operator

"

Double ASCII character indicator
Single ASCII character indicator
Assembly location counter

(
B-1

B.2

ADDRESS MODE SYNTAX

n is an integer between 0 and 7 representing a register.

R is a register

expression, E is an expression, ER is either a register expression or an

r-'

expression in the range 0 to 7.

Format

Address
Mode
Name

Address
Mode
Number

Meaning

R

Register

On

Register R contains the operand. R is a register expression.

@R or (ER)

Deferred Register

ln

Register R contains the operand address.

(ER) +

Autoincrement

2n

The contents of the register specified by ER are incremented after being used
as the address of the operand.

@(ER)+

Deferred Autoincrement

3n

ER contains the pointer to
the address of the operand.
ER is incremented after use.

- (ER)

Autodecrement

4n

The contents of register ER
are decremented before being
used as the address of the
operand.

Deferred Autodecrement

5n

The contents of register ER
are decremented before being
used as the pointer to the
address of the operand.

E (ER)

Index

6n

E plus the contents of the
register specified, ER, is
the address of the operand.

@E(ER)

Deferred Index

7n

E added to ER gives the pointer to the address of the operand.

#E

Immediate

27

E is the operand.

@#E

Absolute

37

E is the address of the operand.

E

Relative

67

E is the address of the operand.

@E

Deferred Relative

77

E is the pointer to the address of the operand.

@-

(ER)

B-2

(

(

(

(

B.3

C--

INSTRUCTIONS

The instructions which follow are grouped according to the operands they
take and the bit patterns of their op-codes.
In the representation of op-codes, the following symbols are used:
SS

Source operand specified by a 6-bit address
mode.

DD

Destination operand specified by a 6-bit address mode.

xx

8-bit offset to a location (branch instructions)

R

(

Integer between 0 and 7 representing a general
register.

Symbols used in the description of instruction operations are:
SE

Source Effective address

DE

Destination Effective address

( 1

Contents of
1& transferred to

The condition codes in the processor status word (PS) are affected by
the instructions. These condition codes are represented as follows!

(,

N

!:!egative bit:

set if the result is negative

Z

set if the result is zero

V

Zero bit:
-oVerflow
bit:

set if the operation caused an overflow

C

£arry bit:

set if the operation caused a carry

In the representation of the instruction's effect on the condition
codes, the following symbols are used:

*

Conditionally set
Not affected

c·

(
0

Cleared

I

Set

B-3

To set conditionally means to use the instruction's result to determine the state of the code (see the PDP-II Prooes'8or Handbook.

(:

Logical operations are represented by the following symbols:
Inclusive OR

CD

Exclusive OR
AND

&

(used over a symbol) NOT (Le. , l' s complement)
B.3.1

Double-OEerand Instructions

Op A,A

Stands for

Status Word
Condition Codes
Z
N
V
C

°E-Code

MNEMONIC

OlSSDD
11SSDD

MOV
MOVB

MOVe
MOVe Byte

(SE)+ DE

*

'*

0

02SSDD
12SSDD

CMP
CMPB

CoMPare
CoMPare Byte

(SE)-(DE)

*

*

*

03SSDD
13SSDD

BIT
BITB

BIt Test
BIt Test Byte

(SE)

(DE)

*

*

0

04SSDD
14SSDD

BIC
BICB

BIt Clear
BIt Clear Byte

(SE) & (DE) + DE

*

*

0

05SSDD
15SSDD

BIS
BISB

BIt Set
BIt Set Byte

(SE) ! (DE) + DE

*

*

0

06SSDD
16SSDD

ADD
SUB

ADD
SUBtract

(SE)+(DE)+ DE
(DE)-(SE)+ DE

*
*

*
'*

*
*

°Eeration

&

(

*

(

*
*

(
"

B.3.2

Single-OEerand Instructions

Op A
Status Word
Condition Codes
Z
V
C
N

°E';"Code

MNEMONIC

Stands for

0050DD
lO50DD

CLR
CLRB

CLeaR
CLeaR Byte

0051DD
lO51DD

COM
COMB

(DE)+ DE
COMplement
COMplement Byte

0052DD
lO52DD

INC
INCB

INCrement
INCrement Byte

(DE)+l+ DE

*

*

*

0053DD
lO53DD

DEC
DECB

DECrement
DECrement Byte

(DE)-l+ DE

*

*

*

0054DD
lO54DD

NEG
NEGB

NEGate
NEGate Byte

(DE)+l+ DE

*

*

*

°Eeration
[1+ DE

B-4

0

1

0

0

*

*

0

1
i-

(
*

r
<"

QE-Code

MNEMONIC

005500
105500

AOC
AOCB

AOd Carry
AOd Carry Byte

(OE)+(C)+ OE

*

*

*

*

0056DO
105600

SBC
SBCB

(OE)-(C)+.OE
SuBtract Carry
SuBtract Carry Byte

*

*

*

*

005700
105700

TST
TSTB

TeST
TeST Byte

*

*

0

0

B.3.3

(

Stands for

°E-Code

MNEMONIC

006000

ROR

106000

006100

106100

006200

106200

006300

106300

(
'-

Operation

(OE) -.0'+ OE

Op A

Rotate/Shift Instructions
Stands for
ROtate Right

\ '.

(

Status Word
Condition Codes
Z
N
V
C

RORB

ROL

ROLB

ASR

ASRB

ASL

ASLB

ROtate Right
Byte

ROtate Left

ROtate Left
Byte

Arithmetic
Shift Right

Arithmetic
Shift Right
Byte
Arithmetic
Shift Left

Arithmetic
Shift Left
Byte

000100

JMP

JuMP

000300

SWAB

SWAp Bytes

Status Word
Condition Codes
Z
V
C
N

°Eeration

,.

~ I

0Ij

even or odd byte
~ I

·ra <--1

c

*

*

*

*

h

*

*

*

*

h

*

*

*

*

~

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

*

:Pro

*

*

*

*

°I

*

*

0

0

even or odd byte
rD~

c

,0

Ie 14

t~~

Sb
Sn

~2:

*0

0
Q

i~,

even or odd byte

0

0
c

even or odd byte

~f::'
OE+ PC

15

0

I

S

•

7

I

,~

B-5

.,.

B.3.4

Operate Instructions

Op

Stands for

Status Word
Condition Codes
N
Z
V
C

Op-Code

MNEMONIC

Operation

000000

HALT

HALT

The computer stops all
functions.

000001

WAIT

WAIT

The computer stops and
and waits for an interrupt.

000002

RTI

ReTurn
from
Interrupt

The PC and PS are popped
off the SP stack:

(:
\

( (SP) ) -+(SP)+2-+((SP»-+(SP) +2-+-

*

*

ft

*

PC
SP
PS
SP

e

RTI is also used to return from a trap.
000005

B.3.S

RESET

RESET

Trap Instructions

°E-Code

MNEMONIC

*000003

(none)

*000004

Returns all I/O devices
to power-on state.
Op or Op E
*OP (only)

Stands for

where 05..E5..377 a
Status Word
Condition Codes
V
N
C
Z

°Eeration

(breakpoint Trap to location 14.
trap)
is used to call ODT.

This

*

*

*

*

lOT

Input/Output Trap

Trap to location 20.
is used to call lOX.

This

*

*

*

*

104000104377

EMT

EMulator
Trap

Trap to location 30. This *
is used to call system programs.

*

*

*

104400
104777

TRAP

TRAP

Trap to location 34. This *
is used to call any routine
desired by the programmer.

*

*

*

(

(

--

'\

CONDITION CODE OPERATES
0E-Code

MNEMONIC

Stands for

000241 '

CLC

CLear Carry bit in PS.

000261

SEC

SEt Carry bit.

000242

CLV

CLear oVerflow bit.

000262

SEV

SEt oVerflow bit.
B-6

rj,

~;

(

Op-Code

CLZ

CLear Zero bit.

000264

SEZ

SEt Zero bit.

000250

CLN

CLear Negative bit.

000270

SEN

SEt Negative bit.

000254

CNZ

CLear Negative and Zero bits.

000257

CCC

Clear all Condition Codes

000277

SCC

Set all Condition CodeS.

B.3.6

MNEMONIC

Stands for

Condition to be met if
branch is to occur

0004XX

BR

BRanch always

OOIOXX

BNE

Branch if Not Equal
(to zero)

Z=O

0014XX

BEQ

Branch if EQual (to
zero)

Z=l

0020XX

BGE

Branch if Greater than
or Equal (to zero)

N(DV=O

0024XX

BLT

Branch if Less Than
(zero)

NeD V=l

0030XX

BGT-

Branch if Greater Than
(zero)

Z! (N(DV) =0

0034XX

BLE

Branch if Less than or
Equal (to zero)

Z! (N(DV)=1

1000XX

BPL

Branch if PLus

N=O

1004XX

BMI

Branch if MInus

N=l

1010XX

BHI

Branch if HIgher

C

Z = 0

1014XX

BLOS

Branch if LOwer or Same

C

Z = I

1020XX

BVC

Branch if oVerflow Clear

V=O

1024XX

BVS

Branch if oVerflow Set

V=l

Branch if Carry Clear
(or Branch if HIgher or
Same)
Branch if carry Set (or
Branch if LOwer)

C=O

\

\

Op E where-12810~(E-·-2)/2~12710

Branch Instructions

/

(

Stands for

000244

0:e- Code

(

MNEMONIC

1030XX

BCC (or
BHIS)

1034XX

BCS (or
BLO)

B~7

C=l

------

-------------

----.---.-----------.----~------

B.3.7

...- - - - - - - - ..

-

Subroutine Call

Op-Code

MNEMONIC

004RDD

JSR

----

--.--------~---.--.------.----

..-------.-----.- ..

----

------------

-

------

----------~.----~---.--.--.------,----------.-------

Op ER, A

Stands for

Operation

Jump to SubRoutine

Push register on the SP stack,
put the PC in the register:

r

DE+(TEMP) - a temporary storage
register internal
to processor.
(SP)-2+ SP
(REG) + (SP)
(PC) + REG
(TEMP)+ PC

B.3.8

Subroutine Return

Op-Code

MNEMONIC

00020R

RTS

B.4

Op ER

Stands for

Operation

ReTurn from Subroutine

Put register contents into PC
and pop old contents from SP
stack into register.

(

ASSEMBLER DIRECTIVES

Op-Code

MNEMONIC

Stands for

Operation

.EOT

End Of Tape

Indicates the physical end of
the source input medium

. EVEN

EVEN

Ensures that the assembly location counter is even by adding
1 if it is odd

.END mEND
(m optional)

• WORD
E ,E, ••

Indicates the physical and logical end of the program and optionally specifies the entry
point (m)

WORD

(

(~_-

Generates words of data

•

E,E,...

(the void operator)

Generates words of data

• BYTE

BYTE

Generates bytes of data

E, E, •••

.ASCII
ASCII
Ixxx • •• xl
B.S

Generates 7-bit ASCII characters for the text enclosed by
delimiters

ERROR CODES

Error Code

Meaning

A

Addressing error.
correct.

B

~ounding

An address within the instruction is in-

error. Instructions or word data are being assembled
at an odd address in memory.
B-8

(

l

Error Code

Meaning

D

Doubly-defined symbol referenced. Reference was made to a
symbol which is defined more than once.

I

Illegal character detected.
Illegal characters which are
also non-printing are replaced by a ? on the listing.

L

Line buffer overflow.
are ignored.

M

Multiple definition of a label. A label was encountered
which was equivalent (in the first six characters) to a _
previously encountered label.

N

~umber

P

Phase error. A label's definition or value varies from
one pass to another.

Q

Questionable syntax. There are missing arguments or the
Instruction scan was not completed, or a carriage return
was not followed by a line feed or form feed.

R

Register-type error. An invalid use of or reference to a
register has been made.

S

~mbol-table

overflow. When the quantity of user-defined
symbols exceeds the allocated space available in the user's
symbol table, the assembler outputs the current source line
with the S error code, then returns to the command string
interpreter to await the next command string to be typed.

T

Truncation error. A number was too big for the allotted
number of bits; the leftmost bits were truncated.
Terror
does not occur for the result of an expression.

U

Undefined symbol. An undefined symbol was encountered
during the evaluation of an expression. Relative to the
expression, the undefined symbol is assigned a value of
zero.

Extra characters (more than 72 10 )

containing an 8 or 9 has a decimal point missing.

~,

(
\

(

B.6

INITIAL OPERATING PROCEDURES

Loading:

Use Absolute Loader (see Chapter 6). Make sure that the start
address of the absolute loader is in the switches when the assembler is loaded.

Storage Requirements:

PAL-llA exists in 4K and 8K versions.

Starting

Immediately upon loading, PAL-llA will be in control and initiate dialogue.

Initial
Dialogue:

(
"

Inquiry

Printout

*S

What is the input device of the Source symbolic tape?

B-9

Each of these questions may be answered by one of the following characters:
. Character

Answer Indicated

T

!eletype keyboard

L

~ow-speed

H

~igh-speed

P

line

reader or punch
reader or punch

~rinter

(8K version only)

(

Each of these answers may be followed by other characters indicating
options:
Function to be Performed

Option Typed

/1

on pass 1

/2

on pass 2

/3

on pass 3

/E

errors to be listed on the
Teletype on the same pass
(meaningful for *B or *L
only)

Each answer is· termina ted by typing the RETURN key.

c
A RETURN alone

(

as answer will delete the function.
Dialogue during assembly:
Response

Printout
EOF ?

Place next tape in reader and type RETURN. A
.END statement may be forced by typing E followed
by RETURN.

END ?

Start next pass by placing first tape in reader
and typing RETURN.

EOM ?

If listing on HSP or LPT, replenish tape or paper
and type RETURN.
If binary on HSP, start assembly
aqain.

Restarting:

Type CTRL/P.
again.

The initial dialogue will be started

B-IO

C.

-

APPENDIX C
TEXT EDITOR, ED-11

C.1

~n
(

l

INPUT/OUTPUT COMMANDS
R

Reads a page of text from input device, and appends it to the
contents (if any) of the page buffer. Dot is moved to the
beginning of the page and Marked.
(See Band M below.)

o

Opens the input device when the user wishes to continue input
with a new tape in the reader.
ARGUMENTS

L

/ i

beginning at Dot and ending with
nth line feed character.

(-n)

beginning with 1st character following the (n+1)th previous line
feed and terminating at Dot.

(0)

beginning with 1st character of
current line and ending at Dot.

(@)

bounded by Dot and the Marked
location (see M) .

(j)

beginning at Dot and ending with
the last character in the page.

,)

Punches the character
string

(

C.2

(

Lists the character
string

(n)

F

Outputs a Form Feed character and four inches of blank tape.

nT

Punches four inches of Trailer (blank tape) n times.

nN

Punches contents of the page buffer (followed by a trailer if
a form feed is present), deletes the contents of the buffer, and
reads the next page into the page buffer.
It does this n times.
At completion, Dot and Mark are located at the beginning of the
page buffer.

V

Lists the entire line containing Dot (i.e., from previous line
feed to next line feed or form feed.

<

Same as -IL.
If Dot is located at the beginning of a line,
this simply lists the line preceding the current line.

>

Lists the line following the current line.

POINTER-POSITIONING COMMANDS
B

Moves Dot to the beginning of the page.

E

Moves Dot to the end of the page.

M

Marks the current position of Dot for later reference in a
command using the argument @.
Certain commands implicitly
move Mark.
C-l

(n)
( -n)

J

Moves Dot:

(n)
(-n)

n

-n

o

A

Moves Dot:

@

/
C.3

(0)
(@)
(j)

forward past n ends-of-lines
to first character following the (h+l)th
previous end-of-line
to the beginning of current line
to the Marked location
to the end of the page

SEARCH COMMANDS
nG
XXXX

H

XXXX

C.4

(0)
(@)
(j)

forward past n characters
backward past n characters
to the beginning of the current line
to the Marked location
to the end of the page

Gets (searches for) the nth occurrence of the specified character string on the current page. Dot is set ;immediately after
the last character in the found text, and the characters from
the beginning of the line to Dot are listed on the teleprinter.
If the search is unsuccessful, Dot will be at the end of the
buffer and a ? will be printed out.
Searches the wHole file for the next occurrence of the specified character string. Combines G and N commands.
If search
is not successful on current page, it continues on Next page.
Dot is set immediately after the last character in the found
text and the characters from the beginning of the line to Dot
are listed on the teleprinter.
If the Search object is not
found, Dot will be at the end of the buffer and a ? will be
printed out.
In such a case, all text scanned is copied to
the output tape.

c
(

COMMANDS TO MODIFY THE TEXT
Character-Oriented

Delete~}

nD
nC
xxxx

Changes

-nD
-nC
XXXX

Changes

OD
OC
XXXX
@D
@C
XXXX

Line-Oriented

the following
n characters

nK
Kills
}
eXchanges
nX
XXXX

Deletes}

the previous
n characters

-nK Kills
-nX exchanges}
XXXX

Deletes}
Changes.

the current line OK
OX
up to Dot
XXXX
The character
@K
@X
string beginning at Dot and XXXX
ending at a previously Marked
location.

Deletes~
changes)

l

l

the character string
beginnning at Dot
and ending at the
nth end-of-line.

(

the character string
beginning with the
first character following the (n+l)th
previous end-of-line
and ending at Dot.

Kills
exchanges}

the current line up
to Dot.

Kills
}
eXchanges

the character string
beginning at Dot and
ending at a previously Marked location.

(

Character-Oriented
Deletes)
Changes

I
XXXX

Inserts the specified text. LINE FEED terminates Text Mode and
causes execution of the command. Dot is set to the location im~
mediately following the last character inserted. If text was
inserted before the position of Mark, ED-II performs an M command.

the character
string beginning at Dot and
ending with the
last character
of the page.

Kills

eXchanges~

the character
string b~gin­
ning at Dot and
ending with the
last character
of the page.

Dot

Location following the most recent character
operated upon.

t

Holding down the CTRL key (not the t key) in
combination with another keyboard character.

\

RETURN

c
+

If in command mode, it executes th€ current
command; goes into Text Mode if required.
If in Text Mode, it terminates the current
line, enters a carriage return and line feed
into the buffer and stays in text mode. At'
all times causes the carriage to move to the
beginning of a new line.
(RETURN is often
symbolized as .I).
(Typing the LINE FEED key) Terminates Text
Mode unless the first character typed in Text
Mode; executes the current command.

CTRL/FORM

(

A Form feed which terminates, and thus defines,
a page of the user's text.

GROUPING OF COMMANDS
No Ar9:uments
V

~,~

<
>

B
E
F
H
I
M
0

(

/K

/x
xxxx

SYMBOLS

/

C.6

l_

/D
/C

xxxx

C.S

Line-Oriented

R

(Verify:
Lists current line)
(Lists previous line)
(Lists next line)
(Begin)
(End)
(Form feed)
(wHole)
(Insert)
(Mark)
(Open)
(Read)

Argument n only
G

N
T

(Get)
(Next)
(Trailer)

,~

C-3

All Arguments (n,-n,O,@,/)
A
C
D
J
K
L
P
X

(Advance)
(Change)
(Delete)
(Jump)
(Kill)
(List)
(punch)
(eXchange)

Requiring
Text -Mode
C
G
H
I
X
C.7

Character
Oriented

Line
Oriented

(Change)
(Get)
(wHole)
(Insert)
-( eXchange)

A

K
L
P
X

(Advance)
(Kill)
(List)
(Punch)
(eXchange)

J
D

(Jump)
(Delete)

C

(Change)

r

OPERATING PROCEDURES

C.7.1

Loading:

Use Absolute Binary Loader (see Chapter 5).

c.7.2

Storage Requirements:

ED-II uses all of core.

C.7.3

Starting:

Immediately upon loading, ED-II will be in
control.

C.7.4

Initial Dialogue:

(-

Program T:lEes

User ResEonse

*I

L)
H)

(if LSR is to be used for source input)
(if HSR ,is to be used for source input)

*0

L)
H)

(if LSP is to be used for edited output)
(if HSP is to be used for edited output)

(

If the output device is the high-speed punch (HSP), Editor enters
command mode to accept input.
LSP OFF?
Upon input of

)

Otherwise the sequence continues with:
)

(when LSP is off)

from the keyboard, Editor enters command mode and is ready

to accept input.
C.7.S

Restarting:

(

Type CTRL/P twice, initiating the normal
initial dialogue. The text to be edited
should be loaded (or reloaded) at this time.

(
C-4

i

APPENDIX D
DEBUGGING OBJECT PROGRAMS ON-LINE, ODT-II ANDODT-IIX
D.I

SUMMARY OF CONTENTS

ODT indicates readiness to accept commands by typing

*

or by opening

a location by printing its contents.
1-

(

ODT-II
n/

opens word n

\

reopens last word opened

RETURN key

closes open location

+

opens next location

t

opens previous location
opens relatively addressed word

of-

$n/

opens general register n (0-7)

. ni G

(

goes to word n and starts execution

niB

sets breakpoint at word n

iB

removes breakpoint

$B/

opens breakpoint status word

iP

proceeds from breakpoint, stops again on next
encounter

niP

proceeds from breakpoint, stops again on nth encounter

$M/

opens mask for word search

niW

searches for words which match n in bits specified
in $M

niE

searches for words which address word n

n/ (contents) miO

calculates offsets from n to m

$S/

opens location containing user program's status
register

$P/

opens location containing ODT'S priority level

NOTE
If a word is currently open, new contents for the
word may be typed followed by any of the commands
RETURN, +, t, or of-. The open word will be modified
and closed before the new command is executed.

(

D-l

(~

2.

ODT-IIX

In addition to the commands of the regular version, the extended
version has the following:
opens byte
reopens last byte opened
opens the absolutely addressed word

D.2

>

opens the word to which the branch refers

<

opens next location of previous sequence

nirB
;rB

(r between 0 and 7) sets breakpoint r at word n
removes breakpoint r

;B

removes all breakpoints

$B/

opens breakpoint 0 status word. Successive LINE
FEEDs open words for other breakpoints and singleinstruction mode.

inS

enables Single-instruction mode (n can have any value
and is not significant)

niP

in single-instruction mode, !roceeds with program run
for next n instructions before reentering ODT (if
is missing, it is assummed to be 1)

;S

disables Single-instruction mode

(

,
(

OPERATING PROCEDURES

For assembling and loading the source tapes of both ODT versions,
see Section 5.6.3

(

The following describes use of the supplied

binary tapes.
1.

Loading

Both ODT versions are loaded by using the Absolute Loader (see Section 6.2.2).

ODT-ll is loaded into core starting at location 13060,

and requires about 500 locations of core..

ODT-IIX is loaded into

core starting at location 12150 and requires about 800 locations of
core.

(
D-2

2.

Starting

Each ODT version is dutomatically started by the Absolute Loader at
its start address immediately after loading.
3.

Restarting

There are two ways of restarting ODT:

(

1.

Restart at start address +2

2.

Reenter at start address +4

To restart, key in the start address +2 (13062 for ODT-ll or 12152
for ODT-IIX) and press the START switch.

All previously set break-

points will be removed, registers RO-R6 will be saved, and aDT will
assume that the trace trap vector has been initialized.

(

To reenter, key in the start address +4 (13064 for aDT-ll or 12154
for ODT-IIX) and press START.

All previously set breakpoints and

internal registers will be saved.

(
D-3

APPENDIX E
LOADING AND DUMPING CORE MEMORY

E.l
1.1.

The BOOTSTRAP Loader
Loading the Bootstrap Loader
The Bootstrap Loader should be toggled into the highest core memory

bank.
xx7744
xx7746
xx7750
xx7752
xx7754
xx7756
xx7760
xx7762
xx7764
xx7766
xx7770
xx7772
xx7774
xx7776

(

(

016701
000026
012702
000352
005211
105711
100376
116162
000002
xx7400
005267
177756
000765
yyyyyy

xx represents the highest available memory bank.

For example, the first

location of the loader would be one of the following,

de~ending

on memory

size, and xx in all subsequent locations would be the same as the first.
Location

(

Memor~

017744
037744
057744
077744
117744
137744
157744

\,

Bank

0
1
2
3
4
5
6

Memor:i Size
4K
8K
12K
16K
20K
24K
28K

The contents of location xx7776 (yyyyyy) in the Instruction

col~n

above should contain the device status register address of the paper tape
reader to be used when loading the bootstrap formatted tapes specified
as follows:

(

Teletype

Pa~er

Tape Reader

High-speed Paper Tape Reader
E-l

177560
177550

(

(
11-0068

Figure E-l

Loading and Verifying the Bootstrap Loader

(
E-2

2.

Loading with the Bootstrap Loader

------I

Place Bootstrap
Tope in
specified reader

see FigureE-l

Code 351 must be
over reader sensors

----------

(

Tope Reads in
and stops
At end of Data

- -

- -

-

-I

see Figure '-5

_

(
11-0067

Figure E-2.
E.2
1.

Loading Bootstrap Tapes into Core

THE ABSOLUTE LOADER
Loading the Absolute Loader
The Bootstrap Loader is used to load the Absolute Loader into core.

(See Figure E-2.)

The Absolute Loader occupies locations xx7474 through

xx7743, and its starting address is xx7500.
2.

Loading with the Absolute Loader
When using the Absolute Loader, there are three types of loads avail-

able:

normal, relocated to specific address, and continued relocation.
Optional switch register settings for the three types of loads are

listed below.
Type of Load

Switch Register
Bits 1-14
Bit 0

Normal

(ignored)

E-3

o

switch Register
Type of Load
Relocated - continue loading
where left off
Relocated - load in specified
area of core
E.3

Bits 1-14

Bit 0

o

1

nnnnn
(specified address)

1

CORE MEMORY DUMPS
The two dump programs are
DUMPTT, which dumps the octal representation of the
contents of all or specified portions of core onto
the teleprinter, low-speed or high-speed punch, or
line printer.

(

DUMPAB, which dumps the absolute binary code of the
contents of specified portions of core onto the lowspeed (Teletype) or high-speed punch.
Both dumps are supplied on punched paper tape in bootstrap and
absolute binary formats.

The following figure summarizes loading

and using the Absolute binary tapes.

(

(

c
E-4

No
~---~

Set ENABLE/HALT to

-ise"

Load ABS
LOADER

HALT

HSR=177550
LSR=177560
XX is HIGHEST CORE
MEMORY BANK

Set xx7776 to s ecify readerin Reader

Press LOAD ADDR

Fig_ E-2

(This is
necessary
only if
using a
reader
different
from that
used by
the
bootstrap
loader. )

(
Normal
Set bit 0 of SR ~------<
Specify ADDR inSpecific
ADDR
bits 1-14

~-------------~lear

Bit 0 of SR

Relocation
Set Bit 0 of SR

Clear Bits 1-14

Yes
">----~

Set ENABLE/HALT to ENABLE

>----~

Reload Loader -1----4

(

(

"--

Yes
Place next
........---~ in Reader

(
Figure E-3.

Loading with the Absolute Loader
E-5

tape~-~

SR=
SR=177550
x is highe$t
ore memory bank

See Fig. E~21'

See Fig. E-11

Toggle in
Boot Loader

No

No

Load ABS
Loader

~------~

See Fig. E-2!- - -

~=::.;..-=-:;::.:;~==:..I. -

-.a....;;;;.~;.;....;;;...y;.;.;.......

.;;;..;..;..Io..;;;.J

f

See Fig .E- 3

(

trans-

AD DR

(
TTY
or
LSP

Set SR

HSP

177564

(
LP

SetSR to 177514

(

Figure E-4.
Dumping Using

>-

DUMPAB or DUMPTT
E-6

c-'

Set SR to last
Byte Address
DUMPed

Core is DUMPed

(

c

Done

SET SR to
Transfer Addres
(TRA)

\

An odd transfer address
causes absolute loader
to halt

CONTinue

(

Set SR to TRA-

CONTinue

TRA block is
dumped
-'J

~\~

Done

(
Figure E-4 (continued).

Dumping Using DUMPAB or DUMPTT
E-7

APPENDIX F
INPUT/OUTPUT PROGRAMMING, lOX
F.1

INSTRUCTION SUMMARY
1.

Format:
lOT
.WORD (an address)
.BYTE (a command code, a slot number of a device)
.WORD (done address)

(

2.

Command Codes:
1

RESET

=
=

RSTRT

=

3

WAITR

=

4

SEEK

=
=

5

INIT

(

READ
WRITE
READR
WRITR
F.2

iREADR AND WRITR ONLY

=
=
=

2

11
12
13
14

PROGRAM FLOW SUMMARY

(
1.

Set up buffer header:
Contents

Location
(Buffer and

! Buffer+1

BUFFER
HE.~DER

I

Maximum number of data bytes (unsigned
integer)

Buffer+2

Mode of data (byte)

Buffer+3

Status of data (byte)

Buffer+4 and
I...Buffer+5
Buffer+6

Number of data bytes involved in transfer (unsigned integer)
Actual data begins here.

(
F-1

Mode Byte Format
Bits

7

1=

6

5

4

3

2

No Echo
Echo

0=

o

1

Bits

Unfor- Binary
matted

=1

Format- ASCII
ted

=0

Coding Mode Byte
Formatted ASCII

o

Formatted Binary

1

Unformatted ASCII

2

Unformatted Binary

3

(or 200 to suppress echo)
(or 202 to suppress echo)

(

Status Byte Format
7

1=
DONE

6

1=
EOM

5

4

3
I

1=
EOF

2

SEE CODES

j

i

o

1
I

I

I

I

NON-FATAL ERRORS

(

Coding Non-Fatal Errors

=
=
=

checksum error (formatted binary)
truncation of a long line
an improper mode

(
2.

Assign devices to slots in Device Assignment Table:
(RESET and INIT commands)
Slot numbers are in the range 0 to 7.
Device Codes:
KBD
TTY
LSR

3.

=
=
=

1

LSP

2

HSR

3

HSP

=
=
=

4

LPT

=

10

5

6

Use a data transfer command to initiate the transfer.

(
F-2

F.3

(-

FATAL ERRORS

Fatal errors result in a jump to 40 8 with RO set to the error code. Rl
is set to the value of the PC for error code O. Errors 1-5 cause Rl to
be set to an lOT argument or to the instruction following the arguments.
Fatal Error Code
0

Illegal Memory Reference, SP overflow, illegal
instruction

1

Illegal command

2

(

Reason

. Slot out of range

3

Device out of range

4

Slot not inited

5

Illegal data mode

/

\

F-3

APPENDIX G

(

SUMMARY OF FLOATING POINT
MATH PACKAGE, FPMP-II
This appendix lists all the global entry points of FPMP-II and
provides a brief description of the purposes of each.

Sections G.I

and G.2 are for reference when it is desired to call FPMP-II routines
directly (i.e., without the use of the TRAP handler).

'.

Entry names

preceded by an octal number can be referenced via the TRAP handler.
The number is the "routine number" referred to in the FPMP-II manual.
If the number is enclosed in parentheses, the routine cannot be
accessed by the present TRAP handler, but has been assigned a number

(

for future use.

For a more detailed explanation of the Floating

Point Math Package, refer to the FPMP-II User's Manual DEC-II-NFPMA-A-D.
Examples of the calling conventions are:
POLISH MODE:

c

JSR R4,$POLSH
$subrl
$subr2

ienter Polish mode
icall desired subroutines

$subrn
• WORD

icall last subroutine desired
;leave Polish mode

.+2

J5RR:
R5,subr
XX
argl
.WORD
. WORD
arg2

icall desired subroutine

. WORD

ilast argument
ireturn point

JSR
BR

(

XX:

argn

isubroutine argument address

G-I

JPC:

(I
push args onto stack
JSR PC,subr

G.l

OTS ROUTINES

These are the routine taken from the FORTRAN operating time system.
The codes used in the following table are:
S
D
SD

=
=
=

Routine is included in the standard single precision (2-word)
package.
Routine is included in the standard double precision (4-word)
package.
Routine is included in both standard packages.

(

Octal codes shown in parentheses are not yet implemented.
NAME
$ADD

OCTAL
CODE
14

PKG
D

$ADR

12

AINT
ALOG

# OF
ARGU
2

MODE
Polish

S

2

Polish

26

S

1

J5RR

53

S

1

J5RR

ALOGIO

54

S

1

J5RR

ATAN

42

S

1

J5RR

DESCRIPTION
The double precision add routine.
Adds the top stack item (4-words)
to the second item (4-words) and
leaves the four word sum in their
place.
The single prec1s10n add routine.
Same as $ADD except it uses 2 word
numbers.
Returns sign of argument * greatest
real integer = absolute value of
the argument in RO,Rl.
Calculates natural logarithm of its
single argument and returns a two
word result in RO ,Rl.
Same as ALOG, except calculates
base-IO logarithm.
Returns the arctangent of its
argument in RO,Rl.

G-2

(

(

•

(-

I,

# OF
ARGU

OCTAL
CODE

PKG

ATAN2

(43)

S

2

J5RR

Returns ARCTAN(ARG1/ARG2) in RO,Rl.

$CMD

16

D

2

Polish

Compares top 4 word items on the
stack, flushes the two items, and
returns the following condition
codes:
4 (SP)
@SP
N=l, Z=O
4(SP) = @SP
N=O,Z=l
4(SP)
@SP
N=O,Z=O

$CMR

17

S

2

Polish

Same as $CMD except it is for 2
word arguments.

COS

37

S

1

J5RR

Single precision version of DCOS.

DATAN

44

D

1

J5RR

Double precision version of ATAN.

DATAN2

(45 )

D

2

J5RR

Double precision version of ATAN2.

DBLE

(34)

1

J5RR

Returns in RO-R3 the double
precision equivalent of the single
precision (two word) argument.

$DCI

(57)

4

JPC

ASCII to double conversion.
Calling sequence:
Push address of start of ASCII
field.
Push length of ASCII field in
bytes.
Push format scale D (from W.D)
position of assumed decimal
point (see FORTRAN manual) .
Push P format scale (see
FORTRAN manual) .
JSR PC, $DCI.

NAME

SD

MODE

DESCRIPTION

(

(

Returns 4 word result on top of
stack.
$DCO

( 61)

SD

5

JPC

Double precision to ASCII
conversion. Calling sequence:
Push address of start of ASCII
field.
Push length in bytes of ASCII
field (W part of W.D)
Push D part of W.D (position of
decimal point) .
Push P scale.
Push 4 word value to be convert~
ed, lowest order word first.
JSR PC,$DCO.

(
~\

G-3

# OF
ARGU

NAME
DCOS

OCTAL
CODE
41

D

1

MODE
J5RR

DEXP

52

D

1

J5RR

$DI

(11)

SD

$DINT

(76)

D

1

Polish

DLOG

55

D

1

J5RR

DLOG10

56

D

1

J5RR

$DR

(6)

1

polish

DSIN

40

D

1

J5RR

DSQRT

47

D

1

J5RR

$DVD

23

D

2

Polish

$DVI

(24)

2

Polish

$DVR

25

2

Polish

PKG

S

Polish

DESCRIPTION
Calculates the cosine of its double
precision argument and returns the
double precision result in RO-R3.
Calculates the exponential of its
double precision argument, and
returns the double precision result
in RO-R3.
Converts double precision number on
the top of the stack to integer.
Leaves result on stack.
OTS internal function to find the
integer part of a double precision
number.
Double precision (4 word) version
of ALOG.
(
Double precision (4 word) version
of ALOG10.
Replaces the double precision item
at the top of the stack with its
two word, rounded form.
Calculates the sine of its double
precision argo and returns the
(
double precision result in RO-R3.
,
Calculates the square root of its
double precision argo. and returns
the double precision result in
RO-R3.
The double prec1s10n division
routin~.
Divides the second 4~word
item on the stack by the top item
and leaves the quotient in their
(
place.
The integer division routine.
Calculates 2(SP)/@SP and returns
the integer quotient on the -top of
the stack.
The single precision division
routine. Same as $DVD, but for 2
word floating point numbers.

c
G-4

NAME
$ECO

EXP

(

OCTAL
CODE
(62)

PKG
SD

51

S

# OF
ARGU
5

MODE
JPC

1

J5RR

5

JPC

1

J5RR

5

JPC

$FCALL
$FCO

(64 )

FLOAT

(32)

$GCO

(63)

$ICI

(65)

2

JPC

$ICO

(67)

3

JPC

IDINT

(31)

1

J5RR

$ID

(5)

1

Polish

IFIX

(35)

1

J5RR

DESCRIPTION
Single precision to ASCII
conversion according to E format.
Same calling sequence as $DCO
except that a 2-word value is to be
converted.
Single precision version of DEXP.
Returns result in RO,Rl.
Internal OTS routine.
Same as $ECO except uses F format
conversion.
Returns in RO-Rl, the real
equiv:alent of its integer argument.
Same as $ECO except uses G format
conversion.
ASCII to integer conversion
calling sequence:
Push address of start of ASCII
field.
Push length in bytes of ASCII
field.
JSR PC, $ICI
Returns with integer result on top
of stack.
Integer to ASCII conversion.
Calling sequence:
Push address of ASCII field.
Push length in bytes of ASCII
field.
Push integer value to be converted
JSR PC,$ICO
Error will return with C bit set
on. RO-R3 destroyed.
Returns sign of arg * greatest
integer <= largl in RO. Arg is
double precision.
Convert full word argument on the
top of the stack to double
precision and return result as top
4-words of stack.
Returns the truncated and fixed
real argument in RO.

S

SD

SD

(

(

so

.,

(
G:-5

NAME
INT

OCTAL
CODE
(30 )

PKG

$INTR

(27 )

$IR

41=
OF
ARGU

1

MODE
J5RR

S

1

Polish

(4)

SD

1

Polish

$MLD

22

D

2

Polish

$MLI

(20)

2

POlish

$MLR

21

S

2

Polish

$NGD

(3)

SD

2

Polish

$NG!

(1)

SD

1

Polish

$NGR

(2)

SD

1

Polish

$OCI

(66)

2

JPC

$OCO

(70 )

3

JPC

$POr.SE:

SD

$POPR3

D

Polish

$POPR4

D

Polish

DESCRIPTION
Same as IDINT for single precision
args.
Same function as AINT, but called
in Polish mode with argument and
returns result on the stack.
Convert full word argument on the
top of the stack to single precision and return result as top
2-words of stack.
Double precision multiply.
Replaces the top two doubles on
the stack with their product.
Integer multiply. Replaces the top
2 integers on the stack with their
full word product.
Single precision multiply.
Replaces the top two singles on the
stack with their product.
Negate the double precision number
on the top of the stack.
Negate the integer on the top of
the stack.
Negate the single precision number
on the top of the stack.
ASCII to octal conversion. Same
call as $ICI.
Octal to ASCII conversion. Some
call as $ICO.
Called whenever it is desired to
enter Polish mode from normal
in-line code. It must be called
via a JSR R4,$POLSH.
Internal routine to pop 2-words
from the stack and place them into
RO ,In.
Internal routine to pop 4-words
from the stack and place them in
RO-R3.

(

'"

(

(

(

(
G-6

NAME
(_. $POPR5

.j'-.

<:

(

(

(

OCTAL
CODE

# OF

PKG

ARGU

D

MODE
Polish

$PSHRI

SD

Polish

$PSHR2
$PSHR3
$PSHR4
$PSHR5
$RCI

(60)

SD
SD
SD
SD
SD

Polish
Polish
Polish
Polish
JPC

$RD

(7)

$RI

(10)

SD

Polish

$SBD

15

D

Polish

$SBR

13

S

Polish

SIN
SNGL

36

S

SQRT
TANH

46

S

1

50

S

1

4

DESCRIPTION
Internal routine to pop 4-words
from the stack and place them in
registers RO-R3.
Internal routine to push the
contents of RO onto the stack.
Same as $PSHRI.
Push RO,Rl onto stack.
Push RO-R3 onto stack.
Same as $PSHR4.
ASCII to single preC1S1on
conversion. .Same calling sequence
as $DCI. Returns 2-word result on
top of stack.
Converts the single precision
number on the top of the stack to
double precision format. Leaves
result on stack.
Converts single precision number on
the top of the stack to integer.
Leaves result on stack.
The double precision subtract
routine. Subtracts the double
precision number on the top of the
stack from the second double
precision number on the stack and
leaves the result on the top of the
stack in their place.
Same as $SBD but for single
precision.
Single precision version of DSIN.
Rounds double precision argument to
single precision. Returns result
in RO,Rl.
Single precision version of DSQRT.
Single precision hyperbolic tangent
function. Returns (EXP(2*ARG}-1)/
(EXP (2*ARG) +1) in RO ,Rl.

Polish

(33)

1
1

J5RR.
J5RR
J5RR
J5RR

(
G-7

G.2

NON-OTS ROUTINES

These routines are written especially for FPMP-ll and should not be
called directly by the user.
OCTAL
CODE

NAME

PKG

DESCRIPTION

$ERR

SD

Internal error handler.

$ERRA

SD

Similar to $ERR.

$LDR

71

S

Load FLAC, single precision.

$LDD

72

D

Load FLAC, double precision.

$STR

73

S

Store FLAC, single precision.

$STD

74

D

Store FLAC, double precision.

SD

The TRAP handler routines and
tables.

TRAPH

G.3

(~

(

ROUTINES ACCESSED VIA .TRAp HANDLER

The following is a table of the FPMP-ll routines which can be accessed
via TRAPH; the trap handler.

Each routine name (entry point) is

preceded by its TRAP code number to be used to

(

access it, and followed

by a brief description of its operation when called via the TRAP
handler.

Those entries which are preceded by an asterisk (*) perform

operations only on the FLAC, and address no operands.

For example, a

TRAP call to the single precision square root routine can be coded as

(

follows:

TFAP

46

The net effect of the above TRAP instruction is to replace the
contents of the FLAC with its square root and then set the condition
codes to reflect the result.

Note that since the FLAC is implicitly

addressed in this instruction, the TRAP call supplies no other address.
For such a TRAP call, the addressing mode bits (bits 6 and 7 of the
~RAP

instruction) are

igno~ed.

G-8

(

All entries not marked by an asterisk require an operand when called.
The operand is addressed in one of the 4 addressing modes explained in
section 3.1.1. of the FPMP-11 User's Manual.

The addressing mode is

specified in bit 6-7 of the TRAP instruction.

("Operand" is the contents of the location addressed in the TRAP call.)

OCTAL
CODE

NAME

14

$ADD

Double precision addition routine. Adds
operand to the FLAC. Assumes 4-word
operand.

12

$ADR

Single precision addition routine. Adds
operand to the FLAC. Assumes 2-word
operand.

*

26

AINT

*

53

ALOG

Replaces contents of the FLAC by its natural
logarithm. Assumes 2-word argument in FLAC.

*
*

54

ALOG10

Same as ALOG, except calculates base-10 log.

42

ATAN

Replaces contents of the FLAC by its
arctangent. Assumes 2-word argument in
FLAC.

16

$CMD

Compares operand to the contents of the
FLAC, and returns the following condition
codes.
FLACoperand, N=O,Z=O
Assumes 4-word operands.

17

$CMR

Same as $CMD, but for 2-word operands.

*

37

COS

Same as DCOS, but for 2-word argument.

*

44

DATAN

Same as ATAN, but for 4-word argument.

*

52

DEXP

Replaces the contents of the FLAC by its
exponential. Assumes 4-word argument in
the FLAC.

*
*
*

55

DLOG

Same as ALOG, but for 4-word argument.

56

DLOG10

Same as ALOG10, but for 4-word argument.

41

DCOS

Replaces the contents of the FLAC by its
cosine. AsSumes 4-word argument in the
FLAC.

.(

(

(

DESCRIPTION

Replaces contents of the FLAC by its integer
SIGN (FLAC) * greatest integer <=
IFLACI. Assumes 2-word argument in FLAC.

~art.

(

(
G-9

OCTAL
CODE

NAME

DESCRIPTION

*

40

DSIN

Same as DCOS, but calculates sine instead
of cosine.

*

47

DSQRT

Replaces the contents of the FLAC by its
square root. Assumes 4-word argument in the
FLAC.

23

$DVD

Double precision division routine. Divides
the FLAC by the operand and stores the
result in the FLAC. Assumes 4-word operands.

25

$DVR

Same as $DVD, but for 2-word operands.

51

EXP

Same as DEXP, but for 2-word argument.

72

$LDD

Same as $LDR, but assumes 4-word operand.

71

$LDR

Replaces the contents of the FLAC by the
operand. Assumes 2-word operand.

22

MLD

Double precision multiplication routine.
Multiplies the contents of the FLAC by the
operand and stores the result in the FLAC.
Assumes 4-word operands.

21

$MLR

Same as $MLD, but for 2-word operands.

15

$SBD

The double precision subtraction routine.
Subtracts the operand from the contents
of the FLAC. Assumes a 4-word operand.

13

$SBR

Same as $SBD, but for 2-word operand.

36

SIN

Same as DSIN, but for 2-word argument.

46

SQRT

Same as DSQRT, but for 2-word argument.

73

$STR

Stores the contents of the FLAC into the
operand location. The contents of the
FLAC are unchanged.

74

$STD

Same as $STR, but assumes 4-word operand
location.

50

TANH

Replaces the contents of the FLAC by its
hyperbolic tangent. Assumes 2-word
argument.

*

*
*

*

(

(

(

c
G-IO

APPENDIX I
ASSEMBLING THE PAL-llA ASSEMBLER

The following procedures are for assembling the PAL-II Assembler
source tapes.

An !ilK version of the PAL-llA (V007A) Assembler

is required, thus also requiring at least an 8K PDP-II system.
The Assembler consists of two programs.

The first program,

on tape 1, is a memory clear program and is very short
(DEC-ll-UPLAA-A-PAl).

The second program is the Assembler proper,

and consists of eleven ASCII tapes (DEC-ll-UPLAA-A-PA2-PA12).
They are assembled as follows:
1.

Generate a sufficient amount of blank leader tape.

2.

Assemble the memory clear program source tape
(DEC-ll-UPLAA-A-PAl) and assign the binary output
to the high-speed punch. For example, PAL-llA's
initial dialogue to specify the 2-pass assembly
would be:

(

*S
*B
*L

H

HIE

"Frf
(PAl assembly - 1st pass)
END?
(PAl assembly - 2nd pass)
(No errors - Do not remove
the binary tape from the punch.)

(
\

3.

Assemble the rest of the Assembler's source tapes
(PA2 - PA12) in numerical sequence.
Assign the binary output to the high-speed punch. For
example, the initial dialogue should be answered as
follows:
*S
*B
*L

H
HIE

*T

(

EOF
EOF
EOF
EOF
EOF

?
?
?
?
?

(Enter tape PA2 for 1st
(End of tape PA2, enter
(End of tape PA3, enter
(End of tape PA4, enter
(End of tape PAS, enter

I-I

pass)
PA3)
PA4)
PAS)
PA6)

.L--

EOF ?
EOF ?
EOF ?
EOF ?
EOF ?
EOF ?
MAXC13
END ?
EOF ?
EOF ?
EOF ?
EOF ?
EOF ?
EOF ?
EOF ?
EOF ?
EOF ?
EOF ?
EOF ?

= ******

%¢0'¢fJ9' ERRORS

(End of tape PA6, enter PA7)
(End of tape PA7, enter PA8)
(End of tape PA8, enter PA9)
(End of tape PA9, enter PAlO)
(End of tape PAlO, enter PAll)
(End of tape PAll, enter PA12)
(End of first pass)
SIMBC = ******

(,

"

(Enter tape PA2 for 2nd pass)
(End of tape PA2, enter PA3)
(End of tape PA3, enter PA4)
(End of tape PA4, enter PAS)
(End of tape PAS, enter PA6)
(End of tape PA6, enter PA7)
(End of tape PA7, enter PA8)
(End of tape PA8, enter PA9)
(End of tape PA9, enter PAlO)
(End of tape PAlO, enter PAll)
(End of tape PAll, enter PA12)
(End of 2nd pass)

(

C
*S
Note that at the end of the first pass there are two
undefined symbols: MAXC13 and SIMBC. These undefined symbols
are resolved so that there are no errors reported during the

(

second pass.
Be sure that there is sufficient blank trailer tape on
the binary output tape before removing the assembled tape from
the punch.

(

Normally, using high-speed paper tape input and output,
this process requires about 4S minutes.

If a symbol table and

listing are requested, there will be about750 symbols and about
4S00 lines of listing.

I-2

APPENDIX H
TAPE DUPLICATION

Duplication of paper tapes can be accomplished via low- or highspeed I/O devices by toggling (as with the Bootstrap Loader)

the follow-

ing program directly into memory through the Switch l€gister.
Section G.l.l in Chapter 6

if necessary, for toggling proQedure.)

1.

Turn on appropriate device switches and place tape in
desired reader.

2.

Set ENABLE/HALT switch to HALT.

3.

Set Switch Register to the desired starting address
and press LOAD ADDR.

4.

Set Switch Register to each value listed in the CONTENTS
column below, lifting the DEP switch after each setting.
(Addresses are automatically incremented.)
The desired
input device (either ~ow- or ~igh-~eed ~eader) and output device (~ow- or ~igh-~eed ~unch) are specified in
the last two words.
ADDRESS

CONTENTS
016700
000024
016701
000022
005210
105710
100376
105711
100376
022021
111011
000764
177560 (LSR) or 177550 (HSR)
177564 (LSP) or 177554 (HSP)

0
2
4
6
10
12
14
16
20
22
24
26
30
32
5.

Set Switch Register to starting address specified in
3 above and press LOAD ADDR.

6.

Set ENABLE/HALT switch to ENABLE.

7.

Press START switch.
NOTE

(

(Refer to

This program is recommended as a simple way of
duplicating the system tapes. However, for extensive tape duplication, the program shown in
section 7.8 is recommended.

H-l

APPENDIX J

r

STANDARD PDP-II ABBREVIATIONS

Definition

Abbreviation
ABS

,,"

(

AID

absolute
analog-to-digital

ADC
ADRS

add carry
address

ASCII

American Standard Code
for Information Inter-

ASL
ASR
/

(
B
BAR
BBSY
BCC
BCS
BEQ

C-,

(

c-

Abbreviation

BG
BGE

change
arithmetic shift left
arithmetic shift right
automatic send/receive

CBR

console bus request

CLC
CLK
CLN

dear carry

CLR
CLV
CLZ
CMP
CNPR
CNTL
COM
COND

byte
bus address register

CONS
CaNT

bus busy
branch if carry clear
branch if carry set
branch if equal

Definition

clock
clear negative
clear
clear overflow
clear zero
compare
console nonprocessor request
control
complement
condition
console

CP

contents
continue
central processor

CSR

control and status register

D

data
digital-to-analog

bus grant

BGT

branch if greater or equal
branch if greater than

BHI

branch if higher

BHIS
BIC
BIS
BIT
BLE
BLOS
BLT
BMI
BNE
BPL
BR
BRD

branch if higher or same
bit clear
bit set
bit test
branch if less or equal

BRX
BSP
BSR
BSY

bus request
back space
bus shift register
back space record
busy

BVe
BVS

branch if overflow clear
branch if overflow set

branch
branch
branch
branch
branch

if lower or same
if less than
if minus
if not equal
if plus

branch
bus register data

D/A
DAR
DATI
DATIP
DATa
DATOB
DBR
DCDR
DE
DEC

",

J-I

data in
data in. pause
data out

DEL
DEP
DEPF

data out. byte
data buffer register
decoder
destination effective address
decrement
Digital Equipment Corp.
delay
deposit
deposi t flag

DlV
DMA

divide
direct memory acc!!ss

DSEL
DST

device select
destination
display. X-defledion register

DSX

(

device address register

~

(
Abbreviation

Definition

EMT
ENB
EOF
EOM
ERR
EX
EXAM
EXAMF
EXEC
EXR

emulator trap
enable
end-of-file
end-of-medium
error
external
examine
examine flag
execute
external reset

F
FCTN
FILO
FLG

flag (part of signal name)
function
first in, last out
flag

GEN

generator

INDIVR
INC
INCF
IND
INH
INIT
INST
INTR
INTRF
I/O
lOT
lOX
IR
IRD
ISR

integer divide routine
increment
increase
increment flag
indicator
inhibit
initialize
"instruction
interrupt
in terrupt flag
input/output
input/output trap
input/output executive routine
instruction register
instruction register decoder
instruction shift register

JMP
iSR

jump
jump to subroutine

LIFO
LKS
LOC
LP

last in, first out
line time clock status register
location
line printer

Abbreviation

Definition

LSB
LSBY
LSD

least significant bit
least significant byte
least significant digit

MA
MAR
MBR
MEM
ML
MOV
MSB
MSBY
MSD
MSEL
MSYN

memory address
memory address register
memory buffer register
memory
memory location
move
most significant bit
most significant byte
most significant digit
memory select
master sync

ND
NEG
NOR

negative driver
negate
normalize
nonprocessor grant
nonprocessor request
nonprocessor request flag

"

NPG
NPR
NPRF
NS
ODT
OP
OPR

PA
PAL
PB
PC
PD
PDP
PERIF
PGM
PP
PPB
PPS
PR

(

(

negative switch
octal debugging technique
operate
operation
operator
operand
parity available
program assembly language
parity bit
program counter
positive driver
programmed data processor
peripheral
program
paper tape punch
paper tape punch buffer register
paper tape punch status register
paper tape reader

(

-,

(
'-"-

J-2

J-3

APPEl\I1HX K
CONVERSION

TABLES

OCTAL-DECIMAL INTEGER CONVERSIONS
I

2

3

4

5

6

7

I

2

3

4

5

6

7

0000
0008
0016
0024
0032
0040
0048
0056

0001
0009
0017
0025
0033
0041
0049
0057

0002
0010
0018
0026
0034
0042
0050
0058

0003
0011
0019
0027
0035
0043
0051
0059

0004
0012
0020
0028
0036
0044
0052
0060

0005
0013
0021
0029
0037
0045
0053
0061

0006
0014
0022
0030
0038
0046
0054
0062

0007
0015
0023
0031
0039
0047
0055
0063

0400
0410
0420
0430
0440
0450
0460
0470

0257
0265
0273
0281
0289
0297
0305
0313

0258
0266
0274
0282
0290
0298
0306
0314

0259
0267
0275
0283
0291
0299
0307
0315

0260
0268
0276
0284
0232
0300
0308
0316

0261
0269
0277
0285
0293
0301
0309
0317

0262
0270
0278
0286
0294
0302
0310
0318

0263
0271
0279
0287
0295
0303
0311
0319

0064
0072
0080
0088
10096
0104
0112
0120

0065
0073
0081
0089
0097
0105
0113
0121

0066
0074
0082
0090
0098
0106
0114
0122

0067
0075
0083
0091
0099
0107
0115
0123

0068
0076
0084
0092
0100
0108
0116
0124

0069
0077
0085
0093
0101
0109
0117
0125

0070
0078
0086
0094
0102
0110
0118
0126

0071
0079
0087
0095
0103
0111
0119
0127

0500 0320 0321
0510 0328 0329
05~0 0336 0337
0530 0344 0345
0540 0352 fi353
0550 0360 0361
0560 0368 0369
0570 0376 0377

0322
0330
0338
0346
0354
0362
0370
0378

0323
0331
0339
0341
0355
0363
0371
0379

0324
0332
0340
0348
0356
0364
0372
0380

0325
0333
0341
0349
0357
0365
0373
0381

0326
0334
0342
0350
0358
0366
0314
0382

0327
0335
0343
0351
0359
0367
0375
0383

0200
0210
0220
0230
0240
0250
0260
0270

0128
0136
0144
0152
0160
e,168
0176
0184

0129
0137
0145
0153
0161
0169
0177
0185

0130
0138
0146
0154
0162
0170
0178
0186

0131
0139
0147
0155
0163
0171
0179
0187

0132
0140
0148
0156
0164
0172
0180
0188

0133
0141
0149
0157
0165
0173
0181
0189

0134
0142
0150
0158
0166
0174
0182
0190

0135
0143
0151
0159
0167
0175
0183
0191

0385
0393
0401
0409
0417
0425
0433
0441

0386
0394
0402
0410
0418
0426
0434
0442

0387
0395
0403
0411
0419
0427
0435
0443

0388
0396
0404
0412
0420
0428
0436
0444

0389
0397
0405
0413
0421
0429
0437
0445

0390
0398
0406
0414
0422
0430
0438
0446

0391
0399
0407
0415
0423
0431
0439
0417

0300 0192
0310 0200
0320 0208
10330' 0216
i 0340 I 0224
0350 0232
10360 0240
0370 0248

0193
0201
0209
0217
0225
0233
0241
02411

0194
0202
0210
0218
0226
0234
0242
0250

0195
0203
0211
0219
0227
0235
0243
0251

0196
0204
0212
0220
0228
0236
0244
0252

0197
0205
0213
0221
0229
0237
0245
0253

0198
0206
0214
0222
0230
0238
0246
0254

0449
0457
0465
0473
QoI81
0489
0497
0505

0450
0458
0466
0474
0482
0490
0498
0506

0451
0459
0467
0475
0483
0491
0499
0507

0452
0460
0468
0476
0484
0492
0500
0508

0453 0454
0~61 0462
0469 0470
0477 0478
0485 0486
0493 0494
0501 ·0502
nS09 0510

0455
0463
0471
0479
0487
0495
0503
0511

1

2

3

4

5

6

I

2

3

4

0513
0521
0529
0537
0545
0553
U561
0569

0514
0522
0530
0538
0546
0554
0562
0570

0515
0523
0531
0539
0547
0555
0563
0571

0516
0524
0532
0540
0548
0556
0564
0572

0517
0525
0533
0541
0549
0557
1)565
0573

0518
0526
0534
(l542
0550
0558
0566
0574

0519 1140010768 0769 0770 0771 0772 0773 0774 0775
0527 1410,0776 0777 0778 0779 0780 0781 0782 0783
0535 1420·0784 0785 0786 0787 0788 0789 0790 0791
0543 1430 0792 0793 0794 0795 0796 0797 0798 0799
0551
I44J 08JO 0801 0802 0803 0804 0805 080e 0807
0559 14.50 0808 080ll 0810 0811 0812 0813 0814 0815
0567
1460 0816 0817 0818 0819 0820 0821 0822 0823
0575
1470 0824 0825 0826 0827 0828 0829 0830 0831

0000
to
0511

c

I

0

1000
to
1777
(Octal)

(

0

0000
0010
0020
0030
(Decimal ) 0040
(Octal)
0050
0060
0070
Octal Decimal
10000· 4096
0100
20000· 8192
0110
30000·12288
0120
40000 . 163M
0130
50000 . 20480
0140
60000 . ·24576
0150
70000 . 28672
0160
0170

0000
to
0777

(

0

1000 0512
1010 0520
1020 0528
1030 I 0536
(Decimal) 1040' 0544
1050 0552
1060 0560
1070 0568

0512
to
1023

0256
0264
0272
0280
0288
0296
0304
0312

·0384
0392
0400
0408
0416
0424
0432
I 0440
I
0199 0700' 0448
0207 0710 0456
0215 0720. 0464
0223 0730 ! 0472
0231 074010480
0239 075: 0488
0247 0760 0496
O~ 0770 0504
0600
0610
0620
0630
0640
0650
0660
0670

i

I

7

,

~

0

5

6

7

1100
1110
1120
1130
1140
1150
1160
1170

0576
0584
0592
0600
0608
0616
0624
0632

0577
0585
0593
0601
0609
0617
0625
0633

0578
0586
05i4
0602
0610
0618
0626
0634

0579
0587
0595'
0603
0611
0619
0627
0635

0580
0588
0596
0604
0612
0620
0628
0636

0581
Oi89
0597
0605
0813
0621
0629
0637

0582
0590
0598
0606
0614
0622
0630
0638

0583
0591
0599
0607
0615
oe23
0631
0639

1500,0832
1510 I 0840
1520 i 0848
1530; 0856
1540 I 0864
1550' 0872
1560 0880
1570 0888

0833
0841
0849
0857
0865
0873
0881
0889

0834
0842
0850
0858
0866
0874
0882
0890

0835
0843
0851
0859
0867
0875
0883
0891

0836
0844
0852
0860
0868
0876
0884
0892

0837
0845
0853
0861
0869
0877
0885
0893

0838 0839
08i6 0847
0854 0855
08~2 086j
0870 0871
0878 08711
0886 0887
089~ 0895

1200
1210
1220
1230
1240
1250
1260
1270

0640
0648
0656
0664
0672
0680
0688
0696

0641
0649
0657
0665
0673
0681
0689
0697

0642
0650
0658
0666
0674
0682
0690
0698

0643
0651
0659
0667
0675
0683
0691
0699

0644
0652
0660
0668
0676
0684
0692
0700

0645
0653
0661
0669
0677
0685
0693
0701

0646
0654
0662
0670
0678
0686
0694
0702

0647
0655
0663
0671
0679
0687
0695
0703

1600
1610
1620
1630
1640
1650
1660
1670

0896
0904
0912
0920
0928
,0936
10944
0952

0897
0905
0913
0921
0929
0937
0945
0953

0898
0906
0914
0922
0930
0938
0946
0954

0899
0907
0915
0923
0931
0939
0947
0955

0900
0908
0916
0924
0932
0940
0948
0956

0901
0909
0917
0925
0933
0941
0949
0957

0902
0910
0918
0926
0934
0942
0950
0958

1300 0704 0705 0706
1310 0712 071S 0714
1320 0720 0721 0722
0728 0729 0730
1340 0736 0737 0738
1330
13~0 0744 074~ 0746
11360 0752 0753 0754
1370 0760 0761 0762

0707
0715
0723
0731
0739
0747

0708
0716
0724
0732
0740
0748
07~5 0756
0763 0764

0709
0717
0725
0733
0741
0749
0757
0765

0710
0718
0726
0734
0142
0750

0711
0719
0727
0735
0743
0751
07~8 0759
0766 0767

1700
1710
1720
1730
1740

0960
0968
0976
098<
0992
17~0 100e
1760 1008
17"10 1016

0961
0969
0977
0985
0993
1001
1009
1017

0962
0970
0978
0986
0994
1002
1010
1018

0963
0971
0979
0987
0995
1003
1011
1019

0964
0972
0980
0988
0996
1004
1012
1020

0965
0973
0981
0989
0997

i

K-l

0903
0911
0919
0927
0935
0943
0951
0959

0967
0975
0983
0991
09119
100~
1007
1013 IOH 1015
1021 1022 102l
0966
0974
0982
0990
-og98
100(1

K.l

I

I

I

2

3

4

5

6

2400
2410
2420
2430
2440
2450
2460
2470

1280
1288
1296
1304
1312
1320
1328
1336

1281
1289
1297
1305
1313
1321
13211
1337

1282
1290
1298
1306
1314
1322
1330
1338

1283
1291
1299
1307
1315
1323
1331
1339

.128'4
1292
1300
1308
1316
1324
Ill2
1340

1285
1293
1301
1309
1317
1325
1333
1341

1286
1294
1302
1310
1318
·1326
1334
1342

1287
1295
1303

2500
2510
2520
2530
2540
2550
2560
2570

1344
1352
1360
1368
1376
1384
1392
1400

1345
1353
1361
1369
1377
1385
1393
1401

1346
1354
13:12
1370
1378
1386
1394
1402

1347
U55
1363
1371
1379
1387
1395
1403

1348
1356
1364
1372
1380
1388
1396
1404

1349
US?
1365
1373
1381
1:.189
1397
1405

1350
I3S8
1366
1374
1382
1390
1398
1406

1351
1359
1367
1375
1383

2200 11152 1153 1154 1155 1156 1157 1158 1159 2600
2610
2220 1168 1169 1170 1171 1172 1173 1174 1175 2.620
223~ 1176 1177 1178 1179 1180 1181 1182 1183 2630
2240 1184 1185 1186 118" lI88 1189 1190 1191 2640
2250 1192 1193 1194 1195 1196 11117 1198 1199 26Se.
2260 1200 1201 1202 1203 1204 1205 1206 1207 2660
2270 1208 1209 1210 1211 1212 1213 1214 1215 2670

1408
1416
1424
1432
1440
1448
1456
1464

1409
1417
1425
1433
1441
1449
1457
146S

1410
1418
1426
1434
1442
1450
1458
1466

1411
1419
1427
1435
1443
1451
1459
1467

1412
1420
1428
1436
1444
1452
1460
1468

1413
1421
1429
1437
1445
1453
1461
1469

1414
1422
1430
1438
1446
1454
1462
1470

HIS
14U
1431
In9
1447
1455
1463
1471

2700
2710
2720
2730
2740
2750
2760
2770

1472
1480
1488
1496
1504
1512
1520
1528

1473
1481
1489
1497
1505
1513
1521
1529

1414
1482
1490
1498
1506
1514
H22
1530

Ins
1483
1491
1499
1507
ISIS
1523
1531

1476
1484
1492
1500
1508
1516
1524
1532

1477
1485
1493
1501
1509
1517'
1525
1533

1478 147.
1486 1417
149~ 1495
1502 1503
1510 ISlI
1518 15111
1526 1527
1534 1535

0

1

2

3

4

5

6

7

1543 3400
15~1I 3410
1559 3420
1567 3430
1575 3440
1583 3450
1591 3460
1599 3470

1792
1800
1808
IBI6
1824
1832
1840
1848

1793
1801
1809
1817
1825
1833
1841
1849

1794 179S
1802 1803
1810 IBII
1818 1819
1826 1827
1834 1835
1842,1843
1850 1851

1796
1804
1812
1820
1828
1836
It 844
1852

17117
1805
1813
1821
1829
1837
1845
1853

1798
1806
1814
1822
1830
1838
1846
1854

1799
1807
1815
1823
1831
1839
1847
1855

1024

10000 - 4096
20000- 8192
30000 - 12288
40000 - 16384
50000 - 20480
60000 - 24576
70000 - 28672

2100
2110
2120
2130
2140
2150
2160
2170

1088
1096
1104
1112
1120
1128
1\36
1144

1

2

3

4

5

6

7

1025
1033
1041
1049
1057
1065
1073
1081

1026
1034
1042
1050
1058
1066
1074
1082

1027
1035
1043
1051
1059
1067
·1075
1083

1028
1036
1044
1052
1060
1068
1076
1084

1029
1037
1045
10S3
1061
1069
1077
J085

1030
1038
1046
1054
1062
1070
1078
1086

1031
1039
1047
1055
1063
1071
1079
1087

11189
1097
1105
1113
1121
1129
1137
1145

1090
1098
1106
1114
1122
1130
1138
114G

1091
1099
1107
1115
1:23
1131
1139
1147

1092
1100
1108
1116
1124
1132
1140
1148

1093 1094
nOI 1102
1109 1110
1117 1118
1125 1126
1133 1134
1141 1142
1149 WiO

1095
1103
1111
11111
1127
1135
1143
U51

2210 1160 1161 1162 1163 1164 1165 1166 1167

2300
2310
2320
2330
2340
2350
2360
2370

1216
1224
1232
1240
1248
1256
1264
1272

I0
3777
(Octal)

1217
1225
1233
1241
1249
1257
126.5
127;1

1218
1226
1234
1242
1250
1258
1266
1274

I

-

1219
1227
1235
1243
125!
1259
1267'
1275

1220
1228
1236
1244
1252
1260
1268
1276

1221
1229
1237
1245
1253
1261
1269
1277

1222
1230
1238
1246
1254
1262
1270
1278

1223
lUI
lUll
1247
1255
1263
1271
1279
7

2

3

4

5

6

1

1311

13111
1327
1335
1343

1391
13911 1
1407

3000
3010
3020
2047
(Decimal ) 3030
3040
3050
3060
3070

1536
1544
1552
1560
1568
1576
1584
1592

1537
1545
1553
1561
1569
1577
1585.
1593

1538
1546
1554
1562
1570
1578
1586
1594

1539
1547
1555
1563
1571
1579
1587
1595

1540
1548
1556
1564
1572
1580
1588
1596

1541
1549
1557
1565
1573
1581
1.589
1597

1542
1550
1558
1566
1574
1582
1590
1598

3100
3110
3120
3130
3140
3150
3160
3170

1600
1608
1616
1824
1632
1640
1648
1656

1601
1609
1617
1$25
1633
1641
1649
1657

1602
1610
1618
1626
1634
1642
1650
16S8

1603
1611
1619
1627
1635
1643
1651
1659

1604
1612
1620
1628
1636
1644
1652
1660

1605
1613
1621
1629
1637
1645
1653
1661

1606
1614
1622
1630
i638
1646

1607
1615
1623
1631
1639
1647
16~4 1655
1662 1663

3500
3510
3520
3530
3540
3550
3560
3570

1856
1864
1872
1880
1888
1896
1904
1912

1857
1865
1873
1881
1889
1897
1905
1913

1858
1866
1874
1882
1890
1898
1906
1914

1859
1867
1875
1883
1891
1899
1907
1915

1860
1868
1876
1884
1892
1900
1908
1916

1861
1869
1877
1885
1893
1901
1909
1917

1862
1870
1878
1886
1894
1902
1910
1918

1"3
1871
1879
1887
1895
1903
1911
1919

3200 1664
3210 1672
3220 1680
3230 1688
3240 1696
3250 1704
326011712
327011720

1665
1673
1681
1689
1697
1705
1713
1721

1666
1674
1682
1690
1698
1706
1714
1722

1667
1675
1683
1691
1699
1707
1715
1723

1668
1676
1684
1692
1700
1708
1716
1724

1669
1677
1685
1693
1701
1709
1717
1725

1670
1678
1686
1694
1702
1710
1718
1726

1671
1,679
1687
1695
1703
1711
1719
1727

3600
3610
3620
3630
3640
3650
3660
3670

1920
1928
1936
1944
1952
1960
1968
1976

1921
1929
1937
1945
1953
1961
1969
1977

1922
19;10
1938
1946
1954
1962
1970
1978

1923
1931
1939
1947
19:.5
1963
1971
1979

1924
1932
1940
1948
1956
1964
1972
1980

1925
1933
1941
1949
1957
1965
1973
1981

1926
1934
1942
1950
1958
1966
1974
1982

1927
1935
1943
1951
1959
1967
1975
1983

3300 '1728
331011736
3320· 1744
3330 1752
3340 1760
3350 1768
,3360 1776
3370 1784

1729
1737
1745
1753
1761
1769

1731 1732
1739 1740
1747 1748
1755· 1756
1763 1764
1771 1772
1779 1780
1787 n88

1733
1741
1749
1757
1765
1773
1781
1789

1734
1742
1750
17S8
1766
1774
1182
1790

1735
1743
1751
1759
1767
1775
1783
1791

3700
3710
3720
3730
3740
3"50
3760
3770

1984
1992
2000
2008
2016
2024
2012
2040

1985
1993
2001
2009
2017
2025
2033
204.

1986
1994
2002
2010
2018
2026
2034
2!l42

198'1 1988
199~ 1996
2003 2004
2011 2012
2019 2020
2027 2e.~g
203:'1 ~fJ36
2(14' 20H

1989
1997
2005
2013
2021
2029

1990
1998
2006
2014
2022
2030

1991
1999
2007
2015
2o.'!.i

20;17

20~5

10
134
w
'"3:
268
536
0D..
1 073
2 147
4 294
8 589
17 179
34 359
68 719
137 438
274 877
549 755
1 ,099 511
2 199 023
4 398 046
8 796 093
17 592 186
35 184 372
70 368 744
140 737 488
281 474 976
562 949 953
1 125 899 906
2 251 799 813
4 503 599 627
9 007 199 254
18 014 398 509
36 028 797 018
72 057 594 037
144 115 188 075
288 230 376 151
576 460 752 303
152 921 504 606

...

(
"-

.'

00

(

\.

"

'\

n

2
4
8
16
32
64
128
256
512
1 024
2 048
4 096
8 192
16 384
32 768
65 536
131 072
262 144
524 288
048 576
097 152
194 304
388 608
777 216
554 432
108 864
217728
435 456
870 912
741 824
483 848
967 296
934 592
869 184
738 368
476 736
953 472
906 944
813888
627 776
255 552
511 104
022 208
044 416
088 832
177 664
355 328
710 656
421 312
842 634
985 248
370 496
740 992
481 9134
963 968
927 936
855 872
711 744
423 488
846 976

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60

-2

1.0
0.5
0.25
0.125
0.062
0.031
0.015
0.007
0.003
0.001
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
a.000
a.000
a .000
a.000
a.000
a.000
0.000
0.000
a.000
a.000
a.000
a .000
o.000
a.000
a.000
a.000
a.000
a.000
a.000
a.000
0.000

5
25
625
812
906
953
976
488
244
122
061
030
015
007
003
001
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000

5
25
125
562
281
140
070
035
517
258
629
814
907
953
476
238
119
059
029
014
007
003
001
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000
000

5
25
625
312
156
578
789
394
697
348
674
837
418
209
604
802
901
450
725
862
931
465
232
116
058
029
014
007
003
00 1
000
000
000
000
000
000
000
000'
000
000
000
000
000
000
000
000
000
000
000
000
000

K-5

5
25
125
062
531
265
632
316
158
579
289
644
322
161
580
290
645
322
661
830
415
207
103
551
275
637
818
909
454
227
113
056
028
014
007
00 3
00 1
000
000
000
000
000
000
000
000
000
000
000

5
25
625
812
406
203
101
550
775
387
193
596
298
149
574
287
643
321
660
830
915
957
978
989
494
747
373
686
843
421
210
105
552
776
888
444
222
111
055
027
013
006
003
001
000

5
25
125
562
781
390
695
847
923
461
230
615
307
653
826
913
456
228
614
807
403
701
350
675
837
418
709
854
427
713
356
178
089
044
022
511
755
877
938
469
734
867

5
25
625
312
656
808
914
957
478
739
869
934
467
733
366
183
091
545
772
886
443
721
860
430
715
357
678
839
419
209
604
302
151
575
787
893
446
723
361

5
25
125
062
031
515
257
628
814
407
703
851
425
712
856
928
464
232
616
808
404
202
601
800
400
700
850
925
462
231
615
807
903
951
475
737

5
25
625
812
906
453
226
613
806
903
951
475
237
118
059
029
014
007
003
001
500
250
125
062
031
515
257
628
814
907
953
976
988

5
25
125
562
081
640
320
660
830
915
957
478
739
869
434
717
858
929
464
232
616
308
654
827
913
456
228
614
807
403

5
25
625
312
156
078
039
519
759
379
689
844
422
711
355
677
338
169
084
042
021
510
755
377
188
094
547

5
25
125
062
531
765
882
941
970
485
242
621
810
905
452
726
363
171
590
215
647
823
411
205

5
25
625
812
406
703
351
675
337
668
334
667
333
166
513
791
395
697
848
924
962

5
25
125
562
781
890
945
472
236
668
834
417
708
854
927
963
481
240

5
25
625
312
656
328
164
582
041
520
260
130
565
782
891

5
25
125
062
031
015
507
253.
126
063
531
265

5
25
625
812
906
953
476
738
869

5
25
125
562 5
281 25
140 625

SCALES OF NOTATION

K.3

x
1.00069
1.00138
1.00208
1.00277
1.00347
1.00416
1.00486
1.00556
1.00625

33874
72557
16050
64359
17485
75432
38204
05803
78234

62581
11335
79633
01078
09503
38973
23785
98468
97782

x

2'

0.01
0.02
0.03
0.04
0.05
0.06
0.07
0.08
0.09

1.00695
1.01395
1.02101
1.02811
1.03526
1.04246
1.04971
1.05701
1.06437

55500
.94797
21257
38266
49238
57608
66836
80405
01824

56719
90029
07193
56067
41377
41121
23067
61380
53360

2'

0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9

1.07177
1.14869
1.23114
1.31950
1.41421
1.51571
1.62450
1.74110
1.86606

34625
83549
44133
79107
35623
65665
47927
11265
59830

36293
97035
44916
72894
73095
10398
12471
92248
73615

10 m In Octal

K.3.2

1
12
144
1 750
23 420
303
641
113
360
545

10-·

n

10"

3
46
575
7 346

x

2'

0.001
0.002
0.003
0.004
0.005
0.006
0.007
0.008
0.009

.

r-

2 x In Decimal

K.3.1

240
100
200
400
000

1.000
0.063
0.005
0.000
0.000

000
146
075
406
032

000
314
341
111
155

000
631
217
564
613

000
463
270
570
530

000
146
243
651
704

00
31
66
77
15

5
6
7
8
9

0.000
0.000
0.000
0.000
0.000

002
000
000
000
000

476
206
015
001
000

112
157
327
257
104

610
364
745
143
560

706
055
152
561
276

64
37
75
06
41

1
16
221
2 657
34
434
5 432
67 405

10-·

n

10·

0
1
2
3
4

112 402
351 035
432 451
411634
142 036

762 000
564 000
21~ 000
520 000
440 000

10
11
12
13
14

0.000
0.000
0.000
0.000
0.000

000
000
000
000
000

000
000
000
000
000

006
000
000
000
000

676
537
043
003
000

337
657
136
411
264

66
77
32
35
11

724
115
413
164

500
200
400
000

15
16
17
18

0.000
0.000
0.000
0.000

000
000
000
000

000
000
000
000

000
000
000
000

000
000
000
000

022
001
000
000

01
63
14
01

327
157
127
553

461
760
542
731

000
000
000
000

n log 2 and 10 In Decimal
n
1

2
3
4
5

K.3.4

n 10810 2
0.30102
0.60205
0.90308
1.20411
1.50514

n loglo 2

n

n 1082 10
3.32192
6.64385
9.96578
13.28771
16.60964

99957
99913
99870
99827
99783

80949
61898
42847
23795
04744

6
7
8
9
10

1.80617
2.10720
2.40823
2.70926
3.01029

(

n 108210

99740
99696
99653
99610
99566

19.93156
23.25349
26.57542
29.897::15
33.21928

85693
66642
47591
'-8540
09489

Addition and Multiplication, Binary and Octal
Addition

(

Multiplication
Binary Scale

0tO = 0

0+1=1

1

oxo=o
OXl=lxO=O
1 x 1= 1

0=

1

= 101

Octal Scale

K.3.5

0

01

02

03

04

05

06

07

1

02

03

04

05

06

07
16

1

02

03

04

05

06

07

10

2

04

06

10

12

14

2

03

04

05

06

07

10

11

3

06

11

14

17

22

25

3

04

05

06

07

10

11

12

4

10

14

20

24

30

34

4

05

06

07

10

11

12

13

5

12

17

24

31

36

43

5

06

01

10

11

12

13

14

6

14

22

30

36

44

52

6

07

10

11

12

13

14

15

7

16

25

34

43

52

61

7

10

11

12

13

14

15

16

(

Mathematical Constants In Octal
3.11037

552421,

0.24276

301556,

e- r =

0.27426

530661a

In'Y =

0.43127 233602,

v-; = 1.61337

611067.

ve= 1.51411

230704,

log2'Y =

0.62573 030645.

0.33626

754251.

V2=

1.32404

746320.

= 1.34252

166245.

In 2 =

0.54271

027760.

741136.

In 10 =

2.23273

067355.

1r=

1r:" 1 =

In

1r =

log21r =

1.11206. 404435,

e= 2.55760

loglo e =

1.51544

163223.

log2 e

vl0 = 3.12305

407267.

log2 10 =

3.24464

K-6

521305,

1'=

0.44742 147707,

(

i

APPENDIX L
LA3~

NOTE TO USERS OF SERIAL
6~~,

AND

LA3~

The serial
return; the

l2~~,

AND

24~~

BAUD

VT~5IS

requires that filler characters follow each carriage

6~~,

l2~~,

and

24~~

acters follow each line feed.
characters needed.

baud

VT~5IS

require that filler char-

The following table lists the filler

The byte at location 448 has been established as

the filler count and the byte at location 45 8 contains the character
to be filled. These locations are initially set to zero by PAL-llA

(

and ED-ll to allow normal operation of the program.
Depending on the terminal, change the locations as follows:

LOC 44

LOC 45

Resultin2 Word (binarl)

Jill 8

~158

~~~~ll~l~~~~l~~l

~~18

~128

~~~~l~l~~~~~~~~l

VT~5

Baud
l2~~ Baud

~~28

~128

~~~~l~l~~~~~~~l~

VT~5

24~~

~~48

~128

~~~~l~l~~~~~~l~~

LA3~

(

VT~5

6~~

Baud

The proper binary word can be stored at location 448 by using the
console switches as described in section 2.1.2 of this manual.
Furthermore, users with a

24~~

baud

VT~5

should avoid the use of

vertical tab characters in their programs.

vertical tabs will not be

properly filled and may cause characters to be lost.
Once the changes have been made, the program may be dumped to paper
tape by using the bootstrap version of DUMPAB (see section 6.3 in
this manual).
The above changes only affect output to the console teleprinter.
Users of lOX or IOXLPT source tapes will find the byte at location 44
tagged "1.44:" and the byte at location 45 tagged "1.45:".

These

locations are defined near the end of the second source tape and can
be changed to appropriate values using ED-ll.

(
ODT-ll uses the locations (44 and 45) but does not set them to zero
initially.
L-l

INDEX

(

(

(

(

Abbreviations, standard PDP-II, J-l
Absolute address, 1-12, 3-16, 9-3
Absolute Loader, 6-1
checksum error, 6-12
loading into core, 6-8
operation, 6-10
start address, 3-23, 6-8
summary, E-3
Absolute mode of address, 9-3
Absolute tapes, loading, 6-8, 6-9,
6-10
Accessing
registers, ODT-ll, 5-7
unstructured data, 1-11
Access tables, random, 1-10
Accumulator, 1-7
Adding devices to lOX, 7-24
ADD instructions, 1-8
Addition operator, 3-9
Address
interrupt vectors, 1-15
pointers, 1-8
register display, 2-2
Address,
absolute, 1-12
current byte, 3-10
current word, 3-10
relative, 1-12
ADDRESS light on switch register,
2-4
Address modes, see Modes
Addressing, 1-6
in assembly language, 3-11
unstructured data, 1-7
Addressing modes, operand, 1-7
Advance command, 4-7
Altering reg1ster contents, 9-7
ALT MODE/ESC (Teletype key), 2-7
AND operator, 3-9, 5-12
I
(apostrophe) usage, PAL-IIA, 3-10
Arguments, ED-II, 4-2
Arithmetic operators, PAL-IIA, 3-9
.ASCII assembly directive, 3-22
ASCII
address mode, 7-8, 7-11
character set, 3-2, A-I
conversion, 3-10
ASCII, formatted, 7-8 to 7-10
Assembler, PAL-IIA see Program
Assembly Language
Assembler directive
.ASCII, 3-22
• BYTE, 3-21, 3-31
• EOT, 3-29
• END, 3-20
• EVEN, 3-20
• WORD, 3-20
Assembler directives (pseudo-ops)
misspelled, 3-21
summary of, B-8

Assembling
ODT-ll, 5-28
PAL-IIA assembler, I-I
Assembly dialogue, 3-29
Assembly language syntax, B-2
Assembly listing specification, 3-24,
3 .... 31
Assembly location counter, PAL-IIA,
3-10
Assignments, undefined direct, 3-26
* (asterisk) symbol usage, 4-1
@ (at) symbol usage, 3-17
Autodecrement address mode, 1-8, 1-9,
3-14
Autoincrement address mode, 1-8, 1-9,
3-13, 3-14
(back-arrow), ODT-ll, 5-7
"(backslash), ODT-IIX, 5-14
Backspace paper tape punch, 2-8
Bad Entry (ODT-ll), 5-19
Beginning command, ED-II, 4-7
Binary mode of address, 7-11, 7-12
Blank operator fie]4,(PAL-IIA), 3-21
Bootstrap 'Loader, 6"':1 through 6--7
loading into core, 6-3
summary, E-l
Bootstrap tapes, loading, 6-5
Brackets,
angle, 5-15
square, 2-7
Branching (ODT-ll), 5-13
Branch instructions, PAL-IIA, 3-19,
B-7
Breakpoints, 5-8, 5-14, 5-20
ODT-llX, 5-16
repeat count, 5-11
set in loop, 5-10
B.SP (punch control), 2-8
Buffer arrangement, data transfer
commands, lOX, 7-4
Buffer
overflow, 7-9
size, 7-5
Buffering, double, 7-17
Bus address register, 2-2
BUS light, 2-3
.BYTE assembler directive, 3-21. 3-31
Byte
addressing, 1-6
count (lOX), 7-8, 7-12, 7-13
instructions, 1-9, 1-13
+

Calculating offsets,
ODT-ll, 5-13
ODT-IIX, 5-16
Call, subroutine, 1-4, B-8
Carriage return character, 3-2, 7-9

X-I

Central Processor
priority levels, 1-5
status register (PS), 1-4
Change command, ED-ll, 4-11
Changing location
ODT-ll, 5-4
ODT-llX, 5-14
Character deletion
ED-ll, 4-10, 4-11, 4-12
lOX, 7-9
PAL-llA, 3-24
Character location pointer (dot),
ED-ll, 4-3
Character set
ASCII, A-l
PAL-llA, 3-2, B-1
Characters loaded into printer memory,
2-10
Checksum, Absolute Loader, 6-12
Checksum error, lOX, 7-7
Checksummed binary data, lOX, 7-11
Close out an edit, 4-9
Closing location
ODT-ll, 5-4
ODT-llX, 5-14
Code, position independent (PIC), 9-2
Coding techniques, 9-7
Command
grouping, ED-ll, C-3
mode, ED-ll, 4-1
repeat count, 5-17
syntax ODT, 5-2
Commands
buffer arrangement in data transfer,
7-4
delimiter, ED-ll, 4-2
dot, ED-ll, 4-7
ED-ll, 4-1 through 4-9, C~l
Input/Output, ED-ll, 4-4
mark, ED-ll, 4-7
modify text, 4-1, C-2
ODT-ll, 5-4 through 5-26, D-l
open, ED-ll, 4-4
search, ED-ll, 4-1
single instruction mode,ODT-llX,
5-18
see also the specific subject
Comment field, 3-4
Condition codes in subroutines, 9-8
Configuration of system, 2-1
Conflict Byte/Word, 7-22, 7-23
Conflicting devices
IOX, 7-l3

PAL-llA, 3-26
Console, PDP-ll, 2-1
CONT switch, 2-3
Control switch operation, 2-4
Conversion, ASCII, PAL-llA, 3-10
Conversion tables, K-l
Core memory, loading and dumping, 6-1
Core memory requirements, 1-16
Counter, program, see Program counter

CTRL key, Teletype, 2-7
CTRL/P
assembler restart, PAL-ll, 3-27
ED-ll, 4-12
lOX, 7-9
CTRL/U
ED-ll, 4-12
lOX, 7-9
Current byte/word address, 3-10
Current status (PS), 1-15
Data, addressing unstructured,1-7,1-11
see also Modes of data address
Data
register display, 2-2
transfers, lOX, 7-12
Data transfer commands, buffer
arrangement in, lOX, 7-4
DAT (Device Assignment Table), 7-2,
7-3
Debugging, see On-Line Debugging
Techniques
Defaul t, • WORD, 3-21
Deferred address modes, 1-6
index, 1-10
PAL-ll, 3-13 through 3-18
relative, 1-12
summary, 1-11
Delete command,
ED-ll,4-l0
lOX, 7-9
Deletion of characters or lines,
ED-ll, 4-10, 4-11, 4-12
lOX, 7-9
PAL":'llA, 3-24
Delimiting character, 3-22, 4-2
DEP switch, 2-3
DESTINATION light, 2-4
Device Assignment Table (DAT), 7-2,
7-3
Device
codes, lOX, 7-25
dependent functions, lOX, 7-9, 7-11
7-12
independence, 7-3
interrupts, 1-5,1-6, 1-14
specification, PAL-llA, 3-24
Device Interrupt Table (DIT), 7-23
Device Status Table (DST), 7-24
Devices, conflicting
lOX, 7-13
PAL-llA, 3-26
Devices,
adding to lOX, 7-24
multiple, 1-5
Dialogue, PAL-llA
assembly, 3-29
initial, 3-23
Direct access to stack, 1-10
Direct assignment statement, PAL-llA,
3-6, 3-7

X-2

(,

)

I',

(

(

(

Directives, assembler, see Assembler
directives
Direct memory devices, 1-5
Done Bit, IOX, 7-7, 7-15, 7-16
Dot (character location pointer)
ED-II, 4-3, 4-5, 4-7, 4-8
Double buffering, IOX, 7-17
Double operand instruction, PAL-IIA,
3-13, B-4
+ (down arrow) symbol, ED-II, 4-2
DUMPAB program, 6-12, 6-13, 6-14
Dump program, 6-13
Dumping core memory, 6-1
DUMPTT program, 6-12, 6-13, 6-14
Duplication of tape, H-l

c
(

(

(

Echo suppression, 7-6
ED-II, see Text Editor Program
EMT instructions, PAL-IIA, 3-19
ENABLE/HALT switch, 2-3
.END (End of program) assembler directive, 3-20, 3-30
End command, ED-II, 4-7
End~of-File bit (EOF) , IOX, 7-8
End of Medium bit (EOM)
IOX, 7-7
PAL-HA, 3-30
End-of-Tape (EOT) , PAL-IIA, 3-19
.EOT (End-of-Tape) assembler directive, 3-29
= (equal sign) usage, PAL-IIA, 3-7
Error codes
nonfatal IOX, 7-6
PAL-IIA, 3-32, 3-33, B-8
Error halts, software
ED-H, 4-22
PAL-HA, 3-33
Errors,
detection of, ODT, 5-18
ED-H, 4-12
fatal, IOX, 7-19
listing, 3-24
PAL-II, 3-32
phase, 3-8
typing, 3-24
ESCape key (Teletype), 2-7
Evaluation of expressions, PAL-IIA,
3-8
.EVEN assembler directive, 3-20
EXAM switch, 2-2
Examine a specific location, 2-4
Exchange commands, ED-II, 4-11
Exclusive OR (XOR) , 5-12
EXECUTE light, 2-3
Expressions, PAL-IIA, 3-8
FETCH light, 2-3
Fields, PAL-llA
comment, 3-4
instruction operand, 3-18

X-3

Fields, PAL-IIA (cont.)
label, 3-3
operand, 3-4
operator, 3-3
Floating-Point Math Package (FPMP-ll),
8-1, G-l
Format control, PAL-llA, 3-4
Formatted ASCII, address mode, IOX,
7-8 to 7-10
Formatted binary address mode, IOX,
7-11, 7-12
Form feed character, 3-4, 4-7
Form feed command, ED-II, 4-7
Forms of addressing, 1~13
Forward references, 3-7, 3-8, 3-11
FREE (Reader control), 2-7
Functional organization, ODT, 5-20
Functions, ODT, 5-4 through 5-26
General registers, accessing, ODT-Il,
5-7
Get command, ED-II, 4-8
Go command, ODT-ll, 5-10
Grouping of Text Editor commands, C-3
Halts, software error
ED-H, 4-22
PAL-HA, 3-33
High speed reader/punch, 2-9
I.CONFLC table, 7-26
I.CONSIT table, 7-26
I.DST table, 7-26
I.FUNC table, 7-25
I.INPUT routine, 7-27
I.INTAB table, 7-26
I.OUTPUT routine, 7-27
I.SCRAAB table, 7-25
Immediate address mode, 1-12, 3-15
Incrementation of program counter, 3-12
Index address mode, 1-10, 3-15, 9-4
deferred, 1-10, 3~15
Index register, 1-7
Indicator lights, 2-3
Indicators and switches on console, 2-1
Infinite loop, ODT-ll, 5-10
Initial dialogue
ED-H, C-4
PAL-IIA, 3-23, 3-29
Initialize DAT slots (INIT), 7-4
Initializing the system, 2-12
Input/Output commands, ED-II, 4-4, C-l
Input/Output Executive program (lOX),
7-1
buffers, 7-4 to 7-8
data transfers, 7-12 to 7-18
DAT (Device Assignment Table), 7-3,
7-4
errors, 7-19
example program, 7-20
internal information, 7-20 to 7-27
modes, 7-8 to 7-12
reenabling Reader, 7-18
restarting, 7-19
summary, F-l

Insert command, ED-ll, 4-9
Instruction capability, 1-13
Instruction mnemonics, 3-3, 3-6,
3-18, 3-21
Instruction offset, 5-13
Instruction operand fields, 3-18
Instruction set, 1-6
Instructions,
ADD, 1-8
assembly language, B-3
byte, 1-9
branch, 3-19
double-operand, 3-13, B-4
EMT, 3-19
JMP, 3-l3
JSR, 3-13
single, 2-5
single operand, B-4
TRAP, 3-19, 5-22, 5-23
Internal register, accessing, ODT,
5-7
Interrupt routines, lOX, 7-27
Interrupt vectors, 1-6
address, 1-15
setting up, 9-5
Interrupts, device, 1-5, 1-14
I/O device specification, 3-24
lOX, see Input/Output Executive
IOXLPT, the conflict word, 7-22, 7-23
JMP instructions, PAL-llA, 3-13
JSR instruction, PAL-llA, 3-13
Jump command, ED-ll, 4-7
Keyboard, Teletype, 2-7
lOX functions, 7-9, 7-11
Keys,
LINE FEED, 4-2, 5-5, 5-15
RUBOUT, 3-24, .4-12, 7-9
Kill command, ED-ll, 4-10
Label field, PAL-llA, 3-3
tape, 2-8
LIFO (Last-In-First-Out), 1-9
Lights on switch register, 2-3
Lights operation, LPll line printer,
2-11
LINE control, Teletype, 2-6
Line deletion
ED-ll, 4-10, 4-11, 4-12
lOX, 7-9
PAL-llA, 3-24
LINE FEED key, 4-2, 5-5, 5-15
Line Printer (LPll), 2-10
Buffer (LPB), 2-10
function (IOXLPT only), 7-10
Line terminator, 4-3
List commands, ED-ll, 4-4, 4-6
List errors on teleprinter, 3-24
Leader/t~ailer

X-4

Listing
PAL-llA assembly, 3-31
octal/symbolic, 3-1
LOAD ADDR switch, 2-2
Loader,
Absolute, 6-8 through 6-11
Bootstrap, 6-2, 6-3, 6-4
Loading
Absolute Loader into core, 6-8
absolute tapes, 6-8 through 6-10
assembler, 3-23
Bootstrap Loader into core, 6-3
characters into printer memory, 2-10
and dumping core memory, 6-1
Editor (ED-ll), 4-13, C-4
ODT, 5-27
PAL-llA, 3-23
paper tape, 2-8, 2-9
unused tape vectors, 9-6
Load paper tape LSR, 2-7
Local control, Teletype, 2-6
Locating breakpoint, ODT-Il, 5-9
Location change
ODT-11, 5-4
ODT-11X, 5-14
Location counter, PAL-llA, 3-10
Location references, ODT-ll, 5-3
Logical operator, PAL-llA, 3-9
Loop, infinite, 5-10
LPll Line printer, 2-10, 2-11
Low-Speed Punch and High-Speed Punch,
ED-ll, 4-7
lOX, 7-10
Low-Speed Reader and High-Speed
Reader, 7-10
Mark, ED-ll, 4-3, 4-5~ 4-8
Mask of search specification, ODT-ll,
5-11
Mathematical conversion tables, K-l
Memory requirements, 1-16
Misspelled assembler directive, 3-21
Mnemonic, instruction, 3-3, 3-6, 3-18,
misspelled, 3-21
Modes of data address, 1-7 through 1-12
absolute, 1-12, 3-16, 9-3
byte, 7-5
index, 9-4
lOX, modes, 7-8 through 7-12
ODT, 5-17
PAL-llA modes, 3-12 through 3-16
position independent, 9-2
summary, 1-11
Mode forms and codes, 3-17
Modify Text commands, ED-ll, 4-9, C-2
Multiple devices, 1-5
Multiple operands, 3-22
Multiply-defined symbols, 3-3, 3-26
Negative numbers, 3-9
Nested device servicing, 1-14, 1-16
Next command, ED-ll, 4-7

,"-

(

(

c

(

Non-deferred address modes, 1-8
summary, 1-11
Non-deferred autoincrement mode, 1-8
Non-deferred index mode, 9-4
Nonexistent command, ED-ll, 4-1
Non-fatal error codes, lOX, 7-6
Non-Processor Request I.evel, (NPR),
1-5
Null character, 7-9
Numbers, PAL-IIA, 3-9
negative, 3-9
truncation of, 3-9

Operating Teletype" 2-6
Operator field, PAL-IIA, 3-3,
blank, 3-21
Operators, PAL-IIA, 3-3, 3-8, 3-9
Organization, functional, ODT, 5-20
OR operation, 3-9
Output formats, DUMPTT program, 6-14
Output from DUMPAB program, 6-14
Overflow, ED-ll
page buffer, 4-10, 4-12
storage area, 4-5
Overflow of buffer, lOX, 7-9

Object programs, 3-1
Octal/decimal conversion tables, K-l
Octal/symbolic listing, 3-1
ODT-ll, see On-Line Debugging Technique
OFF control, Teletype, 2-6
OFF (UNLOCK) (punch control), 2-8
Offsets, .5-13 to 5-16
On-Line Debugging Technique
Program, (ODT-ll and ODT-IIX),5-1
assembling, 5-28
breakpoints, 5-20
commands, 5-4
command syntax, 5-2
error detection, 5-18
functions, 5-4
functional o~ganization, 5-20
loading procedures, 5-27
ODT-IIX, 5-1, 5-14 through 5-24
open locations, 5-4
program runaway, 5-24
search, 5-11
starting and restarting, 5-27, 5-28
summary, D-l
ON-LINE light, LPll, 2-11
ON-LINE/OFF-LINE switch, LPll, 2-11
ON (LOCK ON) (punch control), 2-8
ON/OFF (main power) switch, LPll,
2-11
Open addressed location, ODT-IIX,
5-15
Open command, ED-ll, 4-5
Opening a location
ODT-ll, 5-4
ODT-IIX, 5-14, 5-15
Operand addressing modes, 1-7
Operand field, 3-4, 3-18
Operands, multiple, 3-22
Operate instructions, PAL-IIA, B-6
Operating control switches, 2-4
Operating High-Speed Reader/Punch
units, 2-8, 2-9
Operating procedures
Dump program, 6-13
ED-ll, 4-12, C-4
ODT-11, 5-27
PAL-IIA, 3-23, B-9

Page buffer, ED-ll, 4-4, 4-10, 4-12
Page size, PAL-IIA, 3-4
PAL-IIA, see Program Assembly Language
PAPER STEP switch,LPll, 2-11
Paper tape creation, ED~ll, 4-14
Paper tape reader
controls, 2-7
loading, 2-8, 2-9
punch (LSP), 2-8
Parenthetical groupings of expressions,
PAL-IIA, 3-8
Passes, assembler, 3-28
Patching with TRAP handler, 9-14
PDP-ll standard abbreviations, J-l
% (percent) symbol (register
expression), PAL-IIA, 3-8
(period) symbol, PAL-IIA, 3-10
Phase errors, 3-8
Peripheral device interrupts, 1-6
PIC (Position Independent Code)
writing, 9-2, 9-4
Pointer
positioning commands, ED-ll, C-l
relocating, 9-6
Pointer, address, 1-8
Position Independent Code (PIC), 9-2
writing automatic PIC, 9-4
writing nonautomatic PIC, 9-5
Position independent modes, 9-2
POWER light (LPll), 2-11
Printer, Teletype, 2-6
control panel, 2-10
loading characters into memory,
2-10
Priority
of central processor, 1-4
level ($P), ODT-ll, 5-14
Priority levels, central processor,
1-5
Proceed command, ODT, 5-10, 5-17,
5-23
Processor priority levels, 1.,..4
stack use, 1-14
Processor Status Register, 1-4
Processor Status word, 1 .... 6
Program Counter (PC), 1-6, 1-7, 1-12
PAL-IIA, 3-11, 3-12

d
n.

(

(

(
\"

\)

(

X-5

Program start, 2-5
Program value, 1-6
Program Assembly Language (PAL-llA)
assembling, 1-1
character set, 3-2, B-1
error codes, 3-32, 3-33
expressions, 3-8
loading, 3-23
numbers, 3-9
software error halts, 3-33
statements, 3-2
Programs
object, 3-1
source, 3-1, 3-2
Program runaway ODT, 5-24
Programming considerations, ODT, 5-19
Programming techniques, 9-1
PS (Central Processor Status
Register), 1-4
Pseudo-ops see Assembler directives
Punch command, ED-ll, 4-6
Punch, LoW Speed, 4-7
Punch functions, 7-10
Push down lists, 1-9
?

"

(question mark) usage, ED-ll, 4-1
(quotation mark) usage, PAL-llA,
3-10

Random access tables, 1-10
Read command,
ED-ll, 4-5
lOX, 7-12
Reader functions, lOX, 7-10
Reader/punch, high speed, 2-9
Reader, reenabling and restarting,
7-18
Readr command (real--time Read), lOX,
7-17
READY light (LPll), 2-11
Real-time
capability, 7-1
Read, lOX, 7-17
Write, lOX, 7-18
Recursive subroutines, 9-11
References, forward, PAL-llA, 3-7,
3-8, 3-11
Register contents, altering, 9-7
Register displays, 2-2
Register expression (%),/PAL-llA, 3-8
Register mode, 1-7, 1-8
PAL-1IA, 3-12 through 3-18
Registers, 1-7
symbol assignment, 1-7
Register symbols, PAL-llA, 3-7
Relative address mode, 3-16
Relative addressing, 1-12
,ODT, 5-13
Relative branch offset, ODT-llX,
5-15

i

X-6

RElease (punch control), 2-8
Relocating ODT, 5-29
Relocating pointer, 9-5
Repeat count
breakpoint, ODT-ll, 5-11
in proceed command, ODT~llX,
5-17
for single-instruction mode, 5-18
Reserved storage area, 3-11
Restart
assembler, PAL-llA, 3-27
command, lOX, 7-19
ED-Il, 4-13, 4-14, C-4
ODT, 5-28
Return previous sequence, ODT-llX,
5-15
Return subroutine, PAL-llA, B-8
Return from In-terrupt, (RTI)
instruction, 1-15
RETURN key, 4-2, 4-14
Rotate shift instructions, PAL-llA,
B-5
RUBOUT key, 3-24, 4-12, 7-9
RTI (Return from Interrupt)
instruction, 1-15
RUN light, 2-4
Search commands, ED-ll, 4-9, C-2
Search, ODT-ll, 5-11
address, 5-12
limits of, 5-11, 5-12
mask, ($M), 5-11
word, 5-12, 5-25
Seek command, 7-18
; (semicolon) usage, ODT, 5-3, 5-24
Sequential address pointer, 1-7
Serial LA3~ display, L-l
Setting breakpoint, ODT-ll, 5-8
Setting up stack pointer, 9-5
Setting up trap or interrupt
vector, 9-5
SHIFT/K (Teletype), 2-7
SHIFT/M (Teletype), 2-7
Single buffer transfer on one
device, lOX, 7-16
Single instruction mode, 2-5
cOnlmands, 5-18
ODT-I1X, 5-17
repeat count, 5-18
Single operand instructions, PAL-llA,
B-4
S-INST/S-CYCLE switch, 2-3
Size of page, 3-5
Slash (/) ODT-ll, 5-4, 5-5
Software, 1-16
error halts,
ED-11 , 4-22
PAL-11A, 3-33
SOURCE light, 2-4

)

(

(

(-

(

,
\

(

(

(

.'J

Source program, 3-1, 3-2
SymbOlS,
Space characters, PAL-IIA, 3-4
Status Register address, $S, ODT, 5-7
[ ] (square brackets), 2-7
Text Editor, ED-II, C-3
Stack operations, 1-9, 1-14
Symbol table, PAL-IIA, 3-26
Stack pointer (SP), 1-7
Symbols used in manual, see preface
setting up, 9-5
Syntax, assembly language address
Start program, 2-5
mode, PAl,.-lll~" B-2
START (reader control), 2-7
System, see specific subject
START switch, 2-3
Starting and restarting ODT, 5-27
Starting Text Editor, 4-13, C-4
Tab, lOX, 7-9
Statement, PAL-IIA, 3-2'
Tab characters, PAl,.-l-lA, 3-4
composition of, 3-3
Tables,
direct assignment, 3-6, 3-7
modification of word, 7-25
Statement terminator, 3-2
random access, l~lO
Status byte, IOX, 7-6;, 7-12, 7-13
Tape duplication, H-l
done bit, 7-7, 7-:).5, 7-16
Techniques, coding and programming,
Status Register address ($S) symbol-,
9-1, 9-7
ODT""'ll, 5-7
Teleprinter functions, 7-10
Status register format, 1-4
Teletype hardware tab facil-ity, 7-24
STOP (Reader control), 2-7
Teletype interrupt, ODT, 5-26
Storage area overflow, ED-II, 4-5
Teletype operation, 2-6
Storage area, reserved, PAL-l:).A,
Terminator statement, 3-2
3-11.
Terminator, text mode, 4-8
Storage Maps, core memory,
Testing checksum, Absolute Loader. 6~8
6-12, 6-15
Te~t Editor Program (EP""ll)
DUMPAB program, 6-16
onaracter locatiop pointer (Dot),
Storage requirements, ED~ll, C-4
4-3, 4-7
Subroutine calls, 1'"'l4, 13..,,8
opmmands, 4-4 thrOl.~gh 4.,.9
Subrou tines
deletion of characters Or lines,
,condition codes in, 9-8, 13-8
4-10, 4-1l, 4-12
recursive, 9-11
delimiters, 4-2
returns, 1-l4, B-8
Dot, 4-3, 4-5, 4-7, 4-8
Subtraction operator, 3-9
errOr oorrection, 4-12
Summary of
example, 4-14 through 4-21
Absolute Loader, E-3
loading ,4,.,.13
address modes, 1-11
Mark, 4-3, 4-8
asseIlibly language and assernbl,er,
operating procedures, 4-12
PAL-H, 13:"'1
paper tape creatiOn, 4-14
Bootstrap Loader, E-l,
restarting, 4-14
FPMP-ll Floating-p"int Math
Search commands, 4-8
Package, 8 ... 1, G-l
starting, 4-13
lOX programming, F-l
summary, C'-I
ODT-ll and ODT:.... IIX, 0-1
symbols, C-3
Te~t Editor (ED-II), C-l
Text mode, 4-1
SUPPress echo, 7-6
terminator, 4-8
Switches,
Text modification commands, C-2
console, 2-2
Timeout, lOX, 7-17
LPll, 2-ll
TOP OF FORM switcn, LPll, 2-1l
operating the control, 2-4
Trace trap instruction, OPT, 5-22,
switch register, 2-2
5-23
Switch register, 2-2 through 2-5
TraLLer command, ED-II, 4-7
Symbols, PAL-IIA, 3-5
Transfer commands, bU:Efer arrange,...
forward reference to register, 3-8
ment in, lOX, 7 .... 4
multiple definition of, 3-3, 3-26 Trap handler, patching with, 9-14
permanent, 3-6
Trap instructions, 3-19
register, 3-7, 3-8
ODT, 5-22, 5-23
undefined, 3-7
PAL-lIA, 13-6
user defined, 3-6
Trap vectors, 3-33, 9-7
See also the specific subjeot
loading unused, 9-6
setting up, 9-5

Traps, 1-15
Truncation of numbers, PAL-llA, 3-9,
3-19
Truncation of line, rox, 7-7
TTY SAVE routine, ODT, 5-26
Typing errors, PAL-llA, 3-23
Undefined direct assignments, 3-26
Undefined symbols, PAL-llA, 3-7, 3-26
Unformatted Ascrr mode, rox, 7-11
Unformatted binary mode, rox, 7-12
Unibus, 1-5
Unstructured data addressing, 1-7
t (up arrow), ODT-ll, 5-6, and
ODT-llX, .5,...15

(

Value, program counter, 1-6
Vectors,
address interrupt, 1-15
trap, 3-33, 9-7
VT~5 display, L-l
Waitr (Wait Return) command, rox, 7-14
vs. testing buffer done bit, 7-15
WHole (search command), ED-ll, 4-9
.WORD assembler directive, 3-20
Word addressing, 1-6
Word search, ODT, 5-12, 5-25
Write command, rox, 7-13
Writing PAL-llA assembly language
programs, 3-1
Writing position-independent code
(prC), 9-2
automatic, 9-4
non-automatic, 9-5
Writr (Real-time Write) command, rox,
7-18

(

(

(\

X-8

HOW TO OBTAIN SOFTWARE INFORMATION
Announcements for new and revised software, as well as programming notes,
software problems, and documentation corrections are published by Software
Information Service in the following newsletters.
(

(

Digital Software News for the PDP-8 & PDP-12
Digital Software News for the PDP-II
Digital Software News for the PDP-9/15 Family
These newsletters contain information applicable to software available from
Digital's Program Library, Articles in Digital Software News update the
cumulative Software Performance Summary which is contained in each bdsic
kit of system software for new computers. To assure that the monthly Digital
Software News is sent to the appropriate software contact at your installation,
please check with the Software Specialist or Sales Engineer at your nearest
Digital office.
Questions or problems concerning Digital's Software should be reported to
the Software Specialist. In cases where no Software Specialist is available,
please send a Software Performance Report form with details of the problem to:

c

Software Information Service
Digital Equipment Corporation
146 Main Street, Bldg. 3-5
Maynard, Massachusetts 01754
These forms which are provided in the software kit should be fully filled out
and accompanied by teletype output as well as listings or tapes of the user
program to facilitate a complete investigation. An answer will be sent to the
individual and appropriate topics of general interest will be printed in the
newsletter.

(

Orders for new and revised software and manuals, additional Software Performance Report forms, and software price lists should be directed to the
nearest Digital Field office or representative. U.S.A. customers may order
directly from the Program Library in Maynard. When ordering, include the
code number and a brief description of the software requested.
Digital Equipment Computer Users Society (DECUS) maintains a user library
and publishes a catalog of programs as well as the DECUSCOPE magazine
for its members· and non-members who request it. For further information
please write to:

(

DECUS
Digital Equipment Corporation
146 Main Street, Bldg. 3-1(Maynard, Massachusetts 01754

r-)

(

(

(

(

DEC-II-XPTSA-A-D
PDP-ll PAPER TAPE SOFTWARE
PROGRAMMING HANDBOOK

READER'S COMMENTS
NOTE:

This form is for document comments only. Problems
with software should be reported on a Software
Problem Repcrt (SPR) form (see the HOW TO OBTAIN
SOFTWARE INFORMATION page).
.

Did you find errors in this manual?

(

If so, specify by page.

Did you find this manual understandable, usable, and well-organized?
Please make suggestions for improvement.

Is there sufficient documentation on associated system programs
required for use of the software described in this manual? If not,
what material is missing and where should it be placed?

Please indicate the type of user/reader that you most nearly represent.

('

o
o

\

[J

o
CJ

o
t

Name __

~

Assembly language progr·ammer
Higher-level language programmer
Occasional programmer (experienced)
user with little programming experience
Student programmer
Non-programmer interested in computer concepts and capabilities
__

~

________

Organization ______

.City "'<"'-.

~

~

________

~

________

~_Date

______________________

~~'--____________________

~

__________

~

__

~

_________

_____________________'____

Sta te ____________ Zip Code ___________
or
Country

If you do not require a written reply, please. check here.

0

~

I

- - - - - - -

-

- - -

- - - - -

Fold Here - - - - - - - - - - - - - - - - - - - -

(

()

(
- - - - - - - - - -

- - Do Not Tear - Fold Here and Staple -

- - - - -

-

-

-

- - -

FIRST CLASS
PERMIT NO. 33
MAYNARD. MASS.

tl

BUSINESS REPL YMAIL
NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STAH'S

Postage will be paid by:

mamaD!a
Digital Equipment Corporation
Software Information Services
146 Main Street, Bldg. 3-5
Maynard, Massachusetts 01754

(

DIGITAL EQUIPMENT CORPORATION
MAYNARD, MASSACHUSETTS 01754



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.6
Linearized                      : Yes
XMP Toolkit                     : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-21:37:19
Create Date                     : 2007:02:19 16:38:17Z
Modify Date                     : 2017:08:04 11:15:31-07:00
Metadata Date                   : 2017:08:04 11:15:31-07:00
Format                          : application/pdf
Document ID                     : uuid:4919cc9a-26f3-4463-b49c-4bf97d7257a3
Instance ID                     : uuid:048ede6c-18b0-a24e-80ec-5face1ccf6ce
Producer                        : Adobe Acrobat 9.0 Paper Capture Plug-in
Page Layout                     : SinglePage
Page Count                      : 282
EXIF Metadata provided by EXIF.tools

Navigation menu