CS401p Final Term Exam 2023
MCQS:
1. MOV AX, 0X4C00 INT 0X21 Which of the following is the purpose of the
given instructions?
Choices:
a. Move a number into AX
b. Terminate a program
c, Variable definition
d. Move AX into 0X4C00
2. Processor uses both big-endian and little-endian notations based onre
requirements.
Choices:
a. Intel
b. Motorola
c. SPARC
d. AMD
3. To avoid C++ name mangling scheme, we can use directive.
Choices:
a. mang
b. call
c. extern
d. rollback
4. instruction is used to set VESA video mode.
Choices:
a. mov ax, 0x4f01
b. mov ax, 0x4f02
c. mov bx, 0x4f01
d. mov bx, 0x4f02
5. instruction is used to get VESA- SuperVGA Mode Information.
Choices:
a. mov ax, 0x4f01
b. mov ax, 0x4f02
c. mov bx, 0x4f01
d. mov bx, 0x4f02
6. The VESA VBE 2.0 mode allows access to the video memory.
Choices:
a. protected
b. private
c. direct
7. If we turn on the least significant bit of CRO, the processor switches to
Attempted G mode. Choices:
a. secure
b. public
c. private
d. protected
8. In DOS structure, the boot sector is located at head and track
Choices:
a. 0,0
b. 0,1
c. 0,2
d. 1,2
9. While using INT 21 CREATE OR TRUNCATE FILE, we set AH =
Choices:
a. 3Ah
b. 3Bh
c. 3Ch
d. 3Dh
So, the correct choice is: 3Ch
10. How would you install the NASM in your 64-bit Windows environment?
Choices:
a. Install exe version of NASM and install directly in 64-bit Windows
b. The NASM cannot be installed in 64-bit Windows in any way
c. Install the DOSBox followed by mounting the assmsoft directory
d. Unrar the NASM and install directly in Windows
Install exe version of NASM and install directly in 64-bit Windows
11. mov [123], ax Which addressing mode is used in the above instruction?
Choices:
a. Index Addressing Mode
b. Direct Addressing Mode
c. Offset Addressing Mode
d. Base+Ofset Addressing Mode
Direct Addressing Mode
12. mov ax,40 3. mov ax,0x21 4. mov ax, 04c00 5. int 0x21 In the above
instructions, which line will cause the error?
Choices:
a. 1
b. 3
c. 4
4. mov ax, 04c00
13. register is used as a source register in OUT instruction and for
destination register.
Choices:
a. AX or BH, BX or BH
b. AX or AH, AX or AL
c. AX or AL, AX or AL
d. AX or AH, AX or AH
Source Register: AX or AL
Destination Register: DX or AL
14. In the keyboard scan code, the lower 7 bits represent significant bit
indicates the button is pressed if it is while the most
Choices:
a. key number, 0
b. key number, 1
c. ASCII code, 0
d. ASCII code, 1 O
So, the correct choice is: key number, 0
15. In the Interrupt Vector Table (IVT), the first 2 bytes store later 2 bytes
store and the
Choices:
a. segment of ISR,
b. segment of ISR offset of ISR,
c. offset of ISR segment of ISR, offset of ISR
d. offset of ISR, segment of ISR
So, the correct choice is: offset of ISR, segment of ISR
16. When an element is pushed on the stack, SP is
Choices:
a. Decremented, 1
b. Incremented, 1
c. Decremented, 2
d. Incremented, 2
So, the correct choice is: Decremented, 2
17. operation inverts the corresponsing bits.
Choices:
a. NOR
b. NOT
c. NAND
d. XNOR
So, the correct choice is: NOT
18. There are 1________ basic bitwise logical operations.
Choices:
a. 4
b. 5
c. 7
There are 5 basic bitwise logical operations.
1. AND
2. OR
3. NOT
4. XOR (Exclusive OR)
5. NAND (NOT AND)
19. For INT 10- VIDEO - SET TEXT-MODE CURSOR SHAPE, the value of AH=
Choices:
a. 01h
b. 02h
c. 03h
d. 04h
So, the correct choice is: 01h
20. In the INT 21 BUFFERED INPUT service, DSDX is used for
Choices:
a. errors list
b. exceptions list
c. DOS input buffer
d. input stream
DOS input buffer
signal must be sent from every interrupt handler invoked through IRQ
Choices: END EXIT EOI EOB
EOI (End Of Interrupt)
interrupt is used for saving and restoring the registers. Choices: INT6 INT7
INT8 INTO
INTO
The Sun Spark processor belongs to a processor family. Choices: CISC RISC
Haswell Broadwell
So, the correct choice is: RISC
is not an out register in Sun Spark processor. Choices: R23 R24 R25 R26
In the Sun SPARC processor, R26 is not an output (OUT) register.
Questions:
1. Write the assembly instructions to call the given function declared in
Clanguage. int input(int x);
2. If we want to write on serial port using BIOS INT 14, then what will be
the values of different registers for using the service? Also writs the return
values.
3. Write assembly language instruction(s) using the following addressing
modes:
• Direct Addressing Mode
Indirect Addressing Mode
⚫ Base Addressing Mode
• Index Addressing Mode
4. Why does size mismatch error occur in the assembly language program
and how it can be resolved?
5. If we want to write on serial port using BIOS INT 14, then what will be the
values of different registers for using the service? Also write they return
values.