cs609 assignment no.1 solution spring2020

cs609

CS609 assignment 1 solution spring2020

Click here to downloadthe solution file from here.

DOWNLOAD

Software Requried for this assignment file.
.Boreland C
.DOSBOX

Solution:-

#include<stdio.h>
#include<BIOS.H>
#include<DOS.H>
#include<conio.h>
void interrupt (*oldint65)( );
void interrupt newint65(void);
char far *scr=(char far*) 0x00400017;
char st1[80] ={” Which toggle button you want to switch on: “};
char st2[80] ={” Press 1 for Caps Lock “};
char st3[80] ={” Press 2 for Scroll Lock “};
char st4[80] ={” Press 3 for Num Lock “};
char st5[80] ={” Press Key(1/2/3): “};
char msg1[80] ={” Caps Lock is On “};
char msg2[80] ={” Scroll Lock is On “};
char msg3[80] ={” Num Lock is On “};
int i=0;
void main()
{
oldint65 = getvect(0x65);
setvect(0x65, newint65);
keep(0, 1000);
}
void interrupt newint65( )
{
printf(” %s n” , st1);
printf(” %s n” , st2);
printf(” %s n” , st3);
printf(” %s n” , st4);
printf(” %s ” , st5);
scanf(“%d”, &i);
switch (i)
{
case 1:
*scr=64;
(*oldint65)();
_AH=0;
_DX=(unsigned int) msg1;
_AH=0x09;
geninterrupt(0x21);
break;
case 2:
*scr=16;
(*oldint65)();
_AH=1;
_DX=(unsigned int) msg2;
_AH=0x09;
geninterrupt(0x21);
break;
case 3:
 *scr=32;
(*oldint65)();
_AH=2;
_DX=(unsigned int) msg3;
_AH=0x09;
geninterrupt(0x21);
break;
default:
 printf(“Invalid key is press”);
}
}

Related Posts

BT403 Assignment 2 Solution Spring 2020

BT403 Assignment 2 Solution Spring 2020 BT403 Assignment Solution Spring 2020. BT403 Moaz Past Papers, BT403 Waqar Past Papers, Online Quizzes, GDB, Past Papers, Download Everything from here… Download…

BT405 Assignment 3 Solution Spring 2020

BT405 Assignment 3 Solution Spring 2020 BT405 Assignment 3 Solution Spring 2020. BT405 Moaz Past Papers, BT405 Waqar Past Papers, Online Quizzes, GDB, Past Papers, Download Everything from here……

MTH304 Assignment 3 Solution Spring 2020

MTH304 Assignment 3 Solution Spring 2020 MTH304 Assignment Solution Spring 2020. MTH304 Moaz Past Papers, MTH304 Waqar Past Papers, Online Quizzes, GDB, Past Papers, Download Everything from here… Download…

MTH404 Assignment 3 Solution Spring 2020

MTH404 Assignment 3 Solution Spring 2020 MTH404 Assignment Solution Spring 2020. MTH404 Moaz Past Papers, MTH404 Waqar Past Papers, Online Quizzes, GDB, Past Papers, Download Everything from here… Download…

CS605 Assignment 3 Solution Spring 2020

CS605 Assignment 3 Solution Spring 2020 CS605 Assignment Solution Spring 2020. CS605 Moaaz Past Papers, CS605 Waqar Past Papers, Online Quizzes, GDB, Past Papers, Download Everything from here… Download…

STA641 Assignment 3 Solution Spring 2020

STA641 Assignment 3 Solution Spring 2020 STA641 GDB Solution Spring 2020. STA641 Moaz Past Papers, STA641 Waqar Past Papers, Online Quizzes, GDB, Past Papers, Download Everything from here… Download…

Leave a Reply

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