pdp11  Assembler
 MDFS::Software.PDP11.AssemMod2 Search  
This is the PDP-11 assembler I wrote in April 1989 as a 31V4 Programming Systems assignment at Stirling University. It is written in Modula-2 and assembles a subset of instructions and all addressing modes as detailed in the assignment specification and user guide. This assignment was 25% of the course marks 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 I hadn't been writing it for a University assignment. Looking through it now it leaps out how being forced to document it in the specified style and name certain modules and functions as specified crippled it.

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

I wrote this at University after having already been writing assembly language programs, including assemblers and disassemblers, for at least four years! And yet, I have a certain fondness for this project. I recently wrote a PDP-11 assembler from scratch in BBC BASIC which will run on a variety of platforms. It is very close to how I would have written this assembler if allowed to.


Best viewed with Any Browser Valid HTML 4.0! Hosted by Force9 Internet - Authored by J.G.Harston
Last update: 14-Mar-2007