Epson LX-80 User Manual - Page 93

Graphics and low ASCII codes, pins 3 and 4, the computer system will intercept that 12 and send

Page 93 highlights

10 G$zCHR$(27>+"K"+CHR$(l00)+CHR(0) 2c3 A$=CHR$( 85 > +(;EW$( 42 > 30 B$~~CHR$(42)tCMR$(85) 40 I,PRINT CHR$(27)"1"; 50 FOR Rr-1 TO 3 60 LPRINT G$; 70 FOR X=1 TO 50: L,PRINT A$;: NEXT X 80 LPRINT 90 InPRINT G$; 100 FOR X=1 TO 50: LPRINT B$;: NEXT X 110 LPRINT: NEXT R 120 LPRINT CE

  • 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

10
G$zCHR$(27>+"K"+CHR$(l00)+CHR(0)
2c3
A$=CHR$(
85
>
+(;EW$(
42
>
30
B$~~CHR$(42)tCMR$(85)
40
I,PRINT
CHR$(27)"1";
50
FOR
Rr-1
TO
3
60
LPRINT
G$;
70
FOR
X=1
TO
50:
L,PRINT
A$;:
NEXT
X
80
LPRINT
90
InPRINT
G$;
100
FOR
X=1
TO
50:
LPRINT
B$;:
NEXT
X
110
LPRINT:
NEXT
R
120
LPRINT
CE<R$(27)
"@"
Notice that the first line stores the whole graphics command in a
single string variable. In order to do this you must put plus signs
between the elements of the command. Once you have done this at
the beginning of the program, each time you enter LPRINT G$; you
have issued the graphics command. Lines 20 and 30 do the same thing
with the data used in this program. As you can see, the use of string
variables saves some typing even in this short program. In a long
program it can save you much more time and effort.
Graphics and low ASCII codes
Sending a few of the codes between 0 and 31 with BASIC or
another programming language can cause problems on some compu-
ter systems. The problem is that most computer systems handle some
of these codes in a special way instead of delivering them to the
printer.
For example, one computer system handles form feeds by itself. It
counts lines to keep track of the top of page. If a program sends the
ASCII code for form feed (12) to the printer, the computer system
intercepts it and sends instead the code for line feed (10) several times.
If you are in a graphics mode with this system and send a 12 to fire
pins 3 and 4, the computer system will intercept that 12 and send
several 10s instead. You can see how this would ruin your graphics.
You would get pins 2 and 4 (whose sum is 10) several times instead of
pins 3 and 4 only once.
If your computer system screens out or changes any codes sent to
it, you can often design around these problems by using other num-
bers with similar patterns, and you can see Appendix F for a method
to determine which codes may cause problems and for some ideas on
overcoming those problems.
89