Hw 3 sol

Hw 3 sol - EEL 3801 - Computer Organization Spring, 2010 HW...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CHECK XLARGER MOV [EDX+ECX ] ,AL Store X byte. CHECK LOOP START Check if done. EEL 3801 - Computer Organization Spring, 2010 HW #3 Solution 3.51 Initial memory contents are: [1000] = 1 [1004] = 2 [1008] = 3 [1012] = 4 [1016] = 5 [1020] = 6 (a) [EBX + ESI*4 + 8] = 1016 EAX 10 + 5 = 15 (b) The values 20 and 30 are pushed onto the processor stack, and then 30 is popped into EAX and 20 is popped into EBX. The Subtract instruction then performs 30 20, and places the result of 10 into EAX. (c) The address value 1008 is loaded into EAX, and then 3 is loaded into EBX. 3.54 Assume bytes are unsigned 8-bit values. MOV ECX,N ECX is list counter. LEA ESI,X ESI points to X list. SUB ESI,1 LEA EDI,Y EDI points to Y list. SUB EDI,1 LEA EDX,LARGER EDX points to LARGER list. SUB EDX,1 START: MOV AL,[ESI+ECX ] Load X byte into AL. MOV BL,[EDI+ECX ] , Load Y byte into BL. CMP
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Hw 3 sol - EEL 3801 - Computer Organization Spring, 2010 HW...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online