Problems With Applesoft - Epson 8133 User Manual

New apple ii intelligent parallel interface
Table of Contents

Advertisement

120 PRINT "SUBSCRIPT";
130 PRINT 1$;"27<";1$;"84<";
140 REM TURN OFF SUBSCRIPT ESC T
150 PRINT "NORMAL"
lbO
PRINT DS;"PR£0"
��. : :
BUPERBCRXPTSUBBCRXPTNORMAL
Line 20 turns the printer on.
Line 50 issues the
<CTRL>·I
n>
command followed by the bit image
data. In this case n/12 because there are 12 hexadecimal bytes
following it. The first two of these bytes are
<ESC> and K which set
the normal bit image mode on the printer. All the remaining bytes are
used to fire the printer head pins to obtain the astrological symbol for
Venus.
Line 60 sets the line width.
Line 80 sends a series of single 8 bit decimal bytes, as described for
<CTRL>-1
n«:
In this case they form the sequence
<ESC> SO which
puts the printer in superscript mode.
Line 100 is similar, but selects subscript mode.
Line 130 turns off superscript and subscript modes, using
<CTRL>·I
n«.
PROBLEMS WITH APPLESOFT
11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
There are a number of bit image modes on Epson printers. The
only two which are standard on all models are normal and double
density. Normal density bit imaging is enabled using
<ESC> K, and
double density by
<ESC>
L. Double density means the dots overlap
and so give a sharper image, very much like condensed printing in text
mode. In each case the number of columns of dots must be sent as a
sixteen bit number with the MSB (most significant byte) followed by
the LSB (least significant byte). In practice this means carrying out a
calculation as follows:
36
Suppose the number of columns to be sent is
n.
Divide
n
by 256, and call the remainder
nt .
2
Divide n by 256 and take the integral part of the number. Call this n2.
3
The sequence to include in a PRINT statement is:
PRINT CHR$(27); "K"; CHR$(n1); CHR$(n2);
For example, suppose you wish to print 70 of the characters defined
above. This would require 70x5
=
350 columns. Following the
calculations as described above, you would find that nt
=
94 and n2
=
I.
The following program uses bit image mode to attempt to print 35
of these characters. In this case
nt
=
175 and n2
=
0. The program has
been written to illustrate problems and how to overcome them.
10 0$
=
· c HR$ 1131
+
CHRS (41
20 PRINT DS;"PR£ 1"
30 PRINT CHRS (91;"BON"
40 PRINT CHRS (27l;
1
K
1;
CHRS (91"175("; CHRS (01;
50 FOR
J
=
1 TO 35
bO
PRINT CHRS (121; CHRS (441;
70 PRINT CHRS (1271; CHRS 1441; CHRS (121;
BO
NEXT
J
90 PRINT D$;'PR£0'
If you examine the printout, you will see that there is an error after
the 26th character. You will also notice that the last character is not
printed correctly and there is a comma at the end of the line. These are
caused by two related problems.
37

Advertisement

Table of Contents
loading

Table of Contents