InlineASM access to protected arrays in procedures

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Dummy
Enthusiast
Enthusiast
Posts: 162
Joined: Wed Jun 09, 2004 11:10 am
Location: Germany
Contact:

InlineASM access to protected arrays in procedures

Post 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