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

Graphics Mode, Pin Labels, PRINT CHR$27;K;CHR$nl;CHR$n2

Page 44 highlights

Graphics Mode The graphics mode command is quite different from the other commands covered so far in this manual. For most of the other LX-90 modes, such as emphasized and expanded, one ESCape code turns the mode on and another turns it off. For graphics, the command is more complicated because the code that turns on a graphics mode also specifies how many columns it will use. After the LX-90 receives this code, it interprets the next numbers as pin patterns and prints them on the paper. The LX-90 has several different graphics densities, but the first exercises keep things simple by using only one. The code for entering single-density graphics mode is ESCape "K" n1 n2. In BASIC the command is given in this format: PRINT CHR$(27);"K";CHR$(nl);CHR$(n2); ESCape "K" specifies single-density graphics, and the next two numbers (nl and n2) specify the number of columns reserved for graphics. The graphics command requires more than one number to specify how many columns to reserve because as many as 1920 columns are possible in graphics printing. Since the LX-90 doesn't use decimal numbers larger than 255, the graphics mode command uses two numbers for reserving columns. To figure the number of columns reserved, multiply the second number by 256 and add it to the first number. Since the command is set up for two numbers, you must supply two even if you only need one. When you need less than 256 columns, just make nl the number of columns you are reserving and make n2 a zero. Remember that you cannot use numbers greater than 127 unless you change DIP switch 2-2 and use the POKE subroutine. Pin Labels Once you put the printer into graphics mode and reserve the number of columns you want, your next step is to tell the print head which pins to fire in each column. There are 256 possible combinations of 42

  • 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

Graphics Mode
The graphics mode command is quite different from the other com-
mands covered so far in this manual. For most of the other LX-90
modes, such as emphasized and expanded, one ESCape code turns the
mode on and another turns it off. For graphics, the command is more
complicated because the code that turns on a graphics mode also spe-
cifies how many columns it will use. After the LX-90 receives this
code, it interprets the next numbers as pin patterns and prints them on
the paper.
The LX-90 has several different graphics densities, but the first exer-
cises keep things simple by using only one. The code for entering
single-density graphics mode is ESCape “K” n1 n2. In BASIC the com-
mand is given in this format:
PRINT CHR$(27);"K";CHR$(nl);CHR$(n2);
ESCape “K” specifies single-density graphics, and the next two num-
bers (nl and n2) specify the number of columns reserved for graphics.
The graphics command requires more than one number to specify
how many columns to reserve because as many as 1920 columns are
possible in graphics printing. Since the LX-90 doesn’t use decimal
numbers larger than 255, the graphics mode command uses two num-
bers for reserving columns.
To figure the number of columns reserved, multiply the second
number by 256 and add it to the first number. Since the command
is
set up for two numbers, you must supply two even if you only need
one. When you need less than 256 columns, just make nl the number
of columns you are reserving and make n2 a zero. Remember that you
cannot use numbers greater than 127 unless you change DIP switch
2-2 and use the POKE subroutine.
Pin Labels
Once you put the printer into graphics mode and reserve the num-
ber of columns you want, your next step is to tell the print head which
pins to fire in each column. There are 256 possible combinations of
42