Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Oracle Solaris 11 System Administration

Authors: Bill Calkins

1st Edition

0133007170, 9780133007176

More Books

Students also viewed these Databases questions

Question

WHIC OF THE FOLLOWING IS A BENEFIT OF MVC ?

Answered: 1 week ago