Star Micronics Delta NEW Lprint Backspacedoes not, Lprint I===WORK Lprint Deletedoes not

Page 77

Special Features

65

Let’s analyze the program. Line 10 sets the line spacing to 7/72 of an inch so that the characters that we print will touch top to bot- tom. Lines 20-40 print 10 vertical line characters. Then line 60 sets one-direction printing and the vertical lines are printed again. Finally line 100 sends a form feed to advance the paper to the top of a new page, and then uses the master reset to restore Delta to the power-on condition.

Backspace and delete

Backspace (CHR$(8)) “backs up” the printhead so that you can print two characters right on top of each other. Each time Delta receives a backspace it moves the printhead one character to the left, instead of to the right. You can strike over multiple letters by sending more than one backspace code.

Delete (CHR$(127)) also “backs up” one character, but then it “erases” the previous character (it’s erased from Delta’s buffer, not from the paper).

The following program shows how these two codes work.

NEW

10 LPRINT "BACKSPACEDOES NOT";

20LPRINTCHR$(8)CHR$(8)CHR$(8);

30LPRINT 'I===WORK"

40LPRINT "DELETEDOES NOT";

50LPRINTCHR$(127)CHR$(127) CHR$(127);

60LPRINT "WORK"

Here is what this program will print:

EAC;t:::SF’ACE DOES WOV WORC:;

DELETE DOES WOKC,

The backspace codes in line 20 move the printhead a total of three spaces to the left so that the first part of line 30 will overprint the word “NOT”. The delete codes in line 50 “erase” the three letters in the word “NOT” so that it doesn’t even print.

The seven bit dilemma

Certain computers (most notably the Apple II) don’t have the capability to send eight bits on their parallel interface. They can only send seven bits. This would make it impossible for these

Image 77
Contents Delta User’s Manual @Copyright 1983 Star Micronics, Inc Special Message to the New Owner Delta User’s Manual Table of Contents Creating Your Own Characters Special Features Delta PrinterFormatting Your Output Getting It All Together Maintenance Appendix F Atari 400/800 Computers Appendix D TRS-60 ComputersAppendix E Osborne, Kaypro and CP/M Computers Appendix Character Style Charts Appendix DIP Switch SettingsAppendix Commodore VIC-20 Computers AppendixWarranty Inside Back Cover Command Quick Reference Consumer Response 309 DIP Switch Quick ReferenceDelta User’s Manual Serial busy protocols XONlXOFF Protocol ACK protocol IndexTables Xii Delta User’s Manual Closer Look Roll paper holder and holder shaft used only with roll Paper separator and paper guide used with roll paperPage Paper Selection and Loading Parallel interface connector the place where you hookLoading single sheets Delta User’s Manual Loading roll paper Delta User’s Manual Loading sprocket-feed paper Closer LookOpen the tractor covers to expose the sprocket teeth Figure I-10.Delta ready to run with sprocket-feed paper Bottom feeding Delta-15Delta User’s Manual Ribbon Installation Self-Test Closer Look Delta User’s Manual Getting Started With Delta Using Commercial Sojtware First, some terminology Getting Started With DeltaAscii Using Delta with word processors Using Delta with SuperCalcPage Getting Started With Delta Using this book without learning BasicEstablishing communications ListOPEN4,4 CMD4 List PRINT#4 CLOSE4 NEW NEW Lprint Testing RUNNEW LPRINTCHR$7 RUN CHR$ functionEscape Code NEW LPRINTCHR$27CHR$52 2$3LPRINT Testing RUNESC$=CHR$27 l@ LPRINTESC$ Some problem codesDelta User’s Manual Chapter Printing Text With Delta@ Lprint this is Elite Pitch Printing Print pitch CommandsLprint Condensedis the Narrowestpitch Lprint NOW WE are Back to Pica Pitch PrintingExpanded print LPRINTCHR$27W CHR$@NOW Were Back to NormalI s H153LPRINTCHR$14EXPANDEDELITE Pitch Print CommandsLprint NOW WE are Back to Unexpandedpica Printing Making Delta print darkerLprint this is DOUBLE-STRIKEPRINTING Print EmDhasis a CommandsItalic printing Italic CommandsSuperscripts and subscripts UnderJiningMixing modes Superscript Subscript commandsNEW Lprint Thisline Uses Build Instructionset Lprintelites Elite LPRINTPICA$ Pica LPRINTRESET.ALL$ Return LPRINTRESET.ALL$REGULAR.HEADING$= STRING$27,*+ Regular ReturnRepeatwith Italics Italics = False LPRINTROMAN$If Pica = False then LPRINTFOUR.DOT$ GOTO3590 If ENLARGED= True then LprintControl Code Function Here is the chart it producesPage Delta User’s Manual Line Spacing and Forms Control Changing Line Spacing This is what you will get Run the program again. Now the results will look like this Line spacing CommandsMoving down the page without a carriage return NEW Lprint LinenumberForm feed Forms ControlsChanging the Page Length Form length commandsLprint PAY to the Order Top and bottom margin commandsLineSpacingandFormsControl51 Control code SummaryESC Delta User’s Manual Formatting Your Output NEW Lprint ONECHR$9TWOCHR$9THREE CHR$9 Four Left and right margin commands One-shot tab command13@ Lprint Return 5B ENDLPRINTCHR$27P CHR$l@ CHR$Z@CHR$@ Control Code Function One-shot vertical tab commandNow hear this LChapter Initializing Delta Bell commandsPutting Delta to sleep Some Miscellaneous commandsPrinting to the bottom of the sheet Unidirectional printingPrinting Direction Lprint LprintNext Lprint I===WORK Lprint Deletedoes not NEW Lprint Backspacedoes notLprint Work Backspace and deleteEighth Bit controls Block graphics characters and special symbols3pl Lprint I II=11CHR$ICHR$9 4pI Next I Lprint Next J Macro control code International Character set commandsInternational character sets Macro instruction Commands Macro Lprint CHR$18 Pica StartdefinitionOFF Regularprint END MacroControl code Function Bell Disable bell Enable bell Reset Off-lineOn-lineDelta User’s Manual Creating Your Own Characters Dot Matrix Printing 000 0 eeeS&fee Rule I Download characters are seven dots high Defining Your Own CharactersRule 2 Dots cannot overlap Add up each column of dots 8WRONGCreating YourOwn Characters Assigning a value to your character Download character definition commandCharacter designs for the four card suits Figure Y-10. The attribute byte n2 for our heart character Next MPrinting Download Characters LPRINTCHR$27CHR$36CHR$@ DEFINTA-Z Next J Read X LPRINTCHR$XNext Lprint Return DECKCARD=X Next Card ReturnLPRINTSUIT$SUIT Proportkmal Characters Download Character dejfinition commands12@ Lprint CHR$BITS 138 Next Only Difference Is the way They Are Accessed Creating Your Own Characters Lprint DEF.DOWN.CHAR$ NUMERAL.BOT$NUM= CHR$ASCII+ 2 + CHR$ASCII+ Mixing Print Modes with Download Characters Utility Program Gosub 950RETURN Gosub 660 Return REM **** Display Menu for Edit Mode Summary