Programming With Basic - Star Micronics Multi-Font NX-2415 User Manual

Multi-font
Table of Contents

Advertisement

"V indicates that the following character is a control code. "V[ enters the
cESC> code. <ESC> 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 LQELITEDAT. To
avoid unnecessary logging of commands, switch hard-copy output off (by
pressing CTRL-PRTSC if hard copy is on). To print the file RBADME.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.
*Z means to press the CTRL and Z keys simultaneously. To use this file to
print READMFDOC, type the fifth line.
A>COPY CON LQPRINT.BAT
COPY LQELITE.DAT
PRN
PRINT
%1
^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 %l 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
E$=CHRQ(17)
'Escape
code
1020 D$=E$+"xO"
'Draft
quality
1030 L$=E$+"xl"
'Letter
quality
1040 C$=E$+"kO"+L$
'Courier
characters
1050 P$=E$+"kZ"+L$
'Prestige
characters
1060 O$=E$+"k3"+L$
'Orator
characters
1070 S$=E$+"k4"+L$
'Script
characters
1080 H$=CHRQ(9)
'Horizontal
tab
1090 PI$=E$+"P"
'Pica pitch
--
-
-

Advertisement

Table of Contents
loading

Table of Contents