The macro facility presented thus far capable of inserting blocks of instruction in place of macro calls. All of the calls to any given macro will be replaced by identical blocks. This macro facility lacks flexibility: there is no way for a specific macro call to modify the coding that replaces it. An important extension of this facility consists of providing for arguments, or parameters, in macro calls.
Corresponding macro dummy arguments will appear in macro definitions.
.
.
.
A 1, DATA 1
A 2, DATA 2
A 3, DATA 3
.
.
.
A 1, DATA 2
A 2, DATA 2
A 3, DATA 2
.
.
.
DATA 1 DC F '5'
DATA 1 DC F '10'
In this case the sequence are very similar but not identical. The first sequence performs an operation using DATA1 as operand; the second perform using DATA2. They can be considered to perform the same operation with a variable parameter or argument. Such a parameter is called a macro instruction argument, or dummy argument. It specified on the macro name line and distinguish by the ampersand which always its first character
Macro
Macro-invertebrates are animals that are big enough to see with the naked eye, and that do not have a backbone.
The macro facility presented thus far capable of inserting blocks of instruction in place of macro calls. All of the calls to any given macro will be replaced by identical blocks. This macro facility lacks flexibility: there is no way for a specific macro call to modify the coding that replaces it. An important extension of this facility consists of providing for arguments, or parameters, in macro calls. Corresponding macro dummy arguments will appear in macro definitions. . . . A 1, DATA 1 A 2, DATA 2 A 3, DATA 3 . . . A 1, DATA 2 A 2, DATA 2 A 3, DATA 2 . . . DATA 1 DC F '5' DATA 1 DC F '10' In this case the sequence are very similar but not identical. The first sequence performs an operation using DATA1 as operand; the second perform using DATA2. They can be considered to perform the same operation with a variable parameter or argument. Such a parameter is called a macro instruction argument, or dummy argument. It specified on the macro name line and distinguish by the ampersand which always its first character
The macro facility presented thus far capable of inserting blocks of instruction in place of macro calls. All of the calls to any given macro will be replaced by identical blocks. This macro facility lacks flexibility: there is no way for a specific macro call to modify the coding that replaces it. An important extension of this facility consists of providing for arguments, or parameters, in macro calls. Corresponding macro dummy arguments will appear in macro definitions. . . . A 1, DATA 1 A 2, DATA 2 A 3, DATA 3 . . . A 1, DATA 2 A 2, DATA 2 A 3, DATA 2 . . . DATA 1 DC F '5' DATA 1 DC F '10' In this case the sequence are very similar but not identical. The first sequence performs an operation using DATA1 as operand; the second perform using DATA2. They can be considered to perform the same operation with a variable parameter or argument. Such a parameter is called a macro instruction argument, or dummy argument. It specified on the macro name line and distinguish by the ampersand which always its first character
features:-conditional macro expansionconcatenation of macro parametersgeneration of unique labelsmacro instruction argumentsexpansion time variablesexpansion time loops
1 macro can be defined as a cycle involve numbers of small steps to execute or to perform a task this small step is known as micro-opration micro is part of instruction 2.instruction is task performed by micro opration
1.procedure does occuie minimum memory space than macro.2..overhead delay in macro is absent..3.in macro machine code is generated for instructions each time when it is called but in procedure machine code for instruction is put only once in the memory..4.proc is accessed by call and set instr ..macro is accessed with the name given..
Micro operation is the level 2 operation, it is excute directly from hardware. Mainly used in provide macro instruction. Macro operation is the level more than 2 (3,4) operation, depend on your CPU structure. Sometime, we call its assembly operation. It is excute by micro operation.
In the context of the 8086 microprocessor, a macro refers to a sequence of instructions or a block of code that can be defined once and reused multiple times throughout a program. Macros help simplify complex code and improve readability by allowing programmers to replace repetitive code patterns with a single macro call. They are typically defined in assembly language using a macro assembler, which expands the macro into its full instruction set during the assembly process. This can enhance development efficiency and reduce errors in the code.
Calling a macro loads the macro into memory, while executing the macro runs the macro.
Nested macro calls refer to the macro calls within the macros. A macros is available within other macro definitions also. In the scenario when a macro call occurs, which contains another macro call, the macro processor generates the nested macro definition as text and places it on the input stack. The definition of the macro is then scanned and the macro processor complies it.
Nested macro calls refer to the macro calls within the macros. A macros is available within other macro definitions also. In the scenario when a macro call occurs, which contains another macro call, the macro processor generates the nested macro definition as text and places it on the input stack. The definition of the macro is then scanned and the macro processor complies it.