mov esi OFFSET bVal mov esi OFFSET wVal mov esi OFFSET dVal

mov esi, OFFSET bVal mov esi, OFFSET wVal mov esi, OFFSET dVal mov esi, OFFSET dVal2 ; E = 00404000h ; ESI 00404001h ; ESI = 00404003h ; ESI = 00404007h

Solution

OFFSET is an address operator.

The OFFSET operator returns the number of bytes between the label and the beginning of its segment.

if bval is stored at the location 00404000h.

OFFSET gives the address of the location of bval, and stores in esi.

each time mov esi, OFFSET variable operation is perfromed.

the variable address is stored in esi.

hence the result.

 mov esi, OFFSET bVal mov esi, OFFSET wVal mov esi, OFFSET dVal mov esi, OFFSET dVal2 ; E = 00404000h ; ESI 00404001h ; ESI = 00404003h ; ESI = 00404007h Soluti

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site