Log in

View Full Version : about NASM


0x400
November 11th, 2000, 04:44
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
November 11th, 2000, 07:03
if i understood your question properly, then ORG is your friend. and the manual as usual ;-).

0x400
November 11th, 2000, 08:15
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
November 11th, 2000, 12:24
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
November 12th, 2000, 03:33
me lame - i put that ORG before [BITS 32], but i should put after

thnx