assembly - How to detect architecture in NASM at compile time to have one source code for both x64 and x86? -


i looking preprocessor functionality in nasm allow having 1 source code both x86 , x64 architectures.

i mean in vein of ifdef some_constant. c preprocessor uses if wants detect if it's compiled on windows or linux.

edit

i know nasm flags. use them. want have same source code , expect preprocessor handle correctly based on flags. i'd use ifdef ... else stack operations , one, having core code same both architectures.

nasm cannot detect architecture, can use output format (command line option: -felf,-felf32,-felf64,-fwin32 etc.) needs. read friendly manual.


Comments

Popular posts from this blog

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

.htaccess - htaccess convert request to clean url and add slash at the end of the url -