News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Headers 2.0

Started by donkey, March 30, 2009, 02:14:02 AM

Previous topic - Next topic

donkey

Hi E^cube,

Well, one of the original goals, way back when wjr and I were discussing this project was that I separate the defines to allow for reduced assembly times and less stress on GoAsm's symbol engine. Through switches and not loading every definition it allows us to have any number of definitions without having too adverse an effect on the size of symbol table GoAsm has to build and manage. In reality the standard set of definitions as they stand now are only a few MBs but I am hoping that as more users are attracted they may begin to translate other headers as they need them and grow the project. The first 300 or so I did pretty much alone, but there are around 1200 header files representing some 60MB (C++, probably around 15MB for GoAsm) in all. Though I have no objection to an "includeall.h" type file, I think that windows.h should remain as is for a stripped down set of headers that follow the docs at MSDN. One feature of the headers I was shooting for was that if you read an entry at MSDN and it says include Windows.h then that is all you have to do, if it says (as is the case for say TASKDIALOGCONFIG) to include commctrl.h then that's what you do, simple and directly in step with the documentation we all use.

For the most part the design goals of the header project were set up in discussions before the first header was translated, some of them may seem a bit irrelevant now that the project is more mature and I am always willing to listen to suggestions or at least explain the rationale behind the way it is structured. The idea of a specific set of goals was something that I wanted from the get go and Wayne (wjr) and I discussed it at length, this was to avoid what I perceived as a mess in windows.inc for MASM32 and for GoAsm (which was translated from Hutch's file).

I will make an includeall.h file for the next release, it will replace windows.h for those who want to avoid tracking down specific header files. There are some compatibility issues that have to be worked out but they are minor and shouldn't require much head scratching.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ecube

sounds great, yeah I like the modulation of how you did things, do you think it would be easier/possible to add a switch in the windows.h that allows including all? Or even really just include the most common? vs's a whole new .h

#DEFINE INCLUDEALL

#DEFINE INCLUDECOMMON

or something of that nature?

donkey

Hi E^cube,

Yup, I like your idea better, I will implement it in the update. For INCLUDEALL it's a no brainer, for INCLUDECOMMON we will need a consensus on what should be included.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ecube

Hello,
well user32,kernel32,advapi32 are used in most programs, but perhaps ws2_32,msvcrt,wininet can be added, or not, you're right in it being somewhat tricky to decide what goes in that or not, if you don't want to add that one or want to add different ones thats fine, but the includeall would be fantastic!

donkey

INCLUDEALL is almost complete, lots of typing to eliminate duplicate files but it will be done tomorrow. Actually it helped find 3 errors in some pretty obscure files that I would never have caught otherwise except by testing in such a high load environment so it has already paid for itself :)
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ecube

Outstanding! looking forward to it :) i've been working on a nice GoASM SDK, That includes everything I wish masm32 did,along with your great headers, etc... am releasing tommorow and should really highlight the power that is GoASM. I'm converting the masm32.inc right now my approach is automated but is going to be something like

MASM32 = C:\GoAsm\Lib\masm32.lib
szLower = MASM32:szLower

so they can just invoke szLower after including the header. what do you think?

donkey

Great idea E^cube,

There are however some functions which I have problems with in MASM32, mostly those that use a spinlock for checking whether an application has terminated as opposed to the wait functions. I have had this debate with Hutch numerous times and have pretty much given up arguing about it. I think for now a patch allowing GoAsm user to access the functions in MASM32 is fine, however I think you should look into building a separate library that contains better written and more robust functions. I have not looked into my libs for quite a long time, if you like you can use them as a starting point, they would have to be converted to work with the headers and brought up to date but the functions are robust and more closely follow the caveats at Microsoft.

In the final analysis GoAsm code for GoAsm users is always the best approach.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ecube

