NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: nnnik2 on December 10, 2013, 09:17:26 PM
-
Hi
I've been wondering how do you assemble to 32 bit machine code?
I already tried bin (16 bit only) and win32 with -a option (still getting more stuff)
Yet I would like to assemble to 32 bit machine code.
Is there a better possibility than parsing the listing file?
-
"-f bin" defaults to 16-bit code. Use "bits 32" or "bits 64" in the source file to get 32- or 64-bit code out of it.
http://www.nasm.us/xdoc/2.10.09/html/nasmdoc7.html#section-7.1
The "-a" switch just skips the preprocessor (no macros), so won't help you. I'm not sure what you mean by "parsing the listing file".
Best,
Frank
-
Thanks for the India these are good news.
Parsing the listing file:
Use the -l option and extract the contents of this file.