NASM - The Netwide Assembler
NASM Forum => Using NASM => Topic started by: Borneq on June 09, 2011, 01:52:36 PM
-
In ml.exe is include 7zAsm.asm, which syntax is in Nasm?
How conditional,
ifdef x64
else
endif
How write macro
CRC macro op:req, dest:req, src:req, t:req
op dest, DWORD PTR [r5 + src * 4 + 0400h * t]
endm
Is any compatibility options in Nasm to Macro Assembler ?
-
Not much compatibility with Masm - t'wasn't a design consideration.
You can use "%ifdef", "%else", "%endif"... There's an extensive section in the Friendly Manual...
I'm not sure what your "CRC" macro is intended to emit. Can you show an example of its use? Perhaps we can figure out a Nasm equivalent...
Best,
Frank
-
How write macro
CRC macro op:req, dest:req, src:req, t:req
op dest, DWORD PTR [r5 + src * 4 + 0400h * t]
endm
I believe this would be an adequate equivalent:
%macro CRC 4
%1 %2, DWORD[r5 + %3 * 4 + 0400h * %4]
%endmacro