Re: NASM 0.98.39 vs. NASM 2.03.01 disassembly



Chuck Crayne wrote:
Herbert Kleebauer <klee@xxxxxxxxx> wrote:

Sadly the NASM macro system isn't powerful
enough to really "make" it a logical syntax.

There has been some discussion among the NASM developers about adding a
more powerful macro system. What features would you like to see?

I'm not a NASM user and therefore surely not in position to make
suggestions for the NASM development. A year ago I did some experiments
with NASM macros (I wanted to show Frank that NASM can already do much
better than it's standard syntax), but I really missed some simple
string manipulating functions which would allow me to process the
macro parameters character by character (for example to use _ instead
of . for local labels or use () instead of [] for indirect addressing).

I would like to see a text pre-processing subsystem (completely
independent from the macro subsystem) which is called by NASM
with each source code line read. This subsystem then can modify
or replace the original source code line and then give it back to
NASM for normal processing (including macro expansion). This
pre-processing sub system must be programmable, so maybe the best
would be to include an already existing GPLed BASIC or FORTH
interpreter. An other way would be to implement a simple virtual
machine (a few instructions, 64k code, data and stack should be
enough so only a few lines of C code should be necessary to implement
it).

With such a pre-processing sub system any NASM user can easily define
his preferred syntax (by loading the appropriate program for the
interpreter from the assembly source code file or an include file).
On the other side, this could lead to completely different looking
NASM source code files. NASM can compile them all, but no NASM
user will be able to easily read or understand a NASM source
written by somebody else.
.



Relevant Pages

  • Re: The Lib debate
    ... without further support from the assembler. ... nasm is released under an open source-compatible license. ... has enough macro facilities to allow source-portability among OSes. ... and plenty of external libraries. ...
    (alt.lang.asm)
  • Re: NASM macros
    ... >> Is this a special exception in the NASM syntax? ... this means you can put "ebx" into the macro and then it treats ... >> correct that if I posted it wide to the newsgroup as well as the LuxAsm ... I forget who it was that wanted FreeBSD compatibility anyway...if ...
    (alt.lang.asm)
  • Re: Bad habits
    ... Do you have an example of something Fasm can do, that Nasm can't? ... Nasm's macro syntax is uglier than a bulldog's hind end. ... We'll be wanting something a little more sophisticated, but for openers, how would that look in Fasm? ... The makefile for Chuck's "axgame.asm" looks like it produces a list file, but only produces a "usage" message for me. ...
    (alt.lang.asm)
  • Re: NASM 0.98.39 vs. NASM 2.03.01 disassembly
    ... I would like to see a text pre-processing subsystem (completely ... or replace the original source code line and then give it back to ... NASM for normal processing. ... With such a pre-processing sub system any NASM user can easily define ...
    (alt.lang.asm)
  • Re: RosAsm Bliss, and NASM Bliss
    ... A minimum GUI, written for RosAsm, and rewritten for NASM. ... These two give a nice skeleton for developing your own GUI. ... If we say "%macro foo 5", and attempt to use foo with the wrong number of parameters, Nasm won't recognise it as a macro, and will barf up a syntax error. ...
    (alt.lang.asm)