1) Given the following macro definition :
MACRO
CLEARMEN &X, &N, ®= AREG
LCL &M
&M SET 0
MOVER ®, =’0’
.MORE MOVEM ®, &X + &M
&M SET &M +1
AIF (&M NE N) . MORE
MEND
Show the contents of the data structures deployed by the macro-processor for the call.
CLEARMEN AREA, 10
2) Write the differences between formal parameters, keyboard parameters and actual parameters.
3) How expansion time variables are useful in Macro Definition? Explain with example:
4) Explain the entry format for the macro name table(MNT).
5) Discuss concept of macros. How are they expanded and what data structures are needed in processing macros?
6) In an assembly language program, a certain action is required at 10 places in the program. Under what conditions would you code this action as
(a) A macro?
(b) A Subroutine?
7) Explain in detail how nested macro calls are processed by the macro preprocessor.
8) What is a macro? Given the following macro show all the data structure entries during macro definition and call.
MACRO
CLEAR &A, &B, &R = BREG
LCL &Z
&Z SET 5
MOVER &R, 0
.MORE MOVEM &R, &A + &Z
&Z SET &Z + 1
AIF (&Z NE &B). MORE
MEND
9) Write a macro which takes A, B, C and D as parameters and calculates (A*B*C*D) in the accumulator.
10) Draw flow-chart or write algorithm for one pass macro Pre-processor. Which type of modifications would you apply to convert your flow-chart or algorithm so that it should provide the facilities of Macro Assembler.