Epson MX-70 User Manual page 54

Compusoft printer user manual
Table of Contents

Advertisement

Chapter 5
TRS-80 Model I:
10 LPRINT CHR$ (27) "K" CHR$ (50) CHR$ (2);
and RUN.
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.
5 0 P R I N T C H R $ ( 2 ^ I N T ( 3 . 4 * S I N ( 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
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
46
Figure 5-2
(Apple)
(Apple)

Advertisement

Table of Contents
loading

Table of Contents

Save PDF