3
67kviews
Explain two pass macro processor with Flowchart and databases.

Mumbai University > Computer > Sem 6 > System Programming and Compiler Construction

Marks: 10

Year:May 16

1 Answer
11
6.6kviews

It is used for for identifying the macro name and performing expansion.

Features of macro processor:

  1. Recoganized the macro definition

  2. Save macro definition

  3. Recoganized the macro call

  4. Perform macro expansion

Forward reference Problem

The assembler specifies that the macro definition should occur anywhere in the program .

So there can be chances of macro call before it’s definition witch gives rise to the forwards reference problem od macro

Due to witch macro is devided into two passes

  1. PASS 1-

Recoganize macro definition save macro definition

  1. PASS 2-

Recoganize macro call perform macro expansion

Databases required for pass 2

In pass2 we perform recognize macro call and perform macro expansion

1.COPY FILE

It is a file it contains the out put given from PASS1

2.MNT

It is used for recognizing macro name

3.MDT

It is used to perform macro EXPANSION

4.MDTP

It is used to point to the index of MDT .

The starting index is given by MNT

5.ALA

It is used to replace the index notation by it actual value

6.ESC

It is used to contain the expanded macro call which is given to the assembler for further processing

enter image description here

Please log in to add an answer.