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-18 07:37:52 and 2017-12-18 08:05:04

130
131
132
133
134
135
136
137
138


139
140
141



142
143
144
145
146
147
148
130
131
132
133
134
135
136


137
138
139
140

141
142
143
144
145
146
147
148
149
150







-
-
+
+


-
+
+
+







> **Historical vignette:** Where the earlier PDP-8 assembler 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][ascii]: the United States of America Standard Code for Information Interchange; or the American National Standard Code for Information Interchange. You may also see "US-ASCII" in some places, being another way of writing "USA SCII".

[ascii]: https://en.wikipedia.org/wiki/ASCII


## <a id="pal-d"></a>PAL-D

| **Introduced** | 1967
| **Manual** | [PAL-D Disk Assembler Programmer's Reference Manual](https://archive.org/details/bitsavers_decpdp8sofProgRef_1907666)
| **Introduced** | April 1968
| **Manual** | [PDF, 1.9 MB](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 is a descendant of PAL-III, originally appearing as part of the PDP-8 Disk Monitor System, one of OS/8's predecessors. It would later reappear under TSS/8.

[Wikipedia claims][dms] that the first version of the Disk Monitor was published in late 1967, but the earliest PAL-D manual I've been able to find has April 1968 as the date of its first edition.

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.

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.

4K PAL-D is more notable for the features it brought into the PAL family from [MACRO-8](#macro-8):

167
168
169
170
171
172
173

174
175
176
177
178
179
180

181
182
183

184
185

186
187
188
189
190
191
192
193
194
195


196

197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216

217
218
219
220
221

222
223
224
225
226
227
228
169
170
171
172
173
174
175
176
177
178
179
180
181
182

183
184
185

186
187

188
189
190
191
192
193
194
195
196
197
198
199
200

201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220

221
222
223
224
225
226
227
228
229
230
231
232
233
234







+






-
+


-
+

-
+










+
+
-
+



















-
+





+







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.

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


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

| **Introduced** | 1971, collectively
| **Manual** | most any OS/8 manual, such as the OS/8 Handbook: [1974 ed.][os8m] or [1979 ed. for OS/78][os78m]
| **Manual** | [PDF, 38 MB][os8m]
| **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 handbook; two of its many editions are linked above.
[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 the OS/8 handbook. The 1974 edition is linked above. You may also find the later [OS/78 Handbook][os78m] from 1979 interesting for comparison purposes.

The introduction date is that of OS/8, but OS/8 has a [complicated development history][faq10] that stretches back to 1966 or so. Some of the following assemblers predate OS/8; where the dates for them are known, they are called out. For those with no additional date information, it is possible that it was first introduced after OS/8 but before 1974, the date of the manual linked above, which talks about all of these assemblers.
The introduction date is that of OS/8, but OS/8 has a [complicated development history][faq10] that stretches back to 1966 or so. Some of the following assemblers predate OS/8; where the dates for them are known, they are called out below. For those with no additional date information, it is possible that it was first introduced after OS/8 but before 1974, the date of the manual linked above, which talks about all of these assemblers.

[faq10]: http://www.faqs.org/faqs/dec-faq/pdp8/section-10.html
[os8m]: https://archive.org/details/bitsavers_decpdp8os8_39414792
[os78m]: https://www.grc.com/pdp-8/docs/OS8_Handbook.pdf


### <a id="pal8" name="pal-8"></a>PAL8

The earliest attestation to the PAL8 assembler I've been able to find is in the May 1970 printing of [Programming Languages][pl], the second in a two-volume set on programming PDP-8 family computers. (The first volume being [Introduction to Programming][ip].) On page 14-7 in the section on 8K PAL-D, it gives a Disk Monitor command for saving the in-core copy of 8K PAL-D as "PAL8". It is therefore unsurprising that the OS/8 version of PAL8 is morphologically more similar to [PAL-D](#pal-d) than to [PAL-III](#pal-iii).

The earliest reference to PAL8 as a named product of DEC is in the [PS/8 8K Programming System User's Guide][ps8ug] from October 1970, that product being the immediate predecessor of OS/8.

PAL8 understands the same basic language as PAL-D and generally has more features, most especially related to running under OS/8, such as the ability to set options via OS/8's command interpreter (CCL) rather than via the PDP-8's front panel switches.
PAL8 understands the same basic language as PAL-D but generally has more features, most especially related to running under OS/8, such as the ability to set options via OS/8's command interpreter (CCL) rather than via the PDP-8's front panel switches.

I consider PAL8 the default assembler for OS/8 users. If none of the information below guides you to one of the other assemblers, you should probably start with PAL8. 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.

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

The restoration of the `FIXMRI` pseudo-op is curious. It is not clear from the manuals whether its use is again required for redefining memory reference instructions (MRI) after an `EXPUNGE` call or if it is merely for compatibility with certain existing PAL-III programs. (**TODO**: Try it and see.)

The existence of the `RELOC` pseudo-op should not be taken as a sign that PAL8 is a relocatable assembler. It simply allows code to be assembled starting at one fixed address which is intended to be run at a different fixed address. A proper relocatable assembler generally tries to hide the fixed addresses it uses when assembling your program; compare [SABR](#sabr), for example, which produces output that cannot be run directly, but which must be processed by a relocating loader (`LOADER.SV`, in the case of SABR) to fix up the addresses to their final execution values.
The existence of the `RELOC` pseudo-op should not be taken as a sign that PAL8 is a relocatable assembler. It simply allows code to be assembled starting at one fixed address which is intended to be run at a different fixed address. A proper relocatable assembler generally tries to hide the fixed addresses it uses when assembling your program; compare [SABR](#sabr), for example, which produces output that cannot be run directly, but which must be processed by a relocating loader (`LOADER.SV`) to fix up the addresses to their final execution values.

PAL-III has one feature not implemented in PAL8:  the ability to get a brief listing of the undefined symbols in a program. The information is instead presented inline in the listing output, not grouped together into a single place, which can make refinement of an in-development program tedious as you need to comb information about undefined symbols out from among all the other output.

[ip]: http://bitsavers.org/pdf/dec/pdp8/handbooks/DEC-08-XINPA-A-D_intrPgm_75.pdf
[pl]: http://bitsavers.org/pdf/dec/pdp8/handbooks/programmingLanguages_May70.pdf
[ps8ug]: https://archive.org/details/bitsavers_decpdp8sofogrammingSystemUsersGuide_2417347
[ts8m]: http://bitsavers.org/pdf/dec/pdp8/typeset8/
[ts8p]: http://gordonbell.azurewebsites.net/digital/timeline/1968-3.htm


### <a id="ralf" name="flap"></a>RALF/FLAP

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