Mesa System DocumentationVersion 6.0October 1980This document describes configurations of the Alto/Mesa system software and the individualcomponents which comprise them. These components include runtime support for the language,routines for manipulating the Alto display, keyboard, and file system, facilities for loading clientprograms and building new systems, and a number of useful common software packages.XEROXOFFICE PRODUCTS DIVISIONSystems Development Department3333 Coyote Hill Road / Palo Alto / California 94304 W;p P4qX NF Gb7# Et1* CF AS-#Gr- sX-t-7uF4 =<8K ^i Table of ContentsPrefacev 1. Overview1 2. Definitions and Interfaces2 3. System Organization5 4. Mesa Executive7 5. System Facilities8 Directory Package (DirectoryDefs)9Disk Streams Package (StreamDefs, StreamScan)12Display Package (AltoDisplay, DisplayDefs, FontDefs, StreamDefs)18File Package (AltoDefs, AltoFileDefs, SegmentDefs)22Image Files (ImageDefs)27Keyboard Package (KeyDefs, StreamDefs)32Miscellaneous (InlineDefs, MiscDefs)36Modules (FrameDefs)41Processes and Monitors (Process, ProcessDefs)45Segment Package (AllocDefs, SegmentDefs)51Storage Management (FSPDefs, Storage, SystemDefs)62StreamIO Package (Ascii, CharIO, IODefs)70Streams (StreamDefs)74String Package (AltoDefs, String, StringDefs)76Time Package (TimeDefs)79Traps (TrapDefs)81Appendix. Symbol Listing83Index107iii%\pi WqH S H OH KH GbH C@Hx@~rst sHqx=rstsHqx:st st stst sHqx89 rstst st sHqx5x rstsHqx2rstst sHqx/ rst stsHqx-3rstsHqx*rrstsHqx'rstst sHqx$rststsHqx"-rstsHqxkrst sHqx rststuHqx rstsHqx'rstsHq H G, u" h= U  ^i PrefaceOctober 1980This document describes configurations of the Alto/Mesa system software and the individualcomponents which comprise them. These components include runtime support for the language,routines for manipulating the Alto display, keyboard, and file system, facilities for loading clientprograms and building new systems, and a number of useful common software packages.Suggestions as to the form, correctness, and understandability of this material should be funneledthrough your support group. All of us involved in the development of Mesa welcome feedback andsuggestions on the language, the system, and the debugging environment.v*I p)FqX A 7# ?d1* =F <S 8 T 7_ 5xG, h=BI ^i 11. OverviewThe Alto/Mesa environment contains all of the facilities described in this document. Section 2contains an enumeration of the definitions modules available in the Alto/Mesa system; it includes abrief description of the facilities provided by each interface. Complete documentation can be foundin Section 5.Section 3 describes the various configurations and optional packages that comprise the Alto/Mesasystem. A single configuration of the system is available which includes most of the facilitiesdescribed here. Operations are described that destroy the display and keyboard software. Anumber of optional packages are available so that the Mesa system can be tailored to eachapplication.The Mesa Executive (Section 4) is a simple (and small) optional user interface supporting only afew commands. It allows program loading and debugger communication; more complicatedoperations must be provided by the user or by one of the standard packages that is availableseparately. The Mesa Executive also supports interactive input. The standard system only supportscommand line input; this allows the user interface to be completely controlled by the application.Finally, the bulk of this manual (Section 5) contains detailed descriptions of each of the packagessummarized in Section 2.Further details are available elsewhere on the language (Mesa Language Manual) and the Debugger(Mesa Debugger Documentation). Information on obtaining and running the system is contained inthe Mesa User's Handbook.Ifp'\qi Wr&0p VDra T?% Rpr Npr%2 M,A K.. IE H6 Ds rprA Bl5 @J ?s r6 =vU 9T"pr7 7 pr 39sr 1sr, 0;sr /=822. Definitions and InterfacesThe following list enumerates the public system modules of interest to Alto/Mesa programmers.The interface name is followed by the title of the section of this document (or other referencematerial) which describes the facilities the interface provides. The parenthesized names followingthe DEFINITIONS module identify the programs which implement that interface -- the ultimatedocumentation, after all.AllocDefs (Swapper) Segment PackageLow level memory allocation functions are defined here. Complete control of segment allocationand swapping can be obtained using this interface. Many of the functions of this interface are alsoavailable through the interface SegmentDefs.AltoDefs (Hardware) Mesa Language ManualContains a number of machine dependent constants describing physical characteristics of the Altoand its basic data types (bits per character, characters per word, etc.).AltoDisplay (Hardware) Alto: A Personal Computer System; Hardware ManualProvides a Mesa definition of the properties of the Alto display: its dimensions, Resolution,Background, the DCB chain, and the DCB format.AltoFileDefs (BCPL) Alto Operating System Reference ManualDefines the data structures (but not the operations) used in manipulating the Alto file system. Notethat these structures are shared by several software systems running on the Alto.AltoHardware (Hardware) Alto: A Personal Computer System; Hardware ManualDefines most structures of the Alto hardware, including the processor, display, keyboard, mouse,keyset, printer interface, disk, and Ethernet.Ascii (ANSI) Mesa Language ManualProvides names for common character codes, such as SP, CR, ESC, etc. Also contains names forvarious control characters, ControlA, etc. These declarations are also contained in the olderinterface IODefs.BitBltDefs (Hardware) Alto: A Personal Computer System; Hardware ManualProvides a Mesa definition of the hardware BitBlt (bit boundary block transfer) operation.CharIO (CharIOPack) StreamIO PackageA simple Teletype style I/O interface is provided by these procedures. Minimal editing and inputand output conversion routines are included. Similar to IODefs except that an explicit handlemust be supplied to each operation.DirectoryDefs (Directory) Directory PackageCommon operations on the Alto's file directory are defined here; they are all based on a singleprimitive which enumerates entries in a directory. fpx\qi Wr/. VDJ TY Rs r? QN Mtuvtvp KrO I2ur+ H6t r Dtu w BlrW @I =vt u w2 :rSt r 9Tt rtrtr 6t uw' 3rI 1Q .t u w2 ,rI *r. '#tuw $r3trtrtr # tr: !Y tr  t u w2 rZ Atuvt vp r4- 9tr w# )t uvtvp r@ 2 >]LDefinitions and Interfaces3DisplayDefs (SystemDisplay, DisplayControl) Display PackageProvides device-dependent operations for the display. Simple operations are implemented using thestandard stream interface (see StreamDefs).FontDefs (AlFont) Display PackageDefines a uniform interface for all font formats. It includes facilities for dynamically swapping fontfiles.Format (FormatImpl) Tajo Functional SpecificationDefines a set of operations for converting numeric values to strings. It is not exported byMesa.image, but does contain the definition of NumberFormat that is copied into CharIO andIODefs.FrameDefs (Miscellaneous, Modules, Swapper, UnNewConfig) ModulesProvides low level operations on modules and their runtime representation (global frames). Itincludes facilities for controlling residency of a module's code segment and for loading andunloading configurations.FSPDefs (FSP) Storage ManagementThis memory allocation package provides temporary storage for small, transient data structureswhose size is not known at compile time.ImageDefs (CheckPoint, MakeImage) Image FilesImage files are used to save the state of a computation so that it can be restarted later (perhaps in adifferent environment). Different types of image files can be created using the procedures definedin this interface; each type makes different assumptions about the state of the environment when itis restarted.InlineDefs (InlineDefs) MiscellaneousDefines a set of instructions not accessible at the language level. Logical operations and someextended precision arithmetic is included.IODefs (StreamIO) StreamIO PackageA simple Teletype style I/O interface is provided by these procedures. Minimal editing and inputand output conversion routines are included.KeyDefs (Keyboard, KeyStreams) Keyboard PackageProvides device-dependent operations for the keyboard, keyset, and mouse. Simple operations areimplemented using the standard stream interface (see StreamDefs).MiscDefs (Miscellaneous) MiscellaneousA set of miscellaneous but useful procedures that don't obviously belong in any of the otherinterfaces.$bfpXI bt uvt vtvp _rL ]t r Ztuvtvp X2rg V Sr9% <( 9tuvtvp 7rX 5x+8 3H 2) .t uvt vp ,_r<$ ** 'ituvtvp $r4- #G, tuvtvt vp }rQ 5t r tuvt vp  r\ e : =SDefinitions and Interfaces4OsStaticDefs (BCPL) Alto Operating System Reference ManualDefines information available through the Alto Operating System Swat resident.ProcessDefs (OurProcess) Processes and MonitorsIncludes a number of extensions to the language facilities for processes, monitors, and conditionvariables. Priorities and timeouts can be adjusted, and processes can be detached and aborted.SegmentDefs (SegmentsA, SegmentsB, Files, Swapper) Segment and File PackagesOperations on data and file segments are contained here; this includes virtual memory managementand swapping. Basic operations on files and their attributes are also included.Storage (FSP, SegmentsB) Storage ManagementProvides a simplified interface to the segment and free storage package for allocating and releasingtemporary storage.StreamDefs (KeyStreams, StreamsA, StreamsB) Disk, Display, Keyboard, and StreamsPackagesDefines the operations common to all streams. It also includes some device-dependent operationsunique to the disk, keyboard, and display.StreamScan (StreamsC) Disk Streams PackageDefines operations for reading a stream at full disk speed.StringDefs (StringsA, StringsB) String PackageA utility package for copying, comparing, and converting strings and substrings.SystemDefs (FSP, SegmentsB) Storage ManagementProvides a simplified interface to the segment and free storage package for allocating and releasingtemporary storage. Most of the same functions are available through the newer interface Storage.TimeDefs (TimeConvert) Time PackageIncludes a number of procedures for converting between internal (32 bit GMT), intermediate(unpacked record) and external (string) time formats.TrapDefs (Resident, Faults) TrapsDefines the runtime implementation of traps generated by the hardware and software.The Alto Mesa System also implements a number of other interfaces for compatibility with othersoftware systems. These include Inline, Process, Runtime, String, System, and Time. fpX bt uw' _rN \Tt uvt vp Yra X2*5 Tt uvtvtvtvp Rhr` PP Mrtuvtvtvp Jr&> IP Ft uvt vtvtvp DZ Ar6* @7* -3ur5tr )tuvt vp 'irG %5 "stuvtvtvp rS V /trtrtrtrtrtr =N# 53. System OrganizationThe Mesa system is available in a standard configuration. It is intended for the day to dayoperation of most program developers, who do not want to provide a large amount of software inorder to perform simple tasks. On the other hand, some clients are building complete applicationsfrom the ground up, and wish to replace many of the standard facilities with their own versions.Operations are provided for these clients to delete standard display and keyboard facilities; reducingthe standard configuration to a basic configuration. Several optional packages are available foraugmenting the capabilities of the system in various directions.Except for the optional packages listed below, the standard Mesa system (Mesa.image) includes allthe facilities described in this document.Extended Memory OperationMesa uses the extended memory of Alto II XMs as additional swapping space for code. This meansthat code and data need not co-exist in the MDS, the primary 64K of memory. Mesa takesadvantage of any available extra space automatically; standard Alto programs do not need to bemodified to run. Support is provided for up to one million words of memory in blocks of 64Kwords. Because Mesa uses extended memory for code segments, it includes a page-level storage allocatorfor the additional banks. Client programs may request storage in the additional banks by usingstandard procedures described in the Segment Package section of this document. Additionally,there are procedures described in the Miscellaneous section that provide primitive mechanisms toread and write words in extended memory and to copy blocks of data between banks of memory.The Alto/Mesa system gives no other assistance in accessing information in the extended memory.In particular, arbitrary use of LONG POINTERs is not supported on the Alto.When running on a machine with more than 64K of memory, the Mesa system will allocate spacein the second 64K for a debugger bitmap. This improves the performance of the debuggerdramatically. It is possible to inhibit the allocation of this bitmap; see the Mesa Users' Handbookor the Mesa Debugger Documentation for details.Optional PackagesTo assist in tailoring applications, some facilities are optional and packaged separately. Theconfiguration marked as standard is included in Mesa.image; the others must be included in theuser's configuration (or otherwise loaded) if they are needed. The descriptions below show (inparentheses) the section of this document that describes each package.CharIOPackImplements string and character I/O (StreamIO).Ifp#\qi Wrsr2 VD@ TK RL QNH Osr< M@ J2t r I * Dp ArT ? J >JN <A : 7%: 6Y 4^$pr) 2&p r 1G /hG -u rsr *r,/ (Q '# Bs %|rsr p 7r$; 0t r -1 AF v wr%pr & 0>U System Organization6CheckPointImplements check files (Image Files).DisplayPackage (STANDARD)Implements the display and font procedures. An instance of StreamIO is also included (DisplayPackage).ImageMakerImplements image files (Image Files).ImageRunnerImplements image file loading (Image Files).MesaExecImplements an interactive user interface (Section 4).UnNewConfigImplements unloading of configurations (Modules).Basic ConfigurationClients who wish to provide their own keyboard and display packages may call the followingprocedure (defined in NubOps) to delete the standard packages:ConvertToBasic: PROCEDURE;Multiple calls to this procedure have no additional effect."6fpX bv _rp r \Tv w YrJur pr&txK85. System FacilitiesThe material which follows is divided into several subsections, each of which describes a more orless logically disjoint subset of the system. The subsections are listed below, and follow this sectionin alphabetical order. The relevant DEFINITIONS modules, which clients will want to reference, arenamed in parentheses below, as well as in the subsections which follow.Directory Package (DirectoryDefs)Disk Streams Package (StreamDefs, StreamScan)Display Package (AltoDisplay, DisplayDefs, FontDefs, StreamDefs)File Package (AltoDefs, AltoFileDefs, SegmentDefs)Image Files (ImageDefs)Keyboard Package (KeyDefs, StreamDefs)Miscellaneous (InlineDefs, MiscDefs)Modules (FrameDefs)Processes and Monitors (ProcessDefs)Segment Package (AllocDefs, SegmentDefs)Storage Management (FSPDefs, Storage, SystemDefs)StreamIO Package (Ascii, CharIO, Format, IODefs)Streams (StreamDefs)String Package (AltoDefs, StringDefs)Time Package (TimeDefs)Traps (TrapDefs) fp!\qi Xr*7 WP Up s r3 SGNFpXsFtu tLpXsFtu X tIpsFtu tu tutu tGpX sFtutu tu tEtpX sFtutC@pXsFtutu tA p stu tut>pstutt r #G2t r !t r QtXvtvtvt [r*  tX vt- r 9tpr ot rt r, (=X Alto/Mesa Disk Streams Package16IndexToPosition: PROCEDURE [index: StreamIndex] RETURNS [StreamPosition];PositionToIndex: PROCEDURE [pos: StreamPosition] RETURNS [index: StreamIndex];If a physical disk location is required along with the stream index, a file address (FA) will proveuseful (see AltoFileDefs); it is similar to a StreamIndex with a disk address (DA) tacked on thefront, except that the page field is one origin (in the Alto file system, page zero is the leader page).FA: TYPE = MACHINE DEPENDENT RECORD [da: DA,page: PageNumber,byte: CARDINAL];You may record the current stream index and re-establish it later, in a fashion similar to GetIndexand SetIndex, by calling the proceduresGetFA: PROCEDURE [stream: StreamHandle, fa: POINTER TO FA];JumpToFA: PROCEDURE [stream: StreamHandle, fa: POINTER TO FA];The special thing about JumpToFA is that the disk address in the fa is taken as a hint; if itdoesn't work out (the page number or file serial number doesn't match the stream's version ofthem), JumpToFA will attempt to find the requested page via the shortest route and correct the faaccordingly. This may involve starting over at the beginning of the file. If that fails,InvalidFP: SIGNAL [fp: POINTER TO FP];will result, probably indicating that the file has been moved (or worse, deleted!) since the streamwas attached to it. A call on some directory searching procedure may prove useful in this situation,to determine if retrying the operation (with a new fp) is appropriate.StreamScanThis interface allows allows overlapped disk I/O when reading from a stream. It is a transliteration ofthe same code from the Alto Operating System (version 17 or newer). The following are defined inStreamScan:Descriptor: TYPE = RECORD [ da: AltoFileDefs.vDA, pageNumber: CARDINAL, numChars: CARDINAL, -- private fields];Handle: TYPE = POINTER TO READONLY Descriptor;Init: PROCEDURE [ stream: StreamDefs.StreamHandle, bufTable: POINTER, nBufs: CARDINAL] RETURNS [Handle];GetBuffer: PUBLIC PROCEDURE [ssd: Handle] RETURNS [POINTER];Finish: PROCEDURE [ssd: Handle];Init sets up a scan stream from a disk stream. In addition to the stream, the client supplies a vectorof pointers to 256 word blocks useable as disk buffers (bufTable). The number of bufferssupplied is nBufs. In other words, you should think of the type of bufTable asWfpX  btvtvt ^vtvt [rFtr Y st rt rtr X2trM TtXvtvtvtvt fS< fQ fOvt LrZt Jrtr GtXvtvtvt DZ vtvtvt A rtrtr ?dI =tr?t <rZ 8tX vtvtvt 5xrH 3G 2)3tr$-q +ErNs ),r 't r %|tX vtvt # "- vt vt wt cvtvFtX vt A-vtvt vt  vFtXvtvt vt )rc &tr  tr3tr 0 =\xGAlto/Mesa Disk Streams Package17bufTable: POINTER TO ARRAY [0..nBufs) OF Buffer,whereBuffer: TYPE = ARRAY [0..256) OF WORD;At least one buffer must be supplied (the normal stream buffer is also used). Each call toGetBuffer will return a pointer to the next sequential page of the file and returns the previousbuffer page to the buffer pool (first call returns data page 0, file page 1). The public fields of theHandle are correct for the page returned by the most recent call to GetBuffer. GetBufferreturns NIL when there are no more pages to be read. A call to Finish terminates the scan. Noother stream operations should be performed between Init and Finish. !fpXI xbt vFt XvFt _rx](tXvtvtvFt YrS W^tr-* UN Ttr:trt Rhrvr1tr P4trtr Pz=m18Alto/Mesa Display PackageOctober 1980The Mesa Display Package provides a simple, teletype style interface to the Alto display (seeAltoDisplay). There is provision for using any available font; however the display is restricted toa single font for any particular incarnation. The font operations (described at the end of thisdocument) are independent of the display implementation and may be used by any other displaypackage. The package will optionally maintain a typescript of displayed output.Display StreamNormal access to the display is through a stream interface (see the section on Streams). There is noprovision for multiple display streams. The module SystemDisplay implements the followingprocedures defined in StreamDefs:GetDefaultDisplayStream: PROCEDURE RETURNS [DisplayHandle];The interpretation of the basic stream operations is:reset clears the display and resets the typescript.put displays the character at the next sequential location.get, putback and destroy SIGNAL StreamError[StreamAccess].endof returns FALSE.In addition, the following operations are defined for display streams:clearCurrentLine: PROCEDURE [stream: StreamHandle]This procedure clears the current line of the display. The next character will be displayedat the left margin. The typescript is repositioned to the beginning of the line.clearLine: PROCEDURE [stream: StreamHandle, line: CARDINAL]Clears line on the the display. The next character will be displayed at the left margin ofthat line. The typescript is repositioned to the beginning of the line. In the currentAlto/Mesa implementation, clearLine is a no-op.clearDisplayChar: PROCEDURE [stream: StreamHandle, char: CHARACTER]Erases the last character written on the display. The character must be supplied since thestream retains no knowledge of what characters are displayed (the typescript is optional).DisplayDefs defines some additional interface procedures: fpo\qi$qYrX TD S sr ststsmr[Z s r. T=UAlto/Mesa Display Package19InitDisplay: PROCEDURE [dummySize, textLines, nPages: CARDINAL, f: FontDefs.FontHandle];This procedure initializes the display with dummySize blank scan lines at the top androom for at most textLines lines of text using nPages pages of memory for datastructures and bitmap. The number of text lines and the display width are reduced ifnecessary to make everything fit in nPages.The amount of memory necessary to guarantee that n full width lines of text can be displayed is n*(4+h*w)words, where h is the height of the font in scan lines (rounded up to an even number) and w is the width ofthe display in words.SetSystemDisplaySize: PROCEDURE [nTextLines, nPages: CARDINAL];Clears the display and reinitializes it with the new parameters.SetSystemDisplayWidth: PROCEDURE [indent, width: CARDINAL];Clears the display and reinitializes it with the new width parameters. indent is the numberof bits from the left edge of the screen to the first display position and width is the widthof a display line in bits. (The actual width will be the nearest multiple of 32 bits.).Indenting by multiples of 16 bits is very efficient.SetDummyDisplaySize: PROCEDURE [nScanLines: CARDINAL];Changes the size of the blank space at the top of the display. The space will be roundedup to an even number of scan lines and may be zero.Background: TYPE = {white, black};DisplayOff: PROCEDURE [color: Background];DisplayOn: PROCEDURE;DisplayOff releases all of the space allocated to the display and swaps out the font. All ofthe parameters of the display are saved so that DisplayOn can restore the previous state(but not the contents) of the display.StartCursor: PROCEDURE;StopCursor: PROCEDURE;StartCursor forks a process in DisplayControl that blinks the cursor. If the cursorprocess is already running, it is a no op. StopCursor stops it.BlinkCursor: PROCEDURE RETURNS [BOOLEAN];Blinks a "cursor" at the position where the next character will be displayed. Each callchanges the state of the cursor from "on" to "off" or vice versa. BlinkCursor returnsTRUE if the last call changed the cursor state to on. The cursor is always turned off beforea character is displayed or erased.#fpXI  bs ts`vtsx](r,srx[srsrxY%0xX2$srxUu _xTyI#xR OsXtstsxLXr@ I sXtstsxErHsr xDKsr xBlPx?u4  53 sr 4trtr 0sX tsts f/!ts f-z!*+rs r$sr(tr"s r&&sX tstststsx:r sr 7sX tstststsx4:r sr 0sX ts!ts x-r-s r x+% (s r! 'F #sXtsts x r s r } sr s r+ S v rs rsrs r J+s r$ sr =R222Alto/Mesa File PackageOctober 1980Logically, the Mesa file package is a sub-module of the segmentation machinery, but it is describedseparately because other objects (e.g. disk streams) also use this interface. Internally, the filemachinery maintains a set of items called FileObjects: these contain, among other things, the file'sdisk address and serial number, as well as its access rights, several reference counts, and an optionalfile length hint.The Mesa system follows most conventions of the Alto file system; see the Alto Operating SystemReference Manual for a description of the file system. A description of the various procedures usedto manipulate the Alto's directory appears in the section on Directories.FilesA file is an integral number of pages which logically appear to be contiguous, irrespective of theirphysical location. The pages of a file are numbered from zero up to some maximum (seeAltoDefs):MaxFilePage: CARDINAL; -- maximum file page numberPageNumber: TYPE = [0..MaxFilePage];In the Alto file system, page zero of the file (the leader page) is special; it contains file statusinformation. Thus the data actually begins at page one.Externally, a file is known by its name, which is just a string. Internally, Mesa retains only a file'sFP, which is an abbreviated form of the Alto file system's file pointer (see AltoFileDefs):FP: TYPE = RECORD [serial: SN, -- internal file serial numberleaderDA: vDA]; -- first virtual disk addressThe correspondence between file names and FPs is maintained in the file system's directory(SysDir). After the file is initially looked up, the name is discarded; the Mesa world deals only inFPs thereafter. A directory search is required if the name must be recovered.File ObjectsA FileHandle is used to refer to a file in the Mesa environment, and can be obtained by a call onNewFile (described below); it is simply a pointer to a record called a FileObject (seeSegmentDefs or the Appendix). fp\qi$qYrX TV S<+8 Q"s r0 OH NF J4t IPr'- G=p r&Blq ?r?% =v9 ;sr 8s usvt 51s us 1r); 0;8 ,a +Esr= s r 'susus f&O wIt f$svIt !Yr*sr- xrL  sr pr=$qi rs r7 sr  *s r 1s rpr  =V!Alto/Mesa File Package23FileHandle: TYPE = POINTER TO FileObject;FileObject: -- actually one variant of Object; the type FileObject = file Object.. . .open: BOOLEAN,-- if the file is openread, write, append: BOOLEAN,-- access rightslock: FileLockCount, -- reference countsegcount: SegCount, -- attached segmentsswapcount: RefCount, -- swapped in segments . . . ];-- plus other private fieldsThe following options are used when creating new file objects:AccessOptions: TYPE = [0..7];DefaultAccess: AccessOptions = 0;Read: AccessOptions = 1;Write: AccessOptions = 2;Append: AccessOptions = 4;ReadWrite: AccessOptions = 3;WriteAppend: AccessOptions = 6;ReadWriteAppend: AccessOptions = 7;VersionOptions: TYPE = [0..3];DefaultVersion: AccessOptions = 0;NewFileOnly: VersionOptions = 1;OldFileOnly: VersionOptions = 2;Read access allows existing pages of the file to be read; Write means that existing pages can bewritten (or deleted; perhaps a separate Delete option should be included). Append allows newpages to be added to the end of the file (files do not have holes in them).Fine point: Append does not imply Write access. Append means that new pages may be added to the file butexisting pages may not be modified.Disallowed combinations are {NewFileOnly, OldFileOnly} and {NewFileOnly, ~Append}. IfAppend access is not specified, OldFileOnly is assumed. If you like, you may specifyDefaultAccess, which is equivalent to Read. (Note that Append access must be specified inorder to create the file.)Fine point: if DefaultVersion is specified, the file is created if it did not previously exist.SignalsSignals associated with FileObjects are as follows:FileNameError: SIGNAL [name: STRING];The file name is invalid, or the file does not exist (OldFileOnly), or the file already doesexist (NewFileOnly).$fpXI  bs ususus ^ wyuy ur](u[sus&PtYsus&Pt X2s&PtVs&PtTs&PtS Lsus  J#! H| F E- C A @7# <us  :n" 8 7 3r/sr! 2)(srsr 0K .y uyzyuyrpuy. ,_# )rs rs rs rsr 'isr s r* %s rsr sr $ !yu yB)ccq rs r sususxwr )s rxs r  =W,Alto/Mesa File Package24FileAccessError: SIGNAL [file: FileHandle];An attempt to perform some operation not allowed by the current access, or the requestedaccess and version options are inconsistent (see the disallowed combinations above).InvalidFP: SIGNAL [fp: POINTER TO FP];A file positioning operation has determined that the file serial number in the FP of the fileobject does not match the disk label. Most likely, the FileHandle references a file whichhas been moved or destroyed (or clobbered) since it was last referencedFileError: SIGNAL [file: FileHandle]; -- all other file errorsFile Creation/DeletionA FileObject is created using the following procedures:NewFile: PROCEDURE [name: STRING,access: AccessOptions _ DefaultAccess,version: VersionOptions _ DefaultVersion]RETURNS [FileHandle];Given a file name and access rights, this procedure creates a new file object and returns apointer to it. A check is made that the file exists in the directory, creating it if necessary,but the file is not opened as a result of this call. Objects attached to the file (segments andstreams, for example) ensure that the file is open before attempting a transfer. If there isalready a file object for the file specified, its access is updated (by Oring; this is not aprotection system), and a pointer to the existing object is returned.InsertFile: PROCEDURE [fp: POINTER TO FP, access: AccessOptions _ DefaultAccess]RETURNS [FileHandle];Creates a file object directly from fp, without searching the directory. If there is already afile object with a matching fp, its access is updated (by or'ing; this is not a protectionsystem), and a pointer to the existing object is returned.Internally, Mesa keeps track of the number of segments attached to each file (segcount) and ofthose the number which are currently swapped in (swapcount). When the swapcount goes tozero, the file may be closed, and when the segcount goes to zero, the file object is released (onlythe latter operation happens automatically). Since a file may have other objects attached to it(streams, for example), it may be necessary to prevent the file object from being released even whenthere are no more segments attached to it. The lock field serves this purpose, and is manipulatedby the proceduresLockFile, UnlockFile: PROCEDURE [file: FileHandle];A maximum of MaxFileLocks locks may be performed on each file object. Note that a file objectis not automatically released when its lock count goes to zero.!'fpX  bsus^r K](T Ys usususVr3sr T8s r S<G Os wuswt KJqi Gbrs r+ Dsus fBlus f@& f?) f=vus :'rA8-36Y51A3?wr1E .s us f,usus+ f+Eus 'rsr9&O sr<$: !YNsr (sr sr  +sr* cL K *sr. m sus r s r2 )tr9 =Y))Alto/Mesa File Package25A FileObject is released byReleaseFile: PROCEDURE [file: FileHandle];The file is first closed if it is open; then its file object is released. A FileError will begenerated if there are segments associated with the file at the time of this call. Except forthis error check, releasing a file that is locked is a no-op.A file is physically destroyed by callingDestroyFile: PROCEDURE [file: FileHandle];In addition to releasing the file object, the file's pages are deleted and its entry is removedfrom the directory. The file object must not have any segments currently attached to it, normay it be locked; either condition results in a FileError.To be on the safe side, destroying a file is somewhat complicated if it currently has segmentsattached to it. The file must first be locked, then all of its segments deleted and all streamsattached to it destroyed, then the file should be unlocked and finally DestroyFile should becalled. This sequence assumes that no other client has a lock on the file.File PropertiesCharacteristics of the disk file associated with a FileObject are obtained and changed using thefollowing procedures:FindFile: PROCEDURE [fp: POINTER TO FP] RETURNS [FileHandle];Searches all existing file objects for one whose serial number and disk address match thosecontained in fp. Returns NIL if no match can be found.GetFileFP: PROCEDURE [file: FileHandle, fp: POINTER TO FP];Copies the file pointer from file into fp.GetFileAccess: PROCEDURE [file: FileHandle] RETURNS [access: AccessOptions];Converts the read, write, and append bits of a file object into a form that can be passedto NewFile.SetFileAccess: PROCEDURE [file: FileHandle, access: AccessOptions];Or's access into the file object (this is not a protection system).File lengths are not contained in every FileObject. A separate object contains the length for afile. This separate length object is not required and is allocated only when operations on filelengths are invoked (see SegmentDefs). Operations on file lengths are:GetEndOfFile: PROCEDURE [file: FileHandle]RETURNS [page: PageNumber, byte: CARDINAL];Returns the page number of the last page in the file that contains data, together with thenumber of bytes in that page (the number of the first non-existent byte in the page,$fpXI  brs r ^s usx[rXV Alto/Mesa Image Files28Check FilesCheck files differ from normal image files in that they do not contain all the code and datanecessary to start the execution of the image file. Check files only contain the data of the Mesasystem, and all code and other segments remain in their original files. As a result, check files aremade and restarted very quickly. However, care must be taken not to destroy files that are pointedto by the check file. Check files are useful for making check points in the execution of a Mesasystem. The procedures and signals that make check files are:MakeCheckPoint: PROCEDURE [name: STRING] RETURNS [restart: BOOLEAN];Makes a check file on file name. Returns to the caller when finished as if nothinghappened with restart set FALSE. If the check file is being restarted, it returns to thecaller with TRUE.NoRoomInCheckMap: SIGNAL;In MakeCheckPoint, the map in the ImageHeader has filled up. This usually meansthat there are too many segments in memory at the time the check file is made. The ability to make check files is not included in the basic system. Clients should include theCheckPoint module in their configuration. Running Image FilesMesa programs may run another image file without returning to the Alto Executive. Theprocedures and signals that implement this are:RunImage: PROCEDURE [file: SegmentDefs.FileSegmentHandle];Runs the image file specified by file where file is a segment handle for the header of theimage file. The current state of the present image file is lost, and the new image file isloaded and started.Fine point: currently the header of an image file is page one (this may change in the future, and may not beconstant). Communication between the two image files must be done via disk files (like Com.cm). See theAlto Operating System Reference Manual.InvalidImage: SIGNAL;In RunImage, file specifies an invalid image file. NoRoomForLoader: SIGNAL;In RunImage, there is no room for the bootstrap loader that loads and starts the imagefile. Clients should include the configuration ImageRunner in their configuration.!fpX $Aaqi ^rJ \V [:14 YW W[ VD> Rstststs tsOrsr) M srtr(LX tr I stsErs rsrs rDMu @r\ ?s r!9qi 6rR 4/ 1s t s&.Mr!srsr*,;*(ui'FW%w&r "ss ts%rsrsru stsrsrJu r)s r ( J=T Alto/Mesa Image Files29MiscellaneousThe version stamp of the currently running image file may be obtained by calling the procedure:ImageVersion: PROCEDURE RETURNS [BcdDefs.VersionStamp];The time that the currently running image file was created may be obtained by calling theprocedure:ImageTime: PROCEDURE RETURNS [TimeDefs.PackedTime];The same information can be obtained about the caller's BCD from the procedures:BcdVersion: PROCEDURE RETURNS [BcdDefs.VersionStamp];BcdTime: PROCEDURE RETURNS [TimeDefs.PackedTime];A client may stop execution of a Mesa system and return to the Alto Executive by calling:StopMesa: PROCEDURE;A client may terminate execution of a Mesa system as if shift-swat had been typed and return to theAlto Executive by calling:AbortMesa: PROCEDURE;Cleanup ProceduresClient programs sometimes need to be notified when certain events occur so they can performvarious cleanup functions. Cleanup procedures provide a facility to notify client programs whenimage files are made or restarted, and when stopping the execution of Mesa programs. The typesand data structures involved with Cleanup procedures are:CleanupProcedure: TYPE = PROCEDURE [why: CleanupReason];CleanupItem: TYPE = RECORD [link: POINTER TO CleanupItem,mask: CARDINAL,proc: CleanupProcedure];CleanupReason: TYPE = BcplOps.CleanupReason;BcplOps.CleanupReason: TYPE = {Finish, . . . Save, Restore, CheckPoint, Restart, Continue, . . .};CleanupReasons are copied from BcplOps. Valid ones are:Finish:StopMesa was called.Save:MakeImage was called.Restore:returning from MakeImage.Checkpoint:Checkpoint was called.Restart:returning from Checkpoint restarted by the Alto Executive.Continue:returning from Checkpoint.%&fpXI &aq ^r*5 [s tsts XUrY V Ss tsts PzrX8tr Ms tsts Jtsts GbrH D}s ts A.rQ ? ](stst s Ytst s VrL S\xAlto/Mesa Image Files31CleanupProcedures1.CleanupProcedures are called with interrupts and timeouts turned off. 2.This list of restrictions may not be exhaustive and care must be taken when usingCleanupProcedures.%&fpXI  bx ^rsr7 [ J Ysr Y=y,32Alto/Mesa Keyboard PackageOctober 1980The Keyboard package consists of the modules KeyStreams and Keyboard; it provides aTeletype style interface to the undecoded keyboard through a device independent stream interface.Multiple, independent keyboard streams are supported. A default keyboard stream is created atinitialization time. (See the section on StreamIO for higher level operations.) The KeyboardPackage also optionally causes the hardware cursor to track the mouse. A single keyboard processruns at interrupt level approximately 60 times per second to sample the keyboard hardware.The following procedures and types are defined in StreamDefs.KeyboardHandle: TYPE = POINTER TO Keyboard StreamObject;The standard operations on a keyboard stream are:reset[s]Clears the buffer associated with s; any characters in the buffer are lost.get[s]Returns the next character in the buffer; if endof[s] is TRUE, WAITs until it is FALSE.putback[s, i]Modifies the stream so that the next get[s] will return i, independent of any type-ahead.If the buffer is full, putback is a no-op (sorry about that). put[s, i]Produces a StreamAccess error.endof[s]TRUE if there are no characters in the buffer.destroy[s]Destroys s in an orderly way, freeing the space it occupies. Any characters in the buffer atthe time of the destroy are lost. If s is the current keystream, the StreamOperationerror results. fp\qi$qYrX T-s rsr S<)8 Q@ Opr, NFI LG IP2s r FsXtstFsX Br1 ?ds<r"sr( 8s5xr)prsprtrtr tr 2)s .r%sr sr-3sr )s&r s pr #Gstr* s [rsrPsr srs r t >RFAlto/Mesa Keyboard Package33Other keyboard-related operations include:CreateKeyStream: PROCEDURE RETURNS [KeyboardHandle];Creates a new keyboard stream. Any number of streams may be created. Each stream hasits own buffer for type ahead. (Space for the StreamObject is allocated from the systemheap.)GetDefaultKey: PROCEDURE RETURNS [KeyboardHandle];Returns the default stream (created at initialization time).GetCurrentKey: PROCEDURE RETURNS [KeyboardHandle];Returns the current stream. Initially the default keyboard stream is current.OpenKeyStream: PROCEDURE [stream: StreamHandle];Makes stream the current keyboard stream. The stream which was current before the callis undisturbed, except that input characters are no longer directed to it by the keyboardprocess, but to stream instead.CloseKeyStream: PROCEDURE [stream: StreamHandle];Makes the default keyboard stream current. Characters already typed remain in stream'sbuffer. The StreamOperation error results if stream is not the current stream.trackCursor: BOOLEAN;Setting the variable to TRUE enables cursor tracking; FALSE disables it. When tracking isenabled, the mouse coordinates are copied to the cursor coordinates each time the keyboardprocess runs.CursorTrack: PROCEDURE [b: BOOLEAN] = INLINE {trackCursor _ b};Provided for compatibility.Low Level AccessThe basic system does not provide access to the keyset or mouse through the stream. Definitionsare provided for clients wishing to access the bits of the keyboard directly or to change theinterpretation of any of the keys. The module KeyDefs defines types and procedures for lowerlevel access to the keyboard hardware.updown: TYPE = {down, up};KeyBits: TYPE = MACHINE DEPENDENT RECORD [blank: [0..377B],-- not usedKeyset1, Keyset2, Keyset3, Keyset4, Keyset5: updown,Red, Blue, Yellow: updown,Five, Four, Six, E, Seven, D, U, V,Zero, K, Dash, P, Slash, BackSlash, LF, BS: updown,#fpXI  br* ^ststsx[r7xY&s rxX2 TsXtstsxQr< NFsXtstsxJrN GsXtsxDZrsr;xB!8xA sr =sXtsx:nr6srx8 srsr 5xsX tx2)rtr trx0"8x. +sX tststs tFsx(=r%#qi  rS c#: /sr' & sXts wtstFsX!Zu )s4  # 33 x =^Alto/Mesa Keyboard Package34Three, Two, W, Q, S, A, Nine, I,X, O, L, Comma, Quote, RightBracket, Spare2, Spare1: updown,One, ESC, TAB, F, Ctrl, C, J, B,Z, LeftShift, Period, SemiColon, Return, Arrow, DEL, FL3: updown,R, T, G, Y, H, Eight, N, M,Lock, Space, LeftBracket, Equal, RightShift, Spare3, FL4, FR5: updown];Keys: POINTER TO KeyBits = -- magic memory location -- ;MouseButton: TYPE = {RedYellowBlue, RedBlue, RedYellow, Red, BlueYellow, Blue,Yellow, None};MouseBits: TYPE = MACHINE DEPENDENT RECORD [blank: [0..377B],-- Diablo, Versatec, etc.keyset: [0..37B],-- 0 => down, i.e. normal state is 37Bbuttons: MouseButton];Mouse: POINTER TO MouseBits = -- magic memory location -- ;KeyName: TYPE = {. . . ,-- unused valuesKeyset1, Keyset2, Keyset3, Keyset4, Keyset5,Red, Blue, Yellow,Five, Four, Six, E, Seven, D, U, V,Zero, K, Dash, P, Slash, BackSlash, LF, BS,Three, Two, W, Q, S, A, Nine, I,X, O, L, Comma, Quote, RightBracket, Spare2, Spare1,One, ESC, TAB, F, Ctrl, C, J, B,Z, LeftShift, Period, SemiColon, Return, Arrow, DEL, FL3,R, T, G, Y, H, Eight, N, M,Lock, Space, LeftBracket, Equal, RightShift, Spare3, FL4, FR5};Alto II names for some keys are different.FL1: KeyName = DEL;FL2: KeyName = LF;BW: KeyName = Spare1;FR1: KeyName = Spare3;FR2: KeyName = BackSlash;FR3: KeyName = Arrow;FR4: KeyName = Spare2;KeyItem: TYPE = RECORD [Letter: BOOLEAN,ShiftCode: [0..177B],NormalCode: [0..377B]];There is a KeyItem for every key (including mouse and keyset keys). A NormalCode =0 causes the key to be ignored; a ShiftCode = 0 puts in a zero for the key when the shiftkey is down; Letter means that the ShiftCode is selected by the shift lock key. Notethat the ShiftCode is 7 bits and the NormalCode is 8 bits.fpX  fbs f`v< f^ f](A f[ fYG VtF sX us S< ts= fQ NF tstFsX fL ?u fJsu& fIPs FtF sX us Bts fA u f?ds, f= f<# f:n+ f8 f74 f5x f39 f2) f0? -3r* g)s g(= g& g$ g#G g! g tsts fts f[ fer sr 's r sr. srsr)osrs r  (;XAlto/Mesa Keyboard Package35ChangeKey: PROCEDURE [key: KeyName, action: KeyItem]RETURNS [oldAction: KeyItem];This procedure changes the meaning of a key and returns the old value.DestructionClients of Mesa who wish to provide their own keyboard procedures may delete the standardkeyboard handler by calling:DestroyKeyHandler: PROCEDURE;It destroys the keyboard PROCESS and UNNEWs all the keyboard modules.#fpXI  bs ts`vtsx](rF'Wq Tr6# R OsXts LXrvrvr  L=G36Alto/Mesa MiscellaneousOctober 1980This section describes some miscellaneous facilities in Alto/Mesa.MiscDefsZero: PROCEDURE [p: POINTER, l: CARDINAL];FOR i IN [0..l) DO (p+i)^ _ 0.SetBlock: PROCEDURE [p: POINTER, v: UNSPECIFIED, l: CARDINAL];FOR i IN [0..l) DO (p+i)^ _ v.ByteBlt: PROCEDURE [to, from: POINTER, toByte, fromByte, nBytes: CARDINAL];Moves nBytes bytes from from[fromByte] to to[toByte]. It uses COPY if the bytesare aligned and BITBLT if they aren't.Warning: ByteBlt will not work in the case of overlap.DAYTIME: PROCEDURE RETURNS [AltoFileDefs.TIME];Returns the current time in the format maintained by the Alto Operating System andrecorded in Alto files. This is not the same format as a TimeDefs.PackedTime.CurrentTime: PROCEDURE RETURNS [LONG CARDINAL];Returns the current time. This is the same format as a TimeDefs.PackedTime.GetNetworkNumber: PROCEDURE RETURNS [CARDINAL];Returns the number of the network to which the Alto is connected or zero if there is nonetwork or no response from a gateway.Fine point: this procedure is used by the Compiler and others to generate unique identifiers for output files.CommandLineCFA: PROCEDURE RETURNS [POINTER TO AltoFileDefs.CFA];Returns a pointer to the CFA for the point at which the Mesa executive stopped readingthe command line (Com.cm). This is valid only when a configuration is started from thecommand line using Mesa.image. The caller can use the CFA to quickly open a stream onthe command line and read any additional commands. The CFA should be updated beforereturning to the Mesa executive. See the sections on Files and Streams for moreinformation. fp5\qi$qYrX TB$Pzq M,sXtststsItststs r FsX tstst stsC@tststs r ?sXtFsXtsts [lc: LONG CARDINAL],li => [li: LONG INTEGER],lu => [lu: LONG UNSPECIFIED],num => [lowbits, highbits: CARDINAL],ENDCASE];$PfpXI  bs tsts ^tstsx[r=xY5tr xX2'Sq PzsXtst stst sxM,rsr?xK H6sXtst stst sxDrsr"$xC@ (N>q ;r2s r 9 sr 6sXtsts tstsx3Ctsts tsr /sX tstFsXtstFsx,tsts tsrx*srtrpx)Wr: & sXts tststsx"rsrsrur srsr kstF sX ts tstststsxur-sr!.urxs8tsr"8vr \sX tstFsXtF sX tFsfX tFsX tF s Xts pts  )=\aAlto/Mesa Miscellaneous38The LongNumber structure permits access to the high and low words of LONG CARDINALs andLONG INTEGERs. Alternately, the following procedures may be used:LowHalf: PROCEDURE [LONG UNSPECIFIED] RETURNS [UNSPECIFIED];HighHalf: PROCEDURE [LONG UNSPECIFIED] RETURNS [UNSPECIFIED];LowHalf and HighHalf allow access to the machine dependent components of LONGCARDINALs, LONG INTEGERs and LONG POINTERs. LowHalf returns the least significant word,while HighHalf returns the most significant word.BytePair: TYPE = RECORD [high, low: [0..256)];LowByte: PROCEDURE [UNSPECIFIED] RETURNS [UNSPECIFIED];HighByte: PROCEDURE [UNSPECIFIED] RETURNS [UNSPECIFIED];LowByte and HighByte return the least significant and most significant byte of a wordrespectively.LongMult: PROCEDURE [CARDINAL, CARDINAL] RETURNS [product: LONG CARDINAL];Returns the double precision result of the unsigned multiplication of the two singleprecision arguments.LongDiv: PROCEDURE [num: LONG CARDINAL, den: CARDINAL] RETURNS [CARDINAL];Returns the result of the unsigned division of num by den. The result is undefined if thequotient is greater than 216-1.LongDivMod: PROCEDURE [num: LONG CARDINAL, den: CARDINAL]RETURNS [quotient, remainder: CARDINAL];Like LongDiv except both quotient and remainder are returned.BITAND, BITOR, BITXOR: PROCEDURE [UNSPECIFIED, UNSPECIFIED] RETURNS [UNSPECIFIED];These functions compute the bitwise AND, OR, or XOR of their arguments.BITNOT: PROCEDURE [UNSPECIFIED] RETURNS [UNSPECIFIED];Returns the ones complement of the input.BITSHIFT: PROCEDURE [value: UNSPECIFIED, count: INTEGER] RETURNS [UNSPECIFIED];Returns value shifted by ABS[count] bits. The shift is left if count > 0, right if count< 0. fpX  brs r7tr `vt r6 ](sXtstst stst s Y tstst stst sVrsr5tTrtF rXtFrXsr$S<sr# Os tstFsX Ltst stst s IP tst stst sFrsr2DZ A sX tstFsXts tFs=r&ur!< 8sXtstFsXtststs5xrur srsr34:v3r 0_sX tstFsXts f.tsts+irsr srsr (sXtst st stst s$r$xrxrxr !}sXtst stst s.r) sX tst ststst srsr tsrsr sr  =RiXAlto/Mesa Miscellaneous39Floating PointIt is possible to use floating point arithmetic on machines without microcode support for floatingpoint. With the proper compile-time switch, the Compiler generates calls to client suppliedprocedures via the system data vector (SD). The definitions of SD and all indexes into SD are inSDDefs. In the following description the notationSD[index]: PROCEDURE . . .means that the client should declare a procedure P of the correct type and assign its descriptor tothe appropriate element of SD (SD[index] _ P). In this case, the Compiler makes noassumptions about the representation of REALs except that they occupy two words.SD[sFADD]: PROCEDURE [a, b: REAL] RETURNS [REAL];Called to perform addition.SD[sFSUB]: PROCEDURE [a, b: REAL] RETURNS [REAL];Called to perform subtraction.SD[sFMUL]: PROCEDURE [a, b: REAL] RETURNS [REAL];Performs multiplication.SD[sFDIV]: PROCEDURE [a, b: REAL] RETURNS [REAL];Performs division (a/b).SD[sFCOMP]: PROCEDURE [a, b: REAL] RETURNS [INTEGER];Called to compare REALs. Returns -1 if ab.SD[sFLOAT]: PROCEDURE [LONG INTEGER] RETURNS [REAL];Converts fixed point to floating point.SD[sFIX]: PROCEDURE [REAL] RETURNS [LONG INTEGER];The Compiler does not generate calls to this procedure. It is included for completeness.BitBltThe Alto has microcode for moving arbitrary rectangles of bits around in memory. The operation iscalled BitBlt. BitBlt operations are specified via a table of parameters. One should read the AltoHardware Manual for a detailed description of the BitBlt operation. Mesa provides the followingdefinitions, in BitBltDefs for using BitBlt:BBTable: TYPE = MACHINE DEPENDENT RECORD [ptrs: {short, long} _ short,pad: [0..777B] _ 0,sourcealt, destalt: BOOLEAN _ FALSE, -- TRUE to use alternate memory banksourcetype: BBsourcetype _ block,$PfpXI &aqi ^rC \,0 [:'srsrsr Ysr,xVDs ts Rr0sr1 QNsrs r  O(tr$ LXsX tstststsxI r EsX tstststsxBlr ?sX tstststsx;r 8sX tstststsx51rsr 1sX tstststsx.rtrsrsrsr +EsX tstFsXtstsx'r' $sX tstststFsx!YrD)q rZ 5+u Sr)( s r sXtstststssxs ststsytyu ps! < )=\DAlto/Mesa Miscellaneous40function: BBoperation _ replace,unused: CARDINAL _ 0, -- used to set emulator bank register during operationdbca: POINTER _ NULL, -- destination BaseCoreAddressdbmr: CARDINAL _ NULL, -- destination raster width(in words)dlx: CARDINAL _ NULL, -- destination left xdty: CARDINAL _ NULL, -- destination top ydw: CARDINAL _ NULL,dh: CARDINAL _ NULL,sbca: POINTER _ NULL, -- source BaseCoreAddresssbmr: CARDINAL _ NULL, -- source raster width(in words)slx: CARDINAL _ NULL, -- source left xsty: CARDINAL _ NULL, -- source top ygray0: CARDINAL _ NULL, -- four words of "gray"gray1: CARDINAL _ NULL,gray2: CARDINAL _ NULL,gray3: CARDINAL _ NULL, -- Below here is not used by nonXM, nonXMesa Altosslbca: LONG POINTER _ NULL, -- source long BaseCoreAddressdlbca: LONG POINTER _ NULL]; -- destination long BaseCoreAddressBBptr: TYPE = POINTER TO BBTable;BBoperation: TYPE = {replace, paint, invert, erase};BBsourcetype: TYPE = {block, complement, andgray, gray};The hardware/microcode requires that BBTable be at an even memory address. Mesa thereforeprovides a type and transfer procedure so that one can allocate one word too many and be assuredof an even address.BBTableSpace: TYPE = ARRAY [0..SIZE[BBTable]] OF UNSPECIFIED;AlignedBBTable: PROCEDURE [p: POINTER TO BBTableSpace] RETURNS [BBptr];Finally, there is the operation itself:BITBLT: PROCEDURE [ptr: BBptr];These declarations are used in the following way:bbBits: BBTableSpace;bbP: BBptr = AlignedBBTable[@bbBits];. . .bbP^ _ [ desired values for a given operation ];BITBLT[bbP];. . .Mesa provides support for the BitBlt operation in conjunction with extended memory.Thesourcealt and destalt fields of the BitBlt record (BitBltDefs.BBTable) are used (do not usethe long pointer options). If the unused word in the BBTable is nonzero, the microcode sets theemulator bank register to that value for the duration of the BitBlt. In effect, BitBlt can only beused to move data within a single bank or between the MDS (bank zero) and some other bank. fpX  gbs g`stsyu3 g_ststsyu g]ststsyu" g\ststsyu gZststsyu gYststs gWststs gUststsyu gTyststsyu gRststsyu gQqststsyu gOststsyu gNiststs gLststs gKaststsyu/ gIstststsyu gHYstststsyu Fstststs C ts# AR ts& >rsr. <\ V : 7sX tststs tst s 4^tstststs 1r' -sXts *r1'Fs%%#"P0  r$2  srsrsr u drsr sr# J 5%  =S<a41Alto/Mesa ModulesOctober 1980This section documents the operations required to manipulate modules at a more detailed level thanprovided by the language. It is intended for experienced programmers who have a genuine need tomanipulate low level system structures. See FrameDefs for further details.Global FramesA GlobalFrame is the implementation of the PROGRAM language construct. All manipulation ofGlobalFrames is done using GlobalFrameHandles.GlobalFrameHandle: TYPE = POINTER TO GlobalFrame;GlobalFrame: TYPE = RECORD [. . .];The procedures which manipulate global frames are:GlobalFrame: PROCEDURE [link: UNSPECIFIED] RETURNS [GlobalFrameHandle];Returns the GlobalFrameHandle corresponding to link, which is interpreted as a controllink; it should be either a PROCEDURE, POINTER TO FRAME or PROGRAM. If link is not avalid control link, then either the signal InvalidGlobalFrame or UnboundProcedurewill be raised (see the section on Traps for a description of UnboundProcedure).ValidateGlobalFrame: PROCEDURE [UNSPECIFIED];Checks to see that the parameter points to a valid global frame; InvalidGlobalFrame israised if not. Used to check the validity of GlobalFrameHandle parameters by systemprocedures such as GlobalFrame.InvalidGlobalFrame: SIGNAL [frame: UNSPECIFIED];Indicates that frame does not point to a valid global frame.EnumerateGlobalFrames: PROCEDURE [proc: PROCEDURE [GlobalFrameHandle] RETURNS [BOOLEAN]]RETURNS [GlobalFrameHandle];Calls proc once for each global frame that currently exists. If proc returns TRUE,EnumerateGlobalFrames returns the GlobalFrameHandle of the last frameprocessed. If all global frames have been processed, NullGlobalFrame is returned.Warning: If new modules are created while EnumerateGlobalFrames is in control, it isnot guaranteed that they will be included in the sequence of GlobalFrameHandlespassed to proc.I fp$\qi(YrX TG S<X Q-sr&LXqi I rs rtr Gbs rsr Dstststs @ tsts =vr2 :'s tst stsx6r srsrx51trtrtrsrx3srsx1r#prsr .stst sx+Er"srx)srx's r $sutst sux!Yrsr(  stsctstststsxmrsrsrtrxsr] sr^x5sr xpr"srx)<srx  sr N :=Z!Alto/Mesa Modules42FramesA Frame is the implementation of the PROCEDURE language construct. All manipulation ofFrames is done using FrameHandles.FrameHandle: TYPE = POINTER TO Frame;Frame: TYPE = RECORD [. . .];Frames may be validated by calling:ValidateFrame: PROCEDURE [UNSPECIFIED];Checks to see that the parameter points to a valid frame; InvalidFrame is raised if not.InvalidFrame: SIGNAL [frame: UNSPECIFIED];Indicates that frame does not point to a valid frame.Module Creation / DeletionThe following procedures allow the programmer explicit control over the creation and deletion ofmodules. NewConfig and RunConfig provide an interface for loading configurations. Thelanguage construct NEW should be used for making copies of modules. UnNew andUnNewConfig allow the deletion of previously loaded modules and configurations.SelfDestruct allows a module to UnNew itself and return to its caller. These operations aredefined in FrameDefs. NewConfig: PROCEDURE [name: STRING];Loads the Bcd contained in the file name. A configuration loaded in this way can bestarted only by start traps or binding to and starting a frame or PROGRAM which it exports.LoadConfig: PROCEDURE [name: STRING] RETURNS [PROGRAM];Loads the Bcd contained in the file name but does not start it. It returns theconfigurations control module (or NIL if there is none). Note that this will not handleconfigurations whose control modules take parameters.RunConfig: PROCEDURE [name: STRING];Like NewConfig, except that the control modules of the configuration will be started ifthere are any.Warning: a StackError will result if a control module requires parameters.UnNewConfig: PROCEDURE [frame: GlobalFrameHandle];Deletes all global frames that are a part of the configuration containing frame, as well asall copies of those frames. Frees the storage for the global frames (to the segmentationmachinery if it was obtained from there, or to the frame heap), and frees all the codesegments."ffpX %aq ^rsrt r) \srs r Ys tststs VDtsts Rr# Ostst sLXrs r I s utst suErsr!@~qi =/rP ; srsr. 9;tr/sr 89s r : 6s rsr , 4 sr 1s tsts.Mr ur sr,,6 tr )Ws tstststs& r ursr$a"tr( "5 ks tstsrsr <u v t v4r s ts]r"(sr DC g  >[+Alto/Mesa Modules43UnNew: PROCEDURE [frame: GlobalFrameHandle];Deletes the global frame pointed to by frame. Returns the global frame to the frame heap(if the frame was allocated from that heap). Deletes the code segment of the frame if noother global frames share it.Warning: there is no check for references that are bound to the module being deleted.The language construct NEW and the operation UnNew should be used for creating and destroyingcopies of modules. They are relatively inexpensive operations, and provide facilities for usingmodule instances as objects. NewConfig and UnNewConfig on the other hand, are relativelyexpensive operations, and should only be used to add or remove configurations which are relativelystatic.SelfDestruct: PROCEDURE;UnNews the module of the caller, and returns to its caller's caller.NoGlobalFrameSlots: SIGNAL;Indicates that there is no room in the Global Frame Table when either NewConfig orRunConfig have been called or the language construct NEW has been invoked.Fine point: global frames for single modules (and copies) are allocated from the frame heap. Other configurationsallocate their global frames as a single (data) segment, and are subject to some wasted space due to breakage.Other signals may be raised when Newing modules; these signals indicate that the Bcd beingloaded is invalid, versions of interfaces don't match, or code files cannot be found or were compiledin non-Alto mode. In addition, when a module is started, the signal StartFault may be raised (seethe section on Traps for more information).Code ManipulationThe following procedures enable the user to control code swapping.MakeCodeResident: PROCEDURE [f: GlobalFrameHandle];Swaps in the code for f as low as possible in memory by pushing unlocked read-onlysegments out of the way. It will first swap out the code if it is swapped in.LockCode: PROCEDURE [link: UNSPECIFIED];Swaps in and locks the code segment associated with link (which may be either aPROCEDURE, POINTER TO FRAME or PROGRAM). The procedure GlobalFrame is used tofind the global frame of link (and may raise the signals InvalidGlobalFrame andUnboundProcedure).Warning: calling LockCode on a global frame that has not been started will disable starttraps on that module.%fpXI  bstsx^r sr-x](Ix[xX2pr4 Ttrsr+ S<C Qsrs r OM NF Js tsxGr? DZsutuxA r,srx?dsr,tr <8v] :Y 7fr!sr# ur 5K 4Es r 2ppr%*-3qi )rB &stsx#Grsr;x!N Qs tst sxr,srx[trtrtrs rxsrsrx srxpr sr1 x  =W<Alto/Mesa Modules44UnlockCode: PROCEDURE [link: UNSPECIFIED];Unlocks the code segment associated with link (which may be either a PROCEDURE,POINTER TO FRAME or PROGRAM). The procedure GlobalFrame is used to find theglobal frame of link (and may raise the signals InvalidGlobalFrame andUnboundProcedure).SwapOutCode: PROCEDURE [f: GlobalFrameHandle];Swaps out the code for f. If the code is locked, the ERROR SegmentDefs.SwapError israised for the code segment associated with f.Fine point: when a frame's code is swapped out, all the global frames that have the same code segment will beupdated to reflect the fact that the code is swapped out. These other frames either have their code segmentspacked with that frame or they are copies of that frame. Code may be swapped out by clients callingSwapOutCode or by the system.SwapInCode: PROCEDURE [f: GlobalFrameHandle];Swaps in and locks the code for f.Warning: calling SwapInCode on a global frame that has not been started will disablestart traps on that module.Miscellaneous OperationsThe following procedures are useful for debugging and determining what has been loaded.GetCaller: PROCEDURE RETURNS [PROGRAM];Returns the module containing its caller's caller.IsBound: PROCEDURE [link: UNSPECIFIED] RETURNS [BOOLEAN];In cases where configurations are conditionally loaded, IsBound can be used to determinethe presence of a module or procedure. The UNSPECIFIED argument should be an importedprocedure or program, or pointer to an imported variable."ffpX  bs tst s^r#srtr](trtrs r[srsrYsr Vs tsS]%Alto/Mesa Processes and Monitors46The lock and/or condition variables reside in storage that is allocated from an UNCOUNTEDZONE or MdsZone by means of the NEW operation. The compiler will initialize them evenif no other initialization is given in the NEW expression.The lock and/or condition variables reside in records allocated by other means.Initialization is the responsibility of the client.Using uninitialized monitor locks or condition variables or reinitializing monitor locks or condition variablesafter they have have begun to be used will lead to totally unpredictable behavior.The following operations are provided for initializing monitor locks and condition variables inclient-created data structures by means other than someZone.NEW.InitializeMonitor: PROCEDURE [monitor: POINTER TO MONITORLOCK];InitializeMonitor leaves the monitor unlocked and sets the queue of waiting processes toempty. It may be called before or after the monitor data is initialized, but must be calledbefore any entry procedure is invoked. Once use of the monitor has begun,InitializeMonitor must never be called again.InitializeCondition: PROCEDURE [condition: POINTER TO CONDITION, ticks: Ticks];InitializeCondition sets the queue of waiting processes to empty and sets the timeoutinterval of the condition variable to ticks (measured in units of "ticks" of an internalclock). It may be called before or after the other monitor data is initialized, but must becalled before any WAIT or NOTIFY operations are performed on the condition variable.Once use of the condition variable has begun, InitializeCondition must never be calledagain.Clients may convert clock ticks, milliseconds and seconds using the following operations:Ticks: TYPE = CARDINAL;Milliseconds: TYPE = CARDINAL;Seconds: TYPE = CARDINAL;MsecToTicks: PROCEDURE [Milliseconds] RETURNS [Ticks];TicksToMsec: PROCEDURE [Ticks] RETURNS [Milliseconds];SecondsToTicks: PROCEDURE [Seconds] RETURNS [Ticks];TimeoutsCondition variables which are initialized automatically are assigned a default timeout of a fewseconds. The timeout of any condition variable may be changed by the following operation.SetTimeout: PROCEDURE [condition: POINTER TO CONDITION, ticks: Ticks];fpX brHu`vrtr ur3^+ur [9H:Y3VvRUMR REr_ P3tur MrtXut uFtJ#r'H|Nsr FA&B$E-trs AtXut uFtX>r=< tr-;A Jsr9urur )7&trs6Kr 1yY .*tXutu *t utu 'tutu $>t uF t utXu t utuFt Xut uFt% q rV  E tX ut uFtX x=Y'Alto/Mesa Processes and Monitors47DisableTimeout: PROCEDURE [POINTER TO CONDITION];SetTimeout adjusts the timeout interval for all subsequent WAIT operations applied to thatcondition variable. DisableTimeout disables timeouts for all subsequent WAIT operationsapplied to that condition variable. However, neither operation has any effect on processesthat are already WAITing.SetTimeout and DisableTimeout are the only available operations to adjust a conditionvariable once it has been used. In particular, InitializeCondition must not be used forthis purpose, especially for condition variables which are automatically initialized.Pause: PROCEDURE [ticks: Ticks];Pause delays execution of its caller by the specified number of ticks.Detaching ProcessesA process which will never be joined is detached using the following operation.Detach: PROCEDURE [PROCESS];This operation sets the state of the process so that when it returns from its root procedure,it will be deleted immediately and its results, if any, will be discarded. If the process isinvalid (e.g., if the process has already been deleted), the signal InvalidProcess may begenerated.Priorities of ProcessesWhen a process is created with FORK, it inherits the priority of the FORKing process. If this provesunsatisfactory, the FORKed process may change its own priority with the following operation.SetPriority: PROCEDURE [Priority];Priority: TYPE = [0..7];A process may determine its own priority by calling:GetPriority: PROCEDURE RETURNS [Priority];There is no way for a process to alter the priority of another process.CAUTION: Use of multiple priorities in the current implementation is severely restricted. Anyprocess running at other than the default priority (currently, 1) is forbidden to use many of thestandard runtime support features of the Mesa environment. In practice, this means that non-standard priorities should be used only for interrupt handling, while all "normal" processing takesplace concurrently at the default priority level. In addition, all interrupt level code must be lockedin memory and should perform only a minimal amount of processing.!fpXI  btutuFtx^ r1urx](t r&ur x[N xYurxVt rt r. xT #trxS<U OtXutxLrA$Eqi BrO ?AtuF tutx;r4)x:KNx8Ct rx6 $0qi ,rur"ur +iur9 (tX ut $ ut !r4 QtX uFtX &rG prsIr vA ;" n5. ` fAZ =W Alto/Mesa Processes and Monitors48Aborting a processA process can be aborted by calling the following operation.Abort: PROCEDURE [PROCESS];The effect of this operation is to generate the signal ABORTED the next time the processexecutes a WAIT statement on any condition variable. If the process is already WAITing, animplicit NOTIFY is issued at the time this procedure is called.The argument to Abort is actually of type UNSPECIFIED, and is validated as a PROCESS at run-time.This is necessary since there is no generic type which includes all PROCESS types, regardless of result types.ABORTED: ERROR;-- Predeclared Mesa SymbolAborted: ERROR;The catch phrase for this signal may be attached to the WAIT statement, or it may beenabled in some scope according to the scope rules of Mesa. The catch phrase is executedwith the corresponding monitor locked. Mesa has a predefined error ABORTED, which forcompatibility reasons is also declared in ProcessDefs (i.e., Aborted = ABORTED).Programmers should use the predefined one in new code.The intended use of Abort is to provide a means whereby one process may hint to another that the lattershould go away, after first cleaning up. An Abort signal may occur on any condition variable, and thus everymonitor should be protected by some catch phrase for it.DisableAborts: PROCEDURE [POINTER TO CONDITION];This procedure prevents a process from aborting when it waits on the specified conditionvariable. It is currently not implemented.Control of schedulingThe Mesa process mechanism does not attempt to allocate processor time fairly among processes ofequal priority. Because of this, it may be desirable for a process which does not execute WAITstatements very frequently in the normal course of its computation to occasionally yield control ofthe processor by calling the following operation.Yield: PROCEDURE;This is a hint to the scheduler to run other processes of the same priority. However, thereis no guarantee that any other process will execute before the calling process resumesexecution, even if there are processes able to execute.In no case must the logical correctness of client programs depend on the presence or absence of calls to Yield;priorities and yielding are not intended as a process-synchronization mechanism. They are only hints to assistclients in meeting performance requirements.fpX !aqi ^r< []tXututXr7urVg ur sr0urTur0Qvuvu vuv P40uv# MuFsX KatutHrurFk:DDur Ct rt urAu6>Jvuv><uvwvw;v8 8]tXutuF t5r7!3g+ ,qi )Wrsr5 'Ru &Or21 $1 !}tXut.r srIs&06rv_ uvSwv7, 8 =S<.Alto/Mesa Processes and Monitors49Interrupt Level ProcessesThis section should be of interest only to programmers of interrupt level code.The Mesa monitor mechanism includes an extension to cover the case of communication betweensoftware processes and Input/Output controllers (hardware and/or firmware). This is done usingthe artifact of naked condition variables; that is, condition variables which are not effectivelyprotected by a monitor lock. The need for this arises from the fact that communication with I/Ocontrollers, while similar to normal interprocess communication, suffers from the problem that thecontrollers are intrinsically unable to enter monitors. This means that two important atomicityproperties provided by monitor locks are lost:Atomicity of wakeups: Monitor locks eliminate the need for a traditional "wakeup waiting"(or "interrupt pending") flag. Lack of the monitor lock requires the provision of such aflag if lost interrupts are not to result.Atomicity of data manipulations: The monitor lock avoids the problems of critical races onshared data; traditionally, I/O architectures take an ad hoc approach to this problem, ratherthan providing any general mechanism.The approach taken is to solve the first problem in a general way, and leave the second problem forcase-by-case resolution by the designers of specific controller/software interfaces. (This closelymirrors the approach normally taken in more traditional I/O-interrupt architectures.)A software process that deals with an I/O controller does so from within what appears to be anormal monitor. The monitor data includes the status and control blocks of the device and acondition variable which the device notifies to raise an "interrupt". Since the controller can accessthe shared data at any time, however, special care must be taken by the software to avoid conflicts.Similarly, if the controller tried to notify the software between the time the software decided to waiton the condition variable, and the time that it actually performed the WAIT operation, the NOTIFYwould be lost. To prevent this, the controller does a special form of NOTIFY (a naked notify), whichsets a wakeup-waiting flag in the condition variable. This difference is invisible to the software,which does a normal WAIT operation on the condition variable.Fine Point:The compiler generates procedure calls to system functions for long division, block equal, etc. There is acompilation switch which flags all such calls; this is useful for writers of interrupt routines. See the MesaUser's Handbook, Appendix A, for more details.The traditional operations EnableInterrupts and DisableInterrupts are provided for those rarecircumstances in which seizing the entire machine is the only form of mutual exclusion whichproves sufficient. Doing a WAIT while interrupts are disabled is not recommended.InterruptLevel: TYPE = [0..15];InterruptLevels correspond to the interrupt channels described in the Alto HardwareManual (except that the numbering is different). Interrupt level 0 corresponds to Altointerrupt channel 15, the memory parity interrupt channel. Several levels are used by theMesa system. Programmers of interrupt level code should see the definitions inProcessDefs.!fpXI #aqi ^sO [r0+ YI Xxsr)sr V?! UpP S` Rh.xOprCxMr$5xK*xH|p!r6xFsr!xE-% B5. @~+8 >U ;A :K!; 8J 7BH 5J 4:Furu 2r-urs r 12V /ur% ,v x)kx(=-wx'Fv $>rtrtr "8$ !6vuv2 tXut x r7s xr DxJZx"#3xt r >TWCAlto/Mesa Processes and Monitors50ConditionVector: TYPE = ARRAY InterruptLevel OF POINTER TO CONDITION;CV: POINTER TO ConditionVector = -- magic constant --;CV points to an array of pointers to the naked condition variables described above. Toassociate a CONDITION with an interrupt level, assign a pointer to the CONDITION to thecorresponding element of CV (CV[level] _ @cVar). To disable the naked NOTIFYs,assign NIL.DisableInterrupts, EnableInterrupts: PROCEDURE;These are MACHINE CODE procedures which disable and enable the handling of interrupts atthe lowest level. They should be used only in matching pairs and only when no otherexclusion mechanism will suffice. A count is maintained of the number of unmatchedDisableInterrupts so that nested pairs will work correctly.fpX  btututuFt ^XuFtXxt[r6Y ururX2trtrurVur S [type: DataSegmentType _ UnknownDS,-- type of data segmentpages: [1..PagesPerMDS],-- number of pages. . .],file => [swappedin: BOOLEAN, -- TRUE iff segment is inI fp!\qi(YrX T5sr S<srI Q\ O trtrtr& NF)tr2 L: IPs ur Gs urs r F"s ur DZ^ A +surs ?d urM =L <s ur8 :nE 8+/ 7 3E 2)_ 0.surs . ur7s r -3('q $r+5 #7 svsv s c vs wvw vwms(tsvsvxws"2t)s(t sx  3 uvsr(tvt =^GAlto/Mesa Segment Package52write: BOOLEAN,-- access optionsclass: FileSegmentClass,-- {code, other}inuse: BOOLEAN,-- software LRU bitlock: SegLockCount,-- locking reference countpages: [1..PagesPerMDS],-- number of pages, beginning with basefile: FileHandle,-- see the file packagebase: PageNumber,-- first page of the file to include . . .],ENDCASE]; The procedures which manipulate undiscriminated segments are:VMtoSegment: PROCEDURE [a: POINTER] RETURNS [SegmentHandle];The handle for the segment containing the specified address (as currently laid out inmemory) is returned. NIL is returned if no segment contains the segment; this does notimply that the page containing the address is free, however, since it may be reserved forsome operation currently in progress.SegmentAddress: PROCEDURE [seg: SegmentHandle] RETURNS [POINTER];The address of the beginning of the segment is returned; NIL is returned if the segment is afile segment and not currently swapped in. To guarantee the validity of the address thesegment should be locked when this procedure is called (see below), since the system mayswap out file segments that are not locked. Beware of dangling references!Data SegmentsData segments are associated only with virtual memory (there is no swapping file) and are nevermoved or swapped out.DataSegmentHandle: TYPE = POINTER TO DataSegmentObject;DataSegmentObject: TYPE = data SegmentObject;The procedures which manipulate data segments are:NewDataSegment: PROCEDURE [base: PageNumber, pages: PageCount]RETURNS [DataSegmentHandle];Creates a new data segment and returns a handle for it. If base is DefaultBase then thesegment is allowed to begin on any free page in memory. If base is an actual pagenumber (in [0..MaxVMPage]), an attempt is made to place the segment at that location.Note that pages should not be defaulted.DataSegmentAddress: PROCEDURE [seg: DataSegmentHandle] RETURNS [POINTER];Returns a pointer to the base of the segment in virtual memory. In the currentimplementation, segments always begin on a page boundary.fpX ]bsuvs%5t]`vsus%5t ]^svs%5t]](sus %5t][sus%5t%]Ysus %5t]X2sus %5t"]VsTvsx QrX= NFs vsvsvsJr;IPvr'GBF% Bsvsvsvsu?dr9vr=*.<Itr :n-t#51qi 1rN 0; ,svsv s )vsu &OrX2 #svs% f!Yvs r/ srs rc/ sr s r' sr svsvsvswr/9 =W@Alto/Mesa Segment Package53VMtoDataSegment: PROCEDURE [a: POINTER] RETURNS [DataSegmentHandle];The handle for the segment containing the specified address (as currently laid out inmemory) is returned. NIL is returned if no data segment contains it; this does not implythat the page containing the address is free, however, since it may be assigned to a filesegment, or reserved for some operation currently in progress.DeleteDataSegment: PROCEDURE [seg: DataSegmentHandle];The specified data segment is deleted and its segment object freed. When a segment issuccessfully deleted, any VM that it occupied becomes free.EnumerateDataSegments: PROCEDURE [proc: PROCEDURE [DataSegmentHandle] RETURNS [BOOLEAN]]RETURNS [DataSegmentHandle];Calls proc once for each data segment currently defined. If proc returns TRUE,EnumerateDataSegments returns the handle of the last segment processed. If the endof the set of data segments is reached, NIL is returned.As a debugging aid, data segments now have types.DataSegmentType: TYPE = CARDINAL[0..377B];The Debugger's COremap command will now display the type of the data segment. Defined typesare:UnknownDS: DataSegmentType = 0;FrameDS: DataSegmentType = 1;TableDS: DataSegmentType = 2;HeapDS: DataSegmentType = 3;SystemDS: DataSegmentType = 4;BitmapDS: DataSegmentType = 5;StreamBufferDS: DataSegmentType = 6;Clients can supply their own type which will be printed numerically. Clients should use type valuesgreater than 20B to allow room for more common types to be printed symbolically by theDebugger.File SegmentsUnlike data segments, file segments are associated with a contiguous group of pages in a file andare therefore swappable. Pointers into a file segment are valid only while it is swapped in (andlocked so that it will not be swapped out). A file segment that is swapped out occupies no space invirtual memory other than the segment object which describes it. If the LRU bit (inuse) is set, theswapper will ignore this segment on its first search for free pages. The swapper resets this bit, sothe segment will be considered for swapping if a second pass is necessary.FileSegmentHandle: TYPE = POINTER TO FileSegmentObject;#SfpXI  bsvsvsvsx^r;x](vr6 x[FxY> VsvsxSsr E J svsv s =WAlto/Mesa Segment Package54FileSegmentObject: TYPE = file SegmentObject;To create new file segments, useNewFileSegment: PROCEDURE [file: FileHandle, base: PageNumber, pages: PageCount, access: AccessOptions]RETURNS [FileSegmentHandle];Creates a new segment and returns a handle for it. The segment is associated with thecorresponding file pages, but the file is not opened and the segment is not swapped in. Ifbase is DefaultBase, the segment will begin with the first data page of the file, and ifpages is DefaultPages, it will include the last page of the file. Although it is generallynot done, a segment can begin with the leader page (page zero) of a file. Finally, ifaccess is DefaultAccess, read access is assumed.If the access specifies that changing the data is permitted, then whenever it is necessary to swap thissegment out and remove its pages from memory, pages will be written to the file (the Alto has nohardware to detect if the pages have actually been changed). It is possible to change the segment'saccess (by setting the write bit, for example), provided the file to which it is attached has theappropriate access rights.FileSegmentAddress: PROCEDURE [seg: FileSegmentHandle] RETURNS [POINTER];The address of the beginning of the segment is returned. The signal SwapError is raisedif the segment is not currently swapped in. To guarantee the validity of the address, thesegment should be locked when this procedure is called (see below), since the system mayswap out file segments which are not locked. Beware of dangling references!VMtoFileSegment: PROCEDURE [a: POINTER] RETURNS [FileSegmentHandle];The handle of the file segment containing the specified address (as currently laid out inmemory) is returned. NIL is returned if no file segment contains it. This does not implythat the page containing the address is free, however; it may be assigned to a data segment,or reserved for a segment currently being swapped in.DeleteFileSegment: PROCEDURE [seg: FileSegmentHandle];The specified file segment is deleted and its segment object is released. If the segment isswapped in, it is first swapped out (it should not be locked). If there are no other segmentsassociated with this segment's file (the file's segcount is zero), then ReleaseFile is calledto release the FileObject. When a segment is successfully deleted, any VM which it mayhave occupied becomes free.EnumerateFileSegments: PROCEDURE [proc: PROCEDURE [FileSegmentHandle] RETURNS [BOOLEAN]]RETURNS [FileSegmentHandle];Calls proc once for each data segment currently defined. If proc returns TRUE,EnumerateFileSegments returns the handle of the last segment processed. If the endof the set of data segments is reached, NIL is returned.If file segments are created while EnumerateFileSegments is in control, it is not guaranteedthat they will be included in the sequence of FileSegmentHandles passed to proc.fpX  bsvs ^rX [svs fY; fX2vsTr?S<-.Qsrs rDOsrs r< NF KLsrs r IPM G%; FK DZsr( B ?dsvsvsvs<r+sr :nE8Itr 7.t 3svsvsvs0rC.vr--3N +5 (=svs$rJ#GM!0srs r s r!Q svs f[vsvsvs fvsersr3srvusr 2(vr sr$ .sur sr \ =\2YAlto/Mesa Segment Package55Window SegmentsA window segment is similar to a file segment, except that the base and pages fields of thesegment may be altered (using the procedures described below) after it is created, in order to slidethe window around in a file or to vary the window's size. In reality, all file segments are in factwindow segments, and may be moved with the following procedure:MoveFileSegment: PROCEDURE [seg: FileSegmentHandle, base: PageNumber, pages: PageCount];If the segment is swapped in, it is first swapped out (it should not be locked). The segmentis then moved to the new location in the segment's file, but it is not swapped in. Thebase and pages are defaulted as in NewFileSegment.Fine point: in the current implementation, the disk address of the original segment is retained as a hint aboutthe new location, thus improving performance considerably when a one page segment is slid forward orbackward in a file.If the original and final position of the segment overlap, there is no guarantee that the overlappingpages are actually written, nor is it guaranteed that a minimum number of pages are transferred.Swapping SegmentsA segment can be swapped into and out of VM. The procedures and signals which implement thisare described in this section:SwapIn: PROCEDURE [seg: FileSegmentHandle];Swaps in the specified segment (if it is swapped out), opening the associated file ifnecessary; locks it so it won't be moved or swapped out. A SwapError will result if thesegment already has MaxSegLocks locks on it, or if the segment's file has MaxRefssegments currently attached to it and swapped in.To unlock a segment (allow it to be swapped), use the procedureUnlock: PROCEDURE [seg: FileSegmentHandle];Unlocks the specifed segment so that it can be swapped out. Note that locking behaves likereference counting, so that locks (performed by SwapIn) must be properly paired withUnlocks.A segment is swapped out usingSwapOut: PROCEDURE [seg: FileSegmentHandle];Swaps out the specified segment, writing the pages back to the file if the segment's accessmakes this necessary, and free the segment's VM pages. If the segment is locked, aSwapError will be generated.A program may explicitly request that the file pages corresponding to a segment be updated bycalling:#SfpXI %xaqi ^r>srsr \N [:9wr) Y? VDsvsT<xQNrLxONxMsrsrs rxKw?1xJG9+xH Er"C D`$>qi ;r,1 9 6svsx3CrRx19srx/s rsx.Mr1 *? 'svsx$arVx"srx!sur  usvsx'rRx:xsr 4)  =Yp Alto/Mesa Segment Package56SwapUp: PROCEDURE [seg: FileSegmentHandle];Write the pages of the segment back to the file if the access requires it. This operationdoes not unlock the segment or free the segment's VM pages.Note that neither SwapIn, SwapOut, or SwapUp are capable of extending a file (physicallyadding pages or bytes to it) based on the size of a segment. Segments may be attached only topages of a file that are already allocated on the disk (and chained together). Extending (orcontracting) a file must be done using other mechanisms (for example, see SetEndOfFile in thefile package).SignalsThe following signals may be generated by the segment package:InvalidSegmentSize: SIGNAL [pages: PageCount];In NewDataSegment or NewFileSegment a zero length segment has been requested,or the length exceeds the size of virtual memory.InsufficientVM: SIGNAL [needed: PageCount];In NewDataSegment or SwapIn there is not enough contiguous memory to accomodatea segment; needed is the number of pages that are actually required. If resumed, theallocation will be retryed; this gives the catcher of this signal a chance to free up some VM.Users can free VM pages by deleting data segments and by allowing locked segments tobecome swappable (see also the section below on swapping strategies).VMnotFree: SIGNAL [base: PageNumber, pages: PageCount];In NewDataSegment the base was not DefaultBase and the specified memory pageswere not free.SwapError: SIGNAL [seg: FileSegmentHandle];An invalid swapping operation was attempted with seg.SegmentFault: SIGNAL [seg: FileSegmentHandle, pages: PageCount];End of file was encountered while attempting to swap the segment in or out; pages is theactual number of pages in the segment. If pages is greater than zero then the signal maybe resumed; the segment will be truncated accordingly (of course, this will not alter the filelength).Low Level Memory AllocationOperations are provided for users that have a need to control memory allocation at a lower levelthan provided above. Allocation is controlled by the information in an AllocInfo (which is passedalong with each operation).fpX  bsvs^rK](; Ysrsrsr, X2B VO T*s r S< %Mq Jr> GbsuvsDrs rs r*Bl1 ?s uvsu;rs rsr4:' sr48&86C51E 1suvs%u.rs rs r, )s vs&Or1sr #s vs,rFsr +sr)cUqi 1r=# Gsr R =YpAlto/Mesa Segment Package57AllocInfo: TYPE = RECORD [effort: {hard, easy},direction: {topdown, bottomup},. . . ];If the effort field is hard, unlocked read-only file segments will be pushed out of the way. Thedirection field specifies the direction of the search for a hole. In the above procedures, datasegments are allocated topdown, and file segments are allocated bottomup. The followingconstants have been defined:EasyUp: AllocInfo = [effort: easy, direction: bottomup];EasyDown: AllocInfo = [effort: easy, direction: topdown];HardUp: AllocInfo = [effort: hard, direction: bottomup];HardDown: AllocInfo = [effort: hard, direction: topdown];The operations which perform low-level memory allocation are:MakeDataSegment: PROCEDURE [base: PageNumber, pages: PageCount, info: AllocInfo _ EasyDown]RETURNS [DataSegmentHandle];Acts like NewDataSegment, except info is passed as an additional parameter; the samerestrictions apply and the same signals may be generated.MakeSwappedIn: PROCEDURE [seg: FileSegmentHandle, base: PageNumber, info: AllocInfo _ EasyUp];Acts like SwapIn, except info and base are passed as additional parameters; the samerestrictions apply and the same signals may be generated. If base is DefaultBase thenthe segment is allowed to begin on any free page in memory. If base is an actual pagenumber (in [0..MaxVMPage]), an attempt is made to place the segment at that location(VMnotFree will be raised if the specified pages are not available).Swapping StrategiesA mechanism is provided for informing the segmentation package of emergency measures which canbe taken when the signal InsufficientVM is (about to be) generated. These measures take theform of SwappingProcedures which, when called by the swapping manager, attempt to makemore room in virtual memory and return a BOOLEAN indicating their success or failure to do so.The swapping manager invokes each procedure in turn, retrying the allocation after each procedurewhich has indicated success, until sufficient memory is obtained. If all such procedures indicatefailure, the signal InsufficientVM is raised (the swapping manager is not crying wolf!).The swapping strategies are maintained as a linked list of SwapStrategy nodes whose proceduresare invoked from head to tail.SwappingProcedure: TYPE = PROCEDURE [needed: PageCount, info: AllocInfo, seg: SegmentHandle]RETURNS [BOOLEAN];The parameters supplied to swapping procedures allow them to make intelligent decisions aboutmaking room: needed is the number of pages requested, info the AllocInfo supplied to theallocator, and seg the file segment that will use the allocated memory (NIL if unknown). #SfpXI  bs vsvs`v^]( Yrsr sr"$ X2sr2% Vsrsr T Qs8 O9 NF8 L9 IPr= FsvsDZ?Bvsx?dr s rsr "x=9 :nsvs8Dx5xr srsrsr.x3,srs rx2)@srx0 s r*x.sr:$)qi &OrT $s r5 #sur7 !Y vr. L  4. cs r6 :s r m svsvsw7vsvs r9$ sr srsr 3sr6vr  T >^CAlto/Mesa Segment Package58SwapStrategy: TYPE = RECORD [link: POINTER TO SwapStrategy,proc: SwappingProcedure];The swapping manager initializes the list with a single node which invokes code swapping as a lastresort.StrategyList: POINTER TO SwapStrategy _ @LastResort;LastResort: SwapStrategy = SwapStrategy[NIL, TryCodeSwapping].Swapping procedures are added to and removed from the list by the procedures:AddSwapStrategy: PROCEDURE [strategy: POINTER TO SwapStrategy];The specified strategy node strategy is added to the head of the list of swappingprocedures. If strategy is already on the list, its position and content are not disturbed.RemoveSwapStrategy: PROCEDURE [strategy: POINTER TO SwapStrategy];The specified strategy node is removed from the list of swapping procedures.Currently, TryCodeSwapping uses an (approximately) LRU (least-recently-used) algorithm tochoose a code segment to swap out. Only code segments which are not locked are considered.Unlocked read-only file segments are also swapped out by TryCodeSwapping.Since it is unattractive to require that the code for swapping strategies (other thanTryCodeSwapping) be locked, swapping procedures should observe the following conventions:If such a procedure obtains a state in which it has nothing to swap, it should either remove thenode containing itself from the strategy list or change the procedure in the node to beCantSwap: SwappingProcedure;Because CantSwap is part of the swapping manager (and therefore locked), this will avoidswapping in a strategy procedure which knows it has nothing to do.Miscellaneous ProceduresThe following procedures implement conversion between memory addresses and virtual memorypage numbers.PageFromAddress: PROCEDURE [a: POINTER] RETURNS [PageNumber];AddressFromPage: PROCEDURE [p: PageNumber] RETURNS [POINTER];PagePointer: PROCEDURE [a: POINTER] RETURNS [POINTER];PagePointer returns the address of the beginning of the page which contains itsargument.fpX  bs vsvs f`vv s f^ [r[ Y Vs v s S<(vs OrM Lsvs v sIPrsr-Gsr9 DZsvs v sA rL = sr7 <O :n9sr 7`1a$ 5xsr* 33- 2)W .s +rsr = )B)$qi !YrR  csvsvsvs vsvsvs  vsvsvsvsw r7  >WAlto/Mesa Segment Package59The following procedures implement conversion between FileSegments and DataSegments.Note that both segments must exist at the time of the call, and neither is destroyed. They must beof the same length (a SwapError will result otherwise).CopyDataToFileSegment: PROCEDURE [dataseg: DataSegmentHandle, fileseg: FileSegmentHandle];Initializes a file segment to have the contents of a data segment.CopyFileToDataSegment: PROCEDURE [fileseg: FileSegmentHandle, dataseg: DataSegmentHandle];Initializes a data segment to have the contents of the file segment.Extended Memory OperationsConfiguration InformationThe Mesa runtime system has an internal data structure that contains information about thehardware configuration of the machine on which it is running. Clients may obtain a copy of thisdata structure by calling GetMemoryConfig and should normally test for the existence ofextended memory by examining the useXM field. The extant banks of memory are indicated byMemoryConfig.banks, which is a bit mask (e.g., MemoryConfig.banks=140000B impliesthat banks zero and one exist).BankIndex: TYPE = [0..17B];ControlStoreType: TYPE = {Ram0, RamandRom, Ram3k, unknown};MachineType: TYPE = {unknown0, AltoI, AltoII, AltoIIXM, . . . };MemoryConfig: TYPE = MACHINE DEPENDENT RECORD [reserved: [0..37B],AltoType: MachineType,xmMicroCode: BOOLEAN,useXM: BOOLEAN,mdsBank: BankIndex,controlStore: ControlStoreType,banks: [0..177777B],mesaMicrocodeVersion: [0..177777B]];memConfig: PUBILC READONLY MemoryConfig;GetMemoryConfig: PROCEDURE RETURNS [MemoryConfig] = INLINEBEGIN RETURN[memConfig] END;The field memConfig.useXM is true if and only if the following conditions hold:1)the machine is an Alto II with XM modifications (AltoType = AltoIIXM),2)the Alto has more than one memory bank installed (banks ~= 100000B),#SfpXI  br"s rs r `v?$ ^sr [svsY8xVrB SJsr <sr4 :s psr trs psvsr 9T 6svFsXvs 2vFsX% /h vFsX vsvsvs , vFsXvFsX*rs(s'#s vs%|svs#s"-s ss$ vFs v AsvsXvvF s v Kr sr61srvrsrU2srvrsr( >YAlto/Mesa Segment Package603)the Alto has a 3K RAM, or it has a second ROM containing an appropriate version ofthe XMesa microcode.The microcode version field tells only the microcode version, not the Mesa release number. (See theMesa User's Handbook, Appendix G, for a discussion of microcode versions)Extended Memory ManagementThe facilities described in this section can be used regardless of the state of useXM.Segments in extended memory are created with the usual primitives in SegmentDefs. However,additional "default" parameter values for those procedures that expect a VM base page numberhave been provided. DefaultMDSBase requests allocation anywhere in the MDS.DefaultXMBase requests allocation anywhere in the extended memory banks but not in theMDS. DefaultBase0, DefaultBase1, DefaultBase2 and DefaultBase3 request allocationin particular banks. DefaultANYBase requests allocation anywhere in the extended memorybanks or the MDS. DefaultBase is equivalent to DefaultANYBase if the segment is a codesegment, otherwise, it is equivalent to DefaultMDSBase.The following procedures convert between segment handles and long pointers, and work forsegments anywhere in the 20-bit address space.LongVMtoSegment: PROCEDURE [a: LONG POINTER] RETURNS [SegmentHandle];LongSegmentAddress: PROCEDURE [seg: SegmentHandle] RETURNS [LONG POINTER];LongVMtoDataSegment: PROCEDURE [a: LONG POINTER] RETURNS [DataSegmentHandle];LongDataSegmentAddress: PROCEDURE [seg: DataSegmentHandle]RETURNS [LONG POINTER];LongVMtoFileSegment: PROCEDURE [a: LONG POINTER] RETURNS [FileSegmentHandle];LongFileSegmentAddress: PROCEDURE [seg: FileSegmentHandle]RETURNS [LONG POINTER];The following definitions are in AltoDefs; they define parameters of the extended memory system.MaxVMPage: CARDINAL = 7777B;MaxMDSPage: CARDINAL = 377B;PagesPerMDS: CARDINAL = MaxMDSPage+1;The following procedures convert between page numbers and long pointers, and are analogous toAddressFromPage and PageFromAddress.LongAddressFromPage: PROCEDURE [page: AltoDefs.PageNumber]RETURNS [lp: LONG POINTER];fpX  Ubr F`v ](+tr tr [trp r) W^tX TrPsr PAs r OK Mr{s vr( Ks vrA J#s rs rs rs r H|s vr+ F s rs rt E-r!s r A@ @7. ThAlto/Mesa Segment Package61PageFromLongAddress: PROCEDURE [lp: LONG POINTER]RETURNS [page: AltoDefs.PageNumber];The following procedures check the validity of long pointers and page numbers and raise theindicated errors.ValidateVMPage: PROCEDURE [page: UNSPECIFIED];InvalidVMPage: ERROR [page: UNSPECIFIED];ValidateLongPointer: PROCEDURE [a: LONG UNSPECIFIED];InvalidLongPointer: ERROR [lp: LONG UNSPECIFIED];Restrictions, Limitations, and "Features"Bank Registers. Mesa assumes it has exclusive control of the emulator bank register on AltoIIXMs.Client programs must not attempt to alter the bank register, but rather must use the publicinterfaces for moving data to and from extended memory (see LongCOPY and BitBlt, above).Segment Alignment. Segments may not cross bank boundaries. The first page of each non-MDSbank is reserved for internal allocation tables.Swapper Algorithms. The swapper loads a segment into extended memory by first swapping it intoprimary memory, then copying it to extended memory and releasing the MDS memory space.Thus, if the MDS is so full that the requested segment cannot be swapped in, InsufficientVM willbe raised, even though sufficient space for the segment may exist in other banks. (Analogouscomments apply when swapping out segments that must be written to disk.)#SfpXI  bsvF sXvF s`vvsXvsv ](r"9 [ X2s vF svsXv sv Us vFsvsXv sv S1362Alto/Mesa Storage Management FacilitiesOctober 1980Two collections of Mesa procedures are available for acquiring and managing storage areas. Thesegmentation machinery, which is described in detail elsewhere, provides contiguous groups of pages(256 word blocks) in the virtual memory. A simplified interface with that machinery is describedbelow. There is also a Mesa free storage package for managing arbitrarily sized nodes within freestorage zones. Since all state information is recorded within the zones themselves, the system-provided instantiation of the latter package can manage an arbitrary number of zones. There is onesystem-defined zone, called the free storage heap, available for general use; special procedures existfor creating and destroying nodes within it. The salient characteristics of these packages aresummarized below.The segmentation machinery is most suitable for obtaining large blocks of storage. All bookkeepinginformation associated with such blocks is recorded in auxiliary tables that are managed by thesegmentation system, not in the blocks themselves. Allocating or releasing a segment involvessearching and updating a number of those tables. On the other hand, any freed page becomesavailable for general use by the system (loading, buffering, etc.) and any two adjacent free pages canbe coalesced to become part of a new segment.The free storage package is a transliteration of a BCPL program by Ed McCreight that was itselfbased upon a suggestion by Don Knuth (The Art of Computer Programming, Volume 1, p. 453,#19). Within a zone, free nodes are kept as a linked list. One hidden word containingbookkeeping information is stored with each allocated node, and additional bookkeepinginformation is kept in the header of each zone. Allocation and release of nodes are usually veryfast. Adjacent free nodes are always able to be coalesced. It is also possible to add new areas ofstorage to enlarge a zone. These new areas are linked together so that they may be deleted if allthe nodes in an area are free; in addition, an entire zone may be deleted.The free storage package performs best when the sizes of nodes are small compared to the sizes ofthe block(s) making up the zone. In particular, the system's heap is intended to be used for small,transient data structures, such as the nodes of a temporary list structure or the bodies of (short)strings when the maximum length must be computed dynamically or the structure must outlive theframe that creates it. Use of the heap for large (i.e., multipage) nodes decreases flexibility instorage management, since the additional pages may become a permanent part of the zone.The allocators in both packages return absolute pointers; allocated nodes are not relocatable andthere is no garbage collection or automatic deallocation of any sort. Also, the values returned bythe allocators are free pointers (type POINTER TO UNSPECIFIED) which must be cast appropriately(usually by assignment) before they can be used. fp<\qi'$qYrX TB SwO LX+ I u tutuv Er'; Blutu tututuw?rQ = utu tutu tu :' tutu 7B tutututuw4rtr' 1yur+ .*8 ,u ru r * 'utu tututuw$>ru rFw" Hutu tututuwr u r u tututu tuw\r=  u tutuvkr ur^ x=YAlto/Mesa Storage Management Facilities64AllocatePages: PROCEDURE [npages: CARDINAL] RETURNS [base: POINTER];Like Storage.Pages, except that it doesn't try to move unlocked file segments out of theway.AllocateResidentPages: PROCEDURE [npages: CARDINAL] RETURNS [base: POINTER];The same as Storage.Pages.PagesForWords: PROCEDURE [nwords: CARDINAL] RETURNS [npages: CARDINAL];The same as Storage.PagesForWords.FreePages: PROCEDURE [base: POINTER];The same as Storage.FreePages.Free Storage PackageThe following definitions are available in FSPDefs. A zone is a block of storage containingembedded nodes. The length of either a zone or a node is a value of typeBlockSize: TYPE = INTEGER [0..VMLimit/2]; -- 15 bits.Each zone is headed by a ZoneHeader, which is a monitored record with the following publicfields:. . .threshold: BlockSize,-- minimum node size in zonechecking: BOOLEAN,-- zone checking (see below). . .Zones are identified by pointers of typeZonePointer: TYPE = POINTER TO ZoneHeader; Associated with each zone is a procedure of typeDeallocator: TYPE = PROCEDURE [POINTER]; which is used to deallocate the storage used by the zone. The following Deallocator may besupplied when nothing is to be done to the storage being freed:DoNothingDeallocate: Deallocator; Zone OperationsAn arbitrary block of (uninterpreted) storage is converted to a zone by the procedureMakeNewZone: PROCEDURE [base: POINTER, length: BlockSize, deallocate: Deallocator]RETURNS [z: ZonePointer];Such a block can alternatively be made an extension of an existing zone by callingfpX'  butu tututu^ru r6]( ZCutu tututuVr u r Tutu tutu tuPr ur Mu tutuJr ur EQqi Br+ursr @[sr; = u tutups 9r u r7 851p3u ?s1u tus0;p ,r( *u tututu r &0 #u tutr '"u r ? utr#ipX rU u tu ftu- fUtu rR =]LAlto/Mesa Storage Management Facilities65AddToNewZone: PROCEDURE [z: ZonePointer, base: POINTER, length: BlockSize, deallocate: Deallocator];The following procedures default DoNothingDeallocate as the Deallocator:MakeZone: PROCEDURE [base: POINTER, length: BlockSize] RETURNS [z: ZonePointer];AddToZone: PROCEDURE [z: ZonePointer, base: POINTER, length: BlockSize];The following errors can be raised if the space provided is not a reasonable size.ZoneTooSmall: ERROR [POINTER];The storage provided is not large enough for a ZoneHeader plus one free node and oneallocated node.ZoneTooLarge: ERROR [POINTER];The storage provided is too large to be represented by a BlockSize (15 bits)PruneZone: PROCEDURE [z: ZonePointer] RETURNS [BOOLEAN];TRUE is returned if any areas were freed, otherwise FALSE.A zone may be destroyed and all its storage freed by callingDestroyZone: PROCEDURE [z: ZonePointer];No check is made for any nodes that are in use.Warning: This operation cannot be protected by the monitor, and can therefore result insevere errors if another process is inside the zone.Node OperationsThe largest node that can be allocated in a virgin block of size length is length-ZoneOverhead.A node is allocated byMakeNode: PROCEDURE [z: ZonePointer, n: BlockSize] RETURNS [POINTER];The value returned points to a block of n words; there is an additional hidden word ofoverhead (at offset-1) which must be preserved by users of the node. Nodes are sometimessplit to satisfy allocation requests. Splitting within a zone z never generates fragments withsize less than z.threshold, which is initialized to the minimum size of a free node. Arequest for a node of size n will produce a node with size in the range [n . .n+z.threshold). The actual size of an allocated node is returned byNodeSize: PROCEDURE [p: POINTER] RETURNS [BlockSize];TfpX'I  bu tu`vtu. ](r!uru r ZCu tututu W^ tutu TrR Q+u tutuxMr/u rxL5 IPu tutuxFr9ur Cu tututux@7tr0tr << :u tux7r/x4:pr+%x24&.qpX *Nr%urur ' $u tututux r(prx% Mx}7urxu r6x/  ur,ux r 93 u tututu . =QVhAlto/Mesa Storage Management Facilities66If after coalescing all free nodes, a node of the requested size cannot be found,NoRoomInZone: SIGNAL [z: ZonePointer];is raised. This signal can be resumed (after, e.g., adding to the zone), and another attempt toallocate and return a suitable node will be made. An allocated node is returned to the zone byFreeNode: PROCEDURE [z: ZonePointer, p: POINTER];Alternatively, an existing node can be split by callingSplitNode: PROCEDURE [z: ZonePointer, p: POINTER, n: BlockSize];the first n words of the node p remain allocated, and the remainder of the node is freed.When a zone z is created, the variable z.checking is initialized to FALSE. If that variable is set toTRUE, the zone is checked for consistency prior to each transaction involving that zone. A failureraises one of the following signals:InvalidZone, InvalidNode: ERROR [POINTER];Allocation From The HeapClients who use heap storage extensively are encouraged to create their own heap from the aboveoperations. The following procedures provide an example of a simple interface to the free storagepackage.myHeap: FSPDefs.ZonePointer _ NIL;GetSpace: PROCEDURE [nwords: CARDINAL] RETURNS [p: POINTER] =BEGIN OPEN Storage, FSPDefs;np: CARDINAL;p _ MakeNode[myHeap, nwords !NoRoomInZone =>BEGINnp _ PagesForWords[nwords + ZoneOverhead + NodeOverhead];AddToNewZone[myHeap,Storage.Pages[np],np*AltoDefs.PageSize,Storage.FreePages];RESUMEEND];END;FreeSpace: PROCEDURE [p: POINTER] ={FSPDefs.FreeNode[myHeap, p]};GetString: PROCEDURE [nchars: CARDINAL] RETURNS [s: STRING] =BEGINs _ GetSpace[StringDefs.WordsForString[nchars]];s^ _ [length: 0, maxlength: nchars, text:];END;fpX'  brQ ^u tu [r V YG Vu tutu SZRAlto/Mesa StreamIO Package72String OutputWriteString: PROCEDURE [s: STRING];The string s is written on the OutputStream.WriteLine: PROCEDURE [s: STRING];The string s is written on the OutputStream followed by a carriage return.WriteSubString: PROCEDURE [ss: StringDefs.SubString];The substring ss is written on the OutputStream.Number InputThese procedures use the StringToNumber conversion procedures from the Strings package.ReadNumber: PROCEDURE [default: UNSPECIFIED, radix: CARDINAL]RETURNS [UNSPECIFIED];ReadID followed by StringToNumber. The value default will be displayed if ESC istyped. radix is a default value, (use the "B" or "D" notation to force octal or decimal).radix values other than 8 or 10 cause unpredictable results.ReadDecimal: PROCEDURE RETURNS [INTEGER];ReadID followed by StringToDecimal.ReadOctal: PROCEDURE RETURNS [UNSPECIFIED];ReadID followed by StringToOctal.Number OutputNumberFormat: TYPE = RECORD [base: [2..36], zerofill, unsigned: BOOLEAN, columns: [0..255]];A NumberFormat, say f, refers to a number whose base is f.base; the field isf.columns wide; if f.zerofill, the extra columns are filled with zeros, otherwise spacesare used; if f.unsigned, the number is treated as unsigned.OutNumber: PROCEDURE [StreamHandle, UNSPECIFIED, NumberFormat];Converts the value to a character string of digits as specified by the NumberFormat andoutputs them to the StreamHandle.YfpX #taquiq ^s tsts[:r srs r Ws tstsTr srs r QNstsMr srs r#uHquiq Etrs rsr B%s ts t sts f@~tst s=/r s r srtr;srsrsr&9sr7 6s tststs3Cr sr /s tstst s,r s r"'iquiq $s tsts f"s#ts%rs rsr"sr}sr s r$ s r$ s tst s9r(s rs r J . . . Display => . . . Disk => . . . Other => [type: UNSPECIFIED, data: POINTER], ENDCASE];The procedures which create streams return discriminated pointers (a DiskHandle, for example),which can be assigned to variables of type StreamHandle without any loopholes. Most streamprocedures (and all of the standard operations) expect StreamHandles (which can be matched byany discriminated pointer); they check at runtime for the appropriate stream type.Error conditions are reported in a fashion independent of the particular stream type, using thefollowing definitions (not all error codes are applicable to all stream types): fp!e\qi$qYrX TG S<%? Q(> O6$ NF J:sr IPsrR G(7 FH sr DZ0sr A t r0 ?d! t r$ =t rt r :nt ststst 7ststst 5ststst 2 ststst / stst f.st f,_ststs t f*sts t f)sts t f'iststst f%st f$ f"ssts f t f% f} fs tst f/st r8 t r 9+t r$ $t pr R *5 O =[^2Alto/Mesa Streams75StreamError: SIGNAL [stream: StreamHandle, error: StreamErrorCode];StreamErrorCode: TYPE = {StreamType, StreamAccess, StreamOperation,StreamPosition, StreamEnd, StreamBug};As the definition implies, each stream object contains procedures that implement the standardstream operations, as described below (s is a StreamHandle, i is an item of the appropriate type,and "code error" means that SIGNAL StreamError[s, code] is raised). For each StreamType,there is a create procedure which returns a StreamHandle. Then, for example, to invoke get fora StreamHandle s, simply say s.get[s].reset[s]Restores the stream to some initial state, generally as close as possible to the state it is injust after it is created.get[s]Returns the next item; StreamAccess error if s cannot be read or if endof[s] is truebefore the call.putback[s, i]Modifies the stream so that the next get[s] will return i and leave s in the state it was inbefore the putback.put[s, i]Writes i into the stream as the next item; StreamAccess error if the stream cannot bewritten; StreamEnd error if there is no more space in the stream.endof[s]TRUE if there are no more items to be gotten from s. For output streams, endof is device-dependent.destroy[s]Destroys s in an orderly way, freeing the space it occupies. Note that this has nothing todo with deleting any underlying data structures or processes associated with the stream (likea disk file, for example, or the keyboard process).Each of these operations is defined more precisely in the descriptions of the individual stream typeswhich appear in separate sections. All of the stream routines produce the StreamType errorwhen the variant of the StreamObject they are passed is not what they are expecting. See theDisk Streams, Display, and Keyboard sections for details of specific stream types.The Other variant of a StreamObject is provided so that clients can easily provide other typesof streams using the same standard set of operations. The data field of an Other StreamObjectshould point to any additional data required by the particular stream. Clients with more than onetype of Other stream should include a type code in the type field.&#fpXI  bt st0 ^st](*[& X2rL V'trt rtr  Ttrsptrt r S<,t urtr Qt r tr NFtxJrYxIP FtxBrpt r tr tprxA  =t x:nr%tr tr tr x8 tr 5xtx2)rtrt prx0tr/ -3tx)sr.trtpr x(= $t x!rtrF x<!xQ3 J [*!t r t r9  prprprpr/ tr t r/ ;tr t orO tr5 =Z;76Alto/Mesa String PackageOctober 1980This section describes procedures that implement various string operations. The necessary TYPE andPROCEDURE declarations appear in StringDefs. The interface String is approximately the sameas StringDefs, and is also exported by the system. (Constants defining word size, character size,etc. are in AltoDefs.) Specific language features concerning STRINGs are described in more detailin the Mesa Language Manual (see the index).SubStringDescriptor: TYPE = RECORD [base: STRING,offset, length: CARDINAL];SubString: POINTER TO SubStringDescriptor;A SubStringDescriptor describes a region within a string. The first character isbase[offset] and the last character is base[offset+length-1].WordsForString: PROCEDURE [nchars: CARDINAL] RETURNS [CARDINAL];Calculates the number of words of storage needed to hold a string of length nchars. Thevalue returned includes any system overhead for string storage.LowerCase: PROCEDURE [CHARACTER] RETURNS [CHARACTER];Changes upper case characters into lower case ones. This is a noop if the character is not aletter.UpperCase: PROCEDURE [CHARACTER] RETURNS [CHARACTER];Changes lower case characters into upper case ones. This is a noop if the character is not aletter.String ConstructionAppendChar: PROCEDURE [s: STRING, c: CHARACTER];Appends the character c to the end of the string s; s.length is updated; s.maxlength isunchanged.AppendString: PROCEDURE [to, from: STRING];Appends the string from to the end of the string to; to.length is updated;to.maxlength is unchanged. fp\qi$qYrX T&5sr Strtr t r  =WAlto/Mesa String Package77AppendSubString: PROCEDURE [to: STRING, from: SubString];Appends the substring in from to the end of the string in to; to.length is updated;to.maxlength is unchanged.StringBoundsFault: SIGNAL [s: STRING] RETURNS [ns: STRING];An attempt was made to increase the length of s to be larger than s.maxlength. Thecatch phrase should return a string ns with more room.DeleteSubString: PROCEDURE [s: SubString];Deletes the substring described by s from the string s.base; s.base.length is updated;s.base.maxlength is unchanged.String ComparisonEqualString, EqualStrings: PROCEDURE [s1, s2: STRING] RETURNS [BOOLEAN];Returns TRUE if s1 and s2 contain exactly the same characters.EquivalentString, EquivalentStrings: PROCEDURE [s1, s2: STRING] RETURNS [BOOLEAN];Returns TRUE if s1 and s2 contain the same characters except for case shifts. Note: stringscontaining control characters may not be compared correctly.EqualSubString, EqualSubStrings: PROCEDURE [s1, s2: SubString] RETURNS [BOOLEAN];Analogous to EqualString and EqualStrings.EquivalentSubString, EquivalentSubStrings: PROCEDURE [s1, s2: SubString]RETURNS [BOOLEAN];Analogous to EquivalentString and EquivalentStrings.CompareStrings: PROCEDURE [s1, s2: STRING, ignoreCase: BOOLEAN _ TRUE]RETURNS [INTEGER];Lexically compares two strings and returns -1, 0, 1 if the first is less than, equal to, orgreater than the second; an optional parameter may be supplied to ignore case differences.String to Binary ConversionStringToNumber: PROCEDURE [s: STRING, radix: CARDINAL] RETURNS [UNSPECIFIED];The characters of s are interpreted as a number whose value is returned. radix is used inthe conversion unless the "B" ("b") or "D" ("d") notation is used to force octal or decimal.Values of radix other than 8 or 10 are not supported.$fpXI  btststx^rtrtrtr x](t r YtXststststxVr# trt rxT$tr QtXstxNFr#trtrt r xLtr %XGbqi Dt rXt st stststx@rsrtrtr% =vtrXtst stststx:'rsrtrtru x8< 51t rXtsF tXststx1r t rt r .trXtsF tX,ststx)r trtr &OtsF tX st sFt$stXstx!YrIxJ"'uqi 'tXststststs txrtr3tr x1trtrtrtr.x tr& B;iWGAlto/Mesa String Package78StringToDecimal: PROCEDURE [s: STRING] RETURNS [INTEGER];Calls StringToNumber[s, 10].StringToOctal: PROCEDURE [s: STRING] RETURNS [UNSPECIFIED];Calls StringToNumber[s, 8].StringToLongNumber: PROCEDURE [s: STRING, radix: CARDINAL] RETURNS [LONG INTEGER];The characters of s are interpreted as a LONG INTEGER whose value is returned. radix isused in the conversion unless the "B" or "D" notation is used to force octal or decimal.Values of radix other than 8 or 10 are not supported.InvalidNumber: SIGNAL;A string is not a valid number if it is empty or contains characters other than digits (aleading '- and trailing 'B or 'D with scale factor are allowed).Binary to String ConversionAppendNumber: PROCEDURE [s: STRING, n, radix: CARDINAL];The value of n is converted to text using radix and appended to s; radix should be inthe interval [2..36].AppendDecimal: PROCEDURE [s: STRING, n: INTEGER];IF n < 0 THEN AppendChar[s, '-]; AppendNumber[s, ABS[n], 10].AppendOctal: PROCEDURE [s: STRING, n: UNSPECIFIED];AppendNumber[s, n, 8]; AppendChar[s, 'B].AppendLongDecimal: PROCEDURE [s: STRING, n: LONG INTEGER];IF n < 0 THEN AppendChar[s, '-]; AppendLongNumber[s, ABS[n], 10].Fine Point:AppendDecimal and AppendLongDecimal deal properly with FIRST[INTEGER] andFIRST[LONG INTEGER], even though their descriptions would imply otherwise.AppendLongNumber: PROCEDURE [s: STRING, n: LONG UNSPECIFIED, radix: CARDINAL];The value of n is converted to text using radix and appended to s; radix should be inthe interval [2..36]. xfpX  btstststst^rtr [tXstststs tX2rtv TtXststststsFtQrtrs rtrO#trtrNF tr& JtXstGrBFtr trtr@qi =vtX stst st:'r trtrtrtr 8 tr 51tXststst1stst$str .tX stsFts t+E(v 'tXststsFt$stst(str !}w t w;tw <ststwQsts tw7 tXststsF tXstr trtrtrtr   tr :RF;79Alto/Mesa Time PackageOctober 1980This section describes procedures that implement various operations on dates and times. Thenecessary TYPE and PROCEDURE declarations appear in TimeDefs and are described below.PackedTime: TYPE = LONG CARDINAL;A PackedTime is the number of seconds since midnight January 1, 1901 GMT.DefaultTime: PackedTime;UnpackedTime: TYPE = RECORD [year: [0..2050],-- years less than 1901 are not possiblemonth: [0..12),-- January = 0day: [0..31],-- first day of month = 1hour: [0..24),minute: [0..60),second: [0..60),weekday: [0..6],-- Monday = 0zone: [-12..12],-- Pacific = 8dst: BOOLEAN];CurrentDayTime: PROCEDURE RETURNS [time: PackedTime];Returns the current date and time in packed format.UnpackDT: PROCEDURE [PackedTime] RETURNS [time: UnpackedTime];Converts a packed format time to a more convenient unpacked format. If the argument isDefaultTime, the current time is used.PackDT: PROCEDURE [unp: UnpackedTime, computeDST: BOOLEAN _ TRUE]RETURNS [time: PackedTime];Converts unp into packed format. If computeDST is TRUE, the time zone and daylightsavings time are computed according to local conventions rather than taken from unp. Ifany of the fields of unp contain illegal values, PackDT will signal InvalidTime.InvalidTime: ERROR;PackDT has discovered illegal values in the unpacked time.AppendDayTime: PROCEDURE [s: STRING, u: UnpackedTime, zone: BOOLEAN _ FALSE];Converts u to a text string of the form 12-Jan-78 14:56:13 and appends it to s. If zone isTRUE then the time zone is included, e.g. 1-May-78 14:56:13 PDT.I fp"\qi(YrX T&6 S< srsrtr OtX stsFtxLrt r= IPtX F ststDZdu(Btdu A t du?dt =<:ndu 8tdu 7tst 3ststx0r3 -3tX st stx)r:x(=t r $tXst!sFt#GstXxrtrt rsrxQ@trxtrtr t r [tX stx r4 tXststsFtxortrCtrtrx sr!vr =ZAlto/Mesa Time Package80AppendFullDayTime: PROCEDURE [s: STRING, u: UnpackedTime] = INLINE{AppendDayTime[s: s, u: u, zone: TRUE]};RealTimeClock: POINTER TO CARDINAL = -- magic location --;Defines the location of the Alto Real Time Clock. See Alto: A Personal Computer System;Hardware Manual.ReadClock: PROCEDURE RETURNS [LONG UNSPECIFIED];Returns the high resolution clock. The format of the result is machine dependent. fpX  btststs f`vtst ](sFtXvtYr%v!X2 TtX sFtstQr'+ QM8P81Alto/Mesa TrapsOctober 1980All traps generated by Mesa are converted into signals or errors of the same name. Except for theparity error and stack error traps, all of the signals described below are related to specific languagefeatures and are described in more detail in the Mesa Language Manual (see the index). They aredefined in TrapDefs.StartFault: SIGNAL [dest: GlobalFrameHandle];An attempt was made to start or restart the frame dest, but it is not a valid global frame.Usually this means that a module or program was not bound, a program being restarteddoes not STOP, or a module that has parameters is being started as a result of a start trap.ControlFault: SIGNAL [source: FrameHandle] RETURNS [ControlLink];An attempt was made to transfer to a null control link while executing in the framesource. Usually this means some external links have been clobbered. This signal can beresumed with a control link that will be used to retry the transfer.UnboundProcedure: SIGNAL [dest: UNSPECIFIED] RETURNS [ControlLink];An attempt was made to transfer to dest but it had an unbound tag. Usually this meanssome external links have not been bound or the GFT entry of dest is null (probably adeleted module). This signal can be resumed with a control link that will be used to retrythe transfer.BoundsFault: SIGNAL;An attempt has been made to exceed the bounds of a STRING, ARRAY or SubRange (notethat this includes assigning a negative INTEGER to a CARDINAL.) in a module that wascompiled with the /b switch.PointerFault: SIGNAL;An attempt has been made to dereference NIL in a module that was compiled with the /nswitch.LinkageFault: ERROR;A transfer has been attempted through a port that has not been connected to some otherport or procedure (the link field of the port was null).PortFault: ERROR;A transfer has been attempted to a port which is not pending (the frame field of thedestination port is null). This error is used to handle the startup transients common in aconfiguration of coroutines.I fp%\qi(YrX T6, S<^ Q0sr O tr Lt utxIPrtr%xGTxFurO Bt ututx?dr@x=trOx<D 8tutu tutx5xr#tr(x3*vr trx2)Kx0 -3t utx)r"ururtrx(= ururx& #Gt utxr ur*xQ t utxrVx 8 t utxor Fx [x  =\2 Alto/Mesa Traps82ParityError: SIGNAL [address: POINTER];A parity error has occured in the word pointed to by address.PhantomParityError: SIGNAL;The parity error process was started, but a sweep through memory found no errors.ResumeError: ERROR;A catchphrase has attempted to RESUME either an ERROR or a SIGNAL that has been raisedby the ERROR construct.StackError: SIGNAL;The stack has either overflowed or underflowed. Usually this means that either some codehas been smashed or some external link is incorrect.Fine point: external links may be incorrect because the user forgot to rebind after a recompilation, orprocedure variables were incorrectly LOOPHOLEd.Not all of the following signals are generated by Alto/Mesa.ZeroDivisor: SIGNAL;An attempt was made to divide by zero.DivideCheck: SIGNAL;The result of a dividing a 32-bit quantity by a 16-bit quantity did not fit in 16 bits.UnimplementedInst: SIGNAL;An attempt was made to execute an unimplemented instruction.WakeupError: SIGNAL;Too many enable or disable interrupt instructions were performed.HardwareError: SIGNAL;Some undefined hardware error occured.PageFault: SIGNAL [page: CARDINAL];An attempt was make to reference a nonexistent page.WriteProtectFault: SIGNAL [page: CARDINAL];An attempt was make to write in a protected page.#BfpX  bt ut ut^r5tr [tutX2r9 Tt utQrur ururOur Lt utIPr"7G4EQwdC%vwr @~< =/t ut9r& 6t ut3CrC /tut,r< )Wt ut& rA "tutkr& t ututr4 tutut1r1 8V!83Appendix: Symbol Listing for Public InterfacesOctober 1980This appendix contains an alphabetical listing of all public symbols in the set of interfaces listed below.For each symbol, there is a comment showing in which interface or interfaces the symbol is declared. Anumber of symbols are declared in multiple interfaces for historical reasons, such as the character namesin IODefs and Ascii.AllocDefs AltoDefs AltoDisplay AltoFileDefs AltoHardware Ascii BitBltDefs CharIODirectoryDefs DisplayDefs FontDefs Format FrameDefs FSPDefs Inline ImageDefsInlineDefs IODefs KeyDefs MiscDefs OsStaticDefs Process ProcessDefsSegmentDefs Storage StreamDefs StreamScan String StringDefs SystemDefs TimeTimeDefs TrapDefsAbort: --ProcessDefs, Process--PROCEDURE [UNSPECIFIED];Aborted: --ProcessDefs--SIGNAL;Aborted: --Process--ERROR;AbortMesa: --ImageDefs--PROCEDURE;AccessOptions: --SegmentDefs--TYPE = [0..7];AccessOptions: --StreamDefs--TYPE = AccessOptions;AddCleanupProcedure: --ImageDefs--PROCEDURE [POINTER TO CleanupItem];AddFileRequest: --ImageDefs--PROCEDURE [POINTER TO FileRequest];Address: --AltoDefs--TYPE = [0..177777B];AddressFromPage: --SegmentDefs--PROCEDURE [p: PageNumber] RETURNS [POINTER];AddSwapStrategy: --AllocDefs--PROCEDURE [strategy: POINTER TO SwapStrategy];AddToNewZone: --FSPDefs--PROCEDURE [z: ZonePointer, base: POINTER, length: BlockSize, deallocate: Deallocator];AddToZone: --FSPDefs--PROCEDURE [z: ZonePointer, base: POINTER, length: BlockSize];AlignedBBTable: --BitBltDefs--PROCEDURE [p: POINTER TO BBTableSpace]RETURNS [BBptr];AllocateHeapNode: --SystemDefs--PROCEDURE [nwords: CARDINAL]RETURNS [p: POINTER];AllocateHeapString: --SystemDefs--PROCEDURE [nchars: CARDINAL] RETURNS [STRING];AllocatePages: --SystemDefs--PROCEDURE [npages: CARDINAL]RETURNS [base: POINTER];AllocateResidentPages: --SystemDefs--PROCEDURE [npages: CARDINAL]RETURNS [base: POINTER];AllocateResidentSegment: --SystemDefs--PROCEDURE [nwords: CARDINAL]RETURNS [base: POINTER];AllocateSegment: --SystemDefs--PROCEDURE [nwords: CARDINAL]RETURNS [base: POINTER];AllocInfo: --AllocDefs--TYPE = AllocInfo;AllocInfo: --SegmentDefs--TYPE = RECORD [effort: {hard, easy}, direction: {topdown, bottomup}, class: SegmentClass];AllReasons: --ImageDefs--CARDINAL = 177777B;AltoVersionNumber: --OsStaticDefs--TYPE = MACHINE DEPENDENT RECORD [engineeringnumber: [0..15], buildnumber: [0..15], microcodeversion: [0..255]];Append: --SegmentDefs, StreamDefs--AccessOptions = 4;Append: --Time--PROCEDURE [s: STRING, unpacked: Unpacked, zone: BOOLEAN];AppendChar: --StringDefs, String--PROCEDURE [s: STRING, c: CHARACTER];AppendCurrent: --Time--PROCEDURE [s: STRING, zone: BOOLEAN];AppendDayTime: --TimeDefs--PROCEDURE [s: STRING, unp: UnpackedTime, zone: BOOLEAN];AppendDecimal: --StringDefs, String--PROCEDURE [s: STRING, n: INTEGER];I fpaqi.(^rX [k Z g Xi Wsrsr Ss9 RhB P* O`K MHstXuvtv tFuvtE u vtCstu vtBuvt @~u vt>stu vtvtvt =vs tu vtvtvt ;u vt:nstuvtvtvt8stu vt vtvt7fs tu vtD5vt.4^stu vtD2vt1Us tu vtvtvt D/vt.Mstu vt vtD,vtvt+Estu vt vtvtvt)s tu vt vtD(=vtvt&stu vt vtD%5vtvt#stu vt vtD"-vtvt stu vt vtD%vtvt u vt  uvtvtDK u vt uvtvtvtvtD Nutstuvtvtvts tuvtvtvts tuvtvtvtxs tu vtD vtvt ps tuvtvtvt  )=\Appendix: Symbol Listing for Public Interfaces 84AppendFullDayTime: --TimeDefs--PROCEDURE [s: STRING, unp: UnpackedTime];AppendLongDecimal: --StringDefs, String--PROCEDURE [s: STRING, n: LONG INTEGER];AppendLongNumber: --StringDefs, String--PROCEDURE [s: STRING, n: LONG UNSPECIFIED, radix: CARDINAL];AppendNumber: --StringDefs, String--PROCEDURE [s: STRING, n: CARDINAL, radix: CARDINAL];AppendOctal: --StringDefs, String--PROCEDURE [s: STRING, n: UNSPECIFIED];AppendString: --StringDefs, String--PROCEDURE [to: STRING, from: STRING];AppendSubString: --StringDefs, String--PROCEDURE [to: STRING, from: SubString];Background: --AltoDisplay, AltoHardware--TYPE = {white, black};Background: --DisplayDefs--TYPE = Background;BadDirectory: --DirectoryDefs--ERROR;BadFilename: --DirectoryDefs--ERROR [name: STRING];BankIndex: --SegmentDefs--TYPE = [0..15];BankNumber: --AltoHardware--TYPE = CARDINAL [0..3];BankRegister: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [undefined: [0..7777B], normal: BankNumber, alternate: BankNumber];BankRegisters: --AltoHardware--POINTER TO ARRAY Task OF BankRegister;Banks: --SegmentDefs--TYPE = PACKED ARRAY BankIndex OF BOOLEAN;BBoperation: --BitBltDefs--TYPE = {replace, paint, invert, erase};BBptr: --BitBltDefs--TYPE = POINTER TO BBTable;BBsourcetype: --BitBltDefs--TYPE = {block, complement, andgray, gray};BBTable: --BitBltDefs--TYPE = MACHINE DEPENDENT RECORD [ptrs: {short, long},pad: [0..511],sourcealt: BOOLEAN,destalt: BOOLEAN,sourcetype: BBsourcetype,function: BBoperation,unused: CARDINAL,dbca: POINTER,dbmr: CARDINAL,dlx: CARDINAL,dty: CARDINAL,dw: CARDINAL,dh: CARDINAL,sbca: POINTER,sbmr: CARDINAL,slx: CARDINAL,sty: CARDINAL,gray0: CARDINAL,gray1: CARDINAL,gray2: CARDINAL,gray3: CARDINAL,slbca: LONG POINTER,dlbca: LONG POINTER];BBTableSpace: --BitBltDefs--TYPE = ARRAY [0..20] OF UNSPECIFIED;BcdTime: --ImageDefs--PROCEDURE RETURNS [PackedTime];BcdVersion: --ImageDefs--PROCEDURE RETURNS [Stamp];BcplLongNumber: --InlineDefs--TYPE = MACHINE DEPENDENT RECORD [highbits: CARDINAL, lowbits: CARDINAL];BcplMaxLength: --StringDefs--CARDINAL = 255;BcplOpcode: --ImageDefs--TYPE = BcplOpcode;BcplSTRING: --StringDefs--TYPE = MACHINE DEPENDENT RECORD [SELECT OVERLAID * FROMlength => [length: [0..255], body: CHARACTER],characters => [char: PACKED ARRAY [177777B..254] OF CHARACTER]ENDCASE];BcplStringHeaderSize: --StringDefs--CARDINAL = 1;fpX.r p Mbstu vtvt M`stuvtvtvtvt M_stuvt ]vtvtv tvt M\s tuvt Zvtvtvt MYs tuvtvtv t MWs tuvtvtvt MUstuvtvt MTy uvt MR uvt MQq uvt MO uvtvt MNi uvt ML uvtvt MKa uvtvtvtvt IB MHYuvtvtvtvt MFuvtvtvt vtvt MEQ u vt# MCu vtvtvt MBI u vt& M@u vtvtvtvt ?A = <8 vt :vt 90 7 6(vt 4vt 3 vt 1vt 0vt .vt -vt +vt *vt (vt 'vt %|vt #vt "svt vt kvtvt vtvt Mc u vtvtvtv t Mstu vtvt M[s tu vtvt Mu vtvtvtvt S vt vt Mu vt MK u vt M u vtvtvtvt Cvtvtvt#vt ;vtvtvtvt vt M 3u vt R 6^Appendix: Symbol Listing for Public Interfaces 85BcplStringOverflow: --StringDefs--SIGNAL;BcplToMesaLongNumber: --InlineDefs--PROCEDURE [BcplLongNumber]RETURNS [LONG UNSPECIFIED];BcplToMesaString: --StringDefs--PROCEDURE [t: POINTER TO BcplSTRING, s: STRING];BEL: --Ascii, IODefs--CHARACTER = 7C;BITAND: --InlineDefs, Inline--BitOp;BITBLT: --BitBltDefs--PROCEDURE [ptr: BBptr];BitmapDS: --SegmentDefs--DataSegmentType = 5;BitmapState: --FontDefs--TYPE = RECORD [origin: POINTER, wordsPerLine: [0..77777B], x: [0..77777B], y: [0..77777B]];BITNOT: --InlineDefs, Inline--PROCEDURE [u: UNSPECIFIED] RETURNS [UNSPECIFIED];BitOp: --InlineDefs, Inline--TYPE = PROCEDURE [UNSPECIFIED, UNSPECIFIED]RETURNS [UNSPECIFIED];BITOR: --InlineDefs, Inline--BitOp;BITSHIFT: --InlineDefs, Inline--PROCEDURE [value: UNSPECIFIED, count: INTEGER]RETURNS [UNSPECIFIED];BITXOR: --InlineDefs, Inline--BitOp;BlinkCursor: --DisplayDefs--PROCEDURE RETURNS [BOOLEAN];BlockSize: --FSPDefs--TYPE = CARDINAL [0..77777B];BoundsFault: --TrapDefs--SIGNAL;BS: --Ascii, CharIO, IODefs--CHARACTER = 10C;BW: --KeyDefs--KeyName = Spare1;BYTE: --AltoDefs--TYPE = [0..255];ByteBlt: --MiscDefs--PROCEDURE [to: POINTER, from: POINTER, toByte: CARDINAL, fromByte: CARDINAL,nBytes: CARDINAL];BytePair: --InlineDefs, Inline--TYPE = MACHINE DEPENDENT RECORD [high: [0..255], low: [0..255]];BytesPerPage: --AltoDefs--CARDINAL = 512;BytesPerWord: --AltoDefs--CARDINAL = 2;CallDebugger: --MiscDefs--PROCEDURE [STRING];CantSwap: --AllocDefs--SwappingProcedure;CFA: --AltoFileDefs--TYPE = RECORD [fp: FP, fa: FA];CFP: --AltoFileDefs--TYPE = MACHINE DEPENDENT RECORD [serial: SN, version: CARDINAL, blank: UNSPECIFIED, leaderDA: vDA];CFP: --OsStaticDefs--TYPE = CFP;ChangeDataToFileSegment: --SegmentDefs--PROCEDURE [dataseg: DataSegmentHandle, fileseg: FileSegmentHandle];ChangeKey: --KeyDefs--PROCEDURE [key: KeyName, action: KeyItem]RETURNS [oldAction: KeyItem];Char: --Format--PROCEDURE [c: CHARACTER, proc: StringProc];CharHeight: --FontDefs--PROCEDURE [font: FontHandle, char: CHARACTER]RETURNS [CARDINAL];CharLength: --AltoHardware--CARDINAL = 8;charlength: --AltoDefs, StringDefs, String--CARDINAL = 8;CharsPerPage: --AltoDefs, StringDefs, String--CARDINAL = 512;CharsPerWord: --AltoDefs, StringDefs, String--CARDINAL = 2;CharWidth: --FontDefs--PROCEDURE [font: FontHandle, char: CHARACTER]RETURNS [CARDINAL];CleanupDiskStream: --StreamDefs--PROCEDURE [stream: StreamHandle];CleanupItem: --ImageDefs--TYPE = RECORD [link: POINTER TO CleanupItem, mask: CARDINAL, proc: CleanupProcedure];CleanupMask: --ImageDefs--ARRAY CleanupReason OF CARDINAL;CleanupProcedure: --ImageDefs--TYPE = PROCEDURE [why: CleanupReason];CleanupReason: --ImageDefs--TYPE = CleanupReason;CloseDiskStream: --StreamDefs--PROCEDURE [stream: StreamHandle];CloseFile: --SegmentDefs--PROCEDURE [file: FileHandle];CloseKeyStream: --StreamDefs--PROCEDURE [stream: StreamHandle];CommandLineCFA: --MiscDefs--PROCEDURE RETURNS [POINTER TO CFA];BfpX.rI pbtu vt`stu vtD_vtvtv t]stu vtvtvtvt\uvtZutYstu vt W utU u vtvtDTyvt=Rstuvtv tvtv tQquvtvtv tv tDOvtv tNistutLstuvtv tvtDKavtv tIutHYs tuvtvtvtF u vtvt EQ u vtCuvtBIu t@u vt ?Astu vtD=vtvt vt vtD<8vt: uvtvtvtvtD907 u vt6( u vt4s tu vtvt3 u t1uvtvt0uvtvtvtvtD.vtv t-uvt+stuvtD*8(stu vtD'vt%|stu vtvt#s tu vtvtD"svtvt uvtk uvt uvtc uvtstu vtvtD[vtvtstu vtS u vtvtDvtvtvtK u vtvtvtu vtvtCu vtstu vt ;stuvt s tu vt 3s tu vtvtvtvt 7'^Appendix: Symbol Listing for Public Interfaces 86CompareStrings: --StringDefs, String--PROCEDURE [s1: STRING, s2: STRING, ignoreCase: BOOLEAN] RETURNS [INTEGER];ConditionVector: --ProcessDefs--TYPE = ARRAY InterruptLevel OF POINTER TOCONDITION;ControlA: --Ascii, IODefs--CHARACTER = 1C;ControlB: --Ascii, IODefs--CHARACTER = 2C;ControlC: --Ascii, IODefs--CHARACTER = 3C;ControlD: --Ascii, IODefs--CHARACTER = 4C;ControlDELtyped: --StreamDefs--PROCEDURE RETURNS [BOOLEAN];ControlE: --Ascii, IODefs--CHARACTER = 5C;ControlF: --Ascii, IODefs--CHARACTER = 6C;ControlFault: --TrapDefs--SIGNAL [source: FrameHandle] RETURNS [ControlLink];ControlG: --Ascii, IODefs--CHARACTER = 7C;ControlH: --Ascii, IODefs--CHARACTER = 10C;ControlI: --Ascii, IODefs--CHARACTER = 11C;ControlJ: --Ascii, IODefs--CHARACTER = 12C;ControlK: --Ascii, IODefs--CHARACTER = 13C;ControlL: --Ascii, IODefs--CHARACTER = 14C;ControlM: --Ascii, IODefs--CHARACTER = 15C;ControlN: --Ascii, IODefs--CHARACTER = 16C;ControlO: --Ascii, IODefs--CHARACTER = 17C;ControlP: --Ascii, IODefs--CHARACTER = 20C;ControlQ: --Ascii, IODefs--CHARACTER = 21C;ControlR: --Ascii, IODefs--CHARACTER = 22C;ControlS: --Ascii, IODefs--CHARACTER = 23C;ControlStoreType: --SegmentDefs--TYPE = {Ram0, RamandRom, Ram3k, unknown};ControlT: --Ascii, IODefs--CHARACTER = 24C;ControlU: --Ascii, IODefs--CHARACTER = 25C;ControlV: --Ascii, IODefs--CHARACTER = 26C;ControlW: --Ascii, IODefs--CHARACTER = 27C;ControlX: --Ascii, IODefs--CHARACTER = 30C;ControlY: --Ascii, IODefs--CHARACTER = 31C;ControlZ: --Ascii, CharIO, IODefs--CHARACTER = 32C;Coordinate: --AltoDisplay, AltoHardware--TYPE = MACHINE DEPENDENT RECORD [x: INTEGER, y: INTEGER];COPY: --InlineDefs, Inline--PROCEDURE [from: POINTER, nwords: CARDINAL, to: POINTER];CopyDataToFileSegment: --SegmentDefs--PROCEDURE [dataseg: DataSegmentHandle, fileseg: FileSegmentHandle];CopyFileToDataSegment: --SegmentDefs--PROCEDURE [fileseg: FileSegmentHandle, dataseg: DataSegmentHandle];CopyString: --Storage--PROCEDURE [s: STRING, longer: CARDINAL]RETURNS [newS: STRING];CopyString: --SystemDefs--PROCEDURE [s: STRING, longer: CARDINAL]RETURNS [STRING];CR: --Ascii, CharIO, IODefs--CHARACTER = 15C;CreateByteStream: --StreamDefs--PROCEDURE [file: FileHandle, access: AccessOptions] RETURNS [DiskHandle];CreateDisplayData: --DisplayDefs--PROCEDURE;CreateFont: --FontDefs--PROCEDURE [FileSegmentHandle] RETURNS [FontHandle];CreateKeyStream: --StreamDefs--PROCEDURE RETURNS [KeyboardHandle];CreateWordStream: --StreamDefs--PROCEDURE [file: FileHandle, access: AccessOptions] RETURNS [DiskHandle];Current: --Time--PROCEDURE RETURNS [time: LONG CARDINAL];CurrentDayTime: --TimeDefs--PROCEDURE RETURNS [time: PackedTime];currentParameters: --TimeDefs--POINTER TO LocalTimeParameters;CurrentTime: --MiscDefs--PROCEDURE RETURNS [LONG CARDINAL];currentTime: --TimeDefs--POINTER TO BcplLongNumber;Cursor: --AltoDisplay, AltoHardware--CursorHandle;fpX.r p Mbs tuvt `vtvt vtvtvt M_uvtvtvtvtv ]vt M\ uvt MZ uvt MY uvt MW uvt MUstu vtvtvt MTy uvt MR uvt MQq u vtvt MO uvt MNi uvt ML uvt MKa uvt MI uvt MHY uvt MF uvt MEQ uvt MC uvt MBI uvt M@ uvt M?A uvt M= uvt M<8uvt% M: uvt M90 uvt M7 uvt M6( uvt M4 uvt M3 uvt M1 uvt M0 uvtvtvtvt .vtvt M-stuvt +vt vtvt M*stuvt (8 M'stuvt %|8 M#s tu vtvt vt "svtvt M s tu vtvt vt kvtvt Muvt Mcstu vt )vt M[stuvt Ms tu vtvt MSstu vtvt Mstu vt K)vt Mstuvtvtvtvt MCs tu vtvt Mu vtvt M ;s tu vtvtvtvt M u vtvt M 3ut  f 7^Appendix: Symbol Listing for Public Interfaces 87CursorBits: --AltoDisplay, AltoHardware--TYPE = ARRAY [0..15] OF WORD;CursorHandle: --AltoDisplay, AltoHardware--TYPE = POINTER TO CursorBits;CursorTrack: --StreamDefs--PROCEDURE [b: BOOLEAN];CursorXY: --AltoDisplay, AltoHardware--POINTER TO Coordinate;CV: --ProcessDefs--POINTER TO ConditionVector;DA: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [sector: [0..15],track: [0..511],head: [0..1],disk: [0..1],restore: [0..1]];DataSegmentAddress: --SegmentDefs--PROCEDURE [seg: DataSegmentHandle]RETURNS [POINTER];DataSegmentHandle: --SegmentDefs--TYPE = POINTER TO DataSegmentObjectDataSegmentObject: --SegmentDefs--TYPE = data segment ObjectDataSegmentType: --SegmentDefs--TYPE = CARDINAL [0..255];Date: --Format--PROCEDURE [pt: Packed, format: DateFormat, proc: StringProc];DateFormat: --Format--TYPE = {dateOnly, noSeconds, dateTime, full};DAYTIME: --MiscDefs--PROCEDURE RETURNS [TIME];DC: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [seal: [0..255],header: DSC,label: DSC,data: DSC,seek: [0..1],exchange: [0..1]];DCB: --AltoDisplay, AltoHardware--TYPE = MACHINE DEPENDENT RECORD [next: DCBHandle,resolution: Resolution,background: Background,indenting: [0..63],width: [0..255],bitmap: POINTER,height: CARDINAL];DCBchainHead: --AltoDisplay, AltoHardware--POINTER TO DCBHandle;DCBHandle: --AltoDisplay, AltoHardware--TYPE = POINTER TO DCB;DCBnil: --AltoDisplay--DCBHandle;DE: --DirectoryDefs--TYPE = MACHINE DEPENDENT RECORD [dv: DV, name: BcplSTRING];Deallocator: --FSPDefs--TYPE = PROCEDURE [POINTER];Decimal: --Format--PROCEDURE [n: INTEGER, proc: StringProc];DecimalFormat: --Format--NumberFormat;DefaultAccess: --SegmentDefs, StreamDefs--AccessOptions = 0;DefaultANYBase: --SegmentDefs--PageNumber = 77774B;DefaultBase0: --SegmentDefs--PageNumber = 77773B;DefaultBase1: --SegmentDefs--PageNumber = 77772B;DefaultBase2: --SegmentDefs--PageNumber = 77771B;DefaultBase3: --SegmentDefs--PageNumber = 77770B;DefaultBase: --SegmentDefs--PageNumber = 77777B;DefaultDataSegmentInfo: --AllocDefs--AllocInfo;DefaultFileSegmentInfo: --AllocDefs--AllocInfo;DefaultMDSBase: --SegmentDefs--PageNumber = 77776B;DefaultPages: --SegmentDefs--PageCount = 0;DefaultPriority: --ProcessDefs--Priority = 1;DefaultSNBits: --AltoFileDefs--SNBits;DefaultTime: --TimeDefs--PackedTime;DefaultTimeout: --ProcessDefs--Ticks = 100;DefaultVersion: --SegmentDefs--VersionOptions = 0;DefaultXMBase: --SegmentDefs--PageNumber = 77775B;DEfile: --AltoFileDefs--INTEGER = 1;BfpX.rI pbt uvtvtvtvt` uvtvtvt _s tu vtvt] uvtvt \uvtvtZuvtvtvtvtDYDWDU DTy DRQqstuvtDOvtvtNiuvtvtvtLuvtKauvtvt Istu vt4HY u vt)Fstu vtvtEQuvtvtvtvtDCDBI D@ D?A D= D<8:uvtvtvtvtD90D7D6(D4D3 D1vtD0vt. uvtvt - uvtvtvt+ut *uvtvtvtvt( u vtvtvt'stu vtvt%|u t #ut"sut utk ut utc ut ut[u t u t Sut ut Kut utC u t ut  ;ut ut 3uvt 7^Appendix: Symbol Listing for Public Interfaces 88DEfree: --AltoFileDefs--INTEGER = 0;DEL: --Ascii, CharIO, IODefs--CHARACTER = 177C;DElast: --AltoFileDefs--INTEGER = 63;DeleteDataSegment: --SegmentDefs--PROCEDURE [seg: DataSegmentHandle];DeletedFrame: --FrameDefs--PROCEDURE [gfi: GFTIndex] RETURNS [BOOLEAN];DeleteDisplayData: --DisplayDefs--PROCEDURE;DeleteFileSegment: --SegmentDefs--PROCEDURE [seg: FileSegmentHandle];DeleteSubString: --StringDefs, String--PROCEDURE [s: SubString];DEptr: --DirectoryDefs--TYPE = POINTER TO DE;Descriptor: --StreamScan--TYPE = RECORD [da: vDA,pageNumber: CARDINAL,numChars: CARDINAL,bd: PRIVATE BDHandle,nextPage: PRIVATE CARDINAL,thisCB: PRIVATE CBptr,nextCB: PRIVATE CBptr,ks: PRIVATE DiskHandle,hintLastFA: PRIVATE FA,cbz: PRIVATE CBZptr,nCB: PRIVATE CARDINAL];DestroyDisplay: --DisplayDefs--PROCEDURE;DestroyFakeModule: --MiscDefs--PROCEDURE [f: GlobalFrameHandle]RETURNS [seg: FileSegmentHandle, offset: CARDINAL];DestroyFile: --SegmentDefs--PROCEDURE [file: FileHandle];DestroyKeyHandler: --StreamDefs--PROCEDURE;DestroyZone: --FSPDefs--PROCEDURE [z: ZonePointer];Detach: --ProcessDefs, Process--PROCEDURE [PROCESS];DFS: --AltoHardware--TYPE = {CommandComplete, HardwareError, CheckError, IllegalSector};DH: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [packID: CARDINAL, diskAddress: DA];DirDA: --AltoFileDefs--vDA;DirectoryLookup: --DirectoryDefs--PROCEDURE [fp: POINTER TO FP, name: STRING, create: BOOLEAN] RETURNS [old: BOOLEAN];DirectoryLookupFP: --DirectoryDefs--PROCEDURE [fp: POINTER TO FP, name: STRING]RETURNS [old: BOOLEAN];DirectoryPurge: --DirectoryDefs--PROCEDURE [fp: POINTER TO FP, name: STRING]RETURNS [found: BOOLEAN];DirectoryPurgeFP: --DirectoryDefs--PROCEDURE [fp: POINTER TO FP]RETURNS [found: BOOLEAN];DirFP: --AltoFileDefs--FP;DirSN: --AltoFileDefs--CARDINAL = 100;DirSNBits: --AltoFileDefs--SNBits;DisableAborts: --ProcessDefs--PROCEDURE [POINTER TO CONDITION];DisableAborts: --Process--PROCEDURE [LONG POINTER TO CONDITION];DisableInterrupts: --ProcessDefs--PROCEDURE;DisableTimeout: --ProcessDefs, Process--PROCEDURE [POINTER TO CONDITION];DISK: --AltoFileDefs--TYPE = MACHINE DEPENDENT RECORD [disks: CARDINAL, tracks: CARDINAL, heads: CARDINAL, sectors: CARDINAL];DiskHandle: --StreamDefs--TYPE = POINTER TO Disk StreamObject;DiskShape: --AltoFileDefs--FilePropertyType = 1;DiskStatus: --AltoHardware--POINTER TO DS;DisplayControl: --DisplayDefs--PROGRAM;DisplayHandle: --StreamDefs--TYPE = POINTER TO Display StreamObject;DisplayOff: --DisplayDefs--PROCEDURE [color: Background];DisplayOn: --DisplayDefs--PROCEDURE;DivideCheck: --TrapDefs--SIGNAL;DIVMOD: --InlineDefs, Inline--PROCEDURE [num: CARDINAL, den: CARDINAL]fpX.r p Mbtuvt M`uvt M_uvt M]stuvt M\s tu vtvtvt MZstuvt MYstuvt MWstuvt MUuvtvtvt MTy u vtvt R Qq vt O vt Nivt L vtvt Kavt Ivt HYvt F vt EQvt Cvtvt MBIs tuvt M@stu vt ?Avt"vt M=s tuvt M<8stu vt M:s tu vt M90stuvtvt M7uvt 6(; M4uvtvtvtvt 3 vt M1ut M0stuvt .vtvt vt vtvtvt M-stuvtvtvt vt +vtvt M*s tuvtvtvt vt (vtvt M'stuvtvtvt %|vtvt M#ut M"suvt M ut Mks tuvtvtvtvt Ms tu vtvtvtvtvt Mcstuvt Ms tuvtvtvtvt M[uvtvtvtvt vt vtvt vt MS u vtvtvt M ut MK uvtvt Muvt MCu vtvtvt Ms tuvt M ;stuvt M u vt M 3stuvtvtvt 6^Appendix: Symbol Listing for Public Interfaces 89RETURNS [quotient: CARDINAL, remainder: CARDINAL];DIW: --AltoDisplay, AltoHardware, ProcessDefs--POINTER TO WORD;DL: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [next: DA,prev: DA,blank: UNSPECIFIED,bytes: CARDINAL,page: CARDINAL,fileID: FID];DoNothingDeallocate: --FSPDefs--Deallocator;DS: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [sector: [0..15],done: [0..15],seekFailed: [0..1],seekInProgress: [0..1],notReady: [0..1],dataLate: [0..1],noTransfer: [0..1],checksumError: [0..1],finalStatus: DFS];DSC: --AltoHardware--TYPE = {DiskRead, DiskCheck, DiskWrite, DiskWriteAlso};DV: --AltoFileDefs--TYPE = MACHINE DEPENDENT RECORD [type: [0..63], length: [0..1777B], fp: CFP];EasyDown: --SegmentDefs--AllocInfo;EasyUp: --SegmentDefs--AllocInfo;EmptyString: --Storage--PROCEDURE [s: STRING] RETURNS [BOOLEAN];EnableInterrupts: --ProcessDefs--PROCEDURE;EnterGlobalFrame: --FrameDefs--PROCEDURE [frame: GlobalFrameHandle, nslots: CARDINAL] RETURNS [gfi: GFTIndex];Enumerate: --DirectoryDefs--PROCEDURE [dir: DiskHandle, proc: PROCEDURE [POINTER TO FP, STRING] RETURNS [BOOLEAN]];EnumerateDataSegments: --SegmentDefs--PROCEDURE [proc: PROCEDURE [DataSegmentHandle] RETURNS [BOOLEAN]]RETURNS [DataSegmentHandle];EnumerateDirectory: --DirectoryDefs--PROCEDURE [proc: PROCEDURE [POINTER TO FP, STRING] RETURNS [BOOLEAN]];EnumerateEntries: --DirectoryDefs--PROCEDURE [dir: DiskHandle, proc: PROCEDURE [CARDINAL, Handle, DEptr] RETURNS [BOOLEAN],inspectFree: POINTER TO READONLY BOOLEAN, lengthFilter: CARDINAL]RETURNS [index: CARDINAL];EnumerateFiles: --SegmentDefs--PROCEDURE [proc: PROCEDURE [FileHandle] RETURNS [BOOLEAN]] RETURNS [file: FileHandle];EnumerateFileSegments: --SegmentDefs--PROCEDURE [proc: PROCEDURE [FileSegmentHandle] RETURNS [BOOLEAN]]RETURNS [FileSegmentHandle];EnumerateGlobalFrames: --FrameDefs--PROCEDURE [proc: PROCEDURE [GlobalFrameHandle] RETURNS [BOOLEAN]]RETURNS [GlobalFrameHandle];eofDA: --AltoFileDefs--vDA;EPLoc: --AltoHardware--POINTER TO EthernetDeviceBlock;EqualIndex: --StreamDefs--PROCEDURE [i1: StreamIndex, i2: StreamIndex]RETURNS [BOOLEAN];EqualString: --StringDefs, String--PROCEDURE [s1: STRING, s2: STRING]RETURNS [BOOLEAN];EqualStrings: --StringDefs, String--PROCEDURE [s1: STRING, s2: STRING]RETURNS [BOOLEAN];EqualSubString: --StringDefs, String--PROCEDURE [s1: SubString, s2: SubString]RETURNS [BOOLEAN];EqualSubStrings: --StringDefs, String--PROCEDURE [s1: SubString, s2: SubString]BfpX.rI pDbvt vt vt`u*vtvtvt_uvtvtvtvtD]D\DZv tDYvtDWvtDU Tyu t RuvtvtvtvtDQqDO DNiDLDKaDIDHYDFDEQCuvt3BIuvtvtvtvtD@,?A ut =ut <8s tu vtvtvtvt:stuvt90stu vtD7"vtvt6(stuvtD4vtvtvtvtvtvt3 stuvtD1vtvtvtD0vt.stuvtD-vtvtvtvtvtvt+stuvtD*vtvtvtvtD( vtvtvtvtvtD'vtvt%|s tuvtD#vt vtvtvt"sstuvtD vtvtvtDkvtstu vtDcvtvtvtDvt[utuvtvtSs tu vt#DvtvtKs tuvtvtvtDvtvtCs tuvtvtvtDvtvt ;s tuvtD vtvt 3stuvt 5]^Appendix: Symbol Listing for Public Interfaces 90RETURNS [BOOLEAN];EquivalentString: --StringDefs, String--PROCEDURE [s1: STRING, s2: STRING]RETURNS [BOOLEAN];EquivalentStrings: --StringDefs, String--PROCEDURE [s1: STRING, s2: STRING]RETURNS [BOOLEAN];EquivalentSubString: --StringDefs, String--PROCEDURE [s1: SubString, s2: SubString] RETURNS [BOOLEAN];EquivalentSubStrings: --StringDefs, String--PROCEDURE [s1: SubString, s2: SubString] RETURNS [BOOLEAN];ESC: --Ascii, CharIO, IODefs--CHARACTER = 33C;EthernetDeviceBlock: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [postData: EthernetPost,interruptBit: WORD,wordsLeft: CARDINAL,retransmissionMask: WORD,inputBuffer: WordBlockDescriptor,outputBuffer: WordBlockDescriptor,hostNumber: WORD];EthernetHardwareStatus: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [unused: [0..2],inputDataLate: [0..1],collision: [0..1],badInputCRC: [0..1],inputCommandIssued: [0..1],outputCommandIssued: [0..1],incompleteTransmission: [0..1]];EthernetMicrocodeStatus: --AltoHardware--TYPE = RECORD [[0..255]];EthernetPost: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [microcodeStatus: EthernetMicrocodeStatus,hardwareStatus: EthernetHardwareStatus];Even: --SystemDefs--PROCEDURE [u: UNSPECIFIED] RETURNS [UNSPECIFIED];Expand: --Storage--PROCEDURE [pages: CARDINAL];ExpandString: --Storage, SystemDefs--PROCEDURE [s: POINTER TO STRING, longer: CARDINAL];FA: --AltoFileDefs--TYPE = MACHINE DEPENDENT RECORD [da: vDA, page: CARDINAL, byte: CARDINAL];FF: --Ascii, CharIO, IODefs--CHARACTER = 14C;FH: --AltoFileDefs--TYPE = RECORD [da: vDA, page: PageNumber];FI: --AltoFileDefs--TYPE = RECORD [page: PageNumber, byte: CARDINAL];FID: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [version: CARDINAL, serial: LONG UNSPECIFIED];FileAccessError: --SegmentDefs--SIGNAL [file: FileHandle];FileError: --SegmentDefs--SIGNAL [file: FileHandle];FileHandle: --SegmentDefs--TYPE = POINTER TO FileObject;FileHint: --SegmentDefs--TYPE = FH;FileIndex: --SegmentDefs--TYPE = FI;FileLength: --StreamDefs--PROCEDURE [stream: StreamHandle]RETURNS [StreamIndex];FileLockCount: --SegmentDefs--TYPE = [0..255];FilenameChars: --AltoFileDefs--INTEGER = 39;FileNameError: --SegmentDefs, StreamDefs--SIGNAL [name: STRING];FilenameWords: --AltoFileDefs--INTEGER = 20;FileObject: --SegmentDefs--TYPE = file Object;FilePropertyType: --AltoFileDefs--TYPE = BYTE;FileRequest: --ImageDefs--TYPE = RECORD [link: POINTER TO FileRequest,file: FileHandle,access: AccessOptions,name: STRING];fpX.r p bvtvt M`stuvtvtvt _vtvt M]stuvtvtvt \vtvt MZstuvt Yvtvt MWstuvt Uvtvt MTyuvt MRuvtvtvtvt Qq O vt Ni vt Lvt Ka! I" HY vt MFuvtvtvtvt EQ C BI @ ?A = <8 M:uvtvt M90 uvtvtvtvt 7) 6(( M4stu vtv tvtv t M3 stu vtvt M1s tuvt 0vtvtvt vt M.uvtvtvtvt -vtvt M+uvt M*uvtvt M(uvtvtvt M'uvtvtvtvt %|vt vtv t M#uvt M"s uvt M uvtvtvt Mk uvt M uvt Mcs tu vt vt M[uvt Muvt MSuvtvt Muvt MK uvt Muvt MC u vtvt vtvt ;  3vt 3`^Appendix: Symbol Listing for Public Interfaces 91FileSegmentAddress: --SegmentDefs--PROCEDURE [seg: FileSegmentHandle]RETURNS [POINTER];FileSegmentClass: --SegmentDefs--TYPE = {code, other};FileSegmentHandle: --SegmentDefs--TYPE = POINTER TO FileSegmentObject FileSegmentObject: --SegmentDefs--TYPE = file segment ObjectfillinDA: --AltoFileDefs--vDA;FindFile: --SegmentDefs--PROCEDURE [fp: POINTER TO FP] RETURNS [FileHandle];Finish: --StreamScan--PROCEDURE [ssd: Handle];FIP: --AltoFileDefs--TYPE = MACHINE DEPENDENT RECORD [type: BYTE, length: BYTE];FL1: --KeyDefs--KeyName = DEL;FL2: --KeyDefs--KeyName = LF;FontHandle: --FontDefs--TYPE = POINTER TO FontObject;FontObject: --FontDefs--TYPE = RECORD [paintChar: PROCEDURE [FontHandle, CHARACTER, POINTER TO BitmapState],clearChar: PROCEDURE [FontHandle, CHARACTER, POINTER TO BitmapState],charWidth: PROCEDURE [FontHandle, CHARACTER] RETURNS [CARDINAL],charHeight: PROCEDURE [FontHandle, CHARACTER] RETURNS [CARDINAL],close: PROCEDURE [FontHandle],destroy: PROCEDURE [FontHandle],lock: PROCEDURE [FontHandle] RETURNS [POINTER],unlock: PROCEDURE [FontHandle]];FP: --AltoFileDefs--TYPE = RECORD [serial: SN, leaderDA: vDA];FR1: --KeyDefs--KeyName = Spare3;FR2: --KeyDefs--KeyName = BackSlash;FR3: --KeyDefs--KeyName = Arrow;FR4: --KeyDefs--KeyName = Spare2;FrameDS: --SegmentDefs--DataSegmentType = 1;Free: --Storage--PROCEDURE [p: POINTER];FreeHeapNode: --SystemDefs--PROCEDURE [p: POINTER];FreeHeapString: --SystemDefs--PROCEDURE [s: STRING];FreeNode: --FSPDefs--PROCEDURE [z: ZonePointer, p: POINTER];FreeNodeNil: --Storage--PROCEDURE [p: POINTER] RETURNS [nil: POINTER];FreeNodePointer: --FSPDefs--TYPE = POINTER TO free NodeHeader;FreePages: --Storage, SystemDefs--PROCEDURE [base: POINTER];FreePagesNil: --Storage--PROCEDURE [base: POINTER] RETURNS [nil: POINTER];FreeSegment: --SystemDefs--PROCEDURE [base: POINTER];FreeString: --Storage--PROCEDURE [s: STRING];FreeStringNil: --Storage--PROCEDURE [s: STRING] RETURNS [nil: STRING];FreeWords: --Storage--PROCEDURE [base: POINTER];Frob: --SegmentDefs--TYPE = free Object;FrobHandle: --SegmentDefs--TYPE = POINTER TO Frob;FrobLink: --SegmentDefs--TYPE = ORDERED POINTER [0..255] TO Frob;FrobNull: --SegmentDefs--FrobLink;FrobSize: --SegmentDefs--TYPE = [0..255];GetBuffer: --StreamScan--PROCEDURE [ssd: Handle] RETURNS [POINTER];GetCaller: --FrameDefs--PROCEDURE RETURNS [PROGRAM];GetChar: --CharIO--PROCEDURE [in: Handle] RETURNS [CHARACTER];GetCurrent: --ProcessDefs, Process--PROCEDURE RETURNS [PROCESS];GetCurrentKey: --StreamDefs--PROCEDURE RETURNS [KeyboardHandle];GetDecimal: --CharIO--PROCEDURE [in: Handle] RETURNS [INTEGER];GetDefaultDisplayStream: --StreamDefs--PROCEDURE RETURNS [DisplayHandle];GetDefaultKey: --StreamDefs--PROCEDURE RETURNS [KeyboardHandle];GetDiskStreamList: --StreamDefs--PROCEDURE RETURNS [DiskHandle];GetEndOfFile: --SegmentDefs--PROCEDURE [file: FileHandle]RETURNS [page: PageNumber, byte: CARDINAL];GetFA: --StreamDefs--PROCEDURE [stream: StreamHandle, fa: POINTER TO FA];GetFileAccess: --SegmentDefs--PROCEDURE [file: FileHandle]RETURNS [access: AccessOptions];GetFileFP: --SegmentDefs--PROCEDURE [file: FileHandle, fp: POINTER TO FP];BfpX.qI pbsrturD`urur_tur]tururur\turZ trYsrturururur Wsrt urUtururururTyt r Rt r Qq t ururur O t ururDNi ur ururur DL ur ururur DKa ur urururDI ur urururDHYur DFur DEQur ururDCurBIturur@srt r?At r=t r<8t r:tr90srt urur7s rt urur6(s rt urur4srt urur3 s rt urururur1t ururur0srturur.s rt urururur-s rt urur+s rt urur*s rt urururur(srt urur'tur%| tururur# tururur ur"s tr tur ksrt ururursrt urururcsrt ur ururs rtururur[s rt ururs rt ur ururSsrt ururs rt ururKsrt urur s rturDCurursrt ururur ;s rturD ur 3srtururur h 5^6Appendix: Symbol Listing for Public Interfaces 92GetFileLength: --SegmentDefs--PROCEDURE [file: FileHandle, fa: POINTER TO FA];GetFileSegmentDA: --SegmentDefs--PROCEDURE [seg: FileSegmentHandle]RETURNS [vDA];GetFileTimes: --SegmentDefs--PROCEDURE [file: FileHandle]RETURNS [read: LONG CARDINAL, write: LONG CARDINAL, create: LONG CARDINAL];GetFont: --DisplayDefs--PROCEDURE RETURNS [FontHandle];GetID: --CharIO--PROCEDURE [Handle, STRING];GetIndex: --StreamDefs--PROCEDURE [stream: StreamHandle] RETURNS [StreamIndex];GetInputStream: --IODefs--PROCEDURE RETURNS [StreamHandle];GetLine: --CharIO--PROCEDURE [Handle, STRING];GetMemoryConfig: --SegmentDefs--PROCEDURE RETURNS [MemoryConfig];GetNetworkNumber: --MiscDefs--PROCEDURE RETURNS [CARDINAL];GetNumber: --CharIO--PROCEDURE [in: Handle, radix: CARDINAL]RETURNS [UNSPECIFIED];GetOctal: --CharIO--PROCEDURE [in: Handle] RETURNS [UNSPECIFIED];GetOutputStream: --IODefs--PROCEDURE RETURNS [StreamHandle];GetPosition: --StreamDefs--PROCEDURE [stream: StreamHandle]RETURNS [StreamPosition];GetPriority: --ProcessDefs, Process--PROCEDURE RETURNS [Priority];GetString: --CharIO--PROCEDURE [Handle, STRING, PROCEDURE [CHARACTER] RETURNS [BOOLEAN]];GetTypeScript: --DisplayDefs--PROCEDURE RETURNS [DiskHandle];GetWorkingDir: --DirectoryDefs--PROCEDURE RETURNS [dir: FileHandle];GlobalFrame: --FrameDefs--PROCEDURE [link: UNSPECIFIED]RETURNS [GlobalFrameHandle];GrEqualIndex: --StreamDefs--PROCEDURE [i1: StreamIndex, i2: StreamIndex]RETURNS [BOOLEAN];GrIndex: --StreamDefs--PROCEDURE [i1: StreamIndex, i2: StreamIndex]RETURNS [BOOLEAN];Handle: --CharIO--TYPE = StreamHandle;Handle: --StreamScan--TYPE = POINTER TO READONLY Descriptor;HardDown: --SegmentDefs--AllocInfo;HardUp: --SegmentDefs--AllocInfo;HardwareError: --TrapDefs--SIGNAL;hardwareReset: --AltoHardware--EthernetMicrocodeStatus;HeapDS: --SegmentDefs--DataSegmentType = 3;HeapZone: --Storage--PROCEDURE RETURNS [POINTER];HeapZone: --SystemDefs--PROCEDURE RETURNS [ZonePointer];HighByte: --InlineDefs, Inline--PROCEDURE [u: UNSPECIFIED]RETURNS [UNSPECIFIED];HighHalf: --InlineDefs, Inline--PROCEDURE [u: LONG UNSPECIFIED]RETURNS [UNSPECIFIED];ImageTime: --ImageDefs--PROCEDURE RETURNS [PackedTime];ImageVersion: --ImageDefs--PROCEDURE RETURNS [Stamp];ImmovableSegmentInXM: --SegmentDefs--SIGNAL [seg: SegmentHandle];IndexToPosition: --StreamDefs--PROCEDURE [index: StreamIndex]RETURNS [StreamPosition];Init: --StreamScan--PROCEDURE [stream: StreamHandle, bufTable: POINTER, nBufs: CARDINAL] RETURNS [Handle];InitDisplay: --DisplayDefs--PROCEDURE [dummySize: CARDINAL, textLines: CARDINAL, nPages: CARDINAL, f: FontHandle];InitializeCondition: --ProcessDefs, Process--PROCEDURE [condition: POINTER TO CONDITION, ticks: Ticks];InitializeMonitor: --ProcessDefs, Process--PROCEDURE [monitor: POINTER TO MONITORLOCK];inputBufferOverflow: --AltoHardware--EthernetMicrocodeStatus;inputDone: --AltoHardware--EthernetMicrocodeStatus;Insert: --DirectoryDefs--PROCEDURE [dir: DiskHandle, fp: POINTER TO FP, name: STRING] RETURNS [old: BOOLEAN];fpX.q p Mbs rtururur M`srtur _ur M]s rtur \ururururur urur MZsrturur MYsrt ur ur MWsrt urur MUs rt urur MTysrt ur ur MRsrturur MQqsrt ururur MOsrt urur Niuru r MLsrt ur uru r MKasrt urur MIs rt ur HYur MFs rturur MEQsrt ur Cururururur MBIs rturur M@s rturur M?As rt uru r =ur M<8s rt ur# :urur M90srt ur# 7urur M6(t ur M4t urururur M3 tr M1tr M0t ur M.tr M-tr M+srt ururur M*srt urur M(srturu r 'uru r M%|srtururu r #uru r M"ssrt urur M s rt urur Mktur Msrt ur cur Msrt ur [ururur Ms rtur S ur ur ur Msrtur K ururur Msrtur Cururu r Mtr M ; tr M srtur 3urur ururur 7^Appendix: Symbol Listing for Public Interfaces 93InsertFile: --SegmentDefs--PROCEDURE [fp: POINTER TO FP, access: AccessOptions]RETURNS [FileHandle];InsertFileLength: --SegmentDefs--PROCEDURE [file: FileHandle, fa: POINTER TO FA];InsufficientVM: --SegmentDefs--SIGNAL [needed: PageCount];interfaceBroken: --AltoHardware--EthernetMicrocodeStatus;InterruptLevel: --ProcessDefs--TYPE = [0..15];Invalid: --Time--ERROR;InvalidDA: --AltoHardware--DA;InvalidFP: --SegmentDefs--SIGNAL [fp: POINTER TO FP];InvalidFrame: --FrameDefs--SIGNAL [frame: UNSPECIFIED];InvalidGlobalFrame: --FrameDefs--SIGNAL [frame: UNSPECIFIED];InvalidImage: --ImageDefs--SIGNAL;InvalidImageName: --ImageDefs--SIGNAL;InvalidLongPointer: --SegmentDefs--ERROR [lp: LONG UNSPECIFIED];InvalidNode: --FSPDefs, Storage--ERROR [POINTER];InvalidNumber: --StringDefs, String--SIGNAL;InvalidProcess: --ProcessDefs--SIGNAL [process: UNSPECIFIED];InvalidProcess: --Process--ERROR [process: UNSPECIFIED];InvalidSegmentSize: --SegmentDefs--SIGNAL [pages: PageCount];InvalidTime: --TimeDefs--ERROR;InvalidVMPage: --SegmentDefs--ERROR [page: UNSPECIFIED];InvalidZone: --FSPDefs--ERROR [POINTER];IsBound: --FrameDefs--PROCEDURE [UNSPECIFIED] RETURNS [BOOLEAN];JumpToFA: --StreamDefs--PROCEDURE [stream: StreamHandle, fa: POINTER TO FA];JumpToPage: --SegmentDefs--PROCEDURE [cfa: POINTER TO CFA, page: PageNumber, buf: POINTER]RETURNS [prev: vDA, next: vDA];KBDAD: --AltoHardware--POINTER TO KeyboardBits;KCB: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [nextCB: KCBHandle,status: DS,command: DC,headerAddress: POINTER,labelAddress: POINTER,dataAddress: POINTER,normalWakeups: WORD,errorWakeups: WORD,unused: UNSPECIFIED,diskAddress: DA];KCBHandle: --AltoHardware--TYPE = POINTER TO KCB;KD: --AltoFileDefs--TYPE = MACHINE DEPENDENT RECORD [disk: DISK,lastSN: SN,changed: WORD,size: CARDINAL,versions: CARDINAL,freePages: CARDINAL,blank: ARRAY [0..5] OF UNSPECIFIED,table: ARRAY [0..0] OF WORD];KeyArray: --KeyDefs--TYPE = ARRAY [0..4] OF WORD;KeyBits: --KeyDefs--TYPE = MACHINE DEPENDENT RECORD [blank: [0..255],Keyset1: updown, Keyset2: updown, Keyset3: updown, Keyset4: updown,Keyset5: updown, Red: updown, Blue: updown, Yellow: updown,Five: updown, Four: updown, Six: updown, E: updown,Seven: updown, D: updown, U: updown, V: updown,Zero: updown, K: updown, Dash: updown, P: updown,Slash: updown, BackSlash: updown, LF: updown, BS: updown,BfpX.qI pbs rturururD`ur _srturD]urur\turZtrYtur WturU trTy turururR t uru rQqt uru rO t urNit urLtururu rKa tururIturHYtur u rFt ur u rEQturC t urBIturu r@ t urur?Asrt uru rurur=srt ururur<8s rturD:urururD90ur7turur 6(tururururD4D3 D1 D0urD. urD- urD+urD* urD(u rD'%| tururur#tururururD"s D DkurDurDc urD urD[ururu rDurururS t ururururt ururururDKDCDC;D3D ;/D 1D 39 \ 6^Appendix: Symbol Listing for Public Interfaces 94Three: updown, Two: updown, W: updown, Q: updown,S: updown, A: updown, Nine: updown, I: updown,X: updown, O: updown, L: updown, Comma: updown,Quote: updown, RightBracket: updown, Spare2: updown, Spare1: updown,One: updown, ESC: updown, TAB: updown, F: updown,Ctrl: updown, C: updown, J: updown, B: updown,Z: updown, LeftShift: updown, Period: updown, SemiColon: updown,Return: updown, Arrow: updown, DEL: updown, FL3: updown,R: updown, T: updown, G: updown, Y: updown,H: updown, Eight: updown, N: updown, M: updown,Lock: updown, Space: updown, LeftBracket: updown, Equal: updown,RightShift: updown, Spare3: updown, FL4: updown, FR5: updown];Keyboard: --KeyDefs--PROGRAM;KeyboardBits: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [Five: updown, Four: updown, Six: updown, E: updown,Seven: updown, D: updown, U: updown, V: updown,Zero: updown, K: updown, Dash: updown, P: updown,Slash: updown, BackSlash: updown, LF: updown, BS: updown,Three: updown, Two: updown, W: updown, Q: updown,S: updown, A: updown, Nine: updown, I: updown,X: updown, O: updown, L: updown, Comma: updown,Quote: updown, RightBracket: updown, Spare2: updown, Spare1: updown,One: updown, ESC: updown, TAB: updown, F: updown,Ctrl: updown, C: updown, J: updown, B: updown,Z: updown, LeftShift: updown, Period: updown, SemiColon: updown,Return: updown, Arrow: updown, DEL: updown, FL3: updown,R: updown, T: updown, G: updown, Y: updown,H: updown, Eight: updown, N: updown, M: updown,Lock: updown, Space: updown, LeftBracket: updown, Equal: updown,RightShift: updown, Spare3: updown, FL4: updown, FR5: updown];KeyboardHandle: --StreamDefs--TYPE = POINTER TO Keyboard StreamObject;KeyItem: --KeyDefs--TYPE = RECORD [Letter: BOOLEAN, ShiftCode: [0..127], NormalCode: [0..255]];KeyName: --KeyDefs--TYPE = {x0, x1, x2, x3, x4, x5, x6, x7, Keyset1, Keyset2, Keyset3, Keyset4, Keyset5,Red, Blue, Yellow, Five, Four, Six, E, Seven, D, U, V, Zero, K, Dash, P,Slash, BackSlash, LF, BS, Three, Two, W, Q, S, A, Nine, I, X, O, L, Comma,Quote, RightBracket, Spare2, Spare1, One, ESC, TAB, F, Ctrl, C, J, B, Z,LeftShift, Period, SemiColon, Return, Arrow, DEL, FL3, R, T, G, Y, H, Eight,N, M, Lock, Space, LeftBracket, Equal, RightShift, Spare3, FL4, FR5};Keys: --KeyDefs--POINTER TO KeyBits;KeyStreams: --KeyDefs--PROGRAM;LargestHole: --SegmentDefs--PROCEDURERETURNS [base: PageNumber, pages: PageCount];LargestMDSHole: --SegmentDefs--PROCEDURERETURNS [base: PageNumber, pages: PageCount];LastDiskAddress: --AltoHardware--POINTER TO DA;LD: --AltoFileDefs--TYPE = MACHINE DEPENDENT RECORD [created: TIME,written: TIME,read: TIME,name: ARRAY [0..19] OF UNSPECIFIED,props: ARRAY [0..209] OF UNSPECIFIED,spare: ARRAY [0..9] OF UNSPECIFIED,propBegin: BYTE,propLength: BYTE,consecutive: BOOLEAN,blank: [0..127],newSN: BYTE,fpX.q p br1 `. _/ ]D \1 Z. Y@ W8 U+ Ty/ R@ Qq> MO t ur MNi turururur L3 Ka/ I1 HY9 F1 EQ. C/ BID @1 ?A. =@ <88 :+ 90/ 7@ 6(> M4t ururur M3 t urur 1ur- M0t ur .L -H +J *H (L 'E M%|t urur M# t ur M"ss rtu ur& Mks rtu ur& Mcturur Mturururur [  S ururu r Kur uru r ururu r C  ; ur  3   2^HAppendix: Symbol Listing for Public Interfaces 95dirFP: CFP,eofFA: FA];LDIVMOD: --InlineDefs, Inline--PROCEDURE [numlow: WORD, numhigh: CARDINAL, den: CARDINAL]RETURNS [quotient: CARDINAL, remainder: CARDINAL];LengthHandle: --SegmentDefs--TYPE = POINTER TO LengthObject;LengthObject: --SegmentDefs--TYPE = length Object;LF: --Ascii, CharIO, IODefs--CHARACTER = 12C;LineOverflow: --IODefs--SIGNAL [s: STRING] RETURNS [ns: STRING];LinkageFault: --TrapDefs--ERROR;LoadConfig: --FrameDefs--PROCEDURE [name: STRING] RETURNS [PROGRAM];LocalTimeParameters: --TimeDefs--TYPE = MACHINE DEPENDENT RECORD [direction: WestEast,zone: [0..12],unused1: [0..3],beginDST: [0..366],unused2: [0..1],zoneminutes: [0..59],endDST: [0..366]];LockCode: --FrameDefs--PROCEDURE [link: UNSPECIFIED];LockFile: --SegmentDefs--PROCEDURE [file: FileHandle];LogBytesPerPage: --AltoDefs--CARDINAL = 9;LogBytesPerWord: --AltoDefs--CARDINAL = 1;LogCharsPerPage: --AltoDefs, StringDefs, String--CARDINAL = 9;LogCharsPerWord: --AltoDefs--CARDINAL = 1;LogPageSize: --AltoDefs--CARDINAL = 8;LongAddressFromPage: --SegmentDefs--PROCEDURE [p: PageNumber]RETURNS [LONG POINTER];LongCARDINAL: --InlineDefs, Inline--TYPE = LONG CARDINAL;LongCOPY: --InlineDefs, Inline--PROCEDURE [from: LONG POINTER, nwords: CARDINAL, to: LONG POINTER];LongDataSegmentAddress: --SegmentDefs--PROCEDURE [seg: DataSegmentHandle]RETURNS [LONG POINTER];LongDCB: --AltoDisplay--TYPE = MACHINE DEPENDENT RECORD [next: DCBHandle,resolution: Resolution,background: Background,indenting: [0..63],width: [0..255],bitmap: POINTER,tag: {short, long},height: [0..77777B],longBitmap: LONG POINTER];LongDCBSeal: --AltoDisplay--POINTER;LongDecimal: --Format--PROCEDURE [n: LONG INTEGER, proc: StringProc];LongDiv: --InlineDefs, Inline--PROCEDURE [num: LONG CARDINAL, den: CARDINAL]RETURNS [CARDINAL];LongDivMod: --InlineDefs, Inline--PROCEDURE [num: LONG CARDINAL, den: CARDINAL]RETURNS [quotient: CARDINAL, remainder: CARDINAL];LongFileSegmentAddress: --SegmentDefs--PROCEDURE [seg: FileSegmentHandle]RETURNS [LONG POINTER];LongMult: --InlineDefs, Inline--PROCEDURE [CARDINAL, CARDINAL]RETURNS [product: LONG CARDINAL];LongNumber: --Format--PROCEDURE [n: LONG UNSPECIFIED, format: NumberFormat, proc: StringProc];LongNumber: --InlineDefs, Inline--TYPE = MACHINE DEPENDENT RECORD [SELECT OVERLAID * FROMlc => [lc: LONG CARDINAL],li => [li: LONG INTEGER],BfpX.qI pDbr D` _srturD]ur ururD\ur ur urZ tururur Y turWturU t ururururTy t urRs rt ururururQqt ururururDODNi DLDKaDIDHYDFEQsrt uru rCsrturBIt ur@t ur?Atur=t ur<8 t ur:srturD90ururur7 tururur6(srturD4urur ururur3 srturD1ururur0tururururD.D-D+D*D(D'urD%|D#D"s urur turks rt ururursrtururururDcururs rtururururD[ur ur ursrturDSururursrturururDKur ururs rt urDCuru r* tururururD ;ururu r urur 3 urur J 8-^Appendix: Symbol Listing for Public Interfaces 96lu => [lu: LONG UNSPECIFIED],num => [lowbits: CARDINAL, highbits: CARDINAL]ENDCASE];LongOctal: --Format--PROCEDURE [n: LONG UNSPECIFIED, proc: StringProc];LongSegmentAddress: --SegmentDefs--PROCEDURE [seg: SegmentHandle]RETURNS [LONG POINTER];LongString: --Format--PROCEDURE [s: LONG STRING, proc: StringProc];LongSubString: --Format--TYPE = POINTER TO LongSubStringDescriptor;LongSubStringDescriptor: --Format--TYPE = RECORD [base: LONG STRING, offset: CARDINAL, length: CARDINAL];LongSubStringItem: --Format--PROCEDURE [ss: LongSubString, proc: StringProc];LongVMtoDataSegment: --SegmentDefs--PROCEDURE [a: LONG POINTER]RETURNS [DataSegmentHandle];LongVMtoFileSegment: --SegmentDefs--PROCEDURE [a: LONG POINTER]RETURNS [FileSegmentHandle];LongVMtoSegment: --SegmentDefs--PROCEDURE [a: LONG POINTER]RETURNS [SegmentHandle];Lookup: --DirectoryDefs--PROCEDURE [dir: DiskHandle, fp: POINTER TO FP, name: STRING, create: BOOLEAN]RETURNS [old: BOOLEAN];LookupFP: --DirectoryDefs--PROCEDURE [dir: DiskHandle, fp: POINTER TO FP, name: STRING] RETURNS [old: BOOLEAN];LowByte: --InlineDefs, Inline--PROCEDURE [u: UNSPECIFIED] RETURNS [UNSPECIFIED];LowerCase: --StringDefs, String--PROCEDURE [c: CHARACTER] RETURNS [CHARACTER];LowHalf: --InlineDefs, Inline--PROCEDURE [u: LONG UNSPECIFIED]RETURNS [UNSPECIFIED];MachineType: --SegmentDefs--TYPE = {unknown0, AltoI, AltoII, AltoIIXM, D0, Dorado, unknown6, unknown7};MakeCheckPoint: --ImageDefs--PROCEDURE [name: STRING]RETURNS [restart: BOOLEAN];MakeCodeResident: --FrameDefs--PROCEDURE [f: GlobalFrameHandle];MakeDataSegment: --AllocDefs, SegmentDefs--PROCEDURE [base: PageNumber, pages: PageCount, info: AllocInfo]RETURNS [seg: DataSegmentHandle];MakeImage: --ImageDefs--PROCEDURE [name: STRING, merge: BOOLEAN];MakeNewZone: --FSPDefs--PROCEDURE [base: POINTER, length: BlockSize, deallocate: Deallocator]RETURNS [z: ZonePointer];MakeNode: --FSPDefs--PROCEDURE [z: ZonePointer, n: BlockSize] RETURNS [POINTER];MakeSwappedIn: --AllocDefs, SegmentDefs--PROCEDURE [seg: FileSegmentHandle, base: PageNumber, info: AllocInfo];MakeUnMergedImage: --ImageDefs--PROCEDURE [name: STRING];MakeZone: --FSPDefs--PROCEDURE [base: POINTER, length: BlockSize]RETURNS [z: ZonePointer];MapFileSegment: --SegmentDefs--PROCEDURE [seg: FileSegmentHandle, file: FileHandle, base: PageNumber];MaxBitsPerLine: --AltoDisplay--CARDINAL = 608;Maxc2MemoryInterface: --AltoHardware--Task = Trident17;maxcharcode: --AltoDefs--CARDINAL = 255;MaxFileLocks: --SegmentDefs--CARDINAL = 255;MaxFilePage: --AltoDefs--CARDINAL = 77777B;maxinteger: --AltoDefs--INTEGER = 77777B;MaxMDSPage: --AltoDefs--CARDINAL = 255;MaxRefs: --SegmentDefs--CARDINAL = 255;MaxScanLines: --AltoDisplay--CARDINAL = 808;MaxSegLocks: --SegmentDefs--CARDINAL = 15;MaxSegs: --SegmentDefs--CARDINAL = 177777B;MaxVMPage: --AltoDefs--CARDINAL = 7777B;fpX.q pbr uru r`ur ur_ur M]srt ururu r M\srtur Zururur MYs rt ururur MWt ururur MUt urur Tyurur ur ur MRsrt ur' MQqsrtururur Our MNisrtururur Lur MKasrtururur Iur MHYsrtur Furur ur ur EQurur MCsrtur BIurur ururur M@srturu ruru r M?Asrturururur M=srtururu r <8uru r M: tur 90C M7s rt urur 6(ur ur M4srt ur M3 srtur 14 0ur M.srt ururur M-s rt ur +ur- *ur M(srt ururur M's rtur %|; M#srt urur M"ssrt urur ur Mks rtur < Mctur Mtr M[ t ur M tur MS t ur M t ur MK t ur Mtur MC tur M tur M ;tur M t ur < p7A\Appendix: Symbol Listing for Public Interfaces 97maxword: --AltoDefs--CARDINAL = 177777B;MaxWordsPerLine: --AltoDisplay--CARDINAL = 38;memConfig: --SegmentDefs--MemoryConfig;MemoryConfig: --SegmentDefs--TYPE = MACHINE DEPENDENT RECORD [reserved: [0..31],AltoType: MachineType,xmMicroCode: BOOLEAN,useXM: BOOLEAN,mdsBank: BankIndex,controlStore: ControlStoreType,banks: [0..177777B],mesaMicrocodeVersion: [0..177777B]];MemoryErrorAddressRegister: --AltoHardware--POINTER TO POINTER;MemoryErrorControl: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [spare1: [0..15],testHammingCode: [0..127],testMode: [0..1],interruptSingleBitErrors: [0..1],interruptDoubleBitErrors: [0..1],noErrorCorrection: [0..1],spare2: [0..1]];MemoryErrorControlRegister: --AltoHardware--POINTER TO POINTER;MemoryErrorStatus: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [hammingCode: [0..63],parityError: [0..1],memoryParity: [0..1],syndrome: [0..63],bankNumber: BankNumber];MemoryErrorStatusRegister: --AltoHardware--POINTER TO POINTER;MesaStringOverflow: --StringDefs--SIGNAL;MesaToBcplLongNumber: --InlineDefs--PROCEDURE [LONG UNSPECIFIED]RETURNS [BcplLongNumber];MesaToBcplString: --StringDefs--PROCEDURE [s: STRING, t: POINTER TO BcplSTRING];Milliseconds: --ProcessDefs, Process--TYPE = CARDINAL;ModifyIndex: --StreamDefs--PROCEDURE [index: StreamIndex, change: INTEGER]RETURNS [StreamIndex];ModifyPosition: --StreamDefs--PROCEDURE [pos: StreamPosition, change: INTEGER]RETURNS [StreamPosition];Mouse: --KeyDefs--POINTER TO MouseBits;MouseBits: --KeyDefs--TYPE = MACHINE DEPENDENT RECORD [blank: [0..255], keyset: [0..31], buttons: MouseButton];MouseButton: --KeyDefs--TYPE = {RedYellowBlue, RedBlue, RedYellow, Red, BlueYellow, Blue, Yellow, None};MouseXY: --AltoDisplay--POINTER TO Coordinate;MoveFileSegment: --SegmentDefs--PROCEDURE [seg: FileSegmentHandle, base: PageNumber, pages: PageCount];MsecToTicks: --ProcessDefs, Process--PROCEDURE [Milliseconds] RETURNS [Ticks];NewByteStream: --StreamDefs--PROCEDURE [name: STRING, access: AccessOptions]RETURNS [DiskHandle];NewConfig: --FrameDefs--PROCEDURE [name: STRING];NewDataSegment: --SegmentDefs--PROCEDURE [base: PageNumber, pages: PageCount]RETURNS [DataSegmentHandle];NewFile: --SegmentDefs--PROCEDURE [name: STRING, access: AccessOptions, version: VersionOptions]RETURNS [FileHandle];NewFileOnly: --SegmentDefs--VersionOptions = 1;NewFileSegment: --SegmentDefs--PROCEDURE [file: FileHandle, base: PageNumber, pages: PageCount, access: AccessOptions]RETURNS [FileSegmentHandle];BfpX.qI pbrs tr `str_ sr ] strtrtrtrD\DZDY trDWtrDUDTyDRDQq$OstrtrtrNistrtrtrtrDLDKaDIDHY!DF!DEQDCBIstrtrtr@strtrtrtrD?AD=D<8D:D907strtrtr6(s tr4urs trtrt rD3 tr1urs trtrtrtr 0 strtr.u rs trtrD-tr+u rs trtrD*tr(s trtr ' s trtrtrtrD%|8# s trD"sH strtr kurstrD<cu rstrtru rs trtrD[tr urs trtrSu rstr%DtrKurstrDtr1DCtr  sr ;u rstrD LD 3tr :=^Appendix: Symbol Listing for Public Interfaces 98NewLine: --IODefs--PROCEDURE RETURNS [BOOLEAN];NewWordStream: --StreamDefs--PROCEDURE [name: STRING, access: AccessOptions]RETURNS [DiskHandle];NextDiskCommand: --AltoHardware--POINTER TO KCBHandle;Node: --Storage--PROCEDURE [nwords: CARDINAL] RETURNS [p: POINTER];NodeHeader: --FSPDefs--TYPE = RECORD [length: BlockSize,extension:SELECT state: * FROMinuse => NULL,free => [fwdp: FreeNodePointer, backp: FreeNodePointer]ENDCASE];NodeLoop: --FSPDefs--ERROR [ZonePointer];NodeOverhead: --FSPDefs--CARDINAL = 1;NodePointer: --FSPDefs--TYPE = POINTER TO NodeHeader;NodeSize: --FSPDefs--PROCEDURE [p: POINTER] RETURNS [BlockSize];NoGlobalFrameSlots: --FrameDefs--SIGNAL [CARDINAL];NormalizeIndex: --StreamDefs--PROCEDURE [index: StreamIndex]RETURNS [StreamIndex];NoRoomForLoader: --ImageDefs--SIGNAL;NoRoomInCheckMap: --ImageDefs--SIGNAL;NoRoomInImageMap: --ImageDefs--SIGNAL;NoRoomInZone: --FSPDefs--SIGNAL [z: ZonePointer];NotEnoughSpaceForDisplay: --DisplayDefs--ERROR;NUL: --Ascii, CharIO, IODefs--CHARACTER = 0C;NullFP: --AltoFileDefs--FP;NullSN: --AltoFileDefs--SN;Number: --Format--PROCEDURE [n: UNSPECIFIED, format: NumberFormat, proc: StringProc];NumberFormat: --CharIO, Format--TYPE = RECORD [base: [2..36], zerofill: BOOLEAN, unsigned: BOOLEAN, columns: [0..255]];NumberFormat: --IODefs--TYPE = NumberFormat;Object: --SegmentDefs--TYPE = RECORD [busy: PRIVATE BOOLEAN,body:SELECT tag: ObjectType FROMfree => [seal: PRIVATE [0..31],size: PRIVATE FrobSize,fwdp: PRIVATE FrobLink,backp: PRIVATE FrobLink],segment => [VMpage: [0..7777B],info:SELECT type: SegmentType FROMdata => [type: DataSegmentType, pages: [1..256]],file => [swappedin: BOOLEAN,write: BOOLEAN,class: FileSegmentClass,inuse: BOOLEAN,lock: SegLockCount,pages: [1..256],file: FileHandle,base: PageNumber,location:SELECT loc: SegmentLocation FROMdisk => [hint: FileHint],remote => [proc: RemoteSegProc, info: UNSPECIFIED]fpX.q p Mburs trtrtr M`u rs trtr _tr M]strtr M\urs tr trtrtr MZ s trtr Y W Utr tpTyrtrpR7pQqtr MO s tr MNi s tr ML s trtrtr MKaurs trtrtr MIs trtr MHYu rs tr Ftr MEQs tr MCs tr MBIs tr M@ s tr M?Astr M=str M<8sr M:sr M90urs tr 7t r* M6( strtr 4tr tr M3 s tr M1strtr 0trtr .-trtp+r*tr(tr 'tr %|tr p# "s 2ktrtr1c tr[trStrKCU ;trt r 3&t r 7^}Appendix: Symbol Listing for Public Interfaces 99ENDCASE]ENDCASE],file => [open: BOOLEAN,length: BOOLEAN,lengthvalid: BOOLEAN,read: BOOLEAN,write: BOOLEAN,append: BOOLEAN,lengthchanged: BOOLEAN,unused: [0..63],lock: FileLockCount,swapcount: RefCount,segcount: SegCount,fp: FP],length => [unused: [0..7],byte: [0..512],page: PageNumber,file: FileHandle,da: vDA]ENDCASE];Octal: --Format--PROCEDURE [n: UNSPECIFIED, proc: StringProc];OctalFormat: --Format--NumberFormat;OldFileOnly: --SegmentDefs--VersionOptions = 2;OpenDiskStream: --StreamDefs--PROCEDURE [stream: StreamHandle];OpenFile: --SegmentDefs--PROCEDURE [file: FileHandle];OpenKeyStream: --StreamDefs--PROCEDURE [stream: StreamHandle];OsStaticRecord: --OsStaticDefs--TYPE = MACHINE DEPENDENT RECORD [EnumerateFp: PRIVATE POINTER,fpSysDir: PRIVATE POINTER TO CFP,fpSysStat: PRIVATE POINTER TO CFP,fpDiskDescriptor: PRIVATE POINTER TO CFP,fpSysLog: PRIVATE POINTER TO CFP,fpSysTs: PRIVATE POINTER TO CFP,fpUserCm: PRIVATE POINTER TO CFP,fpComCm: PRIVATE POINTER TO CFP,fpRemCm: PRIVATE POINTER TO CFP,fpExecutive: PRIVATE POINTER TO CFP,fpSysFont: PRIVATE POINTER TO CFP,fpWorkingDir: PRIVATE POINTER TO CFP,nameWorkingDir: PRIVATE POINTER TO BcplSTRING,OsBuffer: PRIVATE POINTER TO WORD,EventVector: POINTER TO WORD,UserName: POINTER TO BcplSTRING,UserPassword: POINTER TO BcplSTRING,OsFinish: PRIVATE POINTER,OsFinishCode: CARDINAL,OsVersion: CARDINAL,OsVersionCompatible: CARDINAL,OsFinishSafeAdr: PRIVATE POINTER,SerialNumber: CARDINAL,lvUserFinishProc: PRIVATE POINTER,SysErr: PRIVATE POINTER,CounterJunta: PRIVATE POINTER,CallSwat: PRIVATE POINTER,lvAbortFlag: POINTER TO CARDINAL,lvSwatContextProc: PRIVATE POINTER,OutLd: PRIVATE POINTER,BfpX.qI pLbtr)`tr_g]trg\trgZ trgYtrgWtrgUtrgTytrgRgQqgOgNigLKa gIgHYgFgEQgCBItr@urs trt r?A s r = sr<8u rs tr:urstr90u rs tr7strtrtrtrD6( trtrD4 trtrtrD3 trtrtrD1trtrtrD0 trtrtrD.trtrtrD- trtrtrD+trtrtrD*trtrtrD( trtrtrD' trtrtrD%| trtrtrD#trtrtr D"s trtrtrtrD trtrtrDk trtr D trtr Dc trtrD trD[ trDtrDStrtrD trDKtrtrDtrtrDC trtrD trtrD ; trtrtrD trtrD 3trtr .l^Appendix: Symbol Listing for Public Interfaces 100InLd: PRIVATE POINTER,BootFrom: PRIVATE POINTER,DiskIOSetup: PRIVATE POINTER,DiskIOTransfer: PRIVATE POINTER,UpdateTime: PRIVATE POINTER,lvParitySweepCount: PRIVATE POINTER,LastLdCB: PRIVATE POINTER,juntaTable: PRIVATE POINTER,AltoVersion: AltoVersionNumber,ErrorLogAddress: WORD,lvParityPhantomEnable: PRIVATE POINTER,ClockSecond: POINTER TO BcplLongNumber];OsStatics: --OsStaticDefs--POINTER TO POINTER TO OsStaticRecord;OtherStreamHandle: --StreamDefs--TYPE = POINTER TO Other StreamObject;OutNumber: --IODefs--PROCEDURE [StreamHandle, UNSPECIFIED, NumberFormat];outputDone: --AltoHardware--EthernetMicrocodeStatus;outputLoadOverflow: --AltoHardware--EthernetMicrocodeStatus;Overflow: --StringDefs, String--SIGNAL;Pack: --Time--PROCEDURE [unpacked: Unpacked, computeDST: BOOLEAN]RETURNS [time: LONG CARDINAL];PackDT: --TimeDefs--PROCEDURE [unp: UnpackedTime, computeDST: BOOLEAN]RETURNS [time: PackedTime];Packed: --Time--TYPE = LONG CARDINAL;PackedTime: --TimeDefs--TYPE = LONG CARDINAL;PageAvailable: --SegmentDefs--PROCEDURE [page: PageNumber, info: AllocInfo]RETURNS [BOOLEAN];PageCount: --AltoDefs--TYPE = [0..10000B];PageCount: --SegmentDefs--TYPE = PageCount;PageFault: --TrapDefs--SIGNAL [page: CARDINAL];PageFromAddress: --SegmentDefs--PROCEDURE [a: POINTER] RETURNS [PageNumber];PageFromLongAddress: --SegmentDefs--PROCEDURE [a: LONG POINTER]RETURNS [PageNumber];PageNumber: --AltoDefs--TYPE = [0..77777B];PageNumber: --SegmentDefs--TYPE = PageNumber;PagePointer: --SegmentDefs--PROCEDURE [a: POINTER] RETURNS [POINTER];Pages: --Storage--PROCEDURE [npages: CARDINAL] RETURNS [base: POINTER];PagesAvailable: --SegmentDefs--PROCEDURE [base: PageNumber, pages: PageCount, info: AllocInfo] RETURNS [BOOLEAN];PagesForWords: --Storage--PROCEDURE [nWords: CARDINAL] RETURNS [CARDINAL];PagesForWords: --SystemDefs--PROCEDURE [nwords: CARDINAL] RETURNS [CARDINAL];PageSize: --AltoDefs, AltoHardware--CARDINAL = 256;PagesPerMDS: --AltoDefs--CARDINAL = 256;ParityError: --TrapDefs--SIGNAL [address: POINTER];ParityErrorData: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [DCBR: POINTER,KNMAR: POINTER,DWA: POINTER,CBA: POINTER,PC: POINTER,SAD: POINTER];ParityErrorDataLoc: --AltoHardware--POINTER TO ParityErrorData;ParityLevel: --ProcessDefs--InterruptLevel = 0;ParseFileName: --DirectoryDefs--PROCEDURE [name: STRING, filename: STRING, dirAccess: AccessOptions]RETURNS [DiskHandle];PartitionName: --AltoFileDefs--FilePropertyType = 2;Pause: --ProcessDefs, Process--PROCEDURE [ticks: Ticks];PhantomParityError: --TrapDefs--SIGNAL;PointerFault: --TrapDefs--SIGNAL;fpX.q p brtrtr ` trtr _ trtr ]trtr \ trtr Ztrtr Y trtr W trtr U Tytr Rtrtr Qq trtr MO strtrtrtr MNis trtrtr MLurs trt r MKa sr MIsr MHY str MFurstr"tr EQtrtrtr MCurs tr!tr BItr M@strtrtr M?A s trtrtr M=u rstr$ <8trtr M: s tr M90 str M7 s trtr M6(urstrtrtr M4urstrtrtr 3 tr M1 s tr M0 str M.u rstrtrtrtr M-urs tr trtrtr M+u rstr *5trtr M(u rs tr trtrtr M'u rs tr trtrtr M%| str M# s tr M"s s tr tr M strtrtrtr ktr tr ctr tr [tr tr MSstrtr M sr MKu rstr tr tr Ctr Msr M ;urstr M s tr M 3 s tr : 8)^Appendix: Symbol Listing for Public Interfaces 101PortFault: --TrapDefs--ERROR;PositionToIndex: --StreamDefs--PROCEDURE [pos: StreamPosition]RETURNS [index: StreamIndex];Priority: --ProcessDefs, Process--TYPE = [0..7];Prune: --Storage--PROCEDURE RETURNS [BOOLEAN];PruneHeap: --SystemDefs--PROCEDURE RETURNS [BOOLEAN];PruneZone: --FSPDefs--PROCEDURE [z: ZonePointer] RETURNS [BOOLEAN];PuntMesa: --ImageDefs--PROCEDURE;PupBufferDS: --SegmentDefs--DataSegmentType = 7;Purge: --DirectoryDefs--PROCEDURE [dir: DiskHandle, fp: POINTER TO FP, name: STRING] RETURNS [found: BOOLEAN];PurgeFP: --DirectoryDefs--PROCEDURE [dir: DiskHandle, fp: POINTER TO FP]RETURNS [found: BOOLEAN];PUSH: --InlineDefs, Inline--PROCEDURE RETURNS [WORD];PutChar: --CharIO--PROCEDURE [out: Handle, c: CHARACTER];PutDecimal: --CharIO--PROCEDURE [Handle, INTEGER];PutLine: --CharIO--PROCEDURE [out: Handle, s: STRING];PutNumber: --CharIO--PROCEDURE [Handle, UNSPECIFIED, NumberFormat];PutOctal: --CharIO--PROCEDURE [Handle, UNSPECIFIED];PutString: --CharIO--PROCEDURE [Handle, STRING];PutSubString: --CharIO--PROCEDURE [Handle, SubString];Quad: --SystemDefs--PROCEDURE [u: UNSPECIFIED] RETURNS [UNSPECIFIED];Read: --SegmentDefs, StreamDefs--AccessOptions = 1;ReadBlock: --StreamDefs--PROCEDURE [stream: StreamHandle, address: POINTER, words: CARDINAL] RETURNS [CARDINAL];ReadChar: --IODefs--PROCEDURE RETURNS [CHARACTER];ReadClock: --TimeDefs--PROCEDURE RETURNS [LONG UNSPECIFIED];ReadDecimal: --IODefs--PROCEDURE RETURNS [INTEGER];ReadEditedString: --IODefs--PROCEDURE [STRING, PROCEDURE [CHARACTER] RETURNS [BOOLEAN], BOOLEAN] RETURNS [CHARACTER];ReadID: --IODefs--PROCEDURE [STRING];ReadLine: --IODefs--PROCEDURE [STRING];ReadNumber: --IODefs--PROCEDURE [default: UNSPECIFIED, radix: CARDINAL]RETURNS [UNSPECIFIED];ReadOctal: --IODefs--PROCEDURE RETURNS [UNSPECIFIED];ReadString: --IODefs--PROCEDURE [STRING, PROCEDURE [CHARACTER] RETURNS [BOOLEAN]];ReadWrite: --SegmentDefs, StreamDefs--AccessOptions = 3;ReadWriteAppend: --SegmentDefs, StreamDefs--AccessOptions = 7;RealTimeClock: --AltoHardware, TimeDefs--POINTER TO CARDINAL;RefCount: --SegmentDefs--TYPE = [0..255];ReleaseFile: --SegmentDefs--PROCEDURE [file: FileHandle];RemoteSegCommand: --SegmentDefs--TYPE = UNSPECIFIED;RemoteSegProc: --SegmentDefs--TYPE = PROCEDURE [seg: FileSegmentHandle, command: RemoteSegCommand];RemoveCleanupProcedure: --ImageDefs--PROCEDURE [POINTER TO CleanupItem];RemoveGlobalFrame: --FrameDefs--PROCEDURE [frame: GlobalFrameHandle];RemoveSwapStrategy: --AllocDefs--PROCEDURE [strategy: POINTER TO SwapStrategy];ResetControlDEL: --StreamDefs--PROCEDURE;Resolution: --AltoDisplay, AltoHardware--TYPE = {high, low};ResumeError: --TrapDefs--SIGNAL;Rubout: --IODefs--SIGNAL;RunConfig: --FrameDefs--PROCEDURE [name: STRING];RunImage: --ImageDefs--PROCEDURE [file: FileSegmentHandle];Seconds: --ProcessDefs, Process--TYPE = CARDINAL;SecondsToTicks: --ProcessDefs, Process--PROCEDURE [Seconds] RETURNS [Ticks];SectorInterrupts: --AltoHardware--POINTER TO WORD;SegCount: --SegmentDefs--TYPE = [0..177777B];SegLockCount: --SegmentDefs--TYPE = [0..15];BfpX.qHZpbr s tr`urs trD_tr] str \urs trtrtrZurs trtrtrYurs trtrtrWurs trU srTyurstrDRtrtr trtrtrQqurstrtrtrDOtrtrNiurstrtrtrLurs trtrKau rs tr trIurs trtrHYurs tr t rFurs tr t rEQurs tr trCu rs trBIurs trt rtrt r@sr?Aurs trD=trtrtrtr<8urs trtrtr:urs trtrtrt r90u rs trtrtr7urs trD6(trtrtrtrtrtrtrtr4urs trtr3 urs trtr1u rs tr t rtrD0trt r.urs trtrt r-u rs trD+trtrtrtrtr* sr(sr'strtrtr%| str #u rstr"sstrt r strtrDk3urs trtrtr curs trurs tr trtr[urs tr strS s trs trKurs trtrurs trCstrtru rstr tr ;strtrtr str 3 str   8i^;Appendix: Symbol Listing for Public Interfaces 102SegmentAddress: --SegmentDefs--PROCEDURE [seg: SegmentHandle] RETURNS [POINTER];SegmentClass: --SegmentDefs--TYPE = {frame, table, code, other};SegmentFault: --SegmentDefs--SIGNAL [seg: FileSegmentHandle, pages: PageCount];SegmentHandle: --SegmentDefs--TYPE = POINTER TO SegmentObject;SegmentLocation: --SegmentDefs--TYPE = {disk, remote};SegmentObject: --SegmentDefs--TYPE = segment Object;SegmentSize: --SystemDefs--PROCEDURE [base: POINTER] RETURNS [nwords: CARDINAL];SegmentType: --SegmentDefs--TYPE = {data, file};SelfDestruct: --FrameDefs--PROCEDURE;SendMsgSignal: --TrapDefs--SIGNALRETURNS [msg: UNSPECIFIED, signal: UNSPECIFIED];SetBlock: --MiscDefs--PROCEDURE [p: POINTER, v: UNSPECIFIED, l: CARDINAL];SetDummyDisplaySize: --DisplayDefs--PROCEDURE [nScanLines: CARDINAL];SetEcho: --IODefs--PROCEDURE [new: BOOLEAN] RETURNS [old: BOOLEAN];SetEndOfFile: --SegmentDefs--PROCEDURE [file: FileHandle, page: PageNumber, byte: CARDINAL];SetFileAccess: --SegmentDefs--PROCEDURE [file: FileHandle, access: AccessOptions];SetFileLength: --SegmentDefs--PROCEDURE [file: FileHandle, fa: POINTER TO FA];SetFileSegmentDA: --SegmentDefs--PROCEDURE [seg: FileSegmentHandle, da: vDA];SetFileTimes: --SegmentDefs--PROCEDURE [file: FileHandle, read: LONG CARDINAL, write: LONG CARDINAL,create: LONG CARDINAL];SetFont: --DisplayDefs--PROCEDURE [FontHandle];SetIndex: --StreamDefs--PROCEDURE [stream: StreamHandle, index: StreamIndex];SetInputStream: --IODefs--PROCEDURE [StreamHandle];SetOutputStream: --IODefs--PROCEDURE [StreamHandle];SetPosition: --StreamDefs--PROCEDURE [stream: StreamHandle, pos: StreamPosition];SetPriority: --ProcessDefs, Process--PROCEDURE [Priority];SetSystemDisplaySize: --DisplayDefs--PROCEDURE [nTextLines: CARDINAL, nPages: CARDINAL];SetSystemDisplayWidth: --DisplayDefs--PROCEDURE [indent: CARDINAL, width: CARDINAL];SetTimeout: --ProcessDefs, Process--PROCEDURE [condition: POINTER TO CONDITION, ticks: Ticks];SetTypeScript: --DisplayDefs--PROCEDURE [DiskHandle];SetWorkingDir: --DirectoryDefs--PROCEDURE [dir: FileHandle];SN: --AltoFileDefs--TYPE = MACHINE DEPENDENT RECORD [bits: SNBits, part1: [0..17777B], part2: CARDINAL];SNBits: --AltoFileDefs--TYPE = MACHINE DEPENDENT RECORD [directory: [0..1], random: [0..1], nolog: [0..1]];SP: --Ascii, CharIO, IODefs--CHARACTER = 40C;SplitNode: --FSPDefs--PROCEDURE [z: ZonePointer, p: POINTER, n: BlockSize];StackError: --TrapDefs--ERROR;StartCursor: --DisplayDefs--PROCEDURE;StartFault: --TrapDefs--SIGNAL [dest: GlobalFrameHandle];StartKeyHandler: --StreamDefs--PROCEDURE;StartTrace: --TrapDefs--PROCEDURE [loc: POINTER, val: UNSPECIFIED, mask: WORD, equal: BOOLEAN];StopCursor: --DisplayDefs--PROCEDURE;StopKeyHandler: --StreamDefs--PROCEDURE;StopMesa: --ImageDefs--PROCEDURE;StopTrace: --TrapDefs--PROCEDURE;StreamBufferDS: --SegmentDefs--DataSegmentType = 6;StreamError: --StreamDefs--SIGNAL [stream: StreamHandle, error: StreamErrorCode];StreamErrorCode: --StreamDefs--TYPE = {StreamType, StreamAccess, StreamOperation, StreamPosition, StreamEnd,fpX.q p Mbu rstrtrtr M` str M_ str, M]strtrtr M\str MZstr MYu rs trtrtr tr MW str MUu rs tr MTys t Rtrt r t r MQqurs trtrt rtr MOurstr tr MNiurs trtrtrtr MLu rstr Ka*tr MIu rstr HY) MFu rstrtrtr MEQurstr# MCu rstr BItrtrtrtr @trtr M?Aurstr M=urs tr, M<8u rs tr M:urs tr M90u rs tr 7+ M6(u rstr M4urstr 3 tr tr M1urstr 0trtr M.u rstr - trtrtr M+u rstr M*u rstr M(strtrtrtr ')tr M%|strtrtrtr #2 M"sstr M urs trtr Mk s tr Mu rstr Mc s tr Murs tr M[u rs tr trt rtrtr MSu rstr Mu rs tr MKurs tr Murs tr MCsr M s tr ;. M s tr 3E :^Appendix: Symbol Listing for Public Interfaces 103StreamBug};StreamHandle: --StreamDefs--TYPE = POINTER TO StreamObject;StreamIndex: --StreamDefs--TYPE = RECORD [page: PageNumber, byte: CARDINAL];StreamIO: --IODefs--PROGRAM;StreamObject: --StreamDefs--TYPE = RECORD [reset: PROCEDURE [StreamHandle],get: PROCEDURE [StreamHandle] RETURNS [UNSPECIFIED],putback: PROCEDURE [StreamHandle, UNSPECIFIED],put: PROCEDURE [StreamHandle, UNSPECIFIED],endof: PROCEDURE [StreamHandle] RETURNS [BOOLEAN],destroy: PROCEDURE [StreamHandle],link: StreamHandle,body:SELECT type: * FROMKeyboard => [in: CARDINAL, out: CARDINAL, buffer: PACKED ARRAY [0..79] OF CHARACTER],Display => [clearCurrentLine: PROCEDURE [stream: StreamHandle],clearLine: PROCEDURE [stream: StreamHandle, line: CARDINAL],clearChar: PROCEDURE [stream: StreamHandle, char: CHARACTER],type: UNSPECIFIED,data: POINTER],Disk => [eof: BOOLEAN,dirty: BOOLEAN,read: BOOLEAN,write: BOOLEAN,append: BOOLEAN,unit: [1..2],index: CARDINAL,size: CARDINAL,page: PageNumber,char: CARDINAL,buffer: RECORD [SELECT OVERLAID * FROMbyte => [byte: POINTER TO PACKED ARRAY [0..0] OF BYTE],word => [word: POINTER TO ARRAY [0..0] OF WORD]ENDCASE],file: FileHandle,das: ARRAY {last, current, next} OF vDA,getOverflow: PROCEDURE [StreamHandle],savedGet: PROCEDURE [StreamHandle] RETURNS [UNSPECIFIED],putOverflow: PROCEDURE [StreamHandle],savedPut: PROCEDURE [StreamHandle, UNSPECIFIED]],Other => [type: UNSPECIFIED, data: POINTER]ENDCASE];StreamPosition: --StreamDefs--TYPE = LONG CARDINAL;String: --Storage--PROCEDURE [nchars: CARDINAL] RETURNS [s: STRING];StringBoundsFault: --StringDefs, String--SIGNAL [s: STRING]RETURNS [ns: STRING];StringHeaderSize: --StringDefs, String--CARDINAL = 2;StringLength: --Storage--PROCEDURE [s: STRING] RETURNS [CARDINAL];StringProc: --Format--TYPE = PROCEDURE [s: STRING];StringToDecimal: --StringDefs, String--PROCEDURE [s: STRING] RETURNS [INTEGER];StringToLongNumber: --StringDefs, String--PROCEDURE [s: STRING, radix: CARDINAL]RETURNS [LONG UNSPECIFIED];StringToNumber: --StringDefs, String--PROCEDURE [s: STRING, radix: CARDINAL]RETURNS [UNSPECIFIED];StringToOctal: --StringDefs, String--PROCEDURE [s: STRING]BfpX.qHZpDbr ` s trtrtr _ s trtrtr] s tr\ s trtrDZtrDYtrtrt rDWtrt rDUtrt rDTytrtrtrDRtrDQqDONitrtLr gKatrtr trtrtrtrI gHYtrgF trtrgEQ trtrgCt rgBItr@g?Atrg=trg<8trg:trg90trg7 g6(trg4trg3 g1trg0tr.trtrt)-rtrtrtrtrtr)+trtrtrtrtr)*trg(g'trtrg%| trg# trtrt rg"s trg trt rkt rtrtrcs trtrtrurs tr trtrtr[strtrDtrtrSstru rs trtrtrtrK s trtrtrurstrtrtrtrCurstrtrtrDtrtrt r ;u rstrtrtrD trt r 3u rstrtr 6^Appendix: Symbol Listing for Public Interfaces 104RETURNS [UNSPECIFIED];SubString: --Format--PROCEDURE [ss: SubString, proc: StringProc];SubString: --StringDefs--TYPE = POINTER TO SubStringDescriptor;SubString: --String--TYPE = SubString;SubStringDescriptor: --StringDefs--TYPE = RECORD [base: STRING, offset: CARDINAL, length: CARDINAL];SubStringDescriptor: --String--TYPE = SubStringDescriptor;SwapError: --SegmentDefs--SIGNAL [seg: FileSegmentHandle];SwapErrorDuringMakeCheck: --ImageDefs--SIGNAL;SwapErrorDuringMakeImage: --ImageDefs--SIGNAL;SwapIn: --SegmentDefs--PROCEDURE [seg: FileSegmentHandle];SwapInCode: --FrameDefs--PROCEDURE [f: GlobalFrameHandle];SwapOut: --SegmentDefs--PROCEDURE [seg: FileSegmentHandle];SwapOutCode: --FrameDefs--PROCEDURE [f: GlobalFrameHandle];SwapOutDuringMakeCheck: --ImageDefs--SIGNAL;SwapOutDuringMakeImage: --ImageDefs--SIGNAL;SwappingProcedure: --AllocDefs--TYPE = PROCEDURE [needed: PageCount, info: AllocInfo, seg: SegmentHandle] RETURNS [BOOLEAN];SwapStrategy: --AllocDefs--TYPE = RECORD [link: POINTER TO SwapStrategy, proc: SwappingProcedure];SwapTrapDuringMakeCheck: --ImageDefs--SIGNAL;SwapTrapDuringMakeImage: --ImageDefs--SIGNAL;SwapUp: --SegmentDefs--PROCEDURE [seg: FileSegmentHandle];SwatLevel: --ProcessDefs--InterruptLevel = 3;SystemDS: --SegmentDefs--DataSegmentType = 4;TAB: --Ascii, CharIO, IODefs--CHARACTER = 11C;TableDS: --SegmentDefs--DataSegmentType = 2;Task: --AltoHardware--TYPE = {Emulator, OrbitSlot, unused2, Trident3, KSEC, Tape5, Tape6, ETHER, MRT, DWT,CURT, DHT, DVT, PART, KWD, Trident17};Ticks: --ProcessDefs, Process--TYPE = CARDINAL;TicksToMsec: --ProcessDefs, Process--PROCEDURE [Ticks] RETURNS [Milliseconds];TIME: --AltoFileDefs--TYPE = MACHINE DEPENDENT RECORD [high: CARDINAL, low: CARDINAL];TimeoutLevel: --ProcessDefs--InterruptLevel = 4;TooManyProcesses: --ProcessDefs, Process--ERROR;trackCursor: --StreamDefs--BOOLEAN;TruncateDiskStream: --StreamDefs--PROCEDURE [stream: StreamHandle];TryCodeSwapping: --AllocDefs--SwappingProcedure;UnboundProcedure: --TrapDefs--SIGNAL [dest: UNSPECIFIED] RETURNS [ControlLink];UnimplementedInst: --TrapDefs--SIGNAL;UnknownDS: --SegmentDefs--DataSegmentType = 0;Unlock: --SegmentDefs--PROCEDURE [seg: FileSegmentHandle];UnlockCode: --FrameDefs--PROCEDURE [link: UNSPECIFIED];UnlockFile: --SegmentDefs--PROCEDURE [file: FileHandle];UnNew: --FrameDefs--PROCEDURE [frame: GlobalFrameHandle];UnNewConfig: --FrameDefs--PROCEDURE [link: UNSPECIFIED];Unpack: --Time--PROCEDURE [time: LONG CARDINAL] RETURNS [unpacked: Unpacked];UnpackDT: --TimeDefs--PROCEDURE [p: PackedTime] RETURNS [time: UnpackedTime];Unpacked: --Time--TYPE = UnpackedTime;UnpackedTime: --TimeDefs--TYPE = RECORD [year: [0..4002B],month: [0..11],day: [0..31],hour: [0..23],minute: [0..59],second: [0..59],weekday: [0..6],zone: [177764B..12],fpX.q p btrt r M`urs tr# M_ s trtrtr M] s tr M\s trtr Ztr tr tr MYs tr MW str MUs tr MTys tr MRurstr MQqu rs tr MOurstr MNiu rs tr MLs tr MKas tr MIs trtr HY8trtr MF s trtr EQtrtr( MCurs tr MBIs tr M@urstr M?A sr M= sr M<8str M:sr M90str 7L 6(& M4strtr M3 u rstrtr M1strtrtrtr 0trtr M. sr M-str M+ s tr M*urs tr M(s r M's trt rtr M%|s tr M# sr M"surstr M u rs trt r Mku rstr Murs tr Mcu rs trt r Murstrtrtrtr M[urs trtr M str MS s trtr  K  C  ;  3  7^Appendix: Symbol Listing for Public Interfaces 105dst: BOOLEAN];UnusableLevel: --ProcessDefs--InterruptLevel = 15;UpdateFileLength: --SegmentDefs--PROCEDURE [file: FileHandle, fa: POINTER TO FA];UpDown: --AltoHardware--TYPE = {down, up};updown: --KeyDefs--TYPE = {down, up};UpperCase: --StringDefs, String--PROCEDURE [c: CHARACTER] RETURNS [CHARACTER];userAbort: --StreamDefs--BOOLEAN;UserCleanupProc: --ImageDefs--CleanupProcedure;UtilIn: --AltoHardware--POINTER TO UtilInBits;UtilInBits: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [util: [0..255],key0: UpDown,key1: UpDown,key2: UpDown,key3: UpDown,key4: UpDown,redMouse: UpDown,blueMouse: UpDown,yellowMouse: UpDown];UtilOut: --AltoHardware--POINTER TO WORD;ValidateFrame: --FrameDefs--PROCEDURE [UNSPECIFIED];ValidateGlobalFrame: --FrameDefs--PROCEDURE [UNSPECIFIED];ValidateLongPointer: --SegmentDefs--PROCEDURE [a: LONG UNSPECIFIED];ValidateProcess: --ProcessDefs, Process--PROCEDURE [UNSPECIFIED];ValidateVMPage: --SegmentDefs--PROCEDURE [page: UNSPECIFIED];vDA: --AltoFileDefs--TYPE = RECORD [CARDINAL];vDC: --AltoFileDefs--TYPE = {ReadHLD, ReadLD, ReadD, WriteHLD, WriteLD, WriteD, SeekOnly, DoNothing};VersionOptions: --SegmentDefs--TYPE = [0..3];VMLimit: --AltoDefs--CARDINAL = 177777B;VMnotFree: --SegmentDefs--SIGNAL [base: PageNumber, pages: PageCount];VMtoDataSegment: --SegmentDefs--PROCEDURE [a: POINTER]RETURNS [DataSegmentHandle];VMtoFileSegment: --SegmentDefs--PROCEDURE [a: POINTER]RETURNS [FileSegmentHandle];VMtoSegment: --SegmentDefs--PROCEDURE [a: POINTER] RETURNS [SegmentHandle];WakeupError: --TrapDefs--SIGNAL;WestEast: --TimeDefs--TYPE = {west, east};WordBlockDescriptor: --AltoHardware--TYPE = MACHINE DEPENDENT RECORD [count: CARDINAL, pointer: POINTER];wordlength: --AltoDefs--CARDINAL = 16;WordLength: --AltoHardware--CARDINAL = 16;Words: --Storage--PROCEDURE [nwords: CARDINAL] RETURNS [base: POINTER];WordsForBcplString: --StringDefs--PROCEDURE [nchars: CARDINAL]RETURNS [CARDINAL];WordsForString: --StringDefs, String--PROCEDURE [nchars: CARDINAL]RETURNS [CARDINAL];WorryCallDebugger: --MiscDefs--PROCEDURE [STRING];Write: --SegmentDefs, StreamDefs--AccessOptions = 2;WriteAppend: --SegmentDefs, StreamDefs--AccessOptions = 6;WriteBlock: --StreamDefs--PROCEDURE [stream: StreamHandle, address: POINTER, words: CARDINAL] RETURNS [CARDINAL];WriteChar: --IODefs--PROCEDURE [CHARACTER];WriteDecimal: --IODefs--PROCEDURE [INTEGER];WriteLine: --IODefs--PROCEDURE [STRING];WriteNumber: --IODefs--PROCEDURE [UNSPECIFIED, NumberFormat];WriteOctal: --IODefs--PROCEDURE [UNSPECIFIED];WriteProtectFault: --TrapDefs--SIGNAL [page: CARDINAL];BfpX.qHZpDbrtr`sr_urstrD]trtr\str Zs tr YurstrtrtrtrW s trUs rTystrtr R strtrtrtrDQqDO DNi DL DKa DI DHYDFDEQCstrtrtrBIu rs trt r@urs trt r?Aurstrtrt r=urstrt r<8u rstrt r:strtrtr90strD7H6(str 4s tr 3 str&1urstrtrD0tr.urstrtrD-tr+u rstrtrtr* s tr( s tr'strtrtrtrD%|tr tr# s tr"s str urs tr trtrtrkurs tr trDtrtrcu rstr trDtrtr[urs trtrsrS sru rs trDKtrtrtrtrurs trtrCu rs trtrurs trtr ;u rs trt r u rs trt r 3s trtr < 6^Appendix: Symbol Listing for Public Interfaces 106WriteString: --IODefs--PROCEDURE [STRING];WriteSubString: --IODefs--PROCEDURE [SubString];Yield: --ProcessDefs, Process--PROCEDURE;Zero: --MiscDefs--PROCEDURE [p: POINTER, l: CARDINAL];ZeroDivisor: --TrapDefs--SIGNAL;zeroLengthBuffer: --AltoHardware--EthernetMicrocodeStatus;ZoneHeader: --FSPDefs--TYPE = RECORD [node: free NodeHeader,rover: FreeNodePointer,lock: MONITORLOCK,restOfZone: ZonePointer,length: BlockSize,deallocate: Deallocator,threshold: BlockSize,checking: BOOLEAN];ZoneOverhead: --FSPDefs--CARDINAL = 10;ZonePointer: --FSPDefs--TYPE = POINTER TO ZoneHeader;ZoneTooLarge: --FSPDefs--ERROR [POINTER];ZoneTooSmall: --FSPDefs, Storage--ERROR [POINTER];fpX.q p Mbu rs trtr M`u rs tr M_urstr M]urs trtrtr M\ s tr MZsr MY s trtr W U Tyt r R Qq O Ni L tr MKa s tr MI s trtrtr MHY s trtr MF strtr F(!}107Index of Mesa SymbolsAbort, 48ABORTED, 48Aborted, 48AbortMesa, 29AccessOptions, 23AddCleanupProcedure, 30AddressFromPage, 58AddSwapStrategy, 58AddToNewZone, 65AddToZone, 65AlFont, 3, 21AlignedBBTable, 40AllocateHeapNode, 69AllocateHeapString, 69AllocatePages, 64AllocateResidentPages, 64AllocateResidentSegment, 63AllocateSegment, 63AllocDefs, 2AllocInfo, 57AltoDefs, 2AltoDisplay, 2, 18AltoFileDefs, 2, 22AltoHardware, 2Append, 12, 23AppendChar, 76AppendDayTime, 79AppendDecimal, 78AppendFullDayTime, 80AppendLongDecimal, 78AppendLongNumber, 78AppendNumber, 78AppendOctal, 78AppendString, 76AppendSubString, 77Ascii, 2, 70BadDirectory, 11BadFileName, 10BankIndex, 59BBoperation, 40BBptr, 40BBsourcetype, 40BBTable, 39BBTableSpace, 40BcdTime, 29BcdVersion, 29BITAND, 38BITBLT, 40BitBltDefs, 2, 39BitmapDS, 53BitmapState, 20BITNOT, 38BITOR, 38BITSHIFT, 38BITXOR, 38BlinkCursor, 19BlockSize, 64BoundsFault, 81BW, 34ByteBlt, 36BytePair, 38CallDebugger, 37CantSwap, 58ChangeKey, 35CharHeight, 21CharIO, 2, 73CharIOPack, 2, 5, 73CharWidth, 21CheckPoint, 3, 6, 28, 29CleanupDiskStream, 14CleanupItem, 29CleanupMask, 30CleanupProcedure, 29CleanupReason, 29clearCurrentLine, 18clearDisplayChar, 18clearLine, 18CloseKeyStream, 33CommandLineCFA, 36CompareStrings, 77ConditionVector, 50Continue, 29ControlFault, 81ControlStoreType, 59ConvertToBasic, 6COPY, 37CopyDataToFileSegment, 59CopyFileToDataSegment, 59CopyString, 68-9CreateByteStream, 12CreateFont, 21CreateKeyStream, 33CreateWordStream, 12CurrentDayTime, 79CurrentTime, 36CursorTrack, 33CV, 50DataSegmentAddress, 52DataSegmentHandle, 52DataSegmentObject, 52DataSegmentType, 53DAYTIME, 36Deallocator, 64DefaultAccess, 23DefaultTime, 79DefaultVersion, 23DeleteFileSegment, 54DeleteSubString, 77Descriptor, 16DestroyDisplay, 20HZfp#aqi ]rsX [ts Yrs Xxrs Vr s Uprs Srs Rhrs Pr s O`rs Mrs LXr s Jrs IPrs Gr s FHrs Drs C@rs Ars @7rs >rs =/r s ;r s :'r s 8rs 7r s 5r s 4r s 2rs 1rs /rs .r s ,r s *r s ){rs 'rs &sr s $r s #jrs !r s brs r s Zrs r s Rrs r s Jrs rs Br s rs :r s rs 2rs rs *rs.r](r s.r[rs.rZ r s.rXrs.rWrs.rUrs.rTr s.rRrs.rQrs.rOr s.rMrs.rL{r s .rJrs.rIsr s .rGrs.rFkr s.rDr s.rCcrs.rAr s.r@[rs.r>rs.r=Srs.r;r s.r:Kr s.r8r s.r7Brs.r5rs.r4:r s.r2rs.r12r s.r/rs.r.*rs.r,rs.r+"r s.r)rs.r(r s.r&rs.r%rs.r#r s.r" r s.r r s.rrs.r}rs.rrs.rurs.rrs.rmrs.rr s.rer s.rr s.r]r s.rrs.rUrs.r r s.r Mr s ](=Index108DestroyFile, 25DestroyKeyHandler, 35DestroyZone, 65Detach, 47DirectoryDefs, 2, 9DirectoryLookup, 10DirectoryLookupFP, 10DirectoryPurge, 10DirectoryPurgeFP, 10DisableAborts, 48DisableInterrupts, 50DisableTimeout, 47DiskHandle, 74DisplayControl, 3, 20-1DisplayDefs, 3, 18DisplayHandle, 74DisplayOff, 19DisplayOn, 19DisplayPackage, 6, 21DivideCheck, 82DIVMOD, 37DoNothingDeallocate, 64EasyDown, 57EasyUp, 57EmptyString, 68EnableInterrupts, 50Enumerate, 9EnumerateDataSegments, 53EnumerateDirectory, 9EnumerateEntries, 9EnumerateFiles, 26EnumerateFileSegments, 54EnumerateGlobalFrames, 41EqualString, 77EqualStrings, 77EqualSubString, 77EqualSubStrings, 77EquivalentString, 77EquivalentStrings, 77EquivalentSubString, 77EquivalentSubStrings, 77Even, 37Expand, 68ExpandString, 68-9FA, 16Faults, 4FileAccessError, 24FileError, 24FileHandle, 23FileLength, 15FileNameError, 12, 23FileObject, 23Files, 4FileSegmentAddress, 54FileSegmentHandle, 53FileSegmentObject, 54FindFile, 25Finish, 16, 29FL1, 34FL2, 34fontcharHeight, 20charWidth, 20clearChar, 20close, 20destroy, 20lock, 20paintChar, 20unlock, 20FontDefs, 3, 20FontHandle, 20FontObject, 20Format, 3FormatImpl, 3FP, 22FR1, 34FR2, 34FR3, 34FR4, 34Frame, 42FrameDefs, 3, 41FrameDS, 53FrameHandle, 42Free, 67FreeHeapNode, 69FreeHeapString, 69FreeNode, 66FreeNodeNil, 68FreePages, 63-4FreePagesNil, 63FreeSegment, 63FreeString, 67FreeStringNil, 68FreeWords, 63FSP, 3-4FSPDefs, 3, 64GetBuffer, 16GetCaller, 44GetCurrent, 45GetCurrentKey, 33GetDefaultDisplayStream, 18GetDefaultKey, 33GetDiskStreamList, 12GetEndOfFile, 25GetFA, 16GetFileAccess, 25GetFileFP, 25GetFileTimes, 26GetFont, 21GetIndex, 14GetInputStream, 70GetMemoryConfig, 59GetNetworkNumber, 36GetOutputStream, 70GetPosition, 15GetPriority, 47GetTypeScript, 20GetWorkingDir, 11&fp  br sX `rs _r s ]rs \r s Zrs Yrs Wr s Urs Tyr s Rrs Qqr s Or s Nir s Lr s Kar s Ir s HYrs Fr s EQr s Crs BIrs @rs ?Ars =r s <8rs :rs 90rs 7rs 6(rs 4r s 3 rs 1rs 0r s .r s -r s +rs *rs (rs 'rs %|rs #rs "srs r s krs rs crs rs [r s r s Sr s r s Krs rs Crs rs ;rs rs 3rs*brs*`r*_sr s*]urs*\urs*Zurs*Yurs*Wurs*Uurs*Tyurs*Rrs*Qqr s*Or s*Nirs*Lr s*Kars*Irs*HYrs*Frs*EQrs*Crs*BIrs*@rs*?Ar s*=rs*<8r s*:r s*90rs*7r s*6(rs*4r s*3 r s*1r s*0r s*.rs*-rs*+rs**rs*(rs*'r s*%|r s*#rs*"sr s* rs*kr s*rs*cr s*rs*[r s*rs*Srs*r s*Krs*rs*Crs*r s* ;r s* r s* 3r s ]^iIndex109GlobalFrame, 41GlobalFrameHandle, 41GrEqualIndex, 15GrIndex, 15Handle, 16HardDown, 57HardUp, 57HardwareError, 82HeapDS, 53HeapZone, 67-8HighByte, 38HighHalf, 38ImageDefs, 3, 27ImageMaker, 6ImageRunner, 6, 28ImageTime, 29ImageVersion, 29ImmovableSegmentInXM, 27IndexToPosition, 16Init, 16InitDisplay, 19InitializeCondition, 46InitializeMonitor, 46Inline, 4, 37InlineDefs, 3, 37Insert, 10InsertFile, 24InsufficientVM, 56InterruptLevel, 49InvalidFP, 16, 24InvalidFrame, 42InvalidGlobalFrame, 41InvalidImage, 27-8InvalidLongPointer, 61InvalidNode, 66InvalidNumber, 78InvalidProcess, 45InvalidSegmentSize, 56InvalidTime, 79InvalidVMPage, 61InvalidZone, 66IODefs, 3, 70, 73IsBound, 44JumpToFA, 16KeyBits, 33Keyboard, 3, 32KeyboardHandle, 32, 74KeyDefs, 3, 33KeyItem, 34KeyName, 34Keys, 34KeyStreams, 3-4, 32LastResort, 58LDIVMOD, 37LineOverflow, 70LinkageFault, 81LoadConfig, 42LockCode, 43LockFile, 24LongAddressFromPage, 60LongCOPY, 37LongDataSegmentAddress, 60LongDiv, 38LongDivMod, 38LongFileSegmentAddress, 60LongMult, 38LongNumber, 37LongSegmentAddress, 60LongVMtoDataSegment, 60LongVMtoFileSegment, 60LongVMtoSegment, 60Lookup, 10LookupFP, 10LowByte, 38LowerCase, 76LowHalf, 38MachineType, 59MakeCheckPoint, 28, 30MakeCodeResident, 43MakeDataSegment, 57MakeImage, 3, 27, 30MakeNewZone, 64MakeNode, 65MakeSwappedIn, 57MakeUnMergedImage, 27MakeZone, 65MaxFilePage, 22MaxMDSPage, 60MaxVMPage, 60memConfig, 59MemoryConfig, 59Mesa.image, 5MesaExec, 6-7Milliseconds, 46MiscDefs, 3, 36Miscellaneous, 3ModifyIndex, 15ModifyPosition, 15Modules, 3Mouse, 34MouseBits, 34MouseButton, 34MoveFileSegment, 55MsecToTicks, 46NewByteStream, 12NewConfig, 42NewDataSegment, 52NewFile, 24NewFileOnly, 23NewFileSegment, 54NewWordStream, 12Node, 67NodeSize, 65NoGlobalFrameSlots, 43NormalizeIndex, 15NoRoomForLoader, 28NoRoomInCheckMap, 28NoRoomInImageMap, 27*OfpHZ br sX `rs _r s ]rs \rs Zrs Yrs Wr s Urs Tyrs Rrs Qqrs Ors Nir s Lr s Kars Ir s HYrs Frs EQrs Cr s BIrs @rs ?Ars =r s <8rs :r s 90r s 7r s 6(rs 4r s 3 rs 1r s 0rs .r s -r s +r s *rs (r s 'r s %|r s #rs "srs rs krs rs cr s rs [rs rs Srs r s Kr s rs Cr s r s ;r s rs 3rs.rbrs.r`rs.r_rs.r]rs.r\r s.rZrs.rYrs.rWr s.rUrs.rTyrs.rRrs.rQqrs.rOrs.rNirs.rLrs.rKars.rIrs.rHYr s.rFr s.rEQrs.rCrs.rBIrs .r@r s.r?Ars.r=r s.r<8rs.r:rs.r90r s.r7r s.r6(rs.r4rs.r3 r s.r1v s.r0rs.r.r s.r-rs.r+r s.r*r s.r(r s.r'rs.r%|rs.r#rs.r"sr s.r rs.rkr s.rr s.rcrs.rr s.r[rs.rr s.rSr s.rr s.rKrs.rrs.rCrs.rr s.r ;rs.r rs.r 3rs6 9^bIndex110NoRoomInZone, 66NumberFormat, 72OldFileOnly, 23OpenKeyStream, 33OsStaticDefs, 4OurProcess, 4OutNumber, 72PackDT, 79PackedTime, 79PageFault, 82PageFromAddress, 58PageFromLongAddress, 61PageNumber, 22PagePointer, 58Pages, 63PagesForWords, 63-4PagesPerMDS, 60ParityError, 82ParseFileName, 11Pause, 47PhantomParityError, 82PointerFault, 81PortFault, 81PositionToIndex, 16Priority, 47Process, 4ProcessDefs, 4, 45ProcessHandle, 45Prune, 68PruneHeap, 69PruneZone, 65PSB, 45PSBDefs, 45Purge, 10PurgeFP, 10Quad, 37Read, 12, 23ReadBlock, 14ReadChar, 70ReadClock, 80ReadDecimal, 72ReadEditedString, 71ReadID, 71ReadLine, 71ReadNumber, 72ReadOctal, 72ReadString, 71ReadWrite, 12, 23ReadWriteAppend, 12, 23RealTimeClock, 80ReleaseFile, 25RemoveCleanupProcedure, 30RemoveSwapStrategy, 58Resident, 4Restart, 29Restore, 29ResumeError, 82Rubout, 71RunConfig, 42RunImage, 28Runtime, 4Save, 29SD, 39SDDefs, 39Seconds, 46SecondsToTicks, 46SegmentAddress, 52SegmentDefs, 4, 22, 51SegmentFault, 56SegmentHandle, 51SegmentObject, 51SegmentsA, 4SegmentsB, 4SegmentSize, 63SegmentType, 51SelfDestruct, 43SetBlock, 36SetDummyDisplaySize, 19SetEcho, 71SetEndOfFile, 26SetFileAccess, 25SetFileTimes, 26SetIndex, 15SetInputStream, 70SetOutputStream, 70SetPosition, 15SetPriority, 47SetSystemDisplaySize, 19SetSystemDisplayWidth, 19SetTimeout, 46SetTypeScript, 20SetWorkingDir, 11sFADD, 39sFCOMP, 39sFDIV, 39sFIX, 39sFLOAT, 39sFMUL, 39sFSUB, 39SplitNode, 66StackError, 42, 82StartCursor, 19StartFault, 81StopCursor, 19StopMesa, 29Storage, 4, 63, 67-8StrategyList, 58streamdestroy, 13, 32, 75endof, 13, 32, 75get, 13, 32, 75put, 13, 32, 75putback, 13, 32, 75reset, 13, 32, 75StreamBufferDS, 53StreamDefs, 4, 12, 18, 32, 74StreamError, 75StreamErrorCode, 75&fp  br sX `r s _r s ]r s \r s Zr s Yrs Wrs Ur s Tyrs Rrs Qqrs Or s Nir s Lrs Kar s Ir s HYr s Fr s EQrs Crs BIr s @rs ?Ars =rs <8rs :r s 90r s 7rs 6(rs 4rs 3 rs 1rs 0rs .rs -rs +rs *rs (rs 'rs %|r s #rs "srs rs kr s rs cr s rs [rs r s Sr s rs Krs rs Crs rs ;r s rs 3rs*brs*`rs*_rs*]rs*\rs*Zrs*Yr s*Wr s*Ur s *Tyr s*Rr s*Qqr s*Ors*Nirs*Lr s*Kar s*Ir s*HYrs*Frs*EQrs*Cr s*BIr s*@r s*?Ars*=r s*<8rs*:r s*90r s*7rs*6(rs*4r s*3 r s*1r s*0rs*.rs*-rs*+rs**rs*(rs*'rs*%|rs*#r s*"sr s* r s*kr s*rs*crs *r s*[r*srs *Surs *urs *Kurs *urs *Curs *r s* ;r s* r s* 3rs 9^gIndex111StreamHandle, 74StreamIndex, 14StreamIO, 3, 5-6, 21, 32, 70, 73StreamObject, 74StreamPosition, 15StreamsA, 4StreamsB, 4StreamsC, 4StreamScan, 4, 9, 16String, 4, 67, 76StringBoundsFault, 77StringDefs, 4, 76StringLength, 68StringsA, 4StringsB, 4StringToDecimal, 78StringToLongNumber, 78StringToNumber, 77StringToOctal, 78SubString, 76SubStringDescriptor, 76SwapError, 56SwapIn, 55SwapInCode, 44SwapOut, 55SwapOutCode, 44Swapper, 3-4SwappingProcedure, 57SwapStrategy, 58SwapUp, 56System, 4SystemDefs, 4, 37, 63, 68SystemDisplay, 3, 18, 21SystemDS, 53TableDS, 53Ticks, 46TicksToMsec, 46Time, 4TimeConvert, 4TimeDefs, 4, 79TooManyProcesses, 45trackCursor, 33TrapDefs, 4, 81TruncateDiskStream, 13UnboundProcedure, 81UnimplementedInst, 82UnknownDS, 53Unlock, 55UnlockCode, 44UnlockFile, 24UnNew, 43UnNewConfig, 3, 6, 42UnpackDT, 79UnpackedTime, 79updown, 33UpperCase, 76ValidateFrame, 42ValidateGlobalFrame, 41ValidateLongPointer, 61ValidateVMPage, 61VersionOptions, 23VMnotFree, 56VMtoDataSegment, 53VMtoFileSegment, 54VMtoSegment, 52WakeupError, 82Words, 63WordsForString, 76WorryCallDebugger, 37Write, 12, 23WriteAppend, 12, 23WriteBlock, 14WriteChar, 70WriteDecimal, 73WriteLine, 72WriteNumber, 73WriteOctal, 73WriteProtectFaultt, 82WriteString, 72WriteSubString, 72Yield, 48Zero, 36ZeroDivisor, 82ZonePointer, 64ZoneTooLarge, 65ZoneTooSmall, 65*OfpHZ br sX `r s _rs ]r s \r s Zrs Yrs Wrs Ur s Tyrs Rrs Qqr s Or s Nirs Lrs Kars Irs HYr s Fr s EQrs Crs BIrs @rs ?Ar s =rs <8r s :rs 90rs 7r s 6(rs 4rs 3 r s 1r s 0rs .rs -rs +r s *rs (r s 'rs %|rs #r s "srs rs krs rs crs rs [r s r s Srs r s Krs r s Crs rs ;r s rs 3rs.rbr s.r`r s.r_rs.r]rs.r\rs.rZr s.rYr s.rWrs.rUr s.rTyrs.rRrs.rQqr s.rOr s.rNirs.rLr s.rKars.rIr s.rHYr s.rFrs.rEQr s.rCr s.rBIrs.r@rs.r?Ar s.r=r s.r<8r s.r:r sF ^ HELVETICA TIMESROMAN LOGO HELVETICA  HELVETICA  TIMESROMAN TIMESROMAN  TIMESROMAN  HELVETICA HELVETICA HELVETICA  TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN GACHA  HELVETICA HELVETICA  HELVETICA TIMESROMAN  TIMESROMAN  TIMESROMAN  HELVETICA HELVETICA  HELVETICA HELVETICA  TIMESROMAN GACHA  TIMESROMAN  TIMESROMAN  TIMESROMAN  HELVETICA HELVETICA HELVETICA  TIMESROMAN  TIMESROMAN  TIMESROMAN GACHA  HELVETICA  HELVETICA TIMESROMAN  HELVETICA TIMESROMAN TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN HELVETICA  TIMESROMAN  HELVETICA HELVETICA  TIMESROMAN  TIMESROMAN  TIMESROMAN  HELVETICA  HELVETICA TIMESROMANGACHA  HELVETICA HELVETICA   TIMESROMAN   TIMESROMAN   TIMESROMAN   HELVETICA   TIMESROMAN   HELVETICA  HELVETICA   HELVETICA  GACHA   TIMESROMAN  TIMESROMAN  TIMESROMAN   TIMESROMAN   TIMESROMAN   HELVETICA   HELVETICA  TIMESROMAN  HELVETICA   TIMESROMAN  TIMESROMAN   HELVETICA  TIMESROMAN   TIMESROMAN   TIMESROMAN   HELVETICA   HELVETICA  HELVETICA   HELVETICA  TIMESROMAN   TIMESROMAN   TIMESROMAN   HELVETICA   HELVETICA  TIMESROMAN   TIMESROMAN GACHA   HELVETICA  HELVETICA   TIMESROMAN   TIMESROMAN   TIMESROMAN   HELVETICA   HELVETICA  HELVETICA   TIMESROMAN TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN  HELVETICA  HELVETICA TIMESROMAN TIMESROMAN HELVETICA  TIMESROMAN  TIMESROMAN  TIMESROMAN  HELVETICA  TIMESROMAN  HELVETICA  HELVETICA TIMESROMAN HELVETICA  GACHA  TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN  HELVETICA HELVETICA  HELVETICA  TIMESROMAN  TIMESROMAN  TIMESROMAN  HELVETICA  HELVETICA TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN  HELVETICA HELVETICA  HELVETICA  TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN  HELVETICA HELVETICA  TIMESROMAN  HELVETICA  TIMESROMAN TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN  HELVETICA  HELVETICA HELVETICA TIMESROMAN TIMESROMAN  TIMESROMAN  TIMESROMAN  HELVETICA  HELVETICA  HELVETICA  HELVETICA TIMESROMAN  TIMESROMAN  HELVETICA  HELVETICA  HELVETICA  HELVETICA TIMESROMAN  TIMESROMAN  HELVETICA  HELVETICA  HELVETICA HELVETICA  TIMESROMAN  TIMESROMAN  HELVETICA  TIMESROMAN  HELVETICA HELVETICA GACHA   Q"(038 ;BILSY`gnq$v}+ ' ") 25<CJRY`h msz;~r7M" j  ,'B. 8 AJHP,W_iflXrz  3H!n> ]:Z#:Z$9dZ"*ia:]_C) Z  ")S 9J %O=O# iK" j/v'y System.pressSweet29-Oct-80 17:17:16 PST