NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: jumpnett on June 11, 2010, 02:54:49 PM

Title: Compatibility with MASM source code
Post by: jumpnett on June 11, 2010, 02:54:49 PM
Hi, I'm new to NASM, and I just want to know if source code written for MASM can be assembled in NASM.
Title: Re: Compatibility with MASM source code
Post by: Keith Kanios on June 11, 2010, 04:26:55 PM
Read the NASM Documentation, Section 2.2 (http://www.nasm.us/doc/nasmdoc2.html#section-2.2).
Title: Re: Compatibility with MASM source code
Post by: Frank Kotler on June 11, 2010, 11:02:09 PM
If you have Masm sourcecode, and would prefer not to use Masm for whatever reason, take a look at Japheth's Jwasm:

http://www.japheth.de/

Best,
Frank

Title: Re: Compatibility with MASM source code
Post by: yousafsajjad on July 08, 2010, 11:27:14 PM
Look up 'binutils' and specifically 'objcopy'. It would help
Title: Re: Compatibility with MASM source code
Post by: Keith Kanios on July 08, 2010, 11:34:05 PM
If you don't want to download the kitchen sink binutils, Agner Fog's objconv works pretty well.
Title: Re: Compatibility with MASM source code
Post by: Frank Kotler on July 09, 2010, 08:16:37 AM
Jumpnett's got(?) Masm sourcecode, and wants to know if Nasm will assemble it (if I understand the question). I fail to see how "objcopy", all of "binutils", or even Agner's wonderful "objconv" are really going to help him...

What one would want, I would think, would be a Masm-to-Nasm source code converter. A long time ago, I was trying to translate code from the old 16-bit "Art of Assembly" into Nasm syntax. I used a Perl script someone gave me, a "search and replace" utility (translated to Nasm's syntax from Herbert Kleebaur's "Daniella" assembler, if you're familiar with *that*...), wrapped up in a batch file, which kinda sorta almost did the job. :)

I might still be able to find a "beta test" ("gamma", maybe) version of a converter someone sent me... It, too, worked... pretty good most of the time... I don't think I was supposed to redistribute it... But my memory's failing pretty bad... :)

But the short answer is "No.", Nasm won't assemble code written for Masm. It can be "translated, if that's what you want to do...

Best,
Frank