Printing User-Defined Characters

If you entered the example program above, you defined a capital A and placed it in the RAM location for ASCII decimal 65 (replacing the standard “A” ). You can now print out a three-line sample of your work. The first and third lines (printed by lines 200 and 280 of the program) print the normal A; the second line (line 240) prints the A that you defined.

This is the result.

A A A A A A A A A A A A A

AAAAAAAAAAAAA

A A A A A A A A A A A A A

As you can see, both sets of characters (the original ROM characters that the printer normally uses and the user-defined character set) remain in the printer available for your use. The command to switch between the two sets is used in lines 230 and

270.It is: <ESC> “%” n

If n is equal to 0, the normal ROM character set is selected (this is the default). If n is equal to 1, the user-defined character set is selected. If you select the user-defined character set before you have defined any characters, the command is ignored; the ROM characters will still be in use.

You may switch between character sets at any time-even in the middle of a line. To try it, place a semicolon at the end of lines 200 and 240 in the program above.

Copying ROM to RAM

After running the program above, if you select the user- defined character set and try to print other characters, the only one that will print is the capital A. Since no other characters are in the user-defined RAM area, nothing else prints. Other characters sent to the printer don’t even print as spaces; it’s as if they were not sent at all.

In many cases, you will want to redefine only a few of the characters to suit your needs; the rest of the alphabet will work fine as it is. As you have seen, it is possible to switch back and forth at will between the normal character set and the user- defined character set. It is, however, rather inconvenient.

58