• Macro definition consists of
i) macro prototype ii) one of more model iii) macro preprocessor
• Macro definition is in between a macro header statement and a macro e statement.
• Syntax of macro prototype statement < macro name> [ < formal parameter spec> [; ... ]] where < macro name> = It is in the mnemonic field of an assembly statement < formal parameter spec > is in the following form < parameter name > [ < parameter kind > ]
• Syntax of the macro call is < macro name> [ < actual parameter spec> [; ... ]]
Macro Expansion:-
• Macro call leads to macro expansion.
• Macro call statement is replaced by a sequence of assembly statement in macro expansion.
• Two key notions are used in macro expansion
a)Expansion time control flow
b)Lexical substitution
• Algorithm for macro expansion
i) macro prototype ii) one of more model iii) macro preprocessor
• Macro definition is in between a macro header statement and a macro e statement.
• Syntax of macro prototype statement < macro name> [ < formal parameter spec> [; ... ]] where < macro name> = It is in the mnemonic field of an assembly statement < formal parameter spec > is in the following form < parameter name > [ < parameter kind > ]
• Syntax of the macro call is < macro name> [ < actual parameter spec> [; ... ]]
Macro Expansion:-
• Macro call leads to macro expansion.
• Macro call statement is replaced by a sequence of assembly statement in macro expansion.
• Two key notions are used in macro expansion
a)Expansion time control flow
b)Lexical substitution
• Algorithm for macro expansion
No comments:
Post a Comment