Engineering Questions with Answers - Multiple Choice Questions

MCQs on Assembler Directives and Operators

1 - Question

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 - Question

 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 - Question

Match the following

   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.




4 - Question

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 - Question

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.




6 - Question

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 - Question

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 - Question

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.




9 - Question

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 - Question

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.

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