CSCI 431 Project 2

time due submission file
Monday, 7 May in office or via email

Setup

The LC/3 instuction “JSRR x” is supposed to perform the sequence of operations as specified in the following assignments.

    R7 <- PC ;
    PC <- Rx ;

This intention of the instuction is to branch to a subroutine whose address is stored Rx and to save the subroutine return address is R7.

However, when R7 is Rx, you must be a little careful here. In this case, the effect of the instruction should be to just store the program counter into R7. However, if you're not careful and you execute these statements in parallel; you might end up branching to whatever address R7 happens to be holding.

Assigment

The assignment is to look at your solution to Project 1 and see how it handles this case. If it handles it correctly, then just say so in a convincing manner. If it doesn't, then describe how you would fix your design.