PDA

View Full Version : about NASM


0x400
11-11-2000, 04:44 AM
hi all,

my question is:
is there any options in NASM allowing to define start address when compiling raw 32 bit code (no segments)?

i use NASM as a code generator for snippets for win32 executables (and dlls) and everything goes on perfect, BUT in order to make JMPs and CALLs with correct addresses i must use TIMES directive e. g. [TIMES 0040xxxx 0x00] which makes NASM to generate huge (about 4 Mb) output file, from which i use only couple hundert bytes - it takes some time to do this.
maybe i should reverse NASM add this feature? :P

thnx

The Owl
11-11-2000, 07:03 AM
if i understood your question properly, then ORG is your friend. and the manual as usual ;-).

0x400
11-11-2000, 08:15 AM
i have tried it - ORG is not a friend ov mine, coz it works only with 2 byte values (at least i could not get it working w 4 byte values)

The Owl
11-11-2000, 12:24 PM
Quote:
i have tried it - ORG is not a friend ov mine, coz it works only with 2 byte values (at least i could not get it working w 4 byte values)


well, meet BITS too ;-).

0x400
11-12-2000, 03:33 AM
me lame - i put that ORG before [BITS 32], but i should put after

thnx