[Error] bios.h: No such file or directory

June 11, 2015 at 21:29:00
Specs: Windows 8, 4GB Ram
i am using dev c++ and in this i using bios.h the error which is shown
[Error] bios.h: No such file or directory
this is the code

#include <dos.h>
#include <bios.h>
void initialize (unsigned int far *com)
{
outportb ( (*com)+3, inport ((*com)+3) | 0x80);
outportb ( (*com),0x80);
outportb( (*com) +1, 0x01);
outportb ( (*com)+3, 0x1b);
}
void SelfTestOn(unsigned int far * com)
{
outportb((*com)+4,inport((*com)+4)|0x10);
}
void SelfTestOff(unsigned int far * com)
{
outportb( (*com)+4, inport((*com)+4) & 0xEf);
}
void writechar( char ch, unsigned int far * com)
{
while ( !((inportb((*com)+5) & 0x20) == 0x20));
outport(*com,ch);
}
char readchar( unsigned int far *com)
{
while (!((inportb((*com)+5) & 0x01)==0x01));
return inportb(*com);
}
unsigned int far *com=(unsigned int far*) 0x00400000;
void main ()
{
char ch = 0; int i = 1;int j= 1;
char ch2='A';
initialize( com);
SelfTestOn(com);
clrscr();
while (ch!=27)
{
if (i==80)
{
j++;
i=0;
}
if (j==13)
j=0;
gotoxy(i,j);
ch=getche();
writechar(ch,com);
ch2=readchar(com);
gotoxy(i,j+14);
putch(ch2);
i++;
}
SelfTestOff (com);
}


See More: [Error] bios.h: No such file or directory

Report •


#1
June 11, 2015 at 22:51:19
I don't know where you got that code from but it looks like it is designed for 16-bit MS-DOS. You can't directly access input/output ports in a modern OS.

The specific error is saying that there is no such header file as "bios.h". There isn't - nothing more to add.


Report •

#2
June 15, 2015 at 10:26:38
thanks freind for your rply i can solve my problem myselm thanks again

Report •

Related Solutions


Ask Question