cs609 assignment 3 solution fall 2019

cs609 assignment 3 solution fall 2019

 

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:

 

  • Typematic Rate
  • Keyboard typing delay

 

 

 

For any assignment related query, contact at CS609@vu.edu.pk

Problem Statement:

 

Q: Write a C program that will change the typematic rate of keyboard with delay of 1/4 second and typematic rate of 3 characters per second by using the following information.

 

Best of Luck!

Q: Write a C program that will change the typematic rate of keyboard with delay of 1/4 second and typematic rate of 3 characters per second by using the following information.



Solution:

 

#include <dos.h> #include <conio.h> char st [80];

int SendKbdRate(unsigned char data , int maxtry)

{

unsigned char ch; do

{

do

{

ch=inport(0x64);

}while (ch&0x02); outport(0x60,data); do

{

ch = inport(0x64);

}while (ch&0x01); if (ch==0xfa)

{

puts(“success\n”); break;

}

maxtry = maxtry – 1;

} while (maxtry != 0); if (maxtry==0)

return 1;

else

 

}



return 0;

void main ()

{

//clrscr(); SendKbdRate(0xf3,3); SendKbdRate(0x68,3); gets(st);

}

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: