Using Basic To Send Commands - NCR 7158 Owner's Manual

Thermal receipt and impact printer
Table of Contents

Advertisement

6-2
Chapter 6: Communication Interface

Using BASIC to Send Commands

In BASIC, printer commands are sent as a string of characters preceded
by the LPRINT command. For example:
LPRINT CHR$(&H0A)
Sends the hexadecimal number 0A to the printer, which causes the
printer to print the contents of its print buffer. Commands sent prior to
0A tell the printer exactly how data should appear on the paper. For
example:
LPRINT CHR$(&H12); "ABC"; CHR$(&H0A)
Sends the hexadecimal numbers 12 41 42 43 0A to the printer. This
causes the printer to set itself to double wide mode (12), load the print
buffer with "ABC" (41 42 43), and finally, print (0A). Again, the
communication link that the BASIC program configures to must be
matched to that of the printer.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents