FInal project V
Due date: May 9.
The final project consists in generating correct assembly code for
a subset of Ada, exemplified by the variations on Fibonacci of last
exercise. At a minimum, you must be able to handle functions with
integer arguments that return integer values. Local declarations must
include integer variables and arrays of a static size. Control structures
must include if-statements, while-loops and for-loops, including
exit statements. For extra credit, you may add boolean values,
strings, or floating-point numbers. At a minimum you should generate
code on a quadruple-by-quadruple basis. For top credit, do some
register allocation over basic blocks.
To test your compiler you should generate the assembly, write a driver
program in the language of your choice, and test your assembled code by
calling the compiled function and printing its result.
Submit the project on a paper, in a binder, including documentation on
the subset of the language you implement, the code generation method
that you have implemented, listings of the input, the generated assembly,
your test program, and the output. Enjoy!