Epson LX-90 User Manual - Apple IIc 8699 PIC for LX-90 - Page 51

POKE Subroutine, Designing Your Own Graphics, RETURN

Page 51 highlights

POKE Subroutine Because the Apple IIc has special uses for certain low-numbered codes, such as 4 and 9, you should use the following subroutine in any graphics program that uses numbers below 20 decimal. 10000 IF PEEK (49305) < > 80 then 10000 10010 POKE 49304,N 10020 RETURN With this subroutine in your program, two commands will send any number to the printer: the first makes the number equal to N (for example, N = 222), and the second is GOSUB 10000. The program then uses the POKE in line 10010 to send the number to the printer. You can see how this subroutine works in the next program. If you use this subroutine and also turn DIP switch 2-2 on, you can send numbers between 128 and 255 decimal to the printer. See "Problem Codes" in Appendix E for more information. Designing Your Own Graphics This section takes you through the development of a graphics program. The example is not especially complicated, but it does include the same steps you would use for a more complex figure so that you have the basis for designing graphics on your LX-90. You should plan your figure with dots on graph paper, but before beginning to place the dots, you must decide which graphics density you want. Figure 7-3 shows the differences between the three mostused graphics modes so that you can choose the one you want. Single High-speed double Low-speed Double Figure 7-3. Designing in different densities 49

  • 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

POKE Subroutine
Because the Apple IIc has special uses for certain low-numbered
codes, such
as
4 and 9, you should
use
the following subroutine in any
graphics program that uses numbers below 20 decimal.
10000 IF PEEK (49305) < > 80 then 10000
10010 POKE
49304,N
10020 RETURN
With this subroutine in your program, two commands will send any
number to the printer: the first makes the number equal to N (for
example, N = 222), and the second is GOSUB
10000.
The program
then uses the POKE in line
10010
to send the number to the printer.
You can see how this subroutine works in the next program.
If you use this subroutine and also turn DIP switch 2-2 on, you can
send numbers between
128
and 255 decimal to the printer. See “Prob-
lem Codes” in Appendix E for more information.
Designing Your Own Graphics
This section takes you through the development of a graphics pro-
gram. The example is not especially complicated, but it does include
the same steps you would use for a more complex figure so that you
have the basis for designing graphics on your LX-90.
You should plan your
figure
with dots on graph paper, but before
beginning to place the dots, you must decide which graphics density
you want. Figure 7-3 shows the differences between the three most-
used graphics modes so that you can choose the one you want.
Single
High-speed
double
Low-speed
Double
Figure 7-3. Designing in different densities
49