I

Two importantdetailsmakeLaserJetII commandsdifferentfromthe other printeremulations.First, all Escapesequencesend with a capitalletter. If youdon’tmakethelastcharacteruppercase,yourprinterwon’tknowwhen the Escapesequenceends and will treat followingcharactersas part of the same command.

Second,in LaserJetII commandseachnumbcrorcharacteryouput afterthe cESC> codeis an actualASCIIsymbol.Withtheothcremulations,usually any number you put after an <ESC> code identifiesa character in that position in the ASCIItable.

For example,the LaserJet11commandthatsets the rightmarginto column

65 is:

<ESC>&a 65 M

whichyou wouldcodein BASICas:

10LPRINTCHR$(27 ) ; “&a65M”

That command sends your printer the symbols “6” and “5,” which its LaserJet11programinterpretsas the columnnumber.

HowcvcrifyouwereusingEpsonEX-800emulation,thecommandthatsets the rightmarginlookslike this:

<ESC>Q 65

whichin BASICyou wouldwrite this way:

iO LPRINTCHR$(27) ; “Q”;CHR$(65)

Thatcommandsendsthepnntcr whatevercharacterhappensto be in ASCII position65. Your printer’sEpsonProgram,though,interpretsit only as a decimalnumbermeaningcolumn65.

Combining Escape sequences

Laterin thischapterwe describeonewayto selecta font,byjust specifying whatfont attributesyou want,such as bold or proportionalspacing.If you selecta fontby specifyingeveryoneof its attributes,youcanbe certainthat you’reselectingsuccessfully.Butitcouldmeana fairbitof repetitivetyping each time you choosea font.This appliesto othercommandstoo, notjust font selection.

52

Page 60
Image 60
Star Micronics 8 Series manual Combining Escape sequences