What are the data structures used in macro processor?

Solution(By Examveda Team) DEFTAB – Stores the macro definition including macro prototype and macro body. NAMTAB – Store macro names, which serves an index to DEFTAB contain pointers to the beginning and end of the definition.

What is macro processing?

A macro definition is a named sequence of statements you can call with a macro instruction. When it is called, the assembler processes and normally generates assembler language statements from the definition into the source module. The statements generated can be: Copied directly from the definition.

What is macro processor function?

A macro processor enables you to define and to use macros in your assembly programs. When you define a macro, you provide text (usually assembly code) that you want to associate with a macro name. Then, when you want to include the macro text in your assembly program, you provide the name of the macro.

What is the purpose of pass1 macro processor?

Approach 2: A one-pass macro processor that can alternate between macro definition and macro expansion is able to handle macros like those in Fig 4.3. Because of the one-pass structure, the definition of a macro must appear in the source program before any statements that invoke that macro.

Which data structure is used for designing of microprocessor?

Microprocessor consists of an ALU, register array, and a control unit. ALU performs arithmetical and logical operations on the data received from the memory or an input device. Register array consists of registers identified by letters like B, C, D, E, H, L and accumulator.

What are different features of macro?

Macro Syntax

  • Processing Statements. Executed during macro expansion; these statements must be preceded by the macro character followed by a blank.
  • Text Lines.
  • Straight Substitution of Variables.
  • Define Loops.
  • Screen I/O.
  • File I/O.
  • Conditional Text Generation.
  • Example 1: Using variables to generate a Natural program.

What is macro explain with example?

Macro is defined as something that covers a large amount, or is large in size. An example of macro is the study of the key driving aspects of an economy; macro economics. An example of macro is a very close up photograph of an ant; a macro photograph.

How are macro processors implemented?

STEP 1: Start the program execution. STEP 2: Macro instructions are included in a separate file. output. STEP 4: Print all other instructions such as start,load,store,add,sub etc with their values.

What are the advantages over macro?

Conclusion:

Macro Function
Using Macro increases the code length Using Function keeps the code length unaffected
Use of macro can lead to side effect at later stages Functions do not lead to any side effect in any case
Speed of Execution using Macro is Faster Speed of Execution using Function is Slower

What is microprocessor algorithm?

An algorithm is a procedure used for solving a problem or performing a computation. Algorithms act as a precise list of instructions that conduct specified actions step by step in either hardware- or software-based routines. Algorithms are widely used throughout all areas of IT.

What is the basic structure of microprocessor?

A microprocessor consists of an ALU, control unit and register array. Where ALU performs arithmetic and logical operations on the data received from an input device or memory. Control unit controls the instructions and flow of data within the computer.