assign2 - 00B27FC4:5A03D94E B17E532C:0076C89A e Are segment...

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

View Full Document Right Arrow Icon
CSE 361S Intro to Systems Software Assignment #2 Due: Thursday, Oct. 8, 2009. 1. B&O p. 100: problem 2.43. Contemplate the ! operator carefully and you will have no trouble with this problem. 2. B&O p. 102: problem 2.50. 3. B&O p. 103: problem 2.51. 4. B&O p. 231: problem 3.31. 5. Memory addressing. a. What is the benefit of using a segment:offset pair to represent a memory address, instead of just using the absolute address? b. When fetching instructions from memory, from where is the segment address retrieved (assuming protected mode, 32-bit addressing)? c. When accessing operands in memory, from where is the segment address retrieved (again assuming protected mode, 32-bit addressing)? d. What are the absolute addresses for the following segment:offset pairs?
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 00B27FC4:5A03D94E B17E532C:0076C89A e. Are segment and offset addresses uniquely determined by an absolute address? If so, give the unique segment and offset address for the absolute address 0x9a207b4e8 . Otherwise, give two segment and offset address pairs for that address. 6. Loops. a. How many iterations will the following C code execute when start is 26? When start is 14? When start is 10? for (i = start; i > 10; i--) { /* additional code here . .. */ } b. How many iterations will the following assembly code execute when %eax is 16? When %eax is 8? When %eax is 0? (Warning: trick question!) loop_label: cmpl $0, %eax jne loop_exit /* additional code here . .. */ subl $1, %eax jmp loop_label loop_exit:...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online