Epson MX-70 User Manual - Page 62

Rowdy Characters, For Experts Only

Page 62 highlights

Advanced Graphics Rowdy Characters Add the following lines: 1070 DATA 44,-12,8,-32,127 1080 DATA 39,-17,0,64,96,112,120,124,-12,127,124, 120,112,96,64 and RUN. Figure 6-4 Oops! There's trouble in River City. Fortunately, we've seen these same control code problems before. Hate to keep bringing this subject up, but it does disturb our use of the printer. We've seen codes 9 and 13 cause trouble on the Apple, and codes 0, 10, 11, and 12 cause trouble on the TRS-80. If we send them to the printer via CHR$, it interprets them as control codes instead of pin firing instructions. Unfortunately, that makes sense. Code 8 can also cause trouble since it means "delete the previous character sent to the printer and stored in its print buffer. " In line 1070 we tried to send a whole sequence of them, and on some computers the program blew up! For Experts Only The errors caused by these codes do not always occur, but it is best to avoid them if possible. Short of rewriting the program to circumvent these numbers, one way is to bypass the PRINT statement and POKE our graphic codes directly to the printer driver in the computer's memory. That memory address is 49296 (CO90 Hex) in the Apple, and 14312 (37E8 Hex) in the TRS-80 Model I (See appendices for examples of use). Other computer users can check their computer's technical manual for its printer driver memory address. The advantage of POKE over PRINT CHR$ in this specific situation is that it bypasses some of the nasty tricks we keep encountering with BASIC. The disadvantage is that indiscriminate POKEing can cause unbelievable software crashes. Unless you really understand POKES, best to live with the limitations inherent with your computer/printer combination, and avoid troublesome codes when possible. Model I users will need to use the POKES shown for this particular example. 55

  • 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

Advanced Graphics
Rowdy Characters
Add the following lines:
1070 DATA 44,-12,8,-32,127
1080 DATA 39,-17,0,64,96,112,120,124,-12,127,124,
120,112,96,64
and RUN.
Figure 6-4
Oops! There’s trouble in River City. Fortunately, we’ve seen these same
control code problems before. Hate to keep bringing this subject up, but it does
disturb our use of the printer.
We’ve seen codes 9 and 13 cause trouble on the Apple, and codes 0, 10, 11, and
12 cause trouble on the TRS-80. If we send them to the printer via CHR$, it
interprets them as control codes instead of pin firing instructions. Unfortunate-
ly, that makes sense.
Code 8 can also cause trouble since it means “delete the previous character
sent to the printer and stored in its print buffer.” In line 1070 we tried to send a
whole sequence of them, and on some computers the program blew up!
For Experts Only
The errors caused by these codes do not always occur, but it is best to avoid
them if possible. Short of rewriting the program to circumvent these numbers,
one way is to bypass the PRINT statement and POKE our graphic codes
directly to the printer driver in the computer’s memory. That memory address
is 49296 (CO90 Hex) in the Apple, and 14312 (37E8 Hex) in the TRS-80 Model I
(See appendices for examples of use). Other computer users can check their
computer’s technical manual for its printer driver memory address.
The advantage of POKE over PRINT CHR$ in this specific situation is that it
bypasses some of the nasty tricks we keep encountering with BASIC. The
disadvantage is that indiscriminate POKEing can cause unbelievable software
crashes. Unless you really understand POKE
S
, best to live with the limitations
inherent with your computer/printer combination, and avoid troublesome
codes when possible. Model I users will need to use the POKE
S
shown for this
particular example.
55