MidtermIII216Summer14 - University of Maryland College Park Dept of Computer Science CMSC216 Summer 2014 Midterm III Last Name(PRINT First Name(PRINT

MidtermIII216Summer14 - University of Maryland College Park...

This preview shows page 1 - 4 out of 10 pages.

1 University of Maryland College Park Dept of Computer Science CMSC216 Summer 2014 Midterm III Last Name (PRINT): _____________________________________________________ First Name (PRINT): _____________________________________________________ University Directory ID (e.g., umcpturtle)_____________________________________ I pledge on my honor that I have not given or received any unauthorized assistance on this examination. Your signature: _____________________________________________________________ Instructions Assembly and process cheat sheets can be found at the end of the exam. This exam is a closed-book and closed-notes exam. Total point value is 200 points. The exam is a 50 minutes exam. Please use a pencil to complete the exam. WRITE NEATLY. You don’t need to use meaningful variable names; however, we expect good indentation. Grader Use Only #1 Problem 1 (Miscellaneous) (35) #2 Problem 2 (Process Control) (55) #3 Problem 3 (Assembly Programming) (110) Total Total (200) (200)
Image of page 1
2
Image of page 2
3 Problem #1, Miscellaneous (35 pts) For the following Assembly questions assume the stack frame organization discussed in class, and that the stack pointer has been initialized correctly. 1.(4 pts) Which of the following are INVALID instructions in Assembly? You can assume datais a label. Circle only the invalid ones. a.rrmovl data, %ebp b.irmovl %eax, 10 c.mrmovl data, %ecx d.wrint 10 2.(4 pts) Complete the following irmovl statement so we can have 3local variables. irmovl ,%eax subl %eax ,%esp 3.(4 pts) Complete the following statement so we can copy the value of %eaxto the second local variable (assuming we have two or more local variables). rmmovl %eax, 4.(7 pts) Provide assembly code that implements the functionality associated with popl %eax5. .
Image of page 3
Image of page 4

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture