Problem 95 solution pg 457 this problem requires

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: resses are therefore 0x800038 and 0x800034. C. Starting with the original value of 0x800040, line 2 decremented the stack pointer by 4. Line 4 decremented it by 24, and line 5 decremented it by 4. The three pushes decremented it by 12, giving an overall change of 44. Thus, at line 11 %esp equals 0x800014. D. The stack frame has the following structure and contents: +----------+ | 0x800060 | +----------+ | 0x53 | +----------+ | 0x46 | +----------+ | | +----------+ | | +----------+ | | +----------+ | | +----------+ | | +----------+ | 0x800038 | +----------+ | 0x800034 | +----------+ | 0x300070 | +----------+ 0x80003C 0x800038 0x800034 0x800030 0x80002C 0x800028 0x800024 0x800020 0x80001C 0x800018 0x800014 <-- %ebp (x) (y) <-- %esp E. Byte addresses 0x800020 through 0x800033 are unused. 708 Problem 3.17 Solution: [Pg. 143] APPENDIX B. SOLUTIONS TO PRACTICE PROBLEMS This exercise tests your understanding of data sizes and array indexing. Observe that a pointer of any kind is four bytes long. The GCC implementation of long double uses 12 bytes to store each...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online