NASM IS NOT MATURE ENOUGH.



Uppercase, so it must be true! :)

In what way, Homer? (and how is it relevant to this topic?)

Best,
Frank

Posted on 2009-12-21 07:50:32 by fbkotler
Nasm lacks the macro support to perform the kinds of string manipulations that make a macro engine truly powerful.
It's unfortunate.
This has been partly addressed via NasmX, but still not possible to generate complex expressions (such as another macro) from within a macro.
Posted on 2009-12-21 08:25:34 by Homer
I don't recall NASMX addressing anything of the sort. Any string facilities that NASMX uses is supplied by NASM itself.

Things that NASM 2.08 will bring:

  • recursive macros (%rmacro/%irmacro)

  • macro termination (%exitmacro)

  • string to token conversion (%deftok)



Between converting strings to tokens and vice-versa, string manipulation, macro recursion and termination, and conditional logic... you'll find it a little easier to generate complex expressions ;)

PS: I've been working on a pluggable API system for NASMX using the above facilities :D
Posted on 2009-12-21 14:41:53 by SpooK
Sounds progressive and promising, but still waiting to see.
Same for JWASM, even though it DOES have the kind of high end string manipulation I demand, its ELF exporter is fundamentally broken, and I really can't go there until it gets sorted out.
And as for MASM.
Well I hate it, and I can't update to the newer MASM v8 because microshock broke its spine, its macro engine is feeble, who cares what opcodes it can generate, its fundamentally useless to anyone who is above vanilla coding.
Posted on 2009-12-23 00:23:28 by Homer
Homer, I have ml.exe version 8.0.50727.762  , (from my copy of VS2k5)
and it assembles perfectly the ATC-based stuff and all projects I have. (and I am a macro freak)
I know from experience there was another, older 8.xx version, that was ridiculous. But since then, there have been service packs which fixed and upgraded it (added support for modern SSE versions, etc).
Posted on 2009-12-23 03:11:01 by Ultrano
There's also a license issue with masm v8 iirc, in respect to using the application for commercial purposes ...
Posted on 2009-12-23 04:44:58 by Homer
I looked-up the EULAs of my (paid-for) VS2k5 , and the free VisualC++ Express 2k8 (has ml.exe version 9.xx).
There are 3 distribution versions of ML6 that I have: the official CD, VS6-Learner'sEdition and MASM32 package. The latter two contained limits on commercial software, the three were mentioning "must target/run on a Microsoft OS". (with this I mean that I have seen the licensing limitation that you mention, on ml6)
In contrast, VS2k5 and VCE2k8 don't contain the OS-limitation, and VCE2k8 (has ml.exe v9.xx) doesn't mention any limits on commercial software. I only have a paid-for version of vs2k5, so I don't know of a public free version of ML v8.xx - to see its EULA.
Posted on 2009-12-23 05:20:37 by Ultrano
Thanks for bothering to look, I'm pretty sure that the non-commercial license covers the free versions, but I would love to be proven wrong, and I'm looking to hear from people who have pressed the limits of v8 macros.
Your ATC stuff doesn't really tax the macro engine too badly, you're just spitting out some structs and stuff.
I would REALLY like to see a ChangeLog for v8.
I didn't even know there was a v9!
Posted on 2009-12-23 06:12:12 by Homer
There's a MASM v10 aswell, included in the VS2010 beta. No changelog though afaik.
But the manual is on MSDN:
http://msdn.microsoft.com/en-us/library/8t163bt0(VS.100).aspx
Posted on 2009-12-23 07:22:19 by Scali

Sounds progressive and promising, but still waiting to see.


We are currently finalizing the 2.08 release candidate for stable release. I would expect it within the next couple of weeks.
Posted on 2009-12-23 11:30:04 by SpooK
Heh! Jeez, I didn't mean to start a whole new topic! I felt that Homer's slam of Nasm was "unprovoked", since we were discussing (before the move) pushing multiple parameters in Gas... which Nasm has been mature enough to do for some time. I get it now. Homer doesn't like any of 'em. Fair enough.

What's wrong with Japheth's ELF exporter, Homer? I don't use JWASM (prefer Nasm's syntax), but I gave it a quick test and it seemed to work fine. The beauty of an "open source" licensed assembler (since we're on *that* topic), is that we can fix it, if neccessary, or help the author fix it...

Best,
Frank



Posted on 2009-12-23 12:13:32 by fbkotler

Heh! Jeez, I didn't mean to start a whole new topic!


Well, the more ways to gather feedback in order to improve NASM, the better :)
Posted on 2009-12-23 13:52:28 by SpooK
True enough!

I saw an interesting macro in Fasm... Calculated a checksum - after it was all assembled, apparently - and inserted it into the code. I don't think Nasm will do that one.

Best,
Frank

Posted on 2009-12-24 04:05:33 by fbkotler
There's nothing wrong with it as such, it's simply incomplete.
JWASM actually does a remarkable job of implementing MASM syntax, including some known bugs in MASM :)
It's certainly the most likely contender, as its macro engine supports everything that MASM's does.
I can't confirm this, but I believe some serious limitations in MASM were eliminated or at least improved apon.
And it's the only cross-platform assembler I'd even consider using right now.
Posted on 2009-12-24 04:20:20 by Homer
fbkotler,

FASM preprocessor and interpretive layers have powerful features (they're hard to master at times) not found in most assemblers. How about prefix-like macro that convert LE to BE (one for any data defining directive)? I even use FASM as true assembler (not compiler) to create/modify/convert binary files.
Posted on 2009-12-24 05:03:11 by baldr

There's nothing wrong with it as such, it's simply incomplete.
JWASM actually does a remarkable job of implementing MASM syntax, including some known bugs in MASM :)
It's certainly the most likely contender, as its macro engine supports everything that MASM's does.
I can't confirm this, but I believe some serious limitations in MASM were eliminated or at least improved apon.
And it's the only cross-platform assembler I'd even consider using right now.


Maybe it's time to revisit XASM :P
Posted on 2009-12-24 11:47:06 by SpooK
Perhaps a 64 bit version :)
Posted on 2010-01-01 23:43:36 by Homer