ASM TOOLS

Programming, for all ages and all languages.
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post 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
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Post 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
Last edited by inflater on Mon Nov 05, 2007 12:33 pm, edited 1 time in total.
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
JAAman
Member
Member
Posts: 879
Joined: Wed Oct 27, 2004 11:00 pm
Location: WA

Post 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
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post 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: :!:
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post 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
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Post 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...
Every good solution is obvious once you've found it.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

](*,)
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Post 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
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post 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: .
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post 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.
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Post 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
User avatar
crazygray
Member
Member
Posts: 73
Joined: Sat Nov 03, 2007 10:17 am
Location: Toky,Japan

Post by crazygray »

:mrgreen: ](*,)
Imagine if a creature came from a 4 dimensional world, would he think you to be flat?
Post Reply