   DATE:  August 9, 1990 FROM:     Info. Center
PRODUCT:  WordPerfect VERSION:     5.1 RELEASE DATE:  6/29/90
SUBJECT:  Print To Hardware Port - Guidelines
 
                  Print to Hardware Port (PTHP)
         A new feature on the WP5.1 6-29-90 Program 1/2
 
Normally, when WordPerfect sends data to a printer, it does so
though the BIOS (Basic Input/Output Services) serial and parallel
services.  Using the BIOS services allows compatibility with a very
wide range of hardware configurations.
The fastest way (as much as 30% faster) for a program to send data
to a directly-attached printer is for the program to bypass the
BIOS services, and print directly to the serial or parallel port
using interrupts (the hardware).

How WordPerfect sets up Print to Hardware port:
 
WordPerfect will read a table, that the IBM PC BIOS keeps, of base
port addresses for serial and parallel ports.  Normally,
WordPerfect can read this table and use the addresses to know how
to communicate with the serial and/or parallel ports.  Unlike the
Base Address WordPerfect automatically sets up the IRQ levels to
the following:
LPT Ports = IRQ 7
COM1 = IRQ 4
COM2 = IRQ 3
COM 3&4 are not setup automatically.  (If they are used then the
user must go into the Advanced Setup and set the IRQ level to their
manufacturer's setting.)
 
It is possible that the BIOS might not be able to find certain
expansion boards and enter the Base Address in the table.  In this
case, the user must use the Print to Hardware Port Advanced Setup
menu and tell WordPerfect what the Base Address is for the serial
or parallel port in question.  This information can be obtained
from the I/O(Input Output) card board documentation (ie... in the
index under I/O port, parallel, serial, com, I/O (base) address).

                              Guidelines
 
1.   If the user cannot print from DOS or with PTHP set to no,
     choosing Yes for print to hardware port may not allow them to
     print.  This will enhance printing if they are already able to
     print.
 
2.   Print to Hardware Port cannot be used with capture, print
     spooling programs, or TSR printing programs.  (ie...Glyphix,
     PowerPak) 
 
3.   If PTHP is set to yes, and Printer Control says the status is
     printing but nothing ever prints, you probably need to go into
     Advanced Setup and change the IRQ level.  In many cases,
     WordPerfect has sent a character but is not receiving the
     interrupt to continue printing.  To find out the proper IRQ
     level and base port address, users will have to refer to the
     documentation for the parallel/serial I/O card.

Printing to a parallel port using an AT compatible Computer: If the
base address defaults to 278h try IRQ 5.
 
4.   If users have referred to the documentation and everything
     seems to be correct with the base port address and IRQ level,
     and it still doesn't work there are several options:
 
     a.   Boot vanilla and make sure there is nothing conflicting
          (eg. network boards use an interrupt that might
          conflict.)
 
     b.   Contact the manufacturer of the board to see if there is
          any known problem with interrupt handling.  (Some of the
          original IBM monochrome graphics adapters and their
          clones do not consistently generate interrupts.)
 
5.   Choosing incorrect interrupt levels in Advanced Setup may
     cause the computer to hang.
 
Note:
Generally, the BIOS will find the Base Address of most LPT and COM
ports.  However, there is no easy way of determining what the IRQ
level is if the IRQ level is not the default.  If the user does not
know what the IRQ level is for the board, and it is a board that
allows the IRQ level to be configured, the only way to determine
the IRQ level is to remove the board and look at the jumper/switch
block settings and compare them with the illustrations or
descriptions in the board manual.
 
Memo ID:  ALL_8423N
   DATE:  October 12, 1990 FROM:   Info. Center
PRODUCT:  WordPerfect   VERSION:   5.1 RELEASE DATE:  6/29/90
SUBJECT:  Print To Hardware Port
 
Purpose:  

To speed up printing to local printers through interrupt-driven
printing.  This features will make the most significant difference
when printer complex data, graphics, tables, etc.

 
How Print To Hardware Port Works:

1.   Normally when WordPerfect prints is uses a process called
     polling.  WP asks (polls) the ROM BIOS if the printer is ready
     for another character and WP must wait for the BIOS to tell it
     if the printer is ready for another character.  The BIOS will
     continually look back and forth between the printer and WP to
     see when the printer is ready for another character.  This
     polling back and forth substantially slows down the printer
     process.
  
2.   Print to Hardware Port uses a process called hardware
     interrupt, instead of WP repeatedly polling the BIOS.  The
     printer lets WP do other things and interrupts WP for a split
     second to inform WP that the printer is ready for another
     character (much like a keyboard interrupts a program to put a
     character on the screen).  WP then sends another character
     when the printer is ready.  This speeds up printing by as much
     as 30 percent.


User Interface:

This feature is selected from the Select Printer: Edit menu.  The
default is set to No so as not to interfere with users' current
hardware setup.  In most cases, to turn on hardware printing, users
should just have to select the Yes menu option.  One exception to
this is when selecting Print to Hardware Port for Com3 and Com4. 
WP can make no assumptions about the base port address and IRQ
level for those ports.  When selecting Print to Hardware Port for
Com3 and Com4, users will be forced to go into Advanced Setup.  If
users' serial or parallel ports are configured to an IRQ level or
base port address different than WP assumes is default, they will
have to use the Advanced Setup option.  
 

Advanced Setup Menu:
 
IRQ Levels

Since there are many things that cause interrupts (i.e. keyboards,
clock chip etc.) the CPU has to know where a particular interrupt
is coming from to do a certain task.
 
The default settings for IRQ levels are:
 
LPT ports = IRQ 7
LPT2 for AT's = IRQ 5 (only in certain cases, see card
documentation)
COM1 = IRQ 4
COM2 = IRQ 3

