Star Micronics SB-10 user manual Programmng in Basic, Word about Mbasic

Page 55

SECTION

PROGRAMMNG IN BASIC

WHAT THIS SECTION SHOWS YOU:

*How to Use the Character String to Capture BASIC Commands

Gome Examples of Short Programs Utilizing Fea- tures of the printer

If you’re like most personal computer owners, you’ll probably use your printer primarily for printing your spreadsheet and word pro- cessing applications. But if you are interested in some of the more esoteric uses of your printer-such as high resolution graphics or printing while you’re writing a software program-you may want to experiment by putting it through its paces with BASIC.

nA WORD ABOUT MBASIC

The most common form of BASIC available today is Microsoft BASIC, or MBASIC. We’ve endeavored to provide you with a few programs that will run on most computers, and for this reason the programs listed here use the most elementary form of BASIC: MBASIC for 8-bit microcomputers. You will also be able to run these programs on 16-bit systems, such as the IBM PC and compatibles.

The character string (CHR$): If you’re familiar with BASIC, you’ll know that the character string command, CHR$, is used to “capture” escape and control codes such as those which control the printer. BASIC doesn’t understand an escape code or control code all by itself; but you can enter escape or control codes within the character string format. To do this, enter the decimal form of the code between the parentheses in CHR$( ). Here are a few examples of the printer’s features that can be programmed in BASIC:

Expanded type: The expanded type feature enlarges each of the pitch sizes to twice their normal widths. Try this program to see how it works:

Image 55
Contents USER’S Manual Contents Subscripts Vertical Tabs Horizontal Letter-Quality LQ Mode Double-Strike Printing EmphasizedUnderlining Text Proportional CREATlNGWord About Preventive Maintenance How to Clean the PrinterInstalling the PRlNTER Into Your Word Processing Installation Menu Installing Special Features141 111 115 125137 140Table of Tables Page Introduction Setting UP Your Printer Interior packing material Placement of the PrinterLoading the ribbon cassette HOW to Assemble the PrinterAttach the cut sheet guide Connect the power cord to the printerFeatures of the printer Features of the PrinterBusy Lamp Control PanelDual In-line Package DIP Switches Dual IN-LINE Package DIP SwitchesTable.l-1 Slide positions for determining the left margin Sing/e-sheet loadingFigure l-8. Loading single-sheet paper Figure l-10. Inserting form feed paper into the printer Form-feed loadingFor Thin Lightweight Paper Push the lever away from you Adjusting the Print Head GAP12. Adjust the print head gap HOW to Print the SELF-TESTComputer Connect the Interface Cable to YourPage Memo Page AN Introduction to Ascii Codes Word PROCESS/A/GWITH the PrinterDecimal codes Examples of decimal and hexadecimal codesHexadecimal codes Examples of escape and control codes Word Processing for ALL PurposesProviding Information to Your Word Processing Package Escape codes and Control codesProportional spacing Pitch size/characters per inchBoldface and Emphasized printing modes Page Page Getting the Most from Your Spreadsheet Package Various Draft-quality Pitch Sizes Their VisiCalc Setup Codes VisiCalc Setup CodesSuperCalc setup codes VisiCalc print commandSupercalc Lotus Lotus print commandsLotus Options menu Lotus l-2-3 setup codes for draft mode pitch sizes Page Exploring Print Features Codes for double-strike Printing LETTER-QUALITY LQ ModeEmphasized Printing Another Effective Method Make a Proportional printing Codes for emphasized printingUnderlining Text Codes for underlining textCodes for the LQ and DQ modes DRAFT-QUALITY ModeVariety of Pitch Sizes Codes for proportional printingCodes used to activate pica printing Pica pitchElite pitch Condensed pitch Codes used to activate elite printingHe codes to activate condensed printing International Character Sets ~M311~NDG Features with the MacroCodes for the macro instruction France Germany England Denmark= Sweden DIP switch settings For the International Character SetsFor quite a while. But you won’t want to miss , where we’ll Codes Used to activate International Character SetsMemo Page Creating page Formats Setting the Left and Right MarginsChoosing the page Length and Number of Lines PER Setting the left and right marginsInch Adjusting Line SpacingSuperscripts and Subscripts Adjusting line spacingPrinting superscripts Subscripts Vertical Tabs Setting and using vertical tabsHorizontal Tabs Setting and using horizontal tabs Memo Page Word about Mbasic Programmng in BasicEmphasized Double-strike printing Expanded print conversion chartLadies and GENTLEMEN, Start Your Engines Underlined printingLine spacing and reverse line feed Superscripts and subscriptsLine spacing at 1/6th, 1/8th, and 1IlOth inch Page Basic Maintenance Procedures Interior ExteriorReplacing the fuse in the printer Replacing the Print HeadElectrical King the Printer for Correct OperMechanical Configuration of DIP switchesPrinter prints over Itself without advancing the paper Memo