Semester: Spring 2020
CS609: System Programming
Graded
Assignment No. 02
|
Total Marks: 20
Due Date: June 11, 2020
| ||
Instructions:
Please read the following instructions carefully before submitting assignment. It should be clear that your assignment will not get any credit if:
Note: You have to upload only .doc or .docx file. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks.
Objectives:
The objective of this assignment is to provide hands-on experience of System Programming concepts including:
For any assignment related query, contact at CS609@vu.edu.pk
| |||
Problem Statement:
Q: Write down a program in C which will display any long string on the screen and after passing 5 seconds, if no key is pressed then the string should be changed by replacing all character of ‘y’ on the screen (video text memory) by ‘z’. For example String on Screen is: “Hey young man, you have a lovely watch”. It should be changed to “Hez young man, you have a lovely watch”.
[Hint: Videotext memory area starts from location B800:0000. You have to traverse whole text memory area by using for loop, and then use simple if statements, to replace y with z.
Instructions:
1) You should include all related header files first of all then declare string array to store string to be displayed
Clare interrupt pointer to hold old interrupt i.e
char str1[80]={“ “Hey young man, you have a lovely watch”$”}
void interrupt (*old)(void);
2) Similarly, give prototype for new functions of i.e
void interrupt newfound();
3) Declare a far pointer i.e *SCR to hold far address =0xB8000000
4) Store current vector values of INT 8 through detect in old().
5) Set newFunc() fuctions through setvect.
6) In newFunc() function, give logic to wait for 5 seconds i.e t>=90
7) Replace y character to z i.e
for ( int j = 0; j < 4000; j += 2) {
if(*(scr + j) == 0x79’) // small y ASCII code.
*(scr + j) = 0x7A;// small z ASCII code.
Sample Code:
#include <stdio.h>
#include <BIOS.H>
#include <DOS.H>
int t=0;
char str1[…..Hey young boy you have a lovely watch$”};
void interrupt (*old)(void);
char far *……..)0xb8000000; // code to access video text memory area
void interrupt newFunc();
void main( )
{
clrscr();
// Display string on screen by calling int21h.
old=getvect(…….);
setvect(0x08,newFunction);
}
void interrupt newFunction( )
{
If (t>=90 )
// write for loop here
// write body of for loop}
//if part
…..
}
Note: Your assignment file should be a single Word file (.doc or .docx).
|
Download CS609 Assignment 2 Solution Spring 2020https://t.co/mTsvJKvU7n
— VU Study Solutions (@StudyVu) June 7, 2020
Download MSOffice Solved File CS609 Assignment 2 Solution Spring 2020
CS609
DOWNLOAD CS609 ASSIGNMENT 2 SOLUTION SPRING 2020https://t.co/mTsvJKvU7n
— VU Study Solutions (@StudyVu) June 10, 2020
DOWNLOAD CS609 ASSIGNMENT 2 SOLUTION SPRING 2020
Course | Tittle | Solution Download Status |
---|---|---|
CS609 | System Programming | Download Now
Download Now
Uploaded
|
0 Comments