Assignment 2, due June 18Includes Machine Problem 1, due June 19
Part of
the homework for 22C:50, Summer 2003
|
Ground rules: This program involves making changes to the software distributed on the web at
This is a large multi-file C program. It should conform to the C programming style documented in
Failure to conform to this style will be penalized! Note the rules for commenting! As distributed, the code is version 0.0! Your revision (MP1) should be version 0.1, and it should have your name as the author, with appropriate additions made to the revision history!
All assignments for this class are to be turned in on paper! When you modify a multi-file program, turn in only the listings of the files you changed. Always, in addition, turn in a listing of a test file that demonstrates your work. Failure to test will be penalized. Clear documentation of errors or unimplemented parts of your solution will reduce the penalty for incomplete work.
The main assignment: The assembler, as distributed, supports only base 10 and base 16 numbers. Add support for arbitrary number bases using the notation:
<base>#<number>Where <base> is a number base, expressed in decimal, and <number> is a number expressed in that base. The allowed bases are from 2 to 36; digits greater than 9 are expressed using letters (either upper or lower case), with A representing the value 10 and Z representing 35. This enhancement to the program will require at most a few tens of lines of code, all in the same source file.
Secondary assignments: Lines 44 to 46 of the test file distributed with the EAL assembler demonstrate bugs in the assembler's error reporting. Fix at least one of them!