PiDP-8/I Software

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

Changes to "A Field Guide to PDP-8 Assemblers" between 2017-12-17 21:18:08 and 2017-12-17 22:07:46

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
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







-
+

-
+

-
+

+
-
+
+

+
-
+
+
+
+
+
+
+
+
+
+
+















+
-
-
+
+








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

We may presume from the name that PAL-III has two predecessors. I was able to find a reference to DEC product number 5-1-S, the Program Assembly Language for the PDP-5, which the PDP-8 directly replaced in DEC's product line, being upward compatible with it. That same [PDP-5 program catalog][pc5] says that its replacement is [an early version of PAL-III][p83s]. I have not been able to find a reference to PAL-II. Perhaps it went the way of Angular 3, Winamp 4, Netscape 5, PHP 6, MySQL 7, QuickTime 8, and Windows 9.

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 the RIM loader into the PDP-8's front panel, 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 — reusing the still-in-core BIN loader each time — in order to iterate his way toward a working program!
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 the RIM loader into the PDP-8's front panel, then use that to load the BIN loader from a fifth paper tape, separate from the PDP-8 Assembly System, then run each of these tapes through the paper tape reader repeatedly — reusing the still-in-core BIN loader each time — in order to iterate his way toward a working program!

The assembler tape required at least two passes through the tape reader in order to produce a computer-readable BIN format output tape, plus an optional third pass if you wanted a human-readable listing on the terminal.
The assembler tape required at least two passes through the tape reader in order to produce a computer-readable BIN format output tape, plus an optional third pass if you also wanted a human-readable listing on the teletype.

If you look at pictures of PDP-8 computers, you can often see a 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 a blue 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).
If you look at pictures of PDP-8 computers, you can often see a 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 a paper-tape based PDP-8. There is a good picture of a blue one on the cover of the [OS/8 Handbook][os8m], 1974 ed.

PAL-III can be considered the baseline assembler for a PDP-8, since for roughly its first decade, PDP-8s sold for interactive use came with a Teletype Model 33 ASR with built-in paper tape reader and punch, which meant the ability to read paper tapes was a baseline feature for interactively-used PDP-8s. (Contrast headless embedded PDP-8s, a very common use for the PDP-8 prior to the introduction of the microprocessor.)
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 surveyed here share its basic syntax.

More importantly for our purposes here, most of the other assemblers surveyed here share PAL-III's basic syntax. This doubtless follows on from the prior point, since it meant PAL-III had the first-mover advantage.

A brief summary of the feature set of PAL-III:
We will not list the feature set of PAL-III here; see its manual for that. The lists of features in the sections below are relative to either PAL-III or one of the other assemblers reviewed below. Within the PAL genealogical line, compatibility with the baseline PAL-III syntax is assumed unless a note is made otherwise.

*   Full support of the PDP-8 instruction set:
    *   Core memory `FIELD` selection
    *   Zero-page addressing
    *   Indirect addressing
    *   Define new instructions
*   `EXPUNGE`, `FIXTAB`, and `FIXMRI` pseudo-ops to redefine the predefined instruction set
*   Radix selection with `DECIMAL` and `OCTAL` pseudo-ops
*   `PAUSE` assembly output, giving the user time to do manual things while the assembler waits

We give this list not to try to replace its manual, but instead to allow searching this document for language features. You may assume that assemblers listed below also support these listed features, except where we say otherwise. Especially within the PAL genealogical line, compatibility with the baseline PAL-III syntax is assumed.

[pc5]: http://bitsavers.org/pdf/dec/pdp5/PDP-5_pgmLibr_1964.pdf
[p83s]: http://www.ricomputermuseum.org/Home/equipment/pdp-8s/pdp-8-software


## <a id="macro-8"></a>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.

MACRO-8 is based on the PAL-III language, with several new features:

*   literals in the current page via `(NN)` syntax or in page zero via `[NN]`; closing paren/bracket optional
*   The `DEFINE` based macro definition system
*   Other new pseudo-ops:
*   `DEFINE` macro definition system
*   other new pseudo-ops:
    *   `DUBL`: ???
    *   `FLTG`: ???
    *   `PAGE`: [re]set the location counter to the top of the given page
    *   `TEXT`: convert a literal string in the program text to 6-bit packed ASCII in the binary output

MACRO-8 dropped the `FIXMRI` pseudo-op relative to PAL-III. One manual I examined showed an example that could only be done using `FIXMRI` under PAL-III, by which I infer that MACRO-8 simply doesn't need the hint from the user: memory reference instructions can be detected as part of regular symbol table manipulations.

100
101
102
103
104
105
106
107

108
109

110
111
112



113
114
115




116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131


132
133
134
135
136
137
138
114
115
116
117
118
119
120

121
122

123
124


125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159







-
+

-
+

-
-
+
+
+



+
+
+
+
















+
+







