CS 2734
Computer Organization II
Laboratory 10
Laboratory 10 will meet in the Sun laboratory.
Prior to the laboratory you must write a program to implement
a MAC-1 assembler according to the following
specifications:
- The assembler should use Pass 1 as specified in laboratory 9.
- The assembler takes the following command-line options:
-o filename1
-s filename2
If -o is given, the assembler writes the assembled code
to filename1, otherwise the assembler writes the assembled
code to a.out. If -s is given, the assembler writes the
symbol table in ASCII to filename2 at the end of Pass 1.
The assembled code should be written out in ASCII hex.
- You should reuse as much code as possible from Pass 1
in implementing Pass 2.
- You should correctly handle errors in the assembly language
source.
-
Your program should be well-structured and well-documented. Each
function should have a header describing the function and specifying
the meaning of each parameter.
During laboratory checkoff you will be asked to demonstrate
the assembler is working correctly by running the program on some
given test files:
You must hand in copies of all source,
your makefile, and your lint output. There should be no lint
errors. (Use the -m and -u options on lint to get rid
of uninformative warnings.)