Author Topic: Installation in Windows 7  (Read 33667 times)

Offline paawan5

  • Jr. Member
  • *
  • Posts: 2
Installation in Windows 7
« on: March 23, 2010, 12:11:00 PM »
Hi,
    I am new to NASM. I have tried installing it on Windows 7. It creates an icon on the desktop, when I click on it the message " Invalid program file name, please check your pif file" comes up.

I have gone to the NASM directory in the dos prompt but nothing happens when I try to run NASM.exe.

Please help.

Thanks

Offline lukus001

  • Jr. Member
  • *
  • Posts: 16
Re: Installation in Windows 7
« Reply #1 on: March 23, 2010, 07:11:53 PM »
It is an .exe file (nasm.exe) but it isn't an installation file If i recall correctly (standalone, uncompressed executable etc..).

You run it as a console app (passing arguments along with the location of your assembly source code) and it'll produce a file that can be used with a linker.

In windows go to:
Start > "cmd" > *enter*

(type "cmd" in the little box that says 'start search' you should be able to jsut type as soon as you press "start")

navagate to where nasm is located, for example:
"cd C:\Users\lukus001\Documents\asm\software\nasm-2.08rc7"

then type "nasm" followed by your arguments, try:
"nasm -h"

for linux i use:
"nasm -f elf sourcecode.asm"

Where -f is the file type nasm will format it for; in this case, elf.  Windows doesnt use elf, so I suspect it's .exe for you?

its not the best method to do it, you should be able to navigate say, to any directory your source code is in and use "nasm" (rather than to navigate TO nasm) but that requires linking nasm to window's path directory and i don't know anything about that sorry :3.

Actually, if you want to be really smart, you can actually drag your assembly source code file.asm and drop it ontop of nasm.exe - like you would do to move that file into a new folder and it'll make a new file for you in the same directory nasm is in - so make shortcuts to nasm to keep it in the same directory :P.

right click the shortcut > properties > shortcut > target > **add "-f elf" to the end (after nasm.exe) to make it output elf file format ;) add other options where necessary.  remember "elf" is not the format for windows.
« Last Edit: March 23, 2010, 07:14:01 PM by lukus001 »

Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: Installation in Windows 7
« Reply #2 on: March 23, 2010, 07:27:16 PM »
Hi,
    I am new to NASM. I have tried installing it on Windows 7. It creates an icon on the desktop, when I click on it the message " Invalid program file name, please check your pif file" comes up.

I have gone to the NASM directory in the dos prompt but nothing happens when I try to run NASM.exe.

Please help.

Thanks

Hi, you may need to read http://nasm.us/doc/nasmdoc1.html#section-1.3.1
there explained what is the best way to use nasm on windows :)

Offline lukus001

  • Jr. Member
  • *
  • Posts: 16
Re: Installation in Windows 7
« Reply #3 on: March 23, 2010, 08:34:18 PM »
And here be a video how to drag and drop it :3

http://www.youtube.com/watch?v=U_pnwYT_1iY

(embedding flash doesnt work :( puh!!)

*cough* I use linux so that is untested,  lol ;)
« Last Edit: March 23, 2010, 08:52:19 PM by lukus001 »

Offline paawan5

  • Jr. Member
  • *
  • Posts: 2
Re: Installation in Windows 7
« Reply #4 on: March 23, 2010, 08:56:58 PM »
Thanks for all the help. I will reply once I give it a try.