blown programming language. See macro recorder, batch fileand shell script. Simply, An assemblylanguage that uses macros.A macro is a sequence of instructions, assigned by a name and could be used anywhere in the program.
The macro is invoked by using the macro name along with the necessary parameters. When you need to use some sequence of instructions many times in a program, you can put those instructions in a macro and use it instead of writing the instructions all the time.Macro Processor - Macro Processor is a program that lets you define the code that is reused many times giving it a specific Macro name and reuse the code by just writing the Macro name only. Generally it doesn't come as a separate program but as a bundle to either assembler or compiler. There are three main steps of using a macro -1.Define the macro name2.Give it's definition3.Use the macro name from within the program anywhere to use it's definition (this step is called macro call)And the most important thing is that, macro processing is done before the compilation replacing the code in place of macro calls and deleting macro definitions.One important use of these macros is for booting. During the boot time, the system uses a lot of macros to get itself started since they need not be compiled to use, but just macro processing is enough which is a small task.Three examples of actual macro processors1.A macro processor designed for use by assembler language programmers2.Used with a high-level programming language3.General-purpose macro processor, which is not tied to any particular languageConditional Macro Expansion - The macro processor replaces each macro instruction with thecorresponding group of source language statements. This is called macro expansion or expanding the macros.Conditional assembly are frequently considered to be mechanisms that allow a single version of the source code for a program to be used to generate multiple versions of the executable.Most macro processors can also modify the sequence of statements generated for a macro expansion, depending on the arguments supplied in the macro invocation. Conditional Assembly is
commonly used to describe this feature. It is also referred to as conditional macro expansion. Conditional Assembly can be achieved with the help of –1.AIF statements - It is used to specify the branching condition. This statements provides conditional branching facility. Syntax: AIF (condition) LabelIf condition is satisfied the label is executed else it continue with the next execution. It performs anarithmetic test and branches only if tested condition is true.2.AGO statements - This statement provides the unconditional branching facilities. We do not specify the condition. Syntax : AGO. LabelIt specifies the label appearing on some other statement in the macro instruction definition. The macro processor continues the sequential processing of instructions with the indicated statement.