I am trying to print a string using DOS video memory but when I call function print_Id ();
and (*old)();
it shows these warnings and does not run the code but without these functions every thing works fine.
Call to function print_id
with no prototype
Call to function with no prototype
I wrote this function at the top but all in vain.
Please review my code below; I am using BORLANDC compiler.
#include<stdio.h>
#include<BIOS.H>
#include<DOS.H>
#include<conio.h>
int j;
void interrupt (*old)();
void interrupt print_name();
void interrupt print_Id();
char st[80] ={"Bilal Maqsood$"};
char id[20]={"BC110403231$"};
char far *scr=(char far* ) 0xb8000f3C;
int main( )
{
clrscr();
old=getvect(0x08);
setvect(0x08,print_name); //corrected
return 0;
}
void interrupt print_name(){
int i=0;
int j=0;
while(st[i]!='$'){
*(scr+j)=st[i];
*(scr+j+1)=0x72;
i++;
j+=2;
}
print_Id ();
}
void interrupt print_Id ( )
{
int i=0;
int j=0;
while(id[i]!='$'){
*(scr+j)=id[i];
*(scr+j+1)=0x17;
i++;
j+=2;
}
(*old)();
}