NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: yaami on January 04, 2011, 06:41:24 PM

Title: [SOLVED]linker that can be used along with nasm in windows
Post by: yaami on January 04, 2011, 06:41:24 PM
Hi all,

I'm just starting with assembly language and nasm. What linker can be used to link programs assembled using nasm?

how can we produce a exe file and run it check the output of a program.

which books do you suggest for a beginner like me to learn assembly (in windows).

Thanks.
Title: Re: linker that can be used along with nasm in windows
Post by: Rob Neff on January 05, 2011, 12:15:19 AM
I've used Jeremy Gordon's GoDev tools with much success:

http://www.godevtool.com/ (http://www.godevtool.com/)
Title: Re: linker that can be used along with nasm in windows
Post by: the_mart on January 05, 2011, 07:56:24 AM
If you have the Microsoft C compiler, you can use link.exe. If you don’t, you can download the Windows 7 SDK, which provides the C compiler and linker.

Code: [Select]
link HelloWorld.obj /OUT:HelloWorld.exe /SUBSYSTEM:CONSOLE /ENTRY:start
If you download MinGW (http://www.mingw.org/), it provides ld.exe which can also be used to do the linking.

Code: [Select]
ld -o HelloWorld.exe HelloWorld.obj -entry=start --subsystem=console
Most of the assembly books I know of are for Linux, not Windows. Do you have access to a Linux machine or VM?
Title: Re: linker that can be used along with nasm in windows
Post by: yaami on January 05, 2011, 04:25:27 PM
Yes I do have linux installed on my laptop and I've used nasm with ld (tried some examples)... I wanted to know what linkers were available for windows/dos....

Thanks.