When the software receives a code from a peripheral device, it must
distinguish which device sent the code.  A perripheral sends a
signal, a certain tone or pitch, that is unique to that device. 
The technical term is Interrupt Request Levels.  The standard
signals are:
IRQ0 - Clock Chip.  This keeps time for the PC
IRQ1 - Keyboard
IRQ2 - Reserved (many network adapters use this)
IRQ3 - COM2
IRQ4 - COM1
IRQ5 - Hard disk on the PC, LPT2 on some AT machines that have a
combined serial/paralled board.
IRQ6 - Diskette on PC, Hard disk & diskette on AT
IRQ7 - LPT1
 
In some cases a person may have a device (i.e. modem) which will
give them additional COM ports (i.e. COM3 and COM4).  The
documentation of the card will tell the proper IRQ setting and must
be set in the advanced setup menu.  There are no assumptions that
WordPerfect can make about either COM3 or COM4. Because of this,
the Yes option on the print to Hardware Port menu is
non-functional. Only No and Advanced Setup are allowed.  When
Advanced Setup is chosen, Yes is automatically  

Base Port Addresses

There also has to be a way for the CPU and expansion boards to
exchange information.  The CPU must know which I/O port to use for
a particular application.  This is known as the base port address. 
Normally WP reads a setup from the BIOS, which contains the correct
base port addresses of certain I/O devices, which include the
existing serial and parallel ports.
 
Sometimes the BIOS is unable to read the base port address of
additional expansion boards such as the ones mentioned above. 
Again the documentation of the card will tell the proper base port
address and must be set in the advanced setup menu.
 
The base port address use hexadecimal numbers to specify their
location.
 
LPT1 = 3BCh (for parallel ports on video cards)
LPT2 = 378h (or LPT1 if there is no parallel port on the video
card)
LPT3 = 278h (or LPT2 if there is no parallel port on the video
card)
COM1 = 3F8h
COM2 = 2F8h


Startup Options:
 
