Star Micronics 4 Printer User Manual


 
Controlcodesmostlyhandlecommunicationsbetweenyourcomputerand
theprinteratthelowestlevel,atcablelevel.Forexample,acoupleofcontrol
codesmakesuretheprinterbuffer(yourprinter’sstoragememory)doesn’t
overflow. In this book we’ll indicate control codes enclosed by angle
bracketsto their abbreviationsin the table: =&I%-means the Form Feed
controlcode,whichadvancestheprinterto thenextpagejust as thePRINT
button.does.
1.2.4Escapesequences
Controlcode 27, cESG or Escape,is a particularlyimportantone for
printers.Totellyourprinterallthethingsyoumightneed- settingmargins,
sayingwhereto print, choosinga particularfont,startinggraphicsand so
on- requiresmanymorethanjusttwoorthreedozencontrolcodes.Sothe
<ESC> control code has a special meaning: <ESC> means “the next
characterspecifiesa command,notsomethingto beprinted”.
Thereforeif you sendjust the character4 to theprinterit willprinta4 and
that’sall. Butif yousendthecESC>codejustbeforethe4 thentheprinter
(in FX-850 mode)will switchoverto italicstext. Extendingthe control
codesthiswaygivesyoumanymorecommandsto controlyourprinter.In
fact,these“Escapesequences”makeupmostoftheStarLaserPrinter’skm-
guage.
In this bookwe’llleavespacesbetweencharacterswhen we showescape
sequences.You’llfind
<ESC>
(S@ IOh12vos 3T
a bit morereadablethan
<ESC>(sOp10h12vOs3T
Butrememberthatyouarenotto sendthosespacesif yousendcommands
to theprinter.
To sumup,printercommandsareoftwo types.A controlcodeis a single-
charactercommandthattellsyourprintertodo something,likemovedown
oneline.An Escapesequencecontrolsa printeroperationtoo,butis more
thanonecharacterlong.Sincetheyarecommands,neithercontrolcodesnor
escapesequencesareusuallyprintablecharacter.
8