plz write newfunc() .
A TSR program that changes the background color of the screen to red whenever ‘Ctrl’ is pressed and white whenever ‘Left Shift’ is pressed. It should not modify the text displayed on the screen.
Hint:
Intercept Keyboard interrupt (0x09H)
Use video text memory address 0xB000000H
#include <dos.h>
void interrupt (*old)();
void interrupt newfunc();
char far *keybord=(char far* ) 0x00400017; //keyboard status
char far *scr=(char far* ) 0x0xB000000; //address of text area
void main()
{
old=getvect(0x09);
setvect(0x09,newfunc);
keep(0,1000);
}
void interrupt newfunc ()
{
Write code here that changes the background color of the screen to red whenever ‘Ctrl’ is pressed and white whenever ‘Left Shift’ is pressed. It should not modify the text displayed on the screen.
(*old)();
}