Category : C Source Code
Archive   : C-FDC.ZIP
Filename : GETATI.C

 
Output of file : GETATI.C contained in archive : C-FDC.ZIP
/*
* Get ATI (allocation table information) function
*
* Accepts a disk drive number: 0 = current, 1 = A:, 2 = B, etc.
* Returns a pointer to struct ati with the allocation table information.
* Subsequent calls to getati() destories the static information
* from the previous call.
*/

#include
#include
#include "fdc.h"

#define GETATIFN 0x1c00

struct ati *getati(int drive)
{

extern int errno;
static struct ati retinfo;
struct REGVAL r;

r.ax = GETATIFN;
r.dx = drive;
sysint21(&r, &r);
retinfo.media_type = peek(r.ds, r.bx) & 0xff;
retinfo.sector_au = (int)(r.ax & 0xff);
retinfo.au = r.dx;
retinfo.sector_size = (int)r.cx;
return(&retinfo);

}





  3 Responses to “Category : C Source Code
Archive   : C-FDC.ZIP
Filename : GETATI.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/