Star Micronics 4111 manual Combining Escape sequences

Models: 4111

1 178
Download 178 pages 32.43 Kb
Page 50
Image 50

Two important details make PCL commands. First, all Escape sequences end with a capital letter. If you don’t make the last character uppercase, your printer won’t know when the Escape sequence ends and will treat following characters as part of the same command.

Second, in PCL commands each number or character you put after the <ESC? code is an actual ASCII symbol.

For example, the PCL command that sets the right margin to column 65 is:

<ESC> &a 65 M

which you would code in BASIC as:

10 LPRINT CHR$ (27):“&a65M”

That command sends your printer the symbols “6” a~d “5”, which its program interprets as the column number.

4.1.2 Combining Escape sequences

Later in this chapter we describe one way to select a font, by just specifying what font attributes you want, such as bold or proportional spacing. If you select a font by specifying every one of its attributes, you can be certain that you’re selecting successfully. But it could mean a fair bit of repetitive typing each time you choose a font. This applies to other commands too, notjust font selection.

Here’s a way you can save yourself a few keystrokes: type in those commands that have the same command-category prefix as just one long Escape sequence. To combine commands this way, type the <ESC> and command-category prefix just once, and capitalize only the last command character.

42

Page 50
Image 50
Star Micronics 4111 manual Combining Escape sequences