Accesing viriables in objects using ASM

Quote
e...@iist.unu.edu (Erwin Paguio) writes:
>Hello.  Could you please help me on this problem.
>Let's say I have a declaration with some code like this:
>Type MyObj = Object
>       MyVar : Byte;
>       MyPtr : Pointer;
>       < other vars >
>       Constructor Init(Value : Byte);
>       Destructor Done;
>       Procedure MyProc;
>       < other methods here >
>     end;
>Procedure MyObj.MyProc;Assembler;
>ASM
>   LES  DI, Self.MyPtr
>   < other code >
>End;
>How come, the instruction LES DI, Self.MyPtr doesn't give the correct
>result.  How will I be able to get the pointer stored in MyPtr into
>ES:DI?
>Thanks for any help...

Should be:
  LES DI,Self
  LES DI,ES:[DI].MyObj.MyPtr
(Not tested, but should work.)
Perhaps you can leave out the "MyObj." - dont't know at the moment.

Note: Self is an implicit parameter, so you have to load it into the
registers before you can use ist.

Frank