I want start to make a win32 console program. The problem is that I don?t know how to do this with NASM. The next problem is, need I also a main loop like in win32 programes? Or can I start like in a DOS program?

Thanx for your help!
Posted on 2003-05-13 14:08:36 by FlashBurn
Look in the FAQ forum, there are several examples.
Posted on 2003-05-13 14:26:12 by bazik
Thnx, but I still want to do this with NASM! So I need the libs and the include files in NASM syntax. But where can I get this? I had a link but its gone :(
Posted on 2003-05-13 14:41:23 by FlashBurn
Check out the NASM documentation for how to assemble to an 32bit obj format.

Example source file:

%include "win.inc" ;declaration of windows constants
;there are a number of these available through NASM

extern FunctionName
import FunctionName DLLNAME ; use extern and import to import every
; system call you'll need

SECTION CODE USE32 CLASS= CODE
;this line set up your code section
..start: ;this will is you program entry point.

SECTION DATA USE32 CLASS = DATA
;data section

SECTION BSS USES32 CLASS = DATE
;unitialized data section



the command line,
nasm -f obj source.asm,
wherein source.asm is your source file will produce an .obj file that
can be linked to a PE file. Check your linker documentation on how to indicate
a console program.
Posted on 2003-05-14 01:37:23 by Canite
Main loop? Rather main procedure.
Posted on 2003-05-14 03:04:38 by Vortex
Yes, the problem will not be the program itself, but from where get I the inc files and the lib files?
Posted on 2003-05-14 12:51:35 by FlashBurn