cs609-midterm-subjectives-solved-with-references-by-moaaz-1.pdf

Verified academic study resource for CS609 (System Programming) under the Computer Science at Virtual University of Pakistan. This PDF document (Midterm Solved Past Paper & Revision File compiled by Moaaz Siddhu) covers Mid-Term Exam Scope (Lectures 1 to 22) spanning approximately 240 pages across 4 curriculum modules, and is indexed for student examination review with instant in-browser preview and 100% free direct download.

Course
CS609 – System Programming
Faculty
Computer Science
Format
PDF
Type
Midterm
Coverage
Mid-Term Exam Scope (Lectures 1 to 22)
Compiled by
Moaaz Siddhu
Tags
SUBJECTIVE, SOLVED, MIDTERM

Focus on core definitions and repeated MCQs from Lectures 1–22. Remember that scoring in the First Half builds your safety buffer toward the mandatory 20% Two-Half passing rule in CS609.

What this file covers — CS609 syllabus roadmap

  1. Core Architecture, Syntax & Primitive Data Structures — Lectures 1 to 6 (Pages 1 to 65). 15% Objective Marks (8–10 MCQs)
  2. Conditional Branching, Loops & Logical Control Flow — Lectures 7 to 12 (Pages 66 to 140). 18% Exam Marks (MCQs + 2-Mark Short Questions)
  3. Memory Management, Pointers, Arrays & Functions — Lectures 13 to 18 (Pages 141 to 215). 22% Exam Marks (High Yield for Midterms)
  4. Midterm Consolidation, Strings & Algorithm Synthesis — Lectures 19 to 22 (Pages 216 to 280). Midterm Exam Culmination (Lectures 1–22 Scope)

Frequently asked questions

Where can I download cs609-midterm-subjectives-solved-with-references-by-moaaz-1.pdf for free?

You can preview and download "cs609-midterm-subjectives-solved-with-references-by-moaaz-1.pdf" (CS609 PDF, ~240 pages) directly from the MIHORA VU Study Library (https://study.mihora.tech/doc/cs609-midterm-subjectives-solved-with-references-by-moaaz-1-pdf) with 100% free high-speed downloads and zero registration requirements.

What syllabus chapters and lectures are covered in this CS609 file?

This document covers Mid-Term Exam Scope (Lectures 1 to 22) across 4 distinct lecture units (Lectures 1 to 6, Lectures 7 to 12, Lectures 13 to 18, Lectures 19 to 22), featuring comprehensive definitions, solved objective questions, and examiner marking rubrics.

What is the passing criteria for CS609 under the VU 20% Two-Half Rule?

Under official Virtual University regulations, students must score at least 20% in the First Half (Quizzes, Assignments, GDBs, and Midterm combined) AND independently at least 20% in the Final-Term examination paper. Scoring under 20% in the final exam results in an automatic F grade regardless of earlier marks.

Are CS609 solved past papers and handouts verified for 2026 exams?

Yes. All CS609 materials on MIHORA VU—including Moaaz, Waqar Siddhu, and team archives—are reviewed against the current VU syllabus to help students prepare for 2026 Midterm, Final-Term, and online quiz examinations.

Inside this file

                                    CS609- System Programming
                                        Solved Subjective                            20–MAY-2013
                                      From Midterm Papers

    MC100401285           Moaaz.pk@gmail.com          Mc100401285@gmail.com                PSMD01

                                       MIDTERM EXAMINATION
                                              Fall 2012
                                      CS609- System Programming

Q. A function that will send com port. com port number will be accessed as parameter (5 Marks)
Answer:- (Page 126)
The sendchar() function sends a character to the COM port using BIOS service whose number is passed as
parameter. And the getcomstatus() function retrieves the status of the COM port whose number has been
specified and returns the modem and line status in an unsigned int.
void main()
{
while(1) {
i = getcomstatus (0);
if (((*(((char*)(&i)) + 1)&0x20) == 0x20) && (kbhit()))
{
ch1 = getche();
sendchar (ch1, 0);
}i
f ((*(((char*)(&i)) +1) & 0x01) == 0x01) {
ch2 = receivechar (0);
putch (ch2);
}i
f ((ch1 == 27) || (ch2 ==27))
break;
}
}

                                                                                              1

Q. Step to access battery powered ram. (5 Marks)
Answer:- (Page 144)
Battery Powered RAM is accessed in two steps
• Specify the Byte no. in 70H port.
• Read/write port 71H to get/set the value of specified byte.

Following slide shown a fragment of code that can be used to read or write onto any byte within the 64 byte
battery powered RAM.
outport (0x70, 0); outport (0x70, 4);
sec = inport (0x71); outport (0x71,hrs);

Q. What will be binary value of led status byte if scroll lock n num lock r on? (3)
Answer:- (Page 29)

                                         MIDTERM EXAMINATION
                                                Fall 2012
                                        CS609- System Programming

 XON and OFF in software flow contol
Answer:- (Page 135)
XON whenever received indicates the start of communication and XOFF whenever received indicates a temporary
pause in the communication.

                                                                                                  2

2 )programe BCD to ASCII
Answer:- (Page 147)
void main ()
{
unsigned int hours, months, seconds;
_AH =2;
geninterrupt(0x1a);
hours = _CH;
minutes = _CL;
seconds = _DH;
hours = hours <<4;
*((unsigned char *)(& hours)) =
(*((unsigned char *) (& hours))) >>4;
hours = hours + 0x3030;
seconds = seconds <<4;
*((unsigned char *)(& seconds)) =
(*((unsigned char *)(& seconds))) >>4;
seconds = seconds + 0x3030;
minutes = minutes <<4;
*((unsigned char *)(& minutes)) =
(*((unsigned char *)(& minutes))) >>4;
minutes = minutes + 0x3030;
clrscr();
printf("%c%c-%c%c-%c%c%c%c",
*(((unsigned char*)(&hours))+1),
*((unsigned char*)(&hours)),
*(((unsigned char*)(&minutes))+1),
*((unsigned char*)(&minutes)),
*(((unsigned char*)(&seconds))+1),
*((unsigned char*)(&seconds)),
getch();
}
The above program uses the service int 1Ah/02H to read the time from the real time clock. It reads the time and
converts the packed BCD values into unpacked BCD values. These values are then converted into ASCII and
displayed using the printf() statement.

3)TSR program for black space use in 17h
4) what type of information send to keyboard
Answer:- (Page 179)
Some data (as control information) can be send to the keyboard. The processor will write on the port 60H. The
device driver will check the OBF( output buffer full bit of port 64H which remains set as long as the byte is not
received by the keyboard.

                                                                                                        3

5) int 14h explain service#2,service#3
 Answer:- (Page 119)
