Dst array col 0 col 1 row 0 m h row 1 m h src array

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: 0) Yes, since multiplication is monotonic. H. (d+f)-d == f No, for example when d is ·½ and f is ½, the left hand side will be Æ Æ , while the right hand side will be ½. 700 APPENDIX B. SOLUTIONS TO PRACTICE PROBLEMS B.3 Machine Level Representation of C Programs Problem 3.1 Solution: [Pg. 101] This exercise gives you practice with the different operand forms. Operand %eax 0x104 $0x108 (%eax) 4(%eax) 9(%eax,%ecx) 260(%ecx,%edx) 0xFC(,%ecx,4) (%eax,%edx,4) Problem 3.2 Solution: [Pg. 104] Reverse engineering is a good way to understand systems. In this case, we want to reverse the effect of the C compiler to determine what C code gave rise to this assembly code. The best way is to run a “simulation,” starting with values x, y, and z at the locations designated by pointers xp, yp, and zp, respectively. We would then get the following behavior: 1 2 3 4 5 6 7 8 9 Value 0x100 0xAB 0x108 0xFF 0xAB 0x11 0x13 0xFF 0x11 Comment Register Absolute address Immediate Address 0x100 Address 0x104 Addres...
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