Epson P-80 User Manual

Page of 82
you can use a 2 or 3 for n
2
. A 2 in the second slot means reserve 2
groups of 256 dots (512) plus whatever is in the first slot and so on-up
to 3 times 256 (or 768) dots.
An easy way to determine the correct numbers for n
and n
is to
figure the maximum number of dots per line in the density you want
to use (480 in Single-Density and 960 in Double-Density), then use
that number to calculate the number of columns you need. For exam-
ple, if you want a line half a page wide in Double-Density, the maxi-
mum number of dots in that density is 960, so you will want to reserve
half that number of columns-480. To calculate the numbers for n
1
and n
that will reserve 480 columns, divide 480 by 256. The number
of times that 256 will go into 480 is the number to use for n
and the
remainder is the number to use for n,. Therefore, n
would be 1, and
n
would be 124.
If fact, you can have your program do the calculations for you with
the following format:
LPRINT CHR$(27)"L"CHR$(N MOD 256)CHR$(INT(N/256));
N is the total number of columns you want to specify. The BASIC
MOD (modulus) function calculates the value for n,, and the INT
(integer) function calculates the value for n
2
.
This format can be used with either graphics density and with any
value of N up to the maximum number of columns per line for that
density.
Labelling Elements
Once you put the printer into Graphics mode, your next step is to
tell the print head which elements to fire in each column. You do this
by sending numbers via the CHR$ function. Each number that you
send represents a unique combination of dots.
Since computers use the binary numbering system (0
and 1s only),
each element corresponds to the decimal equivalent of one bit in an 8-
bit binary number: 1, 2, 4, 8, 16, etc. (see Figure 6-l).
43