PiDP-8/I Software

Changes To A Field Guide to PDP-8 Assemblers
Log In

Initial version of "A Field Guide to PDP-8 Assemblers"

























































































































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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# The Problem

There are many commonly-used PDP-8 assemblers, several of which we ship with the PiDP-8/I software distribution and more available elsewhere. How does a programmer discriminate among them, other than to carefully read their entire manual and then spend several months writing code in them? They cannot all be equal, else they'd be interchangeable and you'd pick one based on what was available. One cannot be clearly better for all things, else everyone would just use that.

This article is a **preliminary** survey of these assemblers with an eye toward listing the important distinctions among these assemblers. We will not be listing obscure assemblers or ones that you cannot readily find online. We will also not be listing thoroughly obsolescent assemblers unless it is important in establishing a lineage to one we *do* discuss.

The author is not an expert in this topic, though he has occasionally consulted with experts. The claims in this document are checked against manuals, published example code, and sometimes against running implementations. However, do not expect it to be complete or comprehensive. 

If you have important information to add and you do not have an account on this wiki, post it to either the PiDP-8/I or SIMH mailing lists, or send me private email. Keep in mind that the purpose of this article is not to replace the documentation or advocate for any particular assembler. Think of it more as the PDP-8 assembly language version of a birder's field guide: having read through this document, a reader should be able to recognize which assembler(s) are likely to be able to process a given piece of assembly code. A broader goal is that a programmer beginning a project should be able to make a sensible selection based on the information in this document, though being incomplete, we are much less likely to meet this goal than the field identification one.


## PAL-III

