Epson LX-80 User Manual - Page 91

of the more, as pin patterns.

Page 91 highlights

What went wrong? To help you understand the graphics command and avoid some of the more common errors made with it, we'll examine this program in detail. First look at line 20. ESCape "K" calls for single-density graphics, and the two CHR$ numbers specify 50 columns of dots. Once that command is given, every number sent to the printer is interpreted as a pin pattern and printed on the paper. Since there is no semicolon at the end of the line, the numbers 13 and 10--the codes for carriage return and line feed-are sent to the printer after CHR$(0). Because the graphics command has been issued, these codes are printed as pin patterns. Line 30 would normally be the command for 7-dot line spacing, but since the graphics mode is still in effect, the command is interpreted by the printer as two pin patterns: 27 and 49 (the ASCII codes for ESCape and "1"). Since there is no semicolon at the end of this line, the numbers 13 and 10 are sent again, and again they are printed as pin patterns. In line 40 nothing is sent to the printer until after the LPRINT. Then the desired pin pattern-74-is finally sent, but since no semicolon is after it, 13 and 10 are sent next each time the loop is executed. Figure 9-7 is an enlarged representation of the first 13 columns of the printout. In this figure you can see exactly how the printer reacted to the first part of the incorrect program. 128 84 32 18 8 4 2 1 13 1 27 ( 13 1 74 1 10 ) 13 1 74 10 49 10 13 74 10 Figure 9-7. Pin patterns of incorrect program 87

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158

What went wrong? To help you understand the graphics command
and avoid some
of the more
common errors made with it, we’ll
examine this program in detail.
First look at line 20. ESCape “K” calls for single-density graphics,
and the two CHR$ numbers specify 50 columns of dots. Once that
command is given, every number sent to the printer is interpreted as a
pin pattern and printed on the paper. Since there is no semicolon at
the end of the line, the numbers 13 and 10--the codes for carriage
return and line feed-are sent to the printer after CHR$(0). Because
the graphics command has been issued, these codes are printed as pin
patterns.
Line 30 would normally be the command for 7-dot line spacing,
but since the graphics mode is still in effect, the command is inter-
preted by the printer as two pin patterns: 27 and 49 (the ASCII codes
for ESCape and
1 ).
Since there is no semicolon at the end of this
line, the numbers 13 and
10
are sent again, and again they are printed
as pin patterns.
In line 40 nothing is sent to the printer until after the LPRINT.
Then the desired pin pattern-74-is finally sent, but since no semi-
colon is after it,
13
and
10
are sent next each time the loop is executed.
Figure 9-7 is an enlarged representation of the first
13
columns of
the printout. In this figure you can see exactly how the printer reacted
to the first part of the incorrect program.
128
84
32
18
8
4
2
1
13
1
27
(
13
1
74
1
10
)
13
1
74
10
49
10
13
74
10
Figure 9-7. Pin patterns of incorrect program
87