home *** CD-ROM | disk | FTP | other *** search
- /*
- ┌────────────────────────────────────────────────────────────────────────────┐
- │jzdskfre.c │
- │Purpose: Return FAT information regarding disk space and allocation. │
- │See dirlst.dmo for examples │
- │ │
- │ (C) JazSoft Software by Jack A. Zucker (301) 794-5950 │
- └────────────────────────────────────────────────────────────────────────────┘
- */
-
- jzdskfre (ffat , fdrive )
- TFAT *ffat;
- int fdrive;
- {
- union REGS winreg,woutreg;
-
- winreg.h.ah = 0x36;
- winreg.h.dl = fdrive;
-
- intdos(&winreg,&woutreg);
-
- ffat->free = (long) woutreg.x.ax * woutreg.x.bx * woutreg.x.cx;
- ffat->total = (long) woutreg.x.ax * woutreg.x.cx * woutreg.x.dx;
- ffat->used = ffat->total - ffat->free;
- }