Assignment 4, due June 21

Part of the homework for 22C:50, Summer 2004
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

  1. Do problems 7, 9 and 11 at the end of Chapter 3 of the notes.

  2. What features of the EAL assembler would prevent your converting EAL from a 2-pass assembler to a 1-pass assembler with chaining used to resolve forward references?

  3. The fictional Ultimate RISC computer has one machine instruction, move, which moves an operand from the source address to the destination address. From the assembler's point of view, this is defined as follows:
    	MOVE src,dst
    

    Assembles identically to these two lines of EAL code

    	W    src
    	W    dst
    

    If you are curious about the machine itself, see http://homepage.cs.uiowa.edu/~dwjones/arch/risc/, but nothing about the details of the actual machine matters to this problem.

    Look in the code for EAL, in file parser.c and find the code for processing the B and W pseudo-ops (right before the else clause that generates the error message illegal opcode or pseudo-op). Write the code you would add here (starting with } else if ...) to handle the MOVE opcode. Assume that move_handle is defined for you.