This assignment is due Monday, 8 April.
Write an LC-2 assembly language program to perform the following four C statements:
R0 = R4 * 17 + 5 ;
R1 = (R4 && R5) - 3 ;
R2 = ~R4 + ~R5 ;
R3 = (R4 & R5) - 3 ;
Follow the following rules:
R0, R1,
R2, and R3 based on the values of
registers R4 and R5.
R4 and R5.
R6 and
R7 as "scratch" registers.
HALT
system call.
If you have any doubt about what the output how this program should compute its answer, you should download and run the the original C program.
This assignment is to be turned in by copying it to your Computer Science Unix directory. First create a protected directory csci/255/proj1 as shown below:
Then save your completed assembly program in the file proj1.asm within your csci/255/proj1 directory.