/bp = # The size of the buffer used for the output stream has an
impact on print speed when using Print to Hardware Port.  The # is
a value from 0 to 63 K, in increments of 1.  WP sets the default
buffer size at 512 bytes (1/2K), but this can be changed for
documents with many graphics, tables, etc.  Larger buffer sizes
must be used with caution because if too much buffer is used, the
printer may give an "Out of Memory" error.  If little memory is
available, a bigger buffer size may actually slow down the job
because it is stealing away memory that could be used to format the
data for printing.  Setting the buffer size to zero disables
hardware printing for that session of WP.  
 
/nh  Disables hardware printing.  With the addition of hardware
printing, upon startup WP makes new calls to hardware that are
incompatible with some older BIOS versions, causing the computer to
lock.  This will happen whether Print to Hardware Port is set for
No or Yes.  If users lock upon startup, try /nh/nc/nk (NOTE: If
/nc/nk is necessary to run WP, /nh will also be necessary).  To
disable hardware printing simply use /nh.


Troubleshooting:
 
1.   If the user cannot print from DOS or with Print to Hardware
     Port set to No, choosing Yes for Print to Hardware Port will
     not allow them to print.  This will enhance printing if they
     are already able to print.
 
2.   Print to Hardware Port cannot be used with capture or print
     spooling programs since these generally use the BIOS
     interface.

3.   If Print to Hardware Port is set to Yes, and Printer Control
     says the status is printing, but nothing ever prints, you
     probably need to go into Advanced Setup and change the IRQ
     level.  In many cases, WP has sent some characters but is not
     receiving the interrupt to continue printing.  To find out the
     proper IRQ level and base port address, users will have to
     refer to the documentation for the parallel/serial board.
 
4.   If users have referred to the documentation and everything
     seems to be correct with the base port address and IRQ level
     and it still doesn't work there are several options:
     a.   Boot vanilla and make sure there is nothing conflicting
          (eg. network boards can be configured to use interrupt
          that can conflict (IPX prints the IRQ level the network
          board is using upon startup.)
               b.   Contact the manufacturer of the board to see if there is
          any known problems with interrupt handling.  (Some of the
          original IBM monochrome graphics adapters and their
          clones do not produce consistent interrupts with their
          built-in parallel ports.)

5.   If the printer is printing garbage, someone is sending the
     printer garbage, or the printer lost a character somehow (for
     instance, part of a control sequence) and the printer is
     interpreting subsequent bytes of the control sequence as
     printable characters.
 
6.   Choosing incorrect interrupt levels in Advanced Setup can
     cause the computer to lock.
 
Memo ID:  WP51_3043D
----------------------------------------------------------------------
   DATE:  November 5, 1990 FROM:   Info. Center
PRODUCT:  WordPerfect   VERSION:   5.1 RELEASE DATE:  ALL
SUBJECT:  Print To Hardware Port Will Work With Windows 3.0
 
The Print to Hardware Port option will work under Windows 3.0.  The
following is the .PIF file that works with the Print to Hardware
Port option:
 
Program filename:        C:\WP51\WP.EXE
Window Title:            WordPerfect
Optional Parameters:     (None)
Startup Directory:       C:\WP51
Memory Requirements:     KB Required 512 KB Desired 640
Display Usage:           Full Screen
Execution:               Exclusive
Close Window on Exit:    Yes
 
ADVANCED OPTIONS
Multitasking Options
Background Priority 50
Foreground Priority 1000
 
Memory Options 
 
               KB Required    KB Desired     Locked
EMS Memory     1024           1024           No
XMS Memory     0              1024           No
 
Display Options
 
Video Memory    Low Graphics
Monitor Ports   High Graphics
 
Other Options
Allow Fast Paste:             Yes
Allow Close when Active:      Yes
Reserve Shortcut Keys:        (All None)
Application Shortcut Keys:    None
 
Memo ID:  WP51_3252K
