absread
This reads a specified disk sector on a floppy disk
#include <stdio.h>
#include <dos.h>
#include <stdlib.h>
#include <bios.h>
int main(void)
{
unsigned char buffer[512];
clrscr();
printf(”Insert disk in the A: drive , then press any key.\n”);
/*wait for keypress*/
getch();
if(absread(0,1,1,&buffer) != 0)
printf(”Cannot read the A drive.\n”);
else
printf(”Drive A , Sector 1 read\n”);
return 0;
}
This was written using Turbo C and tested on Windows 98
Related posts:
- Write to a disk in the A drive This requires an older operating system and compiler, Turbo C...
- Free Disk space Reports the free disk space on a DOS system #include...
Related posts brought to you by Yet Another Related Posts Plugin.



















































Post a comment