September 2017
Beginner to intermediate
290 pages
6h 58m
English
Although you definitely can define a macro instruction that receives no parameters at all, you would rarely need to do this. Most of the time, you would define macro instructions that need at least one parameter. Let us take, for example, a macro instruction that implements the procedure prolog:
macro prolog frameSize{ push ebp mov ebp, esp sub esp, frameSize}
The frameSize property in the preceding macro instruction is a macro parameter which, in this case, is used to specify the size of the stack frame in bytes. The usage of such a macro instruction would be as follows:
my_proc: prolog 8 ; body of the procedure mov esp, ebp pop ebp ret
The preceding code is logically equivalent to (and is expanded by the ...
Read now
Unlock full access