Hardware manual

Display stream package
A library package is now available which provides display streams of great flexibility. Special features
include multiple fonts, repositioning to any bit position in the current line (or, under proper circumstances,
any line), selective erasing and polarity inversion, and better utilization of the available bitmap space.
The package consists of two files, DspStreamB.Bcpl and DspStreamA.Asm. In addition, files Streams.d
and AltoDefs.d provide useful parameter and structure declarations, in particular the parameters lDCB
and lDS mentioned below. The package does not require any routines other than those in the operating
system.
1. Creating a display stream
CreateDisplayStream(nLines, pBlock, lBlock, Font [sysFont], wWidth [38], Options
[DScompactleft+DScompactright], zone [sysZone]): creates a display stream. nLines is the maximum
number of lines that will be displayed at once: it is completely independent of the amount of space
supplied for bitmap and DCBs. pBlock is the beginning address of storage that can be used for the display
bitmap and control blocks; its length is lBlock. This block may be shortened slightly in order to align
things on even word boundaries. Font is a pointer to the third word of a font in AL format to use for the
stream. wWidth gives the width of the screen in Alto screen units, divided by 16; it must be an even
number. Zone is a free-space pool from which any additional space needed by the stream can be seized.
(For a description of zones, see the Alto OS manual.)
The minimum space for a display stream is lDCB*nLines+fh*wWidth+1, where fh is the height of the
standard system font, rounded up to an even number; the +1 allows the display stream package to align
the space on an even word boundary. This, however, only provides enough bitmap for a single line. A
space allocation of lDCB*nLines+fh*wWidth*nLines+1 guarantees enough bitmap for all nLines lines.
The display stream package uses all the available space and then, if necessary, blanks lines starting from the
top to make room for new data.
Options, if supplied, controls the action of the stream under various exceptional conditions. The various
options have mnemonic names (defined in Streams.d) and may be added together. Here is the list of
options:
DScompactleft allows the bitmap space required for a line to be reduced when
scrolling by eliminating multiples of 16 initial blank bit positions
and replacing them with the display controller’s "tab" feature.
However, a line in which this has occurred may not be
overwritten later (with SetLinePos, see below).
DScompactright allows the bitmap space for a line to be reduced when scrolling
by eliminating multiples of 16 blank bit positions on the right.
Overwriting is allowed up to the beginning of the blank space,
i.e. you cannot make a line longer by overwriting if you select
this option.
DSstopright causes characters to be discarded when a line becomes full,
rather than scrolling onto a new line.
DSstopbottom causes characters to be discarded in preference to losing data
from the screen. This applies when either all nLines lines are
occupied, or when the allocated bitmap space becomes full.
DSnone none of the above (this option is necessary so that 0 defaults to
DScompactleft+DScompactright).
2. Displaying the stream contents
Display stream package February 20, 1979 45
For Xerox Internal Use Only -- December 15, 1980