Vous êtes sur la page 1sur 9

CS609-System Programming

Final Term Examination


SEMESTER FALL 2005
www.vujannat.ning.com
Write a TSR program that will prevent the block with the physical address sec= 10,
head =0, track= 20, to be written on the first physical hard drive, Interrupt used to write a
block is 13h/3h. AL=physical drive no., BH=head, BL=track no. and CH=Track no.
Hardware cost in case of computer to computer communication via serial ports can be
reduced by using software driven flow control. In this case the DTR, DSR, RTS and
CTR lines can be ommited and the flow control is performed through software. The
software uses two control characters ^S (XON) and ^T (XOFF) such that recieval of
XON indicates start of data transfer and XOFF indicated temporary pause in
communication to match the throughputs of receiver and sender. Write a program that
will perform communication for a serial ports using the software oriented flow
control method as described above.

Write a program which when resident makes use of some hot keys to control the
typematic rate of keyboard, i.e. Each time CTRL+U is pressed the typematic rate
increases one step and when CTRL+D is pressed the typematic rate decreases one
step

Describe COM and EXE file viruses, Give an algorithm that can be
used to prevent a virus from changing the file size of COM or EXE
file during propagation state?
CS609-System Programming
Final Term Special 2006
Closed Handouts Papers
www.vujannat.ning.com
Q#1:-Explain the term TSR. State reasons why there is a need to make a program
TSR? What code you have to add while making a program TSR?

Q#2:-As you know each entry in FAT12 is 12-bits wide, but we can address to a byte
or double word etc and not a single bit.
a- So how can we access a 12-bit entry without losing any information? (5)
b- Why this is not a problem in FAT16
(5)

Q#3:-What are different types of viruses? What is the major difference between a
computer virus and a worm?

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

Q#6:-Extended memory is available if the processor is of the type


• None of the given choices
• All of the given choices
• XT
• AT

Q#7:-In NTFS, boot sector is stored at


• First and 6th sector
• First and Last sector
• Only at Last sector
• Only at First sector
Q#8:-DMA driven IO is the technique used for performing IO
• All of the given choices
• By transferring the data directly from IO port to processor and vice versa
• By using the processor to perform an IO routine only when data for IO
operation is available.
• By keeping the processor tied up either checking for the possibility of an IO
operation or performing the IO operation

Q#9:-A full duplex communication system is to be implementing using a PPI


(peripheral programmable interface). By the virtue of the printer interface provided
by the standard PCs the unit of data transfer for such communication will be
• A double word
• A word
• A byte
• A nibble
WWW.vujannat.ning.Com
Connecting VU Students

CS609 System Programming


Final Term Examination – Spring 2006
Time Allowed: 150 Minutes

Question No. 1 Marks : 10

As you know each entry in FAT12 is 12-bits wide, but we can address to a byte or double word
etc and not a single bit.
a- So how can we access a 12-bit entry without losing any information? (4)
b- Consider the following example: (6)

Offset value
373H 59H
374H 23H
375H 53H
376H 72H
377H 53H
378H 55H
379H 52H
380H 25H
381H 56H
382H 62H
383H 25H

Question No. 2 Marks : 6

Write a function that takes drive number as an input and return the far address of Drive
Parameter Block.

Question No. 3 Marks : 9


How can we determine that a particular system contains FAT12, FAT16 or FAT32 file system?
Write down an algorithm for it.

Question No. 4 Marks : 9

Write down three differences between Logical Sector Number (LSN) and Logical Block
Addressing (LBA).

Question No. 5 Marks : 10

Write a program that store all the bytes received through COM1 port and save it to a file.

Question No. 6 Marks : 6

Write a program that modifies the typematic rate of the keyboard. It will change the delay
to 1/4 second and typematic rate to 2 characters per second.
CS609-System Programming
Midterm Fall2005
www.vujannat.ning.com
What are the differences between hardware and software interrupts? How would a
procedure written for software interrupt will be different from that written for hardware
interrupt?

What are the differences between hardware and software interrupts? 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 interrup
www.vujannat.ning.com

CS609 System Programming


Mid Term Examination – Spring 2006
Time Allowed: 90 Minutes

Please read the following instructions carefully before attempting any


of the questions:
1. This is an open notes examination.
2. Attempt all questions. Marks are written adjacent to each question.
3. Do not ask any questions about the contents of this examination from
anyone.
a. If you think that there is something wrong with any of the
questions, attempt it to the best of your understanding.
b. If you believe that some essential piece of information is missing,
make an appropriate assumption and use it to solve the problem.
c. Write all steps, missing steps may lead to deduction of marks.

You are allowed to use any C compiler to write and test your code. If you
do so please remember to copy and paste your code into the examination
solution area. (Do NOT share your code; your colleague could get
higher marks than you!!)

**WARNING: Please note that Virtual University takes serious note of unfair
means. Anyone found involved in cheating will get an `F` grade in this course.

Question No. 1 Marks : 2

If CPUID instruction is not present then the processor can be a

 486 processor
 386 processor
 286 processor
 All of the above

Question No. 2 Marks : 2

On the execution of IRET instruction, number of bytes popped from stack is

 4 bytes
 6 bytes
 8 bytes
 10 bytes

Question No. 3 Marks : 2

Keyboard Status Byte is located at the address

 0040:0000H
 0040:0013H
 0040:0015H
 0040:0017H

Question No. 4 Marks : 2

If we use keep (0, 1000) in a TSR program, the memory allocated to it is

 64000 bytes
 32000 bytes
 16000 bytes
 80000 bytes

Question No. 5 Marks : 2

Maximum number of interrupts in a standard PC is

 64
 128
 256
 512

Question No. 6 Marks : 15

Write a TSR program that changes the background color of the screen after every 15
seconds by accessing the text display memory. As you know, in DOS initially the
background color of the screen is black, but after running your program it should switch
between blue and green backgrounds. This means that after first 15 seconds background
color should be blue and when further 15 seconds are passed it should turn into green
and continue this color switching after every 15 seconds.

Question No. 7 Marks : 10

What is the difference between a simple program and a TSR program? How can we stop
multiple loading of a TSR program into memory?

Question No. 8 Marks : 15

How interrupts are processed? List down five differences between hardware and
software interrupts.

Vous aimerez peut-être aussi