Microprocessors Questions and Answers – Assembler Directives and Operators

This set of Microprocessor Multiple Choice Questions & Answers (MCQs) focuses on “Assembler Directives and Operators”.

1. The assembler directives which are the hints using some predefined alphabetical strings are given to
a) processor
b) memory
c) assembler
d) processor & assembler
View Answer

Answer: c
Explanation: These directives help the assembler to correctly understand the assembly language programs to prepare the codes.

2. The directive used to inform the assembler, the names of the logical segments to be assumed for different segments used in the program is
a) ASSUME
b) SEGMENT
c) SHORT
d) DB
View Answer

Answer: a
Explanation: In ALP, each segment is given a name by using the directive ASSUME
SYNTAX: ASSUME segment:segment_name
Eg: ASSUME CS:Code
here CS is the Code segment and code is the name assumed to the segment.

3. Match the following

advertisement
advertisement
   a) DB          1) used to direct the assembler to reserve only 10-bytes
   b) DT          2) used to direct the assembler to reserve only 4 words
   c) DW          3) used to direct the assembler to reserve byte or bytes
   d) DQ          4) used to direct the assembler to reserve words

a) a-3, b-2, c-4, d-1
b) a-2, b-3, c-1, d-4
c) a-3, b-1, c-2, d-4
d) a-3, b-1, c-4, d-2
View Answer

Answer: d
Explanation: These directives are used for allocating memory locations in the available memory.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

4. The directive that marks the end of an assembly language program is
a) ENDS
b) END
c) ENDS & END
d) None of the mentioned
View Answer

Answer: b
Explanation: The directive END is used to denote the completion of the program.

5. The directive that marks the end of a logical segment is
a) ENDS
b) END
c) ENDS & END
d) None of the mentioned
View Answer

Answer: a
Explanation: The directive ENDS is used to end a segment where as the directive END is used to end the program.
advertisement

6. The directive that updates the location counter to the next even address while executing a series of instructions is
a) EVN
b) EVEN
c) EVNE
d) EQU
View Answer

Answer: b
Explanation: The directive updates location counter to next even address if the current location counter contents are not even.

7. The directive that directs the assembler to start the memory allotment for a particular segment/block/code from the declared address is
a) OFFSET
b) LABEL
c) ORG
d) GROUP
View Answer

Answer: c
Explanation: If an ORG is written then the assembler initiates the location counter to keep the track of allotted address for the module as mentioned in the directive.
If the directive is not present, then the location counter is initialized to 0000H.

8. The directive that marks the starting of the logical segment is
a) SEG
b) SEGMENT
c) SEG & SEGMENT
d) PROC
View Answer

Answer: b
Explanation: The directive SEGMENT indicates the beginning of the segment.
advertisement

9. The recurrence of the numerical values or constants in a program code is reduced by
a) ASSUME
b) LOCAL
c) LABEL
d) EQU
View Answer

Answer: d
Explanation: In this, the recurring/repeating value is assigned with a label. The label is placed instead of the numerical value in the entire program code.

10. The labels or constants that can be used by any module in the program is possible when they are declared as
a) PUBLIC
b) LOCAL
c) GLOBAL
d) Either PUBLIC or GLOBAL
View Answer

Answer: c
Explanation: The labels, constants, variables, procedures declared as GLOBAL can be used by any module in the program.

Sanfoundry Global Education & Learning Series – Microprocessors.

Here’s the list of Best Books in Microprocessors.

To practice all areas of Microprocessors, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.