MACRO AND MACRO PROCESSORS
Introduction Macro is a feature provided in pgm language Macro Definition defines new operation Macro call in program is invocation of new operation Leads to prg generation facility through macro expansion. Macro Expansion – Macro call replaced by sequence of statement
Cont. “A macro is a unit of specification for program generation through expansion. Macro consist of name, a set of formal parameters and a body of code. “The use of macro name with a set of actual parameters is replaced by some code generated from its body, this is called m acro expansion.”
Cont. In Assembly lang, Two ways to handle Macro 1) Macro Assembler 2) Macro Preprocessor Macro Assembler does expansion of macro calls and also assembles resulting assembly prog. While Macro Preprocessor merely does expansion and produces assembly prog.