Computers generate terminal output faster than you can read it.  When the output
produced by the program exceeds the size of the screen, you may wish to freeze
the output operation, look at the relevant portions of the output, and then
resume.  You usually do this by means of XON-XOFF flow control, i.e. you press
ctrl-S (XOFF) to halt output, and ctrl-Q (XON) to continue.  On some terminals
there is a single button (e.g. "No Scroll" on the Wyse 75, "Hold Screen" on
VT220) to achieve the same effect, you press it once to stop, then again to
continue, the terminal knows which of XON or XOFF it needs to send.

Human reaction time being what it is, it frequently happens that by the time
you've pressed ctrl-S and the output has stopped, the bit you were interested in
is just off the top of the screen.  Especially at terminal speeds greater than
9600 baud, and with programs generating short lines of text, some form of page
mode (whereby output automatically freezes when one screen's worth of text has
been output since the last input operation), is almost essential even though it
can sometimes annoy when you're not expecting it ("It's hung up, help!").

For the past few years page mode on the APM system has worked as follows:
Once the program you're running has generated a screenful of text, subsequent
output is frozen until some action is taken by the person at the keyboard:

Press RETURN to cause the next single line to appear.
Press LINEFEED or BACKSPACE to allow another screenful to appear.
Press ctrl-Q to cancel page mode causing subsequent output to fly past
without restriction.

Even with output not frozen, ctrl-Q caused page mode to be cancelled, and ctrl-S
(followed by BACKSPACE etc to continue) caused it to be reinstated.

The state of the page mode flag is remembered by the command interpreter and is
restored after each program has finished to what it was before that program was
invoked.  Thus to cancel page mode permanently, you had to press ctrl-Q at
command level.

One minor problem was that in certain circumstances you couldn't tell whether
the screen was frozen or whether the program was "thinking", unless you were
knowledgable enough to interpret the lights in the machine (and were not
connected through the Gandalf).  This has now been resolved by putting a marker
(consisting of the letter F with the cursor back-spaced over it) at the end of
the current line whenever output is frozen.  The marker is removed before output
resumes.

A second problem was due to using the control characters XON and XOFF to affect
page mode.  This caused problems when using terminals that generate their own
flow control when they can't keep up at high baud rates or when smooth
scrolling, thereby fiddling the state of the page mode flag without the user's
intention or knowledge.  Other terminals (eg VT220) refuse to pass through
ctrl-S and ctrl-Q (their screen will stop scrolling, but they have a buffer
which will continue to accept output from the computer, the terminal will only
send XOFF when this buffer is nearly full, and will never send XON unless it
knows it has sent XOFF).

This problem has been resolved by choosing a different control character,
ctrl-F, to flip the state of the page mode flag.  When output is frozen,
pressing ctrl-F will cause output to resume and cease to freeze at page
intervals.  When not in page mode, pressing ctrl-F will cause output
to freeze at the end of the line currently being printed.

When output is not in progress (eg when you're at command level) you can
determine the state of the page mode flag by pressing ctrl-F repeatedly.
Whenever it has just turned page mode ON, the letter P (with the cursor
reversed back over it) will appear, when page mode is OFF, the P will
disappear.

** IMPORTANT **

Note that ctrl-S and ctrl-Q now no longer affect page mode, in particular this
means that when you press ctrl-Q while output is frozen, you will only get
another screenful, not, as before, unrestricted output.  The fact that the
letter F with the cursor backed over it appears while frozen serves as a handy
reminder that ctrl-F might be the thing to press in that situation.

RWT 07/04/87
