Star Micronics XR-1500 Printer User Manual


 
Next comes the central attraction of the program: a line of text printed twenty
times in expanding and contracting loops to give a bane1 effect. The work
is done by four printer commands: a command setting the right margin (line
1420); a centering command (line 1440); a command to vary the line spacing
(lines 1460 and 1510); and a command to micro-adjust the space between
characters (lines 1470 and 1520).
Next the program returns to normal spacing and gives a demonstration of the
printer’s word-processing abilities: italic printing, bold printing, underlin-
ing, subscripts, etc.
The row of car symbols in the next printed line is created by downloading
two new character patterns, which are printed in place of the character “<”
(character 60).
The final part of the program uses dot graphics to print an “SW” logo. The
dot pattern of the logo was originally laid out on graph paper, then converted
to the data in lines 4180 to 4490 with the help of a calculator. Each number
represents eight vertical dots. (See “Graphics commands” in Chapter 4 for
details.)
The pattern is printed in four rows, each eight dots high and 65 dots wide.
Lines 1830 to 1900 read the dot data into a string array variable named
LOGO$. Line 1910 sets the line spacing to 8/72 inch so that the rows will
connect vertically. The loop in lines 1920 to 2020 does the printing in four
passes of the print head.
This program can also be run in IBM mode if you change a few of the lines
as shown below to allow for differences in some of the commands. You will
get a cylinder instead of a barrel effect, becuase the IBM mode does not have
any command to micro-adjust the character spacing.
Modifications for IBM mode:
1070 P$=CHR$(18)
'Pica pitch
1250 LPRINT H$;E$;":";"Elite pitch (12 CPI),"
1290 ' LPRINT H$;E$;"M";"Condensed elite pitch (20 CPI),";
1420 LPRINT CHR$(28);"Q";CHR$(47)
'Set right margin
1460 LPRINT E$;"A";CHR$(I);E$;
"2"; 'Set line spacing
1470
' LPRINT E$;" ";CHR$(I);
'Increase character space
1510 LPRINT E$;"A";CHR$(I);E$;"2"; 'Set line spacing
1520 '
LPRINT E$;" ";CHR$(I); 'Increase character space
1570 ' LPRINT E$;" ";CHR$(O);
'Normal character space
1580 LPRINT :LPRINT CHR$(28);"Q";CHR$(80)
1610 LPRINT H$;CHR$(28);"4";"Italics";CHR$(28);"5";", 'I;
1910 LPRINT E$;"A";CHR$(8);E$;"2";
'Set a/72" line spacing
3030 LPRINT E$;"xO";CHR$(28);":";CHR$(O);CHR$(O);CHR$(O);
3150 LPRINT CHR$(28);
"&";CHR$(O);CHR$(6O);CHR$(60);
94