File information: | |
File name: | Segments.mesa_Oct77.pdf [preview Segments.mesa Oct77] |
Size: | 343 kB |
Extension: | |
Mfg: | xerox |
Model: | Segments.mesa Oct77 🔎 |
Original: | Segments.mesa Oct77 🔎 |
Descr: | xerox mesa 3.0_1977 listing Segments.mesa_Oct77.pdf |
Group: | Electronics > Other |
Uploaded: | 15-03-2020 |
User: | Anonymous |
Multipart: | No multipart |
Information about the files in archive: | ||
Decompress result: | OK | |
Extracted files: | 1 | |
File name Segments.mesa_Oct77.pdf segments.mESA 24-0CT-77 18:44:36 Page 1 -- Segments.Mesa Edited by Sandman on August 16. 1977 8:41 AM DIRECTORY AltoDefs: FROM "altodefs". AltoFileDefs: FROM "altofiledefs", BootDefs: FROM "bootdefs", DiskDefs: FROM "diskdeFs", InlineDefs: FROM "inlinedefs", ProcessDefs: FROM "processdefs", SegmentDeFs: FROM "segmentdeFs", SystemDefs: FROM "systemdefs": DEFINITIONS FROM AltoFileDeFs, BootDefs, SegmentDefs: Segments: PROGRAM IMPORTS BootOefs, DiskDefs, SegmentDefs EXPORTS BootDefs, SegmentDefs, SystemDefs SHARES SegmentDefs = BEGIN InvalidSegmentSize: PUBLIC SIGNAL [pages:PageCount] = CODE; NewFileSegment: PUBLIC PROCEDURE [ file:FileHandle, base:PageNumber. pages:PageCount, access:AccessOptions] RETURNS [seg:FlleSegmentHandle] = BEGIN OPEN TnlineDefs; IF access = DefaultAccess THEN access ~ Read: IF file.segcount = MaxSegs THEN ERROR FileError[file]; IF BITAND[access,Append]HO THEN ERROR FileAccessError[file]: seg ~ AllocateFileSegment[FileSegmentTable]; BEGIN ENABLE UNWIND => LiberateFileSegment[FileSegmentTable,seg]: IF base = OefaultBase THEN base ~ 1; IF pages = DefaultPages THEN pages ~ GetEndOFFile[file].page-base+l: IF pages ~IN (O .. AltoDefs.MaxVMPage+l] THEN ERROR InvalidSegmentSize[pages]: SetFileAccess[file,access]: END; segt ~ Object [ TRUE, FALSE, Segment [ FALSE, BITAND[access,Read]#O, BITAND[access,Write]HO, other, 0, pages, 0, file, base, FileHint[eofOA,O]]]: file.segcount ~ file.segcount+l: RETURN END: BootFileSegment: PUBLIC PROCEDURE [ file:FileHandle, base: PageNumber , pages:PageCount, access:AccessOptions, addr:POINTER] RETURNS [seg:FileSegmentHandle] = BEGIN vm: PageNumber; seg ~ NewFileSegment[file,base,pages,access]; IF addr H NIL THEN BEGIN seg.VMpage ~ vm ~ PageFromAddress[addr]; -- Disablelnterrupts[]; FOR vm IN [vm .. vm+pages) DO IF PageFree[vm] TIIEN ERROR: ENDLOOP; seg.swappedin ~ TRUE; seg. lock ~ seg.lock+l; file.swapcount ~ file.swapcount+l; -- [nableInterrupts[]; [NO; RrTURN rNO; OeleterileSegmenL: PUBLIC PROCrDUR[ [seg:FileSegmentllandle] BrGIN file: rileHandle ~ seg.file; ValidateFileSegment[FileSegmentTable.seg]; SwapOut[seg]; llberaterileSegment[FileSegmenLTable,seg]; file.segcount .. rile.segcount-l; If rile.segcounL = 0 THrN ReleaseFile[file]; RrTURN [NO; segments.mESA 24-0CT-77 18:44:36 Page 2 FileSegmentAddress: PUBLIC PROCEDURE [seg:FileSagmentHandle] RETURNS [POINTER] = BEGIN IF -seg.swappedin THEN ERROR SwapError[seg]; RETURN[AddressFromPage[seg.VMpage]] END; -- Window Segments (such as they ara) MoveFilaSegment: PUBLIC PROCEDURE [ seg:FileSegmentHandle, bnse:PageNumber, pages:PageCount] = |
Date | User | Rating | Comment |