Implementation within an assembler.
The macro processor can be implemented within an assembles using two different ways, they are,
1. It can be added as a pre-processor to an assembles, making a complete a pass over the input text before pass 1 of the assembles
or
2. It can be implemented within pass 1 of the assembles.
1.1 Macro processor combined with assembler pass - 1.
The implementation of the macro processor within pass 1 eliminates the over head of intermediate files, and can improve this integration of macron processor and assembles by combining similar functions. For example the assembles regular pseudo -ops handles can be used to identify MACRO pseudo -ops of the macro processor. The macro name table can be combined with the assembles's machine op table or pseudo -op table.
Flowchart of a macro processor combined with assembles part 1:
Advantage and incorporating the macro processor into pass 1 of assembles.
The macro processor can be implemented within an assembles using two different ways, they are,
1. It can be added as a pre-processor to an assembles, making a complete a pass over the input text before pass 1 of the assembles
or
2. It can be implemented within pass 1 of the assembles.
1.1 Macro processor combined with assembler pass - 1.
The implementation of the macro processor within pass 1 eliminates the over head of intermediate files, and can improve this integration of macron processor and assembles by combining similar functions. For example the assembles regular pseudo -ops handles can be used to identify MACRO pseudo -ops of the macro processor. The macro name table can be combined with the assembles's machine op table or pseudo -op table.
Flowchart of a macro processor combined with assembles part 1:
Advantage and incorporating the macro processor into pass 1 of assembles.
- Many functions do not have to be implemented twice.
- There is less over head during processing: functions are combined and it is not necessary to create intermediate files as output from the macro processor and input to the assembles.
- Move flexibility is available to the programmer in that he may use all the features of the assembler in conjunction with macros.
- The program becomes too large to fit into the core of some machines.
- The program becomes complex.nction with macros