Attention: Dear visitors If you find any answer or something wrong on allvirtuals.blogspot.com plz feel free to contact me ali.hse123@gmail.com or leave comments

Saturday 19 November 2011

CS401 Mid Term solved


Question # 1
Numbers of any size can be added using a proper combination of __________.
1) : ADD and ADC
2) : ABD and ADC
3) : ADC and ADC
4) : None of the Given
Correct Option : 1 From : Lecture 11

Question # 2
Like addition with carry there is an instruction to subtract with borrows called____________.
1) : SwB
2) : SBB
3) : SBC
4) : SBBC
Correct Option : 2 From : Lecture 11

Question # 3
if “and ax, bx” instruction is given, There are _____________ operations as a result
1) : 16 AND
2) : 17 AND
3) : 32 AND
4) : 8 AND
Correct Option : 1 From : Lecture 12

Question # 4
____________can be used to check whether particular bits of a number are set or not.
1) : AND
2) : OR
3) : XOR
4) : NOT
Correct Option : 1 From : Lecture 12

Question # 5
__________can also be used as a masking operation to invert selective bits.
1) : AND
2) : OR
3) : XOR
4) : NOT
Correct Option : 3 From : Lecture 12

Question # 6
Masking Operations are Selective Bit ______________________
1) : Clearing, XOR, Inversion and Testing
2) : Clearing, Setting, Inversion and Testing
3) : Clearing, XOR, AND and Testing
4) : None of the Given
Correct Option : 2 From : Lecture 12

Question # 7
The ____________ instruction allows temporary diversion and therefore reusability of code.
1) : CALL
2) : RET
3) : AND
4) : XOR
Correct Option : 1 From : Lecture 13

Question # 8
CALL takes a label as _____________ and execution starts from that label,
1) : argument
2) : Lable
3) : TXt
4) : Register
Correct Option : 1 From : Lecture 13

Question # 9
When the __________instruction is encountered and it takes execution back to the instruction following the CALL.
1) : CALL
2) : RET
3) : AND
4) : XOR
Correct Option : 2 From : Lecture 13

Question # 10
_______________________ Both the instructions are commonly used as a pair, however technically they are independent in their operation.
1) : RET and ADC
2) : Cal and SSb
3) : CALL and RET
4) : ADC and SSB
Correct Option : 3 From : Lecture 13

Question # 11
The CALL mechanism breaks the thread of execution and does not change registers, except ____________.
1) : SI
2) : IP
3) : DI
4) : SP
Correct Option : 2 From : Lecture 13

Question # 12
Stack is a ______ that behaves in a first in last out manner.
1) : Program
2) : data structure
3) : Heap
4) : None of the Given
Correct Option : 2 From : Lecture 14

Question # 13
If ____________ is not available, stack clearing by the callee is a complicated process.
1) : CALL
2) : SBB
3) : RET n
4) : None of the Given
Correct Option : 3 From : Lecture 14

Question # 14
When the stack will eventually become full, SP will reach 0, and thereafter wraparound producing unexpected results. This is called stack ________
1) : Overflow
2) : Leakage
3) : Error
4) : Pointer
Correct Option : 1 From : Lecture 14

Question # 15
The pop operation makes a copy from the top of the stack into its_______________.
1) : Register
2) : operand
3) : RET n
4) : Pointer
Correct Option : 2 From : Lecture 14

Question # 16
_______________decrements SP (the stack pointer) by two and then transfers a word from the source operand to the top of stack
1) : PUSH
2) : POP
3) : CALL
4) : RET
Correct Option : 1 From : Lecture 14

Question # 17
POP transfers the word at the current top of stack (pointed to by SP) to the destination operand and then __________ SP by two to point to the new top of stack.
1) : increments
2) : dcrements
3) : ++
4) : --
Correct Option : 1 From : Lecture 14

Question # 18
The trick is to use the ________and ___________operations and save the callers’ value on the stack and recover it from there on return.
1) : POP, ADC
2) : CALL, RET
3) : CALL, RET n
4) : PUSH, POP
Correct Option : 4 From : Lecture 14

Question # 19
To access the arguments from the stack, the immediate idea that strikes is to __________ them off the stack.
1) : PUSH
2) : POP
3) : CALL
4) : Rrgister
Correct Option : 2 From : Lecture 15

Question # 20
push bp
we are ________________
1) : sending bp copy to stack
2) : making bp copy from stack
3) : pushing bp on the stack
4) : doing nothing
Correct Option : 3 From : Lecture 15

Question # 21
Local Variables means variables that are used within the ___________________
1) : Subroutine
2) : Program
3) : CALL
4) : Label
Correct Option : 1 From : Lecture 15

Question # 22
Standard ASCII has 128 characters with assigned numbers from ________.
1) : 1to 129
2) : 0 to 127
3) : 0 to 128
4) : None of the Given
Correct Option : 2 From : Lecture 16

Question # 23
When _______ is sent to the VGA card, it will turn pixels on and off in such a way that a visual representation of ‘A’ appears on the screen.
1) : 0x60
2) : 0x90
3) : 0x30
4) : 0x40
Correct Option : 4 From : Lecture 16

