Assignment 4, due Sep 17

Part of the homework for 22C:60, Fall 2010
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

Always write your name legibly as it appears on your University ID and on the class list!

Homework

  1. Background: Here is a sequence of instructions in the memory of the Hawk computer, expressed as a sequence of location:value pairs in hexadecimal:
            001000: D1
            001001: 01
            001002: E2
            001003: 02
            001004: 00
            001005: 00
            001006: 33
            001007: 12
            001008: F4
            001009: F1
            00100A: 14
            00100B: C3
            00100C: F5
            00100D: 62
            00100E: 03
            00100F: 00
    

    a) Give equivalent SMAL/Hawk assembly notation for this sequence of instructions. (1 point)

    b) What registers does this sequence of instructions change, and what values does it place in those registers? (1 point)

  2. A Problem: Given that R3 holds a pointer to a tree node (that is, the address of a tree node), in the format used for machine problem 1. Write SMAL-Hawk code to load R4 with the pointer to that node's right child. (1 point)