This set of Computer Organization and Architecture Multiple Choice Questions & Answers (MCQs) focuses on “Assembly Language”.
1. ____ converts the programs written in assembly language into machine instructions.
a) Machine compiler
Explanation: An assembler is a software used to convert the programs into machine instructions.
2. The instructions like MOV or ADD are called as ______
d) None of the mentioned
Explanation: This OP – codes tell the system what operation to perform on the operands.
3. The alternate way of writing the instruction, ADD #5,R1 is ______
a) ADD ,[R1];
b) ADDI 5,R1;
c) ADDIME 5,[R1];
d) There is no other way
Explanation: The ADDI instruction, means the addition is in immediate addressing mode.
4. Instructions which won’t appear in the object program are called as _____
a) Redundant instructions
d) Assembler Directives
Explanation: The directives help the program in getting compiled and hence wont be there in the object code.
5. The assembler directive EQU, when used in the instruction: Sum EQU 200 does ________
a) Finds the first occurrence of Sum and assigns value 200 to it
b) Replaces every occurrence of Sum with 200
c) Re-assigns the address of Sum by adding 200 to its original address
d) Assigns 200 bytes of memory starting the location of Sum
Explanation: This basically is used to replace the variable with a constant value.
6. The purpose of the ORIGIN directive is __________
a) To indicate the starting position in memory, where the program block is to be stored
b) To indicate the starting of the computation code
c) To indicate the purpose of the code
d) To list the locations of all the registers used
Explanation: This does the function similar to the main statement.
7. The directive used to perform initialization before the execution of the code is ______
8. _____ directive is used to specify and assign the memory required for the block of code.
Explanation: This instruction is used to allocate a block of memory and to store the object code of the program there.
9. _____ directive specifies the end of execution of a program.
Explanation: This instruction directive is used to terminate the program execution.
10. The last statement of the source program should be _______
Explanation: This enables the processor to load some other process.
11. When dealing with the branching code the assembler ___________
a) Replaces the target with its address
b) Does not replace until the test condition is satisfied
c) Finds the Branch offset and replaces the Branch target with it
d) Replaces the target with the value specified by the DATAWORD directive
Explanation: When the assembler comes across the branch code, it immediately finds the branch offset and replaces it with it.
12. The assembler stores all the names and their corresponding values in ______
a) Special purpose Register
b) Symbol Table
c) Value map Set
d) None of the mentioned
Explanation: The table where the assembler stores the variable names along with their corresponding memory locations and values.
13. The assembler stores the object code in ______
a) Main memory
d) Magnetic disk
Explanation: After compiling the object code, the assembler stores it in the magnetic disk and waits for further execution.
14. The utility program used to bring the object code into memory for execution is ______
Explanation: The program which is used to load the program into memory.
15. To overcome the problems of the assembler in dealing with branching code we use _____
d) Two-pass assembler
Explanation: This creates entries into the symbol table first and then creates the object code.
Sanfoundry Global Education & Learning Series – Computer Organization and Architecture.