Home »
Embedded Systems
MCQ | Procedures and Macros in 8086 Microprocessor
Multiple choice questions and answers (MCQ) based on the Procedures and Macros of the 8086 microprocessor with 4 choices, correct answer and explanation.
Submitted by Monika Sharma, on September 01, 2019
Question 1:
Which of the following assembler directives are used to define a Procedure in the 8086 microprocessor?
- PROCEDURE and ENDP
- STARTP and ENDP
- PROC and ENDPROC
- None of the above
Answer: d. None of the above
Explanation:
The assembler directive that are used for defining a procedure in the 8086 microprocessor are: PROC and ENDP.
Question 2:
Which of the following features is not offered by Macros?
- Code reusability
- Less memory space
- Fast execution
- None of the above
Answer: b. Less Memory Space
Explanation:
Every time a Macro is invoked, the entire set of instructions is loaded into the main memory due to which the execution of macros takes large memory space.
Question 3:
Which of the following is the correct syntax for calling a Macro?
- MACRO macro_name
- MACRO macro_name [ parameter's list]
- macro_name [parameter's list ]
- None of the above
Answer: c. macro_name [parameter's list ]
Explanation:
While calling a Macro, we need not mention the assembler directive: MACRO. Also, the parameter's list is optional to pass. It is passed only if the definition of the Macro contains parameters.
Question 4:
Which of the following characteristics of Procedures makes it unfit for being used for short instruction sets with less number of instructions?
- Extra code requirement for integrating procedures
- Linking of procedures with the mainline program takes too much time
- Extra work load on processor for shifting controls
- All of the Above
Answer: d. All of the above
Explanation:
All the mentioned reasons are responsible for a procedure not being a suitable option for handling short instruction sets with less number of instructions.
Question 5:
In a program, a Macro is being called 'n' times. Then how many times is the machine code generated for the same?
- 1 time
- 'n' times
- 'n-1' times
- None of the above
Answer: b. 'n' times
Explanation:
The machine code (containing the instructions within the Macros) is generated every time the macro is called. So, if a Macro is being called 'n' times, then the number of times the machine code is generated is also 'n'?