Service #02 = Read in characters
Service #03 = Get port status

                                           MIDTERM EXAMINATION
                                                  Fall 2012
                                          CS609- System Programming

1: A function that will send com port. com port number will be accessed as parameter
Answer:- Rep

2: THR STANDS FOR?
Answer:- (Page 112)
Transmitter Holding Register

DLL STANDS FOR?
Answer:- (Page 112)
Band Rate Divisor (Low Byte)

RBR STANDS FOR?
Answer:- (Page 112)
Receiver Data

DLM STANDS FOR?
Answer:- (Page 112)
Band Rate Divisor (High Byte)

3: In flow control what is the working of D4?
Answer:- (Page 101)
D4 bit is cleared to indicate the low nibble is being sent. The receiver will know the arrival of the low nibble when
its checks BUSY bit which should be set (by the interface) on arrival.

4: draw structure of c status register ?

5: How to get input from keyboard
Answer:- (Page 34)
Keyboard is a hardware device and it makes use of interrupt number 9 for its input operations. Whenever a key is
pressed interrupt # 9 occurs. The operating system processes this interrupt in order to process the key pressed. This
interrupt usually reads the scan code from the keyboard port and converts it into the appropriate ASCII code and
places the ASCII code in the keyboard buffer in BIOS data area

                                                                                                         4

                                          MIDTERM EXAMINATION
                                                 Fall 2012
                                         CS609- System Programming

2: FIFO UART queue
Answer:- (Page 118)
This feature is available in the newer version of the UART numbered 16500. A queue or a buffer of the input or
output bytes is maintained within the UART in order to facilitate more efficient I/O. The size of the queue can be
controlled through this register.

3: int 14 h and its services?
Answer:- (Page 119)
INT # 14H
DX = Port # 0 for COM1
DX = Port # 1 for COM2 etc.

Service #0 = Set communication parameters
Service #01 = Output characters
Service #02 = Read in characters
Service #03 = Get port status

4: Binary value of LCD when caps and scroll lock on
Answer:- Rep

More CS609 files

All CS609 files · Midterm Prep 2026 · MCQs Bank