/*
  File: filesys.h

  Header file for FAT-12 based files systems, using 1.44 Mb diskettes
  MAT 4970
  
*/

#ifndef FILESYS_H
#define FILESYS_H

/* Number of FAT sectors */
#define FAT_SECTORS 9

/* Range for first FAT copy */
#define LOW_FAT_SECTOR 1
#define HIGH_FAT_SECTOR 9

/* Range for second FAT copy */
#define LOW_AUX_FAT_SECTOR 10
#define HIGH_AUX_FAT_SECTOR 18

/* Range for root directory */
#define LOW_ROOT_SECTOR 19
#define HIGH_ROOT_SECTOR 32

/* Directory entry information */
#define DIRECTORY_ENTRIES_PER_SECTOR 16
#define BYTES_PER_ENTRY 32

/* Read the on-disk FAT into an in-memory copy */
int ReadFat();

/* Get a 12-bit entry of the FAT */
int GetFatEntry(int j);

/* Display a portion of the FAT */
void DisplayFat(unsigned int low, unsigned int high);

#endif
