What is the result of each of the instructions listed below
Solution
1. This instruction moves the 0xFE to DL register which is 8 bits in size. Now,DL=0xFE
2. This instruction moves the content of AL register to DH register.Now,DH=0x70
3.This instruction moves the first byte of [0x00020100+0x000F] to BX.Now contents of EBX=0x00000003
4.This instruction first add the contents of EDI and ECX and then moves the content of EBX to the memory location (addition of EDI and ECX)
After this execution memory location 0x00020112 contains 0x00000003.
5.This instruction scales the content of ECX by 4 and added this value to ESI.And then contents of AX which is 0x3170 moved to the calculated location.
6.This instruction exchage the content of CL register with the first byte of of location pointed by ESI.
After this ECX=0x00000010 and [ESI]=02000800.
7.This is zero extended instruction.This instruction moves the first 16 bit of [0x00020110+0x00000002] location to EAX.Now EAX contains 0x00000000
8.This instruction moves the contents of[0x00020110+0xFFFFFFFA] to DX.
9.LEA is load effective address. This instruction stores the actual memory address [0x00020100+0x00000001+0x00000017] to the ECX
10.This is sign extended instruction. This instruction moves the first byte of location 0x00020104 to the EBX. Now EBX=0x00000010
