newbie question about NASM

From: John Smith (spamtrap_at_crayne.org)
Date: 02/25/05


Date: Thu, 24 Feb 2005 23:11:39 +0000 (UTC)

I am a student of assembly language. They are teaching me in MASM, and the
..LIB file they have given me was made with MASM.
I have been playing around with NASM, in my limited ways, and have found it
much easier to use. So I have been taking the code from the book, and
rewriting the MASM code to NASM with great success. However, I am at the
point in the book where it starts to use the library, and I cannot for the
life of me get it to link. I tried MASM's linker, and it complains about my
OBJ file, I used "nasm -f obj file.asm" to compile. I am using ALINK for
NASM, and when I try to link, it says "Error in file at 0000009C - start
address defined in more than one module." Linking with "alink -oEXE
file.obj file2.lib"

In MASM, the book uses: _data segment word public 'data'
In NASM, I've been using: segment data public
In the book, they reference to the library funtion like this: EXTRN
CRLF:NEAR
but I had trouble with that, so I've been referencing to the library funtion
like this: EXTERN CRLF

I would have hoped that it would be easy to use libraries made with
different compilers, with NASM.
I was hoping it was just me, but I will use MASM if I can not figure out how
to use 3rd party libraries.

Thanks to anyone how can help.
Keyboard Smasher.



Relevant Pages

  • Re: HLA v1.93 is now available
    ... MASM does branch displacement optimization. ... would anyone want to use an assembler that forces *them* to do this ... NASM as a back-end to HLA? ...
    (alt.lang.asm)
  • newbie question about NASM
    ... .LIB file they have given me was made with MASM. ... I have been playing around with NASM, in my limited ways, and have found it ... they reference to the library funtion like this: ... to use 3rd party libraries. ...
    (alt.lang.asm)
  • Re: newbie question about NASM
    ... > .LIB file they have given me was made with MASM. ... Is this .LIB file available to the public? ... > rewriting the MASM code to NASM with great success. ... > to use 3rd party libraries. ...
    (alt.lang.asm)
  • Re: Why such a large program ?
    ... Sometims intended humor doesn't come across in the newsgroups... ... To get back to an earlier question, about how to "force" Masm to output what you want... ... Masm will emit code you *didn't* write, if you use some of the "high level helpers" - generally that's code you "want"... ... Nasm, you'll get very nearly the same code. ...
    (alt.lang.asm)
  • Re: Why such a large program ?
    ... Yeah, you were. ... Sometims intended humor ... To get back to an earlier question, about how to "force" Masm to output ... Nasm, you'll get very nearly the same code. ...
    (alt.lang.asm)