Mail Archives: djgpp/1997/04/22/13:33:48
On 15 Apr 1997, John Beppu wrote:
> [The Shortcomings]
>
> At the moment, NASM lacks
> |
> +-- macro support
> | |
> | +-- use a preprocessor like "cpp" or "m4" instead
As of v0.94, the lastest version, NASM includes a macro processor that
supports a context stack, single and multi-line macros and macro
functions. It's quite impressive if you see it.
> +-- an easy way to align data
> |
> +-- hand-align or try the kludge mentioned in docs
With the macro processor, you can do it a little easier (still a kludge,
though):
%define align times ($$-$) & 3 nop ; pad with NOPs to 4-byte boundary
And you can just do:
align
_Blah__Fv:
ret
align
_Blah2__Fv:
ret
I guess MASM and TASM use PROC directives to control alignment, but I
prefer the less structured approach NASM takes, even though it makes
auto-alignment of data more difficult.
> I ask that anyone who hasn't given NASM a chance to please
> do so. NASM is a very usable assembler.
>
> NASM binaries are small, so please keep it around even if you
> don't want to use it.
>
> NASM is another fine product from the UK.
Don't forget another few important points:
- NASM is blindingly *fast*
- NASM works really well with DJGPP (even in RHIDE)
[.plug]
A great intro for using NASM with DJGPP is available:
http://www.ucalgary.ca/~mmastrac/djgppasm.doc
[impressive code munged]
/\/\att /\/\astracci mmastrac AT acs DOT ucalgary DOT ca
GCS/GE d- s+:+ a--- C++++ UA P+ L E-- W+ N++ o K+ w+ O M- V
PS++ PE++ Y+ PGP t+++ 5+++ X++ R++ tv+ b+++ DI++++ I
G++ e h r* z?
- Raw text -