pdpnasm is an assembler for the PDP-8 computer, written in C. It follows the standard PAL-III syntax, with some exceptions, and was intended to be backwards-compatible with Prof. Wolf's assembler as used in ELE 375 (Fall 06). Advantages over the previous assembler include:
- More robust; catches more errors and gives sensible error messages.
- Closer to the original PAL-III specification.
- Much more flexible with whitespace.
- Same code handles both passes.
- Simpler instruction encoding using the "Fixed Symbol Table"-approach.
pdpnasm(works in UNIX or Cygwin).
pdpnasm asm-file.p8 obj-file.po(same usage as the original
pdp8asmof ELE 375).
fixtab.p8 contains the fixed symbol table, that is, the definition of mnemonics such as
CLA, and must be present in the current directory when assembling. This methodology is analogous to how the original PAL-III assembler worked, having instruction mnemonics as a special case of user-defined symbols.
- Have error messages point to beginning of faulting token instead of current input position.
- Automated testing.
Deliberate deviations from specification
- Junk (characters except whitespace) not accepted after
- "Ignored Characters" are not ignored; may trigger errors instead.
- "Illegal Characters" are not ignored; will trigger errors instead.
- Integer literals need not fit in a single word as long as the overall expression does so.
- All characters of a symbol name are used for identification; not just the first six.
- Recursive assignments not supported (e.g. "
EXIT=RETURN=JMP I 0")
- Symbol redefinitions or assignments are treated as errors.
- Symbol table is not printed at end of Pass 1.
FIXMRImay be used anywhere in the code (not just immeditately after an
- Error messages may not be phrased exactly as in the specification.
Currently unimplemented features from specification
- Fixed symbol table does not yet contain all specified symbols.
Ztoken not supported (do some error checking here, too).
The PAL-III specification can be found here.