Programming Using Basic; Sample Program - Star Micronics Multi-Font XR-1000 User Manual

Multi-font
Table of Contents

Advertisement

The resulting file should be sent to the printer using the COPY command,
eg:
A>COPY NLQ.DAT
PRN
I
prior to printing document files. Of course, this command can also be
included in a batch file.
PROGRAMMING USING BASIC
As discussed earlier, a version of BASIC is usually supplied with PC-
compatible machines. With this BASIC, characters are sent to the printer
using the LPRINT command, and contml codes are defined using the
CHR$() function.
Sample program
The following lines of BASIC give examples of how the printer may be
driven from within your own
programs:
1000
' Set control
codea
1010 E$=CHRS(27)
'Escape
code
1020 D$=E$+"xO"
'Draft quality
1030 L$=E$+"xl"
'Letter quality
1040 F$=E$+"k"
'Select
font
1050 C$=F$+CHR$(O)+L$
'Select Courier
1060 HS=CHRS(P)
'Horizontal
tab
1070 P$=E$+"P"
'Pica pitch
1080
' Start
printing
1090 WIDTH
"LPT1:",255
1100 LPRIRT
E$:"D";CHR$(3):CHR$(27);CHR$(O);
1110 LPRIRT
C$;"Font
settings:"
1120 LPRIRT
H$;D$;"Draft
characters,";L$;
1130 LPRIRT
H$;F$;CHR$(O);"Courier
charactera,"
1140 LPRINT
H$;F$;CHR$(l);"Sanserif
characters,";
1150 LPRIRT
H$;F$;CHR$(2);"Letter-Gothic."
1160 LPRIRT
H$;F$;CHR$(3);"0rator
charactera.";
1170 LPRIRT
H$;F$;CHR$(4);"Script
characters,"
1180 LPRIRT
H$;F$;CHR$(5);"0CR-B
charactera.";
1190 LPRIRT
H$;F$;CHR$(6):"TW-Light
characters."
1200 LPRIRT
H$;F$;CHR$(7);"Cinema
charactera"
1210
'
1220 LPRIRT
1230 LPRIRT
C$:"Print
pitches
are:"
1240 LPRIRT. H$;P$;"Pica
pitch
(10 CPI),":
1250 LPRIRT
H$;E$;"M";"Elite
pitch
(12 CPI)."
1260 LPRIRT
H$;P$;
1270 LPRIRT
CRRS(15);
'Select
condensed
print
1280 LPRIRT
"Condenaed
pica pitch
(17 CPI).";
1290 LPRIRT
H$;E$;"M": "Condensed
elite
pitch
(20 CPI).";
1300 LPRIRT
CHR$(18)
'Cancel
condensed
print
90

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xr-1500

Table of Contents