Pagination in TTY driver

Andy Tannenbaum trb at masscomp.UUCP
Wed Oct 9 03:18:37 AEST 1985


In article tim at cithep and seth at megad write:
> > Actually, UNIX has a way of preventing text from scrolling by so fast that
> > you can't read it ( or reach ^S before it goes by ).  There is a scroll rate
> > parameter setable vis stty.  I am sure most UNIXs have it.  Just do a stty
> > followed by a number indicating the desired scroll rate.  Higher numbers are
> > faster ( note: not all numbers are available - check your manual ).  For
> > example, a "stty 300" will set the scroll rate to 1/32 of what most people
> > have it set at.  If you are real slow, try "stty 75".
> > Oh, you may have to adjust some switches on your terminal.  Good luck!
> > 					ihnp4!cithep!tim
> 
> Doing a "stty 300" or a "stty 75" does more than set the scroll rate, it
> sets the Baud rate!  I suggest using a command like "more" or "pg" to
> paginate.
> 	Seth H Zirin

cithep!tim is barking up a tree that's next to the right one.
UNIX has, since the dawn of time, supported carriage return and
newline delays in the terminal driver.  If you want to control scroll
rates, you can use these.  These delay modes were originally in there
because in old terminals there was actually a *carriage* to return, and
it took time to return, and if you didn't give it time to return, your
output would be spewed on the *paper* wherever the carriage happened to
be flying on its flight home.  This was in the days before XON/XOFF,
RTS/CTS, 300 baud, and CRT's were features built into the tools of every
hacker's trade.

Anyway, if you want slower scroll rates, this is probably a better
idea than changing the baud rate.  A control key (or two!) could be made
to switch the delay mode on and off and delays times could be hacked
to taste.

FYI, Masscomp's tty driver has a nice passive tty paging system that is
quite smart, accounting for wrapped lines, different screen/window
sizes, it does scroll or noscroll (clear screen or overwrite with erase
EOL), and other goodies.  It is compatible with 4.2BSD and SysVr2 at
the ioctl(2) and stty(1), and user input levels, has ^T job/system
status with more than 25 selectable info items, optional delayed echo,
everything you ever wanted for Christmas.  Of course, if you don't like
this stuff or don't care about it, it doesn't get in your way.  If I
get enough requests, I'll post an annotated stty everything listing
(if the net can handle the load).

	Andy Tannenbaum   Masscomp  Westford, MA   (617) 692-6200 x2274



More information about the Comp.unix.wizards mailing list