Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dos.h

Status
Not open for further replies.

pollux0

IS-IT--Management
Mar 20, 2002
262
US
can anyone tell me where I can get a copy of dos.h

thanks in advance
 
Would this be Dosh for windows, the simple bookkeeping software for small businesses? Arte Et Labore
 
If you have borland c++ builder then you can get it from it's "Include" subdirectory. If you don't then find somebody who has:).

--- markus

 
The reason why am asking is I am trying to compile a program and I am getting this error(i thought it might be a bad dos.h file):
***********************************
Error: Unresolved external 'biosdisk(int, char, int, int, int, int, void *)' referenced from C:\STUFF\ABC\COPYBOOT.OBJ
this is the code
***********************************

#include <bios.h>
#include <stdio.h>

#define _floppy1 0x0
#define _floppy2 0x1

#define _hd1 0x80
#define _hd2 0x81
#define _hd3 0x82


void writebootsector(char *buffer,int drive = _floppy1)
{ printf(&quot;\nWriting....&quot;);
int result;
if((result=biosdisk(3,drive,0,0,1,1,buffer))==0)
{ printf(&quot;1 sector copied successfully !&quot;); }
else
{ printf(&quot;Error %d&quot;,result); }
}

int main(int argc,char* argv[])
{ if(argc>1)
{ FILE *fin = fopen(argv[1],&quot;rb&quot;);
if(fin)
{ /* Buffer which stores the data */
char buffer[512];

/* Read 512 bytes into the buffer */
fread(&buffer,512,1,fin);

/* Write the 512 bytes */
writebootsector(buffer,_floppy1);
fclose(fin);
return 1;
}
}
printf(&quot;\ncopyboot.exe <filename>&quot;);
return 0;
}
***********************************
whats wrong with this...
and one more question. I need something called TASM to compile a .ASM file. What is this and where can I get it
thanks in advance
 
TASM is a Turbo Assembler. And it seems that you are writting in some sort of Turbo C because there is no bios.h in Borland C++ builder. And, maybe i am wrong, but your program is supposed to be run from DOS because Windows won't let you to work with BIOS directly. Anyways, TASM and DOS.H were sent to you to the specified e-mail.
Hope that helps.

--- markus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top