DEFINITION MODULE HardBlocks; (*$ Implementation:=FALSE *)
(* 16-May-1993/bp *)

FROM SYSTEM IMPORT LONGSET;

CONST
 rigidDisk="RDSK";
 badBlock="BADB";
 partition="PART";
 fileSysHeader="FSHD";
 loadSeg="LSEG";

 locationLimit=16;
 nil=0FFFFFFFFH;

TYPE
 RigidDiskFlags=(
  last,lastLun,lastId,noReselect,diskId,ctrlId,synch,rdf7,
  rdf8,rdf9,rdf10,rdf11,rdf12,rdf13,rdf14,rdf15,
  rdf16
 );
 RigidDiskFlagSet=SET OF RigidDiskFlags;

 RigidDiskBlock=RECORD
  id:ARRAY [0..3] OF CHAR;
  summedLongs:LONGCARD;
  chkSum:LONGINT;
  hostID:LONGCARD;
  blockBytes:LONGCARD;
  flags:RigidDiskFlagSet;
  badBlockList:LONGCARD;
  partitionList:LONGCARD;
  fileSysHeaderList:LONGCARD;
  driveInit:LONGCARD;
  reserved1:ARRAY [0..5] OF LONGCARD;
  cylinders:LONGCARD;
  sectors:LONGCARD;
  heads:LONGCARD;
  interleave:LONGCARD;
  park:LONGCARD;
  reserved2:ARRAY [0..2] OF LONGCARD;
  writePreComp:LONGCARD;
  reducedWrite:LONGCARD;
  stepRate:LONGCARD;
  reserved3:ARRAY [0..4] OF LONGCARD;
  blocksLo:LONGCARD;
  blocksHi:LONGCARD;
  loCylinder:LONGCARD;
  hiCylinder:LONGCARD;
  cylBlocks:LONGCARD;
  autoParkSeconds:LONGCARD;
  (*39*)highRDSKBkock:LONGCARD;
  reserved4:LONGCARD;
  diskVendor:ARRAY [0..7] OF CHAR;
  diskProduct:ARRAY [0..15] OF CHAR;
  diskRevision:ARRAY [0..3] OF CHAR;
  controllerVendor:ARRAY [0..7] OF CHAR;
  controllerProduct:ARRAY [0..15] OF CHAR;
  controllerRevision:ARRAY [0..3] OF CHAR;
  reserved5:ARRAY [0..9] OF LONGCARD;
 END;

 BadBlockEntry=RECORD
  badBlock:LONGCARD;
  goodBlock:LONGCARD;
 END;
 BadBlockBlock=RECORD
  id:ARRAY [0..3] OF CHAR;
  summedLongs:LONGCARD;
  chkSum:LONGINT;
  hostId:LONGCARD;
  next:LONGCARD;
  reserved:LONGCARD;
  blockPairs:ARRAY [0..60] OF BadBlockEntry;
 END;

 PartitionFlags=(
  bootable,noMount,pf2,pf3,pf4,pf5,pf6,pf7,
  pf8,pf9,pf10,pf11,pf12,pf13,pf14,pf15,
  pf16
 );
 PartitionFlagSet=SET OF PartitionFlags;
 PartitionBlock=RECORD
  id:ARRAY [0..3] OF CHAR;
  summedLongs:LONGCARD;
  chkSum:LONGINT;
  hostID:LONGCARD;
  next:LONGCARD;
  flags:PartitionFlagSet;
  reserved1:ARRAY [0..1] OF LONGCARD;
  devFlags:LONGSET;
  driveName:ARRAY [0..31] OF CHAR;
  reserved2:ARRAY [0..14] OF LONGCARD;
  environment:ARRAY [0..16] OF LONGCARD;
  ereserved:ARRAY [0..14] OF LONGCARD;
 END;

 FileSysHeaderBlock=RECORD
  id:ARRAY [0..3] OF CHAR;
  summedLongs:LONGCARD;
  chkSum:LONGINT;
  hostID:LONGCARD;
  next:LONGCARD;
  flags:LONGSET;
  reserved1:ARRAY [0..1] OF LONGCARD;
  dosType:LONGCARD;
  version:LONGCARD;
  patchFlags:LONGSET;
  type:LONGCARD;
  task:LONGCARD;
  lock:LONGCARD;
  handler:LONGCARD;
  stackSize:LONGCARD;
  priority:LONGINT;
  startup:LONGINT;
  segListBlocks:LONGINT;
  globalVec:LONGINT;
  reserved2:ARRAY [0..22] OF LONGCARD;
  reserved3:ARRAY [0..20] OF LONGCARD;
 END;

 LoadSegBlock=RECORD
  id:ARRAY [0..3] OF CHAR;
  summedLongs:LONGCARD;
  chkSum:LONGINT;
  hostID:LONGCARD;
  next:LONGCARD;
  loadData:ARRAY [0..122] OF LONGCARD;
 END;

END HardBlocks.noimp
