Homework3_SOL

# Homework3_SOL - 0x104 0x37ABDF03 0x108 0x39AB660A Please...

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

Homework 3 1. Memory and Register . We have the following values in the corresponding memory address and registers Address Value 0X104 0x4A 0x108 0x1F3C 0x10C 0x3954 0x130 0x73 0x148 0x80372633 Fill in the blanks with the right value: Operand Value %edx 0x4 0x108 0x1F3C (%eax) 0x4A 48(%ecx) 0x73 (%eax,%edx) 0x1F3C (%ecx,%edx,2) 0x1F3C 0x4(%ecx,%ebx,8) 0x3954 \$0x783 0x783 2. Move Instruction. We have the following values in the corresponding memory addresses and registers. Register Value %eax 0X104 %ecx 0X100 %edx 0X4 %ebx 0x1

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 0x104 0x37ABDF03 0x108 0x39AB660A Please use no more than 4 move instructions to change their value to the following. Address Value 0X100 0x4A 0x104 0x37ABDF03 0x108 0X123456FE In the move instructions you used, you can only use the following addressing mode: E a , (E a ),(E b , E i ), (, E i , s), (E b , E i , s). Solution: movl %ecx, (%edx, %ebx, 2) movl (%edx, %ebx), %eax movsbl %cl, %ebx movb %ah, %cl Register Value %eax 0X07 %ebx 0X04 %ecx 0X123456FE %edx 0x100 Register Value %eax 0x37ABDF03 %ebx 0XFFFFFFFE %ecx 0X123456DF %edx 0x100...
View Full Document

## This note was uploaded on 10/19/2011 for the course CS 000 taught by Professor Jing during the Fall '10 term at Fudan University.

### Page1 / 2

Homework3_SOL - 0x104 0x37ABDF03 0x108 0x39AB660A Please...

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

View Full Document
Ask a homework question - tutors are online