Hardware manual
ErrorLogAddress This static points to a network address of a spot where error
reports (for such things as parity errors) should be sent. The
structure is a "port," as defined in Pup documentation.
ClockSecond This static points to a double-precision integer that gives the
count of number of RCLK ticks (when RCLK is viewed as
returning a 32-bit number) in a second. This number is used for
keeping time, and is nominally 1680000. If timekeeping is
extremely critical, you may wish to calibrate your Alto and
change this number.
File Hints The operating system maintains file pointers for several
commonly-used files. Using these hints in conjunction with
OpenFile will substantially speed the process of opening
streams. The files and file pointers are:
SysDir fpSysDir
SysBoot fpSysBoot
DiskDescriptor fpDiskDescriptor
User.Cm fpUserCm
Com.Cm fpComCm
Rem.Cm fpRemCm
Executive.Run fpExecutive
SysFont.Al fpSysFont
Keyboard Buffer Although the system keyboard buffer is normally managed by
the keyboard handler provided in the system, some programs
may want to operate on it themselves. The most important
instance of this is when a program that has done a Junta is
finishing: if the program keeps its keyboard handler enabled,
any characters typed during the counter-junta can still be
recorded in the system buffer, and thus detected by the first
program to run (usually the Executive).
The static OsBuffer points to a structure OsBUF (see SysDefs.d)
that controls access to the buffer:
OsBuffer>>OsBUF.First First address of the ring buffer
OsBuffer>>OsBUF.Last Last address of the ring buffer+1
OsBuffer>>OsBUF.In "Input" pointer (place to put next item)
OsBuffer>>OsBUF.Out "Output" pointer (place to take next item)
The following code can be executed with interrupts on or off to
deal with the buffer:
GetItem() = valof //Returns 0 if none there!
[
if OsBuffer>>OsBUF.In eq OsBuffer>>OsBUF.Out then resultis 0
let newOut = OsBuffer>>OsBUF.Out+1
if newOut eq OsBuffer>>OsBUF.Last then newOut = OsBuffer>>OsBUF.First
let result = @(OsBuffer>>OsBUF.Out)
OsBuffer>>OsBUF.Out = newOut
resultis result
]
PutItem(i) = valof //Returns 0 if buffer full already
[
let newIn = OsBuffer>>OsBUF.In+1
if newIn eq OsBuffer>>OsBUF.Last then newIn = OsBuffer>>OsBUF.First
if newIn eq OsBuffer>>OsBUF.Out then resultis 0
Alto Operating System May 5, 1980 24
For Xerox Internal Use Only -- December 15, 1980










