User-defined Characters

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 line 180 and

200.It is:

ESC % n

If n is equal to 0, the normal ROM character set is selected. If R is equal to 1, the userdefined character set is selected. You can also select one of the two character sets with DIP switch 2-1. If you select the user-defined character set before you have defined any characters, the command is ignored and the ROM characters remain in use.

You may switch between character sets at any time, even in the middle of a line. To try this, place semicolons at the end of lines

170and 190 in the preceding program.

Copying ROM characters to RAM

After nmning the previous sample program, if you select the user- defined character set and try to print other characters, only the heart will print. Since no other characters are in the printer’s user- defined RAM area, other characters print as spaces.

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 user-defined character set. It is, however, rather inconvenient.

Therefore, your printer has a command that allows you to copy all of the standard characters from ROM to the user-defined character set.

The command format is:

ESC:O n 0

Software and Graphics 4-27