DIRECTORY FS USING [OpenFile --, Type-- ], Rope USING [ROPE]; Floppy: CEDAR DEFINITIONS = BEGIN ROPE: TYPE ~ Rope.ROPE; FileID: TYPE = PRIVATE MACHINE DEPENDENT RECORD [a (0), b (1): WORD]; nullFileID: FileID = [0, 0]; FileHandle: TYPE = RECORD [volume: VolumeHandle, file: FileID]; VolumeHandle: TYPE [2]; nullVolumeHandle: READONLY VolumeHandle; PageNumber: TYPE = LONG CARDINAL; firstPageCount: PageNumber = 0; lastPageCount: PageNumber = LAST[PageNumber]; PageCount: TYPE = PageNumber; defaultPageCount: PageNumber = LAST[PageNumber]; Format: PROCEDURE [drive: CARDINAL, maxNumberOfFileListEntries: CARDINAL, labelString: ROPE, density: Density _ default, sides: Sides _ default]; maxCharactersInLabel: CARDINAL = 40; Density: TYPE = {single, double, default}; Sides: TYPE = {one, two, default}; Open: PROCEDURE [drive: CARDINAL _ 0] RETURNS [volume: VolumeHandle]; Close: PROCEDURE [volume: VolumeHandle]; GetAttributes: PROCEDURE [volume: VolumeHandle] RETURNS [freeSpace: PageCount, largestBlock: PageCount, fileList: FileHandle, rootFile: FileHandle, density: Density[single..double], sides: Sides[one..two], maxFileListEntries: CARDINAL, labelString: ROPE]; GetDrive: PROCEDURE [volumeHandle: VolumeHandle] RETURNS [drive: CARDINAL]; Compact: PROCEDURE [volume: VolumeHandle]; Scavenge: PROCEDURE [volume: VolumeHandle] RETURNS [numberOfBadSectors: PageCount]; NewScavenge: PROCEDURE [drive: CARDINAL] RETURNS [okay: BOOLEAN]; GetNextBadSector: PROCEDURE [volume: VolumeHandle, oldIndex: CARDINAL] RETURNS [newIndex: CARDINAL, file: FileHandle, page: PageNumber]; nullIndex: CARDINAL = LAST[CARDINAL]; SetRootFile: PROCEDURE [file: FileHandle]; Erase: PROCEDURE [drive: CARDINAL, maxNumberOfFileListEntries: CARDINAL, labelString: ROPE _ NIL]; CreateFile: PROCEDURE [volume: VolumeHandle, size: PageCount, type: --File.Type-- CARDINAL] RETURNS [file: FileHandle]; DeleteFile: PROCEDURE [file: FileHandle]; Read: UNSAFE PROC [file: FileHandle, first: PageNumber, count: PageCount, vm: LONG POINTER]; Write: UNSAFE PROC [file: FileHandle, first: PageNumber, count: PageCount, vm: LONG POINTER]; CopyToFSFile: PROCEDURE [floppyFile: FileHandle, pilotFile: FS.OpenFile, firstFloppyPage: PageNumber, firstFSPage: INT, count: PageCount _ defaultPageCount]; CopyFromFSFile: PROCEDURE [pilotFile: FS.OpenFile, floppyFile: FileHandle, firstFSPage: INT, firstFloppyPage: PageNumber, count: PageCount _ defaultPageCount]; ReplaceBadSector: PROCEDURE [file: FileHandle, page: PageNumber] RETURNS [readError: BOOLEAN]; GetFileAttributes: PROCEDURE [file: FileHandle] RETURNS [size: PageCount, type: --File.Type-- CARDINAL]; GetNextFile: PROCEDURE [previousFile: FileHandle] RETURNS [nextFile: FileHandle]; CreateInitialMicrocodeFile: PROCEDURE [volume: VolumeHandle, size: PageCount, type: --File.Type-- CARDINAL, startingPageNumber: PageNumber _ 1] RETURNS [file: FileHandle]; SetBootFiles: PROCEDURE [volume: VolumeHandle, pilotMicrocode, diagnosticMicrocode, germ, pilotBootFile: BootFilePointer _ nullBootFilePointer]; GetBootFiles: PROCEDURE [volume: VolumeHandle] RETURNS [initialMicrocode, pilotMicrocode, diagnosticMicrocode, germ, pilotBootFile: BootFilePointer]; BootFilePointer: TYPE = RECORD [file: FileID, page: PageNumber]; nullBootFilePointer: BootFilePointer = [nullFileID, 0]; MakeImage: PROCEDURE [floppyDrive: CARDINAL _ 0, imageFile: FS.OpenFile, firstImagePage: INT]; CreateFloppyFromImage: PROCEDURE [floppyDrive: CARDINAL _ 0, imageFile: FS.OpenFile, firstImagePage: INT, reformatFloppy: BOOLEAN, floppyDensity: Density _ default, floppySides: Sides _ default, numberOfFiles: CARDINAL _ 0, newLabelString: ROPE _ NIL]; PagesForImage: PROCEDURE [floppyDrive: CARDINAL _ 0] RETURNS [INT]; GetImageAttributes: PROCEDURE [imageFile: FS.OpenFile, firstImagePage: INT] RETURNS [maxNumberOfFiles: CARDINAL, currentNumberOfFiles: CARDINAL, density: Density[single..double], sides: Sides[one..two], name: ROPE _ NIL]; Error: ERROR [error: ErrorType]; ErrorType: TYPE = {badDisk, badSectors, cannotScavenge, endOfFile, fileListFull, fileNotFound, hardwareError, incompatibleSizes, invalidFormat, invalidPageNumber, invalidVolumeHandle, insufficientSpace, needsScavenging, noSuchDrive, notReady, notFormatted, onlyOneSide, onlySingleDensity, initialMicrocodeSpaceNotAvailable, stringTooShort, volumeNotOpen, writeInhibited, zeroSizeFile, fileListLengthTooShort, floppyImageInvalid, floppySpaceTooSmall, volumeOpen}; DataError: ERROR [file: FileHandle, page: PageNumber, vm: LONG POINTER]; AlreadyFormatted: SIGNAL [labelString: ROPE]; END... Floppy.mesa Copyright Ó Xerox Corporation 1982, 1986, 1987. All rights reserved. Tim Diebert: May 7, 1987 2:52:01 pm PDT File identifiers Volume references File addressing Volume operations File operations Bootable floppies Floppy Images Signals and errors ʪ˜codešœ ™ KšœD™DK™'—K˜šÏk ˜ Kšœœ Ïc œ˜!Kšœœœ˜—K˜KšÐlnœœ œ˜!˜Kšœœœ˜K™Kšœ™—˜Kš œœœœ œœœ˜FK˜Kšœ œœ&˜?—K˜˜Kšœ™K˜Kšœœ˜Kšœœ˜(—K˜˜Kšœ™K˜šœ œœœ˜!K˜Kšœœ ˜-—Kšœ œ˜Kšœœ ˜0—K˜˜Kšœ™K˜Kš Ïnœ œ œœœ6˜‘Kšœœ˜$Kšœ œ˜*Kšœœ˜"K˜Kš œ œ œœ˜EKš œ œ˜(K˜Kš   œ œœ« œ œ˜ÿKš œ œœ œ˜KKš œ œ˜*Kš œ œœ!˜SKš   œ œ œœœ˜AKš  œ œ"œœ œ&˜ˆKšœ œœœ˜%Kš  œ œ˜*Kš  œ œ œœœœ˜bK˜—˜Kšœ™K˜Kš   œ œ/ž œœœ˜wKš  œ œ˜)K˜Kš  œœœ=œœ˜\Kš  œœœ=œœ˜]K˜Kš  œ œ%œ5œ'˜Kš œ œ œ0œD˜ŸK˜Kš œ œ&œ œ˜^K˜Kš  œ œœž œœ˜hK˜Kš  œ œœ˜QK˜—˜Kšœ™K˜Kš  œ œ/ž œœ&œ˜«Kš  œ œy˜Kš  œ œœ_˜•Kšœœœ"˜@K˜7K˜—˜Kšœ ™ —˜Kš   œ œœœœ˜^K˜Kš œ œœœœœQœœœ˜üK˜Kš   œ œœœœ˜CK˜Kš œ œ œœœœœBœœ˜ÝK˜—˜Kšœ™K˜Kš œœ˜ Kšœ œÀ˜ÏKš  œœ*œœ˜HKš œœœ˜-K˜Kšœ˜——…—î