CS609 Midterm Solved Subjective with References by Moaaz
- Type
- Midterm past paper
- Course
- CS609 System Programming
- Size
- PDF 888 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extension for 30 a day.
Preview text
Text from pages 1, 2, 3 of 7. Download the file for all 7 pages.
Fall 2012
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;
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)
Fall 2012
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 )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.
Related CS609 files
All CS609 files →- CS609 Midterm Solved MCQs with References by Education Gator Midterm PDF 4 MB
- CS609 Midterm File 1 Midterm PDF 1.7 MB
- CS609 Midterm Current Solved Subjective Set 2 by Junaid Midterm PDF 1 MB
- CS609 Midterm File 5 Midterm PDF 2.5 MB
- CS609 Handouts Set 2 Handout PDF 2.1 MB
- CS609 Midterm Solved Quiz Mega File by Haroon Quiz DOCX 26 KB
Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.