Lets say i obtain a pointer to a BITMAP structure and want to retrieve some data...say the width from it. Do i put the pointer in ebx? Its type is long and so is the data in the structure.

is it mov eax, + whatever

my biggest problem seems to be the proper syntax
Posted on 2001-07-20 19:01:14 by titan

If you have an address in a register, to get to a specific offset from the start address, just ADD the offset to it.

mov ebx, address_of_item
add ebx, offset_from_start


mov ebx, address_of_item
mov ecx, offset_from_start
mov eax, [ebx+ecx]

Either will do the job.


Posted on 2001-07-20 19:49:45 by hutch--
I had a discussion on the In's and Out's of Structures a few months back. It was such a good discussion that i decided to copy it and place it in my web-page under discussions:

NaN's Web Site


The actuall Discussion here....

Posted on 2001-07-20 20:03:13 by NaN