Hi, I need to be able to access structure members in inline ASM without using numeric memory offsets as it is a pain in the (you know what) to be look at the code a little later and figure out what is going on and I have to change the offsets whenever I make changes to the structure. I am using MSVC++ 6.0, I was wondering if there was a way to do it like MASM for example:




assume esi:PTR SN76489

mov eax,[esi].period


assume esi:NOTHING




^^ IS there a way that I can do the above in VC++ 6.0?
The structure *IS* defined within the C source code.
Posted on 2004-02-18 17:56:52 by x86asm
try:
__asm

{
mov eax, (SN76489 PTR [esi]).period
...
}
I think assume doesnt work.
Posted on 2004-02-18 19:59:49 by arkane

try:
__asm

{
mov eax, (SN76489 PTR [esi]).period
...
}
I think assume doesnt work.

IT didnt work :'(
Posted on 2004-02-19 15:01:49 by x86asm


WNDCLASSEX wc;

__asm
{
mov ecx, wc.cbSize
lea ebx,wc
mov eax,[ebx]WNDCLASSEX.cbSize
}

notice that there's no dot after ]
Posted on 2004-02-19 15:16:51 by Ultrano
mov ecx, WNDCLASSEX.z :alright:
Posted on 2004-02-19 15:39:35 by arkane
ah and that (except if I change "z" to stg else) works :) but I didn't see it in my MSDN :confused:
Posted on 2004-02-19 16:11:45 by Ultrano
just a sample :grin:
Posted on 2004-02-19 16:39:17 by arkane
Thanks, it worked, sweet! :D
Posted on 2004-02-20 20:44:22 by x86asm