Programming With Basic - Star Micronics LC24-15 User Manual

Multi-font
Table of Contents

Advertisement

AV indicates that the following character is a control code. ^V[ enters the
<ES0
code. <ES0
has character code 27, and "[" is the 27th character in
ASCII sequence from A. Similarly, *VA enters the control code cl>. See
your DOS manual if you need further information about EDLIN.
You can now set up the printer by sending it the file LQELITBDAT. To
avoid unnecessary logging of commands, switch hard-copy output off (by
pressing CTRL-PRTSC if hard copy is on). To print the file README.DOC
in LQ elite type, give the following two commands:
A>COPY LQELITE.DAT
PRN
A>PRINT
README.DOC
For greater convenience you can make a batch file that will set up the printer
and print any specified file with a single command. To create such a batch
file with the name LQPRINT.BAT, type in the first four lines shown next.
'55 means to press the CTRL and Z keys simultaneously. To use this file to
print RBADMBDOC, type the fifth line.
A>COPY CON LQPRINT.BAT
COPY LQELITE.DAT
PRN
PRINT
%l
*Z
A>LQELITE
README.DOC
The first above line is a copy command from the CONsole screen to a file
named LQPRINT.BAT. The next two lines are the contents of this file. The
% 1 is a dummy parameter: whatever file name you type after LQPRINT will
be substituted for % 1 and printed.
PROGRAMMING WITH BASIC
As an example of programming the printer on Microsoft BASIC, we have
listed the program for the IBM-PC. This program runs in the printer's
Standard mode, and the downloadable'condition (DIP switch l-6 ON and
DIP switch 2-l OFF).
1000 ' Set control codes
1010
EQ=CHR$(27)
'Escape cods
1020 D$=EQ+"xO"
'Draft quality
1030 L$=E$+"xl"
'Letter quality
1040 C$=E$+"kO"+L$
'Courier characters
1050 P$=E$+"kZ"+L$
'Preetige characters
1060 O$=E$+"k3"+L$
'Orator characters
1070 S$=E$+"k4"+L$
'Script characters
1080 H$=CHR$(9)
'Horizontal tab
1090 PI$=E$+"P"
'Pica pitch

Advertisement

Table of Contents
loading

Table of Contents