Assignment 6
- In the last assignment, exercise 2, you wrote a C program
to demonstrate addition/subtraction and the logic operations. Rewrite
this program in assembly language, eliminating all data memory
references (no load/store instructions). Instead, use registers for
working storage. Run the program on the PIC32 and the Nios II (using
the simulators). This will require two separate versions of the
assembly source. Verify that the program runs by submitting screen
shots, where appropriate.
- There are three loop constructs in C: (for,
while, and do ... while). There is also a
case statement. Write a C program that contains instances of
these structures and show how the resulting assembly language
implements these structures. Use high-lighting to mark the
initialization, body, and termination test portions of the
structures.
- Do exercises 5.8, 5.14, and 5.20.
- Do exercises 6.24, 6.28, and 6.31. You may write an
assembly language program (PIC32) to help answer 6.31.
Maintained by John Loomis,
last updated 20 October 2008