Page 3 of 3

Posted: Mon Nov 05, 2007 9:52 am
by crazygray
How do I get nasm to assemble files and link them. I can write the asm files with notepad, but I amd stuck after that how do I actutally use NASM?

I open it up and it just closes back down.

EDIT:
I am a complete newb at asm and have not had to use a compiler or assembler without and IDE Before

Posted: Mon Nov 05, 2007 12:32 pm
by inflater
open up command.com, type nasm (yourfile.asm) ? :)
NASM does not have user interface, thats because it will close. You need to fire the command prompt and do things there. I suppose you are familiar with PC-DOS, if you aren't, you shouldn't be learning assembly right now :)

Regards
inflater

Posted: Mon Nov 05, 2007 12:32 pm
by JAAman
thats obvious...

its a command line tool, which means, it expects to get instructions on what to do from the command line typed to run the program, when it completes those instructions, it exits... when you run it without any instructions on the command line, it finishes immediately and terminates


what you want to do, is use a command line

here is a link to the relevent portion of the nasm manual:
http://nasm.sourceforge.net/doc/nasmdoc ... ection-2.1

Posted: Tue Nov 06, 2007 3:35 pm
by crazygray
:oops: :cry: :oops: :cry: I open the command prompt in XP and type in the command but it says it is not a command? :evil: :evil: :evil: :!:

Posted: Wed Nov 07, 2007 3:51 am
by AJ
Hi,

That's because you need to either:

a) Navigate to the directory containing nasmw.exe and supply absolute paths to your source files.
b) Have the directory containing nasmw permanently in your PATH environment variable.
c) Have a batch file which adds nasmw to your PATH variable and then does the compile (recommended).

I would seriously learn more about your host OS before attempting any further development. You need to know the host OS inside out.

Cheers,
Adam

Posted: Wed Nov 07, 2007 3:59 am
by Solar
I usually would suggest you have a look at Cygwin instead of fiddling with Windows' idea of a command line interface, but overall I think you should spend much more time reading manuals and beginner's tutorials first, instead of diving deep and starting with something like an assembler for your - apparently - first command line tool...

Posted: Wed Nov 07, 2007 4:41 am
by JamesM
](*,)

Posted: Wed Nov 07, 2007 9:20 am
by inflater
crazygray wrote:I open the command prompt in XP and type in the command but it says it is not a command?
Copy NASM or NASMW.EXE to your PATH variable locations, for example copying into c:\windows or c:\windows\system32 doesn't hurt. You can then execute NASM anytime and anywhere in the command prompt. It's as simple as that. But I suggest you first learn *something* about a OS that you are using (preferably Windows), and then learn VB6. Assembly language is not suitable for beginners. Really. Even I suck at it.

Regards
inflater

Posted: Wed Nov 07, 2007 9:24 am
by AJ
inflater wrote:It's as simple as that.
:idea: ...as long as your source files are also present in the current directory in the command window.

I don't think writing assembly is difficult per se. Its writing optimal, readable assembly where I fall over :roll: .

Posted: Wed Nov 07, 2007 5:10 pm
by crazygray
Thanks!

Copy NASM or NASMW.EXE to your PATH variable locations, for example copying into c:\windows or c:\windows\system32 doesn't hurt. You can then execute NASM anytime and anywhere in the command prompt. It's as simple as that. But I suggest you first learn *something* about a OS that you are using (preferably Windows), and then learn VB6. Assembly language is not suitable for beginners. Really. Even I suck at it.

Posted: Thu Nov 08, 2007 3:00 am
by AJ
Hi,

That last paragraph was incredibly confusing for me at this early hour of the morning. Please use the quote tags!

Cheers,
Adam

Posted: Sun Nov 18, 2007 10:17 am
by crazygray
:mrgreen: ](*,)