Hardware manual
The display stream package writes characters using a very fast assembly language routine until either the
current line is full or it encounters a control character. In either of these situations it calls a scrolling
procedure whose address is a component of the stream. The scrolling procedure is called with the same
arguments as PUTS, i.e. (ds, char), and is expected to do whatever is necessary. The standard procedure
takes the following action:
1) Null (code 0) is ignored.
2) New line (code 15b) causes scrolling.
3) Tab (code 11b) advances the bit position to the next multiple of 8 times the width of "blank"
(code 40b) in the current font: if this would exceed the right margin, just puts out a blank.
4) Other control characters (codes 1-10b, 12b-14b, 16b-37b) print with whatever symbol appears in
the font.
5) If a character will not fit on the current line, scrolling occurs and the character is printed at the
beginning of the new line (unless the DSstopright option was chosen, in which case the
character is simply discarded).
The scrolling procedure is also called with arguments (ds, -1) whenever a contemplated scrolling operation
would cause information to disappear from the screen, either because nLines lines are already present or
because the bitmap space is full (unless the DSstopbottom option was chosen, in which case the procedure
is not called and the action is the same as if it had returned false). If the procedure returns true, the
scrolling operation proceeds normally. If the procedure returns false, the scrolling does not take place, and
the character which triggered the operation is discarded.
The user may supply a different scrolling procedure simply by filling it into the field ds>>DS.scroll.
6. Miscellaneous
GetLmarg(ds): returns the left margin position of ds. The left margin is initialized to 8 (about 1/10" from
the left edge of the screen).
SetLmarg(ds, pos): sets the left margin of ds to pos.
GetRmarg(ds): returns the right margin position of ds. The right margin is initialized to the right edge of
the screen: this is the value of the displaywidth parameter in DISP.D.
SetRmarg(ds, pos): sets the right margin of ds to pos.
CharWidth(StreamOrFont, char): returns the width of the character char in the stream StreamOrFont; if
StreamOrFont is not a stream, it is assumed to be a font pointer.
Display stream package February 20, 1979 47
For Xerox Internal Use Only -- December 15, 1980










