Computer Science 251
Computer Organization and Architecture

Dickinson College
Fall Semester 2004
Grant Braught

Class #10 - Arrays and References

Main Ideas For Today

Lecture Slides

Homework Assigned Today

    Due Date: 10/11/04

  1. Write an assembly language equivalent for the following HLL code:
  2. Consider the following class definition:
    The figure to the right shows how an object of type Foo and several references to it might be organized in main memory. Assuming that the labels f, g, A and B exist, write assembly language instructions that perform the following operations:
    1. f.y = 17;
    2. f.z = 99;
    3. A = g.y;
    4. B = g.z;

      HINT:You'll need to use the immediate label and the indirect addressing modes.


  3. Write an assembly language equivalent for the following HLL code: