Question

Assembly



Please answer the following above, compile and single step through
the program, writing down the value of the destination for each
instruction.
1. Using Visual Studio on the system, create a project using the code given below unsigned char short int int gArray 0x09, 0xFA, 0x5A, 0x18, 0x48, 0xAC, 0xD4, 0x71 ; cAr rays 1 [ ] = { 0:09, 0xfa, Ox5A, Ox18, 0x48, OxAC, OxD4, 0x71 }; gArray! [ ] = { Ox09, OxFA, Ox5A, Ox18, 0x48, OxAC, OxD4, 0x71 }; int test ) asm mov al, gArray lea esi, gArray mov dl, byte ptr [esi] mov eax, dword ptr [esi+2] mov al,gArray[5] esir eax *1 hop mov ax, gArraySI lea esi, gArraysI mov dl, byte ptr [esi] mov edx, dword ptr [esi+ mov ax,gArraySI[5] esi= edx- *2 hop mov eax, gArrayI lea esi, gArrayI mov dl, byte ptr [esi] mov eax, dword ptr [esi+2] mov eax, gArrayll eax= esi= eax *3 nop return 0 int main( int argc, char *argv) test )
1. Using Visual Studio on the system, create a project using the code given below unsigned char short int int gArray 0x09, 0xFA, 0x5A, 0x18, 0x48, 0xAC, 0xD4, 0x71 ; cAr rays 1 [ ] = { 0:09, 0xfa, Ox5A, Ox18, 0x48, OxAC, OxD4, 0x71 }; gArray! [ ] = { Ox09, OxFA, Ox5A, Ox18, 0x48, OxAC, OxD4, 0x71 }; int test ) asm mov al, gArray lea esi, gArray mov dl, byte ptr [esi] mov eax, dword ptr [esi+2] mov al,gArray[5] esir eax *1 hop mov ax, gArraySI lea esi, gArraysI mov dl, byte ptr [esi] mov edx, dword ptr [esi+ mov ax,gArraySI[5] esi= edx- *2 hop mov eax, gArrayI lea esi, gArrayI mov dl, byte ptr [esi] mov eax, dword ptr [esi+2] mov eax, gArrayll eax= esi= eax *3 nop return 0 int main( int argc, char *argv) test )


cover image
Seen 1 years ago bySmith Jones

1 Answer