Yeah I didn't see a point in converting the lib right now as it's for 32bit only, and is easy to use if you just precompile. I know when I and others start converting it to GoASM the code should be both 32bit and 64bit compadible(which will be pretty much transparent using some of the neat stuff from your headers) but that'll still take time as they're quite a bit of functions. Right now I think getting this SDK out is more important as it gives newcomers a great place to start, like they have with MASM32.You did a fantastic job with your headers, Jeremy did a fantastic job at his documentation, and his tools ofcourse but his example are kinda lacking, and aren't as "pretty" nor complete as one can hope for. Nor is all of his or your great up to date work combined anywhere besides in a minalmist way. This is where I come in :)

and thanks for your permission in being able to include your libraries code. I used some of your other code and macros in examples aswell(full credit ofcourse)

donkey

#23
New upload (GOASMHDRVER = 0x020004)

Still having some issues with INCLUDEALL but there were a few critical issues that needed fixing so there is an interim upload. I ham having problems with the #dynamiclinkfile directive when using the INCLUDEALL switch, I keep getting errors indicating that the filenames are not good but they definitely are (kernel32.dll is obviously alright). I am trying to find out the circumstances under which it occurs in order to report the bug to Jeremy but it is not consistent. However, there are many corrections to the headers and I have included the http headers though I am still working on the supporting files the headers were already incorporated into my own so rather than remove them I decided to leave them in, the ones I am working on are not included in the archive.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

ecube

Very nice,
i've been swamped at work, but if I don't get the preprocessor code done within next few days i'll go ahead and reupload the SDK with your new headers and some new examples i've written. If you get the includeall working after Jeremy takes a look at the DLL's that'd be fantastic. Users can just add that switch and not worry about non-standard includes, GoASM is so incredibly fast I don't forsee any noticeable performance hit you suggested from the extra parsing/interpreting. I was thinking of adding some support to the preprocessor that are based off your header switches, so for instant if the preprocessor sees #Define WIN64 in the source it'll automatically have GoASM assemble as 64bit. #Define Console or similar assemble as console etc...unless otherwise specified in the build.bat passed options. This way users can use the same build.bat for everything and have it assemble correctly. But that's just a minor thing.

donkey

#25
Uploaded headers version 0x020006

A few minor corrections, added a couple of header files. Nothing really major in this release just thought I would make sure that everything was up to date since Jeremy and E^cube also had updates. The only major difference is that the non-standard headers must now be explicitly included, previous versions required that they be explicitly excluded. The NODONKEY, NOZLIB and NORADASM switches are deprecated and replaced by INC_DONKEY, INC_ZLIB and INC_RADASM respectively, there may be a few cases where code needs to be modified to accommodate the change. This change reduces the standard include directives to :

#DEFINE LINKFILES
#DEFINE WIN32_LEAN_AND_MEAN
#include "WINDOWS.H"

Which will assemble and run most Windows applications. The INCLUDEALL switch should now be functional with the new version of GoAsm. The example files on my website have had their headers modified to reflect the change, no point in downloading them just for that as the older switches have no effect now anyway and they don't use the new ones. I have added the zLibstat.lib file to the headers since I think the header file I have for it is version specific and I want to make sure the lib used is the one it has been tested for. If anyone has a copy of zilbstat 1.2.3 I would appreciate a copy the best I can find is 1.2.1.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

Mark Jones

Thanks Edgar, the effort is appreciated.
"To deny our impulses... foolish; to revel in them, chaos." MCJ 2003.08

donkey

GOASMHDRVER = 0x020008

Ramon Sala pointed out that the mmsystem.h file did not switch some structures to unicode when the unicode switch was used, this is fixed in the current version.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

UtillMasm


travism

I just got the 2.0 headers since ive been using the older version, but am I not supposet o use IncludeA anymore for the windows.inc? And not include windows.h? Because if I try to use windows.h it errors everytime saying error including baseCOM.h and some line on 75 of winnt.h

Now I tried just using this


#DEFINE LINKFILES
#DEFINE WIN32_LEAN_AND_MEAN
#include "WINDOWS.H"


and now goasm gives me a error saying "Error no data or code in the assembly file found" or something along those lines.