Print Screen FormFeeder
A PCL 3 compatible laser printer device driver
Having a laser printer is great fun and it gives great results indeed. Just
one minor thing; because it's a page printer it needs a formfeed to start
printing. This is no problem except that a 'Print Screen' doesn't add one.
This way the next print job gets attached to the screen print and thus
misaligned to the paper. This device driver
will help you to get the screenprint right out of the laser printer and get
it setup for the next print job. It does so by sending a reset as soon as
Print Screen is done. While it's at it, it will set your PCL 3 compatible
laser printer to the appropriate paper size, orientation and font for the
Print Screen job. After the print job it resets the printer to whatever
default it was set, so you may continue with other print jobs without
Just add DEVICE=PRTSCFF4.SYS or DEVICEHIGH=PRTSCFF4.SYS to your CONFIG.SYS,
reboot and you're in business. If you don't want the installation banner
being printed just add a 'Q' to the config line.
3. How to use it
Just hit the Print Screen key. PRTSCFF4 sets up your LPT1 printer for the
job and the screen contents is send to the printer. Finally PRTSCFF4 sends
a reset and the laser printer starts to work and restores its defaults.
The device driver is accompanied by the
configuration utility PSF4CFG. This utility has several features:
- Sometimes another program takes over the Print Screen interrupt,
effectively disabling the device driver. Use the configuration utility to
reinstall the device driver.
- The device driver has the ability to print a username above the screen
print. Use the configuration utility to search for the environment
variable SGUSER and write it's value to the device driver. Use the
command line parameter '/NU' to ignore the environment variable SGUSER
and wipe the username.
- You might want to send the screen print to another printer port than the
standard LPT1. Use the command line parameter '/LPT?' to select LPT1,
LPT2 or LPT3 as the printer port used for screen prints.
- To disable screen output from the configuration utility use the command
line parameter '/Q'. This only works with successful operation. In case
of an error the parameter '/Q' is ignored and a message is printed anyway.
The configuration utility returns an errorlevel which can be used in batch
0 No problem
1 Invalid command line parameter
2 Device driver not installed
3 No SGUSER environment variable found
4 Error writing/clearing username
5 Error setting printer port
5. How does it work
To explain the design of the device driver and configuration utility in
detail would require a lot of text. Therefore the well documented source
code for both programs is included. Besides the source code the following
knowledge should be present:
- 8086 assembly and C
- Device driver programming
- DOS and BIOS interrupt services
- PCL 3 printer language
Useful resources for this knowledge are:
- The Ralf Brown Interrupt List
- TechHelp from Flambeaux Software
- HP Laserjet Technical Manual
January 8, 1995 0.01 : J.A. Keuter
Created from PASSWRD5.ASM by David Kirschbaum, Toad Hall &
John R. Petrocelli
January 10, 1995 1.00 : J.A. Keuter
Many trial and error runs made me make several changes and improvements.
It's ready for release.
January 12, 1995 2.00 : J.A. Keuter
Difficulty with the interception of the INT 05h print screen interrupt
lead to another approach. Instead of INT 05h the printer interrupt
INT 17h is used. Added PCL 3 support.
January 15, 1995 3.00 : J.A. Keuter
Fix for INT 05h print screen interrupt found. Returning to original design
using knowledge of version 2.00, especially PCL 3 support
February 5, 1995 4.00 : J.A. Keuter
Changed design to avoid video BIOS print screen routine all together.
Added open and close request processing to make easy reinstall possible.
Added output capability to be able to set username.
February 9, 1995 4.01 : J.A. Keuter
Changed effect of username setting. Now 'Username' string gets set
by the configuration utility. Added printer data transparency.
June 6, 1995 4.02 : J.A. Keuter
Added write check and errorlevel.
June 20, 1995 4.03 : J.A. Keuter
Added printer port selection code.
Written by my own two hands and an ASCII editor.
Problems? write me
Last updated May 21, 1997
Page best viewed with