Author Topic: Nasm source does not work  (Read 33016 times)

Offline Manos

  • Jr. Member
  • *
  • Posts: 24
  • Country: gr
Re: Nasm source does not work
« Reply #15 on: August 29, 2014, 05:36:07 PM »
Quote
I think what you're really trying to state is that Nasm doesn't work the way YOU want it to.
No. I simply want nasm works like yours pre-build.
Quote
Using Nasm as an external assembler is not an issue if your C compiler emits proper Nasm assembly source code.
In this case I could use MASM that I know better.
Quote
However, it would appear you are attempting to modify Nasm in order to use it like a back-end .DLL and that's not easy.
Perhaps a look at this site will give you some ideas: http://yasm.tortall.net/
I want to be sure that the assembler I 'll use works correctly.

But why you don't tell me what Tools you used and what makefile
to create your pre-builded NASM ?
That could be easy, except if you do't want to...

Thank you,
Manos.
« Last Edit: August 29, 2014, 05:51:43 PM by Manos »

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Nasm source does not work
« Reply #16 on: August 29, 2014, 08:16:12 PM »
Starting at the last, I have dispatched an email to the developers' list, asking. Last I knew, OpenWatcom running on Linux but targetted to PE was used. That may no longer be true.

You see what it says in the "INSTALL" file, don't ya? Use MinGW. Up to you if you want to do that or not. Apparently the MS tools are known to be a hassle.

The "Netwide" part of the fantasy is supposed to indicate that one can compile and run Nasm "anywhere". This is no longer true, if it ever was. The last MS compiler I ran was 6.00a, as I recall. It would not compile Nasm. I installed DJGPP. At one point, I was producing PEs with a Borland "bcc" compiler. I had David Lindauer's CC386 compiling Nasm, too. CC386 would optionally use Tasm or Nasm as a back end. I was amused to watch Nasm assembling "nasm.asm", etc. OK I'm easily amused. This was all a long time ago.

When Daniel Bernstein's student Jonathan Rockway discovered an exploitable overflow in Nasm, we resorted to C99 support to fix it. These days, you need a fairly modern compiler to compile Nasm without hassles. A system that supports "autoconf" and "configure" helps. I can't get an .rpm to work, so I always build Nasm with "./configure" and "make install_everything" and it's pretty painless. I don't know if MinGW would do as well for you, if you choose to go that route.

To get back to what you've got... errors on the two "%define" lines. How strange! I would think that's coming from the preprocessor(?) - nowhere near the output drivers you're trying to omit.

I suspect the complaints you're getting from inttypes.h are a "C99 issue". I can't think why that should cause trouble with "%define", either!

See what we hear from the developers' list...

Best,
Frank


Offline Manos

  • Jr. Member
  • *
  • Posts: 24
  • Country: gr
Re: Nasm source does not work
« Reply #17 on: August 29, 2014, 08:48:49 PM »
Thank you Frank for your reply.

Tomorrow I 'll download MinGW and I 'll try to rebuild the nasm.
When I have news, I 'll inform you.

Manos.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Nasm source does not work
« Reply #18 on: August 29, 2014, 10:50:54 PM »
Here's the reply from our chief maintainer:
Quote
We use MinGW-W64 on hosted on Linux (because our build server is a Linux
box.)

A reasonably modern MSVC++ should work, but the one he is using is ancient.

   -hpa

So hopefully MinGW will work for ya.

Best,
Frank


Offline Manos

  • Jr. Member
  • *
  • Posts: 24
  • Country: gr
Re: Nasm source does not work
« Reply #19 on: August 30, 2014, 04:12:32 PM »
Hi Frank.

Before I use MinGW, I tried again with VC++2005,
changing the compiler and linker options.
I added, also, to Linker the bufferoverflowU.lib and
now nasm works OK.
I 'll try to rebuild nasm using VStudio 6.0 professional,
that I have buyed since 1998.
If I accomplish to rebuild nasm, I 'll 'tell' to VStudio 6.0 to export
the makefile. VStudio 6.0 has this option.
Then, I 'll send you the correct makefile because your makefile is not correct.

Thank you,
Manos.
« Last Edit: August 30, 2014, 04:14:18 PM by Manos »

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Nasm source does not work
« Reply #20 on: August 30, 2014, 06:32:24 PM »
The "bufferoverflowU.lib", eh? Sounds like a curse I wouldn't wish on my worst enemy. Hey, whatever works. Glad you got it working.

Please do pass along your makefile, settings... any other tips you discover...

Best,
Frank


Offline Manos

  • Jr. Member
  • *
  • Posts: 24
  • Country: gr
Re: Nasm source does not work
« Reply #21 on: August 30, 2014, 06:41:16 PM »
Please do pass along your makefile, settings... any other tips you discover...
Frank

OK.

Regards,
Manos.

Offline Manos

  • Jr. Member
  • *
  • Posts: 24
  • Country: gr
Re: Nasm source does not work
« Reply #22 on: August 30, 2014, 08:04:38 PM »
Frank.

My attempt to build nasm using VStudio 6.0 failed
because its compiler does not understand the long long type.

Manos.

Offline encryptor256

  • Full Member
  • **
  • Posts: 250
  • Country: lv
  • Win64 .
    • On Youtube: encryptor256
Re: Nasm source does not work
« Reply #23 on: August 31, 2014, 09:29:05 AM »
Frank.

My attempt to build nasm using VStudio 6.0 failed
because its compiler does not understand the long long type.

Manos.

Well, I think Microsoft standard for long long types was something like int64 or ___int64.

VStudio 6.0 is pretty old, was there x64 machines out when VStudio was born? - who knows.

Please, use that MinGW-W64 thingy what Frank suggests and stop wasting your time. :D

BRAAAAIINS! :D

Bye.
Encryptor256's Investigation \ Research Department.