Read/review the following in the current folder: A Crash Course in x86 Disassemb
ID: 3778110 • Letter: R
Question
Read/review the following in the current folder: A Crash Course in x86 Disassembly Data Transfers, Addressing, and Arithmetic Then complete the following exercises: Explain what each of the following does: mov eax, ebx mov eax, 0x42 mov eax, [0x4037C4] mov eax. [ebx] mov eax, [ebx+esi*4] Assume that registers EAX and EBX contains the values in Figure 1 and memory values at the given addresses are as shown. Explain what the command mov eax, [ebx+C] does. Explain what the command lea eax, [ebx+C] does. Assume registers EAX and EBX are as they are in 2 and EDX and ECX are 0x00A30040 and 0x00000001. State which register each respective result gets stored and the value. sub eax, 0x10 add eax, ebx inc edxExplanation / Answer
1. The mov instruction will copies the value from second operand into the location referred by its first operand.
(a) mov eax, ebx
Ans: It will copy the value of ebx into eax.
(b) mov eax, 0x42
Ans: It will copy the value 0x42 into eax.
(c) mov eax, [0x4037C4]
Ans: It will copies the 4 bytes at the memory location 0x4037C4 into eax register.
(d) mov eax, [ebx]
Ans: It will move 4 bytes in memory at the address contained in ebx into eax.
(e) mov eax, [ebx+esi*4]
Ans: It will move 4 bytes of data at address ebx+esi*4 into eax.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.