Computer Organization and Architecture

Assembly Language Optimization


This laboratory exercise extends the study of optimization begun in lab on Optimization of Assembly Language Code. In that lab, the optimizer of the compiler produced smaller and better assembly language code than the basic compiler. However, additional savings are possible by eliminating unnecessary intermediate variables, using registers more efficiently, removing redundant computations, and combining related operations.

Implement these changes to yield a more efficient program that prints the table. To get started, copy the C program from that lab to your account, generate an assembly listings using the gcc command, and edit the resulting file to include your improvements.

After you have improved the assembly program (table.s), you may run the result by assembling, linking, and executing the finished program. See the Assembly Language Says 'Hi' material for more details.

Turn in your programs following the format identified in the C programming lab.


This document is available on the World Wide Web as

http://www.cs.grinnell.edu/~walker/courses/211.fa01/assem.opt-assign.html

created October 1, 1997
last revised October 30, 2001
Valid HTML 3.2!
For more information, please contact Henry M. Walker at walker@cs.grinnell.edu.