In thi
s
p
ro
gram we used the number 128 in the DATA statement
s to
s
ignal th
e
end of a print line
.
This is the reason for the IF-T
HEN
st
a
tem
e
nt in line 610 that skips to line 650 and causes a line f
eed.
Th
e o
th
er s
pecial technique used in this program is found in
lines
620 a
n
d 630.
Since some of the data numbers are repeat
ed many
ti
m
es, negat
ive DATA numbers have been used for repetiti
o
n
s, in
order to save
t
y
ping
.
Line 620 tests for a negative number
a
n
d, if it
fi
nd
s one, re
ads the next two numbers and prints their pin p
a
t
terns
t
h
e n
um
ber o
f times indicated by the negative number.
For example,
when the minus 6 in line 800 is read, the prog
ra
m
then
reads the nex
t two numbers (8 and 0) and sends them to th
e
p
rinter
six
t
imes. T
his feature is not a necessary part of the program
, but it
does a
l
low yo
u to type fewer data number
s.
Ot
h
erwise, t
h
e
program is a straightforward graphics prog
ram that
uses 7
-
dot li
n
e
spacing and reads numbers from DATA st
a
t
ements
a
n
d sends t
h
e
m to the printer
.
If you want to see the figur
e
in
other
de
n
s
it
ies, cha
nge the
"
yO
'
in line 600 to
"
L" or
"
Z
".
Graphics Programming Tips
N
ow
t
hat we'
ve shown you how to design your own graph
ics, we'll
review and e
mphasize a few elements of graphics programmi
ng. As
usual, Micro
soft BASIC ha
s
been used in the example
s,
bu
t the
pri
n
ciples a
pply to any programming language although th
e
r
e may
be o
t
her way
s than using a semi-colon to prevent carriag
e returns
a
n
d line feed
s being added at the end of a statement
.
S
emic
o
lon
s
and command placement
Af
t
er t
h
e gra
phics command is issued, every number sen
t
t
o the
LX
-
80 is in
t
e
rpreted as a pin pattern and printed on pap
er
.
There-
fore, yo
u
m
u
s
t be careful how you write graphics command
s
i
n your
program.
F
or exam
pl
e,
suppose you want a 50-column graphics lin
e with a
7-
do
t lin
e s
p
a
cing
.
You might enter the following program
:
2
0 L
CHR$(27) "K"CHR$(50)CHR$(0
)
3
0 LPRINT
CHR$(27)"1
"
40 F
O
R
G=l
TO 50: LPRINT
CHR$(74):
NEXT
G
Содержание LX-80
Страница 1: ...LX 80 Printer P8492037 0 Y560991020 ...
Страница 2: ...EPSON LX SOPRINTER Operating Manual ...
Страница 8: ...The Parallel Interface Data Transfer Sequence Interface timing Signal relationships ...
Страница 11: ......
Страница 41: ......
Страница 67: ......
Страница 85: ......
Страница 103: ......
Страница 111: ......
Страница 120: ...Format ASCII code Decimal Hexadecimal Ese 27 18 Explanation Turns off double strike mode set by ESC G ...
Страница 145: ......
Страница 171: ......
Страница 173: ......
Страница 177: ......
Страница 181: ......
Страница 189: ......
Страница 190: ......