Lab 4: Addressing Modes
Overview
The purpose of this lab is to help you get familiar at identifying some of the commonly used operand addressing modes.
Exercise
For this exercise assume the following:
- Memory address
0x1337has the value42 - The value in the
EBPregister is200 - The value in the
ECXregister is250 - Memory address
0x02C0(704) has the value0x31337
Question 1
Identify the address modes used, and the value that ends up in EAX after the
following instruction has been executed:
mov eax, 0xEBFE
Answer
The addressing modes are register and immediate, and the value of EAX
after the instruction is executed is 0xEBFE.
Question 2
Identify the address modes used, and the value that ends up in EAX after the
following instruction has been executed:
mov eax, [0x1337]
Answer
The address modes used are register and memory, and the value in EAX
after the instruction has executed is 42.
Question 3
Identify the address modes used, and the value that ends up in EAX after the
following instruction has been executed:
mov eax, [ebp+ecx*2+4]
Answer
The addressing modes used are register and memory, and the value in EAX
after the instruction has executed is 0x31337.