Page 1 of 1

InlineASM access to protected arrays in procedures

Posted: Tue Aug 29, 2006 11:01 pm
by Dummy
Protected variables and pointers are defined as p.v_* and p.p_*. But Arrays and LinkedLists are missing. Please Fred, can you add them as p.a_* and p.l_* :wink:

Code: Select all

Procedure bla()
  Protected i.l
  Protected Dim array.l(10)
  
  ; move the second (2*4) array element to Eax
  !MOV Eax, dword[p.a_array+8]
  
  ProcedureReturn
EndProcedure
For now I'm just defining them on my own but that's a bad solution that can cause bad bugs...

Code: Select all

Procedure bla()
  Protected i.l
  Protected Dim array.l(10)
  !p.a_array equ p.v_i+4
  
  ; move the second (2*4) array element to Eax
  !MOV Eax, dword[p.a_array+8]
  
  ProcedureReturn
EndProcedure