Home
Volume 3, Issue 2 - Classic
Contents
1. 15 PRESS LETTER KEY FOR YOUR GUESS PRINT979 PRESS THE 2 KEY TO GUESS THE WORD PRINT2298 STRINGS 21 32 I INKEY GOSUB1700 FORI 1T010 NEXTI F2 F2 1 IFF2 10THENF2 0 GOSUB2100 FORI 1TO19 IFI THENIFF2 OTHENS40EL SE860 X ASC I IF X lt 64 OR X gt 90 THENB60 F 1 GOSUB1 700 IFX 64THEN1010 PRINT 298 I FORII I ITORND 5 STEP 1 GOSUB780 FORJ 1T020 NEXTJ II KK 7 LL 20 GOSUB2070 GOSUB1830 FORI 1TOLEN G IFMID G I 1 I THENI1OOOELSENEXTI FORI 1TO2 amp LEN WS IFG I ISTHEN1200ELSENEXTI G 0 FORI 1TOLEN W I 1 ISTHENGS 2 amp I I G 1 NEXTI IFG OTHEN1140 605181960 GOSUBB10 FORK 1TO80 GOSUB2050 GOSUB1840 0 FORI 1TO2 LEN WS IFG I CHR 95 6 1 NEXTI IFB OTHEN1 300ELSE860 M YOU VE ALREADY TRIED THAT LETTER 60701210 GOSUB2100 PRINT9 78 TYPE IN YOUR WORD GUESS THEN PRESS lt ENTER gt s 298 CHR 95 605081700 IF 1 OR IK AND I 2CHR 8 THEN1030 IFASC 1 BTHENIKS LEFTS IK LEN IK 1 1 IF I CHR 13 THEN1080 PRINTO298 IK CHRS 95 5 5 IFLEN 1 lt 20THEN1030 F 1 GOSUB1700 KK 7 LL 203 GOSUB2070 GOSUB1830 I 1 1 1 12 lt gt THEN1110 IK LEFTS IK 1 1 RIGHTS LEN IK CI I I 1 1 1 1 IFI lt LEN IK THEN1090 WG IK STRINGS 20 LEN IK 32
2. 298 WG IFIK WSTHEN1 290ELSEG1 G1 IK GOTO1150 GS GS Ig 6 1 IFXG 6THEN1490 GOSUB18650 FORI 1T050 OUT255 6 FORJ 1T0 SON I 20 1 1 5 NEXT 0UT255 5 NEXT ONXGGOSUB1530 1540 1560 1570 1600 PRINT9640 G s PRINT9704 51 IFXG STHEN1190 GOSUB2050 FORJ 1 TORND 40 NEXTJ GOSUB1840 GOTO860 M LAST CHANCE COMING UP 60701210 M YOU VE ALREADY GOT THAT LETTER KK 4 LL 30 GOSUB2070 GOSUB2100 1 05 L KX10 H Kt10 GOSUB1800 FORL 1TOK 30 NEXTL GOSUB2100 FORL 1TOKX10 NEXTL K IFPOINT 54 23 OTHENGOSUB2050 GOSUB1840 60 0860 FORK 2TOLEN W 25 2 6 MID W K 2 1 NEXTK 60518810 RETURN GOSUB2050 GOSUB1840 2861 Z SWNTOA 08 0391 39 4 1500 1310 1320 1550 1540 1550 1560 1370 1380 1390 1400 1410 1420 1430 1440 1450 1460 1470 1480 1490 1500 1510 1520 1550 1540 1550 1560 1570 1580 1590 1600 1610 1620 1650 1640 1650 1660 1670 1680 1690 1700 1710 1720 1750 1740 1750 1760 1770 M YOU VE GOT IT W 1 GOSUB1270 KK 4 LL 50 GOSUB2070 FORK 1TO04 GOSUB2100 FORL 1 TOK 10 NEXTL PRINT388 M FORL 1 TOK 5 H 30 GOSUB1800 NEXTL K PRINT9298 STRINGS 21 32 IFW 1THEN1460 GOSUB2100 PRINT384 THE MYSTERY WORD WAS W FORK 1TO999 GOSUB1270 FORK 1TO3 GOSUB2100 FORL 1TO30 NEXTL FORM 1TO3 GOSUB2100 FOR
3. 1 1 E EX 1 1 1 10 LX 1 RETURN RX RND 5 s HX RND 5 sLX RND 8 IF RX HX THEN 330 5 5 1 10 LX 1 RETURN PRINT CUS LES 0 51 INPUT R RETURN PRINT PM 51 0 BAS RES INPUT R H GOSUB 960 RETURN PRINT F PM 01 0 RH BAS INPUT R H GOSUB 960 RETURN PRINT F PMS LES 0 TRS BAS INPUT R HiGOSUB 960 RETURN 390 PRINT F PMS ENS LES ANS OF PAS BAS INPUT R H GOSUB 960 RETURN 400 410 420 430 440 F PMS LES 0 PARALLLEL SI ANS 0 TPS BAS INPUT R E H GOSUB 960 RETURN PRINT F ENS RAS OF FAS INPUT R GOSUB 960 RETURN PRINT F ENS ARS OF FAS INPUT B GOSUB 960 RETURN PRINT F RAS OF FAS INPUT R GOSUB 960 RETURN PRINT F SPS ENS RAS INPUT RETURN PRINT 450 A1 RERzS1 68RER VIZRERERs RETURN 460 PRINT WRONG AREA OF Al RETURN 470 PRINT WRONG VOLUME 5R35 5R5 5R5 V1sRETURN 480 PRINT WRONG WHOLE SURFACE AREA 6 5R5 5R5 S1 RETURN 490 A1 RXH 81 2XR amp H 25R L 2XH amp L VI R amp H L RETURN 500 PRINT WRONG ARS BAS 5R5 A1 RETURN 510 PRINT WRONG VOLUME R X H X 5L 5 V1 RETURN 520 PRINT WRONG WHS SA PRINT 2X R X H3 22 Rs X sLs S1 RETURN 550 A1 R H 2 V1 RX H 2XL SI BER 2 55 2 5 51 284
4. Z ON 08 0391 12 3943 210 IFA CHRS 13 THENPOKEBU 34 BU BU 1 POKEBU 44 BU BU 1 POKEBU 34 BU BU 1 POKEBU ASC 9 BU BU 1 POKEBU 34 BU BU 1 POKEBU 44 A 6 GOTO280 220 IFA CHR 8 THENBU BU 1 PRINTCHRS 30 GOTO160 230 POKEBU ASC BU BU 1 GOTO160 240 XCURSORX 250 D PEEK 16416 16417 256 E E 1 260 IFE gt 6AND PEEK D 95 D 232 THENPOKED 136 0 RETURN 270 IFE gt 6POKED 32 0 RETURN 275 RETURN 280 OF LINE 290 POKE16405 0 POKE1 6526 0 POKE16527 254 X USR 0 300 POKE16405 1 NU PEEK 7285 7284 256 NU STR NU 502 288 287 X256 FORG 2TOLEN NU Y X G 2 Y Y 655 36 Y gt 32767 POKEY ASC MIDS NUS G 1 305 GOTO130 310 SEARCH 320 RESTORE CLS READLE LE VAL LES LE DIMCS LE ONERRORG OTO432 B FL O Z 525 FORJ 1TOLE READC J NEXT GOSUB460 330 PRINT READW TYPE 54 CHR 92 CHR 54 TO STOP ENTER DATA TO BE SEARCHED FOR 340 GOSUB250 542 PRINTAS IFAS CHRS 10 4 IFAS lt gt CHRS 13 GOTO340 343 GOTOSSO 344 60548660 PRINTCHR 30 GOTO340 350 0 FORJZ 1 TOLE READBS JZ 60518800 M M SS NEXT JZ READH REA DH 555 IFM OTHENSSO ELSEFL 1 410 CLS FORJ 1TOLE PRINTCS J
5. 5 80 SYSTEM 80 VIDEO GENIE 80 Vol 3 Issue 2 January 1982 PRESS A LETTER KEY FOR YOUR SUESS PRESS THE 9 KEY GUESS THE WORD SUPER HANGMAN WITH GRAPHICS amp SOUND Also in this Issue HARDWARE Add Joysticks and Input Output Points to your 80 Part 5 PROGRAMMING The Theory and Techniques of Sorting Part 3 SOFTWARE e Measurements e Files e Duplex Double Precision Data Base Management Mathematical Functions System for Disk WICRO 80 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 ASSOCIATE EDITORS SOFTWARE LEVEL I MICHAEL SVENSDOTTER SOFTWARE LEVEL II CHARLIE BARTLETT HARDWARE EDWIN PAAY 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 12 MONTH SUB SINGLE COPY MAGAZINE ONLY 26 00 77 2 50 CASSETTE PLUS MAGAZINE 65 00 4 00 cass only DISK PLUS MAGAZINE 125 00 10 00 disk only MICRO 80 is available in the United Kingdom from U K SUBSCRIPTION DEPT 24 Woodhill Park Pembury Tunbridge Wells KENT TN2 4NW Prices MAGAZINE ONLY 16 00 1 50 CASSETTE PLUS MAGAZINE 43 60 DISK PLUS MAGAZINE 75 00 MICRO 80 is available New Zealand from MICRO PROCESSOR SERVICES 940A Columbo Street CHRISTCHURCH 1
6. 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 difficult to pirate 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 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 Sy
7. J 29 J 1 TAB 33 J B 44 F 4 J TAB 49 F 5 J TAB 54 F 6 J TAB S9 F 1 3 lt NFORJ NFTO10 PRINTAP J 25 PP J NEXT 1020 RETURN 1030 E AP I 0 01 55 2 60518150 5 lt gt CI 54 RETURNELSER ETURN 1040 CLS GOSUB1430 PRINT9128 ORDER FIELD NAME 1050 1 9192 1 64 1 1 CIX SK TAB 6 F 3 1 1TAB 10 AF F 3 1 sNEXT GOSUB130 IFM 1 THENGOSUBS50 RETURN 1060 E SORT FIELD S 1070 S3 17 D D1 D3 GOSUB150 F 3 0 S4 1 S 1 1080 FORK 1 TONF 1 GOSUB270 IFT gt OTHENF 3 VAL MID CBS T 1 1 S T 1 NEXT 1090 SK K 1 FORI OTOSK IFF 3 3 I gt 5 60 01140 1100 FORJ OTOSK IFF 3 I F 5 J lt gt JTHENIE 3 GOTO1140ELSENEXTJ I 3 1110 T SK FORI OTONF 1 1120 FORJ OTOT IFF 3 J NEXTIELSENEXTJs T 2T 1 F CS T NEXTI 1150 60 01040 1140 FORI OTONF 1 F 3 I 1 GOTO1040 1150 GOSUB1 530 AN BS E NUMBER OF FIELDS lt 9 0 01 6054890 NF M 1 IFNF OTHEN20ELSEGOSUB340 1160 GOSUB1440 FORI OTONF 1 AF 1 20 1170 GOSUB1450 D D1 D2 E FIELD NAME lt 16 CHARACTERS 55 16 60 SUB150 AF LEFT BS 16 1180 GOSUB1450 E FIELD TYPE STRING INTEGER D SI D5 DA si 05 GOSUB9O IFM STHENM 1 1190 F 0 1 M 1 GOSUB1450 E FIELD LENGTH lt 48 CHARACTERS D D1 S
8. 2 1 1 1 SL 1 SP SL 5 2 1 2 X4 X3 X1 X2 GOSUB 2380 PRINT 887 H PRINT 875 5 1 5 2 L 948 R RETURN GOSUB 2330 109 2 1 2 1 1 40 2 40 1 1 S3 RND 2 IF S3 1 THEN 1790 X3 X2 Y1 Y2 BL 1 SP X1 X3 Y1 Y2 XA XS GOTO 1800 35 2 1 2 4 5 51 1 5 1 5 CY1 Y2 GOSUB 2380 875 95 X1 52X2 L PRINT 887 H PRINT 948 R RETURN IF R gt E THEN 1860 D1 E D2 R GOTO 1870 D1 R D2 E gt 01 THEN M1 20 H ELSE M1 20 D1 X1 103 X22X1 28M1 XD1 1 40 Y2 Y1 M1XH S3 RND 2 IF S3 1 THEN 1930 X3 X2 V1 Y2 SL 1 X4 X3 24EM1 8D2 SP 1 4 Y1 Y2 1940 X3 X2 Y1 Y2 9 1 4 5 2 1802 SP CX1 X4 CY1 Y2 GOSUB 2380 ON ERROR GOTO 1970 2861 Z ON 08 0451 tc 39 1960 PRINT 878 638 Y1 Y4 5 5 SE X17X6 4 D2 2490 Y YA FOR X X6 TO X7 SET X Y NEXT X 1970 PRINT23 873 5XX1 5XX2 L 2500 FOR X X2 TO X5 STEP 5 Y Y1 OX X2 5 SET X YO sNEXT X 1980 PRINT23885 H PRINT3 946 01 2510 FOR X X3 TO STEP 5 Y Y2 X X3 5 SET X YO sNEXT X 1990 RETURN 2520 IF X6 X7 THEN 2540 2000 INPUT PRESS LINE Z CLS 2530 FOR 4 TO X7 STEP S Y Y2 X X4 5 5 X 2010 Y1 34 GOSUB 2310 GOSUB 2320 2540 RETURN 2020 Y1 20 GOSUB 2320 2550 FOR 7 1 TO 100 Z RETURN 2030 X
9. 3 POST US YOUR ORDER STATING DESCRIPTION CAT No AND A CHEQUE OR MONEY ORDER TO SUBSCRIBERS OF CONQUEST ELECTRONICS 212 Katoomba St KATOOMBA 2780 i Please supply QTY DESC ADV PRICE WE WILL 1 ATTEND TO YOUR ORDER WITHIN 7 DAYS 2 SUPPLY GOODS SELECTED FREIGHT FREE 3 SEND ADVERTISING REGULARLY TO KEEP YOU INFORMED OF CURRENT SPECIALS subject to availability TANDY DEALER CONOUEST ELECTRONICS 212 KATOOMBA ST KATOOMBA N S W 2780 PHONE 047 82 2491 SUB TOTAL LESS 10 FIND CHEQUE FOR TOTAL SEND FREIGHT FREE TO ADDRESS ee ieee esas Set to add a new and exciting to the world of personal compu eddie eater ind sound WE a
10. 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 asimple lower case modification DISK DRIVE USERS ELIMINATE CRC ERRORS AND TRACK LOCKED OUT MESSAGES FIT A PERCOM DATA SEPARATOR 37 00 plus 1 20 p amp p When Tandy designed the T RS 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 All 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 drives are supplied bare or in a metal cabinet
11. 4 G0TO560 660 B LEFT B LEN B 1 RETURN 670 x t LIST ALL 680 RESTORE ONERRORGOTO730 LE s FG 1 690 FORJ 1TOLE READC J 60548460 READX 700 CLS GOSUB751 READX 8 8 X CONTINU Y N 2 710 60508250 0 0710 720 700 ELSE40 750 IFERL 751 AND ERR 2 1 4RESUME40 740 IF ERR 2 1 10RESUMENEXT 750 GOTO450 751 FORJ 1TOLE READBS J 65070410 800 FORSS 1TOLEN JZ LEN BS 1 805 IFBS MID B JZ SS LEN BS RETURN 810 NEXT 55 0 RETURN 998 DATA STARTS HERE tkt 1000 DATA 4 MEMORY LOCATION FUNCTION NCE COMMENTS a 1000 1010 DATA 0000 01D8 SYSTEM INIT I O SUBR N 0 9 1010 1020 DATA 01D9 03E2 CASSETTE SUBR N A 9 1020 1030 0457 KEYBOARD DRIVER N 9 1030 1040 DATA 0458 058C VIDEO DRIVER N 9 1040 1050 DATA 058D 673 LPRINT DRIVER N A 2 1050 1060 DATA 0674 070A INITIALIZE N A 1060 1070 DATA 070B 1607 FLOATING POINT MATH N A 1070 1080 DATA 1608 164F TABLE LEVII ENTRY POINTS 9 10 READLES LE VAL LES LE 01 CALL SEQUE 1090 DATA 1650 1820 TABLE BASIC COMMANDS 2 1090 1100 DATA 1821 191C TABLE OF JUMP ADRS FOR BASIC COMMANDS N s a
12. 780 I 5 GOSUB1030 IFPP 5 160RPP 5 gt 0 PP 2 THEN780ELSEPP 7 PP O CPP 2 PP 5 PP 3 PP O PP 2 CPP 5 PP C7 FORI OTONF 1 F 4 1 F 4 1 F 4 D lt 5 GOSUB1000 790 I 6 GOSUB1030 IFPP 6 gt PP 0 2 CPP 5 THEN790EL SEPP 7 0 PP 2 PP 5 PP 6 3 PP O PP 2 PP 5 PP 6 PP 7 PP 6 GOSUB1000 I 7 GOSUB1030 IFPP 7 gt 0 2 PP 5 6 THENBOOELSE 3 O PP 2 5 PP 6 PP 7 PP 6 3 GOSUB1 OOO 810 1 8 605181050 8 gt PP 1 CPP 4 THENB10ELSEGOSUB980 GOSUB1 O 00 820 I 9 GOSUB1030 IFPP 8 PP 9 gt 1 CPP 4 THENS20EL SEGOSUB1000 830 I 10 GOSUB1030 IFPP 10 40RPP 10 gt PP 1 CPP 4 B 9 THENBSOELSEGOSUB 1000 840 5 PP 1 1024THENIE 10 GOTO740 850 FORI OTOPP 5 860 E FIELD S APPEARING ON LINE STR 1 3D D1 D5 GOSUB90 Z M 2 IFZ lt OORZ NF 1NEXT RETURN 870 F 4 Z I IFITHENE POSITION 0 01 05 S3 2 GOSUB150 IFS4 gt PP 8 THENS70EL SEF 5 Z S4ELSEGOSUB1000 60 0860 880 E WIDTH S3 2 GOSUB150 IFS4 F 5 Z gt 8 THENS7OEL SEF 4 Z S 4 GOSUB1000 60 FOUND STRING 890 GOSUB1000 60518150 IFM 2THENFORI OTO10 PP I O NEXT GOGUB100 0 GOSUB740 GOTO890 900 FORI OTOPP 5 1 64512 1 POKEVARPTR BL CI 2 IN
13. 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 2990 INCL SALES TAX 53350 INCL SALES TAX 3350 INCL SALES TAX 3800 INCL SALES TAX 54070 INCL SALES TAX 54429 INCL SALES TAX 54429 INCL SALES TAX 4880 INCL SALES TAX 56380 INCL SALES TAX 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 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 90 day Warranty covering parts and labour SOF PAGE 19 ARE BY AUSTRALIAN AUTHORS All our software is suitable for either the SYSTEM 80 or the TRS 80 NEW SOFTWARE FROM MICRO 80 PRODUCTS BUSINESS
14. 0 TO 12 Y 5XX SET X 68 Y 34 X 2250 FOR 0 TO 24 Y X SET X 68 Y 34 X 2260 FOR 0 TO 24 Y X SET X 92 Y 10 NEXT X 2270 FOR 0 TO 12 Y 18 12XX SET X 80 Y 28 NEXT X 2280 FOR X 0 TO 12 Y 18 12XX SET X 92 Y 10 sNEXT X 2290 PRINT3 896 OF BASE B HEIGHT 5L 2500 RETURN 2310 FOR 24 TO 24 Y 25 24L2 XEL2 E 5 SET X 92 Y Y1 sNEXT X 80 DEFINTA Y DIMG 40 D 19 D 27 90 RANDOM RESTORE 60508550 CLS GOSUB770 100 L 0 11 4 GOSUB780 GOSUB2100 IF ZZ OTHEN290 110 LZ 4 JZ 13 KZ 10 T T 10 IZ 1 120 PRINT920 WELCOME TO SUPER HANGMAN PRINT 976 PRESS I FOR INSTRUCTIONS OR lt B gt TO BEGIN 130 605481760 I INKEY I Z 1Z 1 IFI B THEN290 ELSEIFIZ lt 81THEN130 140 GOSUB1830 605081840 1 11 30 605482070 KK 4 GOSUB2070 150 PRINT912 I A MEAN UGLY SELFISH ROTTEN BANDIT 160 JZ 17 LZ 50 KZ 15 T T 4 170 FORIZ 1T031 GOSUB1 760 NEXTIZ PRINT987 NOBODY 5 PERFECT 180 FORL 1T0900 NEXTL 190 PRINT312 BUT I AM GOING TO BE GENEROUS FOR A CHANGE 200 7 605082070 1 GOGUB2070 4 GOSUB2070 210 PRINT370 AND GIVE YOU A CHANCE TO SAVE YOURSELF FROM HANGIN G FORL 1 T060 H 61 L GOSUB1800 220 NEXTL PRINT 6 WILL THINK A WORD AND YOU MUST GUESS WHA T IT IS RETURN 230 PRINT970 YOU MAY GUESS ONE LETTER TIME OR THE WHOLE WO 2320 FOR 24 TO 24 Y 25 2402 X02 E S SE
15. 01700 01710 DEF USR LPS NZ LP4 HL SCAN DE HL MOVSTR DE HL DE HL 16 8 213 EVAL HL SHAPE DE HL HL IX DIXIE IX 0 IX AF NZ TNEXT IX DE HL SCAN a Z SNERR E IX D IX 1 DE IY HL BC HL 16 8 40 IX STORE IX VARPT DIXIE HL 16 44 NZ NXT3 4 1 43F2 43F4 43F5 43F6 43F8 43F9 43FC 43FD 0C77 0C70 ODA1 ODES 0905 O9FC OA4F 40AF 411D 4127 42BF 42C0 42C8 42D0 4208 42E0 43FF 4401 4403 4405 4407 4409 440B 440D 440F 4411 4413 4415 4417 4419 441B 441D 441 4422 4424 4426 4429 442 442F 4432 4434 4437 4430 443D 4440 4443 0000 0000 0000 0081 C468 2102 DAOF 4981 CAE9 9412 SSFA OE7B 7BCF 7 1772 5180 21AF40 3608 SEFF S2BF42 DDS5EOO DD5601 CD8744 1831 CD6A44 CDFCO9 11DO42 CD8744 CDC844 181B 01720 01730 01740 01750 01760 01770 01780 01790 01800 02000 02010 02020 02030 02040 02050 02060 02070 02080 02090 02500 02510 02520 02550 02540 02545 02550 02560 02370 02380 02390 02400 02410 02420 02430 02440 02450 02460 02462 02464 02466 02468 02500 02510 02520 02530 02540 02550 02560 02570 02575 02580 02582 02584 02590 02600 NXTS DADD DSUB DMULT DDIV MOVE SWAP CPACC NTF ACC AUX FLAG VAR CUM TOT NUM SPARE ONE PI2 P1180 LOG2 SETUP 1 NUMUP TOTUP 16 LPS 8 41 IX HL HL RETN HL av 0C77H OC70
16. 03110 03120 03130 EXPCOS SETUPS OUTSET SETUP2 SETUP4 OUTTOT OUTVAR NDVCUM OUTCUM DOITS VARACC CUMACC ONEACC PIACC DOIT1 MOVIT VARAUX CUMTOT TOTAUX ONEAUX DOIT2 NUMAUX CONV PIAUX CALCX UPACC CALCY VARMUL NUMDIV SWITCH FLIP SETUP1 NUMONE a NUM 7 ONEACC SETUPA OUTVAR NUMONE VARACC GUTCUM HL TOT DOITS HL VAR DOITS NUMDIV HL CUM DE ACC MOVIT DE VAR DOIT1 DE CUM DOIT1 DE ONE DOIT1 DE PI2 HL ACC MOVE DE VAR DOIT2 CUMACC DE TOT DOIT2 DE ONE HL AUX MOVIT DE NUM DOIT2 SETUP1 DE P1180 DOIT2 CALCY VARMUL UPNUM CUMACC UPACC VARAUX DMULT NUMAUX DDIV A FLAG FLAG A A 7 SUBRET ADDRET 44D4 44D7 44DA 44DD 44 44E3 44E6 44E9 44EB 44EE 44F1 44F3 44F6 44F8 44FB 44FE 4501 4504 4505 4506 4508 450B 450E 450F 4512 4515 4517 CD9A44 C3700C CD7F44 CDA244 C3770C CDDA44 111D41 1803 11FF43 21D842 1897 CD4544 SE7F 52 42 CDB944 CD3444 SACF42 CD1F45 21E042 CD7044 CD1745 11 042 CD9D44 C3ESOD CD3545 212441 7E D682 03140 03150 03160 03170 03180 03181 03182 03184 03190 03200 03210 03500 05505 05505 05510 05550 05560 03570 05580 05590 05600 05610 05620 03625 03630 03640 03700 03710 03720 03800 03900 05950 05955 05940 03950 03960 03970 03980 04090 04100 04110 04120 04130 04140 04200 04210 04220 04230 04240 04250 04260 04600 04602 04604 04606 S
17. 6 S1 RETURN GOSUB 1070 PRINT AS CUS H SI sR LONG GOSUB 910 GOSUB 970 GOSUB 1020 RETURN GOSUB 1240 PRINT A PMS RES BAS WIS SIS ANS H PRINT I L T GOSUB 910 GOSUB 970 GOSUB 1020 RETURN GOSUB 1390 PRINT 4 PMS RHS BAS WIS DIS R H SIDES ARE SI5 LONG PRINT IT IS L DEEP GOSUB 910 GOSUB 970 GOSUB 1020 RETURN GOSUB 1710 PRINT AS PM TRS BAS R BY SH HIGH I s T GOSUB 910 GOSUB 970 RETURN GOSUB 1560 PRINT A PMS PAS BAS R BY 513 T GOSUB 910 GOSUB 970 RETURN GOSUB 1840 PRINT A PMS H TPS BAS WIS PARALLEL SIS R A E PRINT THEY ARE H APART THIS PRISM IS DEEP GOSUB 910 GOSUB 970 RETURN HIGH PRIN T GOSUB 9 10 GOSUB 970 6050 1020 RETURN 860 GOSUB 2180PRINT AS PY FAS ARS B I L T 870 GOSUB 970 RETURN 2861 AuvnNVC Z ON SWNIOA 08 032IN 39Vd 880 890 900 910 920 950 940 950 9650 970 980 GOSUB 2070 PRINT FAS RAS R ANS L T GOSUB 970 RETURN GOSUB 2130 PRINT SPS RAS GOSUB 970 GOSUB 1020 RETURN INPUT WHAT IS AREA OF FACE IF ABS A1 A lt A1 100 THEN 950 ON GOSUB 460 500 540 570 600 630 660 700 720 740 NW NW 1 RETURN PRINT RIGHT NR NR 1 RETURN INPUT HOW DEEP Ls RETURN INPUT WHAT IS THE VOLUME V IF ABS V1 V lt V1 1000 THEN 1010 990 ON GOSUB 470 510 550 580 610 640
18. It largely follows the format of the original version but includes much more information on the Model I and of course the same information on the Model III which is all new The most exciting news however is that each manual will be supplied with Eddy Paay s own machine language Debug program on cassette Eddy could not find a commercially available debug program which he considered satisfactory so he wrote his own Features include the ability to single step through your program a disassembler which disassembles the next instruction before executing it or allows you to bypass execution and pass on through the program disassembling as you go memory display and editing in Hex or ASCII Register editing the ability to punch out System tapes etc etc Eddy believes that as little of the screen as possible should be taken up by the Debug program so its display is confined to the bottom three lines of the screen leaving the remainder for your own program Debug runs in the TRS 80 Models I and III and the System 80 Video Genie with or without disk drives The whole package manual and program will be available around the end of April for 29 95 1 15 p amp p Any orders received for the Level II ROM Reference Manual from now on will be held over until the new version is available VOLUME 3 NO 2 JANUARY 1982 MICRO 80 PAGE 3 REVISED FORMAT This issue you will notice that we have revised the format of MICRO 80 somewhat We have slightly red
19. J NEXTJ 1 NR NR NO 1320 CLOSE RETURN 1330 E FILE NAME lt 8 CHARACTERS 55 8 0 01 02 GOSUB1 50 IE 0 AR BS AI BS RETURN 1340 E DRIVE 0 3 S3 1 D D1 GOSUB150 IFBS lt gt THENBS 5 1350 AR AR TXT BS AI AI DAT BS RETURN 1360 F 256 FL FORI OTOF 1 FIELD1 IXFL ASA FL ASA I NEXT N 1370 IFERR 2 53THENIE 6 RESUME 1320 1380 IFERR 2 61THENIE 7 RESUME 1320 1390 IFERR 2 570RERR 2 640RERR 2 69 THENIE 8 RESUME 1 320 1400 IFERR 2 670RERR 2 68THENIE 9 RESUME 1 320 1410 IFERR 2 STHENIE 10 RESUME1320 1420 ONERRORGOTO20 1430 PRINT3O FILE ANTAB 18 FIELDS STR NF 30 RECORDS STR NR TAB 44 SPACE STR MR NR D4 RETURN 1440 CLS GOSUB1430 PRINT9128 TAB 4 FIELD 22 TYPE TAB 30 LENGTH RETURN 1450 1 192 1 64 1 1 TAB 4 AF I TAB 21 AF CF O 1 9 TAB C31 F 1 I RETURN 1460 PRINT9128 RECORD 04 FORI OTONF 1 LSETDS 1 4 AF 1 NEXT 1470 PRINT9135 R FORI OTONF 1 LSETDU I MID AR R 1 F 2 I F X1 I sNEXT RETURN DUPLEX 42E9 00100 START EQU 42E9H 9907 00110 EQU 09D7H 2557 00120 EVAL EQU 2337H OA7F 1997 260D 0890 415B 415B 41A9 41A9 42E9 42E9 0064 434E 42n0 4350 4353 4555 4358 435A 435B 435C 435D 435E 4360 4361 4362 4363 4365 4567 4569 436B 436D 436F 4370 4373 4374 4375 4376 4377 4378 437A 437B 437C 437E 437F 438
20. L OVER TRUE ELSE IF TEMP A J ACI 1 J ELSE 3 1 OVER TRUE 440 NOT OVER THEN420 450 IFPOINT 127 0 RESET 127 0 ELSESET 127 0 460 I I 1 6010400 470 RETURN An additional feature of toggling a graphic point in the top right hand corner of the screen is included at the end of each pass When the program is run you will notice that this flashes randomly indicating random pass sizes compared with passes in the bubble sort becoming success ively shorter Notice the structure of the nested IF THEN ELSE construct in line 430 and its resemblance to that construct in the flowchart in figure 1 This makes for program readability and ease of understanding without becoming bogged down in unravelling the meaning of the structure Notice also the use of the convenient boolean simulation feature of level 2 BASIC in the variable Over to indicate pass completion This is possible because in BASIC O False Anything else True but only NOT 1 0 Hence 1 being chosen for true So if Over 1 true NOT Over 0 false These make for program readability which becomes important in achieving easily maintained and self documenting programs Plug for structured programming Now back to the problem at hand In order to utilize this subroutine the following driver is proved Note that you will have to insert a GOTO 550 at the start of the subroutine in order to pass control to the driver when RUN ning or
21. 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 from your SYSTEM 80 or an LNW Research expansion interface or any other desirable peripherals designed to interface to the T RS 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 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 59 95 plus 1 20 p amp p 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 cavethat you cannot enter Requires 32K One Disk
22. The sort will be completed most rapidly if as few as possible fields are included in the sort key This program uses the NEWDOS 80 Version 2 sort WRITE The file is written to disk 2 parts NAME DAT contains data describing the nature of the file contains the text DUPLEX L2 m 1 by Rossiter DUPLEX is package of double precision mathematical functions which is called by special use of the USR function since it disables this function in its normal use DUPLEX also provides a means of accessing the user s own machine language routines using the DEF command to define entry points It loads at the bottom of user memory from 42E9H to 4617H and sets the BASIC pointers past itself to 4611H It should therefore be loaded first before loading or entering your BASIC program It is not intended for use with Disk BASIC MICRO 80 PRODUCTS DON T BE HELD BACK BY AN ANTIQUATED DISK OPERATING SYSTEM MOVE UPTO 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 dri
23. 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 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 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 5 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 fo
24. 1 TEMP END END END One of the advantages of Pascal is the ability to abstract and modularize the principals of an algorithm which makes for problem orientation rather than machine orientation This fact is demonstrated in the explanation of the binary insertion sort The main block procedure state ments of this program clearly show what is involved in a binary insertion sort 1 Save current item to temp 2 Search for insertion position for item currently in temp 3 Move block down starting at insertion position which has been determined by a value passed back from the binary search routine 4 Put saved item into vacated position TO SUMMARIZE Another method of sorting is available that of sorting by insertion There are several variations of such a method all of which are quicker on the average than the bubble sort They are Straight insertion sort Multiple insertion sort Binary insertion sort Also the binary search algorithm as used in the binary insertion sort was presented demonstrating one application of the use of sorting routines NEXT MONTH So far sorting algorithms generally of efficiency to the order of been discussed Next month the insertion saga continues but by using a different kind of data structure than the simple array and by employing another variation to the insertion sort the efficiency can be improved to the order of N log N to Base 2 0000000000 VOLUME 3
25. 1 4 amp 51 RETURN 540 PRINT WRONG 0 BA R X H 2 s A18 RETURN 550 PRINT WRONG VOLUME 36135 35L 5 VIS RETURN 560 PRINT WRONG WHS S4 22 015 5 4 SI S1 RETURN 570 PRINT WRONG ARS 2 A1 RETURN 580 PRINT WRONG VOLUME 5 A15 5L5 VIS RETURN 590 V1 REHEXL RETURN 600 PRINT WRONG 0 R 1 610 PRINT WRONG VOLUME 5A15 5L5 VIS RETURN 620 A1 H 2 R E V1 H 2 RE XL RETURN 630 PRINT WRONG 0 2 3 1 RETUR N 640 PRINT WRONG VOLUME 401 5 X gL 5 V1 RETURN 650 01 22 7 R R 81 2222 7 RXL 2222 7XRXR V1222 7 R RXL RETURN 660 PRINT WRONG ARS 0 FAS 22 7 amp 5R5 R 5R3 13 670 PRINT WRONG VOLUME 5A15 5L5 VI RETURN 680 PRINT WRONG WHS SA 22Z 01 2 22 7KE 5R5 E 5L5 5S1 RETURN 690 V1 B L S3 RETURN 700 PRINT WRONG VOLUME B X L5 3 s VI RETURN 710 V1 222 7 R RXL 3 RETURN 720 PRINT WRONG VOLUME 22 7 5R5 5R5 8 5L5 3 5 1 RETURN 730 81 4222 7 R R V124322 7XRXRXR 5 RETURN 740 750 760 770 IT 780 790 800 810 T IT 820 N 850 840 850 GOSUB 2000 PRINT A FAS RAS ANS L PRINT WRONG VOLUME 4 3 amp 22 7 8 5R3 X R5 S 5R5 V1 RETURN PRINT URONG WHS SAS 4 22 7
26. 1100 2861 Z ON 3Wn10A 08 03 IN 82 39Vd 1110 DATA 3000 37DD RESERVED FOR DMA DEVICES THIS SPA CE IS FREE AND CAN BE USED 3 1110 1120 DATA 37DE DOS COMUNICATION ADRS 9 1120 1122 DATA SCOO SFFF VIDEO DISPLAY N A N 0 3 1122 10 DATABASE VERSION 4 1 10 81 C GRAEME MOAD 6 278 DOMAIN ROAD SOUTH YARRA VIC 3141 20 CLS CLEAR2000 DEFSTRA E DEF INTF Z ONERRORGOTO1370 30 DIMER 11 FORI 0TO11 READER 1 FORI 0TO10 READAP CI 5 NEXT DATA TOTAL FIELD LENGTHS lt 255 BAD RECORD NUMBER BAD FIELD NAM E NUMBER FILE TOO LARGE FILE INCOMPATIBLE FILE NOT FOUND DISK FUL L BAD FILE NAME DISK WRITE PROTECTED OR NOT AVAILABLE BAD PARAMET ER NO MORE SPACE 50 DATAPAGE LENGTH LINE LENGTH TOP MARGIN BOTTOM MARGIN LEFT MAR GIN LINES RECORD LINES BETWEEN RECORDS RECORDS PAGE MAX RECORD WI DTH COLUMNS BETWEEN RECORDS RECORDS LINE 60 AF 9 STRING s 10 INTEGER SK O 70 DO STRINGS 255 128 D1 0123456789 D2 ABCDEFGHI JKLMNOPORSTU VWXY Zabcdefghi jkimnopqrstuvwxyz HA lt gt 05 80 DA CHR 30 DS CHRS 13 09 136 sGOTO360 90 6050 100 GOSUB1 10 M INSTR D ORINSTR DA B IFMTHENPRINT98964 04 DA D9 RETURNELSE90 100 896 0904 960 RETURN 110 B INKEY IFB THEN110ELSERETURN 120 E PRESS ENTER TO CONTINUE DZD5 6054890 RETURN 150 E I
27. 670 700 720 1000 1010 1020 1030 1040 1050 1060 1070 1080 1090 1100 1110 1120 1130 1140 1150 1160 1170 1180 1190 1200 1210 1220 1230 1240 1250 1260 1270 1280 1290 1300 1310 1320 1330 1340 1350 1360 1370 1380 1390 1400 1410 740 NW NW 1 RETURN PRINT RIGHT zNR NR 1 RETURN INPUT WHAT IS WHOLE SURFACE AREA S IF ABS S1 8 4 81 1000 THEN 1060 ON T GOSUB 480 520 560 580 610 640 680 700 720 740 NW NW 1 RETURN PRINT RIGHT NR NR 1 RETURN M1 2 IF R lt 10 THEN 1100 H1 9 R1 9 L 45 GOTO 1110 H1 R R1 R L 5 R X1 109 X2 X1 2 amp M18R1 X3 X2 X4 X1 40 Y 2 Y1 R1 M1 SL 0 SP SL GOSUB 2380 PRINT9 887 R 875 5 1 5 2 948 R RETURN GOSUB 2330 H1 H R1 R X1 109 X2 X1 2 amp M14 amp R1 X3 X2 X4 X1 1 40 2 1 1 1 SL 0 SP SL GOSUB 2380 887 H PRINT 875 58X1 58X2 L 948 R RETURN GOSUB 2330 02 01 1 01 amp SIN AN R1 5 R E2 58H C2 0 5 1 109 X2 X1 2 M1 R1 X3 X1 25M1XD1ZCOS AN 4 5 25 1 8 1 Y1 40 Y2 Y1 H1 xHM1 SL X2 X3 CY1 Y2 SP SL GOSUB 2380 FOR X O TO 1 5 1 2 X1 XS amp SET X1 X Y1 Y s NEXT FOR X O TO 4 2 1 2 X4 X2 X SET X2 X Y1 Y sNEXT PRINT23930 DIAGONALS RETURN GOSUB 2330 H1 H R1 R 109 2 1 2 1 1 Y1 40
28. 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 01 1 Data separator for above 25 00 HD 013 Dual cassette Interface kit 15 00 A choice of upper and lower case display is easier to read Both programs give your TRS 80 Model or System 80 gives greater versatility an optional typewriter capability i e shift for upper case Micro 80 lower case modification gives you this facility The second programme also includes Keyboard debounce plus the symbols for the 4 playing card suits for 49 00 and a flashing cursor 2 00 amp You fit it Or we can The Micro 80 modification features true below the line Fitting the modification requires soldering inside the descenders and a block cursor computer Thisshould only be carried outby an experienced Each kit comes with comprehensive fitting instructions hobbyist or technician and two universal lower case drive routines on cassette to If you are at all dubious a fitting service is available in all enable you to display lower case in BASIC programs capital cities for only 20 00 The driver ro
29. BANK SHOP ENGL ISH PHOTOGRAPH BLACKBOARD LOSSOM BOTTLE CATERPILLAR CAMERA CIRCUS ELEPHANT ZEBRA 2190 DATADONKEY HEADMASTER COUNTRY CRICKET ELECTRICITY EVENING XPLORE FAMILY FLAVOUR FIFTEEN HARBOUR HEART HELICOPTER HISTORY PO LICEMAN JOURNEY KIWI LAUGH LESSON MARBLE MARSHMALLOW MISTAKE 2200 DATAMOON EARTH MONSTER MYSTERY MUSIC SCIENCE NATURE NEEDLE NEIGHBOUR NUMBER LETTER HUNDRED ONION ORCHESTRA PIANO PARROT PEAC OCK DOLLAR PEOPLE PICNIC PICTURE PILOT PLANT PUPPY QUARTER 2861 Z ON 3WN 10 08 OUIIW 92 39Vd 2210 DATAGUESTION ANSWER RABBIT RADIO TELEVISION TELEPHONE RASPB ERRY SANDWICH BISCUIT SCOUT SEVEN EIGHT SHELL SIMPLE DAUGHTER SUB TRACT SUBJECT SUMMER AUTUMN SPRING HORRIBLE TICKET TOMORROW 2220 SENIOR 2230 DATAACQUIRE ACROBAT ACTIVATE ADJACENT ADVOCATE AESTHETIC AF FLUENT AFLAME AGENDA AGGRAVATE AGRICULTURE AISLE ALARM ALBATROSS ALGEBRA BALANCE BAMBOO BANANA BASKET BATTERY BIBLIOGRAPHY 2240 DATACALCULATE CALENDAR CAMOUFLAGE CANDIDATE CAPACITY CAPITA L CAPTIVE CASSEROLE CATEGORY CENTENARY CHAMP ION CHARACTER CHEMICA L CHOCOLATE CLASSICAL CLINIC COMBINE DECLARE DECEIVE DEGREE 2250 DATADEMONSTRATE DEPRECIATE DESCEND DEVICE DIET DIFFICULTY D ISCREET DISPLAY DOCUMENT EMIGRATE ENGRAVE EQUAL ESTIMATE EXERCISE FAMOUS FALSE FLEXIBLE FORGIVE FRAGILE GALLERY GENEROUS 2260
30. D1 GOSUB230 C1 NEXT PREVIOUS C2 NP lt gt ORETURNELSER X 1 GOSUB1 460 550 IFR 10RR NRRETURNELSEGOSUB1 470 60518680 ONMGOSUB430 660 670 640 650 420 580 6010650 640 R R 1 RETURN 650 R R 1 RETURN 660 X R 1 Y R 1 W 1 GOSUB480 605481450 RETURN 670 R 0 RETURN 680 1 EDIT DELETE QUIT D EDQ C2 DA edq C3 GOSUB9 O RETURN 690 E NEW FILE GOSUB140 IFM 2RETURNELSE20 700 E PRINT RECORD S 53 7 0 01 03 GOSUB230 IF I E lt ORETURNEL SEG OSUB140 IFM 2RETURN 710 E OUTPUT TO PRINTER OR VIDEO D VP DA vp GOSUB90 IFM 1T HENP2 1 PL 16 PW 64ELSEP2 0 PL 66 PW 80 720 0 0 PL PP 1 PW3s FORI OTONF 1 F 4 1 1 5 1 0 6 ID F 1 1 2 20 PP 4 0 PP 5 NF 6 7 PL NFsP P 8 PW PP 9 O PP 10 21 PP 3 PP O CPP 2 CPP 5 amp PP C7 730 CLS GOTO890 740 I 20 PP 0 PL GOSUB1030 IFPP 0 lt 10RPP O gt PLTHEN740ELSEPP 5 N 7 O NF PP 5 0 CPP 2 CPP 5 amp 7 GOSUB1000 750 1 1 1 605181050 IFPP 1 lt 10RPP 1 gt PWIHEN7SOELSEPP 8 P P 1 PP 10 1 GOSUB980 GOSUB1000 760 I 2 GOSUB1030 IFPP 2 gt 0 THENZ6OELSEPP 7 PP O PP 2 NF PP 3 O PP 2 PP 5 7 GOSUB1000 770 1 4 605181030 IFPP 4 gt 1 THEN77OELSEPP 8 PP 1 4 6050 B980 GOSUB1000
31. 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 OTHERPROGRAMS INFINITE BASIC BY RACET 32K 1 DISK 49 95 50c p amp p Full matrix functions 30 BASIC commands 50 more STRING functions as BASIC commands GSF L2 48K 24 95 50c p amp p 18 machine language routines including RACET sorts BUSINESS ADDRESS AND INFORMATIONSYSTEM 48K DISK 24 95 50c p amp p Allows you to store addresses and information about businesses edit them and print them out HISPED 1216 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 T
32. NO 2 JANUARY 1982 MICRO 80 PAGE 12 SOFTWARE SECTION x x MEASUREMENTS 12 16 by G Skoryk This program was developed to assist a high school student with her studies It draws partially dimensioned figures on the screen and asks questions concerning the missing dimensions It deals with the following figures Cube Rhombus Face Prism Cylinder Parallelogram Face Prism Cone Rectangle Face Prism Pyramid Trapezium Face Prism Sphere Triangle Face Prism There are two modes of operation Check homework user selects dimensions Practice computer selects dimensions at random The figure selected is drawn on the screen to scale within the limits of the screen and the operator is asked to answer questions If the answer is wrong the correct answer and method of calculation is displayed At the completion of each set of problems the progress score is displayed with the option to continue or quit A PRISH HAS PARALLELOGRAM FACE 5 BY 5 HIGH ITIS amp 0 DEEP WHAT IS AREA OF FACE B AREA OF BASE 9 HEIGHT 40 WHAT IS THE VOLUME g SAMPLE SCREEN DISPLAYS The program logic is as follows LINE NOS 30 60 Assign string variables for repetitive words in text thus saving a considerable amount of typing time 190 Displays menu and allows operator to make selections 117 137 Branch off program to sections according to selections made 290 amp 302 3 3 5 2104246 Subroutines which deri d ic
33. TOTUP A CUM 7 7 CALC2 CONV DDIV CONV DMULT PIACC HL HL 2861 Z ON SWNTOA 08 0391 ve 39Vd VOLUME 3 2 JANUARY 1982 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 VDU SAVE L2 4K This BASIC program creates a machine language program that allows the screen display to be saved into memory and then be recalled at a later time Two new commands are added to non disk BASIC LSET to store the image and RSET to recall an image FLASHING MESSAGE 12 16 1 A machine language program which displays a flashing message at the top of the screen independent of the BASIC program you are running The rate of flash can be adjusted and the message can be turned on or off from BASIC MIND READER L2 4K INCOME TAX L2 4K Before you know where you are it will be that time of year again so be ready for it with this program which will calculate the income tax payable for person who would normally complete the Australian S Income Tax return LONGVARS L2 48K 1 This is machine language pre processor for BASIC programs It will allow you to use long variable names in a BASIC program in the development stage so that names like AARDVARK and AARDWOLF will be dis tinguished Also variable names that Can this program read your mi
34. TURTLE 2330 DATAULTIMATE UNDERSTAND USUAL VAGUE VALUE VANISH VARIETY VE RSATILE VEGETABLE VOLUME VISUAL VOWEL WAGE WANDER WARRANT WATCH W EIGH WETHER WHISPER WHOLE WI TNESS WORTH WRONG YIELD YOUTH 2340 DATAZERO ZENITH WALNUT VIEWER VELOCITY TURBULANCE TORCH STR ENGTH SPHERE SILVER SCORCH SCHEDULE REVOLVE PRESCRIBE PERIOD ODD MODIFY MATERIAL LIQUID JUICE HASTE FUTURE EXTREME DELICATE FILES 1 POKE16561 250 16562 255 POKE16544 200 POKE1 6545 253 CLEARS 00 N 220 2 Z1 E7DFSFFFCDECOF2445252424E72B22FOOSEFE10511001EE72727272E4 EF3SEF4O0O0E2FFEBEOO2EF 3221F003021F2F 42F 42F 4EDCFE7DFCCOOO2FF702F 42F7 SEFCDSC33429F234A43DFS3DF SDF DCCEOF 3DFB2OFFOCSOSDFFFED2DFESDF 1 17FODC F7ESDFDECE2DFA727275EC55433300000 Z22 D3DE1DESSS55DDEA4OESO3ESOBES6BO233AQ0E560F914009B133231303D3 SEAOEF 60B1 FEDOB6520E6030B636030B2902B02D0 1 1 1 1DBDE3C6621FEE43E0098 20E99E3230 1 6E240F 29E2AE28E99D335A8E70A 1 EDOE128E51551 1EDBIEISBE744 59 1 19518 757 57 1925 4 CLS PRINT9532 I N I T I L 5 I N G FORI 1TON PRINT2606 N Is sN1 ASC MID 21 1 120 sGOSUBS I1 2N1 5 MIDS 22 1 1 GOSUBS POKEI 513 16XI1 N1 NEXTIs GOTO6 5 IFN1 gt S7THENN1 N1 55 RETURN ELSEN1 N1 48 RETURN 6 Z1 Z2 3 CLEARSO POKE1 6526 126 POKE16527 254 X USR 0 20 REM xix DATA PROCESSING AND FILING SYSTEM SO 7 BY EDWIN R PAAY 39 FAIR
35. 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 machine Invaluable supplement to either the TRS 80 Level II Manual or the System 80 Manuals MORE AUSTRALIAN SOFTWARE All programs designed to run on both the TRS 800rthe 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
36. simply enter RUN 550 for the purposes of this demo 550 INPUT NO OF 5 IF lt 1 THENSSO 960 DIM A N RANDOM 970 FOR I 1TON 580 ACXI RND 1000 1 590 600 PRINT INPUT HIT ENTER TO 610 L 1 60548590 7 CALL SORT SUBROUTINE 620 FOR I 1TON 630 PRINTACT 5 640 NEXT I Figure 1 shows the flowchart for this sorting algorithm straight insertion sorting ANALYSIS Straight insertion sorting requires that an average of N2 comparisons and moves be made This happens to be better than the average number in bubble sort In bubble sort each successive pass is reducing in size by 1 but all the items in the current pass size must be examined However in straight insertion sort although the number of passes is approximately the same as bubble increasing in size instead of decreasing the average number of comparisons per pass 1 approximately half because the probability of finding an item that is or the current item in a given pass before the half way point is reached is 1 in 2 This accounts for the increase in efficiency of the straight insertion sort over the bubble sort 1 2 times on empirical evidence and the random pass sizes indicated by the flashing graphic block A REFINEMENT One way to increase the efficiency of the straight insertion sort is to use multiple insertion This involves picking up more than one item as a candidate for insertion say 3 it
37. supply adequate instructions notes on what the program postage if you want your cassette or disk returned does and how it does it etc The changes or improvements that you think may improve it For system tapes the start end and entry points etc VOLUME 3 NO 2 JANUARY 1982 MICRO 80 PAGE 36 CASSETTE DISK 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 All 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 supplied with NEWDOS or NEWDOS 80 version 1 0 to run them APPROX START POSITION SIDE ONE TYPE I D DISK FILESPEC CTR 41 CTR 80 SYSTEM 80 TESTSTR Demonstration L2 4K T TESTSTR BAS 15 10 1
38. to use their own sort routine This can be done simply by replacing the subroutine at line 350 VOLUME 3 NO 2 JANUARY 1982 MICRO 80 PAGE 16 NOTE TRSDOS users should load SORT CIM before entering BASIC 25 DIMX 2 CMD LOAD SORT CIM DEFUSR amp HFFOO 550 2 0 0 NR X 1 VARPTR AR 0 ZZUSR VARPTR CX O RETURN NOTE Line 25 is INSERTED and Line 350 REPLACES the existing line The following functions are available ADD New records are appended to the end of the file When an entire record has been entered an opportunity to EDIT or DELETE the record just entered is given DELETE After entering the delete command an opportunity is always given for you to change your mind before the deletion is carried out The file is sorted according to the last used or the default sort key following DELETE EDIT To edit a field entry it is necessary to re enter the entire field To clear a field enter a space To leave a field unchanged just press enter FIND Enter either the number or the name of the field to be searched Enter enough characters to identify the expression to be found All records in which the specified field BEGINS with the entered string will be found FIND2 To find records which contain the expression WITHIN the field preface the string to be found with a All records in which the specified field CONTAINS the string will then be found FIND3 Long form format displays entire reco
39. 0 n u 22 15 16 MEASUREMENTS L2 16K M MEASURE BAS 30 21 22 d q 105 71 75 SUPER HANGMAN L2 16K H HANGMAN BAS 170 116 120 B 255 171 180 DUPLEX SYSTEM DUPLEX DUPLEX CMD 325 221 230 t 335 226 237 SIDE TWO DATA BASE MANAGEMENT SYSTEM 48K DISK D DBMS BAS 15 10 10 97 65 68 FILES L2 48K F FILES BAS 170 114 120 210 141 148 DUPLEX EDTASM DUPLEX DUPLEX EDT 250 167 175 B 295 198 208 zx 5 gt 2 o E s 2 m a M 9 y og vi 8 59 Si TENE gt on 5 27 NN FD m o 2 3 ojo sss zo o Pg oO 28 2 2 e of 5 d o5o G pe m Oe 50 5 2 co 8 2 09 F 79 y e 9 6 o 3 gt ols mi o gt 9 z 2 3 Cu 8 gt z c o o 5 8 a T 5 35 s 404 8 gt gt E x BN 281 55 gt 2 gt lt z 9 86 5 EE lt 90 g s jJ m gt 5 5 e 5 s ct t 5 R D A SPECIAL OFFER iets FOR THE FIRST TIME IN AUSTRALIA GENUINE TANDY TRS 80 MICRO COMPUTERS IHARDWARE AND SOFTWARE AT GREAT DISCOUNT PRICES HOW TO ORDER 1 SELECT ITEMS FROM 1980 TANDY CATALOGUE 2 DEDUCT 10 FROM ADVERTISED PRICES
40. 0 DIMDT F1 4 FORI OTONF 1 F2 F 1 I 60 FLzM 64512 F1 GOSUB330 F1 F1 F2 1 NEXT M 64512 F2 64 330 POKEVARPTR DT 1 2 INT M 256 POKEVARPTR DT 1 1 M CINT M 256 2256 POKEVARPTR DT I F2 RETURN 340 DIMF 6 NF 1 BL 16 BH NF 1 3 FORI OTONF 1 F 3 I I NEXT RE TURN 350 FORI SKTOOSTEP 1 CHD O NR AR O 2 F CS T F CL F 3 1 gt RETURN 360 CLS PRINT O DATABASE MANAGEMENT SYSTEM VERSION 4 1 10 81 MEMORY SIZE SHOULD BE SET AT 40960 370 PRINT3256 1 INITIALIZE NEW FILE 2 LOAD FILE FROM DISK E OPTION D 12 6050890 ONMGOSUB1 150 1260 lt gt OTHENS60ELSE390 390 CLS GOSUB1430 PRINT9128 A ADD D DELETE EDIT F FIND L LIST M MERGE NEW P PRINT S SORT W WRITE E OPTION D ADEFLMNPSW DA adef 1 mnpsw 400 GOSUB90 ONMGOSUB410 470 450 510 620 1290 690 700 1040 1210 G 070390 410 CLS C1 ADD NEXT PREVIOUS C2 NPA C3 npa 60508420 GO T0630 420 IFNR 1 gt MRTHENIE 1 1 RETURNELSENR NR 1 R NR LSETAR NR 1 s GO SUB1 430 605181460 GOSUB430 RETURN 430 D D1 D2 FORJ OTONF 1 E AF J s S3 F 1 J GOSUB150 IE 0 IFBS lt gt LSETDU J BS IFF 0 J RSETDU J BS 440 MID AR GC 1 F 2 3 DUCJ NEXT RETURN 450 E EDIT RECORD 83 3 D D1 GOSUB230 lt ORETURNELSER X 1 GO SUB1460 460 GOSUB130 IFM 2THENGOSUB430 GOTO460E
41. 1 4384 4385 4387 4388 4389 438B 438C 438D 438E 438F C39B43 C3C643 00 42 007500 0025 007200 0025 9 1 00130 00140 00150 00160 00200 00210 00220 00250 00500 00510 00520 00330 00340 00400 00410 00420 00430 00440 00450 00460 00470 00480 00490 00500 00510 00520 00530 00540 00550 00560 00570 00580 00590 00600 00610 00620 00630 00640 00650 00660 00670 00680 00690 00700 00710 00720 00730 00740 00750 00760 00770 00780 00790 00800 00810 SHAPE SNERR VARPT RETN TABLE REST TNEXT STORE DIXIE SCAN LP1 NXT1 LP2 LPS NXT2 LP4 2861 Z ON 3NN TOA 08 0391 L 39Vd 4590 4592 4595 4396 4397 4399 439A 439B 439E 439F 43A0 4581 4544 4585 4306 4307 4308 4549 AZAA 43AD 43AE 43B1 43B2 43B3 43B5 43B8 43BC 43BE 43BF 43CO 43C1 43C5 43C6 43C7 43C8 43CB 43CC 43CF 43D2 43D5 43D6 43D8 43DA 43DB 43DC 43DD 43DE 43DF 43ES 43ES 43E8 43EB 43EC 43ED 43EF CDD709 EB 05 2B D7 DS CD3723 CD5043 0025 00211042 DDES CDOD26 CD5043 00820 00830 00840 00850 00860 00870 00880 01000 01010 01020 01050 01040 01050 01060 01070 01080 01090 01100 01110 01120 01130 01140 01150 01160 01170 01180 01190 01200 01210 01220 01230 01240 01500 01510 01520 01530 01540 01550 01560 01570 01580 01590 01600 01605 01610 01620 01630 01640 01650 01660 01670 01680 01690
42. 3 2 GOSUB150 N 84 IFN gt 48THENIE 10 GOTO119O0ELSEIFNPOTHENF 1 zN 2861 AuvnNvP Z 08 0 21 05 39Vd 1200 608181450 NEXTI 605181 30 1 60508280 RETURNELSE20 1210 E WRITE RECORD S 83 7 D D1 D3 60518250 lt ORETURNEL SE GOSUB140 IFM 2RETURN 1220 GOSUB1330 GOSUB1340 2 AI 1230 PRINT 2 NF FORI OTONF 1 PRINT 2 CHR 34 AF 1 5 CHR 34 F 0 D 3F 1 1 5F 4 1 F 5 I 3F 6 1 FORI OTO10z PRINT42 PP I EXT 1240 OPEN R 1 GOSUB1 360 FORI XTOYSTEPF FORJ OTOF 1 IFI d lt YT J AR 1 3 ELSELSETA J 1250 NEXTJ PUT1 1 F 1 NEXTI CLOSE RETURN 1260 GOSUB1330 AN BS GOSUB1340 OPEN I 2 AI 1270 INPUT 2 NR GOSUB1440 GOSUB340 FORI OTONF 1 INPUT 2 AF 1 F 0 1 F 1 1 F 4 1 F 5 1 F 6 1 GOSUB1450 NEXT FORI OTO10 INP UT 2 I 60508280 gt MRTHENIE 4 60101520 1280 OPEN R 1 4R GOSUB1360 FORI OTONR 1STEPF FORJ OTOF 1 GET1 F 1 LSETAR G J SA J NEXTJ CLOSE RETURN 1290 605081550 60881540 OPEN I 2 AI INPUT42 1 1 lt 2NFTHEN 5 GOTO1320EL SEIFNR NO gt MRTHENIE 4 60701520 1500 FORI OTONF 1 INPUT 2 N1 N2 IFN1 lt gt F O I ORN2 lt gt F 1 I THENIE 5 GOTO1 320ELSEINPUT 2 N1 N1 N1 NEXT 1310 OPEN R 1 AR GOSUB1 560 FORI OTONO 1STEPF FORJ OTOF 1 GET1 I F 1 LSETAR NR I J A
43. 3 60 60 52 8 62 2 0 11 63 5 3 36 0 40 1 0 410 DATA 0 60 52 62 63 63 61 56 60 0 2 60 1 2 47 5 2 36 1 32 6 0 420 DATA 0 52 48 62 61 63 61 48 56 0 32 7 60 1 11 16 2 38 0 1 24 1 430 DATA 8 48 48 62 61 63 52 48 24 0 26 2 60 22 10 16 9 18 1 3 24 1 440 DATA 0 52 48 62 63 62 61 48 56 0 32 7 2 60 11 16 2 36 2 0 25 1 450 DATA 0 60 52 62 63 63 52 60 20 0 47 7 0 41 22 0 2 36 0 33 6 0 460 DATA 56 60 60 63 63 63 60 60 52 0 47 51 1 2 42 28 0 41 0 32 6 1 470 FORJ OTOS3 480 FORI 1T09 READX D J 0 J X128 NEXTI J 490 FORJ 4TO11 K 13 IFJ STHENK 16 500 FORI 1TOK READX D J D J 128 NEXTI J 510 FORI OTO27 READX D I X 128 NEXTI 520 DATA 0 56 63 59 60 54 63 60 16 2 19 31 27 27 27 59 0 0 530 DATA 0 10 63 31 15 47 63 0 0 48 48 63 4 0 8 63 48 48 540 DATA 32 48 60 14 63 47 60 63 47 31 44 52 48 550 DATA 2 15 60 16 29 25 25 25 59 0 0 0 5 11 28 16 560 DATA 0 0 56 28 63 47 60 63 47 13 60 16 0 570 DATA 0 0 2 19 51 27 25 27 63 5 5 0 0 580 DATA 48 56 12 15 63 47 60 63 47 15 15 44 52 590 DATA 0 3 13 16 29 25 25 25 59 0 0 14 1 600 DATA 56 28 15 15 63 47 60 63 47 15 47 52 0 610 DATA 2 3 20 0 29 25 25 25 59 0 56 7 0 620 DATA 60 31 15 0 2 9 0 32 63 15 0 11 37 0 630 DATA 0 32 63 12 44 30 5 0 52 65 5 61 14 5 640 T 0 KKKZKKKZKKHZGZF ZKKKZKKHZFFGZ I ZKZKKKZKKKZKKHZGZF ZHF DZZ EFGHZFFHZKKMZMMMZMMMZL ZK ZMMMZMMMZMMKZIZHZZKZJZHZZOZNZMZZZZZDDHZDD IZDDFZZZZZ 650 T 1 2 ABACDCEFEHZZJ IHGFEDCB
44. 5 INE 5H 412 IFFG 1THENRETURN 420 PRINT lt lt lt gt gt gt CONTINUE SEARCH OR STOP C S 5 421 60508250 IFAS THEN421 ELSEIFA C THENSSO 422 60 040 452 IF ERR 2 1 10RESUMENEXT 435 IF ERR 2 1 lt gt 4THEN450 440 IFERL 350 THENRESUMESO8 450 PRINT ERROR 5 ERR 2 15 IN LINE ERL XX END 460 READC IFC 9 THENRETURNELSE460 508 CLS PRINTCHR 23 520 IFFL 1THENPRINT AS INKEYS 6010540 ELSEIFA CHR 8 THENS44 ELSE SB J NEXT PRINT DATA IS INL ALL DATA HAS BEEN SEARCHED XX FORJ OTO15300 NEXT GOTO320 550 PRINT X DATA NOT FOUND X X amp FORJ OTO1500 NEXT GOTO320 540 CLS END 550 XXX EDIT FILE xxt 560 CLS PRINT TO DELETE OR EDIT FILES STOP THE PROGRAM AND EDIT DATA LINES USING THE EDIT COMMAND PROVIDED BY BASIC IF YOU WISH YOU CAN ENTER DATA AND I WILL TELL YOU WHICH LINES 570 PRINT CONTAIN THE DATA IN QUESTION 2 ENTER DATA OR TYPE lt CHR 92 gt 580 B ONERRORGOTO630 590 60508250 IFAS CHRS 10 4 CHR 13 THEN600 ELSEIFA CHR 8 THENGOSUB660 590 ELSEB B A GOTOS90 600 RESTORE 60548460 READX 610 READC IFC B THEN62O ELSE610 620 60548460 READX PRINTX GOTO610 630 IFERL 610 AND ERR 2 1 4THENRESUME650 640 GOTO450 650 PRINT ELSEIFAS PRINTCHR 30 5 SEARCH COMPLETED amp INPUT TYPE ENTER TO CONT
45. 68 FOR Y 20 TO 34 SET X YOs NEXT Y 2040 X 116 FOR 20 TO 34 SET X Y NEXT Y 2050 X 92 FOR Y 34 TO 40 STEP 2 SET X YO NEXT Y 2060 505 L PRINT 941 R RETURN 2070 INPUT PRESS NEW LINE Z CLS 2080 Y1 34 GOSUB 2310 GOSUB 2320 2090 FOR X 0 TO 24 Y X SET X 68 Y 354 X 10 REM SUPER HANGMAN C AUG 1981 MARTIN DOWNEY 99 99999999599999 95999999 95999599 99 98599 9 5 5 20 CLS OUT254 255 50 FORI OTO15 FORJ OTO9 PRINT29 IX64 2 JX6 SUPER 40 PRINT23468 STRING 24 3 PRINT39660 STRING 24 2100 FOR 0 TO 24 SET X 92 Y 10 MEXT X 50 PRINT3532 HANGMAN s CLEAR2500 27 1 2110 X 92 FOR Y 34 TO 40 STEP 2 SET X Y NEXT 60 PRINT3596 SIGHT amp SOUND s 2120 PRINT2365 L PRINT2941 R RETURN 70 846 C AUG 1981 MARTIN DOWNEY s 2130 INPUT PRESS LINE 3 Z CLS 2140 FOR X 24 TO 24 Y 5 2402 XC2 E S3 SET X 92 Y 28 X 2150 FOR X 24 TO 24 Y 9 24L2 XE2 LE Bs SET X 92 Y 28 NEXT X 2160 X 92 FOR Y 28 TO 40 STEP 2 SET X YO NEXT Y 2170 PRINT 941 Rs RETURN 2180 INPUT PRESS LINE Z CLS 2190 Y 40 FOR X 80 TO 104 5 X 2200 FOR X O TO 12 58 5 104 40 X 2210 FOR X 12 TO STEP 1 5 104 28 NEXT X 2220 Y 28 FOR X 104 TO 80 STEP 1 5 X 2230 FOR 12 TO O STEP 1 5 5 68 Y 54 sNEXT X 2240 FOR
46. 7 GOSUB1930 L 3 H 100 GOSUB1800 FORX 53T067 Y X 29 1980 IFPOINT X RESET X Y sSET X NEXT 1990 SET X Y RESET X Y s NEXT 2000 PRINT3865 L 5 H 10 GOSUB1800 L 50 H 20 GOSUB1800 PRINT3865 CHR 131 s RETURN 2010 PRINT9405 PRINT3418 3 2PRINTO469 2020 PRINT3482 s s RETURN 2030 GOSUB2010 PRINT3408 D sPRINT9472 D 1 FORL 1TOLL 2040 NEXTL RETURN 2050 LL 50 K 10 GOSUB2030 0 GOSUB1 930 FORL 1TO30 2060 NEXTL RETURN 2070 IK 1 IFKK lt I I THENIK 1 2080 IFII lt 1THENII 1ELSEIFII gt 7THENI I 7 2090 FORII IITOKKSTEP IK GOSUB780 FORJ 1 TOLL NEXTJ RETURN 2100 PRINT9O STRINGS 63 32 PRINT944 STRINGS 63 32 2110 L 30 H 20 GOSUB1800 H 40 GOSUB1800 RETURN 2120 X RND 150 IFLV S THENX RND 418 2130 FORI 1T0X READW NEXTI 2140 W 5 2 6 1 sG 1 1 95 2150 RETURN 2160 DATAAEROPLANE CAR TRUCK HORSE CAT DOG BICYCLE HOUSE HOLIDAY SCHOOL ROAD DOCTOR TEACHER NURSE ROOM CLASS PENCIL PAPER BABY FA THER MOTHER SISTER BROTHER FRIEND RUBBER ROCKET CHICKEN HEN 2170 DATAFARM COW HOSPITAL SHEEP BUTTER COLOUR YELLOW BEDROOM BA TH FOOTBALL OCEAN WATER WOOL WEATHER RAIN SNOW SUNSHINE HOME SPEA WITCH WORK WOMAN TENNIS TOP TEACUP BREAKFAST LUNCH DINNER 2180 DATAFOOT KNEE LEG APPLE ORANGE LEMON QUEEN KING CASTLE ARIT HMETIC BACKWARD BALLOON
47. DATAGLANCE GRATEFUL GUIDE HANDICAP HARMONY HEIR HEPTAGON HO LLOW HONOUR COMPUTER HYGIENE IDLE ILLUSTRATE IMPATIENCE IMPRESS I NCREASE INDICATE INNOCENT INTELLECT INTRUDE ITCH JACKET 2270 DATAJUNCTION KALEIDOSCOPE KNOCK LANTERN LEAGUE LEASH LEOPAR D LICENCE LITERAL LODGE LOTION MACHINE MAINTAIN MAMMOTH MANIPULAT E MANUFACTURE MARINE MEDIUM MAX IMUM MESSAGE METEOR MIDDLE 2280 DATAMILL ION MISCHIEF MISCELLANEOUS MOMENT MULTIPLY MUSTARD NARROW NEPHEW NECESSARY NELITRAL NONSENSE OFFICE OPERATION OPINION OVERHAUL PADDOCK PAINTER PARAGRAPH PASTE PATROL PEASANT 2290 DATAPENSION PERMANENT PERSIST PHYSICAL PIECE PILLOW PLANET VENUS MERCURY MARS JUPITER URANUS NEPTUNE PLUTO PLASTER PLASTIC P LATEAU PNEUMONIA POISON POPULAR POSITION POVERTY PRACTICE 2500 DATAPROGRAMME PROVIDE PUNCTURE QUANTITY QUEUE QUOTE RADAR R ANK RATIO REACT RECIPROCAL RECOGNISE REFER REFRIGERATE REHEARSAL RELATIVE REQUIRE RESPECT RHYTHM RIDICULOUS ROTATE RUIN RUSH 2510 DATASABOTAGE SADDLE SATISFY SATURN SCARLET SCENE SCISSORS 5 CRATCH SCREAM SECONDARY SENTIMENT SEPERATE SHAFT SHINGLE SHOULDER SIGNATURE SINGLE SLEEVE SOCIAL SOUTH SPECULATE SPIRAL SPLIT 2320 DATASPORT SQUEAL STADIUM STATUE STOMACH STRANGE SUBSTITUTE SURGEON SYMPATHY TACTIC TALENT TARNISH TEMPORARY THOROUGH THROAT TIMBER TYRE TOUCH TRAFFIC TREASURE TRIANGLE TROUBLE
48. DZ ZBCBDEDFGFHZ ZABAgABCDEZ 7770006 GGEEEFZDDDGGGEEEF ZDDDCDEFGHZ ZZZ ZZZ Z 660 T 2 2 LLJHJLMZGHZZMMKIKMLZGHZZLL JHJLMZGHZZMMKIKMLZHEZZGZZGZ ZGGIGEZHZZHZZHHJHEZIZZIZZIIKKHIJJIHGFEZAQ9ZZZZZ22Z 670 T 3 IHIFZFZF IZHZDZEDZ IFFFFF IHIDZEDZZ IF ZFFFZIZDDEDZIHZFZZZ IDZEDZIHZFSZZEZESF5Z2Z22222 T 4 2 FFEDFFGZFFEDFZGZFFEDCDEFGI HGF ZF Z 690 WW WODW WOW WOW wWLU WW WW WW WW WW 700 ARS STRINGS 32 32 lt lt lt lt STRING 32 32 710 0 05 FORJ 1T04 READX 5 1 5 I CHRS 128 X sNEXTJ I 720 FORI OTO9 READX Z X 256 Y IFZ gt 32768THENZ Z 65536 750 M 1 ZsNEXTIs RETURN 740 DATA 24 1 2 36 2 36 24 1 32 6 9 16 2 56 24 1 750 DATA 0 26 37 0 0 37 26 0 760 DATAO 205 127 10 62 6 211 255 69 16 254 61 254 5 40 246 37 2 00 24 240 770 FORI 0TO3 PRINT9405 1464 RETURN 780 218 11 9283 II PRINT9348 C RETURN sDS I 5 sS NEXTI 790 800 810 820 830 840 850 860 870 880 890 900 910 920 950 940 950 9650 970 980 990 1000 1010 1020 1030 1040 1050 1060 1070 1080 1090 1100 1110 1120 1130 1140 1150 1160 1170 1180 1190 1200 1210 1220 1230 1240 1250 1260 1270 1280 1290 FORX 307098 SET X 39 SET X 46 sNEXTX FORY 40T045 SET 30 Y SET 31 Y sSET 97 Y s SET 98 Y s NEXTY PRINT3926 LEN W FORK 1TO2XLEN W PRINTGS NEXTK RETURN
49. H ODA1H ODESH O9D3H O9FCH OA4FH 40AFH 411DH 4127H 42BFH 42COH 42C8H 42DOH 42D8H 42 8100H 68C4H 0A221H OFDAH 8149H OE9CAH 1294H OFA3SH 7BOEH OCF7BH OF7D1H 7217H 8031H HL NTF HL 8 8 255 FLAG A E 1X D 1X 1 DOIT1 OUTVAR NDVCUM swap DE TOT DOIT1 SWITCH OUTTOT 2861 AuvnNvC Z ON 3WNIOA 08 0 21 39Vd 4445 4448 444B 444C 444F 4452 4454 4457 445A 445D 4460 4465 4465 4468 4460 446D 4470 4473 4475 4478 447A 447D 447F 4482 4484 4487 448A 448D 4490 4492 4495 4498 449A 449D 44450 4402 4445 4447 446F 44B2 44B4 44B7 44B9 44BC 44BF 44C2 44C5 44C8 44CB 44CC 44CF 4400 4402 CD1F44 CDEB44 AF 32DF 42 CD7F44 1809 CD6544 CDEB44 CD7544 CD6D44 21D042 180B 210042 1806 CDC244 21C842 111D41 1815 11 042 180D 11C842 1808 11FF43 1803 110744 211041 C3D309 110042 180B CD7A44 11D042 1803 11FF43 212741 18E8 110842 1876 CD1F44 110F44 18EE CDB944 1808 CDE344 18C1 CDB444 CD8D44 C3A10D CDA244 C3ESOD SABF42 2F 52 42 B7 2805 180C 02610 02620 02630 02640 02645 02650 02655 02660 02670 02680 02690 02700 02710 02720 02730 02740 02750 02760 02770 02780 02790 02800 02810 02820 02830 02840 02850 02860 02870 02880 02890 02900 02910 02920 02930 02940 02950 02960 02970 02980 05000 05010 05020 05050 05055 05040 05050 05060 05070 05080 03090 03100
50. L 1TO3 NEXTL PRINT288 H A N G M N s FORL 1T04 NEXTL M K FORK 1T030 GOSUB1890 GOSUB1 620 GOSUB2050 GOSUB1 840 KK 4 LL 20 GOSUB2070 PRINT983 DO YOU WANT ANOTHER GAME I INKEYS LZ 12 3Z 30 KZ 15 T T 3 W 1Z 0 1Z 1Z 1 GOSUB1760 IFIZ LEN T 1THENIZ O I INKEY IFI THEN1440EL SEIFI N THENCLS ENDELSE GOSUB2100 PRINT923 NEW GAME COMING UP CLEAR2500 GO0TO80 PRINT3298 LZ 20 JZ 8 KZ 10 T T 0 12 1 FORK 3TO8 IFRND 2 1THEN1520 P K 64 33 lt 7 1 IFK 3ORK 6THENP P 1 FORI 1T033 RND 5 GOSUB1760 I Z 1Z 1 IFIZ LEN T THENIZ 1 PRINT P MIDS ARS 28 PRINT9630 MIDS WWS 1 8 NEXT NEXTK PRINT3630 5 60 01420 FORK 10T040 SET K 29 NEXTK RETURN FORK 26T028 SET 10 K SET 23 K s NEXTK FORK 10T023 SET K 25 RETURN FORK 29TO9STEP 1 SET 40 K SET 59 K Ss NEXTKs RETURN FORK 38TO15STEP 1 SET K 9 NEXTK FORK 34T039 SET K K 2 7 sNEXTK RETURN FORK 10T014 SET 15 K IFK gt 12SET 16 K 526 S 0 PRINT9390 S 1 RETURN RESET 20 25 19 25 RESET 18 25 SET 20 26 SET 19 26 5 18 26 GOSUB1680 RESET 17 25 s RESET 16 25 s RESET 20 26 s RESET 19 26 RESET 18 26 SET 16 26 SET 17 26 SET 18 27 SET 19 27 GOSUB1680 RESET 15 25 s RESET 14 25 s RESET 16 26 s RESET 17 26 RESET 18 27 RESET 19 27 SET 14 26 SE
51. LPL DATN OVER UNIT SPARE A HL 130 ONEAUX DADD OUTVAR SUBONE SUBONE VARAUX DDIV OUTSET 8 127 FLAG A CALC2 TOTAUX DADD HL SPARE HL a 7 P POS CHL O B A DE LOG2 DOIT2 A SPARE FLIP LPL SETUP1 ONEAUX CPACC 1 Z OVER A Z UNIT HL AUX 6 HL 128 CPACC 1 Z UNDER Z UNIT SWAP ONEACC DDIV UNDER SWAP PIACC DSUB PIACC HL 45E2 45E3 45 5 45 45 45 45F1 45F4 45F7 45 45 45FE 4601 4604 4607 460A 460D 460E 460F 4610 4611 4613 40 9 40F9 40FB 40FD 42E9 42E9 42EB 42ED 42EF 42F1 42F3 42F5 42F7 42F9 42FB 42FD 42FF 4301 4303 4305 4307 4309 430B 430D 430F 4311 003C 454 O6CC 35 1822 CD5444 CDE344 CDAF 44 CD6D44 CDC244 CD3744 SACF42 1146 1346 1346 1346 OODD 0845 OODF 5745 OOEO F344 OOE1 1245 OOE2 1745 OOE4 45 4245 0044 45 0052 0446 0050 46 1245 05050 05040 05050 05100 05110 05120 05130 05140 05150 05160 05170 05180 05500 05510 05400 05410 05500 05510 05520 05550 05540 05600 05610 05700 05710 05720 05750 05740 05750 05800 05810 05820 05850 05840 05850 05860 05870 05880 05890 05900 05910 05920 05922 05924 05950 05940 05950 05960 05970 05980 05990 06000 06010 06200 UNDER CALC2 DD DR MULRET DPI FIN FIN1 NEW HL MULRET OUTSET UPNUM CALCX OUTCUM NUMDIV
52. LSERETURN 470 E DELETE RECORD S S3 7 D D1 D3 60508230 IFIE lt gt ORETURN 480 IFW 1R X 1 GOSUB1460 E DELETE THIS RECORD 490 GOSUB140 IFM 2RETURN 500 FORI XTOY LSETAR I DO NEXT GOSUB350 NR NR W RETURN 510 E SEARCH FIELD S3 16 D D1 D2 GOSUB150 U S4 520 IFU lt 10RU gt NF FORI 1 TONF IFINSTR AF 1 1 BS 3THENU IELSENEXT IE 3 RETURN 550 E STRING TO FIND S3 F 1 U 1 GO0SUB150 IE 0 F2 1 AS BS IFIN STR BS 1F2 F 1 U 1 AS MID BS 2 540 E SHORT OR LONG FORMAT D SL DA s1 GOSUB90 F1 0 CLS GOS UB600 IFM 2THENS70 550 E CONTINUE F4 1 FORR 1TONR PRINT3849 R sF3 INSTR MID AR 1 F 2 U 1 F 1 U 1 AS IFF3 gt 0ANDF3 lt F2THENF 1 F 1 1 PRINT9860 13 GOSUB610 IFF1 INT F1 10 10THENE CONTINUE GOSUB140 IFM 2RETU RNELSECL S 60548600 560 NEXT GOSUB120 RETURN 570 1 NEXT PREVIOUS C2 NP F C3 np f 6081814 60 R20 GOSUBS80 GOTO430 580 R R 1 PRINT9849 R FS INSTR MIDS AR R 1 F 2 U 1 F C1 U 1 AS IFF3 gt 0ANDF3 lt F2THENF 1 F 1 1 PRINT9860 F15 ELSEIFR NRANDINKEY gt Q THENS8O 2861 Z ON 08 0391 62 39 4 590 RETURN 600 GOSUB1430 PRINT9832 RECORDS SEARCHED AS RETURN 510 LSETDT NF 2MID STR R 2 FORI OTONF 1 LSETDT I MID AR 1 F 2 1 F 1 1 sNEXTI LSETDS F4 1 NF sF4 F4 1 IFF4 gt 10THENF4 1 RETURNELSERETURN 620 E LIST RECORD S3 3 D
53. N PROGRAM The following represents a BASIC version of a binary search routine with driver 1000 PS POSITION OF ITEM 1 NOT FOUND 1010 L U LOWER amp UPPER BOUNDS OF CURRENT SEARCH LIST 1020 MP MIDPOINT OF LIST DELIMITED BY L amp U 1030 IV INPUT VALUE BEING SEARCHED FOR 1040 7 1050 PRINT INPUT VALUE TO BE SEARCHED FOR IV 1055 L 1 U N 1060 GOSUB 1090 1070 IF PS 1 THEN PRINT NOT FOUND ELSE PRINT FOUND AT POSITION PS 1075 GOTO1050 1080 SUBROUTINE BINARY SEARCH 1090 5 1 1100 IF L gt U OR 5 lt gt 1 THEN RETURN 1110 MP INT L U 2 1120 IF IV lt ACMP U MP 1 BINARY SEARCH ALGORITHM CE 2039 VOLUME 3 NO 2 JANUARY 1982 MICRO 80 PAGE 10 ELSE IF IV gt A MP L MP 1 ELSE PS MP 1130 GOTO1100 1140 END This algorithm is formally defined in figure 2 SEARCH Figure 2 POSITION OF FOUND ITEM FOUND LOWER TABLE BOUND UPPER TABLE BOUND MIDPOINT OF CURRENT BOUNDS VALUE BEING SEARCHED FOR EXIT Now to make use of this code as well as for purposes of demonstration a sequenced search list must be supplied Wonder where we can get one of those from You guessed it We can use the insertion sort above If the binary search routine and driver have been keyed in to follow the insertion sort driver then control will automatically fall through to the binary search driver requesting item to be searched for A RECURSIVE APPROACH As an interesting sideline the binary se
54. N Z Ph 62894 Prices MAGAZINE ONLY NZ 43 00 NZ 4 00 CASSETTE PLUS MAGAZINE NZ 89 00 NZ 5 00 DISK PLUS MAGAZINE 7 175 00 NZ 15 00 MICRO 80 is despatched from Australia airmail to other countries at the following rates 12 MONTH SUB MAGAZINE CASS MAG DISK MAG PAPUA NEW GUINEA Aus 40 00 Aus 83 00 Aus 143 00 HONG KONG SINGAPORE Aus 44 00 Aus 88 00 Aus 148 00 INDIA JAPAN Aus 49 00 Aus 95 00 Aus 155 00 USA MIDDLE EAST CANADA Aus 55 00 Aus 102 00 162 00 Special bulk purchase rates are also available to computer shops etc 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 one 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 modific
55. NE SP SPHERE 40 BAS FACE FA BASE PM PRISM BP FACE PRISM ARS AREA SUS SURFACE 984 SURFACE AREA 50 EN ENTER LE LENGTH SI SIDES HE HEIGHT RAS RADIUS DI DIAGONALS V VOLUME T DEEP 60 O0 OF AN AND F FOR UW WHAT H HAS 2 WIS WITH UH UHOLE I IS 70 NR O 80 NW O 90 GOSUB 190 100 110 120 130 140 A 0 41 0 V20 V1 0 8 0 81 0 ON K GOSUB 300 290 ON GOSUB 450 490 530 530 590 620 650 690 710 730 ON T GOSUB 760 770 780 800 810 820 850 860 880 900 INPUT PRESS NEWLINE Z CLS PRINT9 O YOUR PROGRESS SCORE I S sNR OUT OF NR NW 150 160 170 180 190 200 210 220 250 240 250 260 270 280 290 INPUT TO CONTINUE PRESS 1 TO QUIT PRESS 707 IF Q 1 OR 040 THEN 150 IF 0 1 THEN 90 IF 0 0 THEN CLS END CLS PRINT H E A SUREMENTS 1 PRINT PRINT 1 CUBE 2 RE BP PRINT S RHOMBUS FACE PRISM 4 s BPS PRINT S PARALLELOGRAM FACE PRISM 6 TP BP PRINT 7 CYL INDER 8 PY 9 10 SP INPUT WHICH ONE T IF lt 1 OR T gt 10 THEN 260 INPUT 1 CHECK HOMEWORK OR 2 PRACTICE K IF K lt 1 OR gt 2 T 270 RETURN RANDOM ON T GOSUB 310 310 330 310 310 310 310 310 310 310 RE TURN 300 310 320 330 340 350 360 370 380 ON T GOSUB 350 360 370 380 390 400 410 420 430 440 RETURN RX RND 8 HX RND 8 EX RND 8 BX RND 8 LX RND 8
56. PROGRAMS MICROMANAGEMENT STOCK RECORDING SYSTEM L2 16K Cassette version 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 items 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 by Edwin Paay 15 95 plus 50c p amp p S KEY is a complete keyboard driver routine for the TRS 80 and becomes part of the Level I 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 an auto repeat for all the keys on the keyboard If any key is held down longer than about half a seco
57. S THIS OK 140 E E lt gt DA yn GOSUB90 RETURN 150 LSETBS GOSUB100 S1 1 160 ML 16258 LEN E POKEVARPTR BS 2 INT ML 256 s POKEVARPTR BS 1 ML INT ML 256 256 POKEVARPTR BS 55 170 POKE16257 LEN E 51 156 81283 X76 180 GOSUB110 S2 ASC B 190 IFINSTR D B 051 lt 53 16257 1 81 S2 S1 S1 1 200 IFS2 8ANDS1 gt 191 S1 1 POKE16258 LEN E 51 52 210 IFS2 13BS MID BS 1 51 1 PRINT9896 D4 S4 VAL BS RETURN 220 IFS2 24THEN1SOELSE170 230 GOSUB150 X 84 1 84 0 240 8 1 60508270 Y VAL MID BS T 1 0 1 IFY lt OY NR 1 250 IFX lt OORX gt NR 10RY lt XORY NR 1 IE 2 260 E E STRS X 1 STRS 1 1 RETURN 270 FORI 1TO4 T INSTR S BS MIDS 03 1 1 IFT ONEX Ts RETURNELSERET URN 280 FL 0 FORI OTONF 1 F 2 1 FL 1sFL FL F 1 1 sNEXTs IFFL gt 255THEN 1 RETURNEL SEMR 23552 FL IFMR gt SOOMR 500 290 DIMAR MR 1 sFORI OTOMR 1 M 40960 1 FFL POKEVARPTR AR 2 1 M 256 sPOKEVARPTR CAR CI 1 CINT M 256 256 POKEVARPTR AR FL LSETAR 1 00 PRINT950 I NR 1 NEXT 300 DIMDS 15 kSFORI OTO15 ML 15360 I 64 POKEVARPTR DS CI 2 INT M L 256 sPOKEVARPTR DS CI 1 MLCINT ML 256 256 POKEVARPTR DS CI2 6 4 310 DIMDU NF 1 FORI OTONF 1 ML 15632 1 464 POKEVARPTR DU 1 2 I ML 256 POKEVARPTR DU CI 1 ML INT ML 256 256 POKEVARPTR CDU CI 48 NEXT 32
58. ST function will be a great help to us all Ed 0000000000 THE THEORY AND TECHNIQUES OF SORTING PART 3 by B Simson This month I shall be demonstrating the techniques of sorting by insertion in particular the ranking sort also known as the insertion sort GENERAL DESCRIPTION In general the insertion sort involves comparing or ranking an item in an array with items further up the array which have already been sorted into the correct sequence but may not yet be in their final positions When the right insertion position is found the item being processed is inserted at that position and processing continues with the next item in the array There are several methods used to determine the right position where the current item can be inserted all with varying degrees of efficiency Three of those methods will now be discussed DETAILED EXAMPLE Consider an unsorted array of integers consisting of the following 28 16 4 12 19 In its simplest form the insertion sort starts with the second item 16 and places it into a temporary location elsewhere It then ranks it with preceding items until either 1 an item of lower or equal value is encountered or 2 it runs out of items to compare that is the first item in the array is the current item As comparisons are being made the items are shifted one position further down the array that is to the right in this example When one of the above con
59. T 15 26 s SET 16 27 SET 17 28 GOSUB1680 RESET 15 26 RESET 16 27 s RESET 17 28 SET 14 27 SET 14 28 GOSUB1680 FORK OTOASTEP2 RESET 16 12 2 PRINT29326 8 PRINT9390 S 1 sFORL 1TO40 NEXTL RETURN FORL 1T020 NEXTL RETURN M YOU LOST W 0 G0T01310 F F 1 IFF 147HENF 1 PRINT9609 CHR 140 CHR 140 5 IFF OTHENPRINT9609 CHR 176 CHR 176 5 RD RND 10 IFRD 1THENII II 1 IFIIC1THENII 2 IFRD 2THENII II 1 IFII gt 7THENII 6 IFRD lt 3THENGOSUB780 RETURN ASC MIDS T I2 1 64 2 1 L LZ M ASC MIDS T I2 1 1 47 IFM lt 11 THENL LZ4M 23 17 17 1 1780 IFH gt 255THENFORZZ 1TOJZ NEXT ELSEGOSUB1800 1790 RETURN 1800 ZH H4256tL IFZH gt 32768THENZH ZH 65536 1810 ZV VARPTR MZ 0 1 V1 INT ZV 256 s V ZV V14256 1820 POKE16526 V POKE16527 V1 X USR ZH RETURN 1830 LL 5 K 6 GOSUB2030 K 8 605082030 K 4 6050820301 RETURN 1840 LL 30 K 4 GOSUB2030 K 8 GOSUB2030 6 605082050 1850 GOSUB770 RETURN 1860 FORII 7TOASTEP 1 GOSUB780 FORL 1T030 NEXTL I I 1870 I 1 FORK 1T08 IF II gt 4THENI I 1880 GOSUB780 FORL 1TOSO sNEXTL K 1890 KK 1 LL 10 605082070 1900 605082050 FORI 1T04 1910 14 605081930 1 020 NEXTL KK 21 GOSUB1930 1920 FORL 1T020 NEXTL I RETURN 1930 FORK OTO2 POKE157684K D KK K s NEXTK 1940 FORK OTOS POKE15832 K D KK K 3 s NEXTK 1950 RETURN 1960 KK 4 LL RND 80 GOSUB2070 1970 GOSUB2050 KK
60. T M 256 POKEVARPTR BL 1 1 M INT 256 X256 POKEVARPTR CI PP 1 15 _ 1 910 FORI OTONF 1 FORJ OTOPP 10 64512 F 4 1 1 ZPP 1 4 JX PP 8 9 F 5 I J 2 256 s POKEVARP 1 256 X256 6 1 3 s I CLS 920 P1 0 2 FORI 1TOPP 2 60518970 NEXT 950 FORH OTOPP 7 1 IFINKEY G ORINKEY q THENRETURNEL SEGOSUB9 60 IFPP 3 6 FORI 1 TOPP C3 6 s GOSUB970 NEXT 940 PRINT9959 X GOSUB110 IFB Q ORB q RETURNELSEP 1 0 950 IFX gt YRETURNELSE920 960 P3 1 FORI OTONF 1 FORJ OTOPP 10 1 1 2 1 1 1 X J lt Y sNEXTJ I 10 s FORI OTOPP 5 1 1 S P1 BL 60518970 5 0 IFPP 6 THENFORI 1TOPP 60508970 NEXT RETURNELSERETURN 970 1 1 1 lt 15 1 IFP2 OANDPS 1THENLPRINTBL I RETURNELSEIFP2 OTHENLPRINT RETURNELSERETURN 980 FORI OTONF 1 IFF 6 1 F 5 I gt 8 THENF 6 I 8 F 5 123 IF 6 1 lt OTHENF 4 1 20 F 5 I 0 6 1 0 990 NEXT RETURN 1000 PRINT O PARAMETER TAB 25 VALUE TAB SO FIELD NAME TAB 44 LINE TAB 49 POSN TAB 54 WDTH TAB 59 LNTH 1010 FORJ OTONF 1 PRINTAP J 25
61. T X 92 Y Y1 sNEXT X RD RETURN 240 FORL 1TO110 GOSUB1700 NEXTL GOSUB2100 I I 4 GOSUB780 250 PRINT910 IF YOU MAKE SIX WRONG GUESSES YOU WILL LOSE 260 GOSUB1830 GOSUB1840 270 FORL 1TO750 NEXTL PRINT987 G D LUCK 280 FORH 40TO10STEP 10 L 70 GOSUB1800 NEXTH FORL 1 T0500 NEXTL 290 GOSUB2100 PRINT921 JUNIOR OR SENIOR LEVEL 300 PRINT384 PRESS lt J gt OR lt 5 gt TO START 310 L 1 320 LV INKEY IFLV J ORLV S THENS40 330 GO0SUB1700 L L 1 IFL gt 3OOTHEN1 OOELSE320 340 GOSUB2100 GOSUB2120 GOSUB790 GOTO830 350 FORJ 1TO7 360 FORI 1T09 READX AS J AS J CHRS 128 NEXTI 370 FORI 1TO7 READX BS J J CHRS X 128 s NEXTI 380 FORI 1T06 READX C J J CHRS X 128 NEXTI 2330 IF THEN 2350 2340 D1 H D2 R GOTO 2560 2550 D1i R D2 H 2360 M1 20 D1 2370 RETURN 2380 INPUT PRESS LINE Z CLS 2390 1 X X1 TO X2 STEP 1 5 X Y X 2400 FOR Y Yi TO Y2 STEP 1 X X2 SL Y1 sSET X Y sNEXT Y 2410 IF X3 X4 THEN 2430 2420 Y Y2 FOR X X3 TO XA4 SET X YOsNEXT X 2430 FOR 2 TO 1 X4 SP Y Y2 SET X YO sNEXT 2440 IF L gt 70 THEN LX 35 ELSE LX L 2 2450 XS5 X2 LX X6 X3 L X X7 2X4 L X 2460 YS Y1 LX 5 YA YS Y1 Y2 2470 FOR TO Y4 STEP 1 X X5 SL Y Y3 sSET X Y NEXT Y 2480 IF X6 X7 THEN 2500 2861 2 ON 08 032 IH v2 39Vd 390 NEXTJ 400 DATA 48 60 60 63 63 6
62. UBONE SUBRET NUMADD ADDNUM ADDRET UPNUM NUMONE NUMB DEXP LPX DSOR DSIN DCOS CALC1 SETUPS DTAN DLOG ONEAUX DSUB ONEACC NUMAUX DADD NUMADD DE ACC NUMB DE ONE HL NUM MOVIT EXPCOS 05 127 FLAG A CALCY NUMUP A CUM 7 2 LPX DLOG HL ACC 7 HL OUTVAR SETUPS LPX SETUP1 SETUP2 CALC1 EXPCOS CALCX NDVCUM UPACC NUMUP A CUM 7 2 SETUP1 A 6 80H SNERR DCOS HL SPARE DOITS DSIN DE SPARE DOIT2 DDIV SETUPS HL ACC 7 A HL 130 2861 Z ON AWNTOA 08 0YJIW 3994 4560 4563 4565 4568 456B 456E 4571 4574 4577 457A 457D 457F 4582 4585 4588 458B 458 458F 4590 4591 4594 4596 4598 4599 459A 459D 45A0 45035 45A6 4507 45 9 45AA 45 4580 4585 4585 4587 4588 45 45BD 45 45 2 45C4 45C6 45C7 45C9 45 45 4502 4505 4508 45DB 450 45 1 52 042 3682 CD9A44 CD770C CD6544 CDD444 CDD444 CD8D44 CDESOD CD5444 SE7F S2BF42 CDE845 CD9544 CD770C 21E042 7E 04608 04610 04620 04630 04640 04650 04660 04670 04680 04690 04692 04694 04700 04710 04720 04722 04724 04726 04728 04730 04732 04734 04736 04737 04738 04740 04742 04744 04745 04746 04748 04800 04810 04820 04830 04840 04850 04860 04870 04880 04890 04900 04910 04920 04930 04940 04950 04960 04970 04980 04990 05000 05010 05020 5
63. VIEW GRV HACKHAM WEST 5165 40 CLS PRINT SELECT REQUIRED FUNCTION 50 PRINT 1 ENTER NEW DATA TO FILE 2 SEARCH FILE FOR DATA EXIT FROM PROGRAM 4 EDIT FILE 5 LIST ALL DATA 60 PRINT 0 FG 0 H 0 PRINT 780 70 AS INKEY A A4 1 IFA GOTO110 80 60508250 G0TO70 110 gt 6 lt 1 7 0 560 670 120 ENTER NEW DATA xi 150 CLS PRINT TYPE IN DATA SEPARATED WITH COMMA S HIT lt ENTER gt AFTER EACH GROUP OF DATA THEN TYPE ENTER AGAIN WHEN CHR 34 5 READY CHR 34 APPEARS ON THE SCREEN ELSEB VAL sONBGOTO120 510 54 140 PRINT EXAMPLE DATA DATA DATA DATA gt lt ENTER gt lt ENTER TYPE 5 CHRS 34 5 CHR 92 CHR 54 TO STOP ANYTIME WHILE CURSO R IS BLINKING X MEM BYTES FREE READY TO ACCEPT DATA 150 A 2 BUFFER 257 POKEBU 136 BU BU 1 POKEBU 34 PRINTCHRS 34 5 3 BU BU 1 E O 160 60508250 IFA THEN160 170 IFA 250THENCLS PRINT t ERROR ERROR ERROR XXX ERROR DATA FIELD TO LONG CANNOT ENTER LAST CHARACTER ELSEGOTO 190 180 FORC OTOSOOO NEXT GOSUB280 6G0TO130 190 PRINTA G0SUB250 A A 1 IFAS THENPOKEBU 34 BU BU 1 POKE BU 44 BU BU 1 POKEBU 54 1 PRINTCHR 8 CHR 34 5 s CHR 34 23 025 5 6070160 700 IFA CHR 10 GOTOA4O 2861
64. a TAB of greater than 63 is attempted then the TAB will occur on succeeding lines However this is not quite correct TAB 65 will produce an identical effect as TAB 1 as will a TAB 129 and TAB 193 Many Tricks have been tried and everyone has their favourite However this one is the simplest I have seen and I am sure it will interest many readers It was discovered by Frank Ellett of MICRO HIRE Palm Beach Queensland and myself whilst exploring the Level 2 ROM The TAB routine uses a subroutine located at 2317H which basically takes the value from within the brackets of the TAB statement TAB and stores this in the computer s ACC area Then using another subroutine at 28 5 this value is read into the DE registers It is then ANDED with 3FH to eliminate the most significant bits and thus ensure that the resultant TAB is less than 64 To now TAB beyond 63 it is only necessary to reread the actual value from the ACC Conveniently soon after the ANDING the TAB routine CALLS a location in RESERVE RAM 41D3H This location has a RETURN stored in it during system initialization If instead we POKE a JUMP to the subroutine which read the value from the ACC then this will replace the ANDED value from the TAB statement with the value that is actually there The required routine is located at 2B 5H Because the main routine CALLS 41D3H but we Jump to 2B 5H the RETURN found at the end of 2Bf 5H will return the computer directly to where we dis
65. al values f ignment amp 340 ubroutines which derive random numerical values for assignments 350 440 Subroutines which allows operator to nominate values 450 Subroutine which calculates the area of face whole surface area and volume of cube 460 470 Subroutines which print calculations and correct answers for cube if operator s amp 480 answer is incorrect 490 750 Subroutines which carry out similar operations for other figures VOLUME 3 2 JANUARY 1982 MICRO 80 PAGE 13 760 900 Subroutines which describe the assignment and direct the program to other subroutines for processing 910 1040 Subroutines which ask questions compare operator s answers with correct answers and branch off program to other subroutines for further processing Remainder Subroutines which provide data for graphics and print the graphics EAA TE SUPER HANGMAN 12 16 by Martin Downey Super Hangman is based on the original word game of the same name but with a difference It provides continuous animated graphics music and other sound effects two levels of play and has a 418 word vocabulary built in which can be expanded still further in 32K and 48K machines SUPER HANGMAN is a Level II BASIC program and so is loaded using the CLOAD command After it has loaded successfully type in RUN and press ENTER or NEW LINE If you want SOUND merely connect an amplifier and speaker to the cassette output plug normally plugs into the MIC s
66. am in type in the lines 2 and 3 as they appear in the listing in the magazine Type in the rest of the program which is in BASIC The only other thing to be mentioned is that the text lines such as lines 2 and 3 must be typed in exactly as listed Also note that the data statements at the end of the program don t have to be typed in They are there for demonstration purposes and show how data is stored They can be typed in however so that the user can practise using the program When you have finished typing in the program CSAVE it disk users can SAVE it THE COMMANDS 1 Enter new data to file This command allows the user to add data to the file All that is required is for the user to type in the data in the correct order separated with comma s Because all data is stored as strings the data must be stored between double quotes It is not necessary however for the user to type these quotes in manually because as soon as a comma is typed it is immediately converted to automatically If data has been typed in incorrectly BASIC will return with an SN error in the data line concerned when it reads the data later so take care When a complete set or group of data has been typed in type ENTER then when the READY message appears type ENTER again You will then be able to enter the next set of data or hit the DOWN ARROW ESC key to return to the directory Also you will notice that the amount of free memory left is dis
67. an equivalent of Y degrees and X USR P Y returns X as the double precision value of pi Note in the last case that the dummy variable Y is still required even though it is not operated upon so that X USRP X would be just as valid as a call Note also from the example just given that spaces are not essential in the calls they have only been included for clarity in the earlier examples These functions are based on the summation of convergent infinite series until the next term is of the order of 2 129 dependent on the value of the independent variable this can mean quite a few summations so that the functions will sometimes take a noticeable time to return a result call that would yield an imaginary result such as log 1 or an infinite result such as tan 90 deg will return SN ERROR or f ERROR as appropriate Excess values will return the normal OV ERROR there is also some loss of accuracy particularly of the LOG and SQR functions when the independent variable is very large or very small SIN COS TAN and ATN functions refer to angles in radians The calling routine is an adaptations of the HMT Corpn expanded USR function program and there are still 60 bytes available in the address index table for further USR functions since one function uses length of function ID 3 bytes this is sufficient for 15 functions with single character names or BASIC reserved words which store as single characters 12 with two character names
68. and so on The rules for adding your own functions are 1 The calling syntax is A USR function ID B C D where A B C D etc are properly named and defined BASIC variables there must be at least one such argument variable name following the function ID in brackets even if it is a dummy otherwise you may have as many as you like or need 2 Somehwere in the calling program prior to the first call of the function there must be an entry point definition in the form DEF function ID nnnnn where nnnnn is the decimal address or an expression reducing to the decimal address of the entry point of the function 3 The DEF portion of DUPLEX records this address against the function ID in its address index table 4 The USR portion will stuff an address 2 bytes into a store for each of the variables in the string of arguments appearing in brackets after the function ID it then sets the IX register to point to the first address in the store and jumps to the entry point of your routine The addresses stored in regard to the variables are those that would be returned by VARPTR for that variable 5 If you want the variable on the left of the sign in the call to contain a value on return your routine must load the value into the ACCumulator at 411DH to 4124H and set the NTF in 4QAFH before returning otherwise you can transfer values by loading them in form appro priate to the type of variable to the address provided by the USR portio
69. arch is also conveniently defined recursively that is in terms of itself and since BASIC does not support recursive functions or procedures the following is a recursive definition of that same binary search in Pascal Those who own a Pascal compiler should be interested in the following code Assume the following declarations in the main program block LIST ARRAY 1 N OF REAL VAR TABLE LIST L U POSITION INTEGER VALUE REAL PROCEDURE BINARYSEARCH VAR TABLE LIST LOW UPP INTEGER VALUE REAL VAR POS INTEGER VAR MID INTEGER BEGIN VOLUME 3 2 JANUARY 1982 MICRO 80 PAGE 11 IF LOW gt UPP THEN POS 1 ELSE BEGIN MID LOW UPP DIV 2 IF VALUE lt TABLE MID THEN BINARYSEARCH TABLE LOW MID 1 VALUE POS ELSE IF VALUE gt TABLE MID THEN BINARYSEARCH TABLE MID 1 UPP VALUE POS ELSE POS MID END END The remainder of the binary insertion sort could also be defined in Pascal once a block move procedure is defined PROCEDURE INSERTSORT VAR TABLE LIST FIRST LAST INTEGER ADDITIONAL DECLARATIONS X VAR I INTEGER 5 a PROCEDURE BINARYSEARCH DEFINED ABOVE PROCEDURE BLOCKMOVE VAR TABLE LIST L U INT VAR I INTEGER BEGIN FOR I U DOWNTO L DO TABLE I 1 TABLE 1 END BEGIN OF MAIN 2 FOR I 2 N DO BEGIN IF TABLE I TABLE I 1 THEN BEGIN TEMP TABLE 1 BINARYSEARCH TABLE 1 1 1 TEMP POSITION BLOCKMOVE TABLE U 1 1 1 TABLE U
70. ates on a fine magazine and hope that your inform ative work will continue I am writing this letter to pass on to you and the magazine some helpful routines I have learned about and which you may or may not know about BREAK KEY To disable the BREAK key execute the command POKE 16396 241 Using the INKEY function your program can check for the BREAK being depressed 1 will return the value of 4 To return the BREAK key to normal operation execute the command POKE 16396 201 The TRS 80 can be reset to MEMORY SIZE when the BREAK key is depressed by using the command POKE 16396 195 NB This is a useful hint if you wish to limit access to any particular program VOLUME 3 2 JANUARY 1982 MICRO 80 PAGE 6 SLOW LIST FUNCTION If you find the scrolling speed during a LIST command is too fast the following routine will slow it down 10 FOR X 16863 TO 16865 20 READ A POKE X A 30 NEXT X 40 FOR X 32754 TO 32767 50 READ POKE 60 NEXT X 7 DATA 195 242 127 58 128 56 31 208 197 82 DATA 1 0 32 205 96 0 193 201 90 END You MUST protect 16K bytes 16K 32751 and you MUST RUN this routine before loading your program Once the routine has been executed depress SHIFT to slow the LIST scrolling Thank you for this contribution Mr Smith Rod Stevenson has been exploring the disabling of the BREAK key in his series on Better BASIC Programming so readers now have a number of choices The slow LI
71. ations 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 photocopying 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 and we do our utmost to ensure 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 Volume 3 2 JANUARY 1982 MICRO 80 PAGE 1 kk CONTENTS EDITORIAL PEEKING FROM OUR U K CORRESPONDENT JOYSTICKS AND INPUT OUTPUT PORTS FOR YOUR 80 Part 5 INPUT OUTPUT Letters To The Editor THE THEORY AND TECHNIQUES OF SORTING Part 3 SOFTWARE SECTION MICRO 80 PRODUCTS MICROBUGS 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 4NW Printed by Sho
72. board vectors so you will have to switch off to get them back To finish I have another rumour for spreading Soon we will have another 80 to add to our camp Not another version of the Genie but a completely new computer The new machine will be able to pretend that it is a TRS 80 or a PET or a number of other different types of computer I do not know how it will be able to deal with the trick programs that are used however and perhaps it will only be able to use standard Microsoft Basic Software This is the Acorn Proton designed to a specification prepared by the BBC Ed 0000000000 VOLUME 3 NO 2 JANUARY 1982 MICRO 80 PAGE 4 ok JOYSTICKS AND INPUT OUTPUT PORTS FOR YOUR 80 by Alan Dent PART 5 P C BOARD TRACK LAYOUT The PC board track layout is shown below at actual size your own if you so wish Otherwise you may obtain a board from MICRO 80 for 24 p amp p This should enable you to construct including COMPONENT SIDE _ n 166 mm TRACK SIDE VOLUME 3 NO 2 JANUARY 1982 MICRO 80 PAGE 5 INPUT OUTPUT From Martin Hodge Victoria Many of your readers I am sure own lineprinters and have met the problems associated with trying to make neat columns on the right hand side of the page These problems are due to the 80 5 tab function being limited by the ROM software to 63 characters the width of the VDU The Level 2 reference manual states that if
73. ditions is met the current item is inserted into the vacant position created by the shifting of the last item compared This is what is known as the straight insertion sort Therefore the following takes place 16 is moved out to temp This is compared with 28 which is not 16 so 28 is moved down one to overwrite 16 Then an attempt is made to compare 16 with the item before 28 which does not exist so 16 is inserted at position 1 from its temporary storage location The next pass then considers the third item 4 and ranks this with the preceding 2 items which are already sorted and finds itself being placed in position 1 with the preceding items moved down The following is a trace of the third pass CURRENT ITEM RANKED WITH SHIFT 12 Moved to temp 12 28 28 to position 4 12 16 16 to position 3 12 4 4 not shifted 12 Insertion at position 2 After which the array will look like 4 12 16 28 19 11 VOLUME 3 NO 2 JANUARY 1982 MICRO 80 PAGE 7 Whereby the first 4 items are now in the correct sequence This process continues until the last item 11 has been inserted into its correct position using the above algorithm The following subroutine performs this task Firstly the data variables are N array size L lower bound of array 1 A array of items to be sorted Over flag for detecting end of pass 390 I 2 TRUE 1 FALSE O 400 IF I2N THEN470 410 1 J I OVER FALSE 420 J J 1 430 IF J
74. ems These are themselves sorted into descending order in a temporary storage area a sort of a sort within a sort and then the highest value is ranked with the preceding items moving them down if gt the candidate except in our example the preceding item is moved down 3 places to take up the positions vacated by the 3 candidates or more precisely moved down N places where N is the No of candidates remaining for insertion Then the next candidate is ranked and VOLUME 3 NO 2 JANUARY 1982 MICRO 80 PAGE PASS MOVE TO TEMP SET RESET FLAG PERFORM A PASS EXIT FIGURE 1 INSERTION SORT ALGORITHM A ARRAY BEING SORTED L LOWER ARRAY BOUND STARTING AT 1 U UPPER ARRAY BOUND I J ARRAY INDICES TEMP TEMPORARY STORAGE LOCATION FLAG SET WHEN PASS COMPLETE MOVE TEMP TO A L MOVE A J MOVE TEMP SET FLAG TO A J 1 TO A J 1 SET FLAG VOLUME 3 2 JANUARY 1982 MICRO 80 PAGE 9 if the ranked item must be moved down it is moved 2 places because there are 2 candidates left You can get as complicated as you like by choosing more than 3 candidates but remember that eventually an optimum point will be reached and a trade off must be made referred to last article between time spent in ranking and time spent in manipulating the huge array of candidates probably requiring a sophisticated sorting algorithm itself which obviously helps one to lose sight of the origina
75. eral feeling that MICRO 80 is anti Tandy Let me say at this point that MICRO 80 is not anti Tandy There are certainly areas in which we disagree with Tandy s policies and pricing but overall we want the TRS 80 to succeed and many of our critical comments are with marketing policies which sometimes seem to us to be holding back this excellent computer Anyway Tandy s executives and staff were extremely courteous and friendly and could not do enough to make us all welcome Of the TRS 80 Colour Computer you read last month The other main featurue of the day was a tour of the Tandy headquarters Tandy makes extensive use of Model II computers itself particularly in word processing appli cations We saw a new 100 000 word spelling checker in use with Scripsit which will soon be available in Australia We also saw the HOTLINE area where Tandy s staff answer technical queries from all over the country overall impression was of organisation which is striving hard to support its products The visit to the warehouse and service section was enlightening Being just before Christmas the warehouse was far from full but the service section was chock a block with open Model III computers Don t get the wrong impression we are not suggesting that the Model III is unreliable Apparently Tandy Australia purchases Model III s from the U S A as 11 4 versions and then upgrades them to L2 16K adds disk drives etc Which explains why the memory c
76. he early editions of this magazine I noticed that the tricks and hints reported from Australia were different to those circulating in this country so I intend to devote my article now and again to the reporting of such things I claim no originality for the hints reproduced as they are all common knowledge here but may be new to some readers Ever forgot the name of the program on an old tape I have seen a number of very complex ways of loading an unnamed System tape but the easiest way is to find its name by running the short program 10 INPUT 1 A A This should output the program name If it was a System tape the name will be preceded by U and if it was a BASIC tape the name letter only is output Data tapes produce the first item of data and Tiny Pascal tapes react as System tapes It has been mentioned to me that Disc users do not get many hints so here is one for them The Disk command CMD E is not in the Model I TRSDOS manual If you type it after a Disk Error you will get useful further details of the error In Disc Basic a NEWed program can be recovered by POKE 26811 1 then SYSTEM 11395 This will allow LISTing or CSAVEing but do not try RUNning Non disk users should 17130 1 for the same results There has been a heavy rumour that Tandy is to withdraw from the U K the sale of the Model I due to its radio interference problems This is not the case If Tandy does withdraw it will not be because of radio interference
77. hese 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 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 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 pri
78. hips used in 48K Tandy machines are identical to those sold by MICRO 80 Products Tandy staff explained that as far as the Americans are concerned Tandy Australia is just another customer and receives discounts on products in proportion to the quantity purchased No doubt this explains some of the difference in price between Australia and the U S A By buying L1 4K Model III s and upgrade kits Tandy Australia is able to minimise its costs The day finished with us being kitted out with a TRS 80 Colour Computer each specially flown in from the U S A for the occasion and a large stock of ROMpak software for evaluation over the next month The day was certainly well spent and enjoyable and I would like to take this opportunity to publicly thank Chuck Wise Tandy s Managing Director and his staff for their courtesy and helpfulness I also extended an offer for a column in MICRO 80 to be written by Tandy I believe that this offer has been accepted in principle and hope that before long we will start receiving regular contributions from Tandy telling us some of the inside news of TRS 80 development MORE SUPPORT FOR THE MODEL III AND MODEL I Eddy Paay has been hard at work for several months now carrying out the necessary research work required to prepare a Model III version of his ROM REFERENCE MANUAL The new version which will probably have a different name more descriptive of its true nature caters for both Model I and Model III owners
79. igures Compare that with the maximum number of inspections in a sequential search 32 and an average 16 If a binary search is employed to find the position where the current item is to be inserted then the maximum number of comparisons to be made to find that position will be N 1 Int log N to base 2 1 since there are N 1 passes This represents a considerable increase in efficiency over the N 2 4 figure for straight insertion searching when N becomes larger For example NUMBER OF SEARCHES N SEQUENTIAL SEARCHING BINARY SEARCHING 5 7 12 10 25 36 20 100 95 50 625 294 100 2500 693 It is obvious that binary searching will be faster in locating the insertion position when N becomes approximately 15 20 remember the binary searching figures are the maximum that apply In the average case there will therefore be less searches than that indicated in the chart A SLIGHT DRAWBACK However once the insertion position has been located using binary searching it becomes necessary to move a block of items down one This is an integral part of the straight insertion method but needs to be implemented separately if insertion position is binary searched This will reduce the efficiency of the binary insertion method somewhat but if implemented using the machine s block move instruction e g LDIR LDDR of the 7 80 then binary insertion will still be quicker than straight insertion by a considerable factor DEMONSTRATIO
80. ill list both if it is told to search for cycle The search routine will tell you if data is not found or if all data has been searched 3 Exit from program This command can be used to stop the program Under Lev 2 the BREAK key can also be used to stop execution Under Disk BASIC however the exit command must always be used to stop the program and not the BREAK key or Disk 1 0 will not function properly 4 Edit and List line numbers This command tells you how to edit the data lines but does not actually perform the edit function itself To edit a file stop the program and use the edit function provided by BASIC Remember don t edit line 1 VOLUME 3 2 JANUARY 1982 MICRO 80 PAGE 15 This command can however search for a particular string or data in its files and list all line numbers of data lines that contain the string in question so that the user will know which lines to edit 5 List All This command will list all data to the screen one file at a time Type Y to continue listing and N to stop when asked DATA BASE MANAGEMENT SYSTEM 48K Disk G Moad This program makes use of the NEWDOS 80 ver 2 CMD O sort routine For those people who do not have Version 2 the author has provided the necessary information to make the program run using the Tandy sort routine published in the Microcomputer news of May 1981 The database management system is for a 48K 1 or more disk TRS 80 The
81. ive 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 1 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 SUBTRACTION GAME build a tower with correct answers HOW GOOD 1 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 hassle 90 day warranty 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 j 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 thro
82. l problem BINARY SEARCHING Another way to increase the efficiency of the insertion sort is to develop a more efficient searching algorithm than sequential searching Since the items being searched compared with current key are themselves in sorted order we can make use of a semi random searching technique that utilizes sorted codes known as binary searching All that needs to be done is to tell it the lower and upper bounds of the array to be searched and the value of the current item for which a place is being searched Binary searching a list involves the selection of the middle item and then comparing this with the item being searched for adjusting the left or right bound depending on whether the middle item 15 lt gt the item being searched This zeroing in process continues until the left and right bounds overlap or the item is found You undergo a similar process when searching for an unfamiliar name in the telephone book for example The maximum number of inspections of a binary search is equal to Int 1og of N to Base 2 or log of to base 2 if N is an exact multiple of 2 where total number of items in the search list For example if list size N 32 maximum number of inspections required to locate any item 5 since 32 is an exact multiple of 2 25 32 but if 33 then the maximum number of inspections 6 according to the above formula The average number must therefore be less than these f
83. l 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 95 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 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 1 8 95 60c p amp p Three games on one cassette from that master of TRS 80 graphics Charlie Bartlett
84. ll 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 chosen 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 510 95 60c p amp p Those who frequent games arcades will recognize these two electronic games In 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 60 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 Rea
85. means of accessing parts of a string which is often simpler than using LEFT RIGHT or MID Note however that one is limited in the ways of transferring data into these strings The commands LSET RSET and POKE can all be used However statements of the form S expression cannot be used If the string is located in screen memory one can simply write to it using PRINT or if it is in protected memory it is possible to used MID on the left hand side of an expression The following short program gives a trivial but annnotated example of its use it is on the disk as TESTSTR BAS 10 CLS 20 S STRING MUST INITIALIZED 50 ML 15360 7 MEMORY LOCATION 40 LN 64 LENGTH OF STRING 50 POKE VARPTR S 2 INT ML 256 MSB 60 POKE S 1 ML INT OML 256 256 LSB 70 POKE VARPTR S LN POKE LENGTH OF STRING 80 RSET S TEST PUT TEST TOP RIGHT SCREEN 90 FOR I 1 TO 100 NEXT DELAY 100 S TEST PUT TEST TOP LEFT OF SCREEN 110 FOR I 1 TO 100 NEXT GOTO 80 DELAY THEN DO IT AGAIN Since there may be some readers who do not have access to NEWDOS 80 version 2 the following modifications can be made to the program to permit use of the sort routine published in Tandy s TRS 80 Microcomputer News of May 1981 Note that with these modifications the program only allows a sort by field number 1 multiple sort keys are not supported Alternatively readers may wish
86. n of the package and stuffed into the store to which the IX register is pointing The foregoing set of rules may sound horrific but it s not really If you have a simple routine to say white out the screen which you wish to use you a give it a name say BLOB b put a statement early in your program that says DEF BLOB xxxxx where xxxxx is the decimal address of the entry point of BLOB c call the routine with DUMMY USR BLOB DUMMY whenever you need it Some people may want the DEF and USR portions of DUPLEX without the DP mathematical functions If so delete lines 2000 to 5530 and 5800 to 6010 all inclusive in the assembler program and re assemble You will then have the DEF and USR facilities and a 100 byte address index table As regards the actual math portion of the program there is not a great deal that can be easily explained It relies heavily on a cluster of subroutines which really form one enormous multiple entry point subroutine Apart from that there are two iterative calculation loops one for EXP SIN and COS and one for ATN and LOG TAN and SQR are derived functions TAN SIN COS and SQR 3106 A value of had to be stored for so that P D and functions are by products 10 REM 1 20 REM PROGRAMMER G SKORYK 50 CUS CUBE RES RECTANGLE RH RHOMBUS TR TRIANGLE PA PARALLELOGRAM TP TRAPESIUM CY CYLINDER PY PYRAMID CO CO
87. nd Is this contain reserved words may be used e g artificial intelligence or is it just STIFF which contains IF computer trickery Next month you get the chance to find out if you can 0000000000 kkkkk MICROBUGS kkkkk In which we correct those errors which seem to creep in no matter how careful we are BASIC LABELS Vol 3 Issue 1 December 1981 Oops in the voluminous documentation which accompanied this machine language program we omitted to mention the entry point thus leaving you with 2000 odd bytes of unexecutable code The entry point is 7E42H 32386 Dec 0000000000 Date sn ESSE N to _ lt vi 25 iE 2 s c lt o E 2 Big 5 2 c tc O c a Lag lt lt 9 lt Publication on disk or cassette only Publication in MICRO 80 Address Please consider the enclosed program for Both Name To MICRO 80 SOFTWARE DEPT i ii iii Postcode x x x CHECK LIST x Please ensure that the cassette or disk is clearly marked with your name and address program name s Memory size Level Il System 1 or 2 Edtasm System etc The use of REM statements with your name and address is suggested in case the program becomes separated from the accompanying literature Please package securely padabags are suggested and enclose stamps or Ensure that you
88. nd 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 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 BMON hy Edwin Paay 19 95 plus 50c 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
89. nting 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 unutilised 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 VOLUME 3 2 JANUARY 1982 MICRO 80 PAGE 21 The syntax for calling one of the functions is X USR function ID Y where X and Y which must be variable names conforming to BASIC rules and not expressions or numeric values have previously been defined in the program as double precision variables Thus X USR SIN Y returns X as sin Y and similarly for COS TAN ATN EXP LOG and SQR additionally X USR D Y returns X as the degree equivalent of Y radians X USR R Y returns X as the radi
90. ocket If two cassette ports are available either one can be used After ENTERing RUN a title page will be displayed Then the BANDIT will appear accompanied by a Mexican tune You can begin the game straight away by pressing go through the instruc tions by pressing I or just waiting for the tune to finish Before each game you must press J or S to indicate Junior or Senior level After this the mystery word is chosen by the computer and the number of letters is shown at the bottom of the screen each represents a letter The game is played along the lines of the original HANGMAN games You must guess the mystery word by guessing one letter at a time or the whole word at once For each letter guess press the appropriate key letter will be displayed and noticed by the BANDIT If the letter occurs in the mystery word it will be inserted in ALL the places that it occurs If the letter doesn t occur in the word it will be displayed on the left of the screen and the GALLOWS will be added to Six wrong guesses letters and words and you will lose If you guess all the letters or the whole word then you will win If you try a letter guess more than once you will be told accordingly but not penalised You will be warned when you are on your last guess To guess the whole word in one go first press the key You will then be told to type in your guess and press ENTER NEW LINE when you are finished The computer will ignore all blank
91. om 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 58 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 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 itis done SAVE 0055 x x x SAVE 00 s x x SAVE 0095 x MICRO 80 EXPANSION INTERFACE x xx 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 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 port e Second cassette optional The expansion interface connects directly to your TRS 80 L2 16K keyboard or via SYSPAND
92. own TRIAD VOL 2 L2 16K Cassette 10 95 Disk 15 95 60c p amp p Remember those NUMERO puzzles in which you had a 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 that you only see the computer s pattern for a brief span atthe 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 g
93. part of our advertisement was typeset using an ET 121 driven by a TRS 80 Write and ask for full details 4 MEGABYTES LINE 48K RAM for 59800 incl Sales Tax MICRO 80 s MODEL 380 MICRO 80 has equipped 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 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 Sales 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
94. part way through merges two programs with automatic renumbering of the second 50 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 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 514 95 5 50 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 MICROPOL Y L2 16K 8 95 60c p amp p Now you 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 a
95. played on the screen so that you will know when you come to the end of your memory DATA FORMAT The first set of data you type in will be used as headings for all other data Examine the first data statement in the listing of the program to see what I mean Or better still type in data as in listing and try The format of the first set of data is different from all others It contains a number at the beginning of the data statement The number tells the program how many columns of data there are in each group of data Following this number are the sub headings i e if the number is 3 then it must be followed by 3 sub headings in the first line and all other data groups are expected to have 3 lots of data in its group or set If you look at the listed data lines you will notice an followed by a number The Q tells the program that the data following contains the line number This is not typed in by the user It is done automatically when you enter data under the ENTER DATA command 2 Search Command This command will search the file for the data asked for by the user It will then list the first occurrence of the data concerned Answer the question CONT OR STOP with C to search the rest of the file or with S to stop Note also that it is often not necessary to type in the complete word or sentence you are searching for For instance if your file contains the words bicycle and motorcycle then the search command w
96. program could be used on a 32K machine however only a very limited database could be handled To run the program 1 Type in the program from the magazine 2 Save it to disk with the filename DBMS BAS 3 Put the disk in drive 0 4 Press reset boot the system 5 Type 51 40960 enter basic with memory size set at 40960 6 Type RUN DBMS BAS run the program 7 Then follow the instructions given by the program This program has advantages over some commercial database programs I have seen 1 It can be readily modified by me at least 2 A fast machine language sort is used NEWDOS 80 Version 2 s CMD 0 3 Text is stored in protected memory so as to be immune from BASIC s rearranging of string space 4 Lower case is permitted within fields without a lower case driver being necessary 5 The number of records the system can hold is determined by the program taking into account the length of the fields used This program was written to work with NEWDOS 80 version 2 However it will also work with TRSDOS 2 3 if the sort routine is replaced Some use has been made of the following routine which enables strings to be located anywhere in memory e g in screen memory or in protected memory This has a number of uses 1 it simplifies some display routines 2 it makes it possible to read the screen into a string 3 it puts strings out of reach of BASIC s attempts to move them around 4 it gives a
97. r 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 3N s DISK DRIVE HEAD CLEANING DISKETTES 30 20 incl p amp p Disk dries are expensive and so are diskettes 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 ON 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
98. rds with field names and gives the opportunity to EDIT or DELETE the record Short form format displays one record per line ten records per page The records appear in an abbreviated format FIND4 Note that if the N ext or P revious keys are used during the long format search the system will continue its search from the current displayed record when the F ind key is pressed INTEGER FIELDS Integers or fixed point numbers which vary in length will be sorted correctly only if they are placed in integer fields Floating point numbers may not be sorted correctly by the program LIST Records are listed one at a time with field names An opportunity to EDIT or DELETE the record is given MERGE A file from disk is merged with the resident file The file to be MERGEd must have the same number of fields and the fields must be of the same length and type as those of the resident file NEW The resident file is cleared from memory and the program is reinitialized PRINT The file is printed to the video or to the video and the line printer according to the specified parameters The Q uit key may be used to abort printing PRINT2 The print routine was designed to work with a TANDY Line Printer VIII Its correct operation with other printers may require some changes For example with the LPVII LPRINT will cause a line feed Line 1435 of program SORT The entire file is sorted in ascending order according to the specified sort key
99. s spaces even if inside the word i e DOG D O G and DO G are all seen the same At the end of a game you can play again by pressing the Y key or end by answering with the N key Although SOUND is not essential for the enjoyment of SUPER HANGMAN it is heartily recommended There are 5 tunes and numerous sound effects The 418 word vocabulary should be enough for even the most regular player However if you have more than 16K memory you might like to extend it Simply add the extra words at the end of the program and change the value in line 2120 from 418 FILES L2 48K by E Paay modified by N E L Rossiter This program was originally published in Issue 3 February 1980 have had a number of requests from readers for a 48K version Mr Rossiter has now modified it and has made some useful improve ments as well With the original program it was necessary to set Memory Size load in a machine language routine and then load the BASIC Program With this new version the one BASIC program carries out the whole job by POKEIna the machine language routine into memory The Listinc has not been renumbered to assist those who have already keyed in the original program to make the necessary Changes Files is designed for Level 2 systems It allows the user to enter data into a file to recall this data later and list it to the screen in a format set out by the user It is therefore suitable for such functions as a mailing list con
100. ser A music generating program which enables you to play music via your cassette recorder and to save the music data to tape This is an improved version of the program published in Issue 17 of Micro 80 VOLUME 3 NO 2 JANUARY 1982 MICRO 80 PAGE 2 k k EDITORIAL 20 SALES SUSPENDED IN AUSTRALIA Word has just been received that sales of the Commodore VIC 20 computer have been suspended in Australia because the mains transformer does not meet the power supply authorities standards Apparently the transformer has an unearthed metal case It is not known how long this ban will last presumably until Commodore can come up with a suitable replacement In the meantime the Dick Smith organisation is gearing up to change the transformer for an approved one whilst the few enterprising dealers who grew tired of waiting for Commodore to produce the VIC 20 and imported them directly from the U K are still able to supply machines because the U K transformers meet the authorities requirements BEARDING THE LION Not long before Christmas I was invited to attend a press conference in Sydney at which Tandy was to announce the Australian release of its TRS 80 Colour Computer I was also promised that I could take home a computer to assist us in preparing a review This was my first visit to Tandy headquarters in Sydney and was of considerable interest No doubt many readers are wondering at my reception since there seems to be a gen
101. stem 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 DOUBLE DENSITY PATCH FOR NEWDOS 80 53 00 plus 1 00 p amp p cable automatically If diskette in drive 2 say and a write to drive in single density wh at the same time it reads writes to drive 1 in double y FLOPPY DOCTOR AND MEMORY DIAGNOSTIC by MICRO CLINIC 29 95 plus 50c p amp p Two machine language 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 IC s 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 and SYSTEM 80 TRS 80 DISK AND OTHER MYSTERIES 24 95 1 20 p amp p The hottest selling TRS 80 book
102. taining names addresses and phone numbers or a directory to contain for instance magazine articles date volume number and type of article etc The program is then capable of searching the file for any data asked for by the user and displaying all files to the screen which contain the data asked for Files overcomes many problems associated with this kind of program It avoids lengthy time consuming data transfers from tape as would be the case if the INPUT 1 command is used to load and write the data to tape separately With this system all data stays with the program at all times as data statements It is therefore only necessary to CLOAD or CSAVE once to load the program and data from tape or disk TYPING THE PROGRAM IN As was stated earlier this is a part machine language and part BASIC program Now examine the listing of the program and see if you can find the machine language subroutine VOLUME 3 NO 2 JANUARY 1982 MICRO 80 PAGE 14 Have you guessed it It is the strange looking numbers and letters in line 2 and 3 That is why it appears to make no sense This 1 subroutine allows the user to type in data without having to stop the program and type in complete data lines manually The m l subroutine creates data lines numbers them and changes the necessary memory pointers for BASIC so that program execution does not have to be interrupted It also saves a lot of time and effort for the user To type this part of the progr
103. the laws in the U K are not like the American ones In America where the Model I has been withdrawn it is still legal to buy and sell secondhand Model I machines and it seems that they are changing hands at prices above the original selling price As it is still legal over there to sell add ons for existing Model I s I think that there will be support for that machine for some time In any case Lowe Electronics is prepared to support the TRS 80 by supplying Genie add ons and a TRS 80 Genie converter Tandy has just started an in house magazine for buyers of their products in an attempt to reverse the image of not caring for their users which they have been getting in the U K The new free magazine is very good if the first issue is anything to go on In this issue a new High Reso lution Graphics mod is introduced The first of many I guess It uses no RAM and has a reso lution of 348 x 192 Fitted by Tandy it costs 169 00 LOWER CASE IN VIDEO GENIE SYSTEM 80 Attention all Video Genie owners especially those who bought their machines after October 1981 If you do not have lower case fitted have you ever RUN a lower case driver If not you may be in for a pleasant surprise It seems that the latest Genies all have lower case even though they were not sold as such Just get a lower case driver MICRO 80 Issue 18 page 29 and run it If you are lucky there is your lower case Free If you are unlucky the driver will scramble your key
104. tracted it The required code can be POKED into the RAM during program initialization 10 POKE 16851 195 16852 05 16853 43 JMP 2805 above line need only be entered at the start of the program requiring the extended TAB and will allow the printer to be TABBED up to 255 characters using normal syntax This modification does not seem to affect any other BASIC commands but careful testing should be done before including it in any important programs as no guarantee is given I look forward to receiving MICRO 80 each month and congratulate you on its presentation and content I would however like to see better descriptions of what each PEEK and POKE is actually doing and also associated circuit diagrams accompany any hardware modifications not just pictorial drawings of Where The Wires Go Thank you for this contribution Martin It should be of considerable help to those readers using 80 character and wider printers We will endeavour to meet your request to explain more fully what each PEEK and POKE does in the programs we publish an extent this depends on the authors supplying the programs so authors how about telling us in the documentation which accompanies each program Your letter was written some time ago and I think you will agree that we have now mended our ways and publish circuit diagrams with hardware projects Ed From P G Smith N S W I would like to congratulate you and your associ
105. uced the size of the print used for listings and have arranged them at the back of the magazine in two columns The text for each program is now separated from its listing You will notice that the index has two different page numbers for each program The first number refers to the start of the text and the second to the start of the listing The main reason for the changed layout is to allow us to fit more into each issue particularly articles reviews etc in response to your requests We hope you like this change and particularly the extra material it enables us to print each issue 0000000000 x pEEKing U K by Tony Edwards One of the more important aspects of the duties of a Correspondent is to engender contact and communication between readers in different parts of the world In view of this I have been very pleased to receive letters from so many MICRO 80 readers from both Europe and Australasia since I took up the post of U K Correspondent for MICRO 80 I have enjoyed reading your letters and I hope I have been able to help when help was requested In this piece I repeat my offer to do anything I can to help readers anywhere in the world If you think a contact in the U K could help you just drop me a line at 23 Foxfield Close Northwood Middlesex United Kingdom Another way that I can help the exchange of ideas is to reproduce some of the hints that are circulating in this country regarding the 80 micro computer In t
106. ugh 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 60cp 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 guns 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 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 fr
107. utines are self relocating self protecting and A list of installers is included with each kit will co reside with other machine language programs such as Keyboard debounce serial interface driver programs etc ADD A DISK DRIVE TO YOUR TRS 80 MODEL III FOR ONLY 875 00 OR ADD TWO FOR ONLY 1199 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 density disk controller board and 1 dual drive power 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 most capital cities ONLY 2049 INC S T Daisy Wheel Typewriter Printer MICRO 80 has converted the new OLIVETTI ET 121 DAISY WHEEL typewriter to work with the TRS 80 and SYSTEM 80 or any other microcomputer with a Centronics parallel port RS 232 serial interface available shortly The ET 121 typewriter is renowned for its high quality fast speed 17 c p s quietness and reliability MICRO 80 is renowned for its knowledge of the TRS 80 SYSTEM 80 and its sensible pricing policy Together we have produced a dual purpose machine an attractive modern correcting typewriter which doubles as a correspondence quality Daisy wheel printer when used with your micro computer How good is it This
108. vel amp Bull Printers 312A Unley Road HYDE PARK S A 5061 Published in Australia by MICRO 80 433 Morphett Street ADELAIDE SPECIAL OFFER TO NEW READERS AND READERS RENEWING THEIR SUBSCRIPTION i SOFTWARE LIBRARY VALUED AT OVER 100 FREE MICRO 80 has developed a new Library of Software consisting of 7 programs and a comprehensive user manual The Software Library on cassette will be sent FREE 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 MON A low memory machine language monitor which enables you to set break points edit memory punch system tapes etc Cube An ingenious representation of the popular Rubick s 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 Compo
109. ves 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 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 and 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 Z80 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
Download Pdf Manuals
Related Search
Related Contents
取扱説明書 - 三菱電機 Samsung SGH-X480 Lietotāja rokasgrāmata novero Rockdale EN_v1_0 Johnson Hardware 111FD Series User's Manual Samsung S3 2GB Bruksanvisning Copyright © All rights reserved.
Failed to retrieve file