Your browser does not support JavaScript!'

Download CS609 Assignment 2 Solution Spring 2020 ~ VUSs

Welcome to VUSs, as you guys know. VUSs is all about Computer Science's fundamentals and Tests Preparation.
All published articles are organized in simple, easy, and short English sentences to familiarize the students with computer science.
In that respect today's article is Download CS609 Assignment 2 Solution Spring 2020


Today's Topic
Download CS609 Assignment 2 Solution Spring 2020




CS609 Assignment 2 Solution

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:

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file is corrupt.
  • You have not followed steps described in Detailed Instructions of the problem statement.
  • Assignment is copied (partial or full) from any source (websites, forums, students, etc.) Strict action will be taken in this regard.

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:
  • How can interrupts be generated
  • What are Interrupts
  • Interrupt functions writing
  • BIOS data area.
  • TSR program
  • Calling interrupt function





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
…..
(*old)();
}








Note: Your assignment file should be a single Word file (.doc or .docx).

CS609

Course Tittle Solution Download Status
CS609 System Programming Download Now Download Now

Uploaded

Would you like it!

VU Past Papers

Post a Comment

0 Comments

^