This set of Microprocessor Multiple Choice Questions & Answers (MCQs) focuses on “Macros”.
1. 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
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. 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
Explanation: The process of assigning a label to the string is called defining a macro.
3. 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
Explanation: A macro may be called from inside a macro. This type of macro is called nested macro.
4. 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
Explanation: A macro can be defined anywhere in a program.
5. 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
Explanation: A macro may be used in data segment and can also be used to represent statements and directives.
6. The end of a macro can be represented by the directive.
a) END
b) ENDS
c) ENDM
d) ENDD
View Answer
Explanation: The ENDM directive marks the end of the instructions or statements sequence assigned with the macro name.
7. 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
Explanation: Inserting the statements and instructions at the place of macroname, in the program, is known as calling a macro.
8. 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
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. 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
Explanation: Macro does not require stack memory and hence has less time for execution.
10. The beginning of the macro can be represented as
a) START
b) BEGIN
c) MACRO
d) None of the mentioned
View Answer
Explanation: The beginning of the macro is represented as macroname followed by the directive MACRO.
SYNTAX: macroname MACRO
EXAMPLE: STRINGS MACRO.
Sanfoundry Global Education & Learning Series – Microprocessors.
Here’s the list of Best Books in Microprocessors.
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Apply for Electronics & Communication Engineering Internship
- Check Electronics & Communication Engineering Books
- Apply for Computer Science Internship
- Practice Computer Science MCQs
- Check Computer Science Books