User Tools

Site Tools


tutorials:assemblers

This is an old revision of the document!


PDP-10 assembly language programming

This page is not limited to TOPS-20, but includes also information on other operating systems that run on the PDP-10 architecture, as there is a great deal of overlap and much PDP-10 software can run on either system with little or no modification. It may also serve as an instructive comparison between the operating system versions and hardware models to show what hardware support is required for each version.

FIXME (Some pictorial illustration would be helpful here, to lighten up an otherwise dense piece of tables and text))

Processor architecture

FIXME (A very brief historical background of the PDP-10 architecture could be useful here, just a single passage or two))

Much of the information in this section has been obtained from the following documentation:

Data types

The PDP-10 uses a 36-bit word format, with bits conventionally numbered 0–35 from most to least significant bit (big-endian). Portions of this word may be referenced as arbitrarily sized bytes (1–36 bits long) and used to represent smaller data types such as characters of text.

Word 11111111112222222222333333
012345678901234567890123456789012345
Integer S N
Halfword LH RH
Floating point S Exponent Fraction
6-bit bytes Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5
7-bit bytes Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 0
8-bit bytes Byte 0 Byte 1 Byte 2 Byte 3 0
Field Size Position Interpretation
S 1 0 0: number is positive; 1: number is negative
N 35 1–35 Two's-complement integer (excluding sign)
LH 18 0–17 Left halfword
RH 18 18–35 Right halfword
Exponent 8 1–8 Binary exponent + 128
Fraction 27 9–35 Two's complement binary fraction
Word 11111111112222222222333333
012345678901234567890123456789012345
Byte pointer Position Size 0 I X Y
Basic instruction Basic opcode AC I X Y
I/O instruction 7 Device I/O opcode I X Y
PC word Flags 0 PC
Field Size Position Interpretation
Position 6 0–5 First (most significant) bit of byte field
Size 6 6–11 Number of consecutive bits in byte field
I 1 13 Indirect bit; see effective address calculation
X 4 14–17 Index register; see effective address calculation
Y 18 18–35 Memory address
Basic opcode 9 0–8 See basic instruction set
I/O opcode 7 3–9 See input/output instruction set
AC 4 9–12 Accumulator to be used
Flags 13 0–12 See processor status flags
PC 18 18–35 Program counter

As 36 is divisible by three, in PDP-10 assembly language programming integer numbers are often written in octal (base 8) rather than hexadecimal (base 16) or decimal (base 10) notation. Exceptions here are bit positions, byte sizes, and software major/minor version numbers, which are written in decimal notation. When confusion is likely, decimal integers are suffixed with a period (“.”).

Effective address calculation

Extended addressing

Processor status flags

Bit Flag Function
0Overflow
1Carry 0
2Carry 1
3Floating overflow
4Byte interrupt
5User
6User in-out
11Floating underflow
12No divide

Basic instruction set

Input/output instruction set

Note: I/O instructions are not available when the processor is in user mode, but can be executed only by the operating system kernel in system (privileged) mode. They are thus of limited interest to regular application programmers under most operating systems.

Interrupt system

Note: As with I/O instructions, hardware interrupts are not directly available to programs running in user mode. The operating system however provides software interrupt signals to user-mode applications.

Processor models

Processor Includes Memory size I/O Front end Operating systems
Tops-10 ITS TENEX TOPS-20
DEC KA10 8–256 KW
DEC KI10
DEC KL10 A FlPt Console
DEC KL10 B FlPt, ExtA MASSBUS?PDP-11/?? ?–7
DEC KS10 FlPt ?–5
XKL Toad FlPt, ExtA 256 MW (?) ?–7
FlPt Floating point operations
ExtA Extended addressing

Emulators

  • KLH10
  • SIMH

Operating system details

Tops-10

ITS

TENEX

TOPS-20

Documentation Operating system version
5, 5.1 6.1 7
TOPS-20 Monitor Calls User's Guide V6.1
TOPS-20 Monitor Calls Reference ManualV5.1 V7
TOPS-20 Monitor Calls Quick Reference Guide

Assemblers

High-level languages with support for inline machine instructions

Debugging

  • DDT
  • SDDT
  • MDDT
tutorials/assemblers.1647169912.txt.gz · Last modified: 2022/03/13 11:11 by sm5por