Hardware manual

4. (This step applies only if simulating InLd.) Now let msa=rv 2. This points to a location where
a brief message can be stored. Set msa!0=1. Then for i=0 to lInLdMessage-1 do msa!(i+1)
= PrototypeEventVector!i.
5. Jump to location 3, never to return.
4. Data structures
This section describes the data structures used by the operating system that may be required by users.
4.1. Reserved Memory Locations
The Alto Hardware Manual describes addresses reserved for various purposes. The file AltoDefs.d
distributed with the OS declares most of these as manifest constants.
4.2. Streams
The standard data structures for streams are given in the DiskStreams package file "Streams.d".
Documentation for the streams package includes a description.
4.3. Disk files
The structure of the Alto file system is described in documentation for the Alto file system (Disks). This
includes a description of files, disk formats, directory formats, and the format of the disk descriptor. Bcpl
declarations for these objects may be found in the file AltoFileSys.d.
4.4. Display
The data structures used to drive the Alto display are described in the Alto Hardware Manual. The font
format for the Alto (.AL format) is also described there. Note that a font pointer such as the one passed to
CreateDisplayStream points to the third word of an AL font.
4.5. Zones
A program that wishes to create an operating-system object and retain control over the allocation of storage
to the object may pass a "zone" to the operating system function that needs space (e.g., CreateDiskStream).
A zone is simply a pointer "zone" to a structure ZN (see SysDefs.d), with zone>>ZN.Allocate containing
the address of the allocation procedure (called by (zone>>ZN.Allocate)(zone, lengthRequested)) and
zone>>ZN.Free containing the address of the free procedure (called by (zone>>ZN.Free)(zone, block)).
The zones created by the Alloc allocator package obey these conventions.
The zone provided by the operating system is saved in the static sysZone. The user may replace the system
zone by executing @lvSysZone = value. Subsequent free-storage requirements for the operating system
will be addressed to this zone. The system zone is restored when the user program terminates. Warning:
The operating system keeps various (and undocumented) information in the system zone, and is unwilling
to have the zone changed out from under it. The normal use of lvSysZone is to change the value of
sysZone immediately after a call to Junta (which clears away sysZone). If you wish to create disk streams
and preserve them across a call to Junta, pass your own zone as an argument to OpenFile.
Alto Operating System May 5, 1980 22
For Xerox Internal Use Only -- December 15, 1980