Frankenstella, a PHP compiler
Saturday, June 05, 2004
 
Creating a Win32 .obj file using NASM
1. Download NASM Windows binaries and the documentation.
2. Extract. Should end up with two files, nasmw.exe and ndisasmw.exe.
3. Put nasmw.exe in system directory.
4. Make a new Win32 Console Application project in Visual C++.
5. Put the files first.asm, asm_io.inc, asm_io.obj and driver.c into the project directory.
6. Add first.asm, driver.c, and asm_io.obj to your project.
7. In the file pane of Visual C++, right click on the first.asm file, and choose settings...
8. Bring up the Custom Build pane.
9. In the Commands window type nasmw.exe -f win32 -l first.lst first.asm
10.In the Outputs window type first.obj

* -f win32 command line option to nasmw.exe tells NASM to create a WIN32 .obj file from the .asm file
* -l first.lst command line option to nasmw.exe tells NASM to create a listing file as it is assembling -> first.lst for debugging.
Comments: Post a Comment

<< Home

Powered by Blogger