Home

Delta User`s Manual

image

Contents

1. Chapter 8 Printing Dot Graphics In Chapter 7 you were introduced to a form of computer graphics you were able to actually define characters dot by dot In this chapter you ll learn to use the same principles to make Delta print whole pages of dot graphics We ll show you how to use dot graphics to create super download characters In addition you ll see how your Delta printer can be used as a graphics plotter This can have some practical business applications as well as cre ate some terrific computer art Comparing Dot Graphics with Download Characters A good understanding of dot graphics requires an under standing of how dot matrix printers work you may want to 100 Delta User s Manual review the first few pages of Chapter 7 The principles for dot graphics are the same as those for download characters There are some differences in the way they are implemented however While download commands can be used to define a character between four and eleven columns of dots wide dot graphics commands can be used to define a shape as narrow as one column of dots wide or as wide as 3264 dots on a Delta 15 There is no descender data with dot graphics graphics images are always printed with the top seven or eight pins of the print head depending on whether you have a 7 bit or 8 bit inter face if you re not sure which type of interface your computer has check the appendix for your computer So when do you
2. Star s engineers have given programmers a unique shortcut for program development though double density double speed mode Although this mode requires just as much memory and computing time as double density it prints at the same speed as normal density graphics Amazing you say Well it is until you know the secret Every other column of dots is ignored so the output is actually the same as normal density graphics The advantage is that you can write and debug your programs at dou ble speed then change to double density graphics for terrific out put If You Have Problems with BASIC You may write some graphics programs that look just right in the listing but the printouts aren t quite what you expected A common problem is that the BASIC interpreter in your computer is inserting a few of its own codes For instance if your program generates a CHR 13 as valid graphics data BASIC may follow it 118 Delta User s Manual with a CHR 10 Another problem arises with certain computers that replace horizontal tabs CHR 9 with a series of spaces CHR 32 A possible solution to these problems is to not use the bottom dot which has a value of 1 This way you will never produce an odd number hence you will never have a CHR 13 or CHR 9 This is why we used only six pins in our plotting program That s one solution to one problem You ll find more of each with specific information for your computer in the appropr
3. 3080 PI 3999 REM 3100 LPRINT Delta User s Manual CHR 27 CHR 66 CHR 2 CHR 27 CHR 66 CHR 3 CHR 27 CHR 69 CHR 27 CHR 79 CHR 27 CHR 71 CHR 27 CHR 72 CHR 27 CHR 45 CHR 1 CHR 27 CHR 45 CHR Q CHR 27 CHR 83 CHR Q CHR 27 CHR 83 CHR 1 CHR 27 CHR 84 NE NU ND RA RO PI NW 1 FALSE 9 RA EN NORMAL RA UN CO CONDENSED EL PI PICA CO CONDENSED EL ELITE PICA RA FALSE FALSE FALSE co ENLARGED e LPRINT RO LPRINT NU LPRINT NW 3110 GOSUB 3500 PRINT AS REQUIRED 3120 LPRINT EL 3139 GOSUB 3599 PRINT AS REQUIRED 3140 LPRINT PI PI TRUE 3150 GOSUB 3500 PRINT AS REQUIRED 3160 REM 3170 IF EN TRUE THEN LPRINT GOTO 3190 3189 LPRINT EN EN TRUE GOTO 3080 TRS 80 Computers 165 3199 IF UN TRUE THEN LPRINT GOTO 3219 2200 LPRINT UN UN TRUE GOTO 2070 3219 IF IT TRUE THEN LPRINT RA RETURN 3220 LPRINT TRUE GOTO 3969 3500 REM 3559 BL STRING 6 32 FD 3560 IF EM FALSE THEN LPRINT ABed GOTO 3610 3570 IF PI FALSE THEN LPRINT FD GOTO 3590 3580 LPRINT EM 3599 EN TRUE THEN LPRINT ELSE LPRINT BL 3600 RETURN 3619 REM 3629 IF EN TRUE THEN LPRINT RETURN 3630 LPRINT SP 3640 LPRINT SB
4. 5 REM DRIVER FOR TRS 89 III 10 AD 16571 20 FOR I TO 14 30 READ A POKE AD I A TRS 80 Computers 163 49 NEXT I 5 16422 187 60 16423 64 70 DATA 33 232 55 203 126 32 252 33 17 57 126 211 251 201 89 END And here is a version for the TRS 80 Model I G 5 REM DRIVER FOR TRS 89 I 10 AD 16571 20 FOR 1 9 TO 15 EN 39 READ A POKE AD I A 40 NEXT I 59 16422 187 69 16423 64 70 DATA 33 232 55 293 126 32 252 33 17 W 57 126 2 232 55 201 80 END Chart program 100 CLEAR 1000 110 GOSUB 1000 120 GOSUB 2000 139 LPRINT REGULAR 140 GOSUB 3099 150 LPRINT X DOUBLE STRIKEX 169 LPRINT DS 170 GOSUB 3999 180 LPRINT EMPHASIZED 199 EM TRUE 200 GOSUB 3000 219 LPRINT DOUBLE STRIKE amp EMPHASIZED 220 LPRINT DS EM 230 GOSUB 3000 249 END 1009 REM 1969 IT CHR 27 CHR 52 1979 RO CHR 27 CHR 53 1989 REM 1090 EN CHR 27 CHR 87 CHR 1 1100 NW CHR 27 CHR 87 CHR P 111 PI CHR 27 CHR 66 CHR 1 164 1129 EL 1130 CO 1149 REM 1159 EM 1160 NE 1170 DS 1180 ND 1199 UNS 1200 NUS 1219 SP 1220 SB 1230 NS 1249 RA 1250 RA 1269 REM 1279 TRUE 1299 RETURN 2000 REM 2959 LPRINT 2969 LPRINT 2079 LPRINT 2989 LPRINT 2090 LPRINT 2100 LPRINT 2119 LPRINT 2129 LPRINT 2139 LPRINT 2149 LPRINT 2159 LPRINT 2169 RETURN 3000 REM 3959 IT 3060 UN FALSE 3070 EN
5. 55g DATA 11 9 0 0 0 0 0 0 64 36 88 32 16 569 DATA 11 0 2 9 8 88 6 32 64 56 64 60 2 14 0 0 5 10 5 8 4 72 4 9 38 89 6 73 4 8 6 0 579 DATA 11 580 DATA 11 590 REM FIVE p gt 600 DATA 11 9 9 0 0 64 32 84 59 76 34 68 1 610 DATA 19 34 68 34 68 34 68 2 68 2 0 0 1 629 DATA 19 9 32 24 191 24 97 9 64 9 64 9 630 DATA 11 64 0 96 1 48 15 48 15 16 15 0 649 REM SIX 65 DATA 11 0 96 0 112 0 120 0 92 0 102 0 669 DATA 11 98 0 98 0 98 0 70 0 14 0 6 679 DATA 11 7 8 23 8 55 8 99 0 65 9 6 689 DATA 11 9 96 9 112 1 62 1 39 1 14 9 Ee 699 REM SEVEN 700 DATA 11 0 16 8 6 8 6 8 6 8 6 8 719 DATA 9 79 8 192 8 54 8 6 9 2 9 9 3 720 DATA 11 0 64 0 96 0 120 0 124 0 30 1 730 DATA 9 6 1 0 0 0 0 0 0 0 0 0 749 REM EIGHT 750 DATA 11 9 9 0 9 24 36 24 192 24 192 9 769 DATA 11 67 67 9 99 28 34 28 34 28 9 4 770 DATA 11 14 18 44 19 108 19 96 1 64 0 64 pues 780 DATA 11 0 96 1 112 15 48 15 16 14 0 0 1 799 REM NINE oe 80 DATA 11 0 0 120 4 120 6 120 6 0 3 0 810 DATA 11 3 0 2 0 67 4 123 4 122 4 120 820 DATA 11 48 0 56 0 113 0 99 0 99 0 99 83 DATA 11 9 115 9 57 9 31 9 15 9 7 9 840 REM SPACE 850 DATA 11 0 0 0 0 0 0 0 0 0 0 0 gs 65 1 38 8 Download utility program 4 CLEAR 1000 5 ME E DIT P RINT Q UIT 6 BL STRING 63 10 DIM 7 8 12 11 20 CLS GOSUB 660 20 CS SC CHR 143 SS A INKEY IF A THEN 49 50 IF A Q THEN CLS END 69 IF A P THEN GOSUB 680 00 0 40 79 IF A E THEN CLS GOS
6. bit interface o auto line feed bo 2 N Z Applesoft BASIC The Apple II computer using Applesoft BASIC does not 144 Delta User s Manual Apple Parallel Cable Apple Board Function Function 25 SIG GND 1 SIG GND 26 SIG GND 2 SIG GND 27 SIG GND 3 SIG GND 1 STROBE 4 STROBE 28 SIG GND 5 2 DATA1 6 DATA1 3 DATA2 7 DATA2 4 DATA3 8 DATA3 5 DATA4 9 DATA4 6 DATA5 10 DATA5 7 DATA6 11 DATA6 8 DATA7 12 DATA7 9 DATA8 13 DATA8 10 ACK 14 ACK 29 SIG GND 15 SIG GND have different types of PRINT statements for the screen and printer You must add commands to your programs that direct the output of the PRINT statements to the printer To direct output to the printer with the interface board in slot 1 you must use the PR 1 command Depending on the version of Applesoft BASIC that you are using this command can take various forms It is usu ally one of the following 10 PRF 1 or 1 PRINT lt Ctrl D PRf1 or 10 PRINT CHR 4 PR 1 To return output to the screen the command is PR O in the same form that works for PR 1 To allow line lengths longer than the Apple II usually uses you must add the following statement to your programs 20 PRINT CHR 9 255N Apple II Computers 145 This allows lines of any length to be sent to the printer and is especially important for dot graphics The number 255 in the BASIC statement above could b
7. 1 64 MASK 4 8 1020 MASK 2 32 MASK2 5 4 156 Delta User s Manual 1030 MASK 3 16 MASK 6 2 1040 LX 20 LY 29 1050 XFAC 72 LX YFAC 87 LY 2000 REM PLOT CURVE 2919 RAD 9 2020 X1 19 Y1 10 2030 FOR ANG TO 360 STEP 10 2949 R1 ANG 6 28 369 2050 X2 RAD COS R1 19 Y2 RAD SIN R1 19 2060 GOSUB 4999 2070 NEXT ANG 2000 REM SEND BIT IMAGE TO PRINTER 3995 PR 1 2006 PRINT CHR 9 gN 3919 PRINT CHR 27 A CHR 6 2020 FOR ROW 0 TO 14 3022 3050 FOR COL 1 TO 75 3969 A CHR BIT COL ROW 2070 NEXT COL 2080 PRINT CHR 27 K CHR 75 CHR 9 A 3090 NEXT ROW 2100 PRINT 3192 PR 0 3239 END 4000 REM DRAW A LINE FROM X1 Y1 TO X2 Y2 4010 XL X2 X1 YL Y2 Yl 4929 NX ABS XL XFAC NY ABS YL YFAC 2030 IF NX NY THEN NX NY 4949 NS INT NX 1 4959 DX XL NS DY YL NS 4969 FOR I 1 TO NS 4070 X1 X1 DX 1 Yl DY 4080 GOSUB 5000 4090 NEXT I 4100 RETURN 5000 REM PLOT A POINT X1 Y1 5010 XX X1 XFAC YY Yl YFAC 5020 COL INT XX 1 5020 ROW INT YY 6 5040 XIT INT YY 6 ROW 1 5042 POKE 259 BIT4 COL ROW 5044 POKE 251 MASK XIT 5046 CALL 24576 Apple II Computers 157 5059 BITZ COL ROW PEEK 252 5060 RETURN Pie chart program 4 HOME 5 PRINT PLEASE STAND BY 19 A 768 20 FOR I TO A 12 30 READ 3
8. 6 32 FOUR DOT 3560 IF EMPHASIZED FALSE THEN LPRINT ABed GOTO 361g 3570 IF PICA FALSE THEN LPRINT FOUR DOT GOTO 3590 L 3589 LPRINT EMPHASIZED ABed 3599 IF ENLARGED TRUE THEN LPRINT ELSE LPRINT BLANK 3600 RETURN 3619 REM 3620 IF ENLARGED TRUE THEN LPRINT RETURN 2630 LPRINT SUPERSCRIPT Xx 1 3649 LPRINT SUBSCRIPT Yy US E 3650 LPRINT NOT SCRIPTED 3660 RETURN Special character chart program i 10 FOR J 16 TO 255 STEP 8 2 FOR I J TO J 7 es 30 LPRINT I s CHR 1 NEXT LPRINT NEXT Macro program 19 LPRINT CHR 27 29 LPRINT CHR 18 N 30 LPRINT CHR 27 W CHR 9 20 LPRINT CHR 27 F 59 LPRINT CHR 27 H 69 LPRINT CHR 27 CHR 9 79 LPRINT CHR 27 89 LPRINT CHR 27 5 99 LPRINT CHR 39 Bridge hand program d 10 WIDTH LPRINT 255 29 GOSUB 1999 39 GOSUB 2999 49 GOSUB 3000 50 GOSUB 4999 69 END 1999 REM 1929 DIM HAND 4 DECK 52 CARD 13 SUITS 3 1030 CARD 1 2 CARD 2 3 CARD 3 d 4 CARD 4 5 CARD 5 6 182 Delta User s Manual 1040 CARD 6 7 CARD 7 8 CARD 8 9 CARD 9 1g 1050 CARD 19 J CARD 11 Q CARD 12 K CARD 13 1960 SUIT S SUIT 1 H SUIT 2 D SUIT 3 C 1070 INPUT Random number seed I 198PRANDOMIZE I 1999 RETURN 2000 REM 2010 LPRINT CHR 27 CHR 68 CHR 29 CHR 49 CHR 9 2020 LPRINT CHR 27 CHR 43 CHR
9. 2080 NEXT ANG RAD SIN RANG 19 2000 Plot curve 2010 Xi Q Yi 19 X2 20 Y2 19 GOSUB ex 4009 5 2020 X1 19 Y1 X2 19 Y2 20 GOSUB 4909 2030 Xi Y1 19 FOR X2 0 TO 20 STEP 2 204g Y2 19 9 SIN 3 14159 X2 19 GOSUB 4999 2050 NEXT X2 Printing Dot Graphics 111 Using Delta for business graphics You don t have to be a mathematician scientist or computer hacker artist to use Delta s graphics capabilities It can be used for business graphics too line graphs bar charts pie charts and more There are many commercially available graphics programs that support Delta s graphics And of course you can write your own To get you started we ve written a program that prints a pie chart Here it is 19g PIECHART 119 ESC CHR 27 LF CHR 19 129 FF CHR 12 VTAB CHR 11 139 EMPHASIZED ESC E NOT EMPHASIZED ESC 1000 Set program constants 1010 OPEN LPT1 AS 1 WIDTH 1 255 1020 DIM BIT 199 36 A 36 PCT 25 TEXT 42 PIECETEXT 25 64 1030 MASK 1 MASK 4 8 1040 MASK 2 32 MASK 5 4 1050 MASK 3 16 MASK 6 2 1060 LX 20 LY 29 1070 LXFAC 199 LX LYFAC 216 LY 1080 FOR I 1 TO 42 1090 TEXT I 5 80 1100 NEXT 1110 GOSUB 7000 2000 Plot curve 2010 RAD 9 2020 X1 19 Y1 10 2030 PRINT 2949 FOR ANG TO 360 STEP 5 205
10. CHR 27 CHR 42 CHR 1 DP CHR 27 CHR 88 CHR 1 59 ND 69 L7 CHR 27 CHR 49 112 CHR 27 CHR 59 79 FOR Ni 169 TO 200 89 LPRINT DD 168 Delta User s Manual 99 LPRINT CHR N1 100 READ 2 110 LPRINT CHR N2 129 FOR S 1 TO 11 139 READ MS 140 LPRINT CHR MS 150 NEXT 5 160 NEXT 1 180 AS 169 190 FOR NUM TO 9 200 NT NUM CHR AS CHR AS 1 210 NB NUM CHR AS 2 CHR AS 3 220 AS AS 4 230 NEXT NUM 249 BK CHR 299 259 LPRINT DP L7 260 FOR NUM 0 TO 9 270 LPRINT NT NUM BK 280 NEXT NUM 290 LPRINT 390 FOR NUM TO 9 310 LPRINT NB NUM BK 329 NEXT NUM 230 LPRINT ND 1 12 340 REM ZERO 250 DATA 11 0 96 16 104 16 44 30 14 0 2 1 260 DATA 11 2 1 2 1 6 8 38 88 32 88 32 379 DATA 11 3 14 19 14 51 0 96 0 96 0 96 380 DATA 11 0 32 0 48 0 28 3 14 3 4 3 399 REM ONE 400 DATA 11 9 9 9 9 9 4 9 4 9 4 126 410 DATA 9 14 114 14 112 14 2 0 0 0 0 0 420 DATA 11 64 0 64 0 64 0 64 32 80 47 80 439 DATA 9 47 80 47 64 0 64 0 64 0 0 0 449 REM TWO 459 DATA 11 9 2 9 9 2 14 16 14 0 6 g 469 DATA 11 3 0 3 0 70 56 70 56 4 24 0 470 DATA 11 64 0 64 32 64 22 80 22 80 20 64 480 DATA 11 44 64 38 65 34 65 32 80 32 88 9 490 REM THREE 500 DATA 11 0 0 0 0 0 0 4 2 4 2 4 510 DATA 11 34 84 34 92 34 76 34 68 2 64 0 520 DATA 11 16 9 48 0 56 64 48 64 32 64 32 530 DATA 11 64 32 64 48 9 54 9 22 9 6 1 549 REM FOUR TRS 80 Computers 169
11. Delta to a serial interface on the IBM IBM PC Serial Cable Pin No Function Pin No Function TRANSMIT DATA RECEIVE DATA RECEIVE DATA TRANSMIT DATA REQUEST TO SEND CLEAR TO SEND CLEAR TO SEND REQUEST TO SEND SIGNAL GROUND SIGNAL GROUND CARRIER DETECT REQUEST TO SEND DATA TERMINAL READY DATA SET READY BASIC programing All the programs in this book are written in the BASIC used by the IBM PC That makes it easy to do the things that we show you But when you start writing your own programs there are several things that you should know IBM BASIC defaults to a printer width of 80 This means that it will automatically insert a carriage return and line feed after every 80 characters If you want to print lines longer than 80 char acters you will need to change the width of the printer If you set the printer width to 255 then the IBM will never insert a line feed and carriage return unless you start a new line This is what you want usually To set the width of the printer to 255 use this state ment 100 WIDTH LPT1 255 142 Delta User s Manual IBM BASIC has one other little trick that will mess up your graphics if you let it IBM BASIC is very insistent about adding a line feed to a carriage return This is fine if you are printing text but ifan ASCII 13 pops up in the middle of your graphics printout IBM BASIC will still add a line feed to it This will put strange things in the middle of your graphics and le
12. INT YY 6 4040 XIT INT YY 6 ROW 1 4050 BIT COL ROW BIT COL ROW OR MASKZ XITZ 4969 RETURN Pie chart program 49 CLS 45 PRINT PLEASE STAND BY 29 CLEAR 19999 10 PIECHART 119 ESC CHR 27 LF CHR 19 129 FF CHR 12 VT CHR 11 130 EM ESC E NE ESC F 1000 Set program constants 1929 DIM 190 36 36 25 TXT 42 PXT 25 1030 MASK 1 128 MASKZ 4 16 1949 MASK 2 64 MASK2 5 8 1050 MASK 3 32 MASK 6 4 1960 LX 20 LY 29 197 XFAC 199 LX YFAC 216 LY 1080 FOR I 1 TO 42 1085 REM THERE ARE 89 SPACES TXT I 1090 TXT I 80 spaces 119 NEXT 1110 GOSUB 7000 1129 CLS PRINT THIS PROGRAM TAKES ABOUT 5 MINUTES TO RUN 1130 PRINT SO TURN ON YOUR PRINTER AND STAND 200g Plot curve 2010 RD 9 2020 X1 19 Y1 19 2940 FOR ANG TO 369 STEP 5 2050 RANG ANG 6 28 369 2060 X2 RD COS RANG 19 Y2 RDXSIN RANG 10 2079 GOSUB 4999 2080 NEXT ANG 2090 FOR PIE 1 TO NP 174 Delta User s Manual 21 00 X1 19 Yl 19 2110 TP TP PCT PIE 2120 260 4 01 2139 RANG ANG 6 28 369 2149 X2 RD COS RANG 19 Y2 RD SIN RANG 19 2150 GOSUB 4000 2160 GOSUB 6000 2170 NEXT PIE 2000 SEND BIT IMAGE MAP TO PRINTER 3020 FOR ROW 0 TO 35 3030 A ROWZ 2040 FOR COL 1 TO 199 2045 MM BIT COLZ ROWZ 2047 IF MM 12 THEN MM 149 3050 AS ROWZ A R
13. MM I NEXT I 839 LPRINT CHR 27 CHR 1 CHR N1 CHR N2 MM 849 IF AN N THEN LPRINT CHR 27 CHR 1 GOTO 860 859 LPRINT CHR 27 X CHR 1 869 FOR 1 1 TO 29 LPRINT CHR N1 NEXT I LPRINT 879 LPRINT CHR 14 FOR 1 1 TO 19 LPRINT CHR N1 NEXT I LPRINT CHR 29 889 LPRINT CHR 15 FOR I 1 to 2 LPRINT CHR N1 s NEXT I LPRINT CHR 18 899 IF AN N THEN LPRINT CHR 27 CHR 9 GOTO 919 99g LPRINT CHR 27 X CHR Q 919 LPRINT CHR 27 Q MM z RETURN REM END OF PRINT MODEXX 920 IF Z G H THEN PRINT FNLOCATE X 3 Y 6 939 IF Z G H 1 THEN PRINT FNLOCATE X 3 Y 6 SC 949 RETURN 950 IF Z G H 1 THEN PRINT FNLOCATE X 3 Y 6 55 969 IF Z G H THEN PRINT FNLOCATE X 3 Y 6 CS 97g RETURN 209g PRINT FNLOCATE 29 1 STRING 59 2010 RETURN Delta Plot program 19 PRINT CHR 26 PRINT PRINT PRINT 39 PRINT THIS PROGRAM TAKES ABOUT TWO 49 PRINT MINUTES TO RUN PLEASE TURN 50 PRINT ON YOUR PRINTER AND STAND BY 188 Delta User s Manual 100 REM DELTA PLOT 110 DIM BIT 76 14 1000 REM SET PROGRAM CONSTANTS 1010 MASK 1 128 MASK 4 16 1020 MASK 2 64 MASK 5 8 1030 MASK 3 32 5 6 4 u 1040 LX 20 LY 29 1050 XFAC 72 LX YFAC 87 LY 2000 REM PLOT CURVE 2010 RAD 9 2020 X1 19 Y1 19 2030 FOR ANGZ TO 260 STEP 10 2040 1 0 6 28 260 2050 X2 RADXCOS R1 19 Y2 RAD SIN R1 19 2060 GOSUB 40
14. OR PROPORTIONAL N P AN 700 IF AN N THEN PR g GOTO 750 710 IF AN P THEN 739 729 PRINT CHR 7 GOTO 699 730 VTAB 21 HTAB 2 PRINT ST VTAB 21 HTAB 2 735 INPUT PROPORTIONAL DATA 4 11 PR 749 IF PR 4 OR PR gt 11 THEN 739 759 VTAB 21 HTAB 2 PRINT ST VTAB 21 HTAB 2 755 INPUT SHIFTED DOWN 1 ELSE ENTER g SH 760 IF SH g OR SH gt 1 THEN PRINT CHR 7 GOTO 759 770 VTAB 21 HTAB 2 PRINT ST VTAB 21 HTAB 2 775 INPUT ENTER YOUR ASCII 33 126 AS 789 IF AS 33 OR AS gt 126 THEN 770 785 VTAB 21 HTAB 2 PRINT ST VTAB 23 HTAB 38 799 IF SH 1 THEN SH 16 800 AS N2 PR SH 810 FOR I 1 TO 11 MM MM CHR MM I NEXT I 815 PR 1 816 PRINT CHR 9 255N 820 PRINT CHR 27 CHR 1 CHR 1 CHR 2 825 THEN PRINT CHR 27 CHR 1 GOTO 830 827 PRINT CHR 27 X CHR 1 820 FOR I 1 TO 29 PRINT CHR N1 NEXT I PRINT 849 PRINT CHR 14 FOR I 1 TO 10 PRINT CHR N1 NEXT I PRINT 850 PRINT CHR 15 FOR I 1 20 PRINT CHR N1 NEXT I PRINT CHR 18 860 IF N THEN PRINT CHR 27 CHR 0 GOTO 870 865 PRINT CHR 27 X CHR 0 870 PRINT CHR 27 MM RETURN 90 X 1 Y 1 G 1 H 1 901 HOME 992 FOR I 2 TO 16 STEP 2 VTAB I HTAB 5 FOR J 1 23 PRINT NEXT J PRINT NEXT I 994 FOR J 3 TO 16 S
15. Yy 05 3659 LPRINT NS 3660 RETURN Special character chart program 19 FOR J 169 TO 255 STEP 8 29 FOR I J TO J 7 30 LPRINT I CHR I CHR 9 NEXT I LPRINT NEXT J Macro program 19 LPRINT CHR 27 START DEFINITION OF MACRO 29 LPRINT CHR 18 39 LPRINT CHR 27 W CHR 9 49 LPRINT CHR 27 F 59 LPRINT CHR 27 H 69 LPRINT CHR 27 CHR 9 79 LPRINT CHR 27 T OFF 89 LPRINT CHR 27 5 99 LPRINT CHR 39 END MACRO DEFINITION PICA EXPANDED OFF EMPHASIZED OFF DOUBLE STRIKE OFF UNDERLINE OFF SUPER amp SUBSCRIPT Bridge hand program 20 GOSUB 1999 39 GOSUB 2000 49 GOSUB 2000 50 GOSUB 2000 166 Delta User s Manual 70 END 1000 REM INITIALIZE VARIABLES 1010 DIM HA 4 DE 52 CA 13 SU 3 1020 1 2 CA 2 3 CA 3 4 1939 CA 4 5 CA 5 6 CA 6 7 1040 CA 7 8 CA 8 9 CA 9 19 1050 CA i1g s J CA 11 Q CA 12 K CA 13 A 1969 SU 2 S SU 1 s H SU 2 D SU 3 nen 1070 RETURN 2000 REM INITIALIZE PRINTER 2010 LPRINT CHR 27 CHR 68 CHR 29 40 CHR 9 2020 LPRINT CHR 27 CHR 43 CHR 27 CHR 36 CHR 9 CHR 27 CHR 69 CHR 39 2030 LPRINT CHR 27 CHR 42 CHR 9 2040 FOR 1 1 TO 4 2050 LPRINT CHR 27 CHR 42 CHR 1 2060 FOR J 1 TO 13 2070 READ X LPRINT CHR X 2080 NEXT J 2099 NEXT I 2100 LPRINT 21
16. use graphics and when do you use download characters Practically anything you can do with graphics you can do with download characters and vice versa A clever pro grammer could actually plot a mathematical curve using download characters or use strings of graphics data as user defined characters But why do it the hard way There are several instances when dot graphics is clearly the best way to approach the problem If the graphic image to be printed is wider than 11 dots or higher than 7 dots If an image is to be printed just one time as opposed to a fre quently used text character If you want higher resolution Delta can print as many as 240 dots per inch in dot graphics mode text mode which includes download characters prints 60 dots per inch Using the Dot Graphics Commands The command to print normal density 60 dots per inch hori zontal 72 dots per inch vertical dot graphics uses this format CESC n2 mi m2 Just like many of the other codes you have learned the com mand starts with an escape sequence 5 in this case But unlike Delta s other codes there can be any number of graph ics data bytes following the command That s where n1 and n2 come in they are used to tell Delta how many bytes of graphics data to expect Printing Dot Graphics 101 Specifying the number of columns of dots To figure the values of n1 and n2 you ll need to figure out how wide you
17. 0 NB NU 225 AS AS 239 FOR NU 0 TO 9 CHR AS CHR AS 1 CHR AS 2 CHR AS 3 4 W M NEXT NU 249 BL CHR 73 259 269 270 280 290 300 319 329 339 349 359 369 379 389 399 49g 410 420 430 440 459 460 470 489 490 500 510 520 539 549 550 560 579 28g 590 69g 619 PRINT DP L7 FOR NU TO 9 PRINT NT NU BL NEXT NU PRINT FOR NU TO 9 PRINT NB NU BL NEXT NU PRINT CP L12 REM ZERO DATA 11 9 96 16 104 16 44 30 14 9 2 1 DATA 711 2 1 2 1 6 8 28 88 32 88 32 DATA 11 3 12 19 12 51 0 96 0 96 0 96 DATA 11 9 32 9 48 9 28 3 12 3 4 3 REM ONE DATA 11 0 0 0 0 0 4 0 4 0 4 126 DATA 9 12 114 12 114 12 2 0 0 0 0 0 DATA 11 64 0 64 0 64 0 64 32 80 47 80 DATA 9 47 80 47 64 0 64 0 64 0 0 0 REM TWO DATA 11 0 0 0 0 0 12 16 14 0 6 0 DATA 11 3 0 3 0 70 56 70 56 4 24 9 DATA 11 64 0 64 32 64 32 80 32 80 40 64 DATA 11 44 64 38 65 34 65 32 89 32 88 9 REM THREE DATA 11 0 0 0 0 0 0 4 2 4 2 4 DATA 11 34 84 34 92 34 76 34 68 2 64 9 DATA 11 16 9 48 9 56 64 48 64 32 64 32 DATA 11 64 32 64 48 9 54 9 22 9 6 1 REM FOUR DATA 11 0 0 0 0 0 0 64 36 88 32 16 DATA 11 9 9 64 32 64 56 64 69 2 12 9 DATA 11 0 8 4 10 5 10 5 8 4 72 4 DATA 11 88 38 89 38 89 6 73 4 8 6 9 REM FIVE DATA 11 0 0 0 0 64 32 84 50 76 34 68 DATA 19 34 68 34 68 34 68 2 68 2 0 9 152 629 63g 649 659 669 670 689 699 799 719 729 739 749 759 769 779 789 799 899 819 820 8
18. 0 RANG ANGZX 6 28 369 2060 X2 RAD COS RANG 1 Y2 RAD SIN RANG 19 2079 GOSUB 4999 112 Delta User s Manual 2080 NEXT ANG 2090 FOR PIECE 1 TO NUMBER PIECES 2100 X1 19 Yl 19 2119 TOTAL PCT TOTAL PCT PCT PIECES 2120 ANGZ Z69 TOTAL PCTZ f1 2130 RANG ANG 6 28 360 2140 X2 RADXCOS RANG 19 Y2 RADXSIN RANG 19 2150 GOSUB 499g 2160 GOSUB 6000 2170 NEXT PIECEZ 3000 Send bit image map to printer 3010 PRINT 3020 FOR ROW TO 35 3030 A ROWZ 3949 FOR COL 1 TO 199 3050 A ROWZ 3060 NEXT COLZ 3070 PRINT CHR 176 CHR 176 2080 NEXT ROWZ 3090 PRINT 3991 PRINT 1 SPACE 4Q LEN TITLE 2 EMPHASIZED TITLE NOT EMPHASIZED LF 2100 PRINT 1 VTAB VTAB VTAB 3119 PRINT 1 ESC A CHR 6 3129 PRINT 1 TEXT 1 LF TEXT 2 LF TEXT 3 LFS 3130 FOR ROW 0 TO 35 3149 PRINT 1 ESCH K CHR 199 CHR 9 3159 PRINT 1 A ROW 3160 PRINT 1 TEXT ROW 4 LF 2170 PRINT CHR 176 CHR 176 3189 NEXT ROW 3199 PRINT 1 TEXT 4Q LF 2200 PRINTZ1 TEXT 41 LF 3219 PRINT 1 TEXT 42 LF 3229 PRINTZ1 ESC 2 FF A ROW CHR BITZ COL4 ROW 3230 END 4900 Draw a line from X1 Y1 to X2 Y2 4010 XL X2 X1 YL Y2 Y1 4020 NX ABS XLXLXFAC NY ABS YLXLYFAC 4020 IF NX NY THEN NX NY 4040 NS INT NX 1 4050 DX XL NS DY YL NS 4969 FOR 1 1 TO NS 4070 X1 X1 DX Yl YL DY P
19. 00 m 2070 NEXT ANGZ 3000 REM SEND BIT IMAGE MAP TO PRINTER 2010 LPRINT CHR 27 A CHR 6 3020 FOR ROWZ Q TO 14 3030 A 2040 LPRINT CHR 27 K CHR 75 CHR Q 3959 FOR COLZ 1 to 75 3060 LPRINT CHR BIT COL ROW 2070 NEXT COL 3080 LPRINT 2090 NEXT 3100 LPRINT CHR 27 A CHR 12 3119 END 2000 REM DRAW A LINE FROM X1 Y1 TO X2 Y2 M 4010 XL X2 X1 YL Y2 Y1 4020 NX ABS XLXXFAC NY ABS YLXYFAC 2020 IF NX NY THEN NX NY i 4949 NS INT NX 1 4050 DX XL NS DY YL NS 2060 FOR I 1 NS 4070 X1 X1 DX Yl Y1 DY 2080 GOSUB 5000 4090 1 4100 RETURN 5000 REM PLOT POINT 1 1 s 5019 1 5920 COL INT XX 1 W 5039 ROWZ INT YY 6 5049 XIT4 INT YY ROWZX6 41 Osborne Kaypro and CP M 189 505g BIT COL ROW BIT COL ROW OR MASK XITZ 596g RETURN Pie chart program 110 ESC CHR 27 LF CHR 19 120 FF CHR 12 VTAB CHR 11 130 EMPHASIZED ESC E NOT EMPHASIZED ESC F 1020 DIM BIT 19 36 A 36 PCT 25 TEXT 42 PIECETEXT 25 1830 MASK 1 128 MASK 4 16 104 MASK 2 64 MASK 5 8 1050 MASK 3 32 6 4 1060 LX 29 LY 29 1070 LXFAC 199 LX LYFAC 216 LY 1989 FOR 1 1 TO 42 1090 TEXT I SPACE 8f 1199 NEXT I 1110 GOSUB 7000 1120 PRINT CHR 26 1130 PRINT THIS PROGRAM TAKES ABOUT FIVE MINUTES 1149 PRINT PLEASE HAVE YOUR PRINTER READY AND 1159 PRINT STAND B
20. 15 THEN PRINT FIELD TOO LONG 15 CHAR MAX GOTO 7169 718 IF AMT LEFT 9 GOTO 7200 7199 NEXT I 7200 NUMBER PIECES4 I 7219 IF NUMBER PIECES 1 THEN 7030 7220 CLS 7230 RETURN You should recognize many sections of code from the plotting program We ve just expanded on that program framework to include routines for inputting data to be graphed starts at line 7000 and placing labels next to the pie chart starts at line 6000 The output from our program is shown below Sales by region Southwest South UN ha a x Midwest n d N Ki kN d Northeast _ Northwest Printing Dot Graphics 115 High Resolution Graphics Up until now all of the dot graphics printing we have done has been with Delta s normal density mode This can give you some pretty sharp images at great speed Sometimes though you may want to create an image with even higher resolution Delta has four density modes you can use they re summarized in Table 8 2 Table 8 2 Dot graphics commands Function Control code Normal density 60 dots inch ESC nin2mim2 Double density 120 dots inch ESC n1 n2 m1 m2 Double density double speed ESC y n1 n2 m1 m2 Quadruple density 240 dots inch ESC 2 n2 m1 m2 Note If your computer does not support lowercase characters use CHR 121 and CHR 122 for and z respectively T
21. 19 RETURN 2120 DATA 72 11 4 10 20 10 52 72 52 19 20 10 4 2130 DATA 83 11 16 8 20 8 86 41 86 8 20 8 16 214G DATA 67 11 8 16 8 18 65 62 65 18 8 16 8 2150 DATA 68 11 8 0 28 0 62 65 62 0 28 0 8 2000 REM DEAL CARD 3010 FOR CA 1 TO 52 3020 X INT RND B 4 1 3030 IF HA X 13 THEN 3929 3935 HA X HA X 1 3040 DE CA X 3859 NEXT 3969 RETURN 4000 REM PRINT FOUR HANDS 4010 LPRINT CHR 27 CHR 9 NORTH 4929 LPRINT CHR 27 CHR 1 CHR 27 CHR 79 4939 HA 4949 FOR SU TO 3 4959 LPRINT CHR 9 4969 GOSUB 4300 TRS 80 Computers 167 4979 LPRINT 208 NEXT SU 4999 LPRINT CHR 27 WEST CHR 9 CHR 9 EAST 4100 LPRINT CHR 27 CHR 1 CHR 27 CHR 79 411 FOR SU TO 3 4120 HA 2 4130 GOSUB 4300 4140 LPRINT CHR 9 CHR 9 4150 HA 4160 GOSUB 4300 4170 LPRINT 4189 NEXT SU 4190 LPRINT CHR 27 CHR 9 SOUTH 4200 LPRINT CHR 27 CHR 1 CHR 27 CHR 70 4219 HA 4 4229 FOR SU TO 3 4230 LPRINT CHR 9 4240 GOSUB 4300 4259 LPRINT 4260 NEXT SU 4279 LPRINT CHR 27 CHR 0 CHR 27 CHR 7 4280 RETURN 4290 REM PRINT ONE LINE 4200 LPRINT SU SU 4319 FOR CA 13 TO 1 STEP 1 4329 IF DE SU 13 CA HA THEN LPRINT 4230 NEXT 4340 RETURN Numeral program 1 REM PROGRAM TO DEFINE AND PRINT NUMERAL 20 REM EACH NUMERAL IS MADE UP OF 4 CHARACTERS 2 WIDE X 2 HIGH 39 DD
22. 27 T 99 PRINT CHR 27 5 100 PRINT CHR 30 119 PR 129 END Bridge hand program 10 HOME 20 GOSUB 1000 30 GOSUB 2000 49 GOSUB 3000 59 GOSUB 4999 69 END 1000 REM 1919 DIM HA 4 DE 52 CA 13 SU 3 1020 CAS 1 2 CA 2 BU CAS CG 4 4 5 CA 5 6 1030 CA 6 7 CA 7 CA 9 10 1040 4 10 J CA 11 Q CA 12 K CA 13 A 1959 SU B S SU 1 H SU 2 D SU 3 C 1989 RETURN 2000 REM 2010 PR 1 2015 PRINT CHR 9 CHR 25 2916 PRINT CHR 25 255N 8 CA 8 9 Apple Computers 149 2029 PRINT CHR 27 CHR 68 CHR 20 CHR 49 CHR 0 2030 PRINT CHR 27 CHR 43 CHR 27 CHR 36 CHR 9 CHR 27 CHR 69 CHR 39 2049 PRINT CHR 27 CHR 42 CHR 2045 FOR I 1 T04 2050 PRINT CHR 27 CHR 42 CHR 1 2969 FOR J 1 TO 13 2070 READ X PRINT CHR X 2080 NEXT J 2090 NEXT I 2199 PRINT 2110 RETURN 2120 DATA 72 11 4 10 20 10 52 72 52 1 20 10 2 2130 DATA 82 11 16 8 20 8 86 41 86 8 20 8 16 214 DATA 67 11 8 16 8 18 65 62 65 18 8 16 8 2158 DATA 68 11 8 0 28 0 62 65 62 0 28 0 8 3000 REM 2010 FOR A 0 52 3020 X INT 1 T RND 1 4 1 3030 IF HA 13 THEN 3929 3935 HA X A X 1 3040 DE CA X 3050 NEXT CA 2060 RETURN 4000 REM 4010 PR 1 4012 PRINT CHR 9 CHR 25 4014 PRINT CHR 25 255N 4915
23. 27 CHR 36 CHR CHR 27 CHR 69 CHRS 39 203 LPRINT CHR 27 CHR 42 CHR 9 204 FOR I 1 TO 4 2050 LPRINT CHR 27 CHR 42 CHR 1 2969 FOR J 1 TO 13 2070 READ X LPRINT CHR X 208 NEXT J 2090 NEXT 2100 LPRINT 2110 RETURN 2120 DATA 72 11 4 10 20 10 52 72 52 10 20 10 4 2130 DATA 83 11 16 8 20 8 86 41 86 8 20 8 16 214 DATA 67 11 8 16 8 18 65 62 65 18 8 16 8 2159 DATA 68 11 8 0 28 0 62 65 62 0 28 0 8 2000 3010 FOR CARD 1 TO 52 3929 X INT RND 4 1 3030 IF HAND X 13 THEN 3929 ELSE HAND X HAND X 1 3040 DECK CARD X 2050 NEXT CARD 3060 RETURN 2000 REM 4010 LPRINT CHR 27 SPC 29 NORTH 4929 LPRINT CHR 27 CHR 1 CHR 27 CHR 79 4939 HAND 1 4949 FOR SUIT to 3 4059 LPRINT SPC 29 4060 GOSUB 4300 4070 LPRINT 4989 NEXT SUIT 4090 LPRINT CHR 27 WEST SPC 49 EAST 4100 LPRINT CHR 27 CHR 1 CHR 27 CHR 79 4119 FOR SUIT 9 TO 3 Osborne Kaypro and CP M 183 4120 HAND 2 4130 GOSUB 4399 4149 LPRINT TAB 45 4150 HAND 3 4160 GOSUB 4300 X 4170 LPRINT 1 4180 NEXT SUIT a 4190 LPRINT CHR 27 5 20 SOUTH 4200 LPRINT CHR 27 CHR 1 CHR 27 CHR 79 A 4210 HAND 4 4220 FOR SUIT TO 3 4230 LPRINT SPC 29 pue 4240 GOSUB 4300 4259 LPRINT ya 4269 NEXT SUIT 1 4270 LPRINT CHR 27 CHR Q CHR 27 CHR 79 IN 4280 RETURN 4200 LPRINT SUIT SUIT 4319 FOR CARD 13 TO 1 STEP 1 4329 IF DECK SUIT 13 CARD HAND T
24. 39 849 859 Delta User s Manual DATA 19 9 32 24 191 24 97 9 64 9 64 9 DATA 11 64 9 96 1 48 15 48 15 16 15 f REM SIX DATA 11 9 96 9 112 9 129 9 92 9 192 9 DATA 11 98 0 98 0 98 0 70 0 14 0 6 DATA 11 6 8 23 8 55 8 99 0 65 0 64 DATA 11 0 96 0 112 1 62 1 30 1 14 0 REM SEVEN DATA 11 9 16 8 6 8 6 8 6 8 6 8 DATA 9 70 8 102 8 54 8 6 0 2 0 0 DATA 11 0 64 0 96 0 120 0 124 0 30 1 DATA 9 6 1 0 0 0 0 0 0 0 0 0 REM EIGHT DATA 11 9 9 9 0 24 36 24 192 24 192 9 DATA 11 67 9 67 9 99 28 34 28 3 4 28 9 DATA 11 12 18 44 19 108 19 96 1 64 0 64 DATA 11 96 1 112 15 48 15 16 14 0 0 REM NINE DATA 11 0 120 4 120 6 120 6 0 3 0 DATA 11 3 9 3 0 67 4 123 4 122 4 129 DATA 11 48 0 56 0 113 0 99 0 99 0 99 DATA 11 0 115 0 57 0 31 0 15 0 6 REM SPACE DATA 11 0 0 0 0 0 0 0 0 0 0 0 Download utility program 19 15 05 x SCS 0 ST E 29 30 49 20 69 DIM Z 8 12 MM 11 HOME GOSUB 660 VTAB 24 HTAB 34 GET A IF A P THEN GOSUB 689 GOTO 39 IF A E THEN HOME GOSUB 900 GOSUB 269 GOTO 39 79 80 260 265 279 280 290 300 31 IF A CHR 27 THEN HOME END PRINT CHR 7 GOTO 30 REM FOR I 1 TO 11 MM I NEXT I VTAB 3 HTAB 6 PRINT CS GET A IF A J THEN GOSUB 390 GOTO 370 IF A THEN GOSUB 410 GOTO 379 IF A THEN GOSUB 430 GOTO 379 Apple II Computers 153 329 IF A I THEN GOSUB 450 GOTO 379 330 IF A CHR 13 THEN GOSUB 470 GOTO 370 349 IF A C
25. 4 5 D3 6 D5 6 D4 7 D6 7 D5 8 D7 8 D6 9 D8 at 9 D7 10 ACK 10 ACK 11 BUSY a THY BUSY 12 PAPER O s 12 PAPER END 13 SELECTED p gt v 13 SELECT 16 GROUND n 18 25 GROUND 31 RESET 46 RESET ERROR 15 ERROR The IBM PC expects its printer to be connected to the parallel interface If you are using the serial interface then you will need to instruct your computer to send information to the serial inter face instead of to the parallel interface This is done with the MODE command You must use the following two commands each time you turn on your computer MODE COM1 48 N 8 1 P MODE LPT1 COM1 The first sets the asynchronous adapter to match the settings of DIP switch 3 in Delta The second re directs printer output to the serial port The switches on DIP switch 3 must be set as shown below to use this MODE command The IBM DOS manual tells you how to create a different MODE command for different DIP switch settings You can put these two MODE com mands into a file named AUTOEXEC BAT and it will execute automatically each time you start your computer IBM PC and Compaq 141 Table B 1 Serial switch settings Switch Setting Function 31 8 data bits 3 3 ON Serial busy 3 4 block mode 3 5 either Parity 36 wh ON el 38 OFF The serial cable shown below will work with DIP switch 3 set as shown above to connect
26. 5 143 7 7 7 390 DATA 31 253 252 248 248 240 192 8 7 15 31 31 15 7 3 409 DATA 0 0 0 224 255 255 255 255 255 31 O50 51535315259 299 259 255 410 DATA 255 255 1 9 0 0 1 7 31 255 252 249 192 128 0 0 0 0 0 0 420 ROW 3 43Q DATA 9 31 31 3 129 128 192 192 192 192 440 DATA 192 224 224 224 224 240 255 255 255 255 459 DATA 255 127 0 0 0 0 63 127 255 255 460 DATA 255 255 193 128 128 128 128 192 224 249 470 DATA 252 255 255 255 127 63 31 7 7 31 480 DATA 254 252 248 224 128 0 0 2 7 7 7 3 0 0 192 255 255 255 255 255 499 DATA 15 15 63 252 240 192 240 255 255 500 DATA 255 255 255 7 15 127 252 240 192 0 0 0 0 0 0 0 0 0 0 510 ROW 4 520 DATA 9 248 248 240 224 224 112 112 56 56 520 DATA 56 56 56 129 129 240 249 224 224 192 128 0 0 0 0 0 192 224 240 240 549 DATA 240 248 248 248 120 120 56 56 56 56 559 DATA 48 112 224 224 224 224 240 249 248 248 560 DATA 120 120 56 56 56 56 120 240 224 224 570 DATA 192 128 0 0 0 128 248 248 248 248 240 192 240 248 580 DATA 248 248 248 24 192 0 0 0 0 0 0 0 Printing Dot Graphics 107 S SW Plotting with Delta This section of the manual gets into more serious BASIC pro gramming just because it s reguired in order to have the computer act as a plotter driver Don t be intimidated while it s beyond the scope of this manual to teach BASIC if you try the examples and tak
27. 5 POKE I B 49 NEXT I 50 DATA 32 74 255 165 250 5 251 60 DATA 133 252 32 63 255 96 100 REM PIECHART 110 DIM BIT 19 36 A 36 PCT 25 TXT 42 PTXT 25 120 ES CHR 27 LF CHR 10 139 FF CHR 12 VT CHR 11 149 EM ES E CE ES F 159 FOR I 1 TO 168 SP SP CHR NEXT I 1000 REM SET PROGRAM CONSTANTS 1020 MASK 1 64 MASK 4 8 102 MASK 2 32 MASK 5 4 1939 MASK 3 16 MASK 6 2 1040 LX 29 LY 29 1959 XFAC 199 LX YFAC 216 LY 1969 FOR I 1 TO 42 1070 FOR J 1 TO 89 TXT I TXT I 108 NEXT J NEXT I 109 GOSUB 7000 1992 HOME PRINT PRINT 1994 PRINT PRINT 1996 PRINT THIS PROGRAM TAKES ABOUT 1997 PRINT 4 MINUTES TO RUN PLEASE 1998 PRINT TURN ON YOUR PRINTER AND 1099 PRINT STAND BY 2000 REM PLOT CURVE 2010 RAD 9 2020 X1 19 Y1 10 2925 PRINT ex 2030 12 TO 360 STEP 5 294g R1 6 28 369 2059 X2 Rib x COS R1 19 Y2 RAD SIN R1 1g 158 2060 2070 2080 2999 2199 2119 2129 2139 2149 2159 2169 3000 3929 3922 3959 3060 3979 3989 3999 3199 3119 3129 3139 3149 3159 3169 3179 3189 Delta User s Manual GOSUB 4000 NEXT ANG FOR PI 1 TO NP X1 10 71 19 TP ANG 360 TP 01 Ri ANG 6 28 360 X2 RAD x COS 81 19 Y2 RAD SIN R1 1g GOSUB 4000 GOSUB 6000 NEXT PI REM SEND BI
28. 5010 XX X1XLXFAC YY YiXLYFAC 5020 COL INT XX 1 5030 ROWZ INT YY 6 594g XIT INT YY ROW 6 1 5050 BIT COL ROW BIT COL ROW OR MASKZ XIT4 5969 RETURN 6000 REM 6010 MIDANG ANG PREVANG 2 6920 RANG MIDANG2 6 28 369 6030 X3 INT 29XSIN RANG Y3 INT 22 COS RANG 6049 X4 22 X3 Y4 49 Y3 Osborne Kaypro and CP M 191 6050 IF MIDANG 279 OR MIDANG 99 THEN MID TEXT X4 Y4 PIECETEXT PIECEZ ELSE MID TEXT X4 Y4 LEN PIECETEXT PIECEZ PIECETEXTS PIECES 6060 PREVANG ANG 6070 RETURN 7999 qu 7919 PRINT CHR 26 PRINT PRINT PRINT 7020 INPUT ENTER TITLE FOR CHART TITLE 7030 AMT SOFARZ 0 AMT LEFTZ 199 7040 FOR 1 1 TO 24 7959 PRINT CHR 26 ENTER PARAMETERS FOR PIE CHART 1 7969 PRINT TOTAL SO FAR 7070 PRINT AMT SOFAR 7080 PRINT TOTAL REMAINING EL 7099 PRINT AMT LEFTZ 7100 PRINT PRINT PRINT PRINT 7110 INPUT ENTER PERCENTAGE FOR FIELD PCTZ I 7120 IF PCT4 I AMT LEFT4 OR PCTZ I 9 THEN PCTZ I AMT LEFTZ EN 7139 AMT LEFTZ AMT LEFTZ PCTZ I 714 AMT SOFARZ AMT SOFARZ PCTZ I oe 7150 PRINT PRINT 7160 INPUT ENTER DESCRIPTION OF FIEID SPIECETEXT I 7170 IF LEN PIECETEXT I 15 THEN PRINT FIELD TOO LONG 15 CHAR MAX GOTO 7169 7180 IF AMT LEFT 9 THEN 7200 7199 NEXT I 7200 NUMBER PIECES 1 i 7219 IF NUMBER PIECES 9 THEN 7939 bu 7220 PRINT CHR 26 7239 RETURN 192 Delta User s Manual
29. 72 1190 UNDERLINED CHR 27 0HR 45 CHR 1 1200 NOT UNDERLINED CHR 27 CHR 45 CHR 9 1219 SUPERSCRIPT CHR 27 CHR 83 CHR f 1229 SUBSCRIPT CHR 27 CHR 83 CHR 1 1220 NOT SCRIPTED CHR 27 CHR 84 1240 RESET ALL NOT EMPHASIZED NOT UNDERLINED NOT DOUBLE STRIKE 1259 RESET ALL RESET ALL ROMAN PICA NOT ENLARGED 1279 TRUE 1 FALSE 9 1280 REGULAR HEADING STRING 27 REGULAR STRING 27 1299 RETURN 2000 REM 2050 LPRINT RESET ALL 2069 LPRINT ENLARGED NORMAL ENLARGED 2070 LPRINT RESET ALL 2089 LPRINT UNDERLINED 2999 LPRINT CONDENSED CONDENSED 2100 LPRINT ELITE ELTTE s 2110 LPRINT PICA PICA i 2129 LPRINT CONDENSED CONDENSED 2139 LPRINT ELITES ELITE 2140 LPRINT PICA PICA N 2159 LPRINT RESET ALL 2169 RETURN 3999 3050 ITALICS FALSE LPRINT ROMAN 3060 UNDERLINED FALSE LPRINT NOT UNDERLINED 3070 ENLARGED FALSE LPRINT NOT ENLARGED 3080 PICA FALSE 3100 LPRINT CONDENSED 3110 GOSUB 3500 3120 LPRINT ELITE 3130 GOSUB 3500 3149 LPRINT PICA PICA TRUE 3159 GOSUB 3599 3179 IF ENLARGED TRUE THEN LPRINT GOTO 3199 3180 LPRINT ENLARGED ENLARGED TRUE GOTO 3080 3199 IF UNDERLINED TRUE THEN LPRINT GOTO 3219 3200 LPRINT UNDERLINED UNDERLINED TRUE GOTO 3070 3219 IF ITALICS TRUE THEN LPRINT RESET ALL RETURN 3220 LPRINT ITALIC ITALICS TRUE GOTO 3060 3599 REM Osborne Kaypro and CP M 181 3559 BLANK STRING
30. 9 IF Z G H 1 THEN PRINT X 64 Y 5 SC 949 RETURN 959 IF Z G H 1 THEN PRINT X 64 Y 5 SS 172 Delta User s Manual 969 IF Z G H 9 THEN PRINT X 64 Y 5 CS 979 RETURN 1000 PRINT 0832 BL RETURN Delta Plot program 5 CLEAR 1999 10 CLS PRINT PRINT PRINT 20 PRINT THIS PROGRAM TAKES ABOUT 1 MINUTE TO RUN 39 PRINT PLEASE TURN ON YOUR PRINTER AND STAND BY 100 DIM BIT 76 14 119 MASK 1 128 MASK 4 16 120 MASKZ 2 64 MASK 5 8 130 MASK 3 32 MASK 6 4 140 LX 20 LY 29 159 XFAC 72 LX YFAC 87 LY 1000 REM PLOT CURVE 1010 RAD 9 1020 X1 19 Y1 19 10320 FOR ANG Q TO 360 STEP 19 104 R1 ANG 6 28 369 1050 X2 RAD COS R1 19 Y2 RAD SIN R1 19 1969 GOSUB 3000 1070 NEXT ANG 2000 REM 2919 LPRINT CHR 27 A CHR 6 2020 FOR ROW g TO 14 2030 A 2040 LPRINT CHR 27 K CHR 75 CHR Q 2059 FOR COL 1 TO 75 2060 MM BIT COL ROW 2965 IF MM 12 THEN MM 149 2070 A A 2090 NEXT COL 2199 LPRINT A 2119 NEXT ROW 2129 LPRINT CHR 27 2 2139 END 2000 REM DRAW A LINE FROM X1 Y1 TO X2 Y2 3010 XL X2 X1 YL Y2 Yl 2020 NX ABS XL XFAC NY ABS YLXYFAC 2030 IF NX NY THEN NX NY 3949 NS INT NX 1 2050 DX XL NS DY YL NS 3060 FOR 1 1 TO NS4 2070 X1 X1 DX Y1 Y1 DY TRS 80 Computers 173 3080 GOSUB 4000 2090 NEXT I 3100 RETURN 4000 REM PLOT A POINT AT X1 Y1 4919 XX X1 XFAC YY Y1 YFAC 4929 COL INT XX 1 4020 ROW
31. A for these directions and replacing an occasional blown fuse or replacement of the print head after a long period of use Replacing a Fuse How can you tell when you ve blown a fuse Well when the printer won t operate and the power lamp on the control panel isn t lit even though you re sure the power switch is on and the printer is plugged in it s likely a blown fuse 126 Delta User s Manual Power supply unit Primary fuse Main control board Power switch Secondary fuse Delta 10 fuse locations Power supply unit Primary fuse Power regulator board Secondary fuse 1 Power switch Delta 15 fuse locations Figure 10 3 The secondary fuses are a little tricky to reach To check out the fuses there are two turn the power switch off and disconnect the power plug Then remove the platen knob and the upper case as described in the preceding section When the case is off check for the correct fuse locations on Figure 10 3 Remove the primary fuse first held in its clamps near the power switch The fuse is a commonly used type with a metal strip suspended in a glass and metal case If the strip is broken the fuse is blown Maintenance 127 Replace this fuse with a 2A 125V slow blow type fuse then test run the printer Still immobile Check the secondary fuse which is still further inside the works as shown in Figure 10 3 If that s blown replace it with a 3A 125V slow blow t
32. ATA 11 44 64 38 65 34 65 32 88 32 88 490 REM THREE 500 DATA 11 0 0 0 0 0 0 4 2 4 2 4 519 DATA 11 34 84 34 92 34 76 34 68 2 64 9 520 DATA 11 16 0 48 0 56 64 48 64 32 64 22 530 DATA 11 64 32 64 48 10 54 10 22 19 6 1 549 REM FOUR 559 DATA 11 0 0 0 0 0 64 36 88 22 16 560 DATA 11 0 0 64 32 64 56 64 60 2 12 0 570 DATA 11 0 8 4 10 5 10 5 8 4 72 4 580 DATA 11 88 38 89 38 89 6 73 4 8 6 0 590 REM FIVE 600 DATA 11 9 9 9 9 64 32 84 59 76 34 68 610 DATA 10 34 68 34 68 34 68 2 68 2 9 0 620 DATA 10 0 32 24 101 24 97 0 64 0 64 630 DATA 11 64 9 96 1 48 15 48 15 16 15 9 649 REM SIX 659 DATA 11 9 96 9 112 9 129 9 92 9 192 9 669 DATA 11 98 0 98 0 98 0 70 0 14 0 6 670 DATA 11 7 8 23 8 55 8 99 0 65 0 64 Osborne Kaypro and CP M 185 680 DATA 11 0 96 0 112 1 62 1 30 1 14 0 699 REM SEVEN 700 DATA 11 0 16 8 6 8 6 8 6 8 6 8 710 DATA 10 70 8 102 8 54 8 6 0 2 0 0 720 DATA 11 0 64 0 96 0 120 0 124 0 30 1 730 DATA 10 6 1 0 0 0 0 0 0 0 0 0 749 REM EIGHT 750 DATA 11 0 0 0 0 24 36 24 102 24 102 0 760 DATA 11 67 9 67 0 99 28 34 28 34 28 9 770 DATA 11 12 18 44 19 108 19 96 1 64 0 64 789 DATA 11 0 96 1 112 15 48 15 16 14 0 0 790 REM NINE 800 DATA 11 0 0 120 4 120 6 120 6 0 3 0 810 DATA 11 3 0 3 0 67 4 123 4 122 4 1290 820 DATA 11 48 0 56 0 113 0 99 0 99 0 99 839 DATA 11 9 115 9 57 9 31 9 15 9 7 9 849 REM SPACE 859 DATA 11 0 0 0 0 0 0 0 0 0 0 0 Download utility program 10 DIM 2 8 12 11 15 DEF FNLOCATE X Y CHR 27 C
33. Delta printed graphics up to the end of the line then ignored the rest of the graphics data and returned to normal text on the next line Printing a Design or Logo Since you control the firing of every pin you can print nearly anything with Delta that you can draw and probably better if you re like most computer users This can be used for creating computer art or drawing maps Or as we ll show you here you can use dot graphics to print your logo at the top of each letter you print Designing an image to print with dot graphics is much like designing download characters The best way to start is to lay out your image on graph paper Since you can print eight rows seven with a 7 bit interface of dots with each pass of the print head draw a heavy horizontal line every eight rows on your graph paper And it may be helpful to write the dot values 128 64 32 etc down the left side of each row Then after you ve filled in the dots that you want to print it s time to get out the old calculator again Just as you did with download characters add up the val ues of each column of dots this makes up one byte In the program below we ve taken the logo graphics informa tion and put it into BASIC DATA statements The program itself is short and simple The loop starting at line 160 reads the data state ments into a string array variable called LOGOS In line 230 we change the line spacing to 8 72 inch so that the lines
34. HEN LPRINT CARD CARD 4330 NEXT CARD 4340 RETURN Numeral program FE 39 DEF DOWN CHAR CHR 27 CHR 42 CHR 1 49 DOWN CHAR PROP CHR 27 CHR 88 CHR 1 a 59 NOT DOWN CHAR PROP CHR 27 CHR 88 CHR Q 69 LINE 7 CHR 27 CHR 49 LINE 12 CHR 27 CHR 59 N 70 FOR 1 16 TO 299 89 LPRINT DEF DOWN CHAR 99 LPRINT CHR N1 j 199 READ N2 c 110 LPRINT CHR N2 1 129 FOR S 1 TO 11 139 READ MS 140 LPRINT CHR MS 150 NEXT S 160 NEXT N1 189 ASCII 169 190 FOR NUM g to 9 200 NUMERAL TOP NUM CHR ASCII 9 CHR ASCII 1 a 219 NUMERAL BOT NUM CHR ASCII42 4CHR ASCII43 22 ASCII ASCII 4 184 Delta User s Manual 220 NEXT NUM 240 BLANK CHR 299 259 LPRINT DOWN CHAR PROP LINE 7 260 FOR NUM f TO 9 270 LPRINT NUMERAL TOP NUM BLANK 280 NEXT NUM 290 LPRINT 200 FOR NUM f TO 9 210 LPRINT NUMERAL BOT NUM BLANK 320 NEXT NUM 230 LPRINT NOT DOWN CHAR PROP LINE 12 340 REM ZERO 250 DATA 11 0 96 16 104 16 44 20 14 0 2 1 369 DATA 11 2 1 2 1 6 8 38 88 32 88 32 37 DATA 11 3 12 19 12 51 0 96 0 96 0 96 380 DATA 11 0 32 0 48 0 28 3 12 3 4 3 390 REM ONE 200 DATA 11 0 0 0 0 0 4 0 4 0 4 126 410 DATA 10 12 114 12 114 12 2 0 0 0 0 0 420 DATA 11 64 0 64 0 64 0 64 32 80 47 8 439 DATA 10 47 80 47 64 0 64 0 64 0 0 0 440 REM TWO 459 DATA 11 0 0 0 0 0 12 16 14 0 6 460 DATA 11 3 0 3 0 70 56 70 56 4 24 0 470 DATA 11 64 0 64 32 64 32 80 32 80 49 64 480 D
35. HR 32 THEN GOSUB 499 GOTO 370 359 IF A CHR 27 THEN GOSUB 500 GOTO 380 370 GOTO 280 38 RETURN H 1 IF 1 THEN 399 GOSUB 1000 Y 2 1 1 PRINT CHR 7 Y 499 GOSUB 1050 RETURN 419 GOSUB 1999 Y Y 2 H H 1 IF 921 THEN PRINT CHR 7 Y 21 H 11 420 GOSUB 1959 RETURN 430 GOSUB 1999 X X 2 0 G 1 IF X gt 13 THEN PRINT CHR 7 X 13 G 7 449 GOSUB 1959 RETURN 450 GOSUB 1000 X 2 PRINT CHR 7 X 1 460 GOSUB 1050 RETURN 470 IF Z G H 1 1 OR Z G H 1 1 THEN PRINT CHR 7 RETURN 489 Z G H 1 INVERSE VTAB X 2 HTAB Y 5 PRINT SC NORMAL RETURN 499 Z G H 0 NORMAL VTAB X 2 HTAB Y 5 PRINT CS RETURN 500 REM 519 FOR I 2 TO 12 VTAB I 29 PRINT NEXT I 520 IF Z G H 1 THEN VTAB X 2 HTAB Y 5 NORMAL PRINT SC GOTO 549 530 IF Z G H Q THEN VTAB X 2 HTAB 5 NORMAL PRINT 549 REM 559 FOR I 1 11 FOR J 1 TO 7 560 MM I MM I Z J I 2 J 1 NEXT J NEXT I 567 FOR I 1 TO 11 S STR MM I FOR J 1 TO LEN S 568 VTAB J 16 HTAB I 2 4 PRINT MID S J 1 NEXT J NEXT I 58 GOSUB 660 RETURN 669 FOR 1707 FOR J 1 TO 11 Z I J 0 NEXT J NEXT I 670 VTAB 24 HTAB 2 PRINT E DIT P RINTER ESC END RETURN 680 REM G 1 IF X lt 1 THEN 1 G 154 Delta User s Manual 690 VTAB 21 HTAB 2 INPUT NORMAL
36. HR 61 CHR X CHR Y 32 20 PRINT CHR 26 GOSUB 660 30 CS 4 SC BIT B SS 00 A INKEY IF A THEN 49 59 IF A 0 THEN PRINT CHR 26 END 6 IF A P THEN GOSUB 680 GOTO 49 70 IF A E THEN PRINT CHR 26 GOSUB 99 GOSUB 269 GOTO 49 89 GOTO 49 REM EDIT MODE 95 H 1 G 1 X 1 Y 1 96 FOR I 1 TO 11 MM 1I NEXT I 100 PRINT CHR 26 119 PRINT 128 PRINT 1 M2 M3 M4 M5 M6 M7 8 M11 120 for to 7 PRINT S FOR J 1 TO 11 149 PRINT NEXT J PRINT IF I 7 THEN PRINT 2 150 NEXT I 160 PRINT FNLOCATE 29 1 R IGHT L EFT U P D OWN C LEAR Q UIT 180 RETURN 260 REM SINGLE CHARACTER INPUT 6 EDIT LEVELX Xx x 186 Delta User s Manual 270 PRINT FNLOCATE 4 7 PRINT CS PRINT FNLOCATES 29 48 280 A INKEY IF A THEN 280 200 IF A L THEN GOSUB 399 GOTO 370 210 IF A R THEN GOSUB 419 GOTO 370 220 IF A D THEN GOSUB 430 GOTO 370 330 IF A U THEN GOSUB 459 GOTO 370 340 IF A 1 THEN GOSUB 479 GOTO 370 250 IF A C THEN GOSUB 499 GOTO 379 369 IF A Q THEN GOSUB 599 GOTO 380 379 GOTO 289 389 RETURN REM XxxxEND OF INPUTX X X 399 GOSUB 920 3 1 Y 1 THEN Y 1 H 1 400 GOSUB 959 RETURN 419 GOSUB 920 Y Y 3 H H 1 IF Y 31 THEN Y 31 H 11 420 GOSUB 959 RETURN 439 GOSUB 929 XzX42 02041 IF X 13 THEN X 13 G 7 449 GOSUB 959 RETURN 450 GOSUB 920 2 6 6 1 X 1 THEN X 1 G 1 46 GOSUB 959 RETURN 470 IF Z G H 1 1
37. N 7010 CLS PRINT PRINT PRINT ex 7029 INPUT ENTER TITLE FOR CHART TT 7030 ASZ 0 1 100 7040 1 1 7050 CLS PRINT ENTER PARAMETERS FOR PIE CHART 7969 PRINT TOTAL SO FAR 7070 PRINT USING AS 7080 PRINT TOTAL REMAINING 799 PRINT USING ALZ 7100 PRINT PRINT PRINT PRINT 7119 INPUT ENTER PERCENTAGE FOR FIELD 4 1 7120 IF PCTZ I AL OR PCT I THEN PCT 1I AL U 7130 AL AL PCTZ I 7149 ASZ AST PCTZ I 7150 PRINT PRINT 7169 INPUT ENTER DESCRIPTION OF FIELD PXT I 7170 IF LEN PXT I 15 THEN PRINT FIELD TOO LONG 15 CHAR MAX GOTO 7169 7189 IF AL GOTO 7200 7185 I I 1 7190 GOTO 7959 7200 7210 IF NP 1 THEN 7020 176 Delta User s Manual 7229 CLS 7239 RETURN fr r r rr r Appendix Osborne and Other CP M Computers All that you need to connect Delta to an Osborne 1 or Kaypro computer is a cable Your Delta dealer can provide the cable that you need Setting the switches When connecting Delta to an Osborne 1 Kaypro or other CP M computer we recommend that you set the DIP switches in Delta as shown below Although our chart indicates switch 2 2 set for a parallel interface a serial interface will work also Recommended DIP Switch Settings for Osborne 1 L oon pags size Normal print density ON i 1 2 ON 13 ON U S A Character set Paper out detector active P
38. OR Z G H 1 1 THEN RETURN 489 Z G H 1 PRINT FNLOCATE X 3 Y 6 55 RETURN 490 Z G H PRINT FNLOCATE X 3 Y 6 CS RETURN 500 REM XX XGET OUT OF EDIT MODEX 520 IF Z G H 1 THEN PRINT FNLOCATE X43 Y46 SC GOTO 540 539 IF Z G H THEN PRINT FNLOCATE X 3 Y 6 549 REM PRINT THE COLUMN VALUES 559 FOR I 1 TO 11 FOR J 1 TO 7 569 MM I MM I Z J I 2 J 1 NEXT J NEXT I 570 J 9 FOR Isi TO 11 PRINT FNLOCATE 19 6 J RIGHT STR MM I 3 J J 3 NEFXT I 572 PRINT 575 PRINT FNLOCATE 29 1 STRING 45 589 GOSUB 669 RETURN 669 FOR 1 1 TO 7 FOR J 1 TO 11 7 1 7 0 J NEXT I 670 PRINT FNLOCATE 22 2 PRINT E EDIT P PRINTER Q QUIT RETURN 680 REM PRINT MODEXXX 69g PRINT FNLOCATE 29 1 INPUT NORMAL PROPORTIONAL NP AN 700 IF AN N THEN PR GOTO 759 710 IF AN P THEN GOTO 739 720 GOTO 699 Osborne Kaypro and CP M 187 730 GOSUB 2000 20 1 THE PROPORTIONAL DATA 4 11 PR 749 IF PR 4 OR PR 11 THEN 739 750 GOSUB 2 PRINT FNLOCATE 29 1 INPUT IF SHIFTED ENTER 1 ELSE ENTER Q SH 769 IF SH Q OR SH 1 THEN GOTO 750 770 GOSUB 299 PRINT FNLOCATE 29 1 INPUT ASCII CODE 33 126 OR 169 254 6 780 IF AS 33 OR AS 126 AND AS 16 OR AS 254 THEN 770 785 PRINT 790 PRINT FNLOCATE 29 1 STRING 59 800 IF SH 1 THEN SH 16 ELSE SH 819 N1 AS N2 PR SH 82 FOR 1 1 TO 11 MM MM CHR
39. OWS 1939 MASK 1 64 MASK 4 8 1949 MASK 2 32 MASKZ 5 4 1050 MASK 3 16 MASK 6 2 1969 LX 29 LY 29 108 Delta User s Manual 1070 LXFAC 72 LX LYFAC 87 LY 200g Plot curve 2010 RAD 9 2020 X1 19 Yi 19 2030 FOR ANG TO 369 STEP 19 2940 RANG ANG 6 28 369 2050 X2 RADXCOS RANG 1 Y2 RADXSIN RANG 19 2069 GOSUB 4000 207g NEXT ANG 3000 Send bit image map to printer 2010 LPRINT CHR 27 CHR 6 3020 FOR ROW TO MAXROW 3030 AZ 2040 LPRINT CHR 27 CHR MAXCOLZ 0 2050 FOR COL 1 TO 01 3060 A CHR BIT COL ROWZ 32070 NEXT COL 308 LPRINT AS 3999 NEXT ROW 3100 LPRINT CHR 27 2 3119 END 4909 Draw a line from X1 Y1 to X2 Y2 2010 XL X2 Xi YL Y2 Yl 4920 NX ABS XL LXFAC NY ABS YLX LYFAC 4030 IF NX NY THEN NX NY NSZ INT NX 1 4059 DX XL NS DY YL NS 4968 FOR I 1 TO NS 4070 X1 X1 DX Yl Yl DY 408g GOSUB 5000 4099 NEXT 1 419g RETURN 5000 Plot a point at X1 Y1 5010 XX LXFAC YY Yl LYFAC 5020 COL INT XX 1 5030 ROW INT YY 6 5040 XIT INT YY ROW 6 1 5050 BIT COL ROW BITZ COLZ ROWZ OR MASKI XITZ 5969 RETURN How the program works In the program above we ve created an array called BIT which is dimensioned in line 1020 You ll note that instead of Printing Dot Graphics 109 u
40. OWZ CHR MM 2060 NEXT COL 2080 NEXT 3999 LL LEN TT NN 49 LL 2 FOR I 1 TO NN LPRINT NEXT I 3991 LPRINT EM TI NE LF 2100 LPRINT VT VT VT 2110 LPRINT ESC A CHR 3 2120 LPRINT TXT 1 LF TXT 2 LF TXT 3 LF 3139 FOR ROW TO 35 3149 LPRINT ESC K CHR 19 CHR 9 2150 LPRINT A ROWZ 3169 LPRINT TXT ROW 4 3189 NEXT ROWZ 2190 LPRINT TXT 49 LF 2200 LPRINT TXT 41 LF 2210 LPRINT TEXT 42 LF 3229 LPRINT ESC 2 FF 3239 END 4000 DRAW A LINE FROM X1 Y1 TO X2 Y2 4010 XL X2 X1 YL Y2 Yl 4020 NX ABS XLXXFAC NY ABS YL YFAC 4939 IF NX lt NY THEN NX NY 4040 NS INT NX 1 4059 DX XL NS DY YL NS 4060 FOR 1 1 TO NS 4070 X1 DX Y1 Y1 DY 4080 GOSUB 5000 4999 NEXT 1 4110 RETURN TRS 80 Computers 175 509g PLOT A POINT AT X1 Y1 5019 XX X1 XFAC YY Yi x YFAC 502 COLZ INT XX 1 5039 ROW INT YY 6 594g INT YY ROW 6 1 Hu 5050 BIT COL ROW BIT COL ROW OR MASK XIT ES 596 RETURN 6000 Place text fields in the proper location 601 MA ANG PA 2 6020 RANG 6 28 360 j 6939 INT 2Q SIN RANG INT 22 COS RANG i 6949 X4 22 X3 Y4 49 p 6959 IF 270 OR MAZ 9g THEN MID TXT X4 Y4 1 PXT PIE ELSE MID TXT X4 Y4 Pl LEN PXT PIE PXT PIE 696 PA ANG 6070 RETURN 7000 ACCEPT DATA FROM SCREE
41. PRINT CHR 27 CHR 9 NORTH 4020 PRINT CHR 27 CHR 1 CHR 27 CHR 70 4939 HA 4949 FOR SU 0 TO 3 4050 PRINT CHR 9 4969 GOSUB 4399 4070 PRINT 4080 NEXT SU 4999 PRINT CHR 27 WEST CHR 9 CHR 9 EAST 4100 PRINT CHR 27 CHR 1 CHR 27 CHR 79 4119 FOR SU TO 3 150 Delta User s Manual 4129 HA 2 4120 GOSUB 4399 4149 PRINT CHR 9 CHR 9 4150 HA 3 4169 GOSUB 4200 4170 PRINT 4180 NEXT SU 4199 PRINT CHR 27 CHR 9 SOUTH 4299 PRINT CHR 27 CHR 1 CHR 27 CHR 79 4210 HA 4 4228 FOR SU 0 TO 3 4230 PRINT CHR 9 4249 GOSUB 4300 4250 PRINT 4260 NEXT SU 4279 PRINT CHR 27 CHR 0 CHR 27 CHR 79 4280 RETURN 4200 PRINT SU SU 4319 FOR CA 13 TO 1 STEP 1 4320 Hi HA IF DE SU 13 CA THEN PRINT 4330 4349 RETURN Numeral program 10 REM 20 PR 1 25 PRINT CHR 9 255N 27 PRINT CHR 9 25 30 00 CHR 27 CHR 42 CHR 1 49 DP CHR 27 CHRS 88 CHR 1 59 CP CHR 27 CHR 88 CHR 69 L7 CHR 27 i L12 CHR 27 CHR 59 70 FOR N1 33 TO 73 89 PRINT DC 90 PRINT CHR 1 100 READ 2 110 PRINT CHR N2 129 FOR S 17011 139 READ MS 140 PRINT CHR MS 150 NEXT S Apple II Computers 151 160 NEXT N1 180 AS 33 199 210 NT NU 22
42. T IMAGE MAP TO PRINTER FOR ROW TO 35 A ROW t FOR COL 1 TO 190 A ROW A ROW CHR BIT COL ROW NEXT COL NEXT ROW PR 1 PRINT CHR 9 QN X 49 LEN T1 2 FOR I 1 TO X PRINT ss NEXT I PRINT EM TI CE LF PRINT VT VT VT PRINT ES A CHR 3 PRINT TXT 1 LF TXT 2 LF TXT 3 LF FOR ROW TO 35 PRINT ES K CHR 192 CHR 1 SP A ROW 3299 3219 3229 3230 3249 3259 3255 3257 3269 4999 4919 4929 4939 4949 495g PRINT TXT ROW 4 NEXT ROW PRINT TXT 49 LF PRINT TXT 41 LF PRINT TXT 42 LF PRINT ES 2 FF PR 0 HOME END REM DRAW A LINE FROM 1 1 TO X2 Y2 XL X2 X1 YL Y2 Yl NX ABS XL XFAC NY ABS YL YFAC IF NX lt NY THEN NX NY NS INT NX 1 DX XL NS DY YL NS Apple Computers 159 4969 FOR I 1 TO NS 4970 X1 X1 DX Y1 Yi DY Lo 4989 GOSUB 5000 Wa 4999 NEXT I 4199 RETURN a 5000 REM PLOT A POINT AT X1 Y1 a 5010 XX Xi XFAC YY Yl YFAC Ze 5020 COL INT XX 1 5030 ROW INT YY 6 5040 XIT INT YY 6 ROW 1 5942 POKE 259 BIT COL ROW 5944 POKE 251 MASK XITZ m 5946 CALL 768 E 5959 BIT COL ROW PEEK 252 K 5969 RETURN 6000 REM Ka 6010 MAZ ANG PAZ 2 6029 R1 6 28 360 EL 6030 X3 INT 29 SIN R1 Y3 INT 22 COS R1 E 6040 22 X3 Y4 6050 IF MAZ gt 279 OR 99 THEN GOSUB 6199
43. TEP 2 VTAB J FOR I 5 TO 27 STEP 2 HTAB I PRINT NEXT It PRINT NEXT J 905 K 1 VTAB 1 HTAB 5 Apple II Computers 155 996 FOR K 997 K 998 FOR V 3 TO 15 STEP 2 VTAB V HTAB 2 1 TO 11 PRINT K NEXT K PRINT 2 K K K 1 NEXT V 919 VTAB 3 39 PRINT CURSER 912 VTAB 4 HTAB 29 PRINT MOVEMENT 913 VTAB 5 HTAB 29 PRINT 914 VTAB 6 HTAB 29 PRINT I UP 916 VTAB 7 HTAB 29 PRINT M gt DOWN 918 VTAB 8 HTAB 29 PRINT J gt LEFT 929 VTAB 9 HTAB 29 PRINT K gt RIGHT i 922 19 HTAB 29 PRINT RET INSERT 924 VTAB 11 HTAB 29 PRINT SPACE DEL 1 925 VTAB 12 HTAB 29 PRINT ESC EXIT 926 RETURN 1000 IF Z G H THEN VTAB X 2 HTAB Y 5 PRINT 1010 IF Z G H 1 THEN VTAB X 2 HTAB Y 5 PRINT SC 1020 RETURN 1050 IF Z G H 1 THEN INVERSE VTAB X 2 HTAB Y 5 PRINT CS NORMAL 1960 IF Z G H THEN NORMAL VTAB X 2 HTAB Y 5 PRINT CS NORMAL 1070 RETURN Delta Plot program 4 HOME PRINT PRINT 5 PRINT PRINT W 6 PRINT THIS PROGRAM TAKES ABOUT 7 PRINT 1 MINUTE TO RUN PLEASE 8 PRINT TURN ON YOUR PRINTER AND 9 PRINT STAND BY 10 A 24576 N 20 FOR I A TO 12 30 READ B 35 POKE I B 49 NEXT I 59 DATA 32 74 255 165 250 5 251 6 DATA 133 252 32 63 255 96 100 REM DELTA PLOT 119 DIM BIT 75 14 199g REM SET PROGRAM CONSTANTS 1010 MASK
44. UB 9 GOSUB 269 G0TO 40 8 GOTO 40 170 Delta User s Manual 99 X 1 Y 1 G 1 H 1 100 FOR 1 1 TO 11 MM I Q NEXT I 105 CLS 120 FOR I 9 TO 7 PRINT 125 FOR 7 1 TO 11 PRINT NEXT J PRINT IF 7 THEN PRINT 126 NEXT I 130 FOR TO 6 PRINT 064 I 64 1 64 2 1 NEXT 149 PRINT 879 CS 15g PRINT 8189 R RIGHT 169 PRINT 8244 L LEFT 179 PRINT 0398 lt U UP 189 PRINT 0372 D gt DOWN 199 PRINT 0436 I INSERT 200 PRINT 8500 CLEAR 210 PRINT 0564 lt 0 QUIT 229 RETURN 269 REM EDIT LEVEL 270 A INKEY IF A THEN 270 280 IF A L THEN GOSUB 399 GOTO 379 290 IF A R THEN GOSUB 419 GOTO 370 380 IF A D THEN GOSUB 439 GOTO 370 310 IF A U THEN GOSUB 450 00 0 370 320 A I THEN GOSUB 479 GOTO 370 339 IF A C THEN GOSUB 499 GOTO 370 IF A Q THEN GOSUB 599 GOTO 380 270 GOTO 279 380 RETURN 390 GOSUB 920 4 1 1 THEN Y 1 H 1 40g GOSUB 959 RETURN 410 GOSUB 920 Y Y 4 H H 1 IF Y 41 THEN Y 41 H 11 42 GOSUB 959 RETURN 420 GOSUB 920 X X 2 G G 1 IF X 13 THEN X 13 G 7 449 GOSUB 95 RETURN 459 GOSUB 929 X X 2 G G 1 IF X 1 THEN 1 0 1 469 GOSUB 959 RETURN 470 IF Z G H 1 1 OR Z G H 1 1 THEN RETURN 480 Z G H z1 PRINT X 64 Y 5 SS RETURN 499 Z G H PRINT OX 64 Y 5 CS RETURN 599 REM GET OF EDIT MODE 519 IF Z G H 1 THEN PRINT X 64 Y 5 SC 52 IF Z G H 9 THEN PRINT X 64 Y Y 524 PRINT OX 64
45. URN we wo 3000 REM 2050 IT FALSE PRINT 805 2060 UN FALSE PRINT CU 3070 EN FALSE PRINT CE 3080 PI FALSE 2100 PRINT CO 3119 GOSUB 3500 3129 PRINT EL 3139 GOSUB 3500 3149 PRINT TRUE 2150 GOSUB 3500 3170 IF EN TRUE THEN PRINT GOTO 3199 3180 PRINT EN EN TRUE GOTO 3989 3199 IF UN TRUE THEN PRINT GOTO 3219 3209 PRINT UN UN TRUE GOTO 3979 3219 IF IT TRUE THEN PRINT RA RETURN 3220 PRINT IT IT TRUE GOTO 3969 3500 REM 3550 BL FD 3569 IF EM FALSE THEN PRINT AB CHR 99 CHR 199 GOTO 3619 2570 IF PI FALSE THEN PRINT FD GOTO 3590 3580 PRINT EM AB CHR 99 CHR 100 3590 IF EN TRUE THEN PRINT RETURN 3609 IF EN FALSE THEN PRINT BL RETURN 3619 REM 3629 IF EN TRUE THEN PRINT RETURN 3630 PRINT SP X CHR 120 3649 PRINT SB Y CHR 121 2650 PRINT CS 3669 RETURN Special character chart program 19 L CHR 27 y 29 Z CHR 27 25 PR 1 27 PRINT CHR 9 255N 39 FOR J 169 TO 255 STEP 8 148 Delta User s Manual 49 FORI JTOJ 7 59 PRINT I L CHR 1 7 69 NEXT I PRINT NEXT J 70 PR Q 89 END Macro program 19 PR 1 15 PRINT CHR 9 255N 20 PRINT CHR 27 30 PRINT CHR 18 PRINT CHR 27 W CHR 59 PRINT CHR 27 F 69 PRINT CHR 27 H 70 PRINT CHR 27 CHR 0 89 PRINT CHR
46. Y 2919 RAD 9 2020 X1 19 Y1 19 2930 PRINT 2949 FOR ANG 9 TO 369 STEP 5 2050 RANG ANGZX6 28 360 2060 X2 RAD COS RANG 19 Y2 RAD SIN RANG 19 2070 GOSUB 4000 298g NEXT ANGZ 299 FOR PIECE 1 TO NUMBER PIECES 2100 X1 10 Y1 19 2110 TOTAL PCT TOTAL PCT PCT PIECEZ 2129 ANG 369 TOTAL PCT f1 2130 RANG ANG 6 28 369 2140 X2 RAD COS RANG 19 Y2 RAD SIN RANG 19 2150 GOSUB 4000 2160 GOSUB 6000 2170 NEXT PIECE 3010 PRINT 3929 FOR ROW 9 TO 35 3030 A ROWZ 3949 FOR COL 1 TO 199 3050 A ROWZ A ROW CHR BIT COLZ ROWS 3060 NEXT COL 190 Delta User s Manual 3070 PRINT CHR 176 CHR 176 3989 NEXT ROW 3999 PRINT 3091 LPRINT SPACE 4Q LEN TITLE 2 EMPHASIZED TITLE NOT EMPHASIZED LF 2100 LPRINT VTAB VTAB VTAB 2110 LPRINT ESC A CHR 3 3129 LPRINT TEXT 1 LF TEXT 2 LF TEXT 3 LF 3130 FOR ROW TO 35 3149 LPRINT ESC K CHR 199 CHR Q 3150 LPRINT A ROWZ 3160 LPRINT TEXT ROW 4 3179 LPRINT CHR 176 CHR 176 3189 NEXT ROW 3199 LPRINT TEXT 4Q LF 3200 LPRINT TEXT 41 LF 3210 LPRINT TEXT 42 LF 3220 LPRINT ESC 2 FF 3239 END 4909 4010 XL X2 X1 YL Y2 Y1 4020 NX ABS XLXLXFAC NY ABS YLXLYFAC 4939 IF THEN NX NY 4040 NS INT NX 1 205 DX XL NS DY YL NS 4969 FOR I 1 TO NS 4079 X1 X1 DX Y1 Y1 DY 498g GOSUB 5000 4990 NEXT 1 4100 PRINT CHR 29 CHR 205 CHR 175 4119 RETURN 299g
47. Y 5 538 FOR 1 1 TO 11 FOR 7 1 TO 7 2 7 1 2 7 1 J NEXT I TRS 80 Computers 171 549 CLS 542 FOR 1 1 TO 11 PRINT M 1 TAB 5 MM I NEXT I 550 GOSUB 669 RETURN 660 FOR 1 1 TO 7 FOR J 1 TO 11 Z I J Q NEXT J NEXT I 670 PRINT 8969 ME RETURN 689 REM PRINT MODE 690 PRINT 0832 INPUT NORMAL OR PROPORTIONAL 5 ANS 700 IF AN N THEN PR 9 GOTO 750 710 IF AN P THEN GOTO 730 729 GOSUB 1999 GOTO 699 720 GOSUB 199 PRINT 832 INPUT PROPORTIONAL DATA 4 11 PR 749 IF PR 4 OR PR 11 THEN 739 750 GOSUB 1000 0832 INPUT IF SHIFTED ENTER 1 ELSE ENTER SH 769 IF SH 9 OR SH 1 THEN 750 770 GOSUB 1990 PRINT 0832 INPUT ASCII 33 126 169 254 AS 780 IF AS 33 OR AS 126 AND AS 169 OR AS 254 THEN 770 790 GOSUB 1000 800 IF SH 1 THEN SH 16 ELSE SH 9 819 Ni AS N2 PR SH 820 FOR 1 1 TO 11 MM MM CHR MM I NEXT I 839 LPRINT CHR 27 CHR 1 CHR N1 CHR N2 MM 840 IF AN N THEN LPRINT CHR 27 CHR 1 GOTO 869 850 LPRINT CHR 27 X CHR 1 860 FOR 1 1 TO 29 LPRINT CHR N1 NEXT I LPRINT 879 LPRINT CHR 14 FOR I 1 TO 19 LPRINT CHR N1 NEXT I LPRINT 889 LPRINT CHR 15 FOR I 1 TO 29 LPRINT CHR N1 NEXT I LPRINT 899 IF AN N THEN LPRINT CHR 27 CHR 9 GOTO 896 894 LPRINT CHR 27 X CHR 9 896 LPRINT CHR 27 8 MM GOSUB 669 RETURN 920 IF Z G H f THEN PRINT X 64 Y 5 93
48. arallel interface 8 bit interface No auto line feed When you connect your printer to your Osborne 1 you must use the SETUP program to tell the computer whether Delta is con nected to the Osborne 1 s serial or parallel interface either will work 178 Delta User s Manual Osborne 1 Parallel Cable Osborne 1 Pin No Function Pin No Function DATAT SSeS DATAO DATAS DATA4 DATA1 DATA6 m DATA5 DATAS n f DATA2 DATA lt DATA6 DATA4 lt lt DATA3 SS SSS SSS SSS DATA7 STROBE STROBE BUSY SSS SSS SS BUSY SIGGND eee SIG GND Kaypro Parallel Cable 1 STROBE Ooy oc P 1 STROBE 2 DATA1 _ _ 2 DATA1 3 DATA2 3 DATA2 4 DATA3 4 DATA2 5 DATA4 5 DATA2 6 5 6 DATA2 7 DATA6 7 DATA2 8 DATA7 8 DATA2 9 DATA8 9 DATA8 11 BUSY 11 BUSY SIG GND 16 SIG GND Using MBASIC Many CP M computers use Microsoft BASIC called MBASIC If you have a CP M 80 computer that uses Microsoft BASIC the program listings given here should work with your computer also MBASIC is a very close relative of the IBM Microsoft BASIC used in this book The only difference is that MBASIC prets CHR 9 and substitutes a group of spaces to simulate a tab You can send a horizontal tab to Delta by using CHR 137 instead of CHR 9 Microsoft BASIC uses the L prefix on several commands t
49. ave you with extra characters at the end of your line There is an easy way to avoid this problem You just open the printer as a random file The following program shows how this is done RANDOM ACCESS SET WIDTH TO 255 PRINT A LINE ADD YOUR OWN LF 19 OPEN 1 AS 1 20 WIDTH 1 255 30 PRINT 1 TESTING 4g PRINT 1 CHR 19 _ Listing programs To list programs on the IBM PC use the LLIST command This directs the listing to the printer instead of the screen Program listings There are no program listings given here for the IBM PC because all the programs in the book are written for the IBM PC Appendix C Apple II Computers Apple computers require an interface board mounted inside the Apple ID and a cable to run Delta Star recommends that you use the grafstar interface for the Apple and by Star Micronics It comes complete with a cable and is easily installed A unique feature of the grafstar makes it possible to do some fancy dot graphics programming You can of course use many of the available parallel interface boards for the Apple IJ and an appropriate cable Setting the switches We recommend that you set the DIP switches in Delta as shown below when connecting it to an Apple II Recommended DIP Switch Settings for Apple 11 inch page size Normal print density 10 CPI pitch Normal characters 1 6 inch line feed a aper out detector active arallel interface
50. cs densities The numbers in the calendar itself are the ones that you created with download characters And the lines creating the boxes are made with Delta s block graphics characters Delta s flexibility in line spacing and its ability to mix many types of printing on one line make it possible to create complex forms like this calendar With Delta s advanced features it s easy to create a business form or letterhead and fill it out at the same time That s a productive printer Getting it All Together 121 S amp W Smith Willi ams 123 Burritt Street Hackensack New Jersey 07602 Microcomputer Consultants to the World TENUPERY 12 a 122 Delta User s Manual n YY IJK MI Chapter 10 Maintenance As almost any good mechanic will tell you dust and heat are the prime enemies of any mechanism and Delta is no exception The best maintenance is preventive So to start with we hope you ve found a clean dust free location with a comfortable tem perature range for your computer printer system and that you ll keep the printer s dust cover where it belongs in its place atop the printer Appendix A gives you further tips on locating Delta Cleaning Delta The second rule for long life is periodic cleaning Both inside 124 Delta User s Manual and outside of the case respond gratefully to periodic cleaning with a damp rag and alcohol Do
51. d in the tutorial section of this book The only 146 Delta User s Manual modifications that you might have to make are to the PR 1 and PR 0 commands as discussed above Chart program 199 PRA 1 119 PRINT CHR 9 255N 129 GOSUB 1000 GOSUB 2000 139 PRINT REGULAR 149 GOSUB 3999 159 PRINT DOUBLE STRIKE 169 PRINT DS 170 GOSUB 3999 189 PRINT EMPHASIZEDX 199 EM TRUE 297 GOSUB 3000 210 PRINT XDOUBLE STRIKE amp EMPHASIZED 229 PRINT DS EM 239 GOSUB 3000 249 END 1909 REM 1919 IT CHR 27 CHR 52 1020 RO CHR 27 CHR 53 1830 EN CHR 27 W CHR 1 1040 CE CHR 27 W CHR 9 1959 PI CHR 27 B CHR 1 1969 EL CHR 27 B CHR 2 1870 CO CHR 27 B CHR 3 1989 EM CHR 27 E 1999 CM CHR 27 F 1100 DS CHR 27 G 1119 CD CHR 27 H 1129 UN CHR 27 CHR 1 1130 CU CHR 27 CHR 1149 SP CHR 27 S CHR 9 1159 SB CHR 27 S CHR 1 1169 CS CHR 27 T 1179 RA CHR 27 1189 TRUE 1 FALSE 1190 RETURN 2000 REM 2050 PRINT 2060 PRINT EN NORMAL ENLARGED 2070 PRINT RA 2080 PRINT UN 2090 PRINT CO CONDENSED Apple IT Computers 147 2100 PRINT EL ELITE 2119 PRINT PI PICA 2120 PRINT CO CONDENSED 2130 PRINT EL 2140 PRINT PI PICA 2150 PRINT RA 2169 RET
52. e it slowly you should be doing some fancy plotting of your own before you know it If designing and calculating dot graphics images by laying them out on graph paper seems too tedious to you then let the computer do the work for you With your computer doing the calculations and Delta plotting the output you can come up with some terrific business graphs charts and mathematical function plots The best way to do this is to set up an array in memory This is your graph paper The first thing to do is to determine how big you want your output to be this will determine the size of your array If you have grandiose plans to fill an entire page with plot ter output you better have lots of memory in your computer With 60 dots per inch horizontally and 72 dots per inch vertically it takes at least 540 bytes of memory for each square inch of plotted area That doesn t sound so bad but an area 8 inches square requires over 32K Your array should be two dimensional just like graph paper where one dimension will be the number of columns of dots and the other dimension is the number of printing lines remember that you can have up to eight rows of dots per printed line Here s a program that will use calculated shape graphics to plot a circle As you ll see by changing a few lines it can be used to plot virtually any shape 120 DELTA PLOT 1000 Set program constants 1010 MAXCOL 75 MAXROW 14 1020 DIM BITZ MAXCOLZ MAXR
53. e replaced by any number from 0 to 255 and would set the line length to that value Two codes are a particular problem on the Apple II CHRS 7 and CHR 9 Try to avoid using these in dot graphics programs The Apple II computer uses CHR 9 as a printer initializa tion code It won t send it on to the printer There is a way to bypass this problem however You can change the printer initiali zation code to a value other than CHR 9 like this PR 1 PRINT CHR 9 CHR 1 This makes CHR 1 the printer initialization code and trans fers the problems to that code and allows you to use Delta s tabs There is one more way to sneak problem codes past the Apple II s operating system and that s to poke the codes directly to the output port To send ASCII code 9 for example you could do this 100 N 9 110 IF PEEK 49691 127 THEN 110 120 49296 N Line 110 checks the 5 status and when it s ok line 120 pokes the code to the printer Listing programs To make a listing of your BASIC programs on Delta from your Apple II computer you must take the following steps 1 Be sure that the program that you wish to list is in the memory of the Apple II 2 Direct the output to the printer by typing PR 1 3 Type LIST to start the listing 4 When the listing is finished type PR 0 to redirect the output to the screen Program listings Following are program listings in Applesoft BASIC for the main programs use
54. eces stuck in at either end of the platen the rubber cylinder that feeds the paper through the printer You ll want to save the screws along with the rest of the pack ing material and the shipping box in case you ever have to ship the printer Tape the screws somewhere on the box or packing You did fill in that registration card didn t you Installing the platen knob This is the knob that turns the rubber platen cylinder It fits into the hole on the right side of the printer case Just match the odd shaped hole in the knob with the same shape on the shaft you ll see inside the hole in the case and press on firmly Give the knob a few twirls to see that it s turning the platen easily and smoothly Removing the tractor unit The tractor unit shown in Figure A 4 comes mounted on the printer during shipment It is used only with sprocket feed paper When other papers are used such as single sheets or roll paper 134 Delta User s Manual Print head protector Platen protector Figure A 3 There are three pieces of cardboard to remove the unit should be removed in the following manner Remove the printer cover if attached Identify the snap levers as shown in Figure A 4 Pull both snap levers forward and at the same time Rock the tractor unit up and towards you about half an inch Now lift the tractor up and away from the printer Up to this point we ve been clearing the decks
55. ers of graphics data would follow 94 1 256 350 The loop between lines 40 and 110 is repeated 25 times this is what gives us the zigzag effect The loop from line 50 to line 70 creates the lines that slope up the loop between lines 80 and 100 prints the downward sloping lines This is an example of plotting a very simple mathematical function to create a design Later in this chapter we ll show something more complex Combining text and graphics It s also possible to mix text and graphics in one line This can be useful for labeling charts or graphs or even inserting fancy graphics in text Try adding these lines to our program 25 LPRINT WOW 115 LPRINT THIS IS GREAT Now if you run the program you should get a printout that looks like this But there is one thing to be careful of all graphics data must print on the same line The graphics command is turned off at the end of each line even if you have specified that more graphics codes follow To see what we mean change line 25 as shown and run the program 25 LPRINT WOW THE DELTA 10 IS SIMPLY AMAZING WOW THE DELTA 10 IS SIMPLY AMAZING 7s 5 oS eer re mun siue DI as zt THIS IS GREAT 104 Delta User s Manual To get the same effect Delta 15 users should change two pro gram lines 30 LPRINT CHR 27 CHR 75 CHR 188 CHR 2 49 FOR I 1 TO 59 This will make the zigzag pattern long enough to go off the page As you can see
56. for action so to speak Only two more things are left to do before we can start printing They are 1 attach the paper separator and paper guide racks and 2 install the ink ribbon Actually if you re planning to print on single sheets only you won t need to use the paper sepa rator and paper guide which are designed expressly to guide con tinuous paper roll or sprocket feed through the printer Attaching the paper separator and paper guide First identify the paper separator the large metal rack shown in Figure A 5 Insert one protruding end into the hole shown in the diagram then gently bend the other protruding end until it snaps into the opposite hole Follow the same procedure with the smaller metal rack which is the paper guide Setting Up Delta 135 Tractor unit Snap lever Snap lever Figure 4 Remove the tractor by pulling the snap levers towards you and tilting the tractor unit back Paper separator Paper guide Figure A 5 Attach the paper guide and paper separator 136 Delta User s Manual Important news If you get these in upside down they won t work So take another sharp look at Figure A 5 before we pass on to the final act installing the ink ribbon NOTE If you re wondering about the wire roll paper holder and holder shaft we ll explain these in Chapter 1 where we dis cuss the whole subject of paper selection paper feed and related topics Installi
57. gh we ve described the procedure including specific guidelines for making connections with several of the most popular computers used by Delta owners r i Appendix B IBM Personal Computer and Compag Computer Both the IBM Personal Computer and the Compaq computer function the same when connected to Delta We will discuss the IBM PC knowing that all we say works just as well for the Com ag Delta can connect to either a serial or a parallel interface in the IBM PC or IBM XT computers IBM calls a parallel interface a Parallel Printer Adapter and they call a serial interface an Asynchronous Communications Adapter You only need a cable to connect Delta to your IBM PC Your Delta dealer can furnish this cable or you can use a standard IBM PC parallel printer cable for the parallel interface We recommend that you set the DIP switches in Delta as shown below when connecting it to an IBM PC parallel interface Recommended DIP Switch Settings for IBM PC Switch Setting Function ania sie Normal print density 10 CPI pitch x a O Normal characters 1 6 inch line feed ON ON U S A Character set ON Paper out detector active Parallel interface interface No auto line feed 140 Delta User s Manual IBM PC Parallel Cable IBM PC Parallel Pin No Function Pin No Function 1 STROBE 1 5 D1 2 DO 3 D2 S 55 L 3 D1 4 D3 4 D2 5 D
58. he command syntax for all of the commands is the same just as you have learned it for the 5 K normal density command The number of columns to be printed is n1 256xn2 So what do these different modes do On the following pages are actual size reproductions of printouts of the same image printed in each of the four different densities They were all printed using the plotting program in this chapter with a rather complex set of formulas starting at line 2000 Normal density graphics 116 Quadruple density graphics Delta User s Manual Printing Dot Graphics 117 So if quadruple density looks so great why not use it all the time Let s try an experiment on your printer which will show just how the different density modes work Using the first program in this chapter change line 30 to try each of the different modes Just change the CHR 75 which is the ASCII code for to L and z in turn Your printouts should look something like this LYS PAR AD ALD VVV VV VY YY VYVYVN ESC L PRADA NINNI NISA 5 N W W W W WA AAA ESC z As you can see the different modes seem to condense the printed image So to get the same image in a higher density mode you must plot more points This requires twice as much memory for your array twice as much computing time and twice as much printing time but the results may be worth it
59. iate appendix Summary Control code Function ESC 2 m1 m2 Print n1 256xn2 columns of nor mal density graphics ESC L n1 n2 m1 m2 Print double density graphics ESC y n2 m2 Print double density graphics at double speed ESC z 2 Print quadruple density graphics Chapter 9 Getting it All Together You have now seen how all of Delta s functions work You surely have some good ideas of ways to use some of Delta s many capabilities With all the different printing styles available you won t run out of variations for quite a while And if there is a style of printing that Delta doesn t have built in you can develop your own with Delta s download characters Four different modes of graphics provide you with limitless ways to create pictures with Delta You have learned how to create both stored data and calculated shapes using Delta s graphics capabilities The calendar on the following page is a demonstration of just some of Delta s abilities You will recognize many of the things 120 Delta User s Manual that you have learned while reading this book The globe was created the same way as the calculated shape graphics that you learned about The S amp W logo was used to illustrate stored data graphics And you are sure to recognize many of the print styles used at the top of the calendar Those shaded bars are created by using different graphi
60. kor GOTO 6070 6969 GOSUB 6299 6070 PAZ ANG 6989 RETURN 6199 MM TXT X4 6192 LL LEFT MM Y4 6104 PP LEN PTXT PI E 6106 RR RIGHT MM 89 Y4 PP 6108 TXT X4 LL PTXT PI RR 6110 RETURN 6200 MM TXT X4 6202 PP LEN PTXT PI ja 6204 11 LEFT MM Y4 PP 6206 RR RIGHT MM 89 Y4 L 6208 TXT X4 LL PTXT PI RR 6210 RETURN 7990 REM 7095 I 1 E 7010 HOME PRINT PRINT PRINT c 7929 INPUT ENTER TITLE FOR CHART TI E 703 AS AL 19g KA 7040 HOME 7050 PRINT TOTAL SO FAR 5 AST 160 Delta User s Manual 7060 PRINT TOTAL REMAINING AL 7070 INPUT ENTER FOR FIELD PCT I 7080 IF PCTZ I gt ALZ OR PCTZ I THEN PCTZ I AL 7099 AL AL PCTZ I 7100 AS AS PCT4 I 7110 INPUT ENTER DESCRIPTION OF FIELD PTXT I 7120 IF LEN PTXT I gt 15 THEN PRINT FIELD TOO LONG 15 CHAR GOTO 7119 7130 IF AL THEN GOTO 7299 71449 I I 1 7150 GOTO 7040 7200 NP I 7219 IF NP 1 THEN 7040 7220 HOME 7230 RETURN Appendix D TRS 80 Computers All that s required to connect Delta to your TRS 80 is a cable It is available at your Delta dealer When connecting Delta to a TRS 80 we recommend that you set the DIP switches in Delta as shown below Recommended DIP Switch Settings for TRS 80 11 inch page size TRS 80 Model I Parallel Cable Del
61. ng the ribbon Telling you how to set the ribbon is like writing a set of instructions on how to tie your shoelaces It takes a lot longer to describe it than it does to do it So you ll be smart to study the several figures shown here they ll tell you all you really need to know Nevertheless if you feel better following written instructions read on Ribbon Print head ds I L3 s a Eyelet Changeover lever W 2 Ribbon spool Delta 10 ribbon path Ribbon Print head _ Ribbon guide gt 4 Eyelet Ribbon spool Changeover lever Delta 15 ribbon path eo ae a a ta a Figure A 6 You ll find this diagram of the ink ribbon path inside your Delta for easy reference when you change ribbons After looking carefully at the Figure A 6 begin by turning the power off and removing the printer cover Then slide the print Setting Up Delta 137 Ribbon spool Figure A 7 The eyelet should be between the ribbon spool and the changeover lever Ribbon guide Ribbon p Print head k Figure A 8 You may want to use a ballpoint pen to press the ribbon guide Lowards the platen and work the ribbon down beside it 138 Delta User s Manual head gently to the center of the printer Next set one of the ribbon spools a ribbon spool post being careful to have it wind unwind exactly as shown in the figures The s
62. o Osborne Kaypro and CP M 179 direct them to the printer To list programs on the printer just type LLIST To direct program output to the printer use LPRINT in place of PRINT Some versions of Microsoft BASIC will add a carriage return and line feed at the end of every 80 or sometimes 132 characters To print lines longer than 80 or 132 characters as when doing dot graphics you must define a wider printer width The follow ing statement will prevent the computer from inserting unwanted codes 19 WIDTH LPRINT 255 Program listings The following programs are in Microsoft BASIC for the Osborne 1 Chart program 100 WIDTH LPRINT 255 110 GOSUB 1999 120 GOSUB 2999 130 LPRINT XREGULAR 149 GOSUB 3099 150 LPRINT XDOUBLE STRIKEX 169 LPRINT DOUBLE STRIKE 170 GOSUB 3000 189 LPRINT XEMPHASIZED 199 EMPHASIZED TRUE 200 GOSUB 3000 210 LPRINT XDOUBLE STRIKE AND EMPHASIZED 229 LPRINT DOUBLE STRIKE EMPHASIZED 230 GOSUB 3000 249 END 1880 REM 1060 ITALIC CHR 27 CHR 52 1070 ROMAN CHR 27 CHR 53 1099 ENLARGED CHR 27 CHR 87 CHR 1 119g NOT ENLARGED CHR 27 CHR 87 CHR 1110 PICA CHR 27 CHR 66 CHR 1 1120 ELITE CHR 27 CHR 66 CHR 2 1139 CONDENSED CHR 27 CHR 66 CHR 3 1150 EMPHASIZED CHR 27 CHR 69 1169 NOT EMPHASIZED CHR 27 CHR 70 1170 DOUBLE STRIKE CHR 27 CHR 71 180 Delta User s Manual 1189 NOT DOUBLE STRIKE CHR 27 CHR
63. of graphics data will connect vertically The actual printing is done in the loop between lines 250 and 280 line 260 sends the graphics control code to Delta and line 270 sends one line of graphics data The printout from the program is shown right below the program Printing Dot Graphics 105 Figure 8 2 By laying out the logo on graph paper you can calculate all of the graphics data 100 PRINT S amp W LOGO 110 LINE 8 CHR 27 CHR 65 CHR 8 Set line spacing to 8 dots 120 LINE 12 CHR 27 CHR 59 Set line spacing to 1 6 139 GRAPHIC CHR 27 CHR 75 Select dot graphics 140 DIM LOGO 4 159 WIDTH LPT1 255 1 16 READ DATA TA 179 FOR ROW 1 TO 4 189 FOR COLUMN 1 TO 199 199 READ P 200 LOGO ROW LOGO ROW CHR P 210 NEXT COLUMN 220 NEXT ROW 230 PRINT LOGO 240 LPRINT LINE 8 259 FOR ROW 1 TO 4 269 LPRINT GRAPHIC CHR 19 CHR 9 279 LPRINT LOGO ROW 289 NEXT ROW 106 Delta User s Manual 290 LPRINT LINE 12 399 ROW 1 31g DATA 9 9 9 9 1 3 7 7 15 14 14 14 35 15 320 DATA 15 15 0 0 0 0 0 0 0 0 0 1 3 3 7 7 15 14 14 14 320 DATA 14 15 7 7 7 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 340 DATA 0 6 7 7 7 7 7 7 7 7 6 6 0 7 7 7 7 7 7 250 7 7 7 7 7 0 0 7 7 7 7 7 7 7 7 7 7 0 0 0 360 ROW 2 379 DATA 0 0 60 255 255 255 255 255 143 15 7 7 7 7 3 3 3 131 193 241 380 DATA 240 240 0 0 0 0 0 0 0 1 121 253 253 255 255 25
64. ot graphics you have control over the firing of every single pin on Delta s print head In Figure 8 1 you can see that we ve labeled each pin on the print head with a num ber as we did with download characters you should note one 102 Delta User s Manual important difference this time the top pin has the highest value for download character definitions it is the bottom pin And spec ifying pins to fire is done in the same way to fire the second pin from the top for instance send a CHR 64 Firing several pins at once is done in a similar fashion For example to print the first third and fourth dots add their values 128 32 16 to send this total CHR 176 00000000 not used Figure 8 1 Starting with the most significant bit at the top each pin of the print head is assigned a value which is a power of two Note that for 7 bit computers the top pin has a value of 64 and the bottom two pins are unused A short program should demonstrate how to implement the graphics command The program below gave us this printout 19 PRINT GRAPHIC PATTERN 20 WIDTH LPT1 255 30 LPRINT CHR 27 CHR 75 CHR 94 CHR 1 49 FOR I 1 TO 25 59 FOR J Q TO 6 69 LPRINT CHR 2 J 70 NEXT J 80 FOR J 6 TO 9 STEP 1 99 LPRINT CHR 2 7 100 NEXT J 110 NEXT I Printing Dot Graphics 103 120 WIDTH LPT1 89 130 LPRINT In line 30 we ve selected normal density graphics and said that 350 charact
65. pool should fit so that the drive pins engage the spool Next you start threading the ribbon The only tricky part is around the print head so pay particular attention to Figure A 8 The ribbon should fit in the slot between the print head and the ribbon guide Use a ballpoint pen to work the ribbon down between the print head and the ribbon guide The other thing to watch is the position of the eyelet near the end of the ribbon This works exactly like a typewriter ribbon eyelet it can t get by the slotted guide which causes the ribbon to automatically reverse its direction Finally set the other spool snugly on the opposite spool holder then turn the spools by hand four or five turns in each direction to verify that everything is properly set and ready to roll Installing the printer cover Now that you ve completed the steps described in this Appen dix A you may want to mount the printer cover in place to keep dust and dirt away It s a simple procedure Merely fit the two tabs at the back edge of the cover into the two slots right next to the two holes where you fastened the wire rack paper separator Then drop the other end down gently until it sits firmly on the printer That s all To remove the cover just reverse the process lift up the front and pull it out of the slots at the back Connecting Delta to your computer To complete the installation you ll need to connect Delta to your computer In Appendixes throu
66. r graphic image will be remember that there are 60 col umns of dots per inch in normal density Then comes the fun part converting one number the number of columns of dots into two Why is it necessary to use two numbers to tell Delta the num ber of graphics codes to expect Because the largest number we can send one byte that s what the BASIC CHR function sends one byte is 255 And with normal density graphics it s pos sible to have a graphics image as wide as 480 dots on Delta 10 or 816 dots on Delta 15 So to figure out how many columns of graph ics data to expect Delta multiplies n2 by 256 and adds the value of n1 If you divide the number of columns by 256 then n2 is the guotient and n1 is the remainder why not let your computer figure it out for you if the number of columns is assigned to varia ble X then N1 X MOD 256 and 2 INT X 256 Table 8 1 might make things even easier Table 8 1 Calculating n1 and n2 If the number of columns x ranges from and n2 is o 256 to 511 I 512 to 767 2 3 4 1280 to 1535 5 1536 to 1791 1536 6 1792 to 2047 7 2048 to 2303 x 2048 8 9 2304 to 2559 x 2304 2560 to 2815 x 2560 2816 to 3071 x 2816 3072 to 3264 x 3072 Specifying the graphics data tj Now that we ve told Delta data how much data to expect we better figure out how to send that information Just as you do with download characters with d
67. rge noise producing motors Providing the right voltage which is not over 10 more or less than 120 volts AC WARNING Extremely high or low voltage can damage your printer What have we here Let s take a look at what s in the box Take it slow and easy and check each item in the box against Figure A 1 There should be exactly 11 items One important item is the printer registration and warranty card Now is the time to fill it in and mail it It s a good warranty and you ll like the protection it gives you Let s move on to the next step Removing the shipping screws There are two shipping screws on the bottom of the printer 132 Delta User s Manual Figure A 1 Inside the carton you should find 1 printer 2 printer cover 3 paper guide 4 paper separator 5 roll paper holder 6 roll paper shaft 7 ink ribbon 8 platen knob 9 spare fuses 10 User s Manual 11 warranty card used to hold the internal chassis to the external frame during ship ping To get at these carefully place the printer upside down ona soft surface like a foam cushion Remove the two screws with a Phillips screwdriver as shown in Figure A 2 Setting Up Delta 133 Shipping screw Shipping screw Figure A 2 Remove the shipping screws before using Delta Removing the packing from inside the printer Remove three cardboard pieces a large flat piece protecting the print head and two smaller pi
68. rinting Dot Graphics 113 4080 GOSUB 5000 2090 NEXT 1 4100 PRINT CHR 29 CHR 295 CHR 175 4110 RETURN 5000 Plot a point at X1 Y1 5010 XX X1 LXFAC YY Yl LYFAC 5020 COL INT XX 1 5030 ROW INT YY 6 5040 XIT INT YY ROWZ 6 1 5059 BIT COL ROW BIT COL ROW OR MASKZ XITZ 5060 RETURN 6000 Place text fields in the proper location 6010 MIDANG ANG PREVANGZ 2 6929 RANG MIDANG 6 28 360 6030 INT 2Q SIN RANG INT 22 COS RANG 6040 22 X3 Y4 49 6059 IF MIDANG 27B OR MIDANG 99 THEN MID TEXT X4 Y4 PIECETEXT PIECE ELSE MID TEXT X4 Y4 LEN PIECETEXT PIECEZ PIECETEXT PIECEZ 6060 PREVANG ANG 6070 RETURN 7000 Accept Data from Screen 7010 CLS PRINT PRINT PRINT 7020 INPUT ENTER TITLE FOR CHART TITLE 7030 AMT SOFARZ 0 AMT LEFT 199 704 FOR I 1 TO 24 7959 CLS PRINT ENTER PARAMETERS FOR PIE CHART 7060 PRINT TOTAL SO FAR ns 707 PRINT USING AMT SOFAR 7080 PRINT TOTAL REMAINING 7090 PRINT USING AMT LEFT 7109 PRINT PRINT PRINT PRINT 7110 INPUT ENTER PERCENTAGE FOR FIELD PCT 1I 7120 IF PCTZ I AMT LEFTZ OR PCTZ I Q THEN PCTZ I AMT LEFT 7130 AMT LEFT AMT LEFT PCTZ 1 7140 AMT SOFAR AMT SOFAR PCT I 7150 PRINT PRINT 7160 INPUT ENTER DESCRIPTION OF FIELD PIECETEXT I vM eme w 114 Delta User s Manual 7170 IF LEN PIECETEXT I
69. rs which fasten the print head Then place the new print head in position and attach it with the same two screws Apply screw lock an adhesive available at hardware stores to the heads of the screws Finally insert the head cable with the printed side up tightly into the head connector on the cable board Be sure that it s a good solid connection or it could cause problems 128 Delta User s Manual Washer Print head Head cable Head cable board Head connector Figure 10 4 Replacement of Delta s print head is simple Back to perfect printing Appendix 130 Delta User s Manual Appendix A Setting Up Delta In this appendix we ll show you how to unpack your new Delta printer set it up in the right location and get it ready for you to load it with paper and start printing But first Where shall we put it Before you do anything else give some thought to where you ll be using your printer Obviously it will be somewhere near your computer And both computer and printer will lead longer healthier lives if they like their environment For instance we rec ommend Placing the printer on a flat surface Keeping it out of direct sunlight and away from heat producing appliances Using it only in temperatures where you are comfortable Avoiding areas with lot of dust grease or humidity Giving it clean electricity Don t connect it to the same circuit as la
70. sing numeric constants to dimension the array we used the vari ables MAXCOL and MAXROW This way if your computer has enough memory and you want to plot a larger image all you need to change are the values in line 1010 The array MASK contains the values of the dots In order to make this program run on the most computers we re using only six pins for graphics With many computers you can use all eight available pins In lines 1060 and 1070 we ve defined some other variables you ll be interested in LX LXFAC LY and LYFAC are used as scaling fac tors By changing these values you can change the size of your printed image or even distort it you can for example make our circle print as an ellipse Experiment a little bit The main calculations for plotting the image are done starting at program line 2000 This is where you put the formulas that you want to plot By changing just the lines between 2000 and 3000 with some creative mathematics you can plot any function limited only by your imagination Some examples are shown at the end of this section What the program section starting at 2000 actually does is to calculate starting and ending points for a line in our circle the lines are very short sometimes the starting and ending points are the same The coordinates of the starting point of the line are assigned to variables X1 and Y1 The line ends at point X2 Y2 When these coordinates have been calculated a subro
71. ta TRS 80 Model I Pin No Function Pin No Function 1 STROBE _ n 1 STROBE 2 Di lt oO 3 D1 3 D2 5 D2 4 D3 7 D3 5 D4 9 D4 6 D5 r 11 D5 7 D6 13 D6 8 D7 s D7 9 D8 17 D8 gt 162 Delta User s Manual TRS 80 Model II Parallel Cable TRS 80 Model II Pin No Function Pin No Function STROBE STROBE D2 D2 D3 gt D3 D4 MITTERE 9 D4 D5 oe D5 D6 13 D6 D7 ari tuo D7 D8 rtctcttt0toi ii gt gt 17 D8 ACK BUSY n1 mr n 1 D1 3 D1 m 5 7 TRS 80 BASIC You may have to initialize your Model II to direct LPRINT to the printer Use the SYSTEM FORMS command to do it TRS 80 uses another version of Microsoft Basic Mosi of the programs in this book will work just as they are but the TRS 80 does have a few unique problem codes They are O 10 11 and 12 None of these are passed properly to the printer You can bypass the TRS 80 s BASIC and send these codes directly to the printer with the following short routine The varia ble N must be set equal to the code that you wish to pass in our example it s 0 9g N 9 100 IF 14312 263 THEN 100 11 14312 N Or you can use this special printer driver that will solve all your problems Just run this program first and then any codes sent by a BASIC program will be sent directly to the printer This program is for the TRS 80 Model III
72. this whenever the case appears to be getting dirty always being careful to avoid dripping alcohol on the printer mechanism To clean the inside of dust and paper lint use a nice soft brush after first removing the printer s upper case in the following manner Removing the Upper Case First turn the power switch off and unplug Delta Remove the tractor unit Remove the platen knob Next remove the two Phillips screws per Figure 10 1 You ll find three screws on the larger Delta 15 Figure 10 1 To remove Delta s upper case remove the screws Lift up the upper case from the back then pop out the front of the case by pushing outward with your thumbs where the plas tic tabs fit into the bottom case Then stand the upper case on its end right next to the printer so the short colored wires attached to the control panel remain connected It s a good idea to keep the case from falling over by Maintenance 125 setting the corner of the printer on the edge of the case as shown in Figure 10 2 Figure 10 2 Tilt the cover up so that you don t have to disconnect the control panel wires NOTE TO THE UNWARY When cleaning the inside of Delta be very careful not to bend or injure any of those tiny wires or other little gizmos that lie exposed and defenseless against a heavy handed touch Besides the periodic cleanings the only other maintenance you ll encounter will be changing the ink ribbon see Appendix
73. utine call is made to line 4000 This subroutine calculates the coordinates of individual points along that line After these coordinates have been determined the subroutine at line 5000 is called This routine turns on an individual dot in our array called BIT Keep in mind that no printing has been done yet the computer is still drawing the image on its graph paper in memory The way an individual dot is turned on is using the logical OR function in line 5050 When all the points have been plotted in memory printing begins at line 3000 We first set the line spacing to 6 72 inch using the ESC command This is so that there are no gaps between rows of dots Then the loop from line 3020 to line 3090 prints the dot graphics image one line which is six dots high at a 110 Delta User s Manual time The variable A is used to build a string of all the columns of BIT in a given row As you can see by taking the program in small pieces and analyzing it graphics programming does not have to be difficult If you want to try some other plots try these replace lines between 2000 and 3000 with the lines below The printouts from i each program are shown below the listing 2000 Plot curve 2010 RAD 9 2020 FOR ANGZ TO 369 STEP 15 2030 RANG ANG 6 28 369 20949 RANG2 ANG 150 6 28 369 2959 X1 RADXCOS RANG 19 Y1 2060 X2 RADXCOS RANG2 19 Y2 RADXSIN RANG2 1g M 2070 GOSUB 4000
74. ype fuse Then if the printer still isn t working better call on your Delta dealer for help Incidentally it makes it easier to remove and replace the fuses if you have a long flat screwdriver and some needlenose pliers handy The fuses are small and the secondary fuse is sort of hard to get at without these particular tools But be careful not to crush the glass fuses with the pliers We ve found the following technique works pretty well for replacing the secondary fuse Using the long flat screwdriver pop one end of the fuse loose from its holding clamp and stand it on end Then grab the loose end with the needle nose pliers and pull it out To insert the new fuse lower it into place with the pliers so that it lies flat against the two holding clamps Then use the long screwdriver to push each metal end of the fuse into its adjacent holding clamp Replacing the Print Head As mentioned earlier the print head has a long life printing perhaps 100 000 000 characters before it wears out You ll know when that happens when the printout is too faint for your taste even after replacing the ink ribbon WARNING The print head gets hot during operation so let it cool off for awhile if necessary to avoid burning your fingers To replace the print head start by removing the printer cover and the ink ribbon Then unplug the print head cable see Figure 10 4 while holding down the head cable board Next remove the two screws and washe

Download Pdf Manuals

image

Related Search

Related Contents

  Operating Instructions  Rexel Active Popper Pocket Standard Capacity Portrait Clear (5)  Zebra MC3190  PUX - Dwyer Instruments, Inc.  Manual de Serviço  Panasonic WV-SW458E surveillance camera  

Copyright © All rights reserved.
Failed to retrieve file