Question # 24
Which bit is refer to the Blinking of foreground character
1) : 6
2) : 7
3) : 5
4) : 3
Correct Option : 2 From : Lecture 16

Question # 25
Which bit is refer to the Intensity component of foreground color
1) : 4
2) : 5
3) : 3
4) : 7
Correct Option : 3 From : Lecture 16

Question # 26
Which bit is refer to the Green component of background color
1) : 1
2) : 5
3) : 3
4) : 7
Correct Option : 2 From : Lecture 16

Question # 27
Which bit is refer to the Green component of foreground color
1) : 1
2) : 5
3) : 3
4) : 7
Correct Option : 1 From : Lecture 16

Question # 28
String can be indicate bye given
1) : db 0x61, 0x61, 0x63
2) : db 'a', 'b', 'c'
3) : db 'abc'
4) : All of the above
Correct Option : 4 From : Lecture 16

Question # 29
The first form divides a 32bit number in DX:AX by its 16bit operand and stores the ___________ quotient in AX
1) : 16bit
2) : 17bit
3) : 32bit
4) : 64bit
Correct Option : 1 From : Lecture 17

Question # 30
The ___________ (division) used in the process is integer division and not floating point division.
1) : DIV instruction
2) : ADC instruction
3) : SSB instruction
4) : DIVI instruction
Correct Option : 1 From : Lecture 17

Question # 31
______________(multiply) performs an unsigned multiplication of the source operand and the accumulator.
1) : Multi
2) : DIV
3) : MUL
4) : Move
Correct Option : 3 From : Lecture 18

Question # 32
The desired location on the screen can be calculated with the following formulae.
1) : location = ( hypos * 80 + SP ) * 3
2) : location = ( hypos * 80 + slocation ) * 2
3) : location = ( hypos * 80 + epos ) * 2
4) : None of the Given
Correct Option : 3 From : Lecture 18

Question # 33
To play with string there are 5 instructions that are __________
1) : STOS, LODS, CMPS, SCAS, and MOVS
2) : MUL, DIV, ADD, ADC and MOVE
3) : SSB, ADD, CMPS, ADC, and MOVS
4) : None of the Given
Correct Option : 1 From : Lecture 18

Question # 34
_______transfers a byte or word from register AL or AX to the string element addressed by ES:DI and updates DI to point to the next location.
1) : LODS
2) : STOS 
3) : SCAS
4) : MOVE
Correct Option : 2 From : Lecture 18

Question # 35
____________ transfers a byte or word from the source location DS:SI to AL or AX and updates SI to point to the next location.
1) : LODS 
2) : STOS
3) : SCAS
4) : MOVE
Correct Option : 1 From : Lecture 18

Question # 36
_______compares a source byte or word in register AL or AX with the destination string element addressed by ES: DI and updates the flags.
1) : LODS
2) : STOS
3) : SCAS
4) : MOVE
Correct Option : 3 From : Lecture 18

Question # 37
____________ repeat the following string instruction while the zero flag is set and REPNE or REPNZ repeat the following instruction while the zero flag is not set.
1) : REP or REPZ
2) : REPE or REPZ
3) : REPE or RPZ
4) : RPE or REPZ
Correct Option : 2 From : Lecture 18

Question # 38
LES loads ______________
1) : ES
2) : DS
3) : PS
4) : LS
Correct Option : 1 From : Lecture 20

Question # 39
LDS loads_______.
1) : ES
2) : DS
3) : PS
4) : LS
Correct Option : 2 From : Lecture 20

Question # 40
REP allows the instruction to be repeated ____________ times allowing blocks of memory to be copied.
1) : DX
2) : CX
3) : BX
4) : AX
Correct Option : 2 From : Lecture 20

Question # 41
___________pops IP, then CS, and then FLAGS.
1) : Ret n
2) : REZA
3) : REPE
4) : IRET
Correct Option : 4 From : Lecture 21


Question # 42
________ , Trap, Single step Interrupt
1) : INT 0
2) : INT 1
3) : INT 3
4) : INT 0
Correct Option : 2 From : Lecture 21

Question # 43
_________,NMI-Non Maskable Interrupt
1) : INT 0
2) : INT 1
3) : INT 3
4) : INT 0
Correct Option : 3 From : Lecture 21

Question # 44
To hook an interrupt we change the _________ corresponding to that interrupt.
1) : SX
2) : vector
3) : AX
4) : BX
Correct Option : 2 From : Lecture 22
Question # 1
___________pops IP, then CS, and then FLAGS.
1) : Ret n
2) : REZA
3) : REPE
4) : IRET
Correct Option : 4 From : Lecture 21

Question # 2
________ , Trap, Single step Interrupt
1) : INT 0
2) : INT 1
3) : INT 3
4) : INT 0
Correct Option : 2 From : Lecture 21

Question # 3
_________,NMI-Non Maskable Interrupt
1) : INT 0
2) : INT 1
3) : INT 3
4) : INT 0
Correct Option : 3 From : Lecture 21

Question # 4
To hook an interrupt we change the _________ corresponding to that interrupt.
1) : SX
2) : vector
3) : AX
4) : BX

By HSE with No comments

0 comments:

Post a Comment