Epson GX-80 Operating Manual page 36

Table of Contents

Advertisement

To see how more than one line combines to form a figure, enter and
run the following program, which uses two of the lines you have
already typed and adds several more.
5 PRINT CHR$( 4) "PR�H"
10 PRINT CHR$(27)"1";
20 FOR R=l TO 3
30 PRINT CHR$(27)"K"CHR$(100)CHR$(0);
40 FOR X=l TO 50:PRINT CHR$(85)CHR$(42);
50 NEXT X:PRINT
60 PRINT CHR$(27) "K"CHR$( 100)CHR$(0);
70 FOR X=l TO 50:PRINT CHR$(42)CHR$(85);
80 NEXT X:PRINT :NEXT R
90 PRINT CHR$(27)"@"
95 PRINT CHR$(4)"PR#0"
Now run the program to see the six print lines combine into a
pattern:
The short and simple program that produced the pattern demons-
trates many elements of graphics programming. In order to point
these out it is necessary to break the program down into steps.
Line 10 changes to a 7-dot line spacing, which is the height of the dot
patterns used in the program, thereby removing the space between
the print lines.
Line 20 begins a loop to produce multiple print lines. Lines 30 and
40 are the same as above, but an PRINT is added to line 50 to
produce a line feed after line 40. Lines 60 and 70 are like lines 30 and
40
except that line 70 uses a reversal of the patterns in line
40.
As the
loop is executed, the program prints lines 40 and 70 alternately so
that the patterns of the print lines will fit together well.
Notice that the graphics command can be in effect for only one print
line. The command is in lines 30 and 60 so that it is issued each time
a new print line is begun. You cannot print more than one line of
graphics without having the graphics command issued each time.
Line 90 is the reset code to return the printer to its defaults.
62
Density Varieties
Although all the examples so far in this chapter have been in the
single-density graphics mode, the GX-80 offers five other eight-pin
density modes and two nine-pin ones. Nine-pin graphics is not
necessary for most uses, but you can find its command (
<ESC>A)
in Appendix C. All the eight-pin densities and their commands are
described in Table 8-1.
TableB-1. Graphics modes
Mode
Density
Alternate
Description
code
0
Single
ESC"K"
60 dots/inch:
480 dots/8" line
1
Low-Speed
ESC"L"
120 dots/inch
Double
960 dots/8 line
2
High-Speed
ESC"Y"
120 dot positions/inch
Double
Faster than Mode 1 ; does not print
consecutive dots in a row.
3
Quadruple
ESC"Z"
240 dot positions/inch; 1920 dot
posltions/s" line. Does not print
consecutive dots in a row.
4
Epson
none
80 dots/inch;
QX-10
640 dots/8" line
Matches the screen density, which
makes it easy to do screen dumps.
5
One-to-one
none
72 dots/inch;
(plotter)
576 dots/8" line
Produces the same density hori-
zontally as vertically, which makes
circles look round.
6
90 dots/line
none
90 dot
dots/8" line
You are familiar with the command format that uses the
<ESC>
code and a letter, but GX-80 graphics commands can also be in the
following format:
PRINT CHR$(27)"*"CHR$(M)CHR$(Nl)CHR$(N2);
with m being the mode number found in the left column of Table
8-1. As usual, nl and
n2
reserve the number of columns for
graphics. The seven modes include six densities, with two speeds for
double-density.
63

Advertisement

Table of Contents
loading

Table of Contents