Contents of the WAITASEC.DOC file
(PC Magazine Vol 4 No 24 November 26, 1985 by Charles Petzold)
WAITASEC puts the power in your fingers to control the screen
display. It provides double protection against programs and commands
that scroll the display faster than you can read it. First, it offers
a one-finger halt using the ScrollLock key. To stop screen scrolling,
ScrollLock makes a lot more sense than Ctrl and NumLock. Second,
WAITASEC will recall text that has already scrolled off the top of
your screen -- up to 375 80-column lines of it -- and bring it back
into view, using simple two-finger and one-finger key combinations
with the cursor keys.
WAITASEC will not work with an 80-column color/graphics display
if ANSI.SYS has been loaded. A patch to ANSI.SYS will allow WAITASEC
to work with such a configuration, however.
You can change the number of screens WAITASEC will save by
changing the fourth value in the first DATA statement (currently 8)
to something else. If you do so, you must then adjust the line check
value at the end of the first line and the total sum check value
accordingly. You may also patch an existing version of WAITASEC.COM
for a different number of screens by using DEBUG. The value to change
will be at offset 0103h.
WAITASEC is a memory-resident program. It should be invoked only
once, and it remains working until you turn off the PC or reboot.
WAITASEC is loaded by the command: WAITASEC. The amount of memory
that WAITASEC requires is about 4,000 bytes times the number of saved
screens, plus about 1K for the program itself. The 8-screen, 80-column
version will use over 32K of memory.
After WAITASEC has been loaded, the ScrollLock key takes on a
special meaning. First, it functions similarly to the Ctrl-NumLock
combination. When you depress the ScrollLock key, the program
currently running will be halted and any screen operation will stop.
When you release the ScrollLock key, the program and screen operations
To bring scrolled-off displays back into view, keep one finger on
the ScrollLock key and use another finger to press one of the cursor
keys: Home, Up Arrow, PgUp, End, Down Arrow, or PgDn. These work as
you would expect. The Up Arrow scans up through the scrolled displays
one line at a time. PgUp scans up 25 lines, and Home will scan up to
the very beginning of the text saved by WAITASEC. Down Arrow, PgDn,
and End scan down through the saved displays similarly. The End key
brings the screen back to your original starting place. If any other
key is pressed while ScrollLock is depressed, nothing will happen.
Once you have moved the display using the cursor keys with the
ScrollLock key depressed, you may take your hand away from the
keyboard. Any of the six cursor keys can then be used by themselves.
However, once ScrollLock has been released, any invalid key will bring
the display back to normal.
The lock state is ended only if the screen display is normal when
you release the ScrollLock key, or if you press a non-cursor key after
ScrollLock has already been released. For instance, if you just want
to halt a scrolling display to get a better look, simply press the
ScrollLock instead of Ctrl-NumLock. When you want to resume, release
If you want to move your hands away from the keyboard, keep the
ScrollLock depressed and press the Up Arrow key. The screen will scan
up one line. Then you can release your fingers from the keypad. Once
you've let go, you can use the up and down cursor keys to move the
display. Any other key will bring the display back to normal and
resume whatever was going on before. Note that that key will also be
passed back to the program in effect when ScrollLock was first
depressed. Regular operations can also be resumed by holding down
the ScrollLock key and pressing End, then releasing the ScrollLock
key. If you scroll the screen back to normal when ScrollLock is not
depressed, just tap the ScrollLock key once to get things moving again.
Programs that themselves use the ScrollLock key -- Lotus 1-2-3 and
Framework -- will be virtually unaffected by WAITASEC. The ScrollLock
key will still function as a toggle, but you'll notice it won't be
recognized by these programs until you release it. That's because
WAITASEC will be in the locked state during the short period the
ScrollLock key is depressed. But this should not be a problem.
ANSI.SYS does not use the ROM BIOS scrolling routine for 80-
column text mode and instead substitutes its own scrolling. This
results in a faster display scroll, since ANSI.SYS can do the scroll
in a few short commands, whereas the BIOS is generalized for scrolling
any size window. But, this little trick in ANSI.SYS also effectively
precludes intercepting the scroll-up call and saving that top line.
A relatively simple change to ANSI.SYS fixes this problem. The same
procedure is followed for PC-DOS 2.0, 2.1, 3.0, and 3.1.
First, make a copy of ANSI.SYS: COPY ANSI.SYS MODANSI.SYS.
MODANSI.SYS will be the modified version of the program. Load it into
DEBUG with: DEBUG MODANSI.SYS and enter the following four commands:
E 29D 90 90
E 2A1 90 90
Then change your CONFIG.SYS file to refer to the modified version:
DEVICE = MODANSI.SYS
Now all that's left is rebooting. You may notice that your normal
screen scrolls will be slightly slower with this patch, but even with
WAITASEC installed, they're not much slower than when ANSI.SYS is not
used at all.
If you do program development using a compiler or assembler and
you never get things right the first time, WAITASEC will prove to be of
great value. Use it while tracing through programs with DEBUG. Each
traced command used several lines of the display and it's often
necessary to look at instructions that have disappeared off the top
of the screen. WAITASEC brings this information back down into view.
When you run an assembler or compiler, how do you remember the
error messages when you go back into your editor to fix the source
code? Do you write them down, print them off, or take photographs of
the screen? With WAITASEC, all you have to do is go into your editor
and scroll the error messages back down into view.
However, you'll note that the text currently on your screen is
not saved by WAITASEC, and it will probably be overwritten by your
editor. That's because WAITASEC only saves scrolled-off text. To
transfer the on-screen text into WAITASEC's holding area, you may want
to scroll the text off your screen deliberately before you load your
editor. To let you add this final touch, you can use DEBUG to create
the tiny (13 bytes) SCROLL.COM. Just type in the following:
xxxx:0100 mov cx,19
xxxx:0103 mov dl,0a
xxxx:0105 mov ah,02
xxxx:0107 int 21
xxxx:0109 loop 103
xxxx:010B int 20
Writing 000D bytes
Now just run SCROLL, and everything currently on your screen will
scroll off the top and be grabbed by WAITASEC, for perusal at your