Spring 2001 CSCI 255 Homework 10

This assignment is due Monday, 16 April.

Problem 1 and only

This homework is, in style, similar to Homework 8.

Write an LC-2 assembly language subroutine that performs the C ^ operator. You should write the subroutine so that it processes its input arguments in registers R1 and R2 and returns its result in register R0.

Review your notes for the 21 March lecture to see an example that uses this argument passing style. Review your notes for the 22 January lecture for a little more information about the exclusive-OR. All you really need to know is that the following C exression is always true:

Turning in this assignment

This assignment is to be turned in by copying it to your Computer Science Unix directory. First create a protected directory csci/255/home10 as shown below:

Then save your completed assembly program in the file home10.asm within your csci/255/home10 directory.