Hey guys,
I am still stuck in 90s program of c language looking for someone's help.
I am trying to develop a terminate and stay resident program(TSR) which can displays "HELLO" in bold whenever I press the 'N' key from keyboard.
This is my code here
Code:
#include<dos.h>
#include<bios.h>
#include<stdio.h>
#include<conio.h>
void interrupt (*old)(void);
void interrupt myname(unsigned int AX);
char far *scr=(char far* ) 0xb8000000;
void main()
{
clrscr();
old=getvect(0x09); //SAVE OLD VECTOR IN 'OLD'
setvect(0x09,myname);//SET NEW VECTOR
keep(0,1000); //USED IN TSR TO KEEP MEMORY WHEN TERMINATED
getch();
}
void interrupt myname (unsigned int AX)
{
if(*((char*) &AX) == 0x31)
{
(*(scr))=0x7048; //H
(*(scr+1))=0x7045; //E
(*(scr+2))=0x704C; //L
(*(scr+3))=0x704C; //L
(*(scr+4))=0x704F; //O
}
else{
(*old)();}
}
Looking forward for help
Regards
Jessica