I have a few questions that I would like to ask.

 does the ASSUME directive generate any OPCODE?
 what does the REG (being the operand of the macro) do?
 example:
  something macro p1:REG
   ;;actual code goes here
  endm

 that's all. ;)
Posted on 2001-05-07 16:25:00 by disease_2000
ASSUME is a directive, meaning it generates no code. It is used to tell the compiler to treat a register as if it was a structure, so future references to the register will add the correct offsets to it. Example:

MyStruct STRUCT
  A   DWORD  0
  B   DWORD, 0
ENDS

ASSUME ecx MyStruct
mov eax, .A  ; will generate 'mov eax, 
mov edx, .B  ; will generate 'mov eax, 

"REQ" after a macro parameter means "REQUIRED," meaning that parameter MUST be included when the macro is used, or a compile error will be generated. Sometimes it's useful to have a macro that can take a variable number of agruments, sometimes not. This gives you some additional protection that something essential isn't accidentally forgotten.
Posted on 2001-05-07 20:23:00 by Ernie