NASM Forum > Summer of Code Ideas
Extending struc/istruc
Rob Neff:
--- Quote from: cm on October 06, 2010, 02:59:00 PM ---Ok.. so basically the syntax you proposed can be done with macros now (or so I would think). This could go into NASM's default macros, or it could be made available in a %use package. "Built-in support" sounds like you want to code it into the source, which isn't necessary for this.
--- End quote ---
The main reason for my proposal of including nested structs/unions directly into nasm source was two-fold:
1) To make nasm itself more programmer friendly such that macros wouldn't be needed to enable this capability if already built in;
2) Compilation speed.
As an example: currently, %include windows.inc brings the preprocessor to a crawl as most Windows structures have been defined within that one file. Not making all those macro calls (at least 4 per struc) and associated defines/equates would reduce compile time considerably. Another avenue of increasing speed is splitting out all those defines and structure definitions into a format more familiar with the SDK as separate header/include files. This is a monumental task but eventually doable. I've begun work on a program to help with converting SDK headers to nasm includes - h2incn ( a similar name/project previously attempted by another developer) but have been rather pre-occupied with other NASMX issues lately. If you're interested in helping with header conversions PM me - I'll glady accept any help I can get ;)
nasm32:
[120 Day BUMP, mov eax, dword [Sorry_About_That]]
I absolutely agree that a full blown struc, union should be implemented into nasm. It is cruicial. Let me explain why in few points:
1a. Implementing these basic things with the help of nasm macros is misuse of the macro system
1b. It is misuse because the amount of macroinstructions it takes, absolutely overloads the macro system
1c. If implemented directly into nasm, would produce perhaps a quarter of that (Much easier in code)
2. People should be using the extremely fine macro system inside nasm for other purposes than writing basic elements like structures.
3. The basic rule of any macro system. If it takes too much to macro'it, put it in code.
Navigation
[0] Message Index
[*] Previous page
Go to full version