Your browser does not support JavaScript!'

CS609 Assignment No.3 Solution 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 CS609 Assignment No.3 Solution 2020


Today's Topic
CS609 Assignment No.3 Solution 2020



CS609 Assignment No.3 Solution

CS609 Assignment No.3

Problem Statement::

Question :
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.


Answer
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);
}

Post a Comment

0 Comments

^