Sending commands
Once the communication link is established, commands can be sent to the printer. This section describes how to send commands to the printer using DOS and BASIC. This section does not take into account the necessary protocol, but is meant as a general introduction to how the printer functions.
Using BASIC to send commands
In BASIC, printer commands are sent as a string of characters preceded by the LPRINT command.
LPRINT CHR$(&H0A)
This sends the hexadecimal number 0A to the printer, which causes the printer to print the contents of its print buffer. Previously sent commands tell the printer exactly how this data should appear on the paper.
LPRINT CHR$(&H12); "ABC"; CHR$(&H0A)
This sends the Hex 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). The communication link that the BASIC program outputs to must be matched to that of the printer.