Related Projects > NASMX

question about nasmx inc files

(1/1)

nullptr:
Hello,

I'm a bit confused. I'm not very experienced assembly coder. I have downloaded
nasmx and complied some samples from demos folder. They are working fine, but e.g.
demo6.asm is 64 bit and uses inc file form ..\inc\win32 directory. Are 32 bit inc
files matching to 64 bit apps?

And next question:
From where GoLink.exe takes kernel32.lib or user32.lib? Other linkers e.g.
link.exe requries to specify locations of them by includelib directive in file or
by cmd libpath, but they are provided with masm package.

Any ideas?
thanks in advance.

Rob Neff:

--- Quote from: nullptr on October 10, 2013, 12:21:00 PM ---Hello,

I'm a bit confused. I'm not very experienced assembly coder. I have downloaded
nasmx and complied some samples from demos folder. They are working fine, but e.g.
demo6.asm is 64 bit and uses inc file form ..\inc\win32 directory. Are 32 bit inc
files matching to 64 bit apps?

--- End quote ---

NASMX by design enables 32-bit and 64-bit programming for a multitude of operating systems.  Rather than maintaining two separate include files we detect the bit-ness specified on the command line via the "nasm -f" switch and create an appropriate environment.  The Win32 subdirectory name is simply a relic of years gone by and should not be mis-interpreted as 32-bit Windows only.


--- Quote from: nullptr on October 10, 2013, 12:21:00 PM ---And next question:
From where GoLink.exe takes kernel32.lib or user32.lib? Other linkers e.g.
link.exe requries to specify locations of them by includelib directive in file or
by cmd libpath, but they are provided with masm package.

Any ideas?
thanks in advance.

--- End quote ---

GoLink doesn't need .lib files specified - only the .dll name.  It performs it's own internal lookup logic to match the name of the function being called in your source file to the appropriately named function exported from one of the .dll files provided on the command line.  If you look in the NASMX demos and edit a Makefile or .bat file you will see the command syntax used when calling GoLink.  You can then copy the file to your own project subdirectory and edit to suit your needs.

Check out the author's website for more detailed information: http://www.godevtool.com/

nullptr:
Thanks for reply. I saw that batch files. That's why i was asking. I have more questions:

Is there an inc file which contains protos of WinAPIs procs or C procs? I don't want to write it again every time i start a new project.

Does your invoke works same as masm?

and how to use sturcts defined inside e.g. windows.inc?

Rob Neff:

--- Quote from: nullptr on October 10, 2013, 09:20:27 PM ---Is there an inc file which contains protos of WinAPIs procs or C procs? I don't want to write it again every time i start a new project.

--- End quote ---

Yep.  Look in the NASMX inc/win32 directory.  The default is windows.inc but that pulls in a ton of defines and stuff which your program probably won't use and make assembling source files much slower.  There are a lot of prototypes already done for you.  It is by no means 100% complete but they will go a very far way for your development.


--- Quote from: nullptr on October 10, 2013, 09:20:27 PM ---Does your invoke works same as masm?

--- End quote ---

The concepts are very similar but obviously specific to nasm's capabilities and syntax.


--- Quote from: nullptr on October 10, 2013, 09:20:27 PM ---and how to use sturcts defined inside e.g. windows.inc?

--- End quote ---

Keep on checking out those demos!  There are a few that show how to use the structs.  Also, you can examine many of the inc/win32 include files to see how it's implemented behind-the-scenes.

nullptr:
Thanks for help and for providing nasmx.

Navigation

[0] Message Index

Go to full version