Author Topic: nasm source code  (Read 35691 times)

Offline JnZn558

  • Jr. Member
  • *
  • Posts: 7
nasm source code
« on: May 08, 2012, 04:02:43 PM »
I found nasm source code at http://repo.or.cz/w/nasm.git, is that complete code? do you know a description how to compile it? because I have problem with its code during compile with VS08

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: nasm source code
« Reply #1 on: May 09, 2012, 01:59:26 AM »
Yeah, the code in the git repository should be complete. You might be better of with source code from here:

http://www.nasm.us/pub/nasm/snapshots/latest/

Unless I'm mistaken, it's partially built - the Perl parts and autoheader/autoconf(?). I can't give you any advice on compiling in VS. What problem(s) are you running into?

Best,
Frank


Offline Cyrill Gorcunov

  • NASM Developer
  • Full Member
  • *****
  • Posts: 179
  • Country: 00
Re: nasm source code
« Reply #2 on: May 09, 2012, 09:09:12 AM »
you might need to install MinGW and use VS as a compiler

Offline JnZn558

  • Jr. Member
  • *
  • Posts: 7
Re: nasm source code
« Reply #3 on: May 09, 2012, 09:44:41 PM »
I have installed cygwin, and got it compiled thx you all, can you tell me where is the linker?

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: nasm source code
« Reply #4 on: May 10, 2012, 02:50:55 AM »
"ld.exe" should be in your "bin" directory, but "gcc.exe" should find it unassisted (if you've got CygWin set up properly). I should think just "./configure"/"make" should work - might need "autogen.sh" for code from git(?). I actually use "make install_everything" but that gives you rdoff utilities you probably don't need...

Yell if you have problems with it.

Best,
Frank


Offline JnZn558

  • Jr. Member
  • *
  • Posts: 7
Re: nasm source code
« Reply #5 on: May 10, 2012, 07:34:06 AM »
"ld.exe" should be in your "bin" directory, but "gcc.exe" should find it unassisted (if you've got CygWin set up properly). I should think just "./configure"/"make" should work - might need "autogen.sh" for code from git(?). I actually use "make install_everything" but that gives you rdoff utilities you probably don't need...

Yell if you have problems with it.

Best,
Frank

Frank, I am sorry 4 my missunderstanding question. What I mean is, is nasm only a compiler not linker inclusive?
I just read info from other people that nasm only make asm to object file, but not link it to exe. that mean link is not a part of nasm? which linker is compatible with nasm?

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: nasm source code
« Reply #6 on: May 10, 2012, 12:18:36 PM »
Right, Nasm does not include a linker and assembles your source code to object files. Strictly speaking, Nasm can be coaxed into building a "hand made" PE header (or ELF executable header, for that matter) in "-f bin" output mode, but it probably isn't what you want to do.

I got confused and was telling you where the CygWin "ld.exe" linker was (which should work(?) with Nasm). You started off talking about VS08, so you probably want to use "link.exe". I'm not sure exactly where to find it - same place as "masm.exe" and the other executables, probably. How do you guys say "locate"? :) "find link.exe", probably? Should be somewhere in that VS directory...

There are files in Nasm's "contrib" directory that may help you get Nasm "hooked up" with the rest of it. Sorry I can't be more help.

Best,
Frank


Offline codeFoil

  • Jr. Member
  • *
  • Posts: 13
Re: nasm source code
« Reply #7 on: May 11, 2012, 12:29:36 PM »
How do you guys say "locate"? :)

Where.exe

Unfortunately, that's in the SDK bin directory, so if you know where that is, you already know where to find Link.exe.

Code: [Select]
For /F %I In ("Link.exe") Do Dir %~$PATH:I
That'll find it if the system has already been pointed to it, in which case you don't need to find it.

Here's the sledge hammer.
Code: [Select]
Echo Off
For /S \ %I In (Link.exe) Do If Exist %I Echo %I
Echo On

Oops, I forgot.  We Windows guys are suppose to be all point and click :)


Offline Bryant Keller

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 360
  • Country: us
    • About Bryant Keller
Re: nasm source code
« Reply #8 on: May 16, 2012, 06:51:27 PM »
Oops, I forgot.  We Windows guys are suppose to be all point and click :)

You mean you didn't use the On Screen Keyboard!? :P

About Bryant Keller
bkeller@about.me

Offline codeFoil

  • Jr. Member
  • *
  • Posts: 13
Re: nasm source code
« Reply #9 on: May 16, 2012, 10:14:18 PM »
I was serious.  We are supposed to be point and click.  Don't attract attention or WAU will point all my file associations back at Visual Studio again. :)

Offline katz

  • Jr. Member
  • *
  • Posts: 3
Re: nasm source code
« Reply #10 on: June 30, 2012, 11:47:30 PM »
I have a question related to this topic (but probably not for a new one).
The Patches page kind of forgets to say where do we submit those patches.
So where do we submit patches to?
I generated one with Git GUI and I'm not sure if you'll get it queued for review/approval after I clicked commit (didn't see anything else that could possibly output a patch file).
Also which hub should we use. The one on repo.or.cz or the sourceforge one?

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: nasm source code
« Reply #11 on: July 01, 2012, 12:26:59 AM »
Probably the best thing is to join the developer's list:

https://lists.sourceforge.net/lists/listinfo/nasm-devel/

I think there's a way to get GIT to produce a diff suitable for mailing... but I forget what it is...

Thanks for your contribution!

Best,
Frank