PDP-12 User's Manual

CHAPTER 4
PDP-8 MODE PROGRAMMING

This chapter covers the PDP-12 programming in the PDP-8 mode. The contents of this chapter are divided into six sections: Organization of Memory, Memory Addressing Methods, PDP-8 Instructions, Program Interrupt, Extended Arithmetic Element, and Extended Memory.

Section I. ORGANIZATION OF MEMORY

ORGANIZATION

In PDP-8 mode, the basic 4096-word memory is divided into 32 segments of 128 words each for addressing purposes. Within one of these pages, operands may be addressed directly by memory reference instructions. Access to operands across page boundaries (except for Page 0) requires indirect addressing.

Executable programs may be stored in any page of memory, and program sequences may extend across several pages. The program counter is indexed over all 12 bits in PDP-8 mode, so that a straight-line program sequence will pass from the last word of a page to the first word of the next. A programmed jump across page boundaries, however, requires an indirect reference.

The organization of one memory bank in PDP-8 mode is shown in Figure 4-1.

PAGE 0

The first page of memory (addresses 000-177) contains several registers reserved for special use, which the programmer must take into account. These are:

0000 -
During a program interrupt, holds C(PC).

0001 -
Contains the first instruction to be executed after a program interrupt.

0010-0017 -
Automatic index registers (see paragraph 4.6).
     Page (Octal)      ADDRESSES

                   +--------------+
               0   | 0000 -- 0177 |
               1   | 0200 -- 0377 |
               2   | 0400 -- 0577 |
               3   | 0600 -- 0777 |
               4   | 1000 -- 1177 |
               5   | 1200 -- 1377 |
               6   | 1400 -- 1577 |
               7   | 1600 -- 1777 |
              10   | 2000 -- 2177 |
              11   | 2200 -- 2377 |
              12   | 2400 -- 2577 |
              13   | 2600 -- 2777 |
              14   | 3000 -- 3177 |
              15   | 3200 -- 3377 |
              16   | 3400 -- 3577 |
              17   | 3600 -- 3777 |
              20   | 4000 -- 4177 |
              21   | 4200 -- 4377 |
              22   | 4400 -- 4577 |
              23   | 4600 -- 4777 |
              24   | 5000 -- 5177 |
              25   | 5200 -- 5377 |
              26   | 5400 -- 5577 |
              27   | 5600 -- 5777 |
              30   | 6000 -- 6177 |
              31   | 6200 -- 6377 |
              32   | 6400 -- 6577 |
              33   | 6600 -- 6777 |
              34   | 7000 -- 7177 |
              35   | 7200 -- 7377 |
              36   | 7400 -- 7577 |
              37   | 7600 -- 7777 |
                   +--------------+
Figure 4-1. Organization of Memory, PDP-8 Mode

EXTENDED MEMORY

Additional 4K memory banks are organized in the same manner as is the basic bank. The Memory Field registers determine the assignment of banks (see Section VI).