Related Projects > NASMX

NASMX questions

(1/1)

rdtsc:
Downloaded NASMX , it is really cool, but i have 1 question

Is it really necessary to include the whole  nested structure definition in parent structure? Example:

--- Code: ---NASMX_STRUC S2, coord
NASMX_RESERVE x, dword, 1
NASMX_RESERVE y, dword, 1
NASMX_ENDSTRUC

NASMX_STRUC S1
NASMX_RESERVE, time,dword,1
NASMX_STRUC S2, coord
NASMX_RESERVE x, dword, 1
NASMX_RESERVE y, dword, 1
NASMX_ENDSTRUC
NASMX_ENDSTRUC

--- End code ---

Is it possible (or may be will be possible in fututre?) to do it without full including (as in C) ? Example:

--- Quote ---struct s2{
  int x;
  int y;
};

struct s1 {
    int time;
    struct s2 coord;
};

--- End quote ---

Rob Neff:
That is a good suggestion.  It would require checking for a predefined struct name, remembering the names of each of the pre-defined structure elements, then iterating through the list and defining offsets for the current struct.  The include headers would have to change to use it, but it sounds workable...

Navigation

[0] Message Index

Go to full version