Star Micronics SB-10 Examples of decimal and hexadecimal codes, Decimal codes, Hexadecimal codes

Page 26

Most computers, printers, and peripheral devices understand specific types of codes known as ASCII codes. ASCII (pronounced “ask-key”) stands for the American Standard Code for Information

Interchange. This standard code provides a common ground for computers and related devices to “talk” to each other, and transfer

data in a way that each can understand. And though there is an ASCII code for each letter, number, and symbol that we use(please

see Appendices C and E) you will probably not need to know them

for your day-to-day applications. However, you will want to use ASCII codes to activate the special functions of your printer, so let’s take a closer look at how they work.

Each ASCII code is available in a number of different forms for

programmers and software writers, as well as for those of us whose

main applications are word processing and spreadsheets. For ex- - ample, the code for each different function can be entered in both

its decimal and hexadecimal forms, as shown in Table 2-l below.

Table 2-1. Examples of decimal and hexadecimal codes.

FUNCTION

DECIMAL CODE

HEXADECIMAL

CODE

Select

the Draft-

 

 

 

Quality

Mode

27 53

1B 35

I

Decimal codes

The decimal code is a common representation of ASCII codes, and is used mainly for writing programs in BASIC. Decimal codes

are so named because their values are expressed using the

decimal-or “base IO”-numbering system. Although you may not

need them very often, we have included the decimal codes for each

-

of the printer’s functions, and you can find them in Appendix A of this manual.

If you are writing in BASIC, you will notice that we also provide _ the complete BASIC command used to “capture” each decimal code using the character string function, or CHR$. (For an in-depth look

at programming in BASIC, please turn to Section 6.)

Hexadecimal codes

The name for the hexadecimal code comes from its expression

using the hexadecimal-or “base 16”-numbering system. Hexa- decimal codes are used mainly by assembly language programmers, but they can come in handy when you’re “installing” any one of the printer’s functions into your word processing program. For example, if you use any other form of ASCII code as you install the “activate

superscript” function into WordStar, your software will respond by

displaying on your screen the equivalent of the code in its hexa- decimal form. Then, comparing the hexadecimal va!ue on the screen

18

-

Image 26
Contents USER’S Manual Contents CREATlNG Letter-Quality LQ Mode Double-Strike Printing EmphasizedUnderlining Text Proportional Subscripts Vertical Tabs HorizontalInstallation Menu Installing Special Features Preventive Maintenance How to Clean the PrinterInstalling the PRlNTER Into Your Word Processing Word About140 111 115 125137 141Table of Tables Page Introduction Setting UP Your Printer Placement of the Printer Interior packing materialHOW to Assemble the Printer Loading the ribbon cassetteConnect the power cord to the printer Attach the cut sheet guideFeatures of the Printer Features of the printerControl Panel Busy LampDual IN-LINE Package DIP Switches Dual In-line Package DIP SwitchesSing/e-sheet loading Table.l-1 Slide positions for determining the left marginFigure l-8. Loading single-sheet paper Form-feed loading Figure l-10. Inserting form feed paper into the printerAdjusting the Print Head GAP For Thin Lightweight Paper Push the lever away from youHOW to Print the SELF-TEST 12. Adjust the print head gapConnect the Interface Cable to Your ComputerPage Memo Page Word PROCESS/A/GWITH the Printer AN Introduction to Ascii CodesHexadecimal codes Examples of decimal and hexadecimal codesDecimal codes Escape codes and Control codes Word Processing for ALL PurposesProviding Information to Your Word Processing Package Examples of escape and control codesBoldface and Emphasized printing modes Pitch size/characters per inchProportional spacing Page Page Getting the Most from Your Spreadsheet Package VisiCalc Setup Codes Various Draft-quality Pitch Sizes Their VisiCalc Setup CodesSupercalc VisiCalc print commandSuperCalc setup codes Lotus Options menu Lotus print commandsLotus Lotus l-2-3 setup codes for draft mode pitch sizes Page Exploring Print Features Emphasized Printing Another Effective Method Make a LETTER-QUALITY LQ ModeCodes for double-strike Printing Codes for underlining text Codes for emphasized printingUnderlining Text Proportional printingCodes for proportional printing DRAFT-QUALITY ModeVariety of Pitch Sizes Codes for the LQ and DQ modesElite pitch Pica pitchCodes used to activate pica printing He codes to activate condensed printing Codes used to activate elite printingCondensed pitch Codes for the macro instruction ~M311~NDG Features with the MacroInternational Character Sets Codes Used to activate International Character Sets DIP switch settings For the International Character SetsFor quite a while. But you won’t want to miss , where we’ll France Germany England Denmark= SwedenMemo Page Setting the Left and Right Margins Creating page FormatsSetting the left and right margins Choosing the page Length and Number of Lines PERAdjusting Line Spacing InchPrinting superscripts Subscripts Adjusting line spacingSuperscripts and Subscripts Horizontal Tabs Setting and using vertical tabsVertical Tabs Setting and using horizontal tabs Memo Page Programmng in Basic Word about MbasicExpanded print conversion chart Emphasized Double-strike printingUnderlined printing Ladies and GENTLEMEN, Start Your EnginesSuperscripts and subscripts Line spacing and reverse line feedLine spacing at 1/6th, 1/8th, and 1IlOth inch Page Basic Maintenance Procedures Exterior InteriorReplacing the Print Head Replacing the fuse in the printerKing the Printer for Correct Oper ElectricalConfiguration of DIP switches MechanicalPrinter prints over Itself without advancing the paper Memo