Dec 232017
 
Selective Print Screen version 2.0 - selectively print lines on screen.
File SPS20.ZIP from The Programmer’s Corner in
Category Printer Utilities
Selective Print Screen version 2.0 – selectively print lines on screen.
File Name File Size Zip Size Zip Type
SPS.8 15865 4068 deflated
SPS.COM 1181 870 deflated
SPS.DOC 4862 1925 deflated

Download File SPS20.ZIP Here

Contents of the SPS.DOC file


SPS.COM ver 2.0 by Bob Montgomery, 4-23-87

This is a Terminate and Stay Resident (TSR) program which does a
Selective Print Screen (hence the name SPS). Once installed, it
vectors interrupt 5 (the print screen interrupt) to itself, and
sits waiting for a print screen request. When you request a print
screen, the cursor is moved to the top of the screen, and the
prompt 'Set start position' appears in the lower right hand
corner. The cursor can be moved around the screen with the
following keys:

Right arrow - move cursor right; stops at right edge
Left arrow - move cursor left; stops at left edge
Up arrow - move cursor up one line; stops at top line
Down arrow move cursor down one line; stops at bottom line
Page Up move cursor to top line
Page Down move cursor to bottom line
^Right arrow move cursor to right edge of screen
^Left arrow move cursor to left edge of screen
Home move cursor to upper left corner of screen
End move cursor to lower right corner of screen
P Print whole screen
Escape Cancel print screen

When the cursor is at the desired start position, press Enter and
the prompt 'Set end position' will appear in the lower right hand
corner. Move the cursor to the desired end position, and press
Enter again. The text within the rectangle defined by the start
and end positions will then be printed.

If you don't want to do a print screen, press Escape to cancel
the operation and return to the interrupted program. If you want
to print the whole screen, press the P (upper or lower case) key.

Before the printer starts printing, the prompt in the lower right
corner is removed and the original text is restored. If the
printer is not ready (or deselected), a prompt 'Printer not
ready' will appear in the lower right corner after about 2
seconds. Then after about 10 seconds, if the printer is still not
ready, the print screen operation aborts and returns to the
interrupted program. If during the print screen operation the
printer becomes 'not ready', a prompt will tell you this, and
give you about 10 seconds to fix the problem before aborting.

The program only traps interrupt 5 (print screen) until invoked
by pressing Shift PrtSc. Then, it vector the timer and keyboard
interrupts (8 and 9) to itself, and saves the old vectors. When
it is done, it puts the old vectors back, and quits. In this way,
it is essentialy 'not there' until called, and 'not there' after
it is done. This means that it will not interfere with other
programs, and not cause additional processing delays. Once
invoked, it traps all keyboard input and does not pass it on, so
the interrupted program, other TSRs, and BIOS never know that
keys have been pressed. Since the last thing BIOS knew before the
program was invoked was that the Shift and PrtSc keys had been
pressed, the releasing of the Shift key is passed on so that BIOS
can do its housekeeping; releasing the PrtSc key does not affect
the BIOS housekeeping, so it is not passed on. This means that
the program must service the keyboard each time it generates an
interrupt 9, a job which is normally done by BIOS.

This program solves a number of problems, some of which were
present with the previous version of SPS by Paul Trioano.

1. Passing keys on is sometimes a problem, because other
programs (like CED) will save the keypresses, and act on
them after the interrupting program quits.
2. Sending the screen characters directly is sometimes a
problem, since some screens contain control character
(below 20h) and make them appear as blanks by changing
the attribute to black on black; HDIR is an example. This
will cause the printer output to not match the video
screen.
3. Routing interrupts thru a program when not required
takes extra processing time, and can cause interference
with other programs.

The source code is included, and is liberally commented to allow
those interested to understand how it works. It uses only BIOS
calls and no DOS calls; DOS calls will not work in TSR programs
because DOS is not re-entrant. It has been tried on the XT and AT
with no problems, so will probably work on all machines with IBM
compatible BIOS. If you have any problems or comments, leave a
message with the Black Hole BBS in Orlando, Florida, (305) 260-
6397. Enjoy.

Bob Montgomery



 December 23, 2017  Add comments

Leave a Reply