Dec 212017
 
Clipper Epson FX printer routines.
File FX86E.ZIP from The Programmer’s Corner in
Category Dbase Source Code
Clipper Epson FX printer routines.
File Name File Size Zip Size Zip Type
FX86E.DOC 5187 2369 deflated
FX86E.LIB 3095 1179 deflated

Download File FX86E.ZIP Here

Contents of the FX86E.DOC file


April 6, 1988

As a means of saying "Hello" to everyone, I provide this library FREE. I hope
it proves useful to others; it is to me.

This group of functions is used to drive the Epson FX-86e (They should work
the FX-286e, according to the Epson's documentation ).

I am primarily an industrial (robotics & process control) programmer, but these
days more and more folks want to integrate data collected by the control
system with accounting data. Makes sense to me. I decided on Clipper as the
way to do this, mainly because it allows use of "C" & assembly functions ( my
native languages ), and of course because it is compiled rather than
interpreted. I confess to being very new/old at business-type programming. My
last go-round was 10 years ago, on an IBM 360/30, COBOL...

I personally found the Clipper/dBASE printer path cumbersome, so I wrote up
these functions to make it quicker and easier, and to take full advantage of
the printer's features.

Packaged in the archive you will find "FX86E.LIB". The functions therein were
written and compiled under Microsoft C 5.0, strictly using the instructions
shipped with Summer '87. I have used them in several Clipper programs, and
had no trouble linking or running.

General information:
The functions generally do NOT check argument validity. You must refer to
your printer manual to be sure the arguments for such things as tabs and
page length are valid.

The work was done on a Compaq Portable III (80286), but compiled/assembled
WITHOUT 286 instructions...therefore the functions should work on any
computer which will run a Clipper-compiled program.

I have linked this library to Clipper programs with both the DOS linker
(my code uses no overlays) and with PLINK ("canned" source from SBT).
No problems encountered...modified SBT programs use the functions just fine.
I always link the library to the prime module, not to any overlays.

*****************************************************************************


Source: This library was authored by David VanDerKamp, Automatech, 1983
Bristol Drive, Bettendorf, IA, 52722. Voice phone 319-359-6737,
Group 3 FAX 319-359-6664.

ANY INFORMATION ABOUT PROBLEMS IS WELCOME!

********************** Clipper accessible functions *************************

>>> NOTE! These functions use primary printing device ("LPT1") ONLY! <<<


These are the library functions you may reference in a Clipper program:

prchar ()
Sends one character (byte) to the printer via DOS interrupt 17.
If a string is supplied as the argument, only the first character will
be sent.

prqual ()
Sets print quality. Valid arguments are 0 and 1. 0 sets to "draft" quality,
1 sets to "Near Letter" quality.

pribm () and prital ()
Select whether codes above 127 will be interpreted as "IBM character
graphics" ( box/line drawing components ) or italic alpha characters.
The italic mode is default (at least on my printer).

prlpi ()
Sets printer lines-per-inch. Valid arguments are 6 and 8.

pageinch ()
Sets page length in inches, according to the argument.

prsize ()
Sets character width. Arguments are 0 (Pica) or 1 (Elite).

prcond ()
Enables / disables condensed printing (0 disables, 1 enables).

prdubl ()
Enables / disables double-wide printing (0 disables, 1 enables).

prhtabs (,,...)
Sets horizontal tabs at arguments, clears previous.
NOTE that the terminating 0 defined by the Epson manual is supplied by
the function, and is NOT to be included in the argument list.

phtab ()
Sends one horizontal tab to printer.

nextab ()
Performs a return, linefeed, then one horizontal tab.

prvtabs (,,...)
Sets vertical tabs at arguments, clears previous. See note on terminating
0 under "prhtabs".

pvtab ()
Sends one vertical tab.

pvnext ()
Sends return, then vertical tab.

prntln ()
Prints character string. Prints length AS DEFINED BY CLIPPER, without
regard to character content. Thus embedded terminators (0), etc, ARE
TRANSMITTED if contained within the Clipper-defined length.

pnext ()
Performs return / linefeed.

prtof ()
Sends top-of-form ("chr(10)").

*********************** For "C" Programmers ONLY ****************************

For those who also use the "Extend" feature to add their own C functions, the
library contains a few entry points which may be useful. These may be accessed
FROM OTHER "C" FUNCTIONS ONLY, NOT FROM "CLIPPER" PROGRAMS.

extern void clpchar (unsigned char); /* one byte sent to primary printer */
extern void presc (void); /* ESC (hex 1b) sent to primary printer */
extern void presp (unsigned char); /* ESC, then argument, sent to printer */

These functions follow the conventional "C" naming method (they are found in
the library with ONE leading underscore).

In order that details be exact: "clpchar" is (alone) an assembler function
prepared with MASM 5.0 , as a FAR procedure. It resides in a module alone
within the library.


 December 21, 2017  Add comments

Leave a Reply