-- FilerPack.pack
-- Last edit by:
-- Yokota  March 23, 1981  9:55 AM  FCacheCleanUp, RemoveCacheEntry, SetFile, SetCacheEntry, SetPageGroup, Await, Report, Log and HandleError are moved from Resident to ResidentCool.

-- Gobbel  January 31, 1981  11:30 AM  Moved frame packs into PilotKernelFrames.pack.

-- Knutsen  January 21, 1981  3:45 PM  Added InitalizeSubVolume.

-- Gobbel  January 19, 1981  4:17 PM  Create ResidentCool code pack.

Filer: SEGMENT =
BEGIN

-- Resident code - by definition!

Resident: CODE PACK =
  BEGIN
  FileCacheImpl EXCEPT Initialization, ResidentCool;
  FilerTransferImpl EXCEPT Initialization, LabelHacking, ResidentCool;
  FileTaskImpl EXCEPT Initialization, ResidentCool;
  SubVolumeImpl EXCEPT Initialization, ResidentCool;
  END;

ResidentCool: CODE PACK = -- goes in display memory on Dandelion
  BEGIN
  FileCacheImpl [FlushFile, FlushFilesOnVolume, FCacheCleanUp, RemoveCacheEntry, SetFile,
    SetCacheEntry, SetPageGroup];
  FilerExceptionImpl EXCEPT Initialization;
  FilerTransferImpl [Log];
  FileTaskImpl [ErrorHalt, HandleError, LabelWait];
  SubVolumeImpl [GetPageAddress, ErrorHalt, GetNext, OnLine, OffLine];
  END;

-- Swappable code (resident descriptor)

LabelHacking: CODE PACK =
  {FilerTransferImpl [ReadLabel, Perform, ReadRootLabel, WriteLabels,
    VerifyLabels, ReadLabelAndData, WriteLabelAndData]};

-- Initialization code:

Initialization: CODE PACK = -- initially resident
  BEGIN
  FileCacheImpl [Initialize, MAIN];
  FilerControl;
  FilerExceptionImpl [MAIN];
  FilerTransferImpl [MAIN];
  FileTaskImpl [MAIN];
  SubVolumeImpl [MAIN, InitializeSubVolume];
  END;
END;