Practise_Exam_2.pdf - Practice Exam 2 November 9 2019 1(a If register �x holds a pointer to an integer then executing the cmd p/x $eax in gdb prints out

Practise_Exam_2.pdf - Practice Exam 2 November 9 2019 1(a...

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

Practice Exam 2 November 9, 2019 1. (a) If register %eax holds a pointer to an integer, then executing the cmd p/x $eax in gdb prints out the address of the integer. (b) The pushfl places the condition codes into the %ebx register. (c) xorl %eax,%eax sets %eax to 1 if %ebx is odd. (d) The %ebp register points to the current stack frame. (e) Assembly programmer’s view of memory is equivalent to a linear array of bytes in C. (f) %ah register is the higher 8-bits of %eax register. (g) Are the following operations legal: mov 0x80(%eax,%ebx,%ecx),%edx. 2. Assume the following values are stored at the indicated memory addresses and registers. Address Value 0x100 0xFF 0x104 0xAB 0x108 0x13 0x10C 0x11 Register Value %eax 0x100 %ecx 0x1 %edx 0x3 Fill in the following table showing the effects of the following instructions, in terms of both the register or memory location that will be updated and the resulting value. If the destination is a memory location, provide the effective address. If the destination is a register, provide the register name.
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
  • Incl, Leal, sscanf

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture