NASM - The Netwide Assembler
Related Projects => NASMX => Topic started by: rdtsc on January 25, 2011, 08:59:24 PM
-
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:
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
Is it possible (or may be will be possible in fututre?) to do it without full including (as in C) ? Example:
struct s2{
int x;
int y;
};
struct s1 {
int time;
struct s2 coord;
};
-
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...