Assembler & Win32 - Макроопределения
Пример макроопределений

macro MessageVector message1,message2:REST
IFNB <message1>
dd message1
dd offset @@&message1  
@@VecCount = @@VecCount + 1  
MessageVector message1
ENDIF
endm MessageVector
macro WndMessages VecName, message1, message2:REST
@@VecCount= 0
DataSeg
label @@&VecName dword
MessageVector message1, message2
@@&VecName&Cnt= @@VecCount
CodeSeg
mov ecx,@@&VecName&Cnt
mov eax,[@@msg]
@@&VecName&_1: dec ecx
js @@default
cmp eax,[dword ecx * 8 + offset @@&VecName]
jne @@&VecName&_1
jmp [dword ecx + offset @@&VecName + 4]
@@default: call DefWindowProcA,[@@hWnd],[@@msg],[@@wPar],[@@lPar]
@@ret ret
@@ret_false xor eax,eax
jmp @@ret
@@ret_true mov eax,-1
dec eax
jmp @@ret
endm WndMessage
Сайт Alexus Software Development