Intermec 6400 Reference Guide

Page of 234
SECTION 2
Supporting DOS Applications
2-16 PEN*KEY6400 Programmer’s Reference Guide
DOS NPCP Printing: PC4800.SYS
NPCP Printing Support, under DOS, consists of DOS device driver PC4800.SYS,
which allows DOS and PL/N applications written for 6400 Computers to print to
NORANDR 4810, 4815, and 4820 Printers, using the NPCP protocol.
Installation and Configuration
Required CONFIG.SYS Entry
To install the DOS driver for the 4815 or 4810 Printers, place the following
statement in the CONFIG.SYS file and reboot. If PC4800.SYS is not in the root
directory, be sure to include the path.
device=PC4800.SYS LPT1 1 /I1
NOR4800 is the default name for the device driver that is used to open the
device. By using PC4800.SYS, a specific device driver is specified.
Add a command line parameter (LPT1), as shown in the preceding statement, to
override this. The driver can then be accessed via this name when the device is
opened. Give it any name you want (except PRN) (using up to eight characters).
Add a second parameter to indicate the communications port number to use for
output:
= COM1, = COM2, etc.
To set the communications port number, you must also specify the device name.
Parameter order is important. The default port is COM1. By default,
PC4800.SYS supplies only the DOS device driver interface to NPCP Printers.
To support PL/N applications, interrupt 17h must also be installed. To do so, add
a /I switch to the command line, as shown in the preceding statement. The digit
placed after the “I” refers to the LPT port, which gets redirected to the device
driver at the interrupt 17h prompt. For example, if a “1” is specified, then all
interrupt 17h calls for LPT1 are redirected to the PC4800.SYS Device Driver.
Typical AUTOEXEC.BAT Entries
Refer to
Appendix A, Sample Configuration Files, for a typical examples of items
that should be in your AUTOEXEC.BAT file.
Functionality and Usage
Intermec supplies PL/N and C standard printer routines that handle critical
errors and the printing of text to NORAND Printers. The following information
is for those who might want to create their own print routines.
The DOS driver for the 4815 and other NPCP Printers must be opened before it
can be used. Use the correct open call, for the language being used, that allows
writing to the device. An open mode that opens only devices (files) when they
currently exist, checks for the existence of the device and returns an error if it is
not there. Open modes, that create a file upon opening, even creates a file if the
driver is not present.
To write to the device, use any appropriate output function that can be directed
to the device (for example, in C you can use fprintf()).
You should install a critical error handler that processes errors from the printer.
The printer driver only returns “device not ready” errors to DOS, for the sake of