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-10 14:59:45 and 2017-12-10 15:18:57

224
225
226
227
228
229
230
231

232
233
234
235

236
237
238
239
240
241
242
224
225
226
227
228
229
230

231
232
233
234

235
236
237
238
239
240
241
242







-
+



-
+








## <a id="smal" name="smal8"></a>SMAL8

| **Introduced** | 1980, 2012
| **Manual** | [SMAL32][smal32], [SMAL8][smal8]
| **Delivery** | Internet, same links as above

SMAL is a series of cross-assemblers initially created by [Douglas W. Jones][dwj]. He wrote the initial versions in Pascal but later ported it to C. Some versions of SMAL — such as the SMAL32 version linked above for its wonderful manual — are machine-independent, meaning that it provides only the skeleton of the assembler, and is not able to generate code for any particular machine. Other versions of SMAL were targeted at specific machines, mostly 8-bit microcontrollers. Oddly enough, Dr. Jones did not base his `pal.c` PDP-8 cross-assembler upon SMAL. (See [palbart](#palbart) below for more on that thread of history.)
SMAL is a series of cross-assemblers initially created by [Douglas W. Jones][dwj]. He wrote the initial versions in Pascal but later ported it to C. Some versions of SMAL — such as the SMAL32 version linked above for its wonderful manual — are machine-independent, meaning that it provides only the skeleton of the assembler, which is not able to generate code for any particular machine. Other versions of SMAL were targeted at specific machines, mostly 8-bit microcontrollers. Oddly enough, Dr. Jones did not base his `pal.c` PDP-8 cross-assembler upon SMAL. (See [palbart](#palbart) below for more on that thread of history.)

Vincent Slyngstad took up the challenge of targeting SMAL at the PDP-8, producing [SMAL8][smal8], offering it as part of his [C compiler system for the PDP-8](http://so-much-stuff.com/pdp8/C/C.php).

The basic syntax of SMAL8 is roughly in the PAL-III family. Because of the spare feature set of [PAL-III](#pal-iii), it is likely to compile a large subset of programs meant for PAL-III, but there are enough differences between SMAL8 and [PAL8](#pal8) that it is likely to assemble only relatively simple programs. 
Some of the differences listed below mean that although the basic syntax of SMAL8 is solidly in the [PAL-III](#pal-iii) family, SMAL8 is likely to assemble only relatively simple PAL programs as-is. The most critical differences are the loss of inline literals and the difference in conditional assembly. New code would simply be written to avoid these problems.

If you read through the SMAL32 manual and see differences relative to PAL syntax but don't see the difference documented below, chances are that Vincent Slyngstad fixed these differences in SMAL8. For example, like PAL8 but unlike SMAL32, SMAL8 uses `/` to introduce comments, defaults to octal, allows `*` to set the output origin, and uses the `EJECT` pseudo-op rather than `PAGE` to put a page break into the output listing.

SMAL8 has many feature additions relative to PAL8:

*   relocatable output
*   `MACRO` and `ENDM`: MACREL-like macro feature
256
257
258
259
260
261
262
263
264


265
266
267
268
269
270
271
256
257
258
259
260
261
262


263
264
265
266
267
268
269
270
271







-
-
+
+







Some things are simply different in SMAL8 as compared to PAL8:

*   powerful expressions in SMAL allow modern `IF`, `ELSE`, `ELSEIF` and `ENDIF` for conditional assembly
*   `PAGE` takes no argument, as in [SABR](#sabr)

There are a few features removed relative to PAL8:

*   multiplication not allowed in expressions; `*` was given PAL8 meaning and `^` not implemented as PAL8 multiply
*   division not allowed in expressions; `/` was given PAL8 meaning and `%` not implemented as PAL8 divide
*   multiplication is not allowed in expressions; `*` was given the PAL8 meaning, and `^` is not implemented
*   division is not allowed in expressions; `/` was given the PAL8 meaning, and `%` is not implemented
*   no inline literals, either the `(N)` or `[N]` syntaxes; parens used for groups and lists instead
*   some IOT instructions PAL8 knows do not have predefined symbols: `KIE`, `RPE`, etc.

The data storage specifier feature of SMAL32 was removed in SMAL8, since it doesn't make much sense in the 12-bit world of the PDP-8. (That is, the byte (`B`), halfword (`H`), threeword (`T`), and fullword (`W`) pseudo-ops.) Use `DATA` instead.

[dwj]: http://homepage.divms.uiowa.edu/~jones/
[smal8]: http://so-much-stuff.com/pdp8/C/Assembler.php