This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Signature _______________________ Name_________________ cs30x____ Student ID ______________________ Score: Quiz 2 CSE 30 Spring 2010 #1. Assume a signed 32-bit int variable x has some non-zero value stored in it. Write 5 different single statements (loops and function calls are not allowed) in C to set the value in variable x to zero. __________________________ __________________________ __________________________ __________________________ __________________________ #2. What is the value ( in hex ) of %o1 after each set of instructions: a) set 0xABCD1234, %o1 sra %o1, 20, %o1 Value in %o1 at this point is 0x ______________________________________________ b) set 0xABCD1234, %o1 set 0x1234ABCD, %o2 xor %o1, %o2, %o1 Value in %o1 at this point is 0x ______________________________________________ c) set 0xABCD1234, %o1 set 0x1234ABCD, %o2 and %o1, %o2, %o1 Value in %o1 at this point is 0x ______________________________________________ #3. What gdb command should you use to print the contents of a memory location where the address of the...
View Full Document
This note was uploaded on 08/31/2011 for the course CSE 30 taught by Professor Ord during the Fall '08 term at UCSD.
- Fall '08