Star Micronics NX-10 Printer User Manual


 
107
In the program below, we’ve taken the logo graphics informa-
tion and put it into BASIC DATA statements. The program
itself is short and simple. The loop starting at line 100 reads the
data statements into a string array variable called LOGO$. In
line 170 we change the line spacing to 8/72 inch so that the lines
of graphics data will connect vertically. The actual printing is
done in the loop between lines 180 and 210; line 190 sends the
graphics control code to the printer and line 200 sends one line
of graphics data.
The printout from the program is shown right below the pro-
gram.
10
1 Prints S&S logo
20 LINE.8$=CHR$(27)+"A"+CHR$(8)
30
f Set line spacing to l/6”
40 LINE.l2$=CHR$(27)+"2"
1 Select dot graphics
2: GRAPHIC$=CHR$(27)+CHR$(42)+CHR$(O)
70 DIM LOG0$(4)
80 WIDTH "LPT1:",255
90
1 Read data
100 FOR ROW=1 TO 4
110 FOR COLUi"DJ=l TO 100
120 READ P
130 LOGO$(ROW)=LOGO$(ROW)+CHR$(P)
140 NEXT COLUMN
150 NEXT ROW
160 f Print logo
170 LPRINT LINE.8$;
180 FOR ROW=1 TO 4
190 LPRINT GRAPHIC$;CHR$(lOO);CHR$(O);
200 LPRINT LOGO$(ROW)
210 NEXT ROW
220 LPRINT LINE.12$
230
' Row 1
240 DATA
0 0 01
250 DATA 1:; 14: 14; 14: 14;
73:
;;
;I
7, 15
3, 15
260 DATA 15, 15, o, o, o, o, o, o, o, o
270 DATA 0, 1, 3, 3, 7,
7, 15, 14, 14, 14
280 DATA 14, 15, 7, 7, 7, 3, o, o, o, o
290 DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
300 DATA 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
310 DATA 0, 0, 0, 0, 1, 3, 7, 7, 7, 15
320 DATA 14, 14, 14, 14, 14, 7, 7, 3,
3, 15
330 DATA 15, 15, 0, 0, 0, 0, 0, 0, 0, 0