From the graph the read throughput in the region

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: ing assembly code. 702 Problem 3.7 Solution: [Pg. 113] APPENDIX B. SOLUTIONS TO PRACTICE PROBLEMS This example requires you to think about the different comparison and set instructions. A key point to note is that by casting the value on one side of a comparison to unsigned, the comparison is performed as if both sides are unsigned, due to implicit casting. 1 2 3 4 5 6 7 8 9 10 char ctest(int a, int b, int c) { char t1 = a< b; char t2 = b < (unsigned) a; char t3 = (short) c >= (short) a; char t4 = (char) a != (char) c; char t5 = c> b; char t6 = a> 0; return t1 + t2 + t3 + t4 + t5 + t6; } Problem 3.8 Solution: [Pg. 116] This exercise requires you to examine disassembled code in detail and reason about the encodings for jump targets. It also gives you practice in hexadecimal arithmetic. A. The jbe instruction has as target 0x8048d1c · 0xda. As the original disassembled code shows, this is 0x8048cf8. 8048d1c: 8048d1e: 76 da eb 24 jbe jmp 8048cf8 8048d44 B. According to the annotation produced by the disassembler, the jump tar...
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