Question
Can someone tell me what mov ebx,[edi+edx] does in this program and if there is another to do what it does? In debugger it advances
Can someone tell me what "mov ebx,[edi+edx]" does in this program and if there is another to do what it does? In debugger it advances EIP from 004036E5 to 004036E7 NO other registers are effected. I got this to work in my program by trial and error but would like to know how? (Assembly x86 MASM)
mov ecx,LENGTHOF arrayQ/4 ;// ecx counter set to 3
mov edi,OFFSET arrayQ ;// first element of arrayQ moved to edi
L3: ;// destination label for loop L3
sub edx,TYPE arrayQ ;// decrement edx by TYPE of arrayQ which is DWORD=4
mov eax,[edi] ;// moves element stored in eax into dereference edi
mov ebx,[edi+edx] ;//
mov [edi],ebx ;//
add edi,edx ;//
mov [edi],eax ;//
sub edi,edx ;//
add edi,TYPE arrayQ ;//
sub edx,TYPE arrayQ ;//
Loop L3 ;//
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started