Home

Radix 10/15 USER`S MANUAL

image

Contents

1. WN Personal Computer amp Compaq 191 settings of DIP switch B in Radix The second re directs printer output to the serial port The switches on DIP switch B 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 Table B 3 Serial switch settings The serial cable shown below will work with DIP switch B set as shown above to connect Radix to a serial interface on the IBM Table B 4 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 192 Radix User s Manual BASIC programming 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
2. ER ET UE M NET 2 eT CEN m Chapter 14 Basic Maintenance As almost any good mechanic will tell you dust and heat are prime enemies of any mechanism and Radix 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 temperature range for both you and your computer printer system Appendix A gives you further tips on locating Radix Cleaning Radix The second rule for long life is periodic cleaning Both inside and outside of the case and covers respond gratefully to periodic 172 Radix User s Manual cleaning with a damp rag and alcohol Do this whenever the case appears to be getting dirty always being careful to avoid dripping alcohol on the printer mechanism To remove dust and paper lint from inside the tractor and printer areas it s best to use a soft brush but be very very careful not to bend or injure any electronic parts or wiring as they are vulnerable to a heavy handed touch Besides the periodic cleanings the only other maintenance you ll likely encounter will be changing the ink ribbon cartridge replacing a blown fuse or replacement of the print head after a long period of use Replacing the Ink Ribbon When the printing gets too faint for comfortable reading it s time for a new i
3. 8 92 34 16 65 65 4 34 29 8 Enter ASCII code 33 126 OR 150 254 Figure 11 17 DLEDIT screen display shows ASCII code and character layout 132 Radix User s Manual A Set ASCII code To change the ASCII code which is shown in the first status line press You will then be prompted for the code you want to use C Clear all dots Press to get a clean screen Q Quit closes all files and ends the program R Perform ROM copy The ROM character set will be copied to download RAM immediately f lt gt 1 Move cursor The arrow keys are used to move the cursor around the grid Ins Insert The insert key places a dot at the current cursor loca tion Del Delete The delete key deletes a dot from the current cursor location Wider Use the key to increase the proportional width which is indicated by the row of asterisks above the grid The maximum width is 11 columns Narrower Use the key to decrease the proportional width The minimum width is four columns D Descender This command toggles the descender flag which is shown in the first status line If it is equal to zero the top seven pins of the printhead are used if it is equal to 1 the bottom seven pins are used to create a descender character Enjoy the program 10 Program to allow editing down load characters 20 for the RADIX printer 3g AQ Initialization 50 D
4. Chapter 10 Special Features of the Radix Printer In the previous chapters we have learned about several groups of control codes In this chapter we will look at more con trol codes These codes don t fit neatly into any of the groupings that we have studied but they add a lot of capability to Radix So here goes Commands covered in this chapter include Bell e Master reset Unidirectional printing Eighth bit control Block graphics Radix User s Manual International character sets e Macro instruction Now hear this You may have heard Radix s bell if you have ever run out of paper And you may have wondered why it s called a bell when it beeps instead of ringing It s a long story that goes back to the early days of computers when teletype machines were used for com puter terminals These mechanical marvels had a bell in them that could be heard for blocks This bell was used to signal the operator that something needed attention The code that the computer sent to the teletype machine to ring the bell was reasonably enough called a bell code Well the name bell code is still with us even if the bell has changed to a beeper and alot of people still call the beeper a bell even if it doesn t sound like one So with our trivia lesson out of the way let s see how we can ring the bell The code to sound Radix s bell is CHR 7 which is ASCII code 7 or BEL Any time Radix receives this code it
5. 44 m 0 Bu Radix User s Manual Table 13 1 Menus of Radix setup program verer ror peper 5 iu gomez ence z8 Tf 220 HH zene 481556 Hzc CEES Pes SER 228955 BEARS 7 17 MEE FE x E qu ww aii gy Ul aos aye pinos ape mius 3r eq qas m asr Putting Radix to Work For You 163 It may take a while to enter it but we think that in the long run this program will save you time when you want to set mar gins or tabs or any of Radix s other advanced features Enjoy 19 Program to setup RADIX printer as directed 2g 39 Initialize ESC CHR 27 TB 25 DIM TBS 256 59 OPEN 1 1 AS 1 WIDTH 1 255 KEY OFF 60 70 Display MAIN menu 89 TITLES MAIN MENU 90 GOSUB 2290 10 PRINT TAB TB Exit 110 PRINT TAB TB 1 Select CHARACTER SET 120 PRINT TAB TB 2 Select PRINTING MODES 130 PRINT 3 Select PITCH 149 PRINT TAB TB 4 Select LINE SPACING 15 PRINT TAB TB 5 Set MARGINS TABS amp FORMS 16 GOSUB 238g 170 IF 5 0 OR S 5 THEN BEEP GOTO 160 189 IF S THEN CLOSE 1 CLS END 190 ON S GOSUB 210 480 350 1240 640 209 GOTO 69 21g 220 Subroutine to display CHARACTER SET menu 230 TITLE CH
6. 650 Subroutine to display MARGINS TABS amp FORMS menu 669 TITLES MARGINS TABS amp FORMS MENU 679 GOSUB 2290 689 PRINT TAB TB Return to main menu 699 PRINT TAB TB 1 Set HORIZONTAL TABS 799 PRINT TAB TB 2 Set VERTICAL TABS 710 PRINT TAB TB 3 Set LEFT MARGIN 720 PRINT TAB TB 4 Set RIGHT MARGIN 730 PRINT TAB TB 5 Set TOP MARGIN 749 PRINT TAB TB 6 Set BOTTOM MARGIN 75 PRINT TAB TB 7 Cancel TOP amp BOTTOM MARGINS 760 PRINT TAB TB 8 Set PAGE LENGTH 770 GOSUB 2380 789 5 0 OR 858 THEN BEEP GOTO 779 790 IF S 0 THEN RETURN 899 ON 5 GOSUB 1820 2120 910 970 1030 1090 1150 1650 81g GOTO 649 Putting Radix to Work For You 820 830 Subroutine to select PICA pitch 849 S ESC B CHR 1 GOSUB 2460 RETURN 859 860 Subroutine to select pitch 870 S ESC B CHR 2 GOSUB 2460 RETURN 880 899 Subroutine to select CONDENSED pitch 999 S ESC B CHR 3 GOSUB 2469 RETURN 919 929 Subroutine to set LEFT MARGIN 930 GOSUB 2500 940 INPUT Enter new left margin 1 255 X 959 IF X 1 OR X gt 255 THEN BEEP GOTO 930 960 S ESC CHR X GOSUB 2460 RETURN 979 989 Subroutine to set right MARGIN 990 GOSUB 2500 100 INPUT Enter new right margin 1 255 X 1010 IF X 1 OR X 255 THEN BEEP GOTO 999 1020 S ESC Q CHR X GOSUB 2469 RETURN 1030 19
7. MM H Z J H 2 J 1 NEXT J GOSUB 4100 RETURN REM PRINT A COLUMN VALUE FOR I 1 TO 3 VTAB 16 I 4 H x 2 PRINT 3 NEXT I LV STR MM H FOR I 1 TO LEN LV VTAB 16 I 4 H 2 PRINT MID LV I 1 NEXT I 4120 VTAB 23 HTAB 1 RETURN Piechart program 4 HOME 5 PRINT Please Stand By 1g A 768 20 FORI A TO A 12 30 READ B 35 POKE I B 49 NEXT I 5 DATA 32 74 255 165 250 5 251 69 DATA 133 252 32 63 255 96 100 REM PIECHART Mm Wo ud Ue Se duu M a Apple II Computers 203 110 DIM BIT 199 36 A 36 PCT 25 TXT 48 PTXT 25 120 ES CHR 27 LF CHR 10 130 FF CHR 12 VT CHR 11 149 EM ES E CE ES F 145 CHR 27 CHR 12 159g FOR I 1 TO 148 SP SP CHR NEXT I 169 FOR I 1 79 88 55 NEXT I 1000 REM SET PROGRAM CONSTANTS 1010 MASK 1 64 MASK 4 8 1020 MASK 2 32 MASK 5 4 1030 MASK 3 16 MASK 6 2 104 LX 29 LY 29 105 XFAC 19 LX YFAC 216 LY 1969 FOR I 0 TO 48 197g TXT I 55 1080 NEXT I 1090 GOSUB 7000 1092 PRINT PRINT PRINT PRINT 1993 PRINT THIS PROGRAM TAKES ABOUT 1094 PRINT 2 MINUTES TO RUN PLEASE 1995 PRINT TURN ON YOUR PRINTER AND 1996 PRINT STAND BY M 1097 PRINT PRINT PRINT 1998 FOR I
8. Descender Width n Descender 16 Width Format Esc 1ninm m Figure 11 4 Use this grid or one similar to it to define your own characters below the baseline of the rest of the characters One bit in the download character definition command is used to tell Radix whether a character is to be treated as a descen der or not We ll get to the command in due time For now if your character uses the top seven dots write in a zero next to the word Descender on the layout grid if it uses the bottom seven dots write in a one In our example we ll want the bottom of the bullet toline up with the baseline of the other characters so it will not be a descender As shown in Figure 11 5 we ve written in 0 on our grid Rule 2 Dots cannot overlap As you can see in Figure 11 5 our bullet will print fairly solid But you may ask why not make it really solid and print all the intermediate dots as shown in Figure 11 6 Because the dots that straddle the vertical lines in the grid actually overlap those inside the boxes If we tried to print overlapping dots Radix s print head would have to slow down and back up to print both dots not very efficient To avoid this inefficiency Radix will not allow you to define a character like Figure 11 6 Actually you can define it but 114 Radix User s Manual m m m m m m m m n Descender Width n Desc
9. ESC 2260 2270 Subroutine 2280 S ESCH 2290 2300 Subroutine 2319 CLS to set VERTICAL TABS P MAX 29 GOSUB 1859 to select EMPHASIZED printing E GOSUB 2469 RETURN to eancel EMPHASIZED printing F GOSUB 2469 RETURN to select DOUBLE STRIKE printing G GOSUB 2469 RETURN to cancel DOUBLE STRIKE printing H GOSUB 2460 RETURN to print menu title 2329 PRINT PRINT PRINT 2339 PRINT TAB 27 RADIX PRINTER SETUP 2340 PRINT 2350 PRINT TAB 8g LEN TITLE 2 236 PRINT PRINT 2270 RETURN 2380 2399 Subroutine 240 LOCATE 29 18 to input menu selection PRINT Enter selection or press P for print sample 2419 C INKEY IF C THEN 2410 2415 IF C P OR C p THEN GOSUB 3000 GOTO 2380 242 IF C g 2430 S VAL C 2440 LOCATE 29 18 2459 RETURN 2460 OR C 9 THEN GOTO 2410 PRINT STRING 59 2470 Subroutine to output command string 2480 PRINT 1 S 2499 RETURN 2599 Putting Radix to Work For You 169 2510 Subroutine to clear screen amp position cursor 252 CLS LOCATE 19 TB RETURN 300 391g Subroutine to print sample 3020 FOR I 1704 FOR J 33 TO 126 3030 PRINT 1 CHR J 3040 NEXT PRINT 1 CHR 19 NEXT 3050 RETURN 170 Radix User s Manual ku o e e ER EIER HE
10. International character sets Radix is a multi lingual printer for it can speak in eight lan guages Radix changes languages by changing 11 characters that are different for the different languages These sets of characters Table 10 5 International character set commands Country England Germany Denmark ESC 7 CHR 3 Sweden taly Special Features of the Radix Printer 105 4 172 4 i73 o 174 175 180 t 181 F 1082 m 185 m 188 189 J 190 1 1 19 197 198 199 gt 204 4 205 H 206 k Il 212 t 1 H 214 219 6 220 221 e fee 2205 f 229 a TRO o 221 m 257 238 4 279 m r 348 1 B46 247 5 d are called international character sets The control codes to select the international character sets are given in Table 10 5 The characters that change are shown beneath their ASCII code in Table 10 6 Table 10 6 International character sets esa tata PrE EE PEE ET EAT 4 TAEZ England 8 8 Denmark France a e e eu e Sweden A A The macro control code The last of our group of miscellaneous control codes is defini tely not the least It is a user defined control code called a macro control code The term macro is f
11. The second status line shows the proportional width of the character being defined The asterisks extend over the columns of dots to indicate the actual width when the character is printed using the ESC X command Below the layout grid is the prompt line This will appear only when you need to enter information such as the ASCII code of the character you wish to define To the right of the layout grid is the command menu All of the valid commands are defined here if you press any other key the computer will beep and no action will be taken Below each com mand is defined in greater detail P Print the character This command takes the character that is currently on the screen and prints it in condensed elite pica expanded pica and proportional widths so you can see how it looks In addition it prints the complete character set in both normal and proportional widths At the end of the print out is the data statement necessary to download this charac ter through a BASIC program ASCII CODE 48 8 DESCENDER 8 WIDTH titii EH OH HUE ELE EE NE FT ote he to ek nee w 1 4 P Print the character 8 Set ASCII code 4 C Clear all dots 8 Quit 1 Perfora ROM copy 146 Move cursor 16 4 ins place a dot del resove a dot make character wider ake character narrower D Toggle descender mode p
12. 1700 LPRINT STR ASC MID REC I 1 1719 NEXT I LPRINT LPRINT LPRINT LPRINT RETURN 1720 1730 Subroutine to input desired character code 1749 LOCATE 23 5 1759 INPUT Enter ASCII code 33 126 OR 169 254 AS 1760 GOSUB 2010 1770 IF AS 33 OR AS 254 THEN BEEP GOTO 1749 1789 IF AS 169 AND AS gt 126 THEN BEEP GOTO 1749 E 1819 GOSUB 1829 RETURN 1829 1830 Subroutine to display header 184 LOCATE 1 1 PRINT ASCII CODE 5 1859 PRINT CHR AS AND amp H7F 1860 IF AS 127 THEN PRINT 128 1870 PRINT n 1880 LOCATE 1 39 PRINT DESCENDER DESC Creating Your Own Characters 137 190 LOCATE 3 19 PRINT STRING 33 1919 LOCATE 3 2 PRINT WIDTH STRING PROWID 3 1929 RETURN 1939 1949 Subroutine to clear current character 1959 PROWID 11 DESC 0 1969 FOR H 1 TO 11 MM H Q NEXT H 197 GOSUB 419 RETURN 198g 199g Subroutine to perform a ROM copy 209g LPRINT CHR 27 CHR RETURN 2010 2020 Subroutine to erase query message 2030 LOCATE 23 5 PRINT STRING 70 2049 RETURN 2959 2060 Subroutine to build command string 2070 REC CHR 27 CHR 1 2080 REC REC CHR AS CHR DESC 16 PROWID 2090 FOR I 1 TO 11 REC REC CHR MM I NEXT I 2100 RETURN Summary Control code Function ESC CHR 1 n1 n2 m1 m11 Defines download chara
13. 2230 IF TBS I THEN I 1 GOTO 2279 2249 IF TBS I TBS I 1 THEN 2179 2250 I I 1 IF I gt MAX THEN 2179 2260 GOTO 2219 2220 T I 1 228 S S CHR TBS I IF TBS I lt gt THEN 2279 2285 GOSUB 2739 2290 RETURN 2200 PRINT PRINT TB INPUT ENTER INTERVAL Apple II Computers 211 2319 IF X lt OR X gt 255 THEN PRINT BEEP GOTO 2080 2320 FOR I 1 TO 255 STEP X 2339 MAX MAX 1 IF MAX THEN 2250 2349 S S CHR I NEXT I 2350 S S 0 GOSUB 2720 RETURN 2369 REM VERTICAL TABS 2380 S ESC P MAX 20 GOSUB 2080 2390 RETURN 2400 REM SELECT EMPHASIZED AS 2429 S ESC E GOSUB 2720 2 2430 RETURN 2449 REM CANCEL EMPHASIZED 246 S ESC F GOSUB 2720 2470 RETURN 2480 REM DOUBLE STRIKE 2500 S ESC G GOSUB 2720 2510 RETURN 2520 CANCEL DOUBLE STRIKE 2549 S ESC 00508 2730 oum 2550 RETURN 2560 REM PRINT MENU TITLE 2570 HOME 2580 PRINT PRINT PRINT 2599 PRINT TAB 6 RADIX PRINTER SETUP 2600 PRINT 2619 PRINT 49 LEN TI 2 TI 2620 PRINT PRINT 2630 RETURN 2650 REM SELECTION 2660 VTAB 19 HTAB 1 PRINT HIT P FOR SAMPLE PRINT 2665 VTAB 21 19 PRINT SELECTION 2679 GET C 2675 IF C P THEN GOSUB 2000 GOTO 2650 pos 2680 IF C Q OR C 9 THEN PRINT BEEP GOTO 2679 ii 2699 S VAL C T 2700 VTAB 20 amp 2719 F
14. SET VERTICAL TABS 720 PRINT TAB TB 3 SET LEFT MARGIN 720 PRINT TAB TB 4 SET RIGHT MARGIN 749 PRINT TAB TB 5 SET TOP MARGIN 750 PRINT TB 6 SET BOTTOM MARGIN 760 PRINT TAB TB 7 CANCEL TOP amp BOTTOM MARGINS 779 PRINT TAB TB 8 SET PAGE LENGTH 208 Radix User s Manual 780 GOSUB 2650 799 IFS 9 ORS gt 8 THEN PRINT BEEP GOTO 789 800 IF S g THEN RETURN 810 ON S GOSUB 2050 2360 980 1060 1120 1210 1280 1880 820 GOTO 659 820 REM SELECT PICA 850 S ESC B CHR 1 860 GOSUB 2720 879 RETURN 889 REM SELECT ELITE 899 S ESC B CHR 2 900 GOSUB 2730 910 RETURN 920 REM SELECT CONDENSED 94 S ESC B CHR 3 969 GOSUB 2730 979 RETURN 980 REM SET LEFT MARGIN 1999 GOSUB 2770 1010 INPUT ENTER NEW LEFT MARGIN 1 255 1020 IF X lt 1 OR X gt 255 THEN PRINT BEEP GOTO 199g 1030 S ESC M CHR X 1949 GOSUB 2730 1959 RETURN 1969 REM SET RIGHT MARGIN 1080 GOSUB 2770 1090 INPUT ENTER NEW RIGHT MARGIN 1 255 1100 IF X 1 OR X gt 255 THEN PRINT BEEP GOTO 1080 1110 S ESC 0 CHR X 1120 GOSUB 2730 RETURN 1139 REM SET TOP MARGIN 1150 GOSUB 2770 1169 INPUT ENTER NEW MARGIN 1 16 X 1170 IF X 1 OR X gt 16 THEN PRINT BEEP GOTO 1150 118 S ESC CHR X 1199 GOSUB 2730 129g RETURN 1210 REM SET BOTTOM MARGIN 1230 GOSUB 2779 1249 INPUT ENTER NEW BOTTOM MARGIN 1 127 X 1
15. Try this program to see the difference that printing in one direction makes 1g Demo unidirectional printing 29 LPRINT CHR 27 A CHR 7 Line spacing 7 72 39 FOR I 1 TO 1g 49 LPRINT 50 NEXT I 60 LPRINT LPRINT 7Q LPRINT CHR 27 U CHR 1 Turn on unidirectional printing 8g FOR I 17010 99 LPRINT 100 NEXT I 110 LPRINT CHR 12 CHR 27 8 Form feed master reset Here is what you will get The top line is printed bidirec ean at Manan qt n pn 102 Radix User s Manual tionally and the bottom is printed unidirectionally You will have to look hard because there isn t much difference Let s analyze the program Line 20 sets the line spacing to 7 72 of an inch so that the characters that we print will touch top to bottom Lines 30 50 print 10 vertical line characters Then line 70 sets one direction printing and the vertical lines are printed again Finally line 110 sends a form feed to advance the paper to the top of a new page and then uses the master reset to restore Radix to the power on condition The seven bit dilemma Certain computers most notably the Apple IT don t have the capability to send eight bits on their parallel interface They can only send seven bits This would make it impossible for these computers to use Radix s block graphics characters and special symbols if Star s engineers hadn t thought of a solut
16. gt 7 AND MIDANG 119 THEN 999 950 IF MIDANG 250 AND MIDANG 299 THEN 99g 969 IF MIDANG4 2790 OR MIDANGZ 99 THEN 191g 970 MID TEXT X4 YA LEN PIECETEXT PIECEX PIECETEXT PIECE 989 GOTO 1020 990 MID TEXT X4 Y4 LEN PIECETEXT PIECE 2 PIECETEXT PIECE 1000 GOTO 1929 101 MID TEXT X4 Y4 PIECETEXT PIECE 1020 PREVANG ANG 1030 RETURN 194g 1959 Subroutine to query user for data 196g 1979 CLS PRINT PRINT PRINT 1989 INPUT ENTER TITLE FOR CHART TITLE 1090 IF LEN TITLE 49 THEN 1119 1100 PRINT TITLE TOO LONG 40 CHAR MAX GOTO 1989 111 AMT SOFAR 9 AMT LEFT 199 1120 FOR I 1 TO 24 1130 CLS 1140 PRINT ENTER PARAMETERS FOR PIECHART 1159 PRINT TOTAL SO FAR 1169 PRINT USING AMT SOFAR 1170 PRINT TOTAL REMAINING 118 PRINT USING AMT LEFT 1199 PRINT PRINT PRINT PRINT 1200 INPUT ENTER PERCENTAGE FOR FIELD PCT I 1219 IF PCT4 I AMT LEFTZ OR PCT4 I Q THEN PCT4 I AMT LEFT4 1220 AMT LEFT AMT LEFTZ PCTZ I 1230 AMT SOFARZ AMT SOFARS4PCTZ I 1240 PRINT PRINT 1250 INPUT ENTER DESCRIPTION OF FIELD PIECETEXT I 1260 IF LEN PIECETEXT I 16 THEN 1280 1270 PRINT FIELD TOO LONG 15 CHAR MAX GOTO 1250 1289 IF AMT LEFT Q THEN 1399 Printing With Dot Graphics 155 129 NEXT I 1300 NUMBER PIECES I 1310 IF NUMBER PIECESZ 1 THEN 1119 1329 CLS 1339 RETURN You should recognize many sect
17. 32 480 N STRING 2 196 CHR 197 490 L STRING 2 196 CHR 193 500 LOCATE 4 19 PRINT CHR 218 CHR 196 519 FOR I 1 TO 19 520 PRINT CHR 196 CHR 194 CHR 196 NEXT I 530 PRINT CHR 196 CHR 191 LOCATE 5 10 540 FOR 1 TO 12 PRINT M NEXT K PRINT 559 FOR 7 1 TO 6 LOCATE 5 P1 19 P1 P1 1 PRINT CHR 195 569 FOR K 1 TO 1g PRINT N NEXT K 570 PRINT CHR 196 CHR 196 180 580 LOCATE 5 P1 19 1 1 1 599 FOR 1 TO 12 PRINT M NEXT K 60g PRINT NEXT J LOCATE 18 19 PRINT CHR 192 610 FOR I 1 TO 19 PRINT L NEXT I 620 PRINT CHR 196 CHR 196 CHR 217 134 Radix User s Manual 630 FOR I TO 6 LOCATE 54 1 2 6 PRINT 2 I NEXT I 64g 650 Put in dots 669 FOR H 1 TO 11 FOR J 1 TO 7 Z J H 8 700 NEXT J NEXT H 710 FOR H 1 TO 11 GOSUB 1299 NEXT H 720 X 1 Y 1 G 1 H 1 730 GOSUB 1300 74g 750 Paint menu 760 LOCATE 6 47 PRINT P Print the character 9770 LOCATE 7 47 PRINT A Set ASCII code 789 LOCATE 8 47 PRINT C Clear all dots 799 LOCATE 9 47 PRINT Q Quit 899 LOCATE 19 47 PRINT R Perform ROM copy 810 LOCATE 11 44 PRINT CHR 24 CHR 27 CHR 26 CHR 25 820 PRINT Move cursor 839 LOCATE 12 45 PRINT ins place a dot 840 LOCATE 13 45 PRINT del remove a dot 859 LOCATE 14 47 PRINT make character wider 860 LOCATE 15 47 PRINT make character narrower 879 LOCAT
18. 32 84 50 76 34 68 63 DATA 19 34 68 34 68 34 68 2 68 2 9 9 64 DATA 10 0 32 24 101 24 97 0 64 0 64 0 650 DATA 11 64 9 96 1 48 15 48 15 16 15 9 669 SIX 67 DATA 11 0 96 0 112 0 120 0 92 0 102 0 689 DATA 11 98 0 98 0 98 0 70 0 14 0 6 690 DATA 11 7 8 23 8 55 8 99 0 65 0 64 700 DATA 11 0 96 0 112 1 62 1 30 1 14 0 71 SEVEN 720 DATA 11 0 16 8 6 8 6 8 6 8 6 8 739 DATA 9 70 8 102 8 54 8 6 0 2 0 0 749 DATA 11 0 64 0 96 0 120 0 124 0 20 1 750 DATA 9 6 1 0 0 0 0 0 0 0 0 0 769 EIGHT 779 DATA 11 9 2 9 2 24 36 24 192 24 192 9 780 DATA 11 67 9 67 9 99 28 34 28 34 28 9 790 DATA 11 12 18 44 19 108 19 96 1 64 0 64 800 DATA 11 9 96 1 112 15 48 15 16 14 9 9 819 NINE 829 DATA 11 0 0 120 4 120 6 120 6 0 3 83 DATA 11 3 0 3 0 67 4 123 4 122 4 120 849 DATA 11 48 0 56 0 113 0 99 0 99 0 99 850 DATA 11 0 115 0 527 0 21 0 15 0 7 869 SPACE 87 DATA 11 0 0 0 0 0 0 0 0 0 0 0 125 56789 Figure 11 16 The output for characters like this must be carefully planned Mixing Print Modes with Download Characters It s possible to get even more printing effects by combining 130 Radix User s Manual download characters with the various print modes available with Radix Most of the commands that you learned in Chapter 7 work with normal width download characters as well as standard char acters A few of them will work with proportional download char acters as well Table 11 3 summarizes the various print modes and their compatibility with d
19. 72 dots per inch vertical dot graphics uses this format ESC K ni n2 mi m2 Printing With Dot Graphics 141 Just like many of the other codes you have learned the com mand starts with an escape sequence ESC K in this case But unlike Radix 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 Radix how many bytes of graphics data to expect Specifying the number of columns of dots To figure the values of n1 and n2 you ll need to figure out how wide your 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 Radix the number of graphics codes to expect Because the largest number we can send in 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 Radix 10 or 816 dots on Radix 15 So to figure out how many columns of graphics data to expect Radix multiplies n2 by 256 and adds the value of n1 to the product If you divide the number of columns by 256 then n2 is the quotient and n1 is the remainder why not let your computer figure it out for you if the number of columns is assigned to variable X then N1 X MOD 256 2 INT X 256 Ta
20. Next remove the upper case shown in Figure 14 4 by pulling off the platen knob Caution Don t twist or turn the platen knob pull it straight off Then remove the fastening screws along the back side Lift the back edge of the cover and at the same time pull it slightly forward to release the front of the case Lift it all the way off being careful not to pull the wires which connect the cover to the case When the case is off check Figure 13 5 for location of the pri mary fuse which you ll find held by its clamps close to the power switch The fuse is a commonly used type with a metal strip sus pended in a glass and metal case If the strip is broken the fuse is blown Replace this fuse with a 3A 125V slow blow type fuse Bell 5MT3 or equivalent Now reassemble Radix and test run it If the printer still isn t working call on your Radix dealer service center for help Replacing the Print Head The dot matrix print head has a remarkably 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 or cartridge 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 turning the power switch off and unplugging the power cord Then in sequence 1 Remove the front cover and the ribbon cartridge Rad
21. SET 290 PRINT TAB TB 3 SELECT ITALIC CHARACTER SET 200 PRINT TAB TB 4 CANCEL ITALIC CHARACTER SET 31g GOSUB 2659 Apple II Computers 207 320 IF S 9 OR S 4 THEN PRINT BEEP GOTO 319 339 IF S THEN RETURN 349 S GOSUB 1210 1260 1800 1840 359 GOTO 229 369 REM DISPLAY PITCHES MENU 389 TI PITCHES MENU 390 GOSUB 2569 400 PRINT TB RETURN TO MAIN MENU 419 PRINT n m 1 SELECT PICA PITCH 420 PRINT TAB TB 2 SELECT ELITE PITCH 430 PRINT 5 bd SELECT CONDENSED PITCH 449 GOSUB 2659 459 IF S 9 OR S 3 THEN PRINT BEEP GOTO 440 469 IF S THEN RETURN 470 ON S GOSUB 839 889 939 480 GOTO 360 490 REM DISPLAY PRINTING MODE 599 TI PRINTING MODES MENU 519 GOSUB 2560 520 PRINT TB RETURN TO MAIN MENU 549 PRINT TB 1 SELECT EXPANDED MODE 559 PRINT TAB TB 2 CANCEL EXPANDED MODE 569 PRINT TAB TB 3 SELECT EMPHASIZED MODE 579 PRINT TAB TB 4 CANCEL EMPHASIZED MODE 589 PRINT TAB TB 5 SELECT DOUBLE STRIKE MODE 599 PRINT TAB TB 6 CANCEL DOUBLE STRIKE MODE 60g GOSUB 2650 619 IFS 5 0 OR S 6 THEN PRINT BEEP GOTO 699 620 IF S THEN RETURN 630 ON S GOSUB 1700 1750 2400 2440 2480 2520 649 GOTO 499 650 REM 669 REM DISPLAY MARGIN TABS AND FORMS 670 TI MARGINS TABS amp FORMS MENU 689 GOSUB 2569 699 PRINT TB g RETURN TO MAIN MENU 700 PRINT TAB TB 1 SET HORIZONTAL TABS 719 PRINT TAB TB 2
22. a unique description for any combination of dots answers Across the top of the grid you ve probably noticed the cryptic labeling of each column m1 m2 m3 etc These labels correspond to the labels in the command syntax statement which we ll get to shortly Assigning a value to your character We ve done a pretty thorough job of designing and describing 116 Radix User s Manual a user defined character But the Radix has room for 189 m m m m m m m m mym gm n Descender Width n Descender 16 Width Format Esc in nym m Figure 11 8 Add the values of the dots in each column and write the sum of each column at the bottom download characters how does it know which user defined char acter we want to print Exactly the same way it knows which standard character we want to print every character is assigned a unique number The standard characters are assigned the ASCII codes num bers from 0 to 255 For the download character sets there are two banks of characters that can be defined values from 33 to 126 and 160 to 254 This means that once a character is defined and assigned a value and the download character set is selected you can use that character on the printer the same way you would any standard character You can send the character with the same ASCII value for instance if you had assigned your character a code of 66 it would print each time you sent a character to the
23. characters Con flicting commands within a line can cause unpredictable results So does that mean that in order to print something meaning ful with our special symbols we have to define an entire alphabet Fear not The engineers at Star have made it an easy task to use mostly standard characters with just a few special characters thrown in This command copies all the characters from the standard character ROM into download RAM ESC CHR 9 Since it will copy all characters into the download area it will wipe out any characters that are already there So it s important to send this command to the printer before you send any download characters you want to define With that in mind add this line to the program we used to send the characters to Radix 25 PRINT 1 CHR 27 CHR 9 ROM to RAM Now try the download printout test program again Your results should look like Figure 11 12 You probably noticed that our printout test includes the characters with ASCII values from 160 to 254 but nothing prints The ESC CHR 0 command copies only the standard ASCII characters those in the range of 33 to 126 to download it does not copy any block graphics characters To demonstrate how to use these characters let s use this character set with a word processing program to print a grocery ad Just as you learned in Chapter 3 send the printer control codes to select download characters 27 36 1 follo
24. the complete command to send our bullet character to the Radix printer 1 Downloads symbols 29 OPEN LPT1 AS 1 WIDTH 01 255 30 FOR I 1 TO 3 Do three character downloads PRINT 1 CHR 27 CHR 1 Begin char download 59 READ N1 N2 69 PRINT 1 N1 CHR N2 Send char code and attribute 70 FOR 1 TO 11 Send 11 bytes of download per char 80 READ D 99 PRINT 1 CHR D 19g NEXT 11 NEXT I 120 CLOSE 1 139 LPRINT 14 DATA 11 24 36 90 26 90 36 90 36 24 0 0 150 DATA Q 11 92 34 9 81 8 69 9 34 29 9 0 169 DATA 11 127 0 0 127 0 68 0 68 56 0 0 When you run this program it looks like nothing happens That s OK We ll see why in just a moment Save this program We ll need it again shortly Printing Download Characters You ve now defined and sent three characters to the Radix 120 Radix User s Manual But how do you know that If you try printing those characters now type LPRINT 0 you don t get a bullet slashed zero and Tb Instead you get 0 That s because the download char acters are stored in a different part of Radix s memory To tell it to look in download character RAM instead of standard character ROM it requires another command ESC CHR n This command is used to select the download character set if 1 or to select the standard character set if n 0 Let s try it out Enter this command LPRINT CHR 27 CHR 1 0
25. 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 IBM BASIC has one other little trick that will mess up your graphics if you let it BASIC is very insistent about adding line feed to a carriage return This is fine if you are printing text but if an 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 leave 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 one RANDOM ACCESS SET WIDTH TO 255 PRINT A LINE ADD YOUR OWN LF 10 OPEN LPT1 AS 1 29 WIDTH 1 255 39 PRINT 1 TESTING 49 PRINT 1 CHR 19 Listing programs To list programs on Radix make sure the program is in the IBM s memory and use the LLIST command This directs the list ing to the printer instead of the screen IBM Personal Computer amp Compaq 193 Printing Graphics Screens Version 2 0 of the IBM DOS has a program called GRAPHICS that allows you to print a graphics display screen The program as IBM created it is however not compatible with Star printers But all that
26. 0 FOR ROW 1 TO 4 190 LPRINT GRAPHIC CHR 19 CHR 9 200 LPRINT LOGO ROW 210 NEXT ROW 146 Radix User s Manual 220 LPRINT LINE 12 230 ROW 1 249 DATA 0 0 0 0 1 3 7 7 7 15 250 DATA 14 14 14 14 14 7 7 3 3 15 26 DATA 15 15 0 0 0 0 0 0 0 0 270 DATA 0 1 2 3 7 7 15 14 14 14 280 DATA 14 15 7 7 7 3 0 0 0 0 299 DATA 0 0 0 0 0 0 0 0 0 0 300 DATA 0 0 0 0 0 0 0 0 0 0 210 DATA 0 0 0 0 1 3 7 7 7 15 329 DATA 14 14 14 14 14 7 7 3 3 15 330 DATA 15 15 0 0 0 0 0 0 0 0 349 ROW 2 350 DATA 0 0 60 255 255 255 255 255 143 15 260 DATA 7 7 7 7 3 3 3 131 193 241 370 DATA 240 240 0 0 0 0 0 0 0 1 280 DATA 121 253 253 255 255 255 143 7 7 7 399 DATA 31 253 252 248 248 249 192 9 7 15 4gg DATA 31 31 15 7 3 0 0 0 0 0 41 DATA 0 0 0 0 0 0 0 0 0 0 420 DATA 0 0 60 255 255 255 255 255 143 15 430 DATA 7 7 7 7 3 3 3 131 193 241 440 DATA 240 240 0 0 0 0 0 0 0 0 459 ROW 3 460 DATA 31 31 3 129 128 192 192 192 192 470 DATA 192 224 224 224 224 24 255 255 255 255 480 DATA 255 127 0 0 0 0 63 127 255 255 490 DATA 255 255 193 128 128 128 128 192 224 249 50 DATA 252 255 255 255 127 63 31 7 7 31 510 DATA 254 252 248 224 128 0 0 3 7 7 520 DATA 7 3 0 0 0 0 0 0 0 0 530 DATA 9 31 31 3 129 128 192 192 192 192 540 DATA 192 224 224 224 224 24 255 255 255 255 550 DATA 255 127 0 0 0 0 0 0 0 0 569 ROW 579 DATA 0 248 248 240 224 224 112 112 56 56 580 DATA 56 56 56 120 120 240 240 224 224 192 590 DATA 128 0 0 0 0 0 192 224 240 240 600
27. 1 TO 31 PRINT NEXT I 1099 PRINT PRINT 1100 FOR I 1 TO NPZ PRINT NEXT I 1119 PRINT 1120 VTAB 12 HTAB 1 200 REM PLOT CURVE 2919 RAD 9 2929 X1 19 Y1 2030 FOR ANG 2040 R1 ANG X 2050 X2 RAD C 2969 GOSUB 2000 2070 NEXT ANG 2975 VTAB 14 HTAB 1 208 FOR PI 1 TO NPZ 2090 Xi 10 1 19 2100 TP TP PCTZ PI 2110 ANG 360 TP x 91 2120 R1 ANG 6 28 369 2130 X2 RAD x COS R1 19 Y2 TO 369 STEP 12 28 369 OS R1 10 2 RAD SIN R1 19 RAD SIN R1 19 ae pss a 204 2140 2150 2160 3999 3090 3100 2119 3129 3130 3149 3159 3169 3165 3166 3179 3189 3199 Radix User s Manual GOSUB 4000 GOSUB 6000 NEXT PI REM SEND BIT IMAGE MAP TO PRINTER PR 1 PRINT CHR 9 QN 40 LEN TI 2 FOR I 1 TO X PRINT NEXT I PRINT EM TI CE LF PRINT VT VT VT PRINT ES A CHR 6 FOR I Q TO 48 PRINT TXT I NEXT I PRINT RF VT VT VT PRINT LF LF LF LF LF LF FOR ROW TO 35 PRINT ES K CHR 82 CHR 1 SP FOR COL 1 TO 190 PRINT CHR BIT COL ROW NEXT 3192 321g 3259 3255 3257 3260 4990 4919 4029 4939 4049 2050 4969 4989 4999 4995 4199 5000 5019 5020 2032 5949 5042 5944 5046 PRINT NEXT ROW PRINT ES 2 FF PR HOME END REM DRAW A LINE FROM Xi Y1 TO X2 Y2 XL X2 X1 YL Y2 Y1 NX ABS XL XFAC NY ABS YL YFAC IF N
28. 250 IF X 1 OR X gt 127 THEN PRINT BEEP GOTO 1220 1260 S ESC CHR X 1270 GOSUB 2730 RETURN 128 REM CANCEL TOP amp BOTTOM MARGIN Uu WW peream MA S RESP INSCR LI Apple II Computers 209 1200 S ESC O GOSUB 2730 RETURN 1319 REM SELECT NLQ 1339 S ESC B CHR 4 1349 GOSUB 2739 RETURN 1260 REM CANCEL NLQ 1389 S ESC B CHR 5 1390 GOSUB 2730 RETURN 1410 REM SELECT LINE SPACING 1430 TI LINE SPACING MENU 1449 GOSUB 2560 1450 PRINT TAB TB RETURN TO MAIN MENU 1469 PRINT TAB TB 1 SELECT 1 6 INCH LINE SPACING 1470 PRINT TAB TB 2 SELECT 1 8 INCH LINE SPACING 1489 PRINT TAB TB 3 SELECT 7 DOT GRAPHICS SPACING 1499 PRINT TAB TB 4 SELECT N 144 INCH SPACING 1500 GOSUB 2650 1510 IFS OR S gt 4 THEN PRINT BEEP GOTO 1500 1520 IF S Q THEN RETURN 1520 ON S GOSUB 1559 1580 1619 1649 1549 GOTO 1419 1559 REM SELECT 1 6 INCH LINE SPACING 1570 S ESC 2 GOSUB 2720 RETURN 158 REM SELECT 1 8 INCH LINE SPACING 1600 S ESC g GOSUB 2730 RETURN 1619 REM SELECT 7 DOT GRAPHICS SPACING 1630 S ESC 1 GOSUB 2730 RETURN 1649 REM SELECT N 144 INCH LINE SPACING 1660 GOSUB 2770 1670 INPUT ENTER LINE SPACE 9 255 1689 IF X 49 OR X gt 255 THEN PRINT BEEP GOTO 1660 1690 5 ESC 3 CHR X GOSUB 2730 RETURN 1700 SELECT EXPANDED 1720 S ESC W CHR 1 1730 GOSUB 2739 17
29. 27 PRINT CHR 7 TITLE TOO LONG 4 CHAR MAX GOTO 7000 7030 AS 1 199 7035 FOR I 1 TO 24 7040 HOME 206 Radix User s Manual 7050 PRINT TOTAL SO FAR 3454 7060 PRINT TOTAL REMAINING AL 7070 INPUT ENTER FOR FIELD PCT4 I gag IF PCT I gt ALZ OR PCT I THEN PCTZ I AL 709 AL AL PCTZ I 7199 AS ASZ PCT I 7119 INPUT ENTER DESCRIPTION OF FIELD PTXT I 7120 IF LEN PTXT I gt 15 THEN PRINT FIELD TOO LONG 15 CHAR MAX GOTO 711g 7130 IF AL THEN GOTO 7299 7140 NEXT I 7209 NP I 7210 IF 1 THEN 7030 7220 HOME 7230 RETURN Printer setup utility 10 REM PROGRAM TO SET UP RADIX 20 BEEP CHR 7 49 ESC CHR 27 5 DIM TBS 256 89 HOME 99 TI MAIN MENU 100 GOSUB 2560 110 PRINT TB EXIT 120 PRINT TAB TB 1 SELECT CHARACTER SET 130 PRINT TAB TB 2 SELECT PRINTING MODES 149 PRINT TAB TB 3 SELECT PITCH 150 PRINT TB 4 SELECT LINE SPACING 160 PRINT TAB TB 5 SET MARGINS TABS amp FORMS 170 GOSUB 2659 188 IF S 0 ORS gt 5 THEN PRINT BEEP GOTO 179 199 IF S THEN HOME END 200 ON S GOSUB 220 490 260 1410 650 210 GOTO 80 220 REM SUBROUTINE TO DISPLAY CHARACTER SET MENU 249 TI CHARACTER SET MENU 250 GOSUB 2569 260 PRINT TB 9 RETURN TO MAIN MENU 272 PRINT TB 1 SELECT NLQ CHARACTER SET 28 PRINT TB 2 CANCEL NLQ CHARACTER
30. 430 S ESC g GOSUB 2460 RETURN 144g 1459 Subroutine to select 7 dot graphics spacing 1469 S ESC 1 GOSUB 2469 RETURN 1479 1489 Subroutine to select n 144 inch line spacing 1499 GOSUB 2500 1599 INPUT Enter line space in 1 144 ths of an inch X 1519 IF X OR X gt 255 THEN BEEP GOTO 1490 1520 S ESC 3 CHR X GOSUB 2469 RETURN 1530 1549 Subroutine to select EXPANDED print 1559 S ESC W CHR 1 GOSUB 2460 RETURN 1569 157 Subroutine to cancel EXPANDED printing 1580 S ESC W CHR g GOSUB 2469 RETURN Te 159g 1600 Subroutine to select ITALIC character set 1619 S ESC 4 GOSUB 2469 RETURN 1620 1639 Subroutine to cancel ITALIC character set 164 S ESC 5 GOSUB 2469 RETURN 1659 Da 1660 Subroutine to set PAGE LENGTH 1670 GOSUB 2500 pr Putting Radix to Work For You 167 1680 PRINT Page length in Inches or Lines I L 169g PRINT TAB TB 1799 A INKEY IF A THEN 1799 1710 IF A I OR A i THEN 1740 1720 IF A L OR A 1 THEN 1780 1730 BEEP GOTO 1799 1749 INPUT Length of page in inches 1 32 X 1750 IF X 1 OR X gt 32 THEN BEEP GOTO 1670 176 S ESCH CHR 9 CHR X 1770 GOSUB 2469 RETURN 1789 INPUT Length of page in lines 1 127 X 1799 IF X 1 OR X gt 127 THEN BEEP GOTO 1670 1899 S ESC C CHR X 1810 GOSUB 2469
31. 49 RETURN 1759 REM CANCEL EXPANDED 1770 S ESC W CHR 0 1780 GOSUB 2730 1790 RETURN 180 REM SELECT ITALIC 1820 S ESC 4 GOSUB 2739 1820 RETURN 1849 REM CANCEL ITALIC 1860 S ESC 5 GOSUB 2739 210 Radix User s Manual 1870 RETURN 1880 REM SET PAGE LENGTH 1900 GOSUB 2770 1910 PRINT PAGE LENGTH INCHES OR LINES I L 1920 PRINT TAB TB 1930 GET A 1949 IF A I THEN 1979 1950 IF A L THEN 2919 1969 PRINT BEEP GOTO 1939 1970 INPUT LENGTH OF PAGE IN INCHES 1 32 1980 IF X 1 OR X gt 32 THEN PRINT BEEP GOTO 1999 1999 S ESC C CHR CHR X 2000 GOSUB 2720 RETURN 2919 INPUT LENGTH OF PAGE IN LINES 1 127 2020 IF X 1 OR X 127 THEN PRINT BEEP GOTO 1900 2030 S ESC C CHR X 2040 GOSUB 2720 RETURN 2050 REM SET HORIZONTAL TAB 2070 S ESC 255 GOSUB 2080 RETURN 2989 REM SET TABS 2199 GOSUB 2770 2119 PRINT WOULD YOU LIKE TO SET THE TABS IN 2120 PRINT TB REGULAR INTERVALS OR SPECIFY 2130 PRINT TB EACH ONE INDIVIDUALLY R I 2149 GET A 2150 IF A R THEN 2399 2169 IF A I THEN 2180 2170 PRINT BEEP GOTO 2989 218 PRINT I 2 TBS 1 1 2190 PRINT TB ENTER THE LIST OF TABS IN 2200 PRINT TB ASCENDING ORDER NO MORE THAN 5 MAX on 2210 PRINT TAB TB INPUT ENTER TAB TBS I 2220 IF TBS I OR TBS I gt 255 THEN 2179
32. 4g Subroutine to set TOP MARGIN 1050 GOSUB 2500 1969 INPUT Enter new top margin 1 16 X 1070 IF X 1 OR X 16 THEN BEEP GOTO 1050 1989 S ESC R CHR X GOSUB 2469 RETURN 1090 1100 Subroutine to set BOTTOM MARGIN 1112 GOSUB 2500 1129 INPUT Enter new bottom margin 1 127 X 1130 IF X 1 OR X gt 127 THEN BEEP GOTO 1110 1140 S ESC N CHR X GOSUB 2469 RETURN 1150 1169 Subroutine to CANCEL amp BOTTOM MARGINS 117 S ESC O GOSUB 2460 RETURN 1180 1199 Subroutine to select NLQ character set 1200 S ESC CHR 4 GOSUB 2460 RETURN 1210 1220 Subroutine to cancel NLQ character set 1230 S ESC CHR 5 GOSUB 2460 RETURN 1249 165 166 Radix User s Manual 1259 Subroutine to select LINE SPACING 1260 TITLE LINE SPACING MENU 1270 GOSUB 2299 128 PRINT TAB TB Return to main menu 1290 PRINT TAB TB 1 Select 1 6 inch line spacing 1300 PRINT 2 Select 1 8 inch line spacing 1319 PRINT TAB TB 3 Select 7 dot graphics spacing 1329 PRINT TAB TB 4 Select n 144 inch spacing 1330 GOSUB 2389 im 1349 IF S 9 OR 594 THEN BEEP GOTO 1339 1350 IF S THEN RETURN 1369 ON S GOSUB 1380 1410 1440 1470 1379 GOTO 1249 1389 1399 Subroutine to select 1 6 inch line spacing 140g S ESC 2 GOSUB 2469 RETURN D 141g 142 Subroutine to select 1 8 inch line spacing a 1
33. 7 also backs up one character but then it erases the previous character it s erased from Radix s buffer not from the paper The following program shows how these two codes work 19 backspace and delete codes 20 LPRINT does not 30 LPRINT CHR 8 CHR 8 CHR 8 Three backspaces LPRINT work 50 LPRINT Delete does not 69 LPRINT CHR 127 CHR 127 CHR 127 Three deletes 70 LPRINT work Here is what this program will print Eackspace does met work Delete does work The backspace codes in line 30 move the printhead a total of three spaces to the left so that the first part of line 40 will overprint the word not The delete codes in line 60 erase the three let ters in the word not so that it doesn t even print Unidirectional printing Unidirectional printing is a big word that means printing in one direction only Radix normally prints when the printhead is moving in both directions But once in a while you may have an application where you are more concerned about how the vertical lines align than with how fast it prints Radix lets you make this choice The table below shows the commands for controlling how Radix prints lt Special Features of the Radix Printer 101 Table 10 3 Printing direction commands Conreleode ESC U CHRS Print in both directions ESC U CHR 0
34. 70 PRINT NF 3375 PRINT CHR 27 B CHR 1 PICA 3378 PRINT NR FOR I 1 TO 12 PRINT CHR AS NEXT I PRINT 3379 PRINT NF 2380 PRINT CHR 27 W CHR 1 EXPANDED 3384 PRINT NR FOR I 1 TO 6 PRINT CHR AS NEXT I 3385 PRINT CHR 27 W 3386 PRINT NF 3387 PRINT PRINT CHARACTER SET PRINT NR FOR I 33 TO 126 3388 PRINT CHR NEXT I PRINT PRINT NF PRINT 3399 PRINT PRINT PROPORTIONAL 3392 PRINT PN FOR I 1 TO 15 PRINT CHR AS NEXT I PRINT PF 3393 PRINT PRINT PRINT CHARACTER SET PROPORTIONAL PRINT PN FOR I 33 TO 126 PRINT CHR 1 NEXT I PRINT PRINT PRINT 3394 PRINT USE THIS DATA STATEMENT TO DOWNLOAD THIS CHARACTER UU u aski ia UTI 202 3395 3396 2397 3398 2299 350 351g 3529 3539 Radix User s Manual PRINT DATA 27 FOR 270 LEN RC PRINT STR ASC MID RC I 1 NEXT I PRINT PRINT PRINT PR Q RETURN REM ASCII CODE VTAB 23 HTAB 1 INPUT ENTER ASCII 33 126 AS IF AS 33 OR AS 126 THEN PRINT BEEP GOTO 351 3535 3540 3799 3719 3715 3729 2730 3749 4990 4919 2029 2030 4100 4103 4105 4196 4197 VTAB 23 FOR I 1 TO 39 HTAB I PRINT NEXT GOSUB 2200 RETURN REM COPY ROM PR 1 PRINT CHR 9 255N PRINT ESC CHR PR RETURN REM CALCULATE A COLUMN VALUE MM H FOR J 1 TO 7 MM H
35. 94 FOR J 3 TO 16 STEP 2 VTAB J FOR I 5 TO 27 STEP 2 HTAB I PRINT NEXT I PRINT NEXT J 995 1 VTAB 1 HTAB 5 996 FOR K 1 TO 11 PRINT NEXT K H 1 IF Y 1 THEN 1 m H H G 1 IF X 1 THEN 1 e N G G 907 K 908 FOR V 3 TO 15 STEP 2 VTAB V HTAB 2 PRINT 2 K K K 1 NEXT V 999 VTAB 17 FOR I 1 TO 11 HTAB 4 I 2 PRINT nQg NEXT I 910 VTAB 1 HTAB 30 PRINT CURSOR 912 VTAB 2 HTAB 29 PRINT MOVEMENT 914 VTAB 3 HTAB 29 PRINT I UP 916 VTAB 4 HTAB 29 PRINT M DOWN 918 VTAB 5 HTAB 29 PRINT J LEFT 920 VTAB 6 29 PRINT K gt RIGHT 922 7 HTAB 29 PRINT RET INSERT 924 VTAB 8 29 PRINT SPACE DEL 926 VTAB 9 29 PRINT A ASCII 928 VTAB 19 HTAB 29 PRINT P PRINT 930 VTAB 11 HTAB 29 PRINT C CLEAR 932 12 HTAB 29 PRINT R COPY 200 Radix User s Manual 934 VTAB 13 HTAB 29 PRINT gt WIDER 936 VTAB 14 HTAB 29 PRINT NARROWER 938 15 29 PRINT D DESCENDER 940 16 HTAB 29 PRINT ESC EXIT 950 FOR I 1 TO 11 FOR J 1 TO 7 Z J I NEXT J NEXT I 960 RETURN 1000 IF Z G H THEN VTAB X 2 HTAB Y 5 PRINT n t 1010 IF Z G H 1 THEN X 2 HTAB Y 5 PRINT SC 1015 VTAB 23 HTAB 1 1929 RETURN 1959 IF Z G H 1 THEN INVERSE VTAB X 2 HTAB Y 5 PRINT CS NORMAL 1969 IF Z G
36. ARACTER SET MENU 249 GOSUB 2290 259 PRINT TAB TB Return to main menu 260 PRINT TAB TB 1 Select NLQ character set 270 PRINT TAB TB 2 Cancel NLQ character set 280 PRINT TAB TB 3 Select ITALIC character set 290 PRINT TAB TB 4 Cancel ITALIC character set 300 GOSUB 2389 31 IF 54 OR S 4 THEN BEEP GOTO 300 320 5 0 THEN RETURN 330 ON S GOSUB 1180 1210 1590 1620 349 GOTO 21g 35g 360 Subroutine to display PITCHES menu 370 TITLES PITCHES MENU 389 GOSUB 2290 447557 164 Radix User s Manual 399 PRINT TAB TB Return to main menu 400 PRINT 1 Select PICA pitch 41 PRINT TAB TB 2 Select pitch 420 PRINT TAB TB 3 Select CONDENSED pitch 430 GOSUB 2380 449 IF S 9 OR 8 3 THEN BEEP GOTO 430 450 IF S THEN RETURN 460 ON S GOSUB 829 859 889 470 GOTO 359 48g 499 Subroutine to display PRINTING MODES menu 500 TITLE PRINTING MODES MENU 510 GOSUB 2299 520 PRINT TAB TB Return to main menu 530 PRINT TAB TB 1 Select EXPANDED mode 549 PRINT TAB TB 2 Cancel EXPANDED mode 559 PRINT TAB TB 3 Select EMPHASIZED mode 569 PRINT TAB TB 4 Cancel EMPHASIZED mode 579 PRINT TAB TB 5 Select DOUBLE STRIKE mode 589 PRINT TAB TB 6 Cancel DOUBLE STRIKE mode 590 GOSUB 2389 600 IF 5 0 OR S 6 THEN BEEP GOTO 590 619 IF 5 THEN RETURN 629 ON S GOSUB 1530 1560 2179 2209 2239 2269 630 GOTO 480 64g
37. DATA 240 248 248 248 120 120 56 56 56 56 610 DATA 48 112 224 224 224 224 2490 240 248 248 620 DATA 120 120 56 56 56 56 120 240 224 224 630 DATA 192 128 0 0 0 0 0 0 0 0 640 DATA 0 248 248 240 224 224 112 112 56 56 T Printing With Dot Graphics 147 659 DATA 56 56 56 120 120 240 240 224 224 192 669 DATA 128 0 0 0 0 0 0 0 0 0 S amp S Plotting with Radix This section of the manual gets into more serious BASIC pro gramming just because it s required 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 take 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 Radix 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 f
38. E 16 47 PRINT D Toggle descender mode 889 RETURN 899 999 Edit subroutines 910 GOSUB 1249 Y Y 3 H H 1 IF 1 THEN BEEP Y 1 H 1 920 GOSUB 13909 RETURN 930 GOSUB 1249 Y Y42 H H41 IF Y 31 THEN BEEP Y 31 H 11 940 GOSUB 1300 950 GOSUB 1240 X X 2 G G 1 IF X 13 THEN 13 0 7 969 GOSUB 1399 RETURN 970 GOSUB 1249 X X 2 G G 1 IF X 1 THEN BEEP X 1 G 1 989 GOSUB 1399 RETURN 999 IF Z G H 1 1 OR Z G H 1 1 THEN BEEP RETURN 1000 2 0 1 COLOR 31 1 101 LOCATE X 4 Y 1 PRINT SC COLOR 7 9 1928 GOSUB 1150 RETURN 1030 7 6 COLOR 7 0 1949 LOCATE X 4A Y 1g PRINT 05 COLOR 7 0 Creating Your Own Characters 135 1050 GOSUB 1159 RETURN 106 IF PROWID 11 THEN BEEP RETURN 197g PROWID PROWID 1 108 GOSUB 1820 RETURN 1090 IF PROWID 4 THEN BEEP RETURN 1100 PROWID PROWID 1 111 GOSUB 1829 RETURN 1129 IF DESC 1 THEN DESC GOTO 1140 1130 DESC 1 1149 GOSUB 1829 RETURN 115g 1160 Subroutine to calculate a column value amp print it 1170 MM H g FOR 7 1 TO 7 1189 MM H MM H 4Z J H 2 J 1 1199 NEXT J GOSUB 1299 RETURN 1200 1219 Subroutine to print a column value 1229 LOCATE 19 7 H 3 PRINT RIGHT STR MM H 3 1230 RETURN 124g 1259 Subroutine to remove the cursor 1260 LOCATE X 4 Y 19 1270 IF Z G H THEN PRINT 1289 IF Z G H 1 THEN COLOR 7 9 PRINT SC 1299 RETURN 1399 1319 Subr
39. H THEN NORMAL VTAB X 2 HTAB Y 5 PRINT CS NORMAL 1065 VTAB 23 HTAB 1 1070 RETURN 1910 REM CLEAR CURRENT CHARACTER 1920 PW 11 DS 0 1930 FOR H 1 TO 11 MM H NEXT H 1935 GOSUB 999 1940 GOSUB 220g RETURN 208 REM BUILD COMMAND STRING 2085 RC ESC CHR 1 2999 RC RC CHR AS CHR DS x 16 2995 FOR I 1 TO 11 RC RC CHR MM I NEXT I 2996 RETURN 2200 REM 2210 VTAB 29 1 PRINT ASCII CODE AS 2220 PRINT CHR AS 2230 VTAB 20 HTAB 25 PRINT DESCENDER DS 2250 FOR I 8 TO 19 VTAB 22 HTAB I PRINT NEXT I 2260 VTAB 22 HTAB 1 PRINT WIDTH FOR I 1 TO PW PRINT NEXT I 2270 23 HTAB 1 2280 RETURN 2000 WIDER 2010 IF PW 11 THEN PRINT BEEP RETURN 3020 PW PW 1 3030 GOSUB 2200 Apple II Computers 201 3949 RETURN 2100 REM NARROWER 3119 IF PW 4 THEN PRINT BEEP RETURN 3120 PW PW 1 3130 GOSUB 2200 3140 RETURN 3200 REM DESCENDER 3210 DS ABS 1 DS 3220 GOSUB 2200 RETURN 2300 REM PRINT 3310 GOSUB 2080 2220 PR 1 3325 PRINT CHR 9 255N 3327 PRINT CHR 27 Q 3330 PRINT ASCII CODE AS PRINT 3335 PRINT RC 3345 PRINT CHR 15 CONDENSED 2350 PRINT NR FOR I 1 TO 21 PRINT CHR AS NEXT I PRINT 3355 PRINT NF 2260 PRINT CHR 27 CHR 2 ELITE 3365 PRINT NR FOR I 1 TO 15 PRINT CHR A9 NEXT I PRINT 23
40. HTAB 6 PRINT CS 275 VTAB 23 HTAB 1 28 GET A 290 IF A J THEN GOSUB 399 GOTO 379 300 IF A THEN GOSUB 410 GOTO 370 319 IF A THEN GOSUB 430 GOTO 370 329 IF A I THEN GOSUB 450 GOTO 370 330 IF A CHR 13 THEN GOSUB 470 GOTO 370 349 IF A CHR 32 THEN GOSUB 499 GOTO 379 359 IF A CHR 27 THEN HOME END 369 IF A THEN GOSUB 3000 GOTO 379 362 IF A THEN GOSUB 3100 GOTO 379 363 IF A A THEN GOSUB 3500 GOTO 370 364 IF A D THEN GOSUB 3200 GOTO 379 365 IF A P THEN GOSUB 3200 GOTO 379 366 IF A THEN GOSUB 1919 GOTO 260 367 A R THEN GOSUB 3799 GOTO 379 270 GOTO 280 Apple II Computers 199 389 RETURN 390 GOSUB 190g Y Y 2 PRINT CHR 7 1 400 GOSUB 1050 RETURN 410 GOSUB 1000 Y 2 H H 1 IF Y gt 21 THEN PRINT CHR 7 Y 21 H 11 420 GOSUB 1050 RETURN 430 GOSUB 199g X X 2 G G 1 IF X gt 13 THEN PRINT CHR 7 X 13 G 7 449 GOSUB 1959 RETURN 450 GOSUB 1000 PRINT CHR 7 X 469 GOSUB 1959 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 GOSUB 4000 RETURN 499 Z G H NORMAL VTAB X 2 HTAB Y 5 PRINT CS GOSUB 4999 RETURN 90 X 1 1 0 1 1 991 992 FOR I 2 TO 16 STEP 2 VTAB I HTAB 5 FOR J 1 TO 23 PRINT NEXT J PRINT NEXT I 9
41. IG numerals 229 LPRINT 239 LPRINT CHR 27 X CHR 1 Select RAM chars 24 LPRINT CHR 27 1 7 72 line spacing 250 Print the top half of the numerals 269 FOR NUM 0 TO 9 270 LPRINT CHR NUM 4 169 CHR NUM 4 161 BLANK 280 NEXT NUM 299 LPRINT 39 Print the bottom half of the numerals 31g FOR NUM 0 TO 9 320 LPRINT CHR NUM 4 162 CHR NUM 4 163 BLANK 339 NEXT NUM 349 LPRINT CHR 27 X CHR Deselect RAM 250 LPRINT CHR 27 2 11 6 line spacing normal 369 ZERO 270 DATA 11 0 96 16 104 16 44 20 14 0 2 1 389 DATA 11 2 1 2 1 6 8 38 88 32 88 32 399 DATA 11 3 12 19 12 51 0 96 0 96 0 96 49g DATA 11 9 32 0 48 9 28 3 12 3 4 3 419 ONE 429 DATA 11 0 0 0 0 0 4 0 4 0 4 126 439 DATA 9 12 114 12 114 12 2 0 0 0 0 0 449 DATA 11 64 0 64 0 64 0 64 32 80 47 80 450 DATA 9 47 80 47 64 0 64 0 64 0 0 0 460 TWO 470 DATA 11 0 0 0 0 0 12 16 14 0 6 0 480 DATA 11 3 0 3 0 70 56 70 56 4 24 0 490 DATA 11 64 0 64 32 64 32 80 32 80 40 64 500 DATA 11 44 64 38 65 24 65 32 80 32 88 0 510 529 DATA 11 0 0 0 0 0 0 4 2 4 2 4 530 DATA 11 34 84 34 92 34 76 34 68 2 64 0 540 DATA 11 16 0 48 0 56 64 48 64 32 64 32 550 DATA 11 64 32 64 48 9 54 9 22 9 6 1 569 FOUR Creating Your Own Characters 129 579 DATA 11 9 9 9 9 9 9 64 36 88 32 16 580 DATA 11 0 0 64 32 64 56 64 60 2 12 0 299 DATA 11 0 8 4 10 5 10 5 8 4 72 4 600 DATA 11 88 38 89 38 89 6 73 4 8 6 9 61g FIVE 62 DATA 11 0 0 0 0 64
42. IM Z 8 12 MM 11 60 5 33 70 CS CHR 16 CHR 17 SC STRING 2 219 80 RAMNML CHR 27 CHR 1 9g RAMNMLOFF CHR 27 CHR 9 100 RAMPRO CHR 27 X CHR 1 110 RAMPROOFF CHR 27 X CHR 129 OPEN LPT1 AS 2 WIDTH 2 255 13 LPRINT CHR 27 WIDTH LPT1 255 149 GOSUB 1930 150 160 Main loop 170 A INKEY IF A THEN 170 189 B LEFT A 1 190 IF B CHR 9 THEN 290 Creating Your Own Characters 133 200 IF THEN GOSUB 1969 GOTO 379 Wider 210 IF A THEN GOSUB 109 GOTO 370 Narrower 220 IF A D OR A d THEN GOSUB 1129 GOTO 379 230 IF A Q OR A q THEN GOSUB 389 END 249 IF A P OR A p THEN GOSUB 1369 GOTO 379 259 IF A C OR A e THEN GOSUB 1939 GOTO 370 269 IF A A OR A a THEN GOSUB 1729 GOTO 379 279 IF A R OR A r THEN GOSUB 1989 GOTO 379 280 BEEP GOTO 379 290 B RIGHT A 1 300 IF B CHR 75 THEN GOSUB 919 GOTO 379 Left 310 IF B CHR 77 THEN GOSUB 920 00 0 379 Right 320 IF B CHR 89 THEN GOSUB 950 00 0 379 Down 330 IF B CHR 72 THEN GOSUB 970 00 70 370 Up 349 IF B CHR 82 THEN GOSUB 999 GOTO 379 Insert 350 IF B CHR 83 THEN GOSUB 1939 GOTO 379 Delete 360 BEEP 379 GOTO 179 380 COLOR 7 9 CLS 399 CLOSE 1 2 49g RETURN 41g 420 Subroutine to paint screen 439 CLS 449 GOSUB 1829 45g 460 Draw grid 470 P1 1 M CHR 179 STRING 2
43. LPRINT Mississippi 140 LPRINT 150 LPRINT ROM char set normal spacing 160 LPRINT 124 Radix User s Manual 170 LPRINT 18 Select RAM set normal spacing 199 LPRINT CHR 27 CHR 1 200 LPRINT Mississippi 210 Cancel RAM set normal spacing 229 LPRINT CHR 27 CHR 9 230 LPRINT RAM char set normal spacing 240 LPRINT 250 LPRINT 269 Select RAM set proportional spacing 270 LPRINT CHR 27 X CHR 1 280 LPRINT Mississippi 299 Cancel RAM set proportional spacing 300 LPRINT CHR 27 X CHR 9 2310 LPRINT RAM char set proportional spacing 329 END 330 DATA 11 1 126 1 2 4 8 4 2 1 126 1 340 DATA 1 4 64 61 64 0 0 0 0 0 0 0 0 350 DATA 23 127 0 17 0 17 14 0 0 0 0 0 369 DATA 6 8 82 0 84 32 0 0 0 0 0 0 m m m m m m m m m m m 41 Descender e Width Descender 16 Weddin Format Esc nnm Total O O O m m m m m m m m MMM N n IS Oescender wan Zp Descender 16 Width Format Esc in nm m 2 17 40 00 14 Figure 11 13 These download characters are defined as proportional characters Creating Your Own Characters 125 One thing to remember about defining proportional charac ters a character cannot be wider than the specified width That seems obvious enough For example if you specify a width of 6 for a character the seventh through eleventh columns of dots if you sp
44. M read only memory This includes all of the standard ASCII characters the block graphics and special characters the interna tional character sets the NLQ characters and the italic characters But there is another area of memory in Radix reserved for O O O O Figure 11 2 As the printhead moves across the page each of the wires prints one row of dots user defined characters These are characters that you design and download into Radix When download characters are defined they are stored in RAM random access memory which allows you to define or modify them at any time Each of these characters whether it is from the standard charac ter ROM or in download RAM is constructed on a grid which is six boxes wide by nine boxes high The dots used to print a charac ter can be inside any of the boxes In addition a dot can straddle any of the vertical lines As an example take a look at the enlarged 9 superimposed on the grid in Figure 11 3 As you can see some dots are inside the boxes and some are centered on the vertical lines This in effect makes the character grid 11 dots wide by 9 dots high To see how the rest of the characters in the standard character ROM are constructed take a look at Appendix J 112 Radix User s Manual Figure 11 3 Dots can be inside boxes or straddle the vertical lines of the grid Defining Your Own Characters You ve seen how the engineers at Star d
45. NT TITLE ON SPACE 29 LEN TITLE 2 Printing With Dot Graphics 153 469 LPRINT TITLE TITLE OFF 479 LPRINT VTAB VTAB 489 FOR I TO 48 499 LPRINT TEXT I NEXT I 500 510 Send bit image map to printer 520 LPRINT REVFF VTAB VTAB VTAPB 539 LPRINT LF LF LF LF LF LFS 540 FOR ROW 0 TO 35 550 LPRINT n 569 LPRINT ESC K 190 CHR 9 570 FOR COL 1 TO 190 58 PRINT 1 CHR BIT COL ROW NEXT 599 PRINT 1 LF 600 PRINT CHR 176 CHR 176 61 NEXT ROW 620 LPRINT ESC 2 FF 639 END 64g 650 Subroutine to draw line from X1 Y1 to X2 Y2 669 670 XL X2 X1 YL Y2 Y1 680 NX ABS XLXLXFAC NY ABS YLXLYFAC 690 IF NX NY THEN NX NY 700 5 INT NX 1 710 DX XL NS DY YL NS 720 FOR 1 1 NS 730 X1 X1 DX Y1 Y1 DY 749 GOSUB 780 759 NEXT I 760 PRINT CHR 29 CHR 295 CHR 295 CHR 175 770 RETURN 78g 799 Subroutine to plot a point at X1 Y1 8gg 810 XX X1 LXFAC YY Y1 LYFAC 82g COLS INT XX 1 830 ROWZ INT YY 6 84 XIT INT YY ROW 6 41 859 BIT COL ROW BIT COL ROW OR 5 11 869 RETURN 879 880 nes to arrange field descriptions 890 154 Radix User s Manual 900 MIDANG ANG PREVANG 2 910 RANG 6 28 260 920 INT 24 SIN RANG 5 INT 29 COS RANG 930 X4 24 X3 42 94g IF MIDANGZ
46. OR H 19 TO 49 HTAB PRINT NEXT H 2720 RETURN 3 2739 REM OUTPUT COMMAND STRING 2750 PR 1 2755 PRINT 5 2758 Q 2760 RETURN 212 2770 2799 3999 3995 3997 3919 3929 3030 3949 3959 Radix User s Manual REM CLEAR SCREEN AND POSITION CURSOR HOME VTAB 10 HTAB TB RETURN REM PRINT PR 1 PRINT CHR 9 255N FOR I 1 TO 4 FOR J 33 TO 126 PRINT CHR J NEXT J PRINT NEXT I PR RETURN
47. RETURN 1820 1839 Subroutine to set HORIZONTAL TABS 1849 S ESC D MAX 255 GOSUB 1859 RETURN 1850 1869 Subroutine to set tabs either horiz or vert 1870 GOSUB 2500 1880 PRINT Would you like to set the tabs in 1890 PRINT TAB TB Regular intervals or specify 199g PRINT TAB TB each one Individually R I 1910 A INKEY IF A THEN 191g 1920 IF A R OR A THEN 2070 1930 IF A I OR A i THEN 1950 1940 BEEP GOTO 1859 1950 PRINT I 2 TBS 1 1960 PRINT TAB TB Enter the list of tabs in 1970 PRINT TAB TB ascending order No more than MAX 1980 PRINT TAB TB INPUT Enter tab TBS I 1999 IF TBS I lt OR TBS I gt 255 THEN 1949 2000 IF TBS I THEN I 1 GOTO 2949 2010 IF TBS I lt TBS I 1 THEN 194g 2020 I I 1 IF I gt MAX THEN 1949 2030 GOTO 1980 2040 T I 1 2050 S S CHR TBS I IF TBS I gt THEN 2040 2060 S S CHR 9 GOSUB 2469 RETURN 2970 PRINT PRINT TAB TB INPUT Enter interval X 298g IF X lt OR X gt 255 THEN 1949 2090 FOR I 1 TO 255 STEP X 168 2100 MAX MAX Radix User s Manual 1 IF MAX 9 THEN 2129 2110 S S CHR I NEXT I 2120 S S CHR g GOSUB 2469 RETURN 2139 214 Subroutine 2150 S ESC 2160 RETURN 2170 2189 Subroutine 2190 S ESC 2200 2219 Subroutine 2220 S ESCH 2230 2249 Subroutine 2250 S
48. This is so that there are no gaps between rows of dots Then the loop from line 170 to line 240 prints the dot graphics image one line which is six dots high at a time The variable A is used to build a string of all the columns of 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 after 600 with the lines below The printouts from each program are shown below the listing 600 610 Subroutine to plot a star 62g 630 RAD 9 649 FOR ANG TO 369 STEP 45 650 RANG ANOZ 3 14159 189 660 RANG2 ANG 135 3 14159 189 67g X1 RAD COS RANG 19 680 1 RAD SIN RANG 1g 699 X2 RAD COS RANG2 4 1g 796 Y2 RAD SIN RANG2 10 719 GOSUB 270 720 NEXT ANG 738 RETURN Printing With Dot Graphics 151 69g 610 Subroutine to plot a sine wave 62g 630 X1 1 10 X2 29 Y2 19 649 GOSUB 279 650 X1 10 Y1 X2 660 GOSUB 279 670 Xi Q 1 19 680 FOR X2 TO 20 STEP 2 690 Y2 10 9 SIN 3 14159 X2 1g GOSUB 279 700 NEXT X2 719 RETURN 10 Y2 20 Using Radix for business graphics You don t have to be a mathematician scientist or computer hacker artist to use Radix s graphics capabilities It can be used for business graphics too line graphs bar charts pie charts and more The
49. Voila It should have printed out the three characters we defined Your printout should look like this ilb If it doesn t check the last program we ran for errors then re run it Let s find out if there are any other characters in the download RAM Try this program 1g Print all RAM characters 20 LPRINT CHR 27 CHR 1 Select download characters 39 FOR I 33 TO 126 LPRINT CHR I NEXT I 49 FOR I 169 TO 254 LPRINT CHR I NEXT I 50 LPRINT 69 LPRINT CHR 27 0 Select ROM characters Nope Just three characters in the download set This is incon venient for a couple of reasons First every time you wanted to use a download character you would have to switch back and Creating Your Own Characters 121 forth between character sets Knowing that you wouldn t want to do that Radix won t even allow it Standard characters and download characters cannot be mixed in a line If you want to use download characters the command should appear at the begin ning of the line All subsequent characters even on following lines are printed with the download set until you return to the standard characters with an ESC CHR 0 Note that the ESC CHR 1 command can be in the middle of a line and that entire line will be printed with the download characters Like wise if you select the standard character set anywhere in a line the entire line will be printed with the standard
50. X NY THEN NX NY NS INT NX 1 DX XL NS DY YL NSZ FOR I 1 TO NS X1 Xi DX Yl Y1 DY GOSUB 5000 NEXT I PRINT X RETURN REM PLOT A POINT AT X1 Y1 XX X1 XFAC YY Y1 YFAC COL INT XX 1 ROW INT YY 6 XIT INT YY 6 ROW 1 POKE 259 BIT COL ROW POKE 251 MASK XIT CALL 768 Apple II Computers 205 5059 BITZ COL ROW PEEK 252 5969 RETURN 6000 REM 6019 MAZ ANG PAZ 2 602 R1 MAZ x 6 28 369 6030 X3 INT 20 SIN R1 Y 3 INT 22 COS R1 6948 22 X3 Y4 49 6945 IF MAZ gt 70 AND MA 119 THEN GOSUB 6399 GOTO 6070 6947 MAZ gt 259 AND MA 290 THEN GOSUB 639 GOTO 6070 605 MAZ gt 270 OR MAZ lt 90 THEN GOSUB 619 GOTO 6070 6060 GOSUB 6200 6070 PAZ ANG 608 RETURN 6100 MM TXT X4 6102 LL LEFT MM YA 6104 PP LEN PTXT PI 6106 RR RIGHT 80 Y4 PP 6108 4 LL PTXT PI RR 6110 RETURN 6200 MM TXT X4 6202 PP LEN PTXT PI 6294 11 LEFT MM Y4 PP 6206 RR RIGHT MM 89 Y4 6208 TXT X4 LL PTXT PI RR 6219 RETURN 6300 MM TXT X4 6319 PP INT LEN PTXT PI 2 6320 1 LEFT MM Y4 PP 6330 RR RIGHT 80 Y4 6349 TXT X4 LL PTXT PI RR 6350 RETURN 7099 REM 7919 HOME PRINT PRINT PRINT 7020 INPUT ENTER TITLE FOR CHART TI 7925 IF LEN TI lt 40 THEN 7030 70
51. X1 DX Y1 370 GOSUB 400 380 1 390 RETURN 499 410 Subroutine to plot a point at X1 Y1 42g 430 XX X1 LXFAC Yi LYFAC 449 COL INT XX 1 450 ROW INT YY 6 469 XIT INT YY ROW 6 1 47 BIT COL ROW BIT COL ROW OR MASK XIT 48 RETURN Y2 1 ABS YLXLYFAC Y1 DY Printing With Dot Graphics 149 699 619 Subroutine to plot a circle 620 630 640 X1 19 Y1 1g 659 FOR ANG TO 369 STEP 10 660 RANG 0 6 28 260 679 X2 RAD COS RANG 19 Y2 RADXSIN RANG 19 689 GOSUB 279 699 NEXT 700 RETURN How the program works In the program above we ve created an array called BIT which is dimensioned in line 50 You ll note that instead of using numeric constants to dimension the array we used the vari ables MAXCOL96 and 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 40 The array 5 con tains 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 90 and 100 we ve defined some other variables you ll be interested in LX LXFAC LY and LYFAC are used as scaling factors By chang ing these values you can change the size of your printed image or even distort it you can for example mak
52. al interface an Asynchronous Communications Adapter You only need a cable to connect Radix to your IBM PC Your Radix dealer can furnish this cable or you can use a standard IBM PC parallel printer cable for the parallel interface Connecting with the parallel interface We recommend that you set the DIP switches in Radix as shown below when connecting it to an IBM PC parallel interface Connecting to the serial interface 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 190 Radix User s Manual MODE COM1 48 N 8 1 P MODE LPT1 COM1 The first line sets up the asynchronous adapter to match the Table B 1 Recommended DIP switch settings for IBM PC Function 1 6 inch line feed U S A Character set Paper out detector active OFF Table B 2 IBM PC parallel cable Radix IBM PC Parallel Pin No Function Pin No Function STROBE CUM STROBE D1 Miete egeat ei DO D2 SO D1 D3 T D2 D4 SS D3 D5 s D4 D6 M D5 D7 D6 D8 D7 ACK ACK BUSY lt BUSY PAPER END II PAPER END SELECTED SELECT GROUND _ T9 WT 18 25 GROUND RESET 16 RESET ERROR n ERROR
53. ble 12 1 might make things even easier Table 12 1 Calculating n1 and n2 If the number of columns x ranges from 1 25 x 35t58 x 1 sino s 2 10410179 xoa 4 i2 00 1595 x 12m9 5 i18 191 xis 6 5 2560102815 256 142 Radix User s Manual Specifying the graphics data Now that we ve told Radix how much data to expect we bet ter figure out how to send that information Just as you do with download characters with dot graphics you have control over the firing of every single pin on Radix s print head In Figure 12 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 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 This is one byte of graphics data it would replace m1 in our format statement on page 140 not used Figure 12 1 Starting with the most significant bit at the top each pin of the print head is assigned a value wh
54. code Function CHR 7 Bell ESC Y CHR 0 Disable bell ESC Y CHR 1 Enable bell ESC 0 Reset CHR 19 Off line CHR 17 On line ESC 8 Paper out detector off ESC 9 Paper out detector on ESC U CHR 1 Unidirectional printing ESC U 0 Bidirectional printing CHR 8 Backspace CHR 127 Delete ESC gt Eighth bit on ESC Eighth bit off ESC Eighth bit as is ESC 7 n Select international character set ESC CHR 30 Define macro ESC P Use macro Radix User s Manual 108 Chapter 11 Creating Your Own Characters In this chapter we ll cover Designing and printing your own characters Designing proportional characters In the previous four chapters of this manual you ve learned how to control the Radix printer to give you dozens of different typefaces By using various combinations of pitches character weights and font selections you can create nearly any effect you want to in text And with international character sets and the spe cial text and graphics characters described in Chapter 10 you can print almost any character you can think of But if almost any character isn t good enough for you then it s a good thing you have a Radix printer With it you can actually create your own characters As you ll see in this chap 110 Radix User s Manual ter download characters can be used to pr
55. cter into RAM ESC 0 Copies fonts in ROM into download RAM ESC X CHR 1 Selects the download character set and uses proportional spacing ESC X CHR 0 Cancels proportional download charac ter set ESC CHR 1 Selects the download character set and uses normal spacing ESC CHR 0 Cancels normal download character set 138 Radix User s Manual 12 Printing With Dot Graphics Subjects covered in this chapter include e Radix s bit image graphics capabilities Printing a pre defined shape Plotting a calculated shape High resolution graphics In Chapter 11 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 Radix 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 Radix printer can be used as a graphics plot ter This can have some practical business applications as well as create some terrific computer art 140 Radix User s Manual 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 review the first few pages of Chapter 11 The principles for dot graphics are the same as those for download characters There are some differences in
56. derline off 89 LPRINT CHR 27 T Super amp subscripts off 99 LPRINT CHR 27 5 Select roman character set 100 LPRINT CHR 39 End macro definition As the comments in the program listing show this will define a macro that will reset all the print style functions Radix will remember this macro until the power is turned off or until a new macro is defined A macro can hold up to 16 bytes characters of information The one that we defined contains fifteen Now that you have defined a macro let s see how to use it This program will print one line using several printing style fea Special Features of the Radix Printer 107 tures Then it calls the macro in line 60 When line 70 prints the style is plain vanilla because the macro has reset it 1g Uses macro to reset RADIX to normal 29 LPRINT CHR 27 4 Italic 30 LPRINT CHR 27 G Double strike 49 LPRINT CHR 27 W CHR 1 Expanded 50 LPRINT This line is special 69 LPRINT CHR 27 the macro 70 LPRINT This line is normal printing TROIS Linge taal This line is normal printing In this chapter we have learned many different commands that have many different uses In the next chapter we will make up for this diversity the whole chapter only covers three com mands But they are some of the most powerful that Radix offers They give you the ability to create your own characters Summary Control
57. e our circle print as an ellipse Experiment a little bit The main calculations for plotting the image are done in the subroutine starting at program line 600 This is where you put the formulas that you want to plot By changing just the lines after 600 with some creative mathematics you can plot any function limited only by your imagination Some examples are shown at the end of this section 150 Radix User s Manual What the program section starting at line 600 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 subroutine call is made to line 270 This subroutine calculates the coordinates of individual points along that line After these coordinates have been determined the subroutine at line 400 is called This routine turns an individual dot in our array called 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 470 When all the points have been plotted in memory printing begins at line 150 We first set the line spacing to 6 72 inch using the ESC command
58. e the adhesive tape attached to the joint and insert the sub cassette into the ribbon cassette as shown in Figure 14 2 7 Pull out the ink ribbon and set it according to the directions shown by the arrow in Figure 14 3 It s easy for the ribbon to get twisted somewhere along its pathway Don t let it happen Twisted Figure 14 3 Make sure that the ribbon is not twisted when you thread it through its path 8 Firmly pull the idler gear towards you and guide the ribbon between the idler gear and the ribbon drive gear 9 Remove both top and bottom of the ribbon sub cassette 10 Replace the ribbon cartridge top cover 11 When you ve completed the installation mark the correct number on the silver label stuck on the right hand side of the cartridge cover This number indicates the number of times the ribbon has been replaced Five replacements is the maxi mum after which you should buy a complete new cartridge Basic Maintenance 175 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 that the power switch is on and the printer is plugged in it s likely a blown fuse To check the primary fuse you start by turning the power switch off and unplugging the power cord Warning There is an extreme shock hazard inside Radix To avoid serious injury it is important that the power cord is discon nected
59. ecified any will not print You must however send information even if it is 0 for those columns when you define a character Radix expects eleven characters following the ESC 4 CHR 1 n1 n2 sequence In most cases the width you select should actually be at least one dot wider than the number of columns that the character actu ally occupies This is so that there will be a space of one dot between characters when you print them If you specify a width which is exactly the same as the number of columns in the charac ter definition the characters will touch when they print this is sometimes desirable for border characters or for large download characters that are more than eleven dots wide Printing proportional characters Printing with proportional download characters is much like using normal width download characters one command is used to select the download set or the standard character set Here s the command ESC X CHR n If n is 1 then the download character set is selected and pro portional widths are used If n is 0 the standard character set is selected It should be noted that it is possible to use the same character definitions for either normal width or proportional download char acters if a valid proportional width is included in the attribute byte The only difference is the way they are accessed ESC CHR amp 1 for normal width or ESC X CHR 1 for proportional width The t
60. ender 16 Width Format Esc 1ninm m Figure 11 5 We ve designed a character and decided that it would not be a descen der hence the 0 written in m m m Ms Me m Ma Ma MoM WRONG Figure 11 6 Dots cannot overlap those in immediately adjacent half columns will be ignored when the character is printed P esas Creating Your Own Characters 115 when it prints Radix will leave out the overlapping dots so that it would print like Figure 11 5 Add up each column of dots Now it s time to give our creative side a break and get down to some basic arithmetic That s where the numbers down the left side of the grid come in Notice that there is a number for each row of dots and that each number is twice the previous number By making these numbers powers of two we can take any combi nation of dots in a vertical column and assign them a unique value Some examples will make this clearer As shown in Figure 11 7 if we add the numbers for the dots that print in a column the sum will be a number in the range of 0 to 127 Each number from 0 127 represents a unique combination of dots So add up the values of the dots in each column using this system This way it takes one number to describe each column of dots In Figure 11 8 we ve shown our grid with the sums of the columns filled in across the bottom see if these agree with your Figure 11 7 By adding the values of each dot in a column you ll get
61. ere it is ESC CHR 1 nin2mim2m3m4m5m6m7m8m9miOmii m m m m m m m m mm m m m m m m m m m MYM M n 45 zy n 48 Descender Oescender 2 width i n Descender 16 Width n Descender 16 Width Format Format Esc inn m m Esc innm Total m m m m m m m m m m m n 235 Descender 2 widan Descender 716 Width Format Esc 1n n m m Figure 11 9 Character designs for our three characters 118 Radix User s Manual Like the other Radix commands it starts with an ESC CHR 27 The next character is an asterisk which is CHR 42 followed by a CHR 1 n1 is the value we assign to the character in the case of the bullet it is CHR 43 n2 is called the attribute byte for it describes two attributes of the character we have designed descender data and proportional width information A byte consists of eight bits In the attribute byte the first three high order bits are unused the fourth bit is used for the descender data and the last four bits are used for proportional widths We ll be discussing proportional character widths in detail later in this chapter for now we ll leave it at 11 The descender data was discussed earlier to use the top seven pins this bit should be 0 to use the bottom seven pins this bit should be 1 Figure 11 10 shows the b
62. esigned their charac ters by using a grid to lay out the dots Now you can define charac ters exactly the same way Make up some grids photocopy Figure 11 4 if you wish and get ready to be creative Just in case you not feeling creative and to make our explanations a little clearer we ll be using a bullet as an example of a download character You can see how we ve laid it out in Figure 11 5 You ll find this useful for highlighting a list of items as we have done at the begin ning of each chapter in this manual You ll notice that Figure 11 4 includes a lot of information around the grid Don t be intimidated we ll explain each item as we come to it in our discussion of defining and actually printing download characters You may have noticed another difference between this grid and the one shown in Figure 11 3 it s only seven boxes high Which leads us to Rule 1 Download characters are seven dots high As you noticed in Figure 11 2 capital letters most lowercase letters and most special characters use only the top seven pins of the printhead This is also the standard for download characters so our grid is only seven dots high It s also possible to use the bottom seven pins just as the g p and of the standard character sets do These are called descenders because the bottom of the character descends Creating Your Own Characters 113 m m m m m m m mg m M M n
63. esoft BASIC The Apple II computer using Applesoft BASIC does not 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 PR 1 or 10 PRINT Ctr1 D PR 1i or 10 PRINT CHR 4 PRf1 To return output to the screen the command is PR 0 in the same form that works for PR 1 Apple II Computers 197 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 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 be 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 CHR 7 and CHR 9 The computer will not send these codes to Radix 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
64. et and ready to roll 7 As a final step replace the front cover As you ll learn in Chap ter 1 Radix refuses to print unless the front cover is securely in place A glowing pause lamp warns of a loose cover When this occurs do the obvious thing fasten the cover securely press the pause button to douse the green light and you re back in business 188 Radix User s Manual Figure A 7 Use a ball point pen to place the ribbon between the print head and the ribbon guide It s important that the ribbon is centered vertically between the print head and the ribbon guide Connecting Radix to Your Computer To complete the installation you ll need to connect Radix to your computer In appendices B through E we ve described this procedure including specific guidelines for making connections interfacing with several of the most popular computers used by Radix owners Then in Chapter 1 you ll learn how to load paper here s where you ll use the paper guides and operate Radix Aspedi B IBM Personal Computer and Compaq Computer Both the IBM Personal Computer and the Compaq computer function the same when connected to Radix We will discuss the IBM PC knowing that all we say works just as well for the Com paq Connecting Radix to an IBM Radix 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 seri
65. f 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 30 to plot 1000 points and run the program 144 Radix User s Manual 39 WID 100 WOW NER CELL EMT LED MEE NN DN regm This is great This will make the sine wave pattern long enough to go off the page As you can see Radix 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 Radix 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 t
66. hough double density double speed graphics 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 Printing With Dot Graphics 159 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 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 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 appropriate appendix Summary Control code Function ESC K n1 n2 m1 m2 P
67. ich 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 10 Demo bit graphies 20 PI 3 14159 30 WID 199 Printing With Dot Graphics 143 49 OPEN AS 1 WIDTH 01 255 59 PRINT 1 CHR 27 CHR WID MOD 256 CHR INT WID 256 60 FOR TO WID 1 0 PRINT i CHR 2 INT 1 SIN IXPI 32 3 54 5 80 NEXT I 99 LPRINT 199 CLOSE 1 In line 50 we ve selected normal density graphics and said that 100 characters of graphics data would follow The loop between lines 60 and 80 is repeated to plot 100 points along a curve This is an example of plotting a very simple mathematical function a sine wave to create a design Later in this chapter we ll show something more complex The mathematical concepts such as sine and pi demonstrated here are not important you don t have to be a math whiz to use Radix s graphics 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 45 PRINT 1 WOW 85 PRINT 1 This is great Now if you run the program you should get a printout that looks like this WOW 77 This is great But there is one thing to be careful o
68. ings 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 Apple II Computers Apple II computers require an interface board mounted inside the Apple IT and a cable to run Radix Star recommends that you use the grafstar interface for the Apple II and 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 II and an appropriate cable Setting the Switches We recommend that you set the DIP switches in Radix as shown below when connecting it to an Apple II Since you ll be using the parallel interface the settings of switch B have no effect Table C 1 Recommended DIP switch settings for Apple 11 inch page size U S A Character set 196 Radix User s Manual Table C 2 Apple parallel cable Radix Apple Board Pin No Function Pin No Function SIG GND SIG GND SIG GND SIG GND SIG GND SIG GND STROBE STROBE SIG GND N C DATA1 DATA1 DATA2 DATA2 DATA3 DATA3 DATA4 DATA4 DATAS eS SS 5 DATAG n DATA6 DATA7 DATA7 DATAS P DATA8 Rn SIG GND n SIG GND DNN NOA N 2 3 4 5 6 7 8 9 o Q j amp IN Appl
69. int a logo special char acters for foreign languages scientific and professional applica tions or any other specific printing task Dot Matrix Printing In order to create download characters you ll need some understanding of how dot matrix printers work They re called dot matrix because each character is made up of a group of dots Look closely at some printed characters produced by your Radix and you will see the dots Figure 11 1 shows how the letter is formed by printing 15 dots Figure 11 1 The letter is created by printing 15 dots The printhead in Radix consists of nine thin wires stacked one atop the other Figure 11 2 shows an enlarged schematic view of the front of the printhead showing the ends of the wires and their relationship to the printed characters As you can see the capital letters use the top seven wires of the printhead and the descenders such as the lower case shown use the bottom seven pins As the printhead moves across the page in either direction that s what is meant by bi directional printing it prints one column of dots at a time Each time a dot is supposed to print an electromagnet inside the printhead causes the appropriate wire to strike the ribbon making Radix an impact printer Creating Your Own Characters 111 The Print Matrix All of the standard characters that Radix prints are formed from patterns of dots that are permanently stored in the printer s RO
70. ion All of these characters have ASCII codes greater than 127 which means that the eighth bit must be on to use them The solution lies in the three control codes given in the following table Table 10 4 Eighth bit control commands Fonction Control code 1 Turn the eighth bit OFF ESC Accept the eighth bit is from the computer ESC 4 Block graphics characters and special symbols Besides the upper and lower case letters and symbols that we are by now familiar with Radix has a whole different set of char acters that are for special uses These characters include block graphics characters for drawing forms and graphs and special symbols for mathematical engineering and professional uses The following program will print out all of the graphics characters available 1g Prints all block graphic characters 20 WIDTH LPT1 255 30 FOR J 169 TO 255 STEP 8 4g FOR I J TOJ 7 Special Features of the Radix Printer 103 50 LPRINT I 69 LPRINT CHR I Send graphic char 7g LPRINT CHR 9 Tab 8 NEXT I LPRINT NEXT J Figure 10 1 shows what this program will print If your chart doesn t look like this because it has regular letters and numbers instead of the special symbols then your computer is only using seven bits unless you have set DIP switch C 3 on by mistake You can get the correct printout by adding these lines 55 LPRINT CHR 27 gt Turn on 8th b
71. ions of code from the plotting program We ve expanded on that program framework to include routines for inputting data to be graphed and placing labels next to the pie chart We ve used a feature of Radix to simplify pro gramming and speed up the program a reverse form feed The program calculates locations and prints all of the labels When the labels are done a reverse form feed to the top of the sheet prepares Radix for the graphics data The output from our program is shown below National lLleaque West Attendance 197 San Diego Los Angeles m San Francisco i Z Atlanta Houston Mun b Cincinnati 156 Radix User s Manual High Resolution Graphics Up until now ail of the dot graphics printing we have done has been with Radix 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 Radix has four graphics modes you can use they re summarized in Table 12 2 Table 12 2 Dot graphics commands Function 7 Contrlleode Normal density 60 dots inch ESC K n1 n2 m1 m2 Double density 120 dots inch ESC L n1 n2 m1 m2 Double density double speed ESC y n2 m1 m2 Quadruple density 240 dots inch ESC z n1 n2 m1 m2 Note If your computer does not support lowercase characters use CHR 121 and CHR3 122 for 2 respectively The co
72. is required to make it work is to change two bytes of the program This can easily be done with the DEBUG program that comes with IBM DOS Even if you have never used DEBUG before we will lead you through it The first step is to create a diskette with DOS GRAPHICS COM and DEBUG COM on it it doesn t matter if there are other things on it too We will leave it to you to create this diskette Look in your computer s manual if you have trouble Be sure that this is not your original DOS diskette With this diskette in drive A follow the script below The things that you are to type are shown in italic type The messages that will appear on your screen are shown in regular type With two exceptions every number should appear on your screen exactly as it does in this script The two exceptions are the four digit numbers before the colons 0921 in the script They may be different on your computer The symbol enter means to press the enter key A DEBUG GRAPHICS COM enter E 169 enter 0921 0169 18 19 enter E 25g enter 0921 0250 24 18 enter W enter Writing 0315 bytes Q enter A To use this program type GRAPHICS at the A prompt before you create a graphics image on the screen Then when you want to print a graphics image press shift PrtSc and the image will be copied from the screen to the printer For more information on the GRAPHICS program refer to your DOS manual 194 Radix User s Manual Program List
73. it 65 LPRINT CHR 27 Turn off 8th bit So how are all of these strange characters used Here is a short program that demonstrates how the graphics characters can be combined to create figures 10 Draws a figure with block graphic chars 20 LPRINT CHR 27 A CHR 6 Set line spacing to 6 72 30 LPRINT CHR 235 CHR 231 CHR 231 CHR 236 40 LPRINT CHR 233 CHR 163 CHR 161 CHR 234 50 LPRINT CHR 233 CHR 162 160 CHR 234 69 LPRINT CHR 237 CHR 232 CHR 232 CHR 238 7Q LPRINT CHR 27 2 Restore 1 6 line spacing If you have a 7 bit interface add the following lines to the program given above 25 LPRINT CHR 27 gt Turn on 8th bit 65 LPRINT CHR 27 Turn off 8th bit In this program line 20 sets the line spacing to 6 dots which is the height of the graphics characters Then lines 30 60 print the c te gt 104 Radix User s Manual 14640 151 162 1643 168 m 1697 170 171 F 176 k 177 178 m 179 184 X 185 1 184 amp 187 X 192 A 193 174 c 175 200 t 202 E 205 208 209 A 210 211 216 217 218 219 6 224 225 226 u 227 w CIA 224 235 P 240 241 242 4 245 248 249 d 250 2591 F Figure 10 1 figure and line 70 resets the line spacing to 1 6 inch Here is what this program prints
74. its of the attribute byte as we ll use them for our bullet character Since the descender data is 0 the value of the byte is equal to the value of the proportional data 11 By now you ve probably seen an easier way to deter mine the value of the attribute byte Instead of translating every thing to binary merely assign the descender data a value of 16 the value of the fourth bit if you want descenders or 0 if you don t want descenders Then just add the descender data to the propor tional width This way it s simply a matter of adding two decimal numbers In our case it s 0 11 11 11 decimal rh Unused Proportional idth Descender data ud Figure 11 10 The attribute byte n2 for our bullet character You ll probably recognize m1 m11 from the top of our lay out grid That s right each column is described by one byte Now we ve got everything we need to download one character to the printer The complete command for our bullet character is shown in Figure 11 11 Now let s send the information to the printer The following program will send the character definitions for all three charac ters to the printer Enter the program and run it Creating Your Own Characters 119 CHR 27 CHR 42 CHR 1 CHR 43 CHR 11 Escape 1 n n CHR 24 CHR 36 CHR 90 CHR 36 CHR 90 CHR 36 M M M M M CHR 90 CHR 36 24 0 0 M Figure 11 11 This is
75. ix User s Manual 176 TORTOR ERECTO RID a Pee a Figure 14 4 After removing the screws pull the upper case slightly forward and lift it off the printer The primary fuse is located near the power switch eue PUT E ang e Ms TP a Te QNS NE E To 798 9 ERA dS Mer nn a Ptr EU SEES ac AP rnt RI AR AUNT Wr T NEL Y TI Basic Maintenance 177 th 2 Remove the two screws and washers fastening the print head 3 While holding the print head pull off the head cable connector from the print head 4 Insert the head cable connector to a new print head and fasten with the same two screws and washers Print head Head cable connector e Sh 4 C e Mo SA Carriage Figure 14 5 Replacement of Radix s print head is simple 178 Radix User s Manual 5 Apply screw lock an adhesive available at hardware stores to the heads of the screws Be absolutely sure that you ve made a good solid connection between the print head and its cable connector or it could cause problems a ERR LR LL 180 Radix User s Manual Appendix Setting Up Radix In this appendix we ll show you how to unpack your new Radix 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 Bef
76. 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 Radix 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 11g IF PEEK 49691 127 THEN 110 120 POKE 49296 N Line 110 checks the printer s status and when it s okay line 120 pokes the code to the printer Listing programs To make a listing of your BASIC programs on Radix from your Apple II computer you must take the following steps 198 Radix User s Manual 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 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 utility programs used in the tutorial section of this book Download character editing utility 10 DIM 7 8 12 11 11 CHR 27 X CHR 12 PN CHR 27 X CHR 1 13 NF CHR 27 CHR 0 14 NR CHR 27 CHR 1 15 CS 56 16 BEEP CHR 7 18 AS 33 PP ESC CHR 27 20 GOSUB 1910 269 REM 265 FOR I 1 TO 11 MM I NEXT I 270 VTAB 3
77. mmand syntax for all of the commands is the same just as you have learned it for the ESC normal density command The number of columns to be printed is n1 256 2 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 graphics modes They were all printed using the plotting program in this chapter with a rather complex set of formulas starting at line 600 Normal density graphics x Printing With Dot Graphics Quadruple density graphics 157 158 Radix User s Manual 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 50 to try each of the different modes Just change the K to L and z in turn Your printouts should look something like this ESC ep ESC y 2 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 Star s engineers have given programmers a unique shortcut for program development t
78. move the front cover and remove the large flat piece of cardboard packing which protects the print head per Figure 4 Radix User s Manual 184 Figure A 3 Radix 10 has three screws which secure the chassis during shipping Radix 15 has four They should be removed before use Setting Up Radix 185 Figure A 4 Remove the piece of cardboard packing that protects Radix s print head You ll be smart to save these screws along with the rest of the packing material and the shipping carton in case you ever have to ship the printer Tape the screws somewhere on the carton or packing You did fill in that warranty 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 it on firmly Give the knob a few turns to see that it s turning the platen easily and smoothly Installing the ribbon cartridge The ribbon cartridge greatly simplifies installing the ink rib bon For easy installation though it s wise to follow the sequence and diagrams shown here 186 Radix User s Manual 1 Turn the power switch off and remove the front cover as explained earlier 2 Slide the print head gently with your fingers to the approximate center of its pathway Guide pin Figure A 5 A guide pin o
79. n each side of the ribbon cartridge helps to align the cartridge during installation 3 Note the position of the guide pins on the cartridge as shown in Figure A 5 Then hold the cartridge at each end with the ribbon facing away from you and insert the guide pins into the cut out hooks of the printer frame You ll find this easier if you tilt the cartridge forward as you do this as Figure A 6 shows 4 Using the guide pins as a fulcrum lightly press the cartridge down until the two holder springs snap shut to hold the car tridge firmly in place 5 Now thread the ribbon carefully between the print head and the ribbon guide next to the platen Take a good look at Setting Up Radix 187 Guide pin Figure 6 Tilt the ribbon cartridge in until the guide pins meet the hooks in the printer frame then lower the front edge until the holder springs hold it in place Figure A 7 You might want to use a ball point pen to lightly press the ribbon guide against the platen rubber roller while you insert the ribbon into the thin space between the print head and ribbon guide Important Center the ribbon vertically in the middle of the print head to avoid misprints or the ribbon com ing off during printing 6 Turn the spool gear knob in the direction of the arrow printed on the top left side of the cartridge to take up the slack in the ribbon continue turning the spool gear four or five times to verify that everything is properly s
80. nk ribbon By far the most convenient way is to simply replace the entire ribbon cartridge Appendix A describes this procedure After all that s the purpose of the cartridge to save time and messing with dirty ribbons Itis possible however to buy a replacement ribbon and insert it yourself inside the original cartridge casing The procedure for inserting a new ribbon into the old cartridge not recommended for non mechanical types is as follows 1 First obtain from your Radix dealer the correct type of ribbon sub cassette not spool type ribbons used with some other printers 2 Remove the ribbon cartridge from the printer by holding both ends and pulling straight up from the holder springs Refer to Appendix A for illustrations of installing ribbon cartridge 3 Pry open the cartridge cover with a thin bladed screwdriver Arrows in Figure 14 1 show the numerous slots for inserting a screwdriver 4 Press hard against the end of the idler gear holder to make a gap between it and the ribbon drive gear and remove the old ink ribbon sub cassette See Figure 14 2 5 Clean out any dirt from inside and around the cartridge and around the ribbon drive gear Basic Maintenance 173 T Screwdriver T Figure 14 1 Use a screwdriver to pry open the cartridge Ribbon drive gear Figure 14 2 Replace the ribbon sub cassette 174 Radix User s Manual 6 Remove the wrapping from the new ribbon sub cassette remov
81. ns of dots that the charac ter or partial character occupies And if you change the vertical spacing to 7 72 use the ESC 1 command you can make characters connect vertically This allows you to make very large characters indeed Creating Your Own Characters 127 In the program that follows we ve used this technique to cre ate some large numbers Each digit is actually made up of four characters two horizontally by two vertically This means of course that you must define and print four characters for each finished digit We assigned the upper left quadrant of each digit to ASCII codes from 160 to 169 the upper right quadrant to codes 170to 179 and so on Figure 11 15 shows how one digit is defined and Figure 11 16 shows the final output of our program Figure 11 15 Each digit is made up of four individual characters 1g Program to define and print BIG numerals 20 Each numeral is made up of four characters 30 two wide and two high A blank is also defined 50 69 Download the 41 special characters 70 OPEN LPT1 AS 1 WIDTH 71 255 80 FOR 1 169 TO 299 N1 is the char code 9g PRINT 1 CHR 27 x CHR 1 100 PRINT 1 CHR N1 110 READ N2 120 PRINT 1 CHR N2 128 Radix User s Manual 139 FOR S 1 TO 11 140 READ MS 159 PRINT 1 CHR MS 160 NEXT S 179 NEXT 18g CLOSE 1 199 BLANK CHR 299 29g 210 Print the B
82. o 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 100 reads the data state ments into a string array variable called LOGOS In line 170 we change the line spacing to 8 72 inch so that the lines of graphics data will connect vertically The actual printing is done in the loop between lines 180 and 210 line 190 sends the graphics control code to Radix and line 200 sends one line of graphics data The printout from the program is shown right below the program Printing With Dot Graphics 145 T bc SBME NEL 3 1 Hn 1 1 Figure 12 2 By laying out the logo on graph paper you can calculate all of the graphics data 1g Prints S amp S logo 20 LINE 8 CHR 27 CHR 65 CHR 8 30 Set line spacing to 1 6 LINE 12 CHR 27 CHR 59 59 Select dot graphics 60 GRAPHIC CHR 27 CHR 75 79 DIM LOGO 4 89 WIDTH LPT1 255 90 READ DATA 100 FOR ROW 17024 110 FOR COLUMN 1 TO 199 129 READ P 130 LOGO ROW LOGO ROW CHR P 14g NEXT COLUMN 159 NEXT ROW 16 PRINT LOGO 179 LPRINT LINE 8 18
83. on card Let s move on to the next step Removing the printer covers What are covers for really Primarily for two reasons one to keep dust and dirt away from the delicate innards and two to keep the noise level down The front cover must be on or Radix will not print So you should keep the covers on all the time except when setting the ink ribbon cartridge in place loading paper or making other adjustments when the cover might be in the way Radix has two covers front and back Both operate in the Setting Up Radix 183 same way To remove them lift up the free end nearest the center of the printer so that the cover makes approximately a 45 angle with the printer frame then with a slight rocking motion lift it straight up and off the machine To replace just reverse the proce dure Figure A 2 illustrates the proper position and movement for both removal and replacement of the covers Rear cover Front cover Figure A 2 Remove the printer covers by tilting them up to about 45 then lifting straight up Removing packing and shipping screws There are three on a Radix 10 or four on a Radix 15 ship ping screws on the bottom of the printer used to hold the internal chassis securely to the external frame during shipping To get at these carefully place the printer upside down on a soft surface like a foam cushion Remove the screws with a Phillips screw driver as shown in Figure A 3 Next re
84. or 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 1g General purpose RADIX plotting program 2g 39 Set program constants 4 MAXCOL 75 MAXROW 14 148 Radix User s Manual 5 DIM 60 5 1 64 MASK 4 8 70 MASK 2 32 MASK 5 4 80 MASK 3 16 MASK 6 2 99 LX 29 LY 29 100 LXFAC 72 LX LYFAC 87 LY 110 120 Plot curve 139 GOSUB 699 14g 15 Send bit image map to printer 169 LPRINT CHR 27 A CHR 6 170 FOR ROW TO MAXROW 189 A M 199 LPRINT CHR 27 K CHR MAXCOL CHR 9 200 FOR COL 1 TO MAXCOL 219 A A CHR BITZ COL ROWZ 220 NEXT COL 230 LPRINT A 249 NEXT ROW 250 LPRINT CHR 27 2 269 END 270 289 Subroutine to draw a line from 1 1 to X2 Y2 299 300 XL X2 X1 YL 310 NX ABS XLXLXFAC NY 320 IF NX NY THEN NX NY 330 NS INT NX 1 340 DX XL NS DY YL NS 350 FOR 1 1 TO 5 369 X1
85. ore 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 printer and computer will lead longer healthier lives if they like their environment For a congenial envi ronment we recommend 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 e Avoiding areas with a lot of dust grease or humidity e Giving it clean electricity Don t connect it to the same circuit as large noise producing motors Power supply voltage should be the same voltage that s specified on the identification plate not over 1096 more or less than the recommended 120 volts AC Warning Extremely high or low voltage can damage your printer What Have We Here Now let s take a look at what s in the carton Take it slow and easy and check each item in the box against Figure A 1 There should be exactly 9 items One important item is the printer s war ranty and registration 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 182 Radix User s Manual Figure A 1 Inside the carton you should have received 1 Radix printer 2 cut sheet guide 3 continuous paper guide 4 power cord 5 platen knob 6 spare fuse 7 ribbon cartridge 8 this user s manual and 9 warranty registrati
86. outine to place the cursor 1320 LOCATE 4 10 1330 IF Z G H 1 THEN COLOR 31 1 PRINT SC COLOR 7 9 1349 IF Z G H THEN COLOR 7 9 PRINT CS 1350 RETURN 1369 1379 Subroutine to print current character 1380 GOSUB 2050 1390 LPRINT ASCII eode z AS LPRINT 1400 PRINT 2 REC Download the character 1410 LPRINT CHR 27 CHR 3 Condensed 1429 LPRINT RAMNML STRING 21 AS 1439 LPRINT RAMNMLOFF 1449 LPRINT CHR 27 B CHR 2 Elite 1459 LPRINT RAMNML STRING 15 AS 1460 LPRINT RAMNMLOFF 136 Radix User s Manual 1470 LPRINT CHR 27 B CHR 1 Pica 1480 LPRINT RAMNML STRING 12 AS 1499 LPRINT RAMNMLOFF 150g LPRINT CHR 27 W CHR 1 Expanded 1519 LPRINT RAMNML STRING 6 AS 1520 LPRINT RAMNMLOFF CHR 27 W CHR 0 1539 LPRINT Character set normal width 1549 LPRINT RAMNML 1559 FOR I 33 TO 126 LPRINT CHR I NEXT LPRINT 1569 FOR I 169 TO 254 LPRINT CHR I NEXT LPRINT 1570 LPRINT RAMNMLOFF 1580 LPRINT Proportional 1599 LPRINT RAMPRO STRING 15 AS 1600 LPRINT RAMPROOFF 1619 LPRINT Character set proportional 1620 LPRINT RAMPRO 1630 FOR I 33 TO 126 LPRINT CHR I NEXT LPRINT 1649 FOR I 169 TO 254 LPRINT CHR I NEXT LPRINT 1659 LPRINT RAMPROOFF 1660 LPRINT LPRINT LPRINT 1670 LPRINT Use this data statement to download this character 168 GOSUB 2050 LPRINT DATA 27 1699 FOR I 2 TO LEN REC
87. ownload characters Table 11 3 Mixing download characters with various print modes Escape Escape X Pia O O i YO Ys J Ys O me w Condensed Yes J J3 Expanded Ye P x E a C s pai es es es es es A Utility Program If you ve followed along this far you ve probably become pretty proficient at designing download characters And even the addition is getting easier But this is a good computer applica tion Computer Aided Design CAD for download characters The program below allows you to design and edit characters on the screen You can make changes no erasing until it s the way you like it and then the program makes the necessary calculations and sends the character to Radix As you can see at 205 lines this is quite a long program How ever if you want to use the full capabilities of Radix s download characters you ll really appreciate it Instructions for using DLEDIT The program screen is shown in Figure 11 17 Above the main grid where you actually place the dots there are two infor mational lines Creating Your Own Characters 131 The first line tells the ASCII code of the character being edited and in parentheses the normal character for that code The next field in the first line tells whether the character being edited is a descender or not a 1 indicates that it is 0 means that it is not
88. printer You can also access the character from a BASIC program with the CHR function in this case LPRINT CHR 66 would print the character Except for the limitation that download characters must be assigned values in the range of 33 to 126 or 160 to 254 there are no rules or restrictions on the use of numbers This means you Creating Your Own Characters 117 use whatever is most convenient for you perhaps seldom used keys can be replaced by more useful characters In our example we ll assign the bullet a value of 43 which is the ASCII value for the character This way when we want to print a bullet all we have to do is send the printer a 4 To make our demonstration of download characters more complete we ve designed two more characters To avoid confu sion between the letter and zero we have created a slashed zero to replace Radix s zero ASCII 48 And since some people prefer the lb abbreviation for pound we ve replaced Radix s symbol ASCII 35 with a Ib The information on the grids is now complete except for proportional width data a more advanced topic we ll take up shortly Download character definition command You ve read through a long explanation of download charac ters and we haven t even told you the command syntax yet Now the wait is over This is the most complex command in the Radix repertoire and now you ve got the necessary knowledge to imple ment it H
89. re are many commercially available graphics programs that support Radix 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 10 Program to print piechart on the RADIX 152 Radix User s Manual 2g 30 Initialize program constants Ag ESC CHR 27 LF CHR 19 50 FF CHR 12 VTAB CHR 11 69 REVFF ESC FF 7g Emphasized amp expanded modes 89 TITLE ON ESC E ESC CHR 1 90 TITLE OFF ESC ESC W CHR 9 100 OPEN LPT1 AS 1 WIDTH 01 255 110 DIM BIT4 199 36 A 36 PCT4 25 129 DIM PIECETEXT 25 130 MASK 1 MASK 4 8 140 MASK 2 2 MASK 5 4 150 MASK 3 16 MASK 6 2 169 LX 29 LY 20 170 LXFAC 199 LX LYFAC 216 LY 180 FOR I 0 TO 48 199 TEXT I SPACE 79 200 NEXT I 219 GOSUB 1040 220 230 Plot curve 240 RAD 9 250 X1 19 Y1 19 270 FOR ANG TO 369 STEP 12 289 RANG ANG 6 28 369 299 X2 RAD COS RANG 1 Y2 RADXSIN RANG 419 300 GOSUB 640 31 NEXT ANG 329 FOR PIECE 1 TO NUMBER PIECES 330 X1 19 1 19 340 TOTAL PCT4 TOTAL PCT44 PCT4 PIECE4 350 ANGZ 360XTOTAL PCT4 Q1 260 RANG 0 6 28 260 270 X2 RAD COS RANG 19 Y2 RAD SIN RANG 19 389 GOSUB 640 399 GOSUB 870 499 NEXT PIECE 41g 429 Send chart title to printer 440 LPRINT ESC A CHR 6 REVFF VTAB 459 LPRI
90. rint n1 256xn2 columns of nor mal density graphics ESC L n1 n2 m1 m2 Print double density graphics ESC y 1 2 1 m2 Print double density graphics at double speed ESC z n1 n2 m1 m2 Print quadruple density graphics 160 Radix User s Manual IN TN Chapter 13 Putting Radix to Work For You If you ve followed us this far you ve learned a lot about your Radix printer how to use its myriad of type styles sizes line spacing options character sets margins tabs and more Perhaps you ve even created some download characters maybe using the utility program in Chapter 11 Now as your reward as if the knowledge of how to use all these features wasn t enough for reading this entire manual we have one more utility program for you With this program you can set many of Radix s print parameters with just a few keystrokes No more writing a short program each time you want to change the print style to NLQ for example All you will need to do is type RUN return 1100 and it s done the program is completely menu driven 162 TESS HI 38H31 Lam Pam mpm 34 uje I abed pa sap J6 ur jsa aed po vius TIERE 9109 48101 qe POE jak qe oF E E x x i i _ m
91. rom the jargonese macro instruc tion which refers to an instruction that calls or uses a group of normal instructions In computer programming macro instruc 106 Radix User s Manual tions which are similar to subroutines save programmers a lot of time and effort Radix s macro can save you a lot of time and effort also Here is how Radix s macro works You define your macro by telling Radix what normal control codes are to be included in the macro Then you can use the macro any time that you want and Radix will do all the things that you included in the macro defini tion You can include up to 16 codes in a single macro You can even use the macro to store a frequently used word or phrase There are two control codes for the macro one to define it and one to use it They are given in the table below Table 10 7 Macro instruction commands nie ESC codes you include CHR 30 ESC f To see how this works we can build a macro that will reset the printing style to normal no matter what style it may be to start with The following program will define a macro to do this 10 Defines a maero that will reset RADIX to normal 20 LPRINT CHR 27 Start macro definition 30 LPRINT CHR 18 Select pica pitch 20 LPRINT CHR 27 W CHR g Expanded off 50 LPRINT CHR 27 F Emphasized off 60 LPRINT CHR 27 Double strike off 7Q LPRINT CHR 27 CHR g Un
92. rs per inch Whichever pitch you select all the characters are the same width You ll notice though that in typeset books such as this one each character has a slightly different width For instance the i is quite narrow and the W is very wide This is more pleasing to the eye and easier to read So if you re going to go to the trouble of designing your own download characters for Radix you might as well make them pleasing to the eye Proportional download characters allow you to do just that As you ll remember from our initial discussion of download character definition part of the attribute byte is for pro portional width data We skipped over that with the promise of describing it later Well now is the time Defining proportional characters Except for the actual width defining characters for propor tional printing is exactly the same as defining normal width download characters Characters can range from 4 to 11 dots wide This means that characters can be as narrow as one third the normal width The examples in Figure 11 13 show characters of different widths These characters are defined in the program that follows 10 Downloads proportional characters into RAM 20 OPEN LPT1 AS 1 WIDTH 71 255 30 FOR C 1 TO 4 40 READ C CODE 50 PRINT 1 CHR 27 x CHR 1 C CHR CODE 69 FOR I 1 TO 11 70 READ BITS 89 PRINT 1 CHR BITS 99 NEXT I 199 NEXT C 110 CLOSE 1 120 Print sample 139
93. 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 Radix 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 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 e f the graphic image to be printed is wider than 11 dots or higher than 7 dots e If an image is to be printed just one time as opposed to a fre quently used text character If you want higher resolution Radix 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
94. wed by this text 122 Radix User s Manual 0 X Xe 01224260799 3225780BC DEFGHIJELHMNOFGRSTUVWXYZUSI abcdefgh ijkimmoparstuvwaye iir Figure 11 12 Printout of the download character set into which all the standard characters have been copied and the 0 have been changed Today s Specials Oranges 10 1 99 Ocean Perch 1 99 f Your output should look like this Today s Specials Oranges 1 6 b 1 98 Ocean Perch 1 9 Ib Just a sampling of Radix s download capabilities As you can see it s no problem to define characters in BASIC or another language and use them with a word processor or other applica tion Note that we didn t have to re enter the download characters since they were already sent to the printer with the previous pro gram They will stay with the printer until you download new characters to replace them or turn the printer off Even the ESC command which initializes the printer does not destroy the contents of download RAM Table 11 1 Download character definition commands Function Control code Define download character ESC CHR 1 n1 n2 m1 m11 Copy ROM to download RAM lt ESC CHR 0 Creating Your Own Characters 123 Proportional Characters Up until now all the characters that your Radix has printed have been of a fixed width either 10 12 or 17 or 5 6 or 8 5 in expanded mode characte
95. will sound the bell for a quarter of a second This can be used to remind an operator to change the paper or to make another adjustment to the printer Note to Apple users Entering a CHR 7 will sound Apple s bell the code will not be sent to Radix You can try this by typing LPRINT CHR 7 There are two other codes that affect the bell One disables the bell so that Radix will ignore a CHR 7 and the other turns the bell back on All three codes that affect the bell are shown in the following table Table 10 1 Bell commands Function Control code Initializing Radix Up to now when we wanted to reset Radix to the power on Special Features of the Radix Printer 99 condition we have had to either turn the printer off and then on again or to send the specific codes that reset the particular fea tures There is an easier way The control code ESC 0 will reset all of Radix s features to the power on condition as deter mined by the DIP switches with two exceptions Those excep tions that ESC 00 will not erase any characters that you have stored in Radix s RAM memory Chapter 11 tells you how to create your own characters and it won t erase the macro if you have one stored in Radix s RAM this chapter will tell you how to create a macro Putting Radix to sleep You know how to put Radix off line with the On Line button Radix has another off line state that can be controlled from
96. wo commands work independently of each other so that ESC CHR 0 will not turn off proportional download characters and ESC X CHR 0 will not turn off normal width download characters If you have selected both normal and propor tional download characters proportional will print until you send the printer an ESC CHR 0 The printer will then continue to print with normal width download characters rather than returning to the standard character set until you send an ESC CHR 0 126 Radix User s Manual This can lead to confusion if you have accidentally specified both types of download characters Mississippi ROM char set normal spacing Mississippi RAM char set normal spacing Mississippi char set proportional spacing Figure 11 14 This printout shows the same text printed with the same download characters in both normal and proportional widths Table 11 2 Download character printing commands Function Contolcode Connecting characters MLA As we noted earlier it s possible to connect proportional width characters This can be useful for creating logos or other characters which are larger than one normal character It also makes it possible to create connecting scripts like handwriting The trick to this is to specify the width in the attribute byte to be exactly the same as the number of colum
97. your computer When you turn Radix off line from your computer Radix will ignore anything that you send it except for the code to go on line again CHR 19 is the code to turn Radix off line CHR 17 returns Radix to on line status Printing to the bottom of the sheet Sometimes when you are using sprocket paper you may want to print near the bottom of the last sheet The paper out detector usually stops Radix when you are about 3 inches from the bottom of the sheet This is to notify you if you are running out of continu ous paper Radix has the ability to print right to the bottom of the sheet You can disable the paper out detector so that it doesn t stop the printer This will allow you to print to the end of the sheet and even beyond if you are not careful The codes to control the paper out detector along with the other codes that we have just learned are in the following table Table 10 2 Some miscellaneous commands Master reset Paper out detector off Paper out detector on Move print head back one space Delete last character sent 100 Radix User s Manual Backspace and delete Backspace CHR 8 backs up the printhead so that you can print two characters right on top of each other Each time Radix receives a backspace it moves the printhead one character to the left instead of to the right You can strike over multiple letters by sending more than one backspace code Delete CHR 12

Download Pdf Manuals

image

Related Search

Related Contents

tm 11-6625-3014-14 operator`s,organizational, direct  

Copyright © All rights reserved.
Failed to retrieve file