Cs609 Mcqs For Papers by $hining $tar
Cs609 Mcqs For Papers by $hining $tar
*$HINING $TAR*
What are the differences between hardware and software interrupts?
Software interrupts are invoked by means of some software instruction or statement and
hardware interrupt is invoked by means of some hardware controller generally. The only
difference between them is the method by which they are invoked
How would a procedure written for software interrupt will be different from that written
for hardware interrupt?
Write a program that will turn on/off the speaker and connect it with the interval timer whenever
Ctrl+Alt+S is pressed Timer interrupt
#include <dos.h>
#include <bios.h>
void interrupt (*oldint15) ( );
void interrupt newint15 (unsigned int BP, unsigned int DI,
unsigned int SI, unsigned int DS, unsigned int ES,
unsigned int DX, unsigned int CX, unsigned int BX,
unsigned int AX, unsigned int IP, unsigned int CS,
unsigned int flags);
void main ( )
{
oldint15 = getvect (0x15);
setvect (0x15, newint15);
keep (0, 1000);
}
void interrupt newint15( unsigned int BP, unsigned int DI,
unsigned int SI, unsigned int DS, unsigned int ES,
unsigned int DX, unsigned int CX, unsigned int BX,
unsigned int AX, unsigned int CS, unsigned int IP,
unsigned int flags)
{
if (_AH = = 0x4F)
{
if (_AL == 0x1F)
{
outport (0x43, 0xB4);
outport (0x42, 0xFF);
outport (0x42, 0x21);
outport (0x61, inport(0x61) ^ 3);
}
}
else
(*oldint15) ( );
}
CS609 MCQs For Papers By
*$HINING $TAR*
What is the difference between a simple program and a TSR program? How can we stop
multiple loading of a TSR program into memory?
TSR (Terminate and Stay Resident) program is a program which programs the interrupt number
65H but in this case the new interrupt 65H function remains in memory even after the
termination of the program and hence the vector of int 65h does not become a dangling pointer.
A TSR need to be loaded once in memory. Multiple loading will leave redundant copies in
memory So we need to have some check which will load the program only once
How interrupts are processed? List down five differences between hardware and software
interrupts.
Software interrupts are invoked by means of some software instruction or statement and
hardware interrupt is invoked by means of some hardware controller generally.
If data is to transferred from one computer to another through some media which can carry
digital data then the modem can be eliminated and the UART on both computers can be
interconnected. Such arrangement is called a NULL modem
Interrupt means to break the continuity of some ongoing task. When we talk of computer
interrupt we mean exactly the same in terms of the processor. When an interrupt occurs the
continuity of the processor is broken and the execution branches to an interrupt service
routine.Two types of interrupts are:
Software interrupts
Hardware Interrupts.
Http://www.vusr.net
DMA stands for Direct Memory Access.
REGS is a _______
Set the Interrupt vector means to change the double word sized interrupt vector within IVT.
T/F
An I/O device cannot be directly connected to the busses so controller is placed between CPU
and I/O.
PPI interconnection _______ bits is cleared to indicate low nibble is being sent.
D1, D2, D3, D4
Write TSR to display name in center with interrupt 8 provided 1990 is center index. 10 marks
void interrupt (*1990)();
void main()
{
old=getvect(0x08);
setvect(0x08,newint);
keep(0,1000);
}
void interrupt newint ()
{
…
…
(*1990)();
}
What will be the value of DL Register when we are accessing C drive using undocumented
service 21H/32H?
0
1
2
3
Using the____ entry and the FAT we can access the contents of file.
Reserved blocks
Root Directory
Number of FAT copies
None of the given
FAT based file system can store file name in ____ form
ASCII
UNICODE
Both ASCII and UNICODE
None
If a file size is 12K and the size of the cluster is 4K then ____ clusters are used for the file.
2
3
4
5
A file has 2 clusters and the size of cluster is 4K. What will be the size of file?
2K
8K
16K
32K
1. There are two main types of interrupts namely Hardware and Software interrupts
2. To set the interrupt vector means is to change the double word sized interrupt vector
within the IVT. (True / False)
4. The keyboard makes use of interrupt number _______ for its input operations.
(9,10,11,12)
5. The service _________ is called the keyboard hook service. (15H/2FH, 15H/4FH,
15H/FFH )
6. The BIOS interrupt ________ can be used to configure RTC. (1AH, 2AH, 3AH, 4AH)
7. The interval timer can operate in _______ modes. (Five, Seven, Four, Six)
10. Int ________ is used to control the printer via the BIOS. (17H, 18H, 20H, 21H)
CS609 MCQs For Papers By
*$HINING $TAR*
11. Counter register can be used to divide clock signal. (True False)
Note : it is also used to divide frequency (See #69)
14. The bit # _______ of the coprocessor control word is the interrupt enable flag. (7,8,9, 6)
16. ________ store the base address for LPT1. (40:00H , 40:02H ,40:08H, 40:1AH)
17. The amount of memory above conventional memory (extended memory) can be
determined using the service _______. (15H/88H, 16H/88H, 17H/88H, 21H/88H)
18. The output on the monitor is controller by a controller called __________ within the PC.
(Video controller, Bus controller, Ram controller, None of the given)
19. The keyboard input character scan code is received at ___ port.
(60H,61H,62H,63H,64H )
23. How communication between modem can performed (in terms of data transfer).
[5marks]
Modem is generally used to send /receive data to/from an analog telephone. Had the
telephone line been purely digital there would have been no need of a modem in this
form. If data is to transferred from one computer to another through some media which
can carry digital data then the modem can be eliminated and the UART on both
computers can be interconnected. Such arrangement is called a NULL modem.
BY MISHII
Function to toggle speaker between on and off
The port 61h is used to control the speaker only the least significant 2 bits are important. Bit 0 is
used to connect the interval timer to the speaker and the bit #1 is used to turn the speaker on off.
Rest of the bits are used by other devices.
Parallel communication
PPI is used to perform parallel communication. Devices like printer are generally based on
parallel communication. It’s called parallel because a number of bits are transferred from one
point to another parallel on various lines simultaneously
1AH services
Clock Counter 1AH/00
Set Clock Counter 1AH/01
Read Time 1AH/02
Set Time 1AH/03
Read Date 1AH/04
CS609 MCQs For Papers By
*$HINING $TAR*
Set Date 1AH/05
Set Alarm 1AH/06
Disable Alarm 1AH/07
Read Alarm 1AH/09
Coprocesser
To access the block within cluster using BIOS services the cluster
number should be converted into _____.
Select correct option:
CHS
LBA
LSN
None of the given
True
False
Question # 6 of 10 ( Start time: 12:26:16 PM ) Total Marks: 1
Jump code part contains ____ bytes in boot block.
Select correct option:
3
5
8
11
Array
Tree
Linked list
None of the given
CS609 MCQs For Papers By
*$HINING $TAR*
Question # 10 of 10 ( Start time: 12:30:19 PM ) Total Marks: 1
______ is the first block on disk.
Select correct option:
LSN =0
LBA=0
LBA=1
Both LBA=0 and LSN=0
CHS
LBA
LSN
None of the given
Cluster is available
It is a Reserved cluster
It is next file cluster
It is a last file cluster
0000H
CS609 MCQs For Papers By
*$HINING $TAR*
1111H
FFFFH
None of the given.
True
False
3
5
8
11
Reserved Blocks
Number of FAT copies
File Allocation Table (FAT)
None of the given
Array
CS609 MCQs For Papers By
*$HINING $TAR*
Tree
Linked list
LSN =0
LBA=0
LBA=1
Both LBA=0 and LSN=0
26
28
30
32
Contiguous
Chained
Indexed (guess)
None of the given
CS609 MCQs For Papers By
*$HINING $TAR*
Question # 4 of 10 ( Start time: 02:35:53 PM ) Total Marks: 1
If a file size is 12K and the size of the cluster is 4K then _____ clusters are used for the file.
Select correct option:
2
3
4
5
Nibble
Byte
2 Bytes
4 Bytes
FAT12
FAT16
FAT32
None of the given
12
20
26
32
2K
8K
16K
32K
CS609 MCQs For Papers By
*$HINING $TAR*
In NTFS, Backup of boot block is stored at block # __________.
Select correct option:
2
6
8
10
E5
1
0
N
2) Highest capacity physical capacity of the disk according to the IDE interface is
_________.
a) 127 GB
b) 100 GB
c) 80 GB
d) 300 GB
8) The built in mechanism within the UART for error detection is_____________
a) hamming code
b) parity
c) CRC16 (cyclic redundancy check 16 bit )
d) CRC32 (cyclic redundancy check 32 bit )
10) If three Programmable interrupt controllers are cascaded then how many interrupt
driven hardware IO devices can be attached _____________
CS609 MCQs For Papers By
*$HINING $TAR*
a) 12
b) 18
c) 23
d) 24
CS609 MCQs For Papers By
*$HINING $TAR*
CS609 MCQs For Papers By
*$HINING $TAR*
LBA
CS609 MCQs For Papers By
*$HINING $TAR*
3/2
CS609 MCQs For Papers By
*$HINING $TAR*
FALSE
CS609 MCQs For Papers By
*$HINING $TAR*
2^28
CS609 MCQs For Papers By
*$HINING $TAR*
26
CS609 MCQs For Papers By
*$HINING $TAR*
CS609 MCQs For Papers By
*$HINING $TAR*
CS609 MCQs For Papers By
*$HINING $TAR*
DPB
CS609 MCQs For Papers By
*$HINING $TAR*
There are two main types of interrupts, namely
2
4
8
16
ASCII code
Scan code
Both ASCII and Scan code
None of the above
True
False
2
4
6
8
9H
13H
15H
65H
I/O device
CPU
BUS
None of Given
True
False
CS609 MCQs For Papers By
*$HINING $TAR*
Question No: 18 ( Marks: 1 ) - Please choose one
Interrupt ______ is used to get or set the time.
0AH
1AH
2AH
3AH
1A/02H
1A/03H
1A/04H
1A/05H
Asynchronous serial
Synchronous serial
Parallel communication
None of the given
MIDTERM EXAMINATION
Spring 2009
CS609- System Programming (Session - 1)
Question No: 1 ( Marks: 1 ) - Please choose one
Following is not a method of I/O
Programmed I/O
Input driven I/O
Hardware Based I/O
None of given
4
6
8
10
Preemptive
Non-Preemptive
Both Preemptive and Non-Preemptive
None of Given
Reset,Hold,NMI,INTR
CS609 MCQs For Papers By
*$HINING $TAR*
NMI, INTR,Hold,Reset
INTR,NMI,Reset,Hold
None of the Given
Three
Four
Five
Six
I/O device
CPU
BUS
None of Given
LPT1
LPT2
LPT3
LPT4
CS609 MCQs For Papers By
*$HINING $TAR*
Question No: 14 ( Marks: 1 ) - Please choose one
_____ bit is cleared to indicate the low nibble is being sent.
D1
D2
D3
D4
1
3
5
7
INT 10 H
INT 11 H
INT 12 H
INT 13 H
7
8
9
10
True
False
2. Int_____________ service 0 can be used to set the line parameter of the UART or COM port.
• 14H
• 15H
• 13H
• None of the given option
3. In case of synchronous communication a timing signal is required to identify the start and end
of a bit.
• True
• False
4. In self test mode the output of the UART is routed to its input
• True
• False
6. The fuction uses the COM port number to receive a byte from the COM port using
BIOS services.
• recievebyte()
• receive()
• recievechar()
10. The _____________function initialize the COM port whose number is passed as parameter
using BIOS services.
• Initializecom()
• Initialize()
• Recievechar()
• None of these option
11. XON whenever received indicates the start of communication and XOFF whenever
received indicates a temporary pause in the communication.
14. ________ is a device incorporated into the PC to update time even if the computer is off.
• Clock counter
• ROM
• Clock
• Real time clock
CS609 MCQs For Papers By
*$HINING $TAR*
What is the location of timer count in BIOS data area?
Sol.
0040:006C
Once an interrupt occurs it may be required to identify the case of the interrupt. This
register is used to identify the cause of the interrupt.
Interrupt ID Register
0 bit for Trigger Triggered
2 1 bits for Modem/Line
00 =Change in Modem Status
01 = THR is Empty
10 = Data is Ready
11 =Error in Data
Total 26 Questions..
20 mcsqs are from that file which i sent u yesterday...almost all mcqs..
22nd is the abriviations of the internal registers of UARTS e.g THR,RBR etc
Q (5 marks)
Explain the usage of XON and XOFF is software based flow control
Ans (Page # 158 , lec # 17)
Q
Write a function that will read the status of COM Port and return the modem line status is a
unsigned int. COM port number will be passed as parameter.
Q
Write down the detail of the Service (00,01,02) of int 17H which is used in printer.
Q (2 Marks )
write stands for
THR transmitter holding register
RBR receiver buffer register
DLL (band rate divisor) low
DLM (band rate divisor) high
Q#4:-
a. Write down three differences between Logical Sector Number (LSN) and Logical Block
Addressing (LBA).
b. What is meant by polling mode in communication between software and UART and what
is its disadvantage as compared to interrupt mode. [max 5 line answer]
Q#5:-In IRQ2 and IRQ3 which one has the highest priority?
• Can’t be determined
• Both have same priority
• IRQ3
• IRQ2