fa05-sl-s2 - ECE 3035 A 4 problems 7 pages Problem 1(4 parts 30 points Computing Mechanisms Exam Two Solutions Fall 2005 21 November 2005 HopMaze

fa05-sl-s2 - ECE 3035 A 4 problems 7 pages Problem 1(4...

This preview shows page 1 - 2 out of 5 pages.

ECE 3035 A  Computing Mechanisms Fall 2005 4 problems, 7 pages Exam Two Solutions 21 November 2005 Problem 1 (4 parts, 30 points) HopMaze Implementation The following fragments are from the HopMaze baseline. For your responses, describe their  behaviors  using proper data structure nomenclature. Do not simply transliterate the MIPS  instructions. Store:      .word 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0             .word 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 Visit:      .word -1, -1, -1, -1, -1, -1, -1, -1             ...             addi  $9, $0, Store     # I01             addi  $10, $0, Store    # I02             ...             lbu   $1, 0($10)        # I03             addi  $10, $10, 1       # I04             slti  $2, $10, Visit    # I05             bne   $2, $0, L1        # I06             addi  $10, $0, Store    # I07 L1:         ...             ...             sb    $6, 0($9)         # I08             addi  $9, $9, 1         # I09             slti  $2, $9, Visit     # I10             bne   $2, $0, L2        # I11             addi  $9, $0, Store     # I12 L2:         ... Part A  (7 points) Describe the function of fragment I03-I07. Identify inputs and outputs. These statements dequeue an element from the FIFO Queue “Store” by loading the element pointed to by the tail ($10) into register $1 and then updating the tail pointer (in: $10, out: $1, $10). Part B  (7 points) Describe the function of fragment I08-I12. Identify inputs and outputs. These statements enqueue an element onto the FIFO Queue “Store” by storing the element ($6) at the location pointed to by the  head ($9) and then updating the head (in: $6, $9, out: $9).
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read all 5 pages?

  • Fall '08
  • Staff
  • Subroutine, Return statement, Call stack, Void type

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes