3/ Using the TP-10
If you’re using the MC-10, the BASIC command to send information to the Printer is
If you’re using the TRS-80 Color Computer, the same command is
Before printing, the Printer checks to see if the code sent is an instruction (how to print) instead of data (to be printed). An instruction, for example, might tell the Printer to print same character or change the character size.
Consequently, some ASCII codes were created as instructions to control the Printer (and therefore are called “Control Codes”).
Your TP-10 recognizes 6 printer control codes and ignores or prints X for others.
To send an instruction to the Printer, use the function CHR$( ). Maybe you’re already familiar with this function used to create the graphics characters on the MC-10 or your Color Computer.
For example, to tell the Printer that you want it to perform a carriage return and a single line feed (ASCII 13), use the command:
LPRINT CHR$(13) (ENTER)
in a program line (or in the “immediate mode”) and the Printer will perform a carriage return/line feed.
Any ASCII code (control codes, as well as data) can be sent to the Printer this way. In Appendix A, we show you a chart of printable characters and graphics characters. For instance, Appendix A will tell you that the ASCII code for letter Z is 90. Thus
LPRINT CHR$(90) (ENTER)
will print the letter Z on the Printer. Or, if you use this command:
LPRINT CHR$(138) (ENTER)
a solid bar will be printed. See Table 2 in Appendix A. Sure enough, ASCII 138 is a solid bar.
Note: The graphics characters TP-10 will generate are exactly the same
as those of the MC-10. You can use the same ASCII codes as on the MC-10, but the
TP-10 prints in black and white only.
If you use a computer other than the MC-10, the computer may not be able to send
some codes. Refer to your computer owner’s manual.
The alphanumeric characters the TP-10 prints are composed of a 5 x 7 dot matrix.
Up to 32 characters can be printed in one line. The graphics characters are made
up of a 7 x 12 dot matrix, with 32 characters per line.
With one of the control codes, you can also elongate the characters to double
their normal width. So, the alphanumeric characters are printed in a 10 x 7 dot
matrix, and graphics characters are printed in a 14 x 12 dot matrix. Of course,
the number of characters per line decreases to half.
When the Printer receives a character code, it starts printing while receiving
the next code. When the Printer receives the 33rd character in normal character
width mode, the Printer automatically performs a carriage return and line feed
and starts printing at the beginning of the next line (this is called “Wrap-Around”).
If a line contains both elongated and normal characters, there may be cases
where the first “half” of a letter can be printed on the end of a line. Your
TP-10 is smart enough, though, that it performs a carriage return and line feed
before this letter is printed and, therefore, prints the entire letter at the
beginning of the next line.
It is important to note that all foreground colors on the TV screen will be
printed on the TP-10 in black. That is, if you send a “red” code to the
Printer, it will be printed in black. In the same sense, if you then send a “green”
code to the TP-10, it also will be printed in black. Background colors on the
screen are not printed on the TP-10.
The TP-10’s print head can print 7 dots vertically at a time. Even though
graphics characters consist of 12 dots vertically, the TP-10 is able to print
them by dividing these graphics characters into upper and lower halves.
The upper half is printed first, while the lower half is stored in memory.
When a carriage return or line feed code is received, or a wrap-around takes
place, the lower half is printed. Note: the TP-10 will not print the lower half
of graphics characters until it receives a carriage return or line feed code, or
a wrap-around takes place. For example, in this program:
90 LPRINT CHR$(138);
The carriage return is not sent because the line ends with a semicolon.
Therefore, the lower half of the graphics character will not be printed. When
you run the following program:
10 FOR N=128 T0 193
20 LPRINT CHR$ (N);
the lower halves of the graphics characters will not be printed. The guilty
party, once again, is the semicolon at the end of line 20. To avoid this
situation, either delete the semicolon, or add an “LPRINT” to the end of the
program. For instance, to the program above, add:
and complete graphics characters should be printed.