Engineering Questions with Answers - Multiple Choice Questions

Microprocessors MCQ – Macros

1 - Question

If a number of instructions are repeating through the main program, then to reduce the length of the program, __________ is used.
a) procedure
b) subroutine
c) macro
d) none of the mentioned

View Answer

Answer: c
Explanation: For a certain number of instructions that are repeated in the main program, when macro is defined then the code of a program is reduced by placing the name of the macro at which the set of instructions are needed to be repeated.




2 - Question

The process of assigning a label or macroname to the string is called
a) initialising macro
b) initialising string macro
c) defining a string macro
d) defining a macro

View Answer

Answer: d
Explanation: The process of assigning a label to the string is called defining a macro.




3 - Question

A macro within a macro is called
a) macro-within-macro
b) nested macro
c) macro-in-macro
d) none of the mentioned

View Answer

Answer: b
Explanation: A macro may be called from inside a macro. This type of macro is called nested macro.




4 - Question

A macro can be defined as
a) beginning of a program
b) end of a program
c) after initialisation of program
d) anywhere in a program

View Answer

Answer: d
Explanation: A macro can be defined anywhere in a program.




5 - Question

A macro can be used as ________
a) in data segment
b) to represent directives
c) to represent statements
d) all of the mentioned

View Answer

Answer: d
Explanation: A macro may be used in data segment and can also be used to represent statements and directives.




6 - Question

The end of a macro can be represented by the directive.
a) END
b) ENDS
c) ENDM
d) ENDD

View Answer

Answer: c
Explanation: The ENDM directive marks the end of the instructions or statements sequence assigned with the macro name.




7 - Question

Inserting the statements and instructions represented by macro, directly at the place of the macroname, in the program, is known as
a) calling a macro
b) inserting a macro
c) initializing a macro
d) none of the mentioned

View Answer

Answer: a
Explanation: Inserting the statements and instructions at the place of macroname, in the program, is known as calling a macro.




8 - Question

The time required for execution of a macro is ________ that of the procedure.
a) greater than
b) less than
c) equal to
d) none of the mentioned

View Answer

Answer: b
Explanation: The time required for execution of a macro is less than that of procedure as it does not contain CALL and RET instructions as the procedures do.




9 - Question

Which of the following statements is incorrect?
a) complete code of instruction string is inserted at each place, wherever the macroname appears
b) macro requires less time of execution than that of procedure
c) macro uses stack memory
d) macroname can be anything except registers and mnemonics

View Answer

Answer: c
Explanation: Macro does not require stack memory and hence has less time for execution.




10 - Question

The beginning of the macro can be represented as
a) START
b) BEGIN
c) MACRO
d) None of the mentioned

View Answer

Answer: c
Explanation: The beginning of the macro is represented as macroname followed by the directive MACRO.
SYNTAX: macroname MACRO
EXAMPLE: STRINGS MACRO.

Get weekly updates about new MCQs and other posts by joining 18000+ community of active learners