Home

THE TOWERS OF HANOI

image

Contents

1. 44 2 to 80 213 Coodwood South Australia 5034 interested but aeed more iatormatioa
2. 00140 PROCESS LINE POINTERS AND LINE NUMBER 4047 00150 ORG 4047H UNLISED RESERVED 4047 200440 00160 VALID LD HL 40A4H 3 HL START BASIC 4044 D7 00170 NEXLIN RST 10H 3 HL A MSR LINE PTR 404R CA6600 00180 JP Z 66H RESET END 404E 23 00190 INC HL HL LSB LINE 404F 4E 00200 LD C HL 4050 23 00210 INC HL 3 HL MSB LINE NO 4051 46 0022 LD HL BC LINE NUMBER 4052 ED42A240 00250 LD 40A2H BC CASE OF ERROR MICRO 80 PRODUCTS DON T BE HELD BACK BY AN ANTIQUATED DISK OPERATING SYSTEM MOVE UP TO NEWDOS 80 149 incl p amp p NEWDOS 80 is a completely new DOS for the TRS 80 SYSTEM 80 It is well documented bug free and increases the power of your system many times over It is upward compatible with TRSDOS AND NEWDOS ie TRSDOS and NEWDOS programs will run on NEWDOS 80 but the reverse is not necessarily so These are just a few of the many new features offered by NEWDOS 80 New BASIC commands that support variable record lengths up to 4095 bytes long Mix or match disk drives Supports any track count from 18 to 96 Use 35 40 77 or 80 track 5 inch mini disk drives 8 inch disk drives OR ANY COM BINATION An optional security boot up for BASIC or machine code application programs User never sees DOS READY or READY and is unable to BREAK clear screen or issue any direct BASIC statements including LIST
3. 20 670 640 IF SE lt gt 2 THEN 660 650 TD P2 I2 X 52 G0TD 670 640 TD PZ CI X 84 670 P 2 SIZE TD 280 GOSUB 1240 690 I N DE 1 Y zZ CIX2 700 IF lt gt 1 THEN 720 710 1 0 20 750 PAGE 33 MICRO 80 ISSUE 24 NOVEMBER 1981 A n VE PROCEDURE i I EL CEDI 2 Y E ga Ul i e Va ry xc mi cz Aft sNEXT PR Y T X4 34 2 Y ITCH P Y H A At a T sRESET X D my x E za e m 4 z E x at Ri im Ue Se 0 2 z Cs Mb 0n an E 2p Wes dis E bel m vl ve Sf T EA a ae m v Bj va Bi py ma ey Qm 0 EO OIN 2 lt E gt ps e EC Ha 1 p E C z e i VE M m a ke ee D Ui 0 Ul D Cm Fu uJ cn C Won om 01 D Ul D GI GI UI Ui 3s J se e 11 M gl xc gi I gy Mn sz cc ll UI Iu Ug I be el f z Sx UE OS I n c c UI CI B ra dE D MIRA T D Ci be 4 m es ll vl Wo Mts eet Od 01 ui E opp exl dg ea Od Pa Za na 0 DD DI m D D Dd oem E be et be an i Ci BERE D D D D D D D DI Cio UY UI Z1 D Ul 5 2 Zor 2 pe Qi 2 2 Ul 10 0 D Ui Ui Ui Ql Se v gi Ql Ul Ui et
4. 1 1 INPUTX 1 ID 24 CHR 27 X2 5 Ig E INPUTX 2 I PRINTTAB 44 CHR 27 Y C 5 Ig INPUTX CZ I 60T890 140 CLS PRINT94723 COMPUTING 150 F RI 1TO6 FORJ 1TOZ A I J O R CL J O NEXTJ I 160 FORI 1TOND A 1 1 AC1 1 4 X 1 1 28 1 2 20 0 2 amp XX 2 I 811 3 26 1 3 X CE DD NEXTI A 2 1 20 1 1 NDz amp 2 2 8 1 2 NDZA C2 3 CA C1 2 ND 170 FORI 1TOND A 3 1 A 3 1 4 X 1 DED 2A 2 2 2A 42 2 c XO D E23 22 ACS 3 X 3 1 E22 sNEXTI 180 FORI 1TOND A 4 1 A 4 1 4 X 1 1 XX 25 199 A 4 2 A 4 2 4 X 2 DXX CE DD 0 4 2 A 4 2 X D XX 2 1 NEXTI 190 A 1 2A C 1 CACL 1 E2 ND 28 5 2 CZ 2 A C3 23 E2 ND x A S 3 A 3 5 A 1 3 E2 ND 200 A 4 1 A 4 1 A 1 1 AC1 2 ND z A 4 2 A 4 2 AC1 2 ACL 32 ND z A 4 3 2A 4 2 CCA CL 1 C1 220 ND 210 R 1 1 A 6 1 E22 ACS 3 XA 5 DO sRC GL 2 SBRIR CE 120 4 1 lt OTHENR 1 2 R 1 2 220 R 2 1 4 6 2 22 A 5 3 XA 5 2 R 2 2 SOR R 2 1 IFA 6 2 lt OTHENR 2 2 R 2 2 ZO R Z 1 A 6 2 E22 ACS 1 A 5 2 RCS 2 BORIR C 122 z IFA 4 2 ZOTHENR 3 22 R 3 2 240 R64 13 601 20 CCRC2 2 ERS 20 E2 R G 1 2R GI 127 CCI R 2 SDO EUR DO IFR 4 1 ZOTHENR 4 2 OELSER 4 2 SOR R 4 12 250 R G 1Y QR 2 1 1 R 2 2 R S 2 2 R S D RG 1
5. 15 ELSE IF LEN L lt 64 THEN PRINT L CHR 12 ELSE IF LEN L 64 THEN L LEFTS L 64 PRINT L ELSE IF LEN L gt 64 THEN L LEFT L 6z PRINT 1 43 1440 IF LEN L 0 THEN ELSE A N L 1450 L SP 0 X 0 JZ 0 AS 2W 0 1460 RETURN 1470 PRINT ERROR ERR 2 1 ERROR LINE ERL 1480 FOR TX 1 TO 1000 NEXTTZ RESUME 1700 1490 REM LINE COUNTER 1500 IS STR ONZ CLZ LEN I 1510 IF CL 2 THEN H 48 L ASC RIGHTS 12 1520 IF CL 5 THEN H ASC MIDS I 2 1 LZ ASC RIGHTS 1 1 1530 POKE 15412 91 PO0KE 15414 22 POKE 15415 76 POKE 15416 73 E 15417 78 POKE 15418 69 P KE 15419 32 POKE 15420 H POKE 15421 L POKE 15422 32 POKE 15425 91 1540 RETURN 1550 REM INDENTING 1560 IF TBX 0 THEN RETURN 1570 IF TB gt 64 THEN TBZ 64 1580 TBZ TBZ 1 PRINTSTRING TBZ 22 CHR 95 s CHR 24 1590 L STRINGS TBZ 128 4L 1600 TBY TB 1 RETURN 1610 REM PRINT INDENT POSITION 1620 PRINTCHR 26 16 0 IF TBZ O GOTO 1650 1640 PRINTSTRING TBZ 1 95 CHR 91 1650 PRINTSTRING 62 TB7 95 STRINGS 2 128 PRINTCHRS 27 CHRS 27 3 CHR 29 CHR ZO RETURN 1660 REM BACK SPACING 1670 IF LEN L O0 THEN RETURN ELSE IF RIGHT l 1 THEN SP SP 1 1680 PRINTCHR 8 CHR 20 IF LEN L lt 63 THEN PRINT CHR 95 24 L LEFT L C1 UZ PEEK 16416 164 17 IFQ Z 60THEN OEL SE I FQ 641 THEN 256EL SEIFQZ 62TH
6. 430 OUT 9 X ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 5 440 X INP 8 450 IF X Y THEN 410 ELSE Y X 460 IF X gt 191 THEN X SPACE COMPRESSION CODE ELSE IF X gt 127 THEN X GRAPHIC COD E CHR X ELSE IF X gt 31 THEN X CHARACTER CHR X ELSE X CONTROL CODE 470 CLS PRINTCHR 23 480 PRINT30 X 490 GOTO 410 We now move on to the parallel I O ports At RUN 399 we first program the PPI at address location 8 11 by writing the control word decimal 152 to port 11 the control register location Port 8 is then read to input the value of the switches connected to it The decimal value and the HEX value is displayed on the screen and then written to port 9 to switch on the LED display being controlled by that port The next program starting at 499 scans the keyboard and outputs the ASCII value to the LED s at port 9 It then reads the switches at the input to port 8 and prints on the screen the computer code that the switches represent Rod Stevenson has written a machine language program which also allows you to draw pictures on the screen under joystick control It is more elegant than mine as my speciality is in hardware and Rod has demonstrated his software ability with his series BETTER BASIC PROGRAMMING Rod s program is also included in the program listings in two versions One is an EDTASM source listing the other is poked in from a BASIC program 00100 00110 WRITTEN 29 9 81 BY ROD STEVENSON TO USE JOYSTICK KIT 0012
7. 480 410 IF AZ 27 THEN 1700 gt 420 IF AZ Z22 THEN SP SP 1 GOTO 550 420 IF AX 10 THEN 128 GOTO 550 440 IF A Z 91 THEN GOSUR 1220 GOTO 510 450 IF AZ 8 THEN GOSUR 1660 GOTO 560 ISSUE 24 NOVEMBER 1981 MICRO 80 460 IF AZ 9 THEN GOSUB 1550 GOTO 560 470 IF AZ 12 THEN 510 480 IF 0Z 60 THEN 04 0 ELSE IF 0Z 61 THEN 256 ELSE IF 04 62 T HEN 0 512 ELSE IF Q4 63 THEN 04 768 490 POKE 152690 0 4U 64 182 UZ 0 07 O 500 GOTO 550 510 60508 1240 S20 NZX NZ 1 L GOSUB 1610 GOSUR 1490 S30 IFNZ gt 90THENCLS PRINT END OF TEXT INPUT 90 LINES HAVE BEEN ENTERED FORTZ 1TO1000 NEXTTZ GOTO1700 540 IF XXZ 2 AND AX 13 THEN GOTO 2970 ELSE IF XX 1 AND AX 13 THEN GOTO 2650 ELSE IF XX 1 AND A 91 THEN GOTO 2650 550 IF LEN L lt 61 THEN PRINT 95 3CHRS 24 560 IF LEN L 462 GOTO 240 570 L L A 580 GOTO 260 590 REM WORD CHANGE 600 J 1 AZ 0 610 N CH GOSURB 1490 620 FOR L 1 LEN AS CH gt 620 J MID A GHY L 1 640 IF J 5 THEN 10 18 K 0 650 IF J THEN KZ K 4 1 660 IF K gt 1 THEN GOTO 680 870 IF K 1 THEN PRINT J JXZ J741 680 NEXT L7 890 PRINTCHR 29 CHR 700 FOR L 1 TO J7 710 IF T LZ 1 THEN PRINT 17 ELSE PRINTTS L 33 3 720 NEXT L PRINT 720 O X J7 740 7 7 THEN GOTO 740 750 AY ASC 7 760 IF DD 0 4 1 AND T Q 4
8. 520 FORN 1T0312 READD N IFD N X THENZZOELSENEXT RESTORE GOTO z10 RESTORE N N 23 N INT N IFJ lt 2N N 1 240 FORNN 1TON 2 1 READDS NN NEXT CLS PRINT397 ATOMIC NO N ELEMENT i READD 4NN PRINTD NN SYMBOL i NN NN iz READD NN NN s 72 OF PROTONS ELECTRONS ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 24 350 PRINT3670 N P GO0SUBZ90 PRINT32Z20 GROUP PRINT2284 GN PRINT9604 K K 3 PRINT3540 L L E PRINT3476 M M P PRINT2412 N P PRINT3248 O O s 2 4 R PRINT39220 Q0 RESTORE Z60 PRINT2979 HIT ANY KEY TO CONTINUE K 0 L 0 M 0 R O P 0 0 0 570 IFINKEY THENZ7OELSEZO 580 DATAS41 544 590 GN TRANSITIONAL ELEMENTS IFN ZORN 110RN 190RN Z70RN 550RN 878N I ELSEIFN A4O0RN 120RN 200RN Z80RN S60RN 888N II ELSEIFN SORN 1ZO0RN Z10RN 490RN 81GN III ELSEIFN G60RN 140RN Z20RN SODRN 828N IV ELSEIFN 7O0RN 150RN ZZORN 510RN 82Z6N V 400 IFN B8O0RN 160RN Z40RN 520RN 84G8N VI ELSEIFN 9ORN 170RN Z50 N 5XO0RN 858N VII ELSEIFN 20RN 100RN 180RN Z60RN 540RN 540RN Bid N VIII OR NOBLE GASES ELSEIFN 1GN HYDROGEN K 0 0 Q O 410 IFN gt 90GN ACTINIDE SERIES ELSEIFN gt S8ANDN lt 71GN LANTHANI DE SERIES 420 IFN gt 2K 2 N N 2ELSEK N GOTO480 450 IFN gt 8L 8 N N SELSEL N G TO480 440 IFN gt 18M 18 N N 18ELSEM N G
9. NEXTD G PRINT PRINTNAS WON WITH SC 6 POINTS CONGRATULATIONS LINE AND DELETE LINE 1070 1F DELETE ALL DF THIS LINE UP FO 8 14 20 Cat BASIC LINE REFERENCE VALIDATOR Level 2 4K 16K by Shillito This little program snuggles itself into a part of memory that the BASIC interpreter never uses Thus even if the memory is full this program can still be loaded and run You can create it using BMON or with an assembler PROGRAM FUNCTION The purpose of this program is to detect all instances of reference to non existent lines in BASIC programs including direct commands except the LIST command which does not generate an error for non existent lines LOADING AND RUNNING THE PROGRAM Type SYSTEM then NONAME then press BREAK The program is now available whenever required To run it press SYSTEM followed by 16455 The program will give FC ERROR followed by the number of the first line it encounters containing a reference to a non existent line number e g GOTO 300 where 300 doesn t exist After correcting the error run it again to see if there are further errors It is advisable to run this program before using a RENUMBER utility such as BMON WARNING This program may give spurious error messages if you have somehow POKEd graphics characters into strings or remarks This is not normally possible unless you used a special utility such as S KEY to do it
10. 2750 2760 2770 2780 2790 2800 2810 2820 2850 2840 2850 2860 2870 2880 2890 2900 2910 2920 2950 2940 2950 2960 2970 2980 2990 3000 3010 3020 3030 3040 2050 5060 5070 3080 RETURN REM CHANGE DATA LS sFFAZ NZ 1 sFS STRS NZ 1 CLS Z PRINTCHRS 29 s CXO ENTER LINE TO BE CHANGED 5 INPUT C IF NZ 0 THEN GOTO 1700 PRINT IF CHZ 1 gt 7 THEN GOTO 2540 PRINT PRINT ENTER L LINE CHANGE PRINT ENTER W FOR WORD CHANGE PRINT ENTER TO ABORT PRINT M INKEY IF M GOTO 2590 GZ ASC M IF GZ 87 THEN WDZ 1 ELSE IF GZ 76 THEN WDZ O ELSE GOTO 1700 PRINTAS CHZ PRINT XXZ 1 7 IF WDZ 1 THEN GOTO 590 NZ CHZ GOSUB 1610 GOSUB 1490 GOTO 260 PRINT PRINT FOR ANOTHER CHANGE ELSE Z1 INKEYS IF 71 THEN GOTO 2660 ZZ ASC 71 IF 77 15 THEN XXZ O NZ FFZ4 1 GO0TO 1700 IF 77 67 THEN NZ FFZ GOTO 2520 IF Z lt gt 12 ZZ4 567 THEN GOTO 2650 REM REVIEW DATA CLS 20 REVIEW DATA PRINT PRINT ENTER TO ABORT ELSE ENTER 7 Z THEN GOTO 2740 ZZ ASC Z SIF 77 lt gt 1 THEN GOTO 1700 FOR 07 1 TO 2 PRINTAS 07 NZ 07 GOSUB 1490 7 Z THEN GOTO 2790 ZZ ASC Z IF Z lt gt 13 THEN GOTO 1700 NEXT 07 1700 INSERT LINES 5 7 25 INSERT LINE PRINT CLS PRINT ENTER STARTING NUMBER OF
11. 4 DISCS 15 MOVES UP TO 1960 PRINT THE MAXIMUM OF 10 DISCS WHICH REQUUIRES 1023 MOVES PRINT 1970 PRINT HAVE FUN 1980 GOSUR 2000 1990 RETURN 2000 PRINT3960 PRESS lt NEWLINE gt WHEN READY 2010 INPUT D CLS 2020 RETURN ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 35 NEXT MONTH S ISSUE Next month s issue will contain at least the following programs plus the usual features and articles There will also be an index for the past 12 issues TRIANGLE SOLUTIONS LI 4K This Level I program has been designed to calculate unknown sides angles the area of any triangle useful for anyone who needs to calculate areas for concrete pours for example STEEPLECHASE LII 16K have had horse races before but never one like this make your horse jump at the right time or off you come Realistic graphics include the course jumps you the jockey a well animated horse and even an ambulance to take you to hospital BASIC AND LABELS 32K DISK When you are writing a complicated program wouldn t it make life easier if you could type GOSUB FRED and further on in the program is subroutine called FRED or for that matter any name that suits you Well after next month that s just what you will be able to do Date 2 dl etter eines E E i amp E o t a z Q 5 x i 9 as 2 mu R
12. 740 1090 IF lt 65 THEN 1120 1100 IF AZ lt 91 THEN AXZ AZ 22 G60TO 1120 1110 IF lt 128 THEN AX AZ 32 1120 7 CHR OAX PRINT Z TT TT 47 GO0TO 910 1120 FOR IZ DD Z TO 97 PAGE 27 ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 28 1140 T IX T I 1 1150 NEXT IZ 04 0X 1 DDZ DDX 1 1 1160 FOR IZ 1 TO DDZ 1170 L L T OIY 4 1180 NEXT IZ 1190 PRINTCHR 29 CHR 50 L GOTO 740 1200 PRINTCHR 29 20 s L 1210 FOR IX 1 TO Q L L T 1 4 NEXT 1 DD O 1 G0TO 760 1220 REM CENTERING TEXT 1230 Q LEN L U 62 0 2 L STRINGS U 128 L RETURN 1240 REM JUSTIFY TEXT 1250 J 0 W 0 IF LEN L lt S5 OR LEN L 64 OR OX 1 THEN GOTO 1420 ELSE PRINT CHR 29 CHR ZO FOR I 1 TO LEN L 1260 A MID L 1 1 1270 IF AS lt gt THEN T GOI T G 6 1280 IF THEN JZ JZ 1 1290 NEXT IZ 14 0 JZ 0 48 1500 X 64 SP LEN L SPZ XS INT X z WZ 644SP CCOCOKSP2 LEN CL 22 1510 FOR JZ O TO SPX 1 1520 T J 5 X 52 1230 NEXT J 1240 L 1250 FOR J 0 TO SP 1560 IF SPZ 0 AND WZ 0 THEN 2 CHRS 128 1370 L L T J7 1580 SP SP 1 1390 W W 1 1400 NEXT J PRINT 1410 FOR JZ O TO 20 T J NEXTJI 8 1420 L LEFTS L 64 PRINTCHRS 29 CHR 30 27 5L 5 GOTO14 40 1450 PRINT CHR 29 CHR Z0 5 IF LEN L 0 THEN 128
13. R 1 DOSG RG D202 IFR 5 1 lt OTHENR 5 2 OELSER 5 2 SBR R 5 10 260 RS R G2 1 HRCL 12 2801 2 XRC2 2 XR CZ 200 5 RS RS 1 R 2 1 IFRS821THENRS 1 RH 1EL SERM SBR R9 270 6 3 XA C 1 CA C5 1 A 6 20 5 c C AG 3 E2 ACS 2 amp 5 100 280 B 4 6 1 GXA C6 3 8EB B A G 1 290 D 4 2 2 BXA 2 10 C amp A 2 2 300 CLS PRINT THE EQUATION FOR THE REGRESSION LINE IS PRINTs PRINT YHAT 510 IFDZOPRINT ABS D ELSEPRINTD 520 IFB4OPRINT ABS B X1 3 ELSEPRINT Bg Xi 550 IFCZOPRINT sABS C s X2 ELSEPRINT iC X2 240 PRINT PRINT PRINT MEAN X1 sA 2 4 3 PRINT MEAN X2 3A 2 2 PRINT MEAN Y 3A 2 3 Z50 PRINT PRINT COEFFICIENT OF MULTIPLE CORRELATION sRM Z60 RI R 1 1 100 R2 R 2 1 100 R8 RSX 100 PRINT PRINT VARIATION IN Y DUE TO Ri Z z PRINTTAB 24 X2 iR2 X PRINTTAB 19 X1 amp X2 RS 4 570 978 PRINT RESIDUAL TABLE Y N IS INKEYS IFIS THENZBOELSEIFIS Y THENZ9CEDSEIFIS N THEN470ELSEZ80 590 CLS J 0 400 FORI 1TOND YH D BXX 1 ID KCCXX 2 I RE YH X CZ I 410 IFJ OGOSUBS10 420 PRINTUSING iHE Iz PRINTTAB S PRINTUSINGP 1 1 5X 2 D 5 X G I YHs RE 450 J J 1 IFJ 9THENA4OE 450 440 977 ENTER TO CONTINUE INPUTIS J O CLS 450 NEXTI 460 RS RS 100 SD 1 9 5 X sPRINT PRINT SUM OF SQUARES OF DEVIATION FROM REGRESSI
14. REM DETERMINE OPTIMUM SUBSET LENGTH 860 DIMA SL REM A IS THE SORT AREA DESCRIBED ABOVE 880 AD i INPUT ASCENDING OR DESC A D 5 IFADS A GOTO920 900 IFADS lt gt D PRINT HUH GOTO880 920 PRINT SO0RTING FC 1 940 REM EXTRACT SUBSET FROM INPUT ARRAY 960 FORT 1TOSL A T I FC 1 980 IFFC NTHENT T 1 GOTO1020 1000 NEXT 1020 GOSUB1740 T N3 2 1040 xx MERGE ROUTINE 1060 ARE ELEM COUNTERS A B C 1080 CA 1 CR 1 CC 1 1100 IFAD D GOTO1480 1120 IFBi1 1GOTO1320 1140 TEST FOR EOF FOR EITHER ARRAY 1160 IFCB S1FORL CATOT 1 C CC 2A L z CC CC 1 NEXT GOTO1240 1180 IFCA TFORL CBTOS1 C CC ZB L 1 NEXT GOTO1240 1200 IFA lt A CA CA 1ELSEC CC R CR CR 1 1220 CC CC 1 GOTO1160 1240 Bi1 1 81 CC 1 GOTO1 80 MERGE COMPLETE CHANGE MERGE ARRAY SET EOF 1260 ARRAY C IS MERGE ARRAY 1280 IFCC S1FORL CATOT 1 BR GCBR A L 1 NEXT GOTO1360 1500 IFCA TFORL CCTOS1 B CR C L CR CR 1 NEXT GOTO1260 1320 IFA CA lt CC A CA CA CA 1 ELSER C CC sCC CC 1 1340 CB CB 1 GOTO1280 1360 B1 0 S1 CB 1 1380 M M 1 IFFC lt NGOTO960 1400 REM PRINT SORTED DATA 1420 FORT 1TOS1 IFR1 OPRINTBR T sELSEPRINTC T 5 1440 NEXT PRINT PRINT SUBSET LENTH 5SL 2PRINT NO OF MERGES 1460 DESCENDING SEO 1480 IFB1 1G0TO1640 1500 IFCB gt S1FORL CATOT 1 C CC
15. 55 CAESIUM CS 56 BARIUM BA 57 LA NTHANUM LA 58 CERIUM CE 59 PRASEOQDYMIUM PR 60 NEODYMIUM ND 51 METHIUM PM 62 SAMARIUM SM 63 EUROP IUM EU 64 GADOLINIUM GD 65 TERB IUM TB 66 DYSPROSIUM DY 67 HOLMIUM HO 650 DATA68 ERBIUM ER 69 THULIUM 70 YTTERBIUM YB 71 LUTETIUM L U 72 HAFNIUM HF 72 TANTALUM TA 74 TUNGSTEN W 75 RHENIUM 75 08M IUM OS 77 IRIDIUM IR 78 PLATINUM PT 79 GOLD AU 80 MERCURY HG 81 T HALLIUM TL 82 LEAD PR 83 BISMUTH 660 DATAS4 POLONIUM PO 85 ASTAT INE AT 84 RADON RN 87 FRANCIUM FR 88 RADIUM RA 89 ACTINIUM AC 90 THORIUM TH 91 PROTOACTINIUM 92 URANIUM U 92 NEPTUNIUM NP 94 PLUTONIUM PU 95 AMERICIUM AM 96 CUR IUM CM 97 BERKELIUM 98 CAL IFORNIUM CF 670 DATA99 EINSTEINIUM ES 100 FERNIUM FM 101 MENDELEVIUM MV 102 NOBEL IUM 102 LAWRENCIUM LW PDS ES LE Tai nM as a TYPER 12 16 Leonard FEATURES Standard keyboard gives lower case with visual indication of shifted upper case Line justification or non justification with non justifying space provision Indentation setting readily changeable Line change line delete Word change word delete Lines insert word insert ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 25 Centering of text Review text Line counter Record to tape Load from tape Packed data dis
16. 80 is one of the best supported microcomputers in the world MICRO 80 has been supporting the TRS 80 in Australia for 18 months and is one of Australia s leading dealers in MPI disk drives 2 8 MEGABYTES FOR 5300 inci Saies Tax If you need even more file space you can add MICRO 80 s external dual drive cabinet enclosing two more dual head 80 track drives for an additional 51500 COMPUTER PRICES MODEL 340 240 TRACK SINGLE HEAD DRIVES GIVING 350K FORMATTED STORAGE 48K RAM MODEL 340 240 TRACK DUAL HEAD DRIVES GIVING 700K FORMATTED STORAGE 48K RAM MODEL 380 280 TRACK SINGLE HEAD DRIVES GIVING 700K FORMATTED STORAGE 48K RAM MODEL 380 280 TRACK DUAL HEAD DRIVES GIVING 1 4 MEGABYTE FORMATTED STORAGE 48K RAM 350K SYSTEM MODEL 340 EPSON MX 80 PRINTER NEWDOS 80 DISK OPERATING SYSTEM 700K SYSTEM 40 Track MODEL 340 EPSON MX 80 PRINTER NEWDOS 80 DISK OPERATING SYSTEM 700K SYSTEM 80 Track MODEL 380 EPSON MX 80 PRINTER NEWDOS 80 DISK OPERATING SYSTEM 1 4 MEGABYTE SYSTEM MODEL 380 EPSON MX 80 PRINTER NEWDOS 80 OPERATING SYSTEM 2 8 MEGABYTE SYSTEM MODEL 380 DUAL EXTERNAL DRIVES MX 80 PRINTER NEWDOS 80 OPERATING SYSTEM EXATRON STRINGY FLOPPY 372 50 inci P amp P 5 2990 INCL SALES TAX 3350 INCL SALES TAX 3350 INCL SALES TAX 3800 INCL SALES TAX 54070 INCL SALES TAX 54429 INCL SALES TAX 54429 INCL SALES TAX 54880 INCL SALES TAX 5 6 380 INCL SALES TAX
17. All Exatron Stringy Floppies sold by MICRO 80 include the special chained version of HOUSEHOLD ACCOUNTS developed by Charlie Bartlett When used on the ESF this pro gram is powerful enough to perform many of the accounting functions in a small business Remember the ESF comes complete with a comprehensive manual a 2 way bus extender cable its own power supply and 10 wafers of mixed length One wafer contains the Data Input Output program and another the HOUSEHOLD ACCOUNTS program CAN T MAKE UP YOUR MIND ABOUT THE ESF Then send in 5 00 for a copy of the manual We will refund your 5 00 IN FULL when you purchase an ESF All prices subject to change without notice Prices are F O B Adelaide All computers and systems carry MICRO 80 s 9 O day Warranty covering parts and labour NEW SOFTWARE FROM MICRO 80 PRODUCTS BUSINESS PROGRAMS MICROMANAGEMENT STOCK RECORDING SYSTEM L2 16K Cassette 29 95 1 00 p amp p Stringy Floppy version 33 95 1 00 p amp p This system has been in use for 9 months in a number of small retail businesses in Adelaide It is therefore thoroughly debugged and has been tailor made to suit the requirements of a small business MICROMANAGE MENT SRC enables you to monitor the current stock level and reorder levels of 500 different stock items per tape or wafer It includes the following features Add new items to inventory Delete discontinued ite
18. B SK SP 2 SK B 2 SK SP 1 SK B 1 SK SP SK B 250 IF CT lt gt i THEN GOTO 260 240 SP SP 2 SK GP 1 1 SK SP 2 GOSUR 590 250 GOTO270 260 GOSUR 820 270 PRINT2832 s 60TOS510 280 CLS GOSUR 11420 5 0 290 GOSUR 540 PRINT 38 2 ss 510 PRINT28 2 FROM PEG sz INPUT F 320 PRINT23860 TO PEG s INPUT T IF F4i OR lt 1 OR F X OR gt 2 PRINT NO SUCH PEG GOTO 300 540 IF F T PRINT NOT ALLOWED GOTO 500 350 IF N F lt OPRINT THERE ARE NO DISCS ON PEG 3 F GOTO 00 560 I N F J N T 570 ON F GOTO 380 410 420 380 T1i P1 1 590 IF T 2 THEN T2 P2 J ELSE T2 P3 J GOTO 440 410 Ti1 P2 I IF T THEN T2 P1 J sELSE T2 PZ J 420 GOTO 440 420 TI1 PZ CID IF T 2 THEN T2 P2 3 sELSE T2 P1 J 440 IF 1 gt 2 PRINT NOT ALLOWED GOTOZ00 450 SP SP 2 SK SP 1 F sSK SP T 460 GOSUR 590 470 IF Nt1 O AND N 2 0 AND N S3 CT THEN GOTO 480 480 M 2tCT 1 PRINT38z22 PPRINT28Z2 490 IF NM M THENPRINT CONGRATULATIONS YOU ELSE IF NM M 15 THENPRINT NOT BAD AT ALL 500 PRINT YOU TRANSFERRED ALL THE DISCS IN 810 PRINT CARE FOR ANOTHER GAME YES OR ELSE GOTO 200 ae Nis MOVES am we S20 INPUT ANS 220 IF ANS N ORF ANS NO THEN CLS END ELSE GOTOSO 540 J CT S50 FOR I 1 TQ CT S60 PI CI J J J 1 NEXT I 370 RETURN 590 NM NM i SE SE IGP 1 DE SE SP 600 FOR T 1 TO ZXOXG NEXT I 610 T N SE s 22 1 2 620 IF lt gt 71 THEN 640 620
19. GOGSUB280 P OKEXX 128 IFXX AATHENC i XX X 960 NEXTXX IFC 1THEN740 510 POKEX 950 128 520 RETURN 550 FORN 19TOSOSTEP4 1 FORO 15260 4 NTOi 6220 NSTEPG4 POKEO 149 NEXT 540 XN 277 FDO0RNN 600TDOSTEP 100 PRINT XN NN 1 1 13 OELSEXN XN 128 250 NEXT RETURN 560 CLS FORL 1TO7 PRINTCHRS 23 PRINT A AC sPRINT NE XTL 570 F RL 1TO050 A USR L 256 FORLL 17T025 NEXTLL L 280 CLS PRINT YOU ARE ON THE SPACESHIP THE GALACTIC RUN 590 PRINT WHILE PASSING THE GALAXY 74RV2 YOU COME UNDER ATTACK 400 PRINT BY FLEET OF ALIENS 410 PRINT YOUR JOB IS TO SHOOT DOWN THESE ALIENS AND SCORE POINT 5 420 PRINT PRINT YOUR SHIP IS THE BOTTOM OF THE SCREEN AND ONL Y THE 420 PRINT GUN IS SHOWN THE ALIENS FIRE FROM THE TOP DF THE 440 PRINT SCREEN DOWN ANY OF THE 8 COLUMNS COVERED BY YOUR SPACE SHIP 450 PRINT YOQU HAVE TO INTERCEPT THE MISSILE AND BLOW IT UP BEFOR 460 PRINT IT REACHES YOUR SPACESHIP AND DESTROYS IT 470 505086550 480 CLS PRINT TO MOVE YOUR GUN PRESS THE lt 1 gt KEY TO MOVE LEFT p 490 PRINT THE 2 KEY TO MOVE RIGHT TO FIRE PRESS THE SPACE BA R 500 PRINT THE AMOUNT OF POINTS YOU GET DEPENDS ON HOW FAR UP 510 PRINT THE SCREEN YOU HIT THE MISSILE 520 PRINT THE NUMBERS TO THE LEFT 520 PRINT TELL YOU HOW MUCH YOU GET 540 PRINT IF YOU GET HIT THAT IS THE END OF YOUR GAME 550 PRINT AS THE GAME PROGRESSES THE ALIENS FIRE AT YOU MORE AGR ESSIVE
20. HL 4072 D24A1E 00420 JP NC 1E4AH FC ERROR ROUTINE 4075 AF 00420 XOR A 4076 00440 CP HL 315 DELIMITER EOL 4077 20EE 00450 JR NZ FOUND FURTHER REFS 4079 23 00460 NEXT INC HL EOL 407A 18CE 00470 JR NEXLIN s SEARCH NEXT LINE 00480 DATA COMPRESSION TOKENS 407C 918D 00490 TOKENS DEFW 8D91H GOSUR 407E 95 00500 DEFW OCA9 S5H 3 THEN ELSE 4080 SE9F 00510 DEFW 9F8bEH RESUME RUN 4082 R6 00520 DEFR OR6H DELETE 4047 00520 END VALID 00540 THE ABOVE ROUTINE IS RELOCATABLE WITHOUT RE ASSEMBLY 00550 IT MUST NOT USED WITH PROGRAMS THAT CONTAIN 00560 GRAPHICS BYTES IN STRING CONSTANTS OR REMARKS 00570 IT OCCUPIES 59 BYTES MULTIPLE REGRESSION ANALYSIS L2 16K by Jones Multiple regression analysis is used to test the relationship between a dependent variable Y and a number of independent variables X1 X2 X3 XN This routine allows multiple regression analysis between the independent variable Y and two dependent variables Xl and X2 in accordance with the model Y A BX CX2 The routine calculates the coefficients for the multiple regression equation the mean values of Xl X2 and Y the coefficient of multiple regression an indication of closeness of fit where 1 is perfect and the percentage variation in Y due to Xl X2 and and X2 jointly In addition a residual table can be printed on command and estimations of Y co
21. IFL 1T 561 IFL 2T 563 IFL 27T 565 IFL 4T 567 IFL ST 569 IFL 6T 571 IFL 7T 573 IFL 8T 575 IFL 9T 577 RET IFAZOT S550 RET IFBSOT 550 RET IFC2OT S550 RET IFD OT S550 RET IFE gt OT 550 RET SOT S50 RET IFGSOT 550 RET gt 550 gt 550 TEST FOR POSITION OF X TO BLOCE x IF 1 1 1 1 1 1 591 IF D 1 1 0 4 1 X CF 12 1 595 IF G 1 X CH 13 94 CCG 1 X CI Z10 c CCH 21 X CI 2122 T 599 IFtCAa z1 x CD 1 9C O 1 X tG 21 c D 1 X 8 212 T 602 IFCCB Z1 X E 1 C GEZHID X 1 c 8 1 X HZ21 9 T 607 TF C 1 X CE 12 c CCF I1 E CI Z1 c CCC C1D X CIZ13 T 611 TF A51 E 1 4 fE 1 kCT 1 4 0 CA 1 X CI Z12 0 T 615 TF C 1 X CEZ212 1 X G 1 c CCC 1 X 6212 T 619 Q 0 G 282 IF A70 XCE2O0 X C20 T 582 IFA OT L 1 6 284 IFR OT L 2 6 285 L 3 6 286 IF E20 X F200 T 5832 IFD OT L 4 6 287 IFE OT L 5 6 288 L 6 G6 289 IF G2O XCH20 X CI20 T 584 IFG OT L 7 6 290 IFH OT L 8 6 291 L 9 6 292 TF CASO DEO G0 T 585 IFA OT L 1 6 284 IFD 0T L 4 G 287 L 7 6 290 IF 850 T 586 IFB 0T L 2 6 285 IFE OT L S5 6 288 L 8 6 291 TF C20 X F gt 0 X CI2O0 T 587 TFC 0T L 2 6 286 IFF 0T L 6 6 289 L 9 G6 292 IF A0 X E30 X CI 20 T 588 IFA OT L 1 6 284 IFE OT L 5 6 2
22. INSERT s z INPUT EZ PRINTA EZ 1 PRINT INSERT PRINTA E7 PRINT PRINT INSERT LINE ELSE A TO ABORT s INPUT 7 IF Z lt gt THEN GOTO 1700 IF EZ 1 OR EX gt NZ THEN GOTO 2840 RZ 0 FOR IZ E TO NZ RZ RZ 1 R ORZ A CIZ 0 0IZ NEXT IZ L iXX 2 PRINT PRINT ENTER LINE TO BE ADDED NZ E GOSUB 1610 GOSUB 1490 GOTO 360 FOR IX EZ 1 TO RX EX KX KX 1 17 BS KZ s BS KZ NEXT 17 NX RX E7 RZ 0 K 0 XXZ 0 GOTO 1700 REM DELETE LINE CLS Z 3 0 XA4 O PRINTTAB 25 5 DELETE LINE sPRINT PRINT ENTER LINE NUMBER TO BE DELETED 53 INPUT YZ Z PRINT DELETE LINE ELSE A TO ABORT Z IF Z lt gt THEN GOTO 1700 IF NX O THEN GOTO 1700 IF Y 1 OR gt THEN GOTO 3030 ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 31 5090 FOR I 1 TO NZ 1 5100 IF THEN 1 5110 IF XX 1 THEN A OI4Z A IZ 1 5120 NEXT I NZ N 1 GOTO 1700 5150 END THE TOWERS OF HANOI by M Byrne KARAN The Towers of Hanoi is played with a number of discs of differing sizes and three pegs on which the discs may be stacked Initially the discs are arranged on one peg in order of decreasing size The object is to transfer them in the least number of moves to another of the pegs so they are once again arranged in order of decreasing size However you may only move one disc at a time and it must not
23. TECHNICAL COMMENTS This program occupies only 59 bytes and resides from 16455 to 16504 an area of memory that is never used by BASIC Hence it can be used even if memory is completely full The program will not detect references unaccompanied by key words Also it will detect certain types of syntax errors It does not detect a reference in the form DELETE 32 which is unlikely to occur anyway Apart from these exceptions it should pick up all references including some which BMON s RENUMBER misses ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 16 RELOCATION The program can be relocated No re assembly is needed HEX CODE 4047 404E 2A 4 40 D7 66 25 404F 4056 4E 25 46 ED 43 A2 40 D7 START ADDRESS 4047 4057 405E FE 00 28 1E 21 7C 40 NAME NONAME 4O05F 4066 01 07 ED ER 20 EF 4067 406E 07 50 ED CD 5A 1E ES CD 406F 4076 2 1B Ei D 4A 1E AF BE 4077 407E 20 EE 23 18 CE 91 8D 95 407F 4082 SE 9F B6 METHOD OF OPERATION The program uses an area of RAM starting at 4 47H and ending with the USR pointers that is never used by BASIC It makes the following assumptions about BASIC syntax 1 Basic line references only occur after the tokens in hex 80 91 CA 95 8E or B6 the LIST tokens B4 and B5 cannot have invalid line references so they are not included in the program possibly with interspersed blanks 2 Mhere a line reference occurs followed by a non zero byte that is an ASCII di
24. an initial fee of 100 to become an AUSTRALIAN SOURCE subscriber but founder subscriptions taken out prior to Ist February 1982 can be had for only 60 Thereafter users pay 10 per hour in peak time 8 a m 6 p m and 4 50 per hour in off peak time 6 p m 8 a m MICRO 80 is very excited about the possibilities which this new venture opens to microcomputer owners We will support the AUSTRALIAN SOURCE will articles explaining how to adapt your equipment to communicate with the SOURCE and membership of the SOURCE is available from our mail order department In fact we have reserved a number of charter memberships for our readers and we have also taken the unusual step for us of accepting an advertisement in our columns for the AUSTRALIAN SOURCE which gives you further information about this service see back cover As we said above we will discuss the equipment requirements in more detail in a future issue The minimum requirement however will be a duplex serial port able to operate at 300 baud and an acoustic coupler At present an 80 user would require an expansion interface to meet the requirement for a serial port We are looking at a cheaper alternative for those without expansion interfaces more news in later issues 0000000000 JOYSTICKS AND INPUT OUTPUT PORTS FOR YOUR 80 by Alan Dent PART 4 SOFTWARE DRIVERS In this concluding part we will look at several driver programs to enable you to use both the joys
25. be placed on a smaller disc This program allows you to select the number of discs up to a maximum of 10 and whether you or the computer will solve the problem The main variables used are N 3 holds the number of discs on each peg P1 P2 P3 peg arrays Each element holds the size of the disc at that position SK the parameter stack SC the source peg DN the destination peg AL the alternate peg NM the move counter SP the stack pointer B the base pointer for the stack elements of the previously invoked procedure CT the number of discs S the amount of delay for automatic operation F the peg the disc is moved from T the peg the disc is moved to Tl 2 used to test whether the move is legal M is the minimum number of moves TD the top disk of the peg we are moving from Probably the feature which will cause most confusion is the use of recursion It appears to be a not too well known fact that BASIC will allow recursion on most machines anyway Recursion is a means whereby a procedure or subroutine may call itself This involves the use of a stack which BASIC provides for storing the return address and another stack which must be set up explicitly if parameters are to be passed to the called procedure The parameter stack is only really used when automatic operation is required as manual operation merely involves asking for moves and checking their validity The program is organised as follow
26. drives are entirely compa tible with 35 track drives A 40 track DOS such as NEWDOS 80 is necessary to utilise the extra 5 tracks OVER 800 KILOBYTES ON ONE DISKETTE WITH MPI 80 TRACK DRIVES MPI 80 track drives are now available The B91 80 track single head drive stores 204 Kilobytes of for matted data on one side of a 574 inch diskette in single density mode In double density mode it stores 408 Kilobytes and loads saves data twice as quickly The B92 80 track dual head drive stores 204 Kilobytes of formatted data on EACH side of a 5 inch diskette single density mode That s 408 Kilobytes per diskette In double density mode the B92 stores a mammoth 408 Kilobytes per side or 816 Kilobytes of formatted data per diskette With two B92 s and a PERCOM double you could have over 1 6 Megabytes of on line storage for your TRS 80 for less than 1500 MPI B91 80 Track Single Head Drive only 499 MPI B92 80 Track Dual Head Drive only 619 Prices are for bare drives and include p amp p Add 10 00 per drive for a cabinet and 60 00 for a power supply to suit two drives Note 80 track drives will not read diskettes written on a 35 or 40 track drive If drives with different track counts are to be operated on the same system NEWDOS 80 must be used CARE FOR YOUR DISK DRIVES THEN USE 3M s DISK DRIVE HEAD CLEANING DISKETTES 30 20 incl p amp p Disk drives are expensive and so are disket
27. implemented by typing the appropriate graphics symbols directly into PRINT statements S KEY allows the user to LIST a program with PRINT statements containing graphics properly S KEY does this by intercepting the LIST routine when necessary S KEY allows the user to list an updated list of the shift key entries to the video display or line printer S KEY can be disabled and enabled when required This allows other routines which take control of the keyboard to run with S KEY as well Each cassette has TRS 80 DISK and SYSTEM 80 versions and comes with comprehensive documentation SOFTWARE BY AUSTRALIAN AUTHORS All our software is suitable for either the SYSTEM 80 or the TRS 80 PAGE 49 BMON by Edwin Paay 19 95 plus 50 p amp p THE ULTIMATE HIGH MEMORY BASIC MONITOR L2 16 48K Our own personnel refuse to write BASIC without first loading this amazing machine language utility program into high memory BMON Renumbers Displays BASIC programs on the screen while they are still loading tells you the memory locations of the program just loaded lets you stop a load part way through merges two programs with automatic renumbering of the second so as to prevent any clashes of line numbers recovers your program even though you did type NEW makes one program invisible while you work on a second saves hours of cassette time lists all the variables used in the program makes SYSTEM tapes lets you Edit memory directly the
28. list goes on and on Cassette comes with 16K 32K and 48K versions ready to load Can anyone afford NOT to have BMON EDUCATIONAL RPN CALCULATOR L2 16K amp 32K 14 95 50c p amp p Give your computer the power of a 650 reverse polish notation calculator with 45 functions and selectable accuracy of 8 or 16 digits The main stack and registers are continuously displayed whilst the menu is always instantly accessible without disturbing any calculations or register values The cassette comes with both the 16K and 32K versions the latter giving you the addi tional power of a programmable calculator Comes with a very comprehensive 15 page manual which includes instructions to load and modify the 32K pro grammable version to run in 16K Whether for business or pleasure this package will prove invaluable and turn you 80 into a very powerful instrument GAMES MICROPOLY L2 16K 8 95 60 p amp p Now can play Monopoly on your micro The old favourite board game has moved into the electronic era This computer version displays the board on the screen obeys all the rules and best of all the banker does not make mistakes with your change CONCENTRATION L2 16K 8 95 60c p amp p Another application of supergraphics There are 28 cards displayed on the screen face down Players take it in turn to turn them over with the object of finding matching pairs There are 40 different patterns which are cho
29. that you only see the computer s pattern for a brief spanat the beginning of the game then you must remember it In MATCHEM you have to manoeuvre 20 pegs from the centre of the screen to their respective holes in the top or bottom rows Your score is determined by the time taken to select a peg the route taken from the centre of the screen to the hole and your ability to direct the peg into the hole with out hitting any other peg or the boundary VISURAMA L2 16K Cassette 10 95 Disk 15 95 60c p amp p Two programs which give fascinating ever changing patterns on the screen LIFE is the fastest implementation of the Game of Life you will see on your 80 Machine language routines create up to 1200 new generations per minute for small patterns or up to 100 per minute for the full 128 x 48 screen matrix Features full horizontal and vertical wraparound EPICYCLES will fascinate you for hours The ever changing ever moving patterns give a 3D effect and were inspired by the ancient Greek theories of Ptolemy and his model of the Solar system EDUCATION AND FUN L1 4K L2 16K Cassette 10 95 Disk 15 95 60c p amp p Written by a primary school teacher to make learning enjoy able for his pupils there are five programs in both Level and Level to suit all systems BUG A LUG a mathematics game in which you must get the sum correct before you can move AUSTRALIAN GEOGRAPHY learn about Australian States and towns etc S
30. the installation with us first before despatch ing your computer so that we can assure you of a rapid turn around We are also arranging to have installers in each State See elsewhere in this issue for their names and addresses PRICES Cat No HD 020 Lower case mod kit for TRS 80 49 00 plus 2 00 p amp p HD 021 Lower case mod kit for SYSTEM 80 49 00 plus 2 00 p amp p EPSON MX 80 PRINTER ONLY 949 Inc Cable for TRS 80 and p amp p Printer only 940 incl p amp p The EPSON MX 80 printer is compact quiet has features unheard of only 2 3 years ago in a printer at any price and above all is ultra reliable All available print modes may be selected under software control Features include high quality 9x9 dot matrix character formation 3 character densities 80 characters per line at 10 chars inch 132 characters per line at 16 5 chars inch 40 characters per line at 5 chars inch 2 line spacings 6 lines per inch 8 lines per inch 80 characters per second print speed bi directional printing logical seeking of shortest path for printing lower case with descenders TRS 80 graphics characters built in standard Centronics printer port The bi directional printing coupled with the logical seeking of the shortest print path which means that the print head will commence printing the next line from the end which requires the least travel thereby minimising unutil
31. to every new subscriber and to every subscriber who renews his sub scription for another 12 months Disk subscribers will receive their Software Library on a diskette The new Software Library contains the following Level II Disk Programs All programs will also operate on the Model III Level I in Level II Convert your Level II TRS 80 or System 80 to operate as a Level I machine Opens a whole new library of software for your use Copier Copies Level II System tapes irrespective of where they load in memory Copes with multiple ORG programs Z80 MOM A low memory machine language monitor which enables you to insert OP codes edit memory punch system tapes etc Cube An ingenious representation of the popular Rubicks cube game for Disk users Poker Play poker against your computer complete with realistic graphics Improved Household Accounts Version 3 0 of this useful program One or two bugs removed and easier data entry This program is powerful enough to be used by a small business 80 Composer A music generating program which enables you to play music via your cassette cord and to save the music data to tape This is an improved version of the program published in Issue 17 of Micro 80 PAGE 1 ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 2 x EDITORIAL Despite the promises very few of the new colour computers have actually been seen in the shops yet Commodore with its VIC 20 and Tandy with the TRS
32. with modifications to extend the duration by half or one third for triplets Both sharps and flats are catered for as are rests Notes on whole sections may be repeated The program comes with sample data for a well known tune to illustrate how it is done SAVE 00 x x SAVE 0095 x x x SAVE 0095 x x x MICRO 80 EXPANSION INTERFACE x x MICRO 80 s expansion interface utilises the proven LNW Research Expansion board It is supplied fully built up and tested in an attractive cabinet with a self contained power supply ready to plug in and go The expansion interface carries MICRO 80 s full no hassle 90 day warranty Features include e Sockets for up to 32K of memory expansion Disk controller for up to 4 disk drives e Parallel printer port e Serial RS232C 20mA 1 O port e Second cassette optional The expansion interface connects directly to your TRS 80 L2 16K keyboard or via SYSPAND 80 to your SYSTEM 80VIDEO GENIE Prices HD 010 A Expansion Interfaces with 499 00 HD 010 B Expansion Interfaces with 32K 549 00 HD 011 Data separator fitted recommended add 29 00 HD 012 Dual cassette Interfaces fitted add 19 00 The MICRO 80 Expansion Interface is also available in kit form Prices HD 013 Kit consisting of LNW Research PC board and manual ALL components including cabinet amp power supply 375 00 HD 01 1 Data separator for above 25 00 HD 013 Dual cassette Interface kit 15 00 A choice of upper and lo
33. 0 DEVELOPED BY ALLAN DENT FOR ADELAIDE USERS GROUP 00130 00140 L KEY WILL DRAW LINE DISABLES RESET 00150 D KEY WILL MAKE DOT TO ENABLE CURSOR TO BE MOVED 00160 SHIFT UP ARROW RETURNS TO BASIC 00170 CLEAR KEY WILL CLEAR SCREEN 00180 00190 RELOCATED BY CHANGING ORG STATEMENT 00200 THERE IS A VERSION CONVERTED TO BASIC POKE STATEMENTS 00210 7FOO 00220 ORG 32512 7FOO CD7FOA 00230 USRVAL CALL OA7FH GET VALUE FROM USR O 7FO3 7D 00240 LD A L 7 04 32647F 00250 LD VALUE A SAVE VALUE FOR LATER 7 07 CDSBO3 00260 INKEY CALL 35BH 3 INKEY ROUTINE 7FOA FE1B 00270 RETN cP 01BH TEST IF SHIFT UP ARROW 7 2006 00280 JR NZ CLS IGNORE IF NOT 7FOE 24657F 00290 LD HL COORD COORDS TO BASIC 7 11 C39A0A 00500 JP OA9AH BACK TO BASIC 7F14 1 00310 CLS 1 TEST IF CLEAR PRESSED 7F16 CCC901 00520 CALL Z 1C9H 3CLS ROUTINE 7F19 21647F 00330 LINE LD HL VALUE CHECK IF L PRESSED 7F1C FE4C 00340 cP dE 7F1E 2002 00350 JR NZ DOT IGNORE IF NOT 7F20 3654 00360 LD HL 90 7F22 FE44 00370 DOT cP gt Dp CHECK IF D PRESSED 7F24 2002 00380 JR NZ YCOORD IGNORE IF NOT 7F26 3664 00390 LD HL 100 7F28 DBO1 00400 YCOORD IN A 1 Y VALUE 7F24 O6FF 00410 LD B OFFH USE AS COUNTER FOR DIVIDE 7F2C 04 00420 DIVDS DIVIDE Y COORD BY 5 7F2D 0605 00430 SUR 5 7F2F 00440 JR NC DIVDS SUBTRACT TILL lt 0 7F31 78 00450 GR47 LD A B ANSWER INTO A TO 7F32 FE2F 00460 CP 4
34. 1 START FROM WHERE YOU ARE 2210 IF 1 lt THEN MIN A J FOUND A LOWER ONE 037979 222 NEXT J 2230 IF P lt gt I THEN T ACT ACT A P z ACP T EXCHANGE 2240 NEXT I 2250 RETURN 2260 lt END OF PROGRAM gt 2270 2280 FOLLOWS THE DRIVER WHICH BUILDS THE INPUT ARRAY 2290 DISPLAYS THE DATA CALLS THE SORT AND DISPLAYS THE 2500 SORTED RESULTS Here follows the driver which builds the input array displays the data calls the sort and displays the sorted results INPUT HOW MANY NUMBERS N CLS DIM A N RANDOM ACI RND 1000 PRINTACT 5 NEXT I PRINT INPUT HIT ENTER TO START I 2380 GOSUB 2170 2390 FOR I 1TO 2400 PRINTACT 5 2410 NEXT I 2420 END D un 5 N o To further explain the functions of this algorithm consider the trace of the first pass Assume array before sort is 12 18 15 6 13 MIN CONSIDERING POSITION OF MIN 12 18 1 12 15 1 12 6 Moved to min 4 updated 6 13 4 Now since the position of the minimum has changed from that at the start of the pass an exchange is performed between the Ist and 4th items so that the data after the first pass looks like this 6 18 15 12 13 ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 10 The second pass will commence searching data from the second item onwards i e 18 since position is occupied by the smallest value in
35. 1 THEN L LEFT L LEN L 1 FOR IZ O TO 20 11 DDX DDZ O PRINT CHR 29 CHR 30 3 GOSUB 1240 GOTO 2650 gb eS 770 IF AX 9 THEN DD DD 1 L G0TO 820 780 IF AZ 8 THEN DDZ DDX 1 L GOTO 870 790 IF AX 91 THEN AX 0 2 2 PRINT 176 910 800 IF AX 10 AND DDZ O THEN GOTO 740 ELSE IF 10 THEN GOTO 112 810 IF 64 THEN GOTO 1200 ELSE 740 820 PRINT CHRS 29 XO s L 820 FOR IX 1 TO DD 840 IF I lt gt DD THEN L L T 1 GOTO 860 850 IF IX DDX THEN L L 4T IZ 860 NEXT IZ PRINT L GOTO 740 870 IF DDZ z O THEN DDX O PRINT CHR 29 5 CHRS 20 L GOTO 740 ELSE PRINT CHRS 29 5 CHRS 20 5 1 880 FOR I 1 TO DDZ 890 LS L TS IZ 900 NEXT L GOTO 740 910 Z INKEY IF 2 THEN GOTO 910 920 AZ ASC 7 950 IF AZ 8 AND LEN TT O THEN PRINT CHR D TT LEFT OTT LEN 6 1 650 70 910 ELSE IF AZ 8 AND LEN TT O THEN GOTO 910 940 IF AZ 96 THEN AZ 128 GOTO 1120 950 IF AX 32 GOTO 910 960 IF 52 THEN DDZ DD 1 0 0 41 GOTO 980 970 GOTO 1090 980 FOR I 0 TO 007 STEP 1 990 T CIZ T OIX 1 1000 NEXT IZ T DDZ TT L 1910 FOR IZ 1 TO 0 1020 IF 17 lt gt 07 THEN L L 4T CIZ GOTO 1040 1020 L L TS 1040 NEXT IX TT 1050 PRINT CHR 29 3sCHR 20 5 1960 FOR IZ 1 TO DDZ 1070 5 1080 NEXT
36. 1 onwards Further details of the programs contained in our new software library will be published shortly INFLATION STRIKES BUT JUST A LITTLE The price for a 12 months subscription to MICRO 80 has remained unchanged since we commenced publication 2 years ago During that time the Consumer Price Index in Australia has increased by more than 20 Commencing next issue the price of a subscription to MICRO 80 magazine will increase to 26 a Cassette subscription to 65 and a Disk subscription to 125 These increases are very much less than the inflation rate and the increased revenue will assist us to improve the quality of your magazine still further DIGITAL COMMUNICATIONS COMING TO AUSTRALIAN MICRO USERS One of the more exciting uses for a microcomputer is to use it as a communications medium i e for one microcomputer to communicate with another several kilometers distant Many of our readers have already tried sending programs over the telephone line by connecting amplifiers to the cassette port we know This is an unsophisticated version of an acoustic coupler which is widely used for transmitting digital information between commercial computers One method of implementing automatic data processing in a business is to use a time sharing bureau via a dial up line Turning that jargon into some semblance of English we find that an alternative to installing your own computer is to buy a terminal and printer and connect to a large comp
37. 5 60c p amp p Much improved version of this arcade favourite with redesigned laser and cannon blasts high speed cannon 50 roving drone targets 10 motherships and heaps of fun for all Level II with and 16K versions on this cassette GOLF L2 16K 8 95 60c p amp p Pit your skills of mini golf against the computer Choose the level of difficulty the number of holes and whether you want to play straight mini golf or crazy golf Com plete with hazards water traps bunkers and trees Great fun for kids of all ages DOMINOES L2 16K 8 95 60c p amp p Pit your skill at dominoes against the computer which provides a tireless opponent Another application of supergraphics from the stable of Charlie Bartlett Dominoes are shown approximately life size in full detail except for colour The monitor screen is a window which you can move from one end of the string of dominoes to the other Best of all you don t lose any pieces between games KID S STUFF formerly MMM 1 8 95 60c p amp p Three games on one cassette from that master of TRS 80 graphics Charlie Bartlett Includes INDY 500 an exciting road race that gets faster and faster the longer you play SUBHUNT in which your warship blows up unfortunate little submarines all over the place and KNIEVEL as in motorcycle ramp and buses OTHER PROGRAMS INFINITE BASIC BY RACET 32K 1 DISK 49 95 50c p amp p Full matrix functions 30 BASIC commands 50 more S
38. 7 CHECK IF gt 47 7F34 3802 00470 JR C NGR47 IGNORE IF NOT 7F36 2 00480 LD 5 47 IF gt 47 LET 47 7F38 amp F 00490 NGR47 1 L A L HAS Y COORD 7F39 DBOO 00500 XCOORD IN A 0 GET X VALUE 7F3BR CB3F 00510 SRL A DIVIDE BY 2 7F3D 67 00520 LD H A 3H HAS X COORD 7F3E 22657F 00550 LD COORD HL SAVE COORDS FOR BASIC 7 41 44 00540 ROM LD B H PREPARE FOR ROM ROUTINE 7F42 7D 00550 LD AL 7 45 ES 00560 PUSH HL 3 8AVE LOCATION FOR RESET 7F44 2680 00570 LD H 80H 5 FLAG FOR ROUTINE 7F46 CDAB7F 00580 CALL GRAFIX ROM ROUTINE 7F49 1808 00590 JR RESET 7F4B ES 00600 GRAFIX PUSH HL 7F4C CS 00610 PUSH BC 7F4D 218018 00620 LD HL 188CH ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 6 7F50 C35001 00630 JP 150H 7F53 Ei 00640 RESET POP HL GET LOCATION 7F54 34647F 00650 LD A VALUE VALUE OF USR O 7F57 64 00660 100 CHECK IF RESET REQUIRED 7F59 20AC 00670 JR NZ INKEY RESET IF FLAG 100 7 5 44 00680 LD B H PREPARE FOR ROM ROUTINE 7F5C 7D 00690 LD AL 7F5D 2601 00700 LD H 01 RESET FLAG FOR ROUTINE 7F5F CD4B7F 00710 CALL GRAFIX ROM ROUTINE 7F62 1863 00720 JR INKEY 7F64 00730 VALUE X DEFB 00 SPACE FOR USR O VALUE 7F65 00740 COORD DEFW 00 SPACE FOR COORDS 7 00750 END USRVAL 20 POKET16526 32512AND255 POKE16527 INT 32512 256 CLEAR50 POKE16 561 32512AND255 POKE16562 INT 32512 256 FIRST SET PASSES LOCATION TO USR O SECOND SET PROTECTS MEMORY CHANGE THESE IF YOU RE ASSEMBLE RO
39. 80 Colour Computer are both resigned to missing the Christmas rush but it does seem that these computers will actually be available in February 1982 So with Tandy at long last about to have a colour computer what of the Dick Smith organisation Whilst there have been rumours of colour add ons for the System 80 Video Genie there have been no suggestions that the manufacturers of the Video Genie actually have a colour computer on the way So Dick Smith has solved his problem himself and will shortly be competing with Tandy in offering colour computers How has he done it DICK SMITH ELECTRONICS WILL SHORTLY BE SELLING THE VIC 20 BY COMMODORE It will be a fascinating battle to see which computer gains the most customers The VIC 20 in its most basic form wins over the TRS 80 Colour on price 399 versus 599 but before a judgement can be made it is necessary to compare the prices for equipment of similar performance both systems have a wide range of add ons and expansion units That we will do for you in the next few issues Next month we will have a detailed review of the TRS 80 Colour Computer based on hands on experience of a reader who imported his own several months ago and our own impressions of an expanded BASIC machine loaned to us by Tandy We will follow that in a later issue with a comparative review of the VIC 20 We will also look at one of the newest offerings the Hitachi Peach There are exciting times ahead for those contemplati
40. 88 L 9 6 292 IF gt E30 X G20 T 589 IFC OT L 3 6 286 IFE OT L 5 6 288 L 7 6 290 PAGE 12 ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 13 624 REM X TEST FOR POSITION OF 70 TO WIN x 25 IF A 4 X 4 4 X C 4 c CCB 4 X C 4 T 591 626 IF D 4 X E240 0 4 X F 4 c C E 4 X 4 T 595 627 IF G 4 X H4 c 6 4 X 1 4 c CCH 24 X I240 T 529 628 IF A 4 X 0 4 A 4 X G 4 c D 4 G 4 T 6OX 629 IF B 4 X E24 c C E 4 X H4 B 4 X 4 T 607 620 IF C 4 X F 4 4 0 F 4 X CI 4 c CCC 4 X 1 4 T 611 651 IF A 4 X E 4 4 1 4 A 4 X 1 4 T 615 622 IF C 4 X 4 4 X G 4 c 4 X 5 4 T 619 655 6 581 ATTACK Disk Basic L2 16K by M Bloss Attack is a fast exciting game with sound Your space ship is at the bottom of the screen but all that is shown is your cannon alien ship appears at the top of the screen and fires rockets at you You must intercept each rocket by firing your cannon and blowing it up The closer the rocket is to the alien ship when you hit it the higher your score Thereare eight columns on the screen down which the alien fires and in which the cannon is able to move and fire If you miss a rocket it will destroy you which terminates the game The longer you play the faster the game To hear the sound connect an audio amplifier to the plug
41. CLS N N 1 READD N PRINT9465 THE SYMBOL OF F IS 979 HIT ANY KEY TO CONTINUE RESTORE 150 IFINKEY THENi1ZOELSEZO 140 5 465 PLEASE ENTER ELEMENT INPLIT8 GOSUB600 FORN 1TOZ12 READD N IFD 8 THEN170ELSENEXT GOSUR1 40 150 GOTO140 160 CLS RESTO RE PRINT3470 SORRY TRY AGAIN sFORJ 1T0870 NEXT R ETURN 170 CLS PRINT23464 THE ATOMIC NO OF 5 IS D N 1 PRINT3979 HIT ANY KEY TO CONTINUE RESTORE 180 IFINKEY THEN180ELSEZO 190 CLS PRINT3466 PLEASE ENTER ATOMIC NO INPUTA GOSUR600 FOR N 1TOA 2 2 READD NEXT CLS PRINT 3469 THE SYMBOL OF A IS D PRI NT3979 HIT ANY KEY TO CONTINUE RESTORE 200 IFINKEY THEN2OOELSEZO 210 CLS PRINT2466 PLEASE ENTER SYMBOL INPUTS G SUR600 FORN 1 T0212 READDS N IFD N 8 THEN240ELSENEXT 220 GOSUB140 230 GOTOZ10 240 CLS PRINT2464 THE ATOMIC NO OF S IS D N 2 PRINT3979 HIT ANY KEY TO CONTINUE RESTORE 250 IFINKEY THEN2SOELSEZO 260 CLS PRINT3466 PLEASE ENTER SYMBOL INPUTS GOSUR6OO0 FORN 1 TOZ12 READDS N IFD N 8 THEN290EL SENEXT 270 050 160 G TO260 290 CLS PRINT246Z THE ELEMENT FOR S IS D N 1 PRINT3979 HIT ANY KEY TO CONTINUE RESTORE IFINKEY THENZOOELSEZO 510 CLS PRINT2452 PLEASE ENTER EITHER ATOMIC NO SYMBOL OR ELE MENT INPUTX GOSUB6O00 IFVAL lt xON VAL IFN210ZTHENSSOELSEZ 4O0ELSEJ LEN X
42. D 4 G6 260 288 IFL 5ST P A 2352 O E 4 G 260 289 IFL 6T P A 360 0 F 4 G 260 290 IFL 7T P A 5346 0 6 4 6 260 291 IFL 8T P A 544 O0 H 4 6 260 292 IFL 9T P A 552 0 1 4 6 260 293 808 399 294 Z 2 2 295 6 15 598 E 599 X B56 F Y 3TO028 8 X Y zN Yz X273 Y23TO28 8 X Y s N Y 400 K A B C IFK 3T 500 401 IFK 12T 505 402 K D E F IFK 3T 500 403 IFK 12T 505 404 K G4 H I IFK 3T 500 405 IFK 12T 505 406 K A D G IFK 3T 500 407 IFK 12T 505 408 K B E H IFK 3T 500 409 IFK 12T 505 410 K C4 F I IFK 3T 500 411 IFK 12T 505 412 IFK 3T 500 413 IFK 12T 505 414 K C E G IFK 3T 500 415 IFK 12T 505 416 IF ADO B gt 0 X O0 X CD20 X EDO X X G30 X HO X I20 T 510 417 Z Z 1 418 RET 500 704 501 P A 714 YOU WIN WELL DONE xxx 502 P A 849 WANT TO PLAY AGAIN YES OR NOD 3 I M 503 IFM YT 3 504 CLS E 505 704 ISSUE 24 NOVEMBER 1981 MICRO 80 502 507 510 511 512 550 551 552 554 55 555 552 257 558 55 560 561 562 564 S65 S66 267 358 269 570 571 572 S73 574 575 276 577 578 580 581 582 S82 584 285 582 587 588 589 591 592 S92 594 59 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 612 614 615 616 617 618 619 620 621 vIr aa 16 I BEAT YOU DUMM Y xxx 04 n P 0 720 I T S A DRAW kxxx Q 1 L RND 9
43. ENGO7 512ELSE IFQ 63THENG 768 1690 POKE 15260 0 U 64 95 U 0 0 RETURN 1700 CLS F 0 1710 12 ENTER 1 PRINT DRAFT DOCUMENT 1720 PRINTTAB 12 ENTER 2 TO PRINT COMPLETED TEXT PRINTTAB 1 2 STRINGS 24 45 17 0 PRINTTAB 12 ENTER 5 RECORD TO TAPE 1740 PRINTTAB 12 ENTER 4 TO LOAD FROM TAPE PRINTTAB 12 STR ING 24 45 ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 29 1750 12 ENTER 34 45 1760 12 ENTER 6 TO CHANGE 12 STRING 24 45 1770 PRINTTAB 12 ENTER 7 TO ADD TO THE POCUMENT PRINTTAR 12 STRINGS 24 45 1780 12 ENTER 8 TO INSERT NEW LINE 1790 PRINTTABR 12 ENTER 9 TO DELETE LINE 1800 lt 12 STRINGS 24 45 PRINTTABR 12 ENTER CHOICE s INPUT Y 1810 IF Y INDENT THEN FZ 1 CLS PRINT GOTO 150 1820 IF LEN Y 1 THEN GOTO 1700 1920 YXH VAL IF YX 1 OR Y gt 9 THHEN GOTO 1700 1840 ON Y GOTO 1850 1960 2050 2280 2710 2516 2030 2820 3020 1950 CLS 7 PRINT MAKE PRINTER READY 18450 PRINT PRINT ELSE ENTER A TO ABORT s INPUT Z 1870 IF 7 6 gt THEN GOTO 1700 1880 LPRINT INDENTATION 1890 IF OXZ O THEN LPRINT JUSTIFY ELSE LPRINT NON JUSTIFY 1900 LPRINT 1910 FOR IZ 1 TO NZ 1920 LPRINTCHR 29 s CHR 27 CHRS 56 CHR C27 C66 5 2 S 60 OIZ LPRINT IF A OIZ THEN LPRINT 1920 IF I
44. ER SUPS NPER OK 222 22 FOR THE FIRST TIME IN AUSTRALIA GENUINE TANDY TRS 80 MICRO COMPUTERS HARDWARE AND SOFTWARE AT GREAT DISCOUNT PRICES HOW TO ORDER 1 SELECT ITEMS FROM 1980 TANDY CATALOGUE 2 DEDUCT 10 FROM ADVERTISED PRICES 3 POST US YOUR ORDER STATING DESCRIPTION CAT No AND A CHEQUE OR MONEY ORDER to CONQUEST ELECTRONICS Ltd 212 Katoomba St KATOOMBA 2780 Please supply QTY CAT NO DESC ADV PRICE WE WILL ATTEND TO YOUR ORDER WITHIN 7 DAYS 2 SUPPLY GOODS SELECTED FREIGHT FREE 3 SEND ADVERTISING REGULARLY TO KEEP Y OU INFORMED OF CURRENT SPECIALS subject to availability SUB TOTAL LESS 10 FIND CHEQUE FOR TOTAL SEND FREIGHT FREE TO ADDRESS og TANDY 0 CONQUEST ELECTRONICS 212 KATOOMBA ST KATOOMBA N S W 2780 PHONE 047 82 2491 MICRO 80 LET THE AUSTRAUAN SOURCE BRING MAINFRAME POWER INTO YOUR HOME OR OFFICE The AUSTRALIAN SOURCE is Australia s first microcomputer information utility armed at giving the average microcomputer user access to the computer data banks and also massive storage space previously only available to large Mainframe installations The era of home computers has now Officially begun in Australia now that the AUSTRALIAN SOURCE is here as now any small businessman or student can have on his desk for an extrem
45. L s 1 NEXT GOTO1580 1520 IFCA TFORL CRTOS1 C CC B L 1 NEXT GOTO1580 1540 IFA CA gt CCCC A CA CA CA 1 ELSEC CC B CR CR CR 1 1560 CC CC 1 GOTO1500 1580 1 51 1 1 580 1600 IFCC gt S1FORL CATOT 1 B CR L 1 NEXT GOTO1680 1620 IFCA TFORL CCTOS1 C L CR CR 1 NEXT 1 680 1640 IFA gt CC A CA CA 1 ELSER C CC 1 1660 1 1 600 1680 Bi1 O S1 CB 1 GOTO1 380 1700 SORT ROUTINE xx 1720 T SUBSET LEN 1 N LEN OF INPUT SURSET 1740 T T 1 N3 T 1 FORN1Z 1TONZz N4 O 1760 FORN2X 1TO CT 1 IFAD D GOTO1860 1780 IFA N27 lt A N2 1 GOTO1820 1800 A1 A N2Z 27 A N22 41 N2 1 201 N4 1 1820 NEXT IFN4 ORETURN 1840 T T 1 NEXT RETURN 1860 IFA N27 gt A N2 1 BOTO1820EL SEGOTO1800 The program displays the length of each subset used for extraction and sorting and the number of merges involved in the whole process By using merging techniques with the bubble sort an increase in efficiency of 270 was obtained based on an input list size of 100 items That is ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 9 100 items with straight bubble 130 seconds 100 items with bubble sort merge 48 seconds It can be seen that merging techniques strip a considerable amount of time off the entire process In fact merging is such an effi
46. LY 560 PRINT TO WIN YOU MUST HAVE THE HIGHEST SCORE 9570 PRINT INPUT HOW MANY PLAYERS MINIMUM OF 2 P 580 IFP2THENS70 590 CLS PRINT ENTER YOUR NAMES ONE AT A TIME 600 FORI 1TOP INPUTNAS CI NEXTI RETURN 610 SC G SC SH G SH PRINT END OF GO IFSH 20THENPRINT YOU HAVE RUN OUT OF ROCKETS 620 IFG PTHENS40 620 PRINT NEXT PLAYER PLEASE PRESS ENTER TO START 640 INPUTR GOTO7O 650 PRINT PRESS ANY KEY TO CONTINUE 660 FORL 1TO010000 Q INKEY IFOS lt THENL 210000 GOTO480 670 LL RND 50 70 R USR LL X 256 FORLA 1T025 NEXTLA 680 NEXTL RETURN 690 RETURN 700 GOTO700 710 GDSUB970 FORV 1TOA40 R USR 72560 CLS PRINT K 4 BOOM poa 720 PRINT A MISSILE HIT YOUR SHIP AND BLEW IT UP 730 GOTO0610 740 C 0 POKEXX 128 POKEXX 65 128 64 128 GOSUB1020 FORV 1T 012 R USR 0 NEXTV GOSUB1040 FOROO 1 T0100 IFAA lt 15551 THENSC SC 600 GOTOS z0 750 IFAAS15S679THENSC SC 500 GOTOBZ0 760 IFAAS1 S807 THENSC SC 400 GOTOSZO 770 IFAAC1I S925 THENSC SC 200 GOTOSZO 780 IFAAS1 6062 THENSC SC 200 GO TOBZO 790 IFAAS1 46191 THENSC SC 100 810 IFSC lt 10000THENM 465EL SEM 54 820 PRINT31 SCORE PRINT3M SC RETURN 820 GOSUBB810 FDORER 4 1TO08954 6STEP54 PRINTER STRINGS 2 128 TER GOTO210 840 IFXZ16Z39THENRETURN 850 POKEX 4 128 5 128 RETURN 860 PRINT THESE ARE THE FINAL SCORES 870 FORG 1 TOP ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 15
47. New editing commands that allow program lines to be deleted from one location and moved to another or to allow the duplication of a program line with the deletion of the original Enhanced and improved RENUMBER that allows relocation of subroutines Create powerful chain command files which will control the operation of your system Device handling for routing to display and printer simultaneously MINIDOS striking the D F G keys simul taneously calls up a MINIDOS which allows you to perform many of the DOS commands without dis turbing the resident program Includes Superzap 3 0 which enables you to display print modify any byte in memory or on disk Also includes the following utilities Disk Editor Assembler Disassembler 280 machine code LM offset allows transfers of any system tape to Disk file automatically relocated LEVEL Lets you convert your computer back to Level 1 LVIDKSL Saves and loads Level 1 programs to disk DIRCHECK Tests disk directories for errors and lists them ASPOOL An automatic spooler which routes a disk file to the printer whilst the computer con tinues to operate on other programs LCDVR a lower case drives which display lower case on the screen if you have fitted a simple lower case modification DISK DRIVE USERS EMIRATS ERRORS TRACK LOCKED OUT MESSAGES FIT A PERCOM DATA SEPARATOR 37 00 plus 1 20 p amp p When Tandy d
48. ON 470 2978 ESTIMATE VALUES OF Y Y N 480 I INKEYS IFI THEN480ELSEIFI Y THEN4S90EL SEIFIS N THEN440ELSE480 490 CLS 500 INPUT X1 XA 21 CHR 27 3 INPUT X2 3 YH D BKXA CC XB PRINTTAB 42 CHR 27 Y GOTOSOO 510 CLS PRINT POINT s TAB 11 X1 3 TAB 22 X2 Y s TAB 45 YHAT 55 RES PRINT RETURN ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 23 ATOMIC TABLES 12 16 by D Balaic As I read John S Bone s article from the U K I realised how poor the Australian government s reaction to computers has been Where America is already using computers in education wholesale from second grade upwards only a few technical colleges have PETs or the such here When I saw the possibilities of computers in teaching mathematics and sciences I felt I simply had to write an educational program to demonstrate So Atomic Tables was evolved This program not only aims to teach but also can act as a reference to students studying chemistry for it shows not only the name symbol and element atomic number but also gives the group or series and accurately gives the electon shells of the said atom As the movements of atoms in the different shells or energy levels is not always easily predictable this program is of particular usefulness It is also capable of telling either of name number or symbol from any of these given The program uses one l
49. ON SCREEN WITH JOYSTICKS 105 CLS 110 DEFINT A Z 120 A INP 0 130 1 140 X A 2 150 Y B 5 IF Y gt 47 THEN Y 47 160 PRINT9960 X J 2 170 SET X Y 180 GOTO120 190 REM 200 REM THIS PROGRAMME DRAWS LINES ON THE SCREEN OR MOVES SPOT AROUND THE SCREEN IF THE SPACE BAR IS PRESSED 205 CLS 210 X INP O 2 s Y INP 1 5 IF gt 47 THEN Y 47 220 SET X Y 250 IF PEEK 14400 128 THEN RESET X Y TEST FOR SPACE BAR 240 GOTO 210 290 REM RRR RRR 300 REM THIS PROGRAMME SETS THE PPI TO PORT 8 IN 9 amp 10 OUT READS THE SWITCHES AT THE INPUT TO PORT 8 PRINTS THE DECIMAL AND HEX VALUE TO THE SCREEN AND OUTPUTS THE VALUE TO PORT 9 305 CLS 25 s OUT 11 152 310 X INP 8 320 PRINT2530 X 325 REM LINES 330 340 CONVERT THE DECIMAL VALUE TO HEX 330 16 IF A 10 THEN A CHR A4 48 ELSE 55 540 B X A amp 16 IF lt 10 THEN B CHR B 48 ELSE B CHR B 55 350 360 550 570 OUT 9 580 GOTO 510 590 SESREERERRRRRRARERRERARRAAR ARR RRR RARE RAAA RRR RARER 400 THIS PROGRAMME SCANS THE KEYBOARD AND OUTPUTS THE ASCII VALUE TO THE LED DISPLAY AT PORT 9 IT ALSO READS THE SWITCHES AT THE INPUT TO PORT 8 AND DISPLAYS THE COMPUTER CODE IT REPRESENTS ON THE SCREEN 405 CLS PRINTCHR 23 s OUT 11 152 410 IFAS THEN 440 420 X ASC
50. OTO480 450 IFN2 Z2P Z2 N N Z2ELSEP N G TO480 460 IFN gt 220 22 N N 22ELSEG N GOTO480 470 IFN2 18R 18 N N 18ELSER N 480 N K L M P Q R FN 19M M 1 P 1 GOTOS80 490 IFN gt 20ANDN lt ZOM M 2 P 2 G0T0580 500 IFN Z7P P 1 0 1 80T0580 510 IFN 61P P 1 0 2 80T0580 520 IFN 620 2 60T0580 530 IFN Z8ANDN 62P P 2 0 2 G0T0580 540 IFN 690 0 1 R 1 G60T0580 550 IFN 9Z0 0 1 R 2 80T0580 550 IFN 94R 2 80T0580 570 IFN2 70A4NDN 940 0 2 R 2 GOTOS80 580 RETURN 590 REM 600 CLS PRINT2472 COMPILING DATA RETURN 610 DATA1 HYDROGEN 2 HELIUM Z L ITHIUM LI 4 BERYL IUM BE 5 RON B 6 CARBON 7 NITROGEN N 8 OXYGEN 0 9 FLOURINE F 10 NEON NE 11 SODIUM NA 12 MAGNESIUM MG 12 ALUMINIUM AL 14 SILICON SI 15 PHO SPHORUS 16 SULPHUR S 17 CHLORINE CL 18 ARGON A 19 POTASSIUM 620 DATA20 CALCIUM CA 21 SCANDIUM SC 22 TITANIUM TI 22 VANADIUM V 24 CHROMIUM CR 25 MANGANESE MN 26 IRON FE 27 COBALT CO 28 NICKE L NI 29 COPPER CU 20 ZINC ZN 21 GALLIUM GA 22 GERMANIUM GE 22 ARS ENIC AS 24 SCLENIUM SE 35 BROMINE BR 26 KRYPTON KR 27 RUBIDIUM 620 DATAZ8 STRONTIUM SR 29 YTTRIUM Y 40 ZIRCONIUM ZR 41 NIOBIUM NB 42 MOLYBDENUM 42 TECHNETIUM TC 44 RUTHENIUM RU 45 RHODIUM R 46 PALLADIUM PD 47 SILVER AG 48 INDIUM IN 49 CADMIUM CD 50 TIN SN 51 ANTIMONY SB 52 TELLURIUM TE 640 DATASS IODINE 1 54 XENON XE
51. S IZ ASCIZ4 1 AS CI Z 2 2250 PRINTAS 1 PRINTAS I 44 1 I 2 2260 IF AS IZ OR ASCTZ4 1 OR ASCIZ4 2 THEN PRINT CHR 128 2270 NEXT 1 GOTO2400 2280 REM READ DATA 2290 CLS Z PRINT TAB 25 LOAD FROM T APE RECORDER READY FOR PLAYING 2300 PRINT PRINT ELSE ENTER 7A TO ABORT 3 INPUT Z 2210 IF 7 lt gt THEN GOTO 1700 2220 PRINT F 4 2 GOTO 150 2220 CLS 15 THE TAPE RECORDER IS RUNNING 2240 PRINT 2250 INPUT 1 PRINT THERE ARE LINES PRINT 2260 FOR TO STEP 3 2270 INPUT 1 ASCIZ ASCIZ4 1 ASCIZ 2 ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 30 2280 2290 2400 RS 2410 2420 2420 2440 2450 2460 2470 2480 2490 PRINTAS 17 sPRINTAS 1241 sPRINTAS IZ 2 NEXT 17 CLS PRINT THE PROGRAM IS NOW REPLACING THE GRAPHIC CHARACTE WITH COMMAS AND COLONS FOR IZ 1 TO NZ FOR JZ 1 TO 17 KS MID TZ 1 IF K 168 THEN KK KK GOTO 2470 IF K CHR 162 THEN KKS KK sGOTO 2470 NEXT JZ NEXT 1700 CLS PRINT PAGE FULL INSERT ANOTHER SHEET IN PRINTER PRINT PRINTTROFFENTER CONT TO PRINT BALANCE OF TEXT PRINT STOP 2500 2510 2520 2550 2540 2550 2560 2570 2580 2590 2600 2610 2620 2630 2640 2650 2660 2670 2680 2690 2700 2710 2720 2750 2740
52. SE ARE lt gt 1690 PRINT AND M ANUAL AND YOU WILL BE ASKED TO SELECT ONE PR INT 1700 PRINT AUTOMATIC OPERATION 1710 PRINT THE COMPUTER WILL ASK YOU HOW MANY DISCS YOU WOUL D LIKE 1720 PRINT MOVED AND HOW FAST YOU WOULD LIKE THEM MOVED IT WIL L 1720 PRINT THEN PROCEED TO TRANSFER THE DISCS FROM PEG i TO PEG 1740 PRINT USING PEG 2 AS AN INTERMEDIATE 1750 GOSUB 2000 1760 PRINT 22 PLAYING HANOI 1770 1 7 SPRINT 1780 PRINT MANUAL OPERATION 1790 PRINT HERE YOU WILL BE ASKED HOW MANY DISCS YOU WOULD L IKE 1800 PRINT TO MOVE THEN YOU WILL RE PROMPTED TO TYPE THE R OF 1810 PRINT THE PEG THE DISC IS TO BE TAKEN OFF AND THE NUMBER OF THE i820 PRINT PEG THE DISC IS TO BE PLACED ON WHEN YOU HAVE SUCCE SSFULLY 1820 PRINT TRANSFERRED ALL DISCS YOU WILL BE TOLD HOW MANY MOVES 1840 PRINT IT TOOK 1850 GOSUR2000 1860 PRINT323 SUGGESTION 1870 PRINT387 SPRINT 1880 PRINT IF YOU ARE UNSURE OF THE GAME TRY AUTOMATIC OPERA TION 1890 PRINT WITH ABOUT FOUR DISCS AND LOW SPEED E G 10 THEN SIT 1900 PRINT RACK AND LET THE COMPUTER DO ALL THE WORK AFTER ALL THAT 1910 PRINT IS WHAT IT IS THERE FOR PRINT 1920 PRINT FOR A GIVEN NUMBER OF DISCS THE SMALLEST NUMB ER OF 1930 PRINT MOVES REQUIRED IS GIVEN RY 1940 PRINT 2LN 1 1950 PRINT SO FOR 3 DISCS THAT S 7 MOVES
53. TRING functions as BASIC commands GSF L2 48K 24 95 50c p amp p 18 machine language routines including RACET sorts BUSINESS ADDRESS AND INFORMATION SYSTEM 48K DISK 24 95 50c p amp p Allows you to store addresses and information about businesses edit them and print them out HISPED L216 32 or 48K 29 95 This machine language program allows you to SAVE and LOAD programs and data to tape at speeds up to 2000 band 4 times normal using a standard cassette recorder A switch must be installed to remove the XRX III loading board if fitted PAGE 20 LOWER CASE FOR YOUR TRS 80 SYSTEM 80 Kit only 49 00 plus 2 00 p amp p Give your TRS 80 or SYSTEM 80 a lower case display with proper descenders and a block cursor similar to the TRS 80 Model III Also includes symbols for the four suits of cards Includes full fitting instructions all necessary components and a special machine language driver program to enable lower case in BASIC The modification is similar to the Tandy model and does not work with Electric Pencil without further modifi cations These kits require disassembly of your computer and some soldering They should only be installed by someone who has experience in soldering integrated circuits using a low power properly earthed soldering iron If you do not have the necessary experience equipment we will install the modification for you for 20 plus freight in both directions Make sure you arrange
54. TRS 80 SYSTEM 80 VIDEO GENIE 80 Issue 24 November 1981 Move 36 THE TOWERS OF HANOI Also in this issue HARDWARE Add Joysticks and Input Output Ports your 80 Part 4 PROGRAMMING The Theory and Techniques of sorting Part 2 SOFTWARE al evel 4 Tic Toe eLearn Your aMultiple Regression Atomic Tables Analyser m Attack BASIC Line Reference elext Typer Validator MICRO P O BOX 213 GOODWOOD S A 5034 AUSTRALIA TELEPHONE 08 211 7244 PRICE AUS 2 50 N Z 4 00 U K 1 50 ABOUT MICRO 80 EDITOR IAN VAGG SOFTWARE EDITOR CHARLIE BARTLETT HARDWARE EDITOR EDWIN PAAY U K CORRESPONDENT TONY EDWARDS MICRO 80 is an international magazine devoted entirely to the Tandy TRS 80 microcomputer and the Dick Smith System 80 Video Genie It is available at the following prices all prices shown in Aus except for U K prices which are in pounds Sterling 12 months subscription Aus 24 00 NZ 36 00 Airmail Hong Kong 46 00 Airmail U K 16 00 Single Copy Aus 2 50 N Z 3 50 Airmail Hong Kong 4 25 Airmail U K 1 50 Months programs on cassette Aus 3 50 N Z 4 00 Airmail Hong Kong 4 50 Airmail at present available from Australia only U K 4 75 Airmail 12 months subscription to magazine and cassette Aus 60 00 N Z 78 00 Airmail Hong Kong 88 00 Airmail U K 41 00 Airmail Special bulk purchase rates are also available to computer shops et
55. UBTRACTION GAME build a tower with correct answers HOW GOOD IS YOUR MATHS Select the function or X and degree of difficulty HANGMAN That well known word game now on your computer Recommended for children from 6 to 9 years COSMIC FIGHTER amp SPACE JUNK L2 16K Cassette 10 95 Disk 15 95 60c p amp p Both programs have sound to complement their excellent graphics In COSMIC FIGHTER you must defend the earth against seven different types of alien aircraft It is unlikely that you will be successful but you will have a lot of fun trying You mission in SPACE JUNK is to clean up all the debris left floating around in space by those other space games It is not as simple as it sounds and space junk can be quite dangerous unless you are very careful SPACE DRIVE L2 4K amp 16K Cassette 8 95 Disk 13 95 60c p amp p Try to manoeuvre your space ship through the meteor storms then land it carefully at the space port without running out of fuel or crashing Complete with realistic graphics STARFIRE AND NOVA INVASION L2 16K Cassette 10 95 Disk 15 95 60c p amp p Both programs include sound to improve their realism STARFIRE seats you in the cockpit of an X wing fighter as you engage in battle with the deadly Darth Vader s Tie fighters Beware of the evil one himself and may the Force be with you In NOVA INVASION you must protect your home planet of Hiberna from the invading NOVADIANS You have two fixed gu
56. UTINE IN A DIFFERENT MEMORY LOCATION 30 CLS PRINT 448 THIS ROUTINE ACCEPTS INPUT FROM THE JOYSTICK D EVELOPED BY THE ADELAIDE USERS GROUP IT REMAINS IN M L UNTIL SHIFT UP ARROW ISPRESSED CLEAR KEY WILL CLS L KEY WILL DRAW A LINE DISABLE RESET D KEY WILL DRAW A DOT ENABLE RESET 40 FORT 32512T032615 READD POKEI D NEXT 50 205 127 10 125 50 100 127 205 91 3 254 27 32 6 42 101 127 195 154 10 254 31 204 201 1 33 100 127 254 76 32 2 54 90 254 68 32 2 54 100 219 1 6 255 4 214 5 48 251 120 254 47 56 2 62 47 11 1 219 0 203 63 103 34 101 127 68 125 60 DATA229 38 128 205 75 127 24 8 229 197 33 140 24 195 80 1 225 58 100 127 254 100 32 0 RESET UNLESS 100 IS PASSED CHANGE THIS LAST DATA ITEM NOW 32 TO 40 HOWEVER THIS WILL ALSO REVE RSE D AND L SO D L AND L D 70 DATA172 68 125 38 1 205 75 127 24 163 0 CHANGE ROUTINE SO IT DOES ONLY ONE LOOP CHANGE FIRST DATA ITEM IN THIS LINE TO 1 79 NOW 172 AND LAST ONE IN THIS LINE TO 170 NOW 163 CAN STI LL USE VALUE OF 100 TO SPECIFY A LINE OR DOT 80 DATA0 0 0 0 90 PRINT 24 d 100 00 110 INPUT INPUT 100 FOR DOT ONLY A 120 X USR A 130 0970 COORD 256 COORD XAND255 140 GOTO90 I hope that these simple demonstration programs will convince you that the unit is very easy to program and use If anybody develops a good program using this board send it to MICRO 80 for their evaluation you may even work o
57. What if they reduced their off peak rates way way down put some useful BASIC programs on their computers and sold off peak time to personal computer users most of whom were working for their employees in peak times anyway Thus was born Micronet Others were quick to follow Electronic mail systems and bulletin boards abound These are systems whereby computer owners across the country communicate with each other via the telephone lines and leave messages on disks driven from the host computer Some more enterprising souls amongst the Australian microcomputing fraternity have joined their American colleagues by using the MIDAS link provided by the Overseas Telecommunication Company OTC Unfortunately this can be very expensive indeed possibly costing as much as 50 60 per hour depending upon the amount of data transferred through the link Help is at hand however An Australian microcomputer network has now been announced called the AUSTRALIAN SOURCE no doubt after one of the most successful similar U S organisations the SOURCE but we understand there is no direct relationship between the two The AUSTRALIAN SOURCE will commence operations in Melbourne early in 1982 Thereafter it will become available in Sydney about 30 days later then Brisbane Perth and Adelaide in that order so that by about the middle of 1982 users in all major capital cities will be able to link up with the AUSTRALIAN SOURCE via a local telephone call There is
58. Z 4O0 OR IZ 81 THEN GOSUB 2490 1940 NEXT IZ GOTO 1700 1950 AS 2AZ O21 2 CLS NZ N4Z4 1 GOSUR 1610 60508 1490 GOTO 260 1960 CLS Z sPRINT MAKE PRINTER READY 1970 PRINT PRINT ELSE ENTER 7 TO ABORT ssINPUT Z 1980 IF Z lt gt THEN GOTO 1700 1990 FOR IZ 1 TO 2000 IF IZ 59 THEN GOSUB 2490 2010 LPRINTCHR 27 s CHR 66 CHRS 27 s CHRS 54 50 ASCIZ IF A C IZ THEN LPRINT 2020 NEXT 1 GOTO 1700 2020 CLS L ziVyZ z IF VAS N THEN VZ 1 ELSE VZ NX Z 2040 CLS FOR IZ VZ TO 17 1610 GOSUR 14 90 TO REVIEW 12 STRING GOTO 540 2050 REM RECORD 2060 CLS 2070 FOR TO 90 2080 IF AS IZ THEN GOTO 2090 ELSE NZ IZ 2090 NEXT I PRINT THERE ARE LINES PRINT 2100 Z PRINT MA KE TAPE RECORDER READY FOR RECORDING 2110 PRINT FRINT ELSE ENTER 7A 3 TO ABORT s INFUT Z 2120 IF 7 lt gt THEN GOTO 1700 2120 CLS PRINTTAB 150 THE TAPE RECORDER IS RUNNING PRINTz PRINT IT WILL PAUSE HOWEVER WHILE IT CONVERTS COMMAS AND COLONS TO GRAPHIC CHARACTERS 2140 PRINT 1 N 2150 FOR IZ 1 TO NZ 2160 FOR JZ 1 TO LEN A CIZ 2170 K MID 0 0IX J77 1 2180 IF K THEN 168 2210 2190 IF K THEN 162 60 0 2210 2200 KKS EKS ES 2210 NEXT JX 0 0IZ KK KK 2220 NEXT IZ 2220 FOR IZ 1TO STEP Z 2240 PRINT H 1 A
59. age programs on a diskette together with manual which thoroughly test your disk drives and memory There are 19 possible error messages in the disk drive test and their likely causes are explained in the manual Each pass of the memory tests checks every address in RAM 520 times including the space normally occupied by the diagnostic program itself When an error occurs the address expected data and actual data are printed out together with a detailed error analysis showing the failing bit or bits the corres ponding 5 and their location This is the most thorough test routine available for TRS 80 disk users BOOKS LEVEL II ROM REFERENCE MANUAL 24 95 1 20 p amp p Over 70 pages packed full of useful information and sample programs Applies to both TRS 80 andSYSTEM 80 TRS 80 DISK AND OTHER MYSTERIES 24 95 1 20 p amp p The hottest selling TRS 80 book in the U S A Disk file structures revealed DOS s compared and explained how to recover lost files how to rebuild crashed directories this is a must for the serious Disk user and is a perfect companion to any of the NEWDOS s LEARNING LEVEL II 16 95 1 20 p amp p Written by Daniel Lien the author of the TRS 80 Level Handbook this book teaches you step by step how to get the most from your Level 11 machine Invaluable supplement to either the TRS 80 Level II Manual or the System 80 Manuals write to drive in single density wh time it reads writes to dri
60. ance to next line input To call up MENU Shift and ESC keys are depressed This then allows selection of the following 1 PRINT DRAFT DOCUMENT Line 1920 in the program has been written for an Okidata Microline 8 printer and selects 16 5 characters inch 105 characters to a line and 4 lines per inch This spacing plus the printing of the line numbers allows easy corrections and additions to be made Forty lines are printed on A4 paper before printing stops and a prompt is given to insert more paper 2 PRINT COMPLETED TEXT Again line 2719 sets the Microline 8f for 1 characters inch 64 characters to a line and 6 lines per inch This gives clean clear final copy When printing in this style prompt for new paper comes after 59 lines Text will be lost if all pages are not printed for other printers both these program lines will need changing RECORD TO TAPE LOAD FROM TAPE 4 C9 Upon selecting these facilities data is packed into groups of three lines commas and colons changed to graphic characters so as not to change formatting and recording and loading shown on the screen Two dumps are recommended to allow for tape faults 5 REVIEW DATA Line by line review is carried out by pressing ENTER for each line pressing any other key will return the MENU 6 CHANGE DATA A request for the line to be altered is given Upon entry of this number the selection of whole line or individual word change is made Selecting W
61. arge data array to find all three particulars of an atom Once it finds them it prints those which are required by the user When it completes one question display it searches its data for the required element during which time the user has to try to think of the element If the user wants only to find the data there will be a short wait before the answer is displayed 20 DIMD 512 ZO ELEMENT TABLES 40 CLS PRINT 224 THE ELEMENTS z PRINT389 MAIN INDEX PRINT2192 YOU MAY CHOOSE ANY OF THE FOLLOWINGz PRINT3ZZO A TO ORTAI AN ELEMENT S ATOMIC NO PRINT3z94 B TO OBTAIN AN ELEMENT S SYMBOL PRINT9458 C TO OBTAIN AN ATOMIC NO S ELEMENT 50 PRINT3522 D TO OBTAIN AN ATOMIC NO S SYMBOL 586 E TO OBTAIN A SYMBOL S ATOMIC NO PRINT3650 F TO OBTAIN SYMBOL S ELEMENT PRINT 3714 G FOR A LIST OF ALL RELEVANT DATA ASS CIATED WITH ELEMENT 60 AS INKEYS IFA THENG6OELSEIFA A THEN140ELSEIFA B THEN OE LSEIFAS C THEN7OEL SE IFAS D 1 90ELSEIFAS E THEN21 OELSEIFA F THEN260EL SE IFAS G6 THENS10ELSE60 70 CLS PRINT9462 PLEASE ENTER ATOMIC NO INPUTA GOSUB600 FORN 1TOA 2 2 READDS NEXT CLS PRINT 2464 THE ELEMENT FOR A IS D PR INT 979 HIT ANY KEY TO CONTINUE RESTORE IFINKEY THENBOELSEZO 90 CLS PRINT2466 PLEASE ENTER ELEMENT INPUTF GOSUR600 FORN 1 TOZ12 READDS IFD N F THEN1 20EL SENEXT 100 GOSUR160 110 GOTO9O 120
62. ba OE ll Pick er Ig vo se UI CI Il oe si CH ll x cI ll s 0 cy os c W ci 0 ES x sa ba C Da Qu UU CO nd Uc Z B W gt et LL c pi e s s S Qv ut Cor C I st XE P O3 c d T4 QD C4 CLOSE CE CE USE DSL DSL DSL bo st st ost T m eel eet el eel eel rel eel rel mel rel rel et rel ret wel wel mel ret c Pen s Cr oo e eMe o 90 ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 34 1480 PRINT D 1490 PRINT D 1500 RETURN 1510 FORI 1 TO 1000 NEXT I 320 PRINT 2896 DO YOU WANT INSTRUCTIONS YES OR 0 INPUT ANS 1520 IF ANS lt gt Y AND ANS lt gt YES THEN RETURN 1540 CLS S50 PRINT323 INSTRUCTIONS 1560 7 PRINT 1570 PRINT THERE ARE THREE PEGS ON ONE OF THESE IS ARRANGE iis 1580 PRINT IN ORDER OF DECREASING SIZE A NUMBER OF DISCS PRIN 1590 PRINT THE OBJECT 15 TO MOVE ALL THE DISCS FROM THE LEFT MOST 1600 PRINT PEG i TO THE RIGHTMOST PEG 53 SUBJECT TO THE FOLL OWING 1610 PRINT CONSTRAINTS PRINT 1620 PRINT t1 ONLY ONE DISC MAY BE MOVED A TIME 1630 PRINT 2 DISC MAY NOT BE PLACED ON TOP OF DISC WHIC H 1640 PRINT IS SMALLER 1650 GOSUB 2000 1660 PRINTS22 PLAYING HANOI 1670 PRINT387 PRINT 1680 PRINT THERE ARE TWO MODES OF PLAY THE
63. buy better and we pass the savings on to you These are our proven prime branded 200 ns yes 200 nanosecond chips You will pay much more elsewhere for slow 350 ns chips Ours are guaranteed for 12 months A pair of DIP shunts is also required to upgrade the CPU memory in the TRS 80 these cost an additional 4 00 All kits come complete with full step by step instructions which include labelled photographs No soldering is required You do not have to be an experienced electronic technician to instal them DISK DRIVE CABLES SUITABLE FOR ANY DISK DRIVES DC 2 2 Drive Connector Cable 39 incl p amp p DC 4 4 Drive Connector Cable 49 incl p amp p DOUBLE THE SPEED AND CAPACITY OF YOUR DISK DRIVES PERCOM DOUBLER ONLY 220 plus 2 00 p amp p Installing a Doubler is like buying another set of disk drives only much cheaper The doubler works with most modern disk drives including MPI Micropolis Pertec TEAC as supplied by Tandy The doubler installs in the TRS 80 expansion interface the System 80 expansion interface and the LNW Research expan sion interface in a few minutes without any soldering cutting of tracks etc It comes complete with its own TRSDOS compatible double density operating system LE ZAP 11 DOUBLE DENSITY PATCH FOR NEWDOS 80 53 00 plus 1 00 p amp p at the same FLOPPY DOCTOR AND MEMORY DIAGNOSTIC by MICRO CLINIC 29 95 plus 50c p amp p Two machine langu
64. c Please use the form in this issue to order your copy or subscription The purpose of MICRO 80 is to publish software and other information to help you get the most from your TRS 80 System 80 or Video Genie and their peripherals MICRO 80 is in no way connected with either the Tandy or Dick Smith organisations WE WILL PAY YOU TO PUBLISH YOUR PROGRAMS Most of the information we publish is provided by our readers to whom we pay royalties An application form containing full details of how you can use your TRS 80 or System 80 to earn some extra income is included in every issue CONTENT Each month we publish at least one applications program in Level I BASIC in Level II BASIC and one in DISK BASIC or disk compatible Level II We also publish Utility programs in Level II BASIC and Machine Language At least every second issue has an article on hardware modifications or a constructional article for a useful peripheral In addition we run articles on programming techniques both in Assembly Language and BASIC and we print letters to the Editor and new product reviews COPYRIGHT All the material published in this magazine is under copyright That means that you must not copy it except for your own use This applies to photoccpying the magazine itself or making copies of programs on tape or disk LIABILITY The programs and other articles in MICRO 80 are published in good faith we do our utmost to ensur
65. cient technique that an entire sorting algorithm known as the merge sort is based on merging principles We shall leave the bubble sort algorithm here and consider some other sorting techniques of varying efficiencies Last month I finished off by saying that the next article will consider techniques of sorting by insertion However this will be postponed and instead another simple sorting routine will be presented this time involving a technique of sorting by selection This algorithm involves a search of elements in an array to locate the one with the smallest value or key When found it is exchanged with the first element in the array This places the element with the smallest key in the first position in the array This process is repeated for the remaining elements to select what will become the second smallest value which is inter changed with the second element in the array The process of searching for the element with the next smallest value and placing it in its proper position by exchanging elements continues until all elements have been sorted This is known s the selection sort the program for which appears below 2110 REM N NO OF ELEMENTS TO BE SORTED 2120 REM MIN MINIMUM FOUND SO FAR 2150 REM P POINTER TO MIN 2140 REM I PASS COUNTER 2150 REM T TEMPORARY VARIABLE USED FOR EXCHANGING 2160 REM 2170 IF N lt 2 THEN 2250 2180 FOR I 1 TO N 1 2190 MIN A T MINIMUM BEFORE SEARCH 2200 FOR 1
66. d secondly at every input it altered the location of the X s and O s around the board Very confusing So I developed this game which is fast and thinks its next move Remember it will win first before blocking your move It should keep you on your toes The computer always plays the noughts and the human opponent the X s Lines 6 11 draw the grid and number the squares Lines 13 250 allow the human player to choose the position for his next X checks input for validity then places the X in a valid position Lines 269 274 redraw previous positions of X and 0 after every new input Lines 280 295 computer s move Lines 399 418 test for the presence of a winning combination Lines 580 622 test for two X s in a line so that computer may block them Lines 625 check if there are two 0 5 on any line and places a third to give victory to the computer REM TIC TAC TOE FOR LEVEL 1 16K RAM USERS x REM BY B SMITH 7 INNES ST ALBANY WA x CLS P A 463 DO YOU WANT TO GO FIRST YES OR NO s I M O B 0 C O D 0 E 0 F 0 G 0 0 I 0 Q 0 L 0 2 0 CLS P A 27 TIC 84 1 95 2 102 5 276 4 285 5 294 4 468 7 477 486 9 X 56 F Y 37TO28 S X Y Y X 73 F Y 3TO28 S X YO zN Y 10 Y 211 F X 40TO089 8 X YO N X 11 20 40 089 65 X Y sN X 12 IFM NT 280 15 P 4 704 YOUR MOVE X WHICH NO
67. e that they function as described However no liability can be accepted for the failure of any program or other article to function satisfactorily or for any consequential damages arising from their use for any purpose whatsoever ISSUE 24 NOVEMBER 1981 kkkkk EDITORIAL MICRO 80 CONTENTS x JOYSTICKS AND INPUT OUTPUT PORTS FOR YOUR 80 PART 4 THE THEORY AND TECHNIQUES OF SORTING PART 2 SOFTWARE SECTION MULTIPLE REGRESSION ANALYSIS ATOMIC TABLES TEXT TYPER THE TOWERS OF HANOI MICRO 80 PRODUCTS NEXT MONTH S ISSUE CASSETTE DISK EDITION INDEX ORDER FORM MICRO 80 is registered by Australia Post Publication SQB 2207 Category B AUSTRALIAN OFFICE AND EDITOR MICRO 80 P O BOX 213 GOODWOOD SOUTH AUSTRALIA 5034 TEL 08 211 7244 U K SUBSCRIPTION DEPT 24 WOODHILL PARK PEMBURY TUNBRIDGE WELLS KENT TN2 4NM Printed by Shovel amp Bull Printers 312A Unley Road HYDE PARK S A 5061 Published in Australia by MICRO 80 433 Morphett Street ADELAIDE C c cc cC DC C SPECIAL OFFER TO NEW READERS AND READERS RENEWING THEIR SUBSCRIPTION SOFTWARE LIBRARY VALUED AT OVER 100 FREE Eu 22 2 MICRO 80 has developed new Library of Software consisting of 7 programs and a comprehensive user manual Software Library on cassette will be sent FREE
68. echnique known as MERGING substrings of sorted data along with the bubble sort Sorting often involves a trade off between several resources say memory and time Some sorting algorithms are fast but at the expense of using a large portion of memory in the process depending on the application Here we shall consider a trade off between actual sorting time and time spent merging sorted substrings subsets Input Rm a Y 1 Extract b Output Merging LI Designations change after every merge phase Figure 1 Merging extracted subsets of the input array Figure 1 explains the workings of the algorithm We have the input array from which a subset of numbers of selected quantity is extracted serially and placed in the sort area where the bubble sort processes them to produce a sorted list This list is then merged with either array B or array C depending on which one has been designated the array to be merged Array B and C alternate in this designation i e if B was the array to be merged in the last merge phase then C will be merged with the sort area in this merge phase The output of each merge phase is put into either B or C array depending on which was used as output in the last merge phase B and C also alternate in this function So in the first merge phase a subset is extracted from the input array and sorted then merged with arra
69. ely small cost a system that has the level of storage power and access to data banks for which only a few years ago government departments and large private users were paying millions of dollars The AUSTRALIAN SOURCE can be accessed through a number of approved personal computers and terminals by use of an accoustic coupler or modem Users wil receive a number of benefits which wilt include INFORMATION SERVICES Members will have access toa number of information sources which will include the latest news sports results financial reports and farm information NATIONWIDE ELECTRONIC MAIL Members will be able also to communicate nationwide with other AUSTRALIAN SOURCE members through our electronic mail system THE AUSTRALIAN SOURCE RECOMMENDS 3M DISKETTES SOFTWARE BANK Users will have access to a myriad of computer programs that will include entertainment educational aids and diagnostic tools and financia applications MAINFRAME POWER Users will have the capability to make use of the Mainframe s huge storage capacity by using any of our large programs or storing your large programs on our system SHOP AT HOME You can take advantage of our shopping by computer system to get the best prices on a number of popular consumer items EXTREMELY EASY TO USE You do not have to be a computer ogrammer to make use of the AUSTRALIAN SOURCE All of the instructions are in everyday Engl
70. esigned the TRS 80 expansion interface they did not include a data separator in the disk controller circuitry despite the manufacturer s recommendations to do so The result is that many disk drive owners suffer a lot of Disk 1 0 errors The answer is a data separator This unit fits inside your expansion interface It is supplied with full instructions and is a must for the serious disk user PAGE 17 MPI DISK DRIVES HIGHER PERFORMANCE LOWER PRICE MPI is the second largest manufacturer of disk drives in the world MPI drives use the same form of head control as 8 drives and consequently they have the fastest track to track access time available 5msec MPI drives are capable of single or double density operation Double density operation requires the instal lation of a PERCOM doubler board in the expansion interface As well as single head drives MPI also makes dual head drives A dual head drive is almost as versatile as two single head drives but is much cheaper Our MPI drives are supplied bare or in a metal cabinet set up to operate with your TRS 80 or SYSTEM 80 All drives are sold with a 90 day warranty and service is available through MICRO 80 PRODUCTS MPI B51 40 Track Single Head Drive only 349 MPI B52 40 Track Double Head Drive only 449 Prices are for bare drives and include p amp p Add 10 00 per drive for a cabinet and 60 00 for a power supply to suit two drives 40 track
71. explicitly set up and manipulated in BASIC the algorithm tends to become somewhat obscured Also if it is the first time you have encountered recursion BASIC is not the ideal language to learn about it For those of you who are interested in finding out more the tree diagram for the algorithm used in this program is given in the book An Introduction to Problem Solving Using Pascal by Kenneth Bowles ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 3 40 CLEAR 95 50 CLS GOSUR 1420 GOSUB 1510 10 60 DIM N 3 P1 MAX P2 MAX PX MAX SK 10XMAX 70 SC 1 AL 2 5 1 99 P2 0 299 P3 01 299 80 0 0 1 0 0 0 CLS 90 INPUT HOW MANY DISCS WOULD YOU LIKE sCT 100 IF gt PRINT THAT WILL TAKE SOME TIME AND FIRST YOU WILL HAVE TO CHANGE LINE 50 110 IF CT lt 0 PRINT SORRY THAT S NOT POSSIBLE GOTO 90 120 IF CT lt 2 PRINT YOU HAVE NO SENSE OF ADVENTURE BUT I SUPPOS E YOU HAVE TO START SOMEWHERE 150 N 1 CT 2N 2 0 N 3 0 140 IF ANS YES OR AN NO THEN PRINT TYPE 7A IF YOU WANT TO DO ALL THE WORK I E AUTOMATIC OPERATION OTHERWISE TYPE FOR MANUAL OPERATION PRINT UWHICH WOULD YOU LIKE 150 INPUT AUTOMATIC OR MANUAL A OR MODES 160 IF MODES lt gt A GOTO 280 170 INPUT HOW FAST IS FASTEST 10 IS SLOWEST sS 180 CLS GOSUB11640 190 GOSUBS40 SP 4 200 SK SP 2 CT SK SP 2 SC SKK SP 1 DNs SK SP AL 210 R SP SP SP 4 220 SK SP 2 SK
72. from your SYSTEM 80 or an LNW Research expansion interface or any other desirable peripherals designed to interface to the TRS 80 expan sion port Make your SYSTEM 80 hardware compatible with the TRS 80 via SYSPAND 80 PROGRAMS BY MICROSOFT EDITOR ASSEMBLER PLUS L2 16K 37 50 1 20 p amp p A much improved editor assembler and debug monitor for L2 16K TRS 80 or SYSTEM 80 Assembles directly into memoty supports macros and conditional assem bly includes new commands substitute move copy and extend LEVEL III BASIC 59 95 plus 1 20 p amp p Loads on top of Level BASIC and gives advanced graphics automatic renumbering single stroke instruc tions shift key entries keyboard debounce suitable for L2 16K and up Not Disk BASIC ADVENTURE ON DISK 35 95 plus 1 20 p amp p This is the original ADVENTURE game adapted for the TRS 80 The game fills an entire diskette Endless variety and challenge as you seek to rise to the level of Grand Master Until you gain skill there are whole areas of the cave that you cannot enter Requires 32K One Disk BASIC COMPILER 208 plus 2 00 p amp p New improved version the Basic Compiler converts Disk BASIC programs to machine code automatically A compiled program runs on average 3 10 times faster than the original BASIC program and is much more UPGRADE TO 16K FOR ONLY 30 00 MICRO 80 s 16K MEMORY EXPANSION KIT HAS BEEN REDUCED IN PRICE EVEN MORE Larger volume means we
73. git then that digit must begin another line reference e g GOSUB 10 20 DELETE 2 49 A digit should not follow a colon 3 The tokens in Note 1 above occur only as such hence the program must not contain graphic characters in string constants or REM s Actually Note 1 is not quite true this is why statements in the form DELETE 29 or IF X 29 are overlooked The mode of operation of each section of the EDTASM source code is explained below PROCESS LINE POINTERS AND LINE NUMBER This returns to BASIC at the end of the program I find 66H to be better than 6CCH since the former repairs the stack If the end is not yet reached then it places the line being processed in the pointers in case an error message is to be generated SEEK TOKENS IN LINE This looks at each byte in a line going to the section above if the EOL token is encountered or to the section below if one of the tokens in Note 1 above is encountered SEEK LINE REF AFTER TOKEN This returns to the previous section if a token or comma or dash as per 2 above 15 not followed by a digit VALIDATE LINE REFS This uses ROM routines to convert the line ref from ASCII to hex and then to check that it GU If not u FC ERROR is generated since I don t know the entry point for UL ERROR it is 1 09 1 00110 BASIC LINE REFERENCE VALIDATION ROUTINE 00120 SHILLITO DECEMBER 1980 00130
74. i FE 800 Los E d i 24 OuZ 8 9 e o lt 5 i d o a pong x 1 2 E gt g c c lt x 8 09 c so 6 D D 8 8 o os 2 3 5 5 3 79 HRS a a 2 2 28 EN a OS Ba uu mu CURVILINEAR REGRESSION AND POLYNOMINAL REGRESSION LII 4K These are the last two programs the current series of scientific programs Curvilinear regression is used to compute the curvilinear relationship between two sets of data and Polynominal regression uses mathematical model series which becomes increasingly complex with the addition of further degrees of Polynomiality 3 D MAZE LII 16K This excellent program displays maze on your screen as viewed from inside You can turn or move by pressing a single key As you move so the view is changed Each time you move it costs you points The object is to get out of the maze with as many points as possible You can even call up a map of the maze that shows your current position in relation to the exit but it costs you a LOT of points to do that Each time you run the program you get a different maze Postcode x x CHECK LIST System etc The use of REM statements with your name and address is suggested in case the program becomes separated from the accompanying literature Ensure that you supply adequate ins
75. ised time gives this printer a much higher throughput rate than many other printers quoting print speeds of 120 c p s or even higher GREEN SCREEN SIMULATOR 9 50 incl p amp p The GREEN SCREEN SIMULATOR is made from a deep green perspex cut to fit your monitor It improves contrast and is much more restful to the eyes than the normal grey and white image All editorial staff of MICRO 80 are now using GREEN SCREEN SIMULATORS on their own monitors Please make sure to specify whether you have an old squarish or new rounded style monitor when order ing Not available for Dick Smith monitors ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 21 00240 SEEK TOKENS IN LINE 4056 D7 00250 NEXCHR RST 10H BYTE SET FLAGS 4057 FEOO 00260 KEEPON CP REACHED 4059 81E 00270 JR Z NEXT NEXT LINE IF EOL 405R ER 00280 EX DE HL 3 SAVE HL 405C 217C40 00290 LD HL TOKENS HL TOKENS ORG 405F 010700 00200 LD BC 7 BC NO OF TOKENS 4062 EDR1 002710 CPIR 5 Z IF A IS TOKEN 4064 ER 00220 DE HL s RESTORE HL 4065 20EF 00320 JR NZ NEXCHR KEEP SEEKING TOKENS 00240 SEEK LINE REF AFTER TOKEN 4067 D7 00250 FOUND RST 10H s A NEXBYT SGET C IF NUMRIC 4068 Z0ED 00260 JR NC KEEPON MORE LINE REFS 00270 VALIDATE LINE REFS 406A CD5A1E 00280 CALL 1ESAH 3 DE LINE NO HL DELIMTR 406D ES 00290 PUSH HL SAVE HL 406E CD2CiB 00400 CALL 1B2CH SET C IF LINE EXISTS 4071 E1 00410 POP HL RESTORE
76. ish SO that even the younger members of your family will be able to operate the system LOW COST While services like these used to cost tens of thousands of dollars fo the government departments and large corporations who used them they are now available to you for fess than the cost of a packet of cigarettes a day for the average user You can join the AUSTRALIAN SOURCE by paying a one time joining fee normally 100 and a small hourly user charge normally 70 an hour 8 a m 6 p m 4 50 an hour 6 p m 8 a m DEALER INQUIRIES INVITED WE ARE PROUD TO ANNOUNCE THE LAUNCHING OF AUSTRALIAS FIRST MICROCOMPUTER INFORMATION UTILITY SPECIAL CHARTER MEMBER OFFER As a special promotion the joining fee before the 1st February 7982 is only 60 and this also entitles you to 20 amp off all list user charges in the future a great deal for the money TO JOIN THE AUSTRALIAN SOURCE FAMILY AND TAKE ADVANTAGE OF THE EXCITING SERVICES WE WILL BE OFFERING PLEASE COMPLETE THE COUPON BELOW MEMBERSHIP REQUEST Yes think the idea of the AUSTRALIAN SOURCE is great enclose 60 so plaase send me my user manual and password a have a computer Brand MORI xu est Please send inlormation low cost eQuipment packages can use to take advantage the AUSTRALIAN SOURCE S services
77. mputed for entered values of Xl and X2 The routine will accept up to 100 data sets which are verified and can be edited following entry 20 CLS DEFINTI N DIMX 3 100 A 4 2 R 4 Z z PES SE HHHH 18 MULTIPLE REGRESSION ANALYSIS PRINTTAB 18 STRINGS 28 45 40 PRINT PRINT PRINT PRINTTAB 29 MODEL PRINT PRINTTAB 25 A BX1 CX2 50 PRINT9977 TYPE ENTER TO CONTINUE 3 INPUTI 60 CLS PRINTTAB 27 ENTER DATA PRINT PRINT PRINTTAB 12 NUMBER OF DATA POINTS MAXIMUM IS 100 70 PRINTTAB 28 X INPUTND IFND lt 20RND gt 100 PRINTCHR 27 CHR Z0 CHR 29 s CHR 27 GOTO7O PRINT PRINT F RI 1TOND PRINT X1 313 s INPUTX 1 1 22 CHR 27 X2 3 I3 32INPUTX 2 1 PRINTTAB 44 CHR 27 Y 5 I5 s2INPUTX 3 1 90 CLS K 0 PRINTTAB 26 DATA ENTERED PRINT FORI 1TOND K K 1 PRINT X1 5 I5 1 1 22 2 1 2 1 44 Y 5 Ig sX 3 1 2 IFK lt 1ONEXTI ELSEPRINT9977 ENTER TO CONTINUE INPUTI K 0 CLS NEXTI 100 PRINT 983 EDIT DATA Y ND ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 22 110 IFI THEN1 1OELSEIFI Y THEN1 20EL SEIFI N THEN 1 40ELSE110 120 CLS INPUT DATA POINT TO BE EDITED I IF I gt NDTHEN120ELSEPRINTTAB 4 X1 I sXC1 1 3 24 X2C 5 I5 sX 2 1 3 TAB 44 Y C I5 X 03 1 120
78. ms from inventory List complete file Search for any stock number Save data to cassette or wafer Load data from cassette or wafer Adjusts stock levels from sales results and receipt of goods List all items requiring reordering We can thoroughly recommend this program for the small business with a L2 16K computer SCOTCH BRAND COMPUTING CASSETTES Super quality personal computing cassettes C 10 pack of 10 26 00 incl p amp p C 30 pack of 10 28 00 incl p amp p UTILITIES S KEY hy Edwin Paay 15 95 plus 50 p amp p S KEY is a complete keyboard driver routine for the TRS 80 and becomes part of the Level basic inter preter With S KEY loaded the user will have many new features not available with the standard machine S KEY features S KEY provides auto repeat for all the keys the keyboard If any key is held down longer than about half a second the key will repeat until it is released Graphic symbols can be typed direct from the key board this includes all 64 graphic symbols available from the TRS 80 SYSTEM 80 S KEY allows text BASIC commands and or graphics to be defined to shifted keys This makes programming much easier as whole commands and statements can be recalled by typing shift and a letter key Because S KEY allows graphics to be typed directly from the keyboard animation and fast graphics are easily
79. ng the purchase replacement of a computer and we will do our part in keeping you informed This issue marks the completion of two years of publication for MICRO 80 The next 12 months promise to be even more exciting microcomputing than the past intend to rise to the challenge in a number of ways We will expand our coverage of the familiar computers and in particular will give increased support to the Model III Not only will the magazine carry a lot of hitherto unpublished information about the internals of the Model III but Eddy Paay is putting the finishing touches to his Model III ROM Reference Manual and a great Debug utility program for the Model III Many more of our readers now operate disk systems so we will include much more information and programs for disk users Then there are the colour computers It is our intention to support the TRS 80 Colour Computer at least This will not be done at the expense of the space given to the TRS 80 Models I and III and the System 80 rather we will increase the size of the magazine to accommodate the extra material NEW PROGRAM LIBRARY AVAILABLE FREE TO MICRO 80 SUBSCRIBERS We have developed a new program library of excellent quality and worth over 100 at retail value The seven new programs on cassette or disk together with a comprehensive and informative manual will be sent free of charge to all new subscribers and to those who renew their subscription from Issue 25 December 198
80. ns at each side of the screen and a moveable one at the bottom Apart from shooting down as many invaders as possible you must protect your precious hoard of Vitaminium or perish AIR ATTACK AND NAG RACE L2 16K Cassette 10 95 Disk 15 95 60c p amp p An unlikely combination of programs but they share the same author who has a keen sense of humour AIR ATTACK includes sound and realistic graphics The air craft even have rotating propellors But they also drop bombs on you so it s kill or be killed NAG RACE lets you pander to your gambling instinct without actually losing real money Up to five punters can join in the fun Each race results in a photo finish whilst there is a visible race commentary at the bottom of the screen throughout the race Happy punting FOUR LETTER MASTERMIND L2 16K Cassette 8 95 Disk 13 95 60c p amp p There are 550 four letter words from which the computer can make its choice You have 12 chances to enter the correct word After each try the computer informs you of the number of correct letters and those in the correct position You can peek at the list of possible words but it will cost you points Makes learning to spell fun MUSIC IV L2 16K Cassette 8 95 Disk 13 95 60c p amp p Music IV is a music compiler for your 80 It allows you to compose or reproduce music with your computer that will surprise you with its range and quality You have control over duration full beat to 1 16 beat
81. ord Change gives the selected ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 26 line again which is disassembled and repeated The following keys allow corrections and insertions If any change causes the line to exceed 64 characters the line is printed ending in a sign indicating lost words These words must be added on an inserted line TAB presents each word for inspection BACK SPACE removes the previous word from screen CTRL deletes the last word displayed ESC presents a small block character and allows insertion of a new word During word insertion Shift G will insert a space SPACE BAR fixes the new word into the line and allows further word inspection allows escape from the line being changed rejustification taking place if necessary ADD TO DOCUMENT This presents the last three lines of the previously entered text and allows further line entry INSERT NEW LINE The prompt asks for the line number to be inserted This will be the line number after the desired insert If correct placement is shown type in new line and program returns to MENU DELETE A LINE The selected line is displayed and is deleted by pressing ENTER Line numbering is moved up one for all lines higher than the deletion therefore when more than one deletion is required the highest number should be removed first The program is error trapped to return to MENU If the program is lost however GOTO 1700 will usually allow recover
82. played on reading and recording tape Print draft document with line numbers Print finished text Prints on M sheet or roll paper La program was developed on a System 80 TRS 80 users should use the arrow keys as shown elow CTRU gt BACKSPACE This program processes text line by line with a maximum input at one time of 9f lines Each line consists of 62 characters indicated by a staff on the screen Upon RUNning the program selection of an indentation position is made and indicated on staff After selection of justification or non justification entry can proceed If right hand justification is selected any line of characters finishing within 7 spaces of the end of the staff will be justified Upon ENTERing the line a string of 5 will indicate the extra spaces being inserted to bring about justification If the relationship between two or more words is to be maintained then CTRL must be used instead of the SPACE BAR when inserting a space between these words Even with a line of 62 characters there are 3 spaces of justi fication this is important for later word correction If change of indentation is required for sub paragraphing or tabulation call up MENU and enter Indent for Choice This also allows change to and from line justification To centre text for headlines etc type material at beginning of staff and press ESC instead of ENTER This will centre text and adv
83. pplied with NEWDOS or NEWDOS 80 version 1 0 to run them APPROX START POSITION TYPE I D DISK FILESPEC CTR 41 CTR 80 5 5 80 SIDE ONE MULTIPLE REGRESSION LII 4K M MULTREG BAS 15 10 10 50 34 36 ATOMIC TABLES LII 16K A ATOMIC BAS 85 57 60 1 28 86 90 TEXT TYPER LII 16K T TEXTYPER BAS 170 114 120 ia 237 160 168 TOWERS OF HANOI LII 16K B TOWERS BAS 300 202 212 SIDE TWO TOWERS OF HANOI LII 16K B TOWERS BAS 15 10 10 ATTACK LII 16K ATTACK BAS 70 47 50 1 08 73 77 BASIC LINE VALIDATOR EDTASM VALID VALID EDT 145 98 103 162 109 115 SYSTEM VALID CMD 177 119 125 5 180 122 128 TIC TAC TOE LI 16K TICKTACTO LVI 185 125 248 167 gt z gt a 8 E 2 iE zz ii T E E D o m D B 9 Sa 21 e y ERE S i 4 a wh H o i e o As Bs D WE gt om 0 r Tos nN m 2 Of o o 2 O 2 2 2 w Q m E IC 83 3 m E TRU jo 0 25 d vO SEO sg eg 28m 2 2c 5 X om B du 3 z 89 58 8 T als Q dis o 3 3 g T A 2 S a cuo 8 9 Uz e 5 5 3 4924 9 20 2 2 529 x g B2 5 0 oo ro 2am 668 3 gt lt 2 gt 3 Q o 5 dos Tdo 5 9 6 3 Rg EE gt 5 8 2 T A SPECIAL OFF
84. rogram simply inputs the digital value of the voltage at the joystick moving arms This is then processed to conform to the constraints of the level 2 X Y maximums of 127 47 respectively The graphic point location is then SET and RESET to flash the position of the joystick controlled graphic point The 8 bit values of the two inputs are also displayed in decimal at the bottom left corner of the screen The next program accessed by RUN 129 is similar but does not RESET and hence draws a continuous line as the joystick is moved The third joystick program RUN 200 combines the actions of both of the preceding programs You can draw lines with the addition that if the space bar is pressed the spot can be moved while flashing but not drawing to a different location ready to start drawing again This one is a good one for young kids to play with 5 THIS PROGRAM MOVES A SPOT AROUND THE SCREEN LINE 10 CLEARS THE SCREEN LINE 20 INTEGERS ARE FASTER LINE 30 FETCHES JOYSTICKS DIGITAL VALUE F 6 REM LINE 40 TURNS OFF THE GRAPHIC POINT LINE 50 LIMITS X TO 127 LINE 60 LIMITS Y TO 47 LINE 70 TURNS ON GRAPHIC POINT LINE 80 PRINTS JOYSTICK DIGITAL VALUE LINE 90 LOOPS BACK TO FETCH NEW VALUES 10 CLS 20 DEFINT A Z A INP O B INP 1 40 RESET X Y 50 X A 2 60 Y B 5 IF gt 47 THEN Y 47 70 SET X Y 80 960 5 Y s Bs ms 90 GOTOSO 95 REM 100 REM THIS PROGRAMME DRAWS LINES
85. rtly The ET 121 typewriter is renowned for its fast speed 17 c p s quietness and reliability renowned for its knowledge of the TRS 80 SYSTEM 80 and its pricing policy Together an attractive modern correcting typewriter which doubl correspondence quality Daisy wheel printer when micro computer SYSTEM 80 or interface high How good is it This part of our advertisement was an 121 driven by TRS 80 MICRO 80 we have produced a dual purpose machine used with your typeset using Write and ask for full details The Micro 80 disk drive upgrade for the TRS 80 Model III contains the following high quality components 1 or 2 MPI 40 track single head disk drives 1 VR Data double supply plus all the necessary mounting hardware cables and comprehensive fitting instructions which can be carried out with a minimum of fuss by any average computer owner Fitting service is available for 25 00 in mostcapital cities density disk controller board and 1 dual drive power ONLY 2049 INC S T quality is sensible esas a 1 4 MEGABYTES ON LINE 48K RAM for 53800 incl Sales Tax MICRO 80 s MODEL 380 MECRO 80 has equipped the TRS 80 with two high reliability dual head 80 track mini floppy disk drives made by MPI one of America s leading mini disk drive manufacturers This turns the mild mannered Model 3 into a powerhouse able to handle the most dif ficult business programs The TRS
86. s Lines 7 40 initialisation Lines 50 110 obtain the number of discs and determine the mode of operation Lines 120 190 contain the automatic operation logic sets up the stack pointers and initialises the stack Lines 200 400 are the manual operation logic which asks for moves and checks their validity Lines 460 490 draw the discs initially Lines 500 700 are responsible for shifting the discs The delay routine is Line 505 Lines 1000 1410 is the main recursive procedure which is only executed in automatic operation It decides what the new source and destination pegs should be places these parameters on the stack SK and calls itself Lines 1500 1660 draws the pegs Lines 1700 1780 is the graphics routine for erasing the disc on the old peg and redrawing it on the new peg Lines 2000 2070 print the start up message Lines 2500 2980 contain the instructions The current top of stack is indicated by SP When used by the main procedure Lines 1000 the top stack element holds the number of the alternate peg for this move top of stack 1 holds the number of the destrination peg for this move top of stack 2 holds the number of the source peg for this move while top of stack 3 indicates the number of discs still to be moved When used by the shift procedures Lines 500 the top of stack contains the number of the destination peg and top of stack 1 contains the number of the source peg Because the parameter stack must be
87. sen at random so the game is full of end less variety This is of particular value in helping young children to learn the art of concentrating and at the same time to introduce them to the computer METEOR AND TORPEDO ALLEY L2 16K 10 95 60c p amp p Those who frequent games arcades will recognize these two electronic games METEOR you must destroy the enemy space ships before they see you In its most difficult mode the odds are a thumping 238 to 1 against you being successful In torpedo alley you must sink the enemy ships without hitting your own supply ship Both games include sound effects and are remark ably accurate reproductions of the arcade games AUSTRALIAN SOFTWARE Cont GAMES SHEEPDOG L2 16K 8 95 60c p amp p Ever wondered how a sheepdog manages to drive all those awkward sheep into a pen Well here is your chance to find out just how difficult it is and have a lot of fun at the same time You control the sheepdog the computer controls the sheep As if that isn t enough look out for the dingoes lurking in the bush U BOAT 8 95 60c p amp p Real time simulation at its best Comes with working sonar screen and periscope a full rack of torpedoes plenty of targets working fuel and battery meters helpful Mothership for high seas reprovisioning and even has emergency radio for that terrible moment when the depth charges put your crew at risk Requires Level 11 16 SPACE INVADERS WITH SOUND 8 9
88. sz I Js IF J29 J amp 10 T 250 14 Z 1 IFJ 1T 23 15 IFJ 2T 25 16 IFJ 3T 27 17 IFJ 24T 29 18 IFJ 5T 31 19 IFJ 6T 33 20 IFJ 7T 35 21 IFJ 8T 37 22 IFJ 9T 39 25 IFA gt OT 240 24 A 1 P A 152 X G 260 25 IFB 50T 240 ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 11 26 B 1 P A 160 X 6 260 27 IFC gt OT 240 28 1 168 X 6 260 29 IFD gt 0T 240 1 544 260 31 gt 240 52 E 1 P 4 352 X 6 260 55 IFF gt OT 240 54 1 560 260 55 IFG gt 0T 240 36 G 1 P 4 536 X 86 260 37 IFH gt OT 240 58 1 4 544 260 59 IFI gt 0T 240 40 I 1 P A 552 X G 260 240 P A 704 YOU CAN T USE THIS NO IT S ALREADY IN USE TRY AGAIN 241 F N 1T01500 N N P A 704 242 6 15 250 P A 704 YOU MUST USE NUMBERS BETWEEN 1 amp 9 6 241 260 1 160 X 261 IFB 4T P A 160 0 262 IFC 1T P A 168 X 265 IFC 4T P 5 168 264 IFE 1T P 5 352 X 265 4 552 0 266 IFF 1T P A 360 X 267 IFF 4T P A 360 0 268 1 544 X 269 IFH 4T P A 544 0 270 1 552 271 IFI 4T P A 552 0 272 808 399 273 IFZ 2T 280 274 8 13 280 P 4 704 IT S MY TURN zF N 1T01000 N N 282 IFQ 0T GOS 550 6 284 283 IFQ 1T 625 284 IFL iT P A 152 0 A 4 6 260 285 IFL 2T P A 160 O B 4 G 260 286 IFL 31T P A 168 O C 4 G 260 287 IFL 4T P A 2344 O
89. tes As with any magnetic recording device a disk drive works better and lasts longer if the head is cleaned regularly In the past the problem has been how do you clean the head without pulling the mechanism apart and run ning the risk of damaging delicate parts 3M s have come to our rescue with SCOTCH BRAND non abrasive head cleaning diskettes which thoroughly clean the head in seconds The cleaning action is less abrasive than an ordinary diskette and no residue is left behind Each kit contains 2 head cleaning diskettes 1 bottle of cleaning fluid 1 bottle dispenser cap PLEASE USE ORDER FORM ON PAGE 36 18 USE TANDY PERIPHERALS YOUR SYSTEM 80 VIA SYSPAND 80 97 50 incl p amp p The SYSTEM 80 hardware is not compatible with the TRS 80 in two important areas The printer port is addressed differently and the expansion bus is entirely different This means that SYSTEM 80 owners are denied the wealth of economical high performance peripherals which have been developed for the TRS 80 Until now that is MICRO 80 has developed the SYSPAND 80 adaptor to overcome this problem A completely self contained unit in a small cabinet which matches the colour scheme of your computer it con nects to the 50 way expansion part on the rear of your SYSTEM 80 and generates the FULL Tandy 40 way bus as well as providing a Centronics parallel printer port SYSPAND 80 enables you to run an Exatron Stringy Floppy
90. that normally goes into the AUX socket of the CTR 80 Alternatively remove all the plugs from your cassette recorder connect the AUX plug into the MIC socket on the recorder press down the PLAY key and turn up the volume Thanks are due to C E Kendall for his KEYBOARD BLEEPER program published in MICRO 80 Issue 12 When entering the program Disk users should remove the apostrophe from the beginning of line 40 Level II users may omit line 40 altogether 20 7 SYSTEM 80 OWNERS ADJUST LINES 1080 TO 1100 AS PER COMMENTS 50 GOSUB1IOS0 40 CLEARIS00 DIMNAS 20 ZZ 50 50 DEFUSR 2H407B DISK USERS UNCOMMENT THIS LINE 60 GOSUBZ60 9 SC 0 8H 0 G G 1 CLS PRINT235Z2 NA G 5 8 TURN FORGG 1TO2500 NEXTGG CLS 80 GOUSURZXO 90 X 16252 100 M 66 G 0SUB820 110 GOSUR140 120 RANDOM 120 GOTO210 140 AS INEEYS 150 IFA 1 THENX X S5 IFX lt 16229THENX X 5 160 IFAS 1 THENGOSURS40 170 2 5 IFX gt 16280THENX X 5 180 IFA 2 THENGOSUB1010 190 THENGOSUR290 200 G SUR280 RETURN 210 A RND 8 F RZ 1TOZZ GOSUB1I 40 NEXT 22 22 2 220 A SKAt17 220 R USR 3120 FORAA At 15260TOAt1 6256STEPS64 240 40 POKEAA 144 POKEAtI 5259 120 POKEA 153460 124 gt 154 24THENPOKEAA 44 128 250 POKEAA 128 260 NEXTAA 270 GO0TO710 ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 14 280 POKEX 1 160 PDOKEX 180 RETURN 290 FO RXX X 64TO0X 960STEP 64 POKEXX 132 POKEX 64 128
91. the array and hence is its final position The efficiency of the selection sort is also of order N A later article will examine the efficiency and compare it by mathematical analysis with other sorting routines This means that the selection sort is also limited to small 15 20 input table sizes to obtain any reasonable response times However it may be more efficient than the bubble sort if imple mented using the machine s instruction set on a machine having firmware available to find the smallest element in a list at high speed TO SUMMARIZE It was discovered that sorting routines like the bubble sort are not efficient for large list sizes The time taken is proportional to N The efficiency of such sorts can be improved somewhat by employing the technique of merging which involves a trade off of some kind Another simple sorting routine is available based on the principle of straight selection and known as the selection sort Next month we shall be looking at yet another technique of sorting that of sorting by insertion along with some of its variations 0000000000 SOFTWARE SECTION TIC TAC TOE Level I TRS 80 by B Smith If you are like me the first computer game I ever wanted to play on owning a computer was TIC TAC TOE noughts and crosses So I purchased a Tandy s game pack that had a program called random TIC TAC TOE This game to me was a let down because firstly it was slow an
92. ticks and input output ports had also intended to include full sized masters for the PC board in this part However one or two tracks need to be added changed and we have held over publication until the revised artwork is available hopefully next issue Me will also announce the price of the PC board itself in that issue Last month we included two circuit diagrams on Page 12 without comment These were for a port output monitor and a port input switch The output monitor enables you to visually detect the status of each bit of an output port Any bit having a value of 1 will cause its LED to be ON LED will be off when its corresponding bit has a value of 0 The port input switch enables you to set up any desired bit pattern on an input port You may like to check the oper ation of your ports by writing a simple program to transfer the byte on the port input switch to an output port Each bit that is ON at the input should also be ON at the output Finally the diagram below shows the buss connector numbering for the socket into which the ribbon cable to the TRS 80 keyboard is plugged Buss NUMBERING TO TRS 80 Movec Expansion Porr Caro RIBBow CABLE 7 ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 4 The first listing below contains three simple demonstration programs which enable you to move a dot around the screen draw lines etc using the joysticks The first joystick p
93. tructions notes on what the program does and how it does it etc Please package securely padabags are suggested and enclose stamps or address program name s Memory size Level I System 1 or 2 Edtasm postage if you want your cassette or disk returned Please ensure that the cassette or disk is clearly marked with your name and The changes or improvements that you think may improve it For system tapes the start end and entry points etc ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 36 CASSETTE EDITION INDEX The cassette edition of MICRO 80 contains all the software listed each month on cassette All cassette subscribers need do is CLOAD and RUN the programs Level II programs are recorded on side 1 of the cassette Level I programs are recorded on side 2 Level I programs are not compatible with the System 80 11 programs are recorded twice in succession Note System 80 computers have had different tape counters fitted at different times The approximate start positions shown are correct for the very early System 80 without the volume control or level meter They are probably incorrect for later machines The rates for a cassette subscription are printed on the inside front cover of each issue of the magazine The disk edition contains all those programs which can be executed from disk including Level I programs Level I disk programs are saved in the NEWDOS format Users require the Level I CMD utility su
94. ut a way to modify existing games programs to use the joysticks instead of the keyboard at the Adelaide Users Group plan to develop other circuits which use this board as the main interface to the computer Any that I design will probably be offered to MICRO 80 to publish if they feel it is what the people want We have a few ideas at the moment but any suggestions would be welcome may be contacted through the Users Group address or MICRO 80 will pass on any readers requests that they receive I hope that those of you who construct this board get as much fun and use out of it as I have in the short time that it has been finished I m sure that hardware buffs will love it 0000000000 ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 7 THE THEORY AND TECHNIQUES OF SORTING Part 2 by B Simson Last month we considered a simple algorithm for sorting some numbers in memory using a technique of sorting by transposition or exchange known as the bubble sort However if you ran the program LISTed there for a large number of digits say 100 numbers then you would have realised the considerable length of time it took to sort them This is because in a bubble sort the time taken is related to the square of the number of items being sorted Such a relationship means that the algorithm is not suited for large numbers and is commonly limited to sorting lists of about 15 items We could increase the efficiency somewhat by employing a t
95. uter via an ordinary telephone line The large computer runs your programs in response to commands from the terminal and you can produce listings reports etc on your printer The large computer is shared by many other users which keeps the cost to each user down to an acceptable level These computers are owned by companies called bureaus The volume of data being transferred around the world at any one time is large and growing and is significant with respect to the amount of voice traffic handled by telephone lines Many bureaus have computers in only one or two locations in the country and users data is transferred by long distance telephone lines usually high speed lines In the extreme the computer you are using might actually be on the other side of the world and your data is beamed around the globe via a satellite All of the above is happening now and is expensive One of the problems that bureaus have is ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 3 that most businesses want to process data during normal working hours so large expensive computers and peripherals need to be installed to cope with peak traffic whilst for at least half the time these machines are very much under utilised Even attractive low off peak rates fail to keep them fully utilised since it is usually prohibitively expensive for their customers to bring in staff at night to process data About 18 months ago an enterprising bureau in the U S A had a bright idea
96. ve 1 in double de MORE AUSTRALIAN SOFTWARE All programs designed to run on both the TRS 80 or the SYSTEM 80 without modification Most programs include sound TRIAD VOL 1 L2 16K Cassette 10 95 Disk 15 95 60c p amp p Three separate games which test your powers of memory and concentration The programs combine graphic displays and sound SIMON SEZ Just like the electronic music puzzles on sale for more than 20 Numbers are flashed on the screen and sounded in a sequence determined by the computer Your task is to reproduce the sequence correctly LINE Rather like a super complicated version of noughts and crosses You may play against another player or against the computer itself But beware the computer cheats SUPER CONCENTRATION Just like the card game but with more options You must find the hidden pairs You may play against other people play against the computer play on your Own or even let the 80 play on its own TRIAD VOL 2 L2 16K Cassette 10 95 Disk 15 95 60c p amp p Remember those NUMERO puzzles in which you had matrix of numbers or letters with one blank space and you had to shuffle the numbers around one at a time until you had made a particular pattern Well SHUFFLEBOARD the first program in this triad is just this except that the computer counts the number of moves you take to match the pattern it has generated so it is not possible to cheat MIMIC is just like SHUFFLEBOARD except
97. wer case display is easier to read gives greater versatility The Micro 80 lower case modification gives you this facility plus the symbols for the 4 playing card suits for 49 00 2 00 p amp p The Micro 80 modification features true below the line descenders and a block cursor Each kit comes with comprehensive fitting instructions and two universal lower case drive routines on cassette to enable you to display lower case in BASIC programs The driver routines are self relocating self protecting and will co reside with other machine language programs such as Keyboard debounce serial interface driver programs etc Both programs give your TRS 80 Model or System 807 an optional typewriter capability i e shift for upper case The second programme also includes Keyboard debounce and a flashing cursor You fit it Or we can Fitting the modification requires soldering inside the computer This should only be carried out by an experienced hobbyist or technician If you are at all dubious a fitting service is available in all capital cities for only 20 00 A list of installers is included with each kit ADD A DISK DRIVE TO YOUR TRS 80 MODEL III FOR ONLY 875 00 OR ADD TWO FOR ONLY 1199 Daisy Wheel Typewriter Printer MICRO 80 has converted the new OLIVETTI ET 121 DAISY WHEEL typewriter any other microcomputer available to work with the TRS 80 and with a Centronics parallel port RS 232 serial sho
98. y 100 CLS PRINTTAB 25 CHR 24 CHR 24 25 5 TRING 12 42 27 WRITTEN BY LEONARD PRINT 110 PRINT PRINT SELECT INDENTATION AND LINE JUSTIFICATION zPRINT PRINT ENTER I TO CONTINUE PRINT 120 Z INKEY IF 7 THEN GOTO 120 120 CLEAR 5000 DIM 4 90 T 20 R 90 140 ERROR GOTO 1470 30 REM INDENTATION POSITION 160 TBZ 0 170 PRINT ENTER INDENTATION 25 180 IF X THEN GOTO 180 190 X ASC X ce Se 200 IF XZ 13 THEN PRINT GOTO 250 DINER 210 X1 X1 X PRINT X 220 IF VAL X1 lt O OR VAL X1 262 THEN PRINT CHR 29 CHR ZO 5 X 1 GDTO 170 230 IF LEN X1 gt 2 THEN PRINT CHR 29 CHR C50 5 2X1 GDTDO 170 240 GOTO 180 250 IF LEN X1 0 THEN GOTO 270 260 TRZ VAL 1 1 270 PRINT PRINT ENTER J FOR JUSTIFICATION 280 PRINT ENTER FOR NON JUSTIFICATION 290 PRINT ENTER ABORT PRINT PRINT ENTER M INKEY IF M THEN GOTO 500 310 GZ ASC 320 IF 67 74 THEN X O ELSE IF 82 78 THEN X 1 ELSE IF G 65 HEN RUN ELSE G TOZOO 330 IF F 1 THEN GOTO 1700 ELSE IF F 2 THEN GOTO 2550 240 CLS 350 NZ 0 PRINTCHRS 128 CHRS 12 GOTO 520 560 AS INKEYS IF A THEN GOTO 260 570 AZ ASC AS 580 IFAZ gt 22ANDAZ lt 465GOTOSSO 590 IFAZ gt S64ANDAZ lt 91A AZ 22 GOTOS00 400 IFAZ gt 91A AZ Z2 UZ PEEK 16416 QZ PEEK 16417
99. y B which is empty in the first phase to produce a sorted list in array C Next another subset is extracted and merged with array C to produce a sorted list in array B this time This continues until all items have been extracted from the input array after which the array used as the output in the last merge phase is deter mined it being the final list of sorted data Time Optimum Subset length Subset length input array Subset length Figure 2 Optimizing merging time with sorting time ISSUE 24 NOVEMBER 1981 MICRO 80 PAGE 8 Now it is plain that the larger the sort area the longer it will take to actually sort bubble but also the larger the sort area the fewer extractions of subsets are made from the input array therefore invoki fewer merge phases and consequently less time is spent in mergi This is illustrated in Figure 2 91 9 So trade off must be made which is achieved by optimizing the subset length therefore the sort area The complete program employing this technique follows An additional feature is an option to sort in descending order 760 CLEAR1 CLS DEFINTA B C 15 BUBBLE SORT MERGE 780 INPUT SORT HOW MANY NO S 5N DIMI N B N C N 800 RANDOM INPUT RANGE 32767 TO 32767 26 5 INPUT TO 3 R2 IER 2 lt R1GOTO800 820 FORTZ 1TON CTZ RND CR2 R1 R1 NEXT T T 840 SL INT SOR NX2 1 IFSL NTHENSL N

Download Pdf Manuals

image

Related Search

Related Contents

Protection fiable    

Copyright © All rights reserved.
Failed to retrieve file