Assignment 5, due Sept 28
Part of
the homework for 22C:60, Fall 2007
|
Always, on every assignment, please write your name legibly as it appears on your University ID and on the class list! All assignments will be due at the start of class on the day indicated (usually a Friday). The only exceptions to this rule will be by advance arrangement unless there is what insurance companies call "an act of God" - something outside your control. Homework must be turned in on paper and in class! Late work may be turned in to the teaching assistant's mailbox, but see the late work policy. Never push late work under someone's door!
a) 25
b) -250
c) FFFFF66616
d) 800000
e) FADF00D16
a) Write a SMAL Hawk code fragment (one or more instructions) to load R3 with the pointer p. (0.2 points each)
b) Write a SMAL Hawk code fragment (one or more instructions) to load R3 with p.next. That is, with the value of the first field of the object pointed to by p. (0.3 points each)
c) Write a SMAL Hawk code fragment (one or more instructions) to load R3 with p.x. That is, with the value of the second field of the object pointed to by p. (0.5 points each) (1 point)