Author Topic: Compatibility with MASM source code  (Read 13131 times)

Offline jumpnett

  • New Member
  • Posts: 1
Compatibility with MASM source code
« 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.

Offline Keith Kanios

  • Full Member
  • **
  • Posts: 383
  • Country: us
    • Personal Homepage
Re: Compatibility with MASM source code
« Reply #1 on: June 11, 2010, 04:26:55 PM »

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Compatibility with MASM source code
« Reply #2 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


Offline yousafsajjad

  • Jr. Member
  • *
  • Posts: 5
Re: Compatibility with MASM source code
« Reply #3 on: July 08, 2010, 11:27:14 PM »
Look up 'binutils' and specifically 'objcopy'. It would help

Offline Keith Kanios

  • Full Member
  • **
  • Posts: 383
  • Country: us
    • Personal Homepage
Re: Compatibility with MASM source code
« Reply #4 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.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Compatibility with MASM source code
« Reply #5 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