MDFS::Software.PDP11.AssemMod2 Search

PDP-11 Assembler

This is the PDP-11 assembler I wrote in April 1989 as a 31V4 ProgrammingSystems assignment at Stirling University. It is written in Modula-2 andassembles a subset of instructions and all addressing modes as detailed inthe assignment specification and user guide. This assignment was 25% of the coursemarks and received an 'A-' grade.

31V4-2/TXT   wr/R  ASSEM/MOD    wr/R  ASSEM/TXT    wr/R  GUIDE/TXT    wr/R
MASTER/MOD   wr/R  PARSER/MOD   wr/R  PASS_1/MOD   wr/R  PASS_2/MOD   wr/R
STRUCT/TXT   wr/R  SYMBOLS/MOD  wr/R  TEST1/LST    wr/R  TEST1/MAC    wr/R
TEST1/TXT    wr/R TEST2/LST    wr/R TEST2/MAC    wr/R  TEST2/TXT    wr/R
TEST3/LST    wr/R TEST3/MAC    wr/R 

The files *.LST are the actual output of the assembler, marked with[incorrect] where the output was incorrect.

There are many different things I would have done with this program if Ihadn't been writing it for a University assignment. Looking through it nowit leaps out how being forced to document it in the specified style andname certain modules and functions as specified crippled it.

For example, it would have been (and still is) my natural inclination toname the exported functions in SYMBOL.MOD something like Label* orSymbol*, not enter_label(), find_label(), get_label() and init_list(). Imean, init_list() doesn't even hint that it is anything to do with symbolsor labels!

I wrote this at University after having already been writing assemblylanguage programs, including assemblers and disassemblers, for at leastfour years! And yet, I have a certain fondness for this project. Irecently wrote a PDP-11 assembler from scratchin BBC BASIC which will run on a variety of platforms. It is very close tohow I would have written this assembler if allowed to.


Hosted by Force9 Internet -Authored by J.G.Harston
Last update: 14-Mar-2007