| **Introduced** | 1965
| **Manual** | [PDF, 790 kB](http://www.telegraphics.com.au/doc/paliii.pdf)
| **Delivery** | paper tape

The PAL-III assembler shipped on [punched paper tape](https://en.wikipedia.org/wiki/Punched_tape) as part of the grandiosely-named "PDP-8 Assembly System." This amounted to an assembler, an editor, a debugger, and a loader, each a separate paper tape. The programmer would first toggle in the RIM loader, then use that to load the BIN loader from yet a fifth paper tape, then run each of these tapes through the paper tape reader repeatedly in order to iterate his way toward a working program! The assembler itself required multiple passes through the reader: at least two in order to produce a computer-readable BIN format output tape, or more if the programmer also wanted a human-readable listing output on the terminal.

If you look at pictures of PDP-8 computers, you can often see a blue tray with narrow slots in it, each meant to hold one of these key paper tapes, as they were needed near at hand when using the computer. There is a good picture of one on [the cover of the 1974 edition of the OS/8 Handbook](https://archive.org/stream/bitsavers_decpdp8os8_39414792/OS8_Handbook_Apr1974?ui=embed#page/n0/mode/1up).

PAL-III can be considered the baseline assembler for a PDP-8, since almost every PDP-8 at least included some kind of paper tape reader, and most of the other assemblers for the PDP-8 share its basic syntax.


## MACRO-8

| **Introduced** | 1965
| **Manual** | [PDF, 1.7 MB](https://www.grc.com/pdp-8/docs/MACRO-8_Programming_Manual.pdf)
| **Delivery** | paper tape

MACRO-8 was another paper tape assembler for the PDP-8. Its main advantage over PAL-III is that it added [macros](https://en.wikipedia.org/wiki/Macro_instruction), a very useful feature in assembly language programming as it reduces a lot of the tedium of writing such programs.


## PAL-D

| **Introduced** | 1967
| **Manual** | ??
| **Delivery** | paper tape

PAL-D is basically PAL-III for the [PDP-8 Disk Monitor System](https://en.wikipedia.org/wiki/4K_Disk_Monitor_System), one of OS/8's predecessors.


## The OS/8 Assemblers

| **Introduced** | 1971
| **Manual** | most any OS/8 manual, such as [the 1974 edition](https://archive.org/details/bitsavers_decpdp8os8_39414792)
| **Delivery** | part of OS/8

[OS/8](https://en.wikipedia.org/wiki/OS/8) was [the primary programming system from DEC][faq10] for the PDP-8 in its later years. It included several different assemblers, all documented in its manual, one edition of which is linked above.

The introduction date is that of OS/8, but OS/8 has a [complicated development history][faq10] that stretches back to 1966 or so. I do not mean by this grouping to imply that they were all created and introduced at the same time. As historical evidence arrives, I will make finer distinctions in the dates. Until then, we have a years-wide window for each of these OS/8 assemblers' creation dates: after PAL-III (1965) and before 1974, the publication date of the linked manual.

[faq10]: http://www.faqs.org/faqs/dec-faq/pdp8/section-10.html


### PAL8

PAL8 is basically a direct replacement for PAL-III under OS/8. As such, I think it is fair to consider it the default assembler for the PDP-8, two ways: 

First, if you're using OS/8 and have no better idea of which assembler to use, you should probably start with PAL8.

Second, if you have a piece of assembly code that is meant to be assembled under OS/8, and you have no evidence that is for any other assembler, it's probably meant to be assembled by PAL8.


### RALF

RALF is the back-end assembler for OS/8's FORTRAN IV compiler. As a result of that support role, it has several notable advantages over PAL8:

*   relocatable output code

*   easy access to the optional [floating-point processor](http://dustyoldcomputers.com/pdp12/fpp12.html)


### FLAP

The RALF assembler has a mode switch that causes it to generate absolute-addressed code. In this mode, it is called FLAP.


### SABR

As RALF is to OS/8's FORTRAN IV compiler, so [SABR](http://homepage.cs.uiowa.edu/~jones/pdp8/faqs/#langs) is to OS/8's FORTRAN II compiler. SABR is closer in feature set to PAL8, since FORTRAN II does not assume that you have a floating point processor, and it is not capable of all the relocation and overlay tricks that OS/8's FORTRAN IV compiler is.


## MACREL

| Introduced | 1980
| Manual | [text, 384 kB](http://vandermark.ch/pdp8/uploads/PDP8/PDP8.Manuals/AA-J073A-TA.txt)
| Delivery | DECtape for OS/8

Although this is technically another OS/8 assembler, its late introduction, separate documentation, and separate distribution from OS/8 proper require that we consider it separately.

Aside from MACRO-8, none of the assemblers above support macros, a very helpful feature in assembly language programming. MACRELs was intended to be DEC's solution to that problem in the disk-based operating system era.

Unfortunately, it never achieved widespread use outside of DEC.


## palbart

| **Introduced** | 1996
| **Manual** | [man page](http://manpages.ubuntu.com/manpages/artful/man1/palbart.1.html)
| **Delivery** | Internet, PiDP-8/I project

This assembler was written by Gary A. Messenbrink — and later enhanced by several others — to support the fleet of PDP-8/e computers in the [Bay Area Rapid Transit](https://en.wikipedia.org/wiki/Bay_Area_Rapid_Transit) system, thus the name.

We ship a version calling itself "pal-2.13, 03 May 2015" as part of the PiDP-8/I project. If you place a `*.pal` file in either its `asm` or `examples` subdirectories, then type `make`, the project's build system will generate several output files:

*   **<code>obj/*.lst</code>** — the assembler's text listing output, giving the assembled machine code alongside the source code, plus any error messages
*   **<code>bin/*.pt</code>** — the machine code output in RIM paper tape format, suitable for loading into SIMH's PDP-8 simulator
*   **<code>boot/*.script</code>** — a SIMH init script that deposits the machine code into the PDP-8 simulator's core memory and starts it running; pass the file name to `bin/pidp8i-sim`


## pdpnasm

| **Introduced** | 2006
| **Manual** | refers to PAL-III documentation, then gives exceptions on its [home page][pdpnasm]
| **Delivery** | [Internet][pdpnasm]

This is a PDP-8 assembler accepting the PAL-III syntax for Unix type systems.

[pdpnasm]: http://people.csail.mit.edu/ebakke/pdp8/