| **Manual** | [PAL-D Disk Assembler Programmer's Reference Manual](https://archive.org/details/bitsavers_decpdp8sofProgRef_1907666)
| **Delivery** | paper tape

PAL-D is a descendant of PAL-III, originally appearing as part of the [PDP-8 Disk Monitor System](https://en.wikipedia.org/wiki/4K_Disk_Monitor_System), one of OS/8's predecessors. It would later reappear under TSS/8.

PAL-D came in two forms, the 4K and 8K versions, referring to the minimum amount of core memory each required. Note that the 4K version could assemble for larger machines; it has the `FIELD` pseudo-op, for example, which is of no use unless your assembled program would run in at least 8K of core.

The 4K version defines only one new feature in the PDP-8 assembler family so far: the `XLIST` pseudo-op, which lets the programmer stop and then re-start the assembly listing in the optional third pass. The 4K version is more notable for the features it brought into the PAL family from [MACRO-8](#macro-8): the `PAGE` and `TEXT` pseudo-ops.
4K PAL-D added only one new feature to the PDP-8 assembler family: the `XLIST` pseudo-op, which lets the programmer stop and then re-start the assembly listing in the optional third pass.

8K PAL-D added quite a few new features over the 4K version:
4K PAL-D is more notable for the features it brought into the PAL family from [MACRO-8](#macro-8):

*   ability to run in 8K or 12K of core, allowing assembly of larger programs
*   automatic link generation for off-page references
*   literals
*   off-page link generation
*   the `PAGE` and `TEXT` pseudo-ops
*   more operators in expressions:
    *    `!` for Boolean OR (the ASR-33 terminal character set [did not include the &brvbar; character][cs33])
    *    `&` for Boolean AND

8K PAL-D added several more features relative to the 4K version:

*   ability to run in 8K or 12K of core, allowing assembly of larger programs
*   single-character ASCII constants: `"A`
*   more pseudo-operations:
    *   `EJECT`: emit a form feed in the listing output
    *   `IFDEF` and `IFZERO`: conditional assembly tests; affected statements in angle brackets
    *   `NOPUNCH` and `ENPUNCH`: stop and restart assembled machine code output
    *   `ZBLOCK`: reserve memory, setting initial values to zero

Note that neither version of PAL-D brought over the `DEFINE`, `DUBL` or `FLTG` pseudo-ops from MACRO-8.

Notice also that the negated forms of the conditional assembly operations did not appear until later. The first reference I've been able to find for `IFNZRO` and `IFNDEF` is in connection with [PAL8](#pal8).

We find evidence for a complicated development history in the `PUNCH` and `XLIST` pseudo-ops. They do much the same thing, only for different passes of the assembler, yet the form of the ops differ.  If this assembler was created by a single mind in a single time and place, or if it were created by a standards committee with a mandate to simplify and unify, you would expect these two sets of pseudo-ops to have similar names and forms, either `XPUNCH` taking an argument or a `NOLIST`/`ENLIST` pair. We can infer different minds behind the 4K and 8K versions of PAL-D.

The `PUNCH` op names also suggest that the operation is mainly useful for paper tape output, still an important I/O device when PAL-D was new. We can find it mentioned in the PAL8 section of [the OS/8 Handbook (1974 ed.)][os8m], but it was airbrushed out of history by the [1979 edition for OS/78][os78m], suggesting that the purpose of these pseudo-ops became effectively redundant after the bulk of the market moved to disk-based PDP-8 systems such as the [DECstation 78][ds78], a microcontroller based PDP-8 merged with a VT52 video terminal, which effectively replaced the teletype + paper tape reader/punch most often used with earlier PDP-8 systems. (Thus the renaming of "OS/8" to "OS/78," by the way.)

Like MACRO-8, PAL-D does not have the `FIXMRI` pseudo-op.

> **Historical vignette:** When these manuals refer to the new ASCII character constant feature, they actually either refer to "USA SCII" or to "ANSCII", those being the original names of ASCII: the United States of America Standard Code for Information Interchange; or the American National Standard Code for Information Interchange.

[cs33]: http://iclces.uk/articles/a_teletype_font.html
[ds78]: https://en.wikipedia.org/wiki/DECstation#DECstation_78


## <a id="os8"></a>The OS/8 Assemblers

159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
180
181
182
183
184
185
186

187
188
189
190
191
192
193







-








PAL8 has many features not present in 8K PAL-D:

*   output option for producing input to [CREF][os8m]
*   more operators in expressions:
    *    `^` for 12-bit unsigned multiplication (`*` was already taken for setting the location counter)
    *    `%` for 12-bit unsigned division (`/` was already taken as the comment start character)
*   literals in the current page via `(NN` syntax (closing paren optional) or in page zero via `[NN`
*   the `FIXMRI` pseudo-op is back
*   `EJECT` pseudo-op extended to allow the page header to be changed for the next and following pages
*   new pseudo-operations:
    *   `DEVICE` and `FILENAME` alternatives to `TEXT` for passing arguments to OS/8 service routines
    *   `DTORG`: set DECtape block number in output for the [Typeset-8][ts8m] computerized typesetting system ([photo][ts8p])
    *   `IFNDEF` and `IFNZRO` negated forms of the conditional assembly tests
    *   `RELOC`: assemble code for relocation after loading