0% found this document useful (0 votes)
153 views5 pages

Sample Paper cs401p

Cs401 p sample paper
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views5 pages

Sample Paper cs401p

Cs401 p sample paper
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Sample Paper

FINALTERM EXAMINATION
Fall 2022
CS401P-Assembly Language Programming Practical

Time: 90 min
Marks: 60

Question No: 1 (Marks: 01) - Please choose the correct option

What is the function of the "MOV" instruction in assembly language?


a. To move data from one register to another
b. To copy data from memory to a register
c. To transfer control to another part of the program
d. To compare values stored in two registers

Question No: 2 (Marks: 01) - Please choose the correct option

How many bits are in a typical register in x86 assembly language?


a. 8 bits
b. 16 bits
c. 32 bits
d. 64 bits
Question No: 3 (Marks: 01) - Please choose the correct option

What is the function of the "PUSH" instruction in assembly language?


a. To push data onto the stack
b. To pop data off the stack
c. To clear the stack
d. To access data stored on the stack
Question No: 4 (Marks: 01) - Please choose the correct option

What is the purpose of the "CMP" instruction in assembly language?


a. To compare values stored in two registers
b. To move data from one register to another
c. To transfer control to another part of the program
d. To add two values stored in registers

Question No: 5 (Marks: 01) - Please choose the correct option

What is the function of the "JMP" instruction in assembly language?


a. To transfer control to another part of the program
b. To perform a conditional jump based on the result of a previous comparison
c. To add two values stored in registers
d. To push data onto the stack

Question No: 6 (Marks: 01) - Please choose the correct option

How does the "INT" instruction work in assembly language?


a. It triggers an interrupt request
b. It transfers control to an interrupt handler routine
c. It disables interrupts
d. It clears the interrupt flag
Question No: 7 (Marks: 01) - Please choose the correct option

What is the purpose of the "RET" instruction in assembly language?


a. To return from a subroutine
b. To transfer control to another part of the program
c. To add two values stored in registers
d. To push data onto the stack.

Question No: 8 (Marks: 01) - Please choose the correct option

What is the function of the "LEA" instruction in assembly language?


a. To load effective address into a register
b. To move data from one register to another
c. To compare values stored in two registers
d. To transfer control to another part of the program
Question No: 9 (Marks: 01) - Please choose the correct option

What is the purpose of the "NOP" instruction in assembly language?


a. To do nothing
b. To clear the contents of a register
c. To transfer control to another part of the program
d. To add two values stored in registers
Question No: 10 (Marks: 01) - Please choose the correct option

How does the "HLT" instruction work in assembly language?


a. It halts the program execution
b. It transfers control to another part of the program
c. It adds two values stored in registers
d. It pushes data onto the stack
Question No: 11 (Marks: 01) - Please choose the correct option

What is the function of the "ADD" instruction in assembly language?


a. To add two values stored in registers
b. To move data from one register to another
c. To compare values stored in two registers
d. To transfer control to another part of the program
Question No: 12 (Marks: 01) - Please choose the correct option

What is the purpose of the "SUB" instruction in assembly language?


a. To subtract two values stored in registers
b. To move data from one register to another
c. To compare values stored in two registers
d. To transfer control to another part of the program
Question No: 13 (Marks: 01) - Please choose the correct option

How does the "XOR" instruction work in assembly language?


a. It performs bitwise exclusive OR operation on two values stored in registers
b. It transfers control to another part of the program
c. It adds two values stored in registers
d. It pushes data onto the stack
Question No: 14 (Marks: 01) - Please choose the correct option

What is the function of the "AND" instruction in assembly language?


a. To perform bitwise AND operation on two values stored in registers
b. To move data from one register to another
c. To compare values stored in two registers
d. To transfer control to another part of the program
Question No: 15 (Marks: 01) - Please choose the correct option
What is the purpose of the "OR" instruction in assembly language?
a. To perform bitwise OR operation on two values stored in registers
b. To move data from one register to another
c. To compare values stored in two registers
d. To transfer control to another part of the program
Question No: 16 (Marks: 01) - Please choose the correct option

How does the "NOT" instruction work in assembly language?


a. It performs bitwise NOT operation on a value stored in a register
b. It transfers control to another part of the program
c. It adds two values stored in registers
d. It pushes data onto the stack
Question No: 17 (Marks: 01) - Please choose the correct option

What is the function of the "SHL" instruction in assembly language?


a. To perform a bitwise shift left operation on a value stored in a register
b. To move data from one register to another
c. To compare values stored in two registers
d. To transfer control to another part of the program
Question No: 18 (Marks: 01) - Please choose the correct option

What is the purpose of the "SHR" instruction in assembly language?


a. To perform a bitwise shift right operation on a value stored in a register
b. To move data from one register to another
c. To compare values stored in two registers
d. To transfer control to another part of the program
Question No: 19 (Marks: 01) - Please choose the correct option

How does the "ROL" instruction work in assembly language?


a. It performs a bitwise rotate left operation on a value stored in a register
b. It transfers control to another part of the program
c. It adds two values stored in registers
d. It subtracts two values stored in registers

Question No: 20 (Marks: 01) - Please choose the correct option


What is the function of the "ROR" instruction in assembly language?
a. It performs a bitwise rotate right operation on a value stored in a register
b. It transfers control to another part of the program
c. It adds two values stored in registers
d. It pushes data onto the stack
Question No: 21 (Marks: 01) - Please choose the correct option

What is the purpose of the "JMP" instruction in assembly language?


a. To jump to a specific memory location
b. To move data from one register to another
c. To compare values stored in two registers
d. To transfer control to another part of the program
Question No: 22 (Marks: 01) - Please choose the correct option

How does the "JE" instruction work in assembly language?


a. It jumps to a specific memory location if two values stored in registers are equal
b. It transfers control to another part of the program
c. It adds two values stored in registers
d. It pushes data onto the stack
Question No: 23 (Marks: 01) - Please choose the correct option

What is the function of the "JNE" instruction in assembly language?


a. It jumps to a specific memory location if two values stored in registers are not equal
b. To move data from one register to another
c. To compare values stored in two registers
d. To transfer control to another part of the program
Question No: 24 (Marks: 01) - Please choose the correct option

What is the purpose of the "JB" instruction in assembly language?


a. It jumps to a specific memory location if the lower order bit is set
b. To move data from one register to another
c. To compare values stored in two registers
d. To transfer control to another part of the program

Question No: 31 (Marks: 05)

Write assembly language program which hook into the keyboard interrupt to capture
key presses.

Question No: 32 (Marks: 05)

Write an assembly language TSR program that will print the total number of
characters of a string.

Question No: 33 (Marks: 05)

Write a assembly language program that get terminated when you will press any key
from keyboard.

Question No: 34 (Marks: 05)

Write a assembly language program that will perform the following operations:

1. Read two values, x and y, from the user.


2. Calculate the sum of x and y and store the result in a register.

Question No: 35 (Marks: 05)

Write a assembly language program that will compare two numbers and print the
status on the screen.
Read two numbers from the screen then compare these number and print on the screen
which number is greater.

Question No: 36 (Marks: 05)


Write a assembly language program that will perform the following operations:

1. Read an integer value, n, from the user.


2. Calculate the factorial of n using a loop.
3. Display the result of the factorial calculation on the screen.

You might also like