PAL-III
From Wikipedia, the free encyclopedia
PAL-III was the assembly language processor for the PDP-8 computer family sold by Digital Equipment Corporation of Maynard, Massachusetts. It followed an earlier product known as PAL-8.
PAL-III allowed the efficient production of PDP-8 machine code from a human-readable source language. It also supported PDP-8-specific architectural features such as 128-word code pages, the special use of Page 0, IOTs, and automated addressing of "far" data objects.
Here is a typical program written in PAL-III:
/ Define two symbols for I/O Transfer (IOT) instructions / TSF = 6041 / Teleprinter Skip-on-Flag TLS = 6046 / Teleprinter Load Sequence (Clear flag and print from AC) / / (Many PDP-8 assemblers contained these very basic IOTs predefined) *200 / Assemble the following code starting at location 0200 / (the beginning of Page 1 in Field 0) START, CLA CLL / Clear the AC and the Link bit TAD (DATA-1) / Point AC just *BEFORE* the data (accounting for later pre-increment behavior) DCA 10 / Put that into one of ten auto-pre-increment memory locations LOOP, TSF / Test the printer "ready" flag, skip if ready JMP .-1 / Jump back if not yet ready TAD I 10 / Pre-increment mem location 10, fetch indirect to get the next character of our message SNA / Skip on non-zero AC HLT / Else halt at end of message TLS / Clear the printer "ready" flag and output character contained in the AC CLA CLL / Clear AC for the next loop JMP LOOP / Jump back for the next character DATA, "H / A well-known message "e / "l / NOTE: "l / "o / Strings in PAL-8 and PAL-III were "sixbit" ", / To use ASCII, we'll have to spell that out, character by character " / "w / "o / "r / "l / "d / "! / 015 / 012 / 0 / Mark the end of our .ASCIZ string ('cause .ASCIZ hadn't been invented yet!)
This illustrates most of the salient features of the language:
- Symbols could be defined by the programmer.
- The usual simple arithmetic can be performed at assembly-time using symbols.
- Labels are delimited by a comma (rather than the more-usual colon).
- "/" begins a comment that runs to the end of the current line.
- Opcode mnemonics could be "or"ed together where appropriate (as in "CLA CLL").
- "I" used with a memory-access opcode indicates one level of "indirection" (which is all the PDP-8 could do!)
- Data literals could be created on the current page using "(litval)" or on Page 0 using "[litval]".
- "." meant "the current location counter".
Note, though, that PAL-III was not a macroassembler and no full macro language was provided. (A later product called MACREL-8 did provide macro-assembly features.)