Author Topic: I cant do anything  (Read 10984 times)

nobody

  • Guest
I cant do anything
« on: July 20, 2007, 06:52:33 AM »
i have no idea what to download or what to do once i have downloaded it this whole thing is making no sense to me and its making frustrated

nobody

  • Guest
Re: I cant do anything
« Reply #1 on: July 20, 2007, 08:47:30 AM »
"If you don't know where you're going, any road will get you there." - The Cheshire Cat

What is it you'd *like* to do? To reduce frustration (but you'd better get used to it), something really simple is probably best. You don't mention "what OS" - that usually means Windows. Fortunately, unless you're running 64-bit Vista (I understand), Windows will still run a simple dos .com file. That's easy, but you may still be frustrated, 'cause it's so simple-minded.

What to download... The Friendly Manual (you might want the .chm version from the "contributions" section), and... Probably the Windows executables... way down at the bottom of the "files" page here - nasm-0.98.39-win32.zip. That'll unzip into nasmw.exe and ndisasmw.exe. Put 'em on your path. If you don't know how to do that, you may need to learn "to run your computer" - that is, how to operate from the command line. Nasm is a command line app, and clicking on it won't do anything useful. More frustration, if you don't already know this. ("NaGoA" and "RadAsm" are possible workarounds for this)

Get into the directory in which you plan to work, and type "nasmw -v" to make sure it's working. I strongly advise against directory names with spaces in 'em. They're "legal", but they'll cause you endless trouble.

Then fire up your favorite editor, and enter (typed or cutted-and-pasted):

org 100h
mov ah, 9
mov dx, msg
int 21h
ret
msg db "Whew!!!$"

Save it as "hello.asm". If your favorite editor insists on saving it as "hello.asm.txt", fix your editor, or rename it, or just tell Nasm "hello.asm.txt" - Nasm doesn't care what the name is.

Then we get to Nasm:

nasmw -f bin -o hello.com hello.asm

Unless there's an error, Nasm should assemble this silently. Type "hello", and you should see your message. If you don't get this far, get back to us with exactly what went wrong - "it doesn't work" is hard to diagnose. :)

What next? I dunno, I suppose you probably want to see some Windows "eye candy". You'll probably want a linker. Alink (SourceForge) works well with Nasm. You might want to download a "package" including Nasm, a linker (and other toys), the Windows .inc files (which you *will* want!), etc.

NASM32 project:

http://www.asmcommunity.net/projects/nasm32/

is probably the most "up to date".

NaGoA seems "inactive", but includes a *ton* of examples:

http://www.visual-assembler.pt.vu/

Another good source of examples, is the "files" section of the Yahoo win32-nasm-users group:

http://tech.groups.yahoo.com/group/win32-nasm-users/

The mailing list itself isn't very active (please *do* post something!), but the "files" section should keep you busy for a while.

Or... what *do* you want to do?

Best,
Frank

nobody

  • Guest
Re: I cant do anything
« Reply #2 on: July 20, 2007, 05:06:24 PM »
ok that helped ALOT thank you very much

nobody

  • Guest
Re: I cant do anything
« Reply #3 on: November 29, 2007, 06:57:34 PM »
Hey Frank let me tell you ... you made it so simple .. seems like  you know alot about it now could you help me in that too i installed cygwin on my windows vista and when i try to assemble using GAS and Ld as linker it do things without and eroro but when i try to to this ./file means the exe file i get it popup a window saying window cant run this file  please help !!