Epson MX-70 Printer User Manual


 
Chapter 5
TRS-80 Model I:
10 LPRINT CHR$ (27) "K" CHR$ (50) CHR$ (2);
and RUN.
Figure 5-2
Press CTRL-C or BREAK to stop. Very impressive.
Note that we are not printing the slash character (ASCII number 47); but
are positioning the dots one at a time. Line 50 of the “welcome program”
should now make sense. We see that to fire a single pin, we must send a power
of 2 down the line to the printer. Line 50 of the “welcome program” does just
that.
50 PRINT CHR$ (2^INT(3.4*SIN(I)+l)));
The entire expression to the right of the exponent sign chooses an appropriate
exponent for 2. The exponents determine which pin is fired, giving us a nice
sinusoidal curve. Math types love it.
Who Sez We Ain’t Got No Class?
Let’s put the printer through some “aerobic exercises” with this NEW
program:
9 PR #1
(Apple)
10 PRINT CHR$ (27) "A" CHR$ (7)
20
FOR R=l TO 3
30
PRINT TAB (10);
40
PRINT CHR$ (27) "K" CHR$ (14) CHR$ (0);
50 FOR N=l TO 14
60
READ D : PRINT CHR$ (D);
70
NEXT N : PRINT : NEXT R
80 PRINT CHR$(27) "2"
99 PR #0
(Apple)
46