Home
Volume 3, Issue 8 (1982)
Contents
1. GOTO780ELSE 1 500ELSE 1450 1350 IFV 1 35ANDV 2 45 15 1 9OANDP 1 9ANDD 19 1 15C 0 D 1 9 1 27 0 5 1 714 0 5 4 0 5 4 ORB 0 5 2 213 GOTO1760 1560 IFV 1 lt 310RV 1 gt 460RV 2 490RV 2 S6THEN14SOELSEY PI V 2 4 9 IFY 990RY lt 5LORC OORO V 1 30 1 90THEN1 4SOELSEY VAL MID SF V 12 30 16 Y 1 ONYGOTO1770 1780 1790 1800 1810 1370 IFV 1 37THEN14SO0ELSEIFO 7 1 90THEN1500ELSE IFC OPRINTS9 nothing here to fire at GOTO780ELSEC O 1380 IFL 6PRINTS9 a loud explosion and Hey that was a Timelo rd Just whose side are you on That s it for you buster GOT0142 1390 IFP 19D 19 1 7 0 5 1 91 1400 PRINTS9 a loud explosion and a brilliant flash and you fin d yourself looking at s IFL 4Q9 1 1410 PRINT a small pile of grey powder which slowly dissipates 60T0780 1420 PRINTSH failed the universe will be destroyed and 11 the blame lies on your shoulders 60T01440 1430 PRINTSH found all six parts We are saved Congratulations 1440 6050 1000 OC NOX 100 TL 1 PRINT You scored GC INPU T Want to try again sX IFLEFT 1 N THENCLS ENDELSE740 1450 PRINT I can t quite see how to do that G0TO780 Ou re already carrying it GOTO780 1470 PRINT You can t do that GOTO780 1480 PRINT I can t see that here G0T0780 1490 PRINT You can t carry all this and that too You ll have t o drop Something
2. INT HL 5 LOWER HL UPPER HL 3UPPER HL LOWER 3CHECK LEFT SUBLIST SIZE DE HL HL DIVIDER DE LOWER A HL DE 3SIZE 2 IN HL A H sSAME AS RIGHT ABOVE NZ PUSHL A L 4 C PARTN DE 5 LOWER HL INT HL 3 DISPLACEMENT FROM LOWER HL DE 3 HL UPPER HL VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 13 7F78 C3217F 079700 JP PARTN 7F7B DS 8000 CMPARE PUSH DE 3SAVE ADDRESS 7F7C ES 08100 PUSH HL POINTERS 7F7D 7E 08200 LD A HL LEFT INT 7F7E 23 esseo INC HL 3 BY LD HL HL 7F7F 66 08466 LD H HL 7F89 6F 08500 LD L A 7F81 EB 08600 DE HL LEFT INT IN DE 7F82 7E 08700 LD A HL 3GET RIGHT INT 7 85 23 esseo INC HL 7F84 66 08700 LD H HL 7F85 6F 07000 LD L A 7F86 EB 99100 DE HL 3 HL LEFT DE RIGHT 7F87 7C 99200 A H SIGNS 7F88 AA 99500 D H WITH D 7F89 FAAB7F 09400 JP M UNEQU 3M IF SIGNS NOT EQ 7F8C 5 07500 PUSH HL 3SAVE LEFT 7F8D B7 99500 OR A 7F8E ED52 09700 SBC HL DE 3COMPARE INTEGERS 7 90 1 09800 POP HL RESTORE 7 91 381E 09700 JR 3NO 7F93 281C 10000 JR Z 0K s SWAP 7F95 EB 10100 SWAP EX DE HL 3SWAP INT 7F96 7C 19200 LD A H 3PUT LEFT BACK 7F97 45 10300 LD 7 98 1 10400 HL sADDR OF DEST 7F99 23 10500 INC HL 7F9A 77 10600 LD HL A 3MSB 7F9B 2B 10700 DEC HL 7 9 70 10800 LD HL B sLSB 7F9D 7 10900 LD A D sPUT RIGHT BACK 7F9E 43 11000 B E 7F9F D1 11100 DE sADDR DEST 7FA 15 11200 DE 7FA1
3. xx If there is nothing from the Keyboard Flash cursor 52 IFB THENPOKEA 32 FORI 1TO10 NEXT POKEA D GOTO48 53 B ASC BS There was an entry ASCII code to 54 IFB 13THENPOKEA D GOTO26 Was it an ENTER then back SS If entry a valid character POKE it in and inc 56 gt 51 lt 91 1 gt 1658 16585 57 XX The following are cursor controls POKEA D Skip 58 If entry was Left arrow then dec and check gt 15559 59 IFB 8THENPOKEA D 1 IFAS 15360THENA 15360 60 If entry was Right arrow then inc and check 4416384 61 IFB 9THENPOKEA D 1 IFA216383THENA 16383 62 kk If entry was Down arrow then inc At 64 1 line and check 63 IFB 10THENPOKEA D A A 64 IFA gt 16383THENA A 64 64 k If entry was Up arrow then dec 6 64 and check 65 91 0 4724 64 IFA 1S360THENA A 64 66 GOTOA8 Back again 67 1 27 lt gt 1 7 Is there a String Number from the entry 68 LO VARPTR AS XX There wasn t so address of buffer to LO 69 LO PEEK LO 1 256x PEEK LO 2 X Now the address of A 70 IFLO 32768THENLO LO 6S5S536 XX Check for INT limits 71 Li LO k Transfer to spare Li 72 15560 0165855 64 The whole screen in lines 73 FORZ X 63TOXSTEP 1 now the lines one byte at a time 74 IFPEEK Z 2320RPEEE Z 2128THENNEXT NEXT 507094 7 Blanks
4. 1 480ELSEIF 0 X1 4 ANDB OTHEN14SOELSEIFO X1 3 WT gt 20THEN1490 940 O X1 1 90 WT WT 0 X1 3 0 X1 4 0 X1 4 OR1 1 GOTO600 950 IFV GD4310RV 1 46THENI4SOELSEX1 V 1 230 IFO X1 1 lt gt 9OTHENIF O X1 1 lt gt X1 1 91THEN1480ELSE1500ELSEIFV 1 31THEN1510 960 WT WT 0 X1 3 0 X1 1 P 60 0600 970 IFC OTHEN1520ELSEIFP 7THEN1570ELSE IFL 4ANDC lt OTHEN1 620ELSEIFP 66G0SUB1000 IFNO lt 6THEN1 7SOELSE 1430 980 ONL 1G0T01580 1520 1590 1600 1610 990 1630 990 ONRND 3 GOTO1650 1660 1670 1000 QC 0 NO 0 FORI 1TO16 IF I 4 AND2 ANDO I 1 90NO NO 1 C C O 1 4 AND240 16 1010 NEXTI RETURN 1020 PRINTSY presently holding NO 0 FORI 11016 IFO 1 1 90PRIN 50 0 1 2 NO NO 1 1030 NEXTI IFNO OPRINT nothing GOTO78OELSE780 1040 IFL 60RC OPRINTS9 no need to hide GOTO780ELSEIFP 19ANDD 1 9 1 15THEN1 450ELSEIFRND 0 95PRINT The creature that you bumped as you rushed desperately past was faster than you He caught and killed you GOTO1420ELSEC 0 1050 IFL 5PO 1 P S1ELSEIFL 4PO 4 P 44ELSEPO 6 P Lt 10 PO 1060 IFPO 99PRINTSY inside the tardis GOTO1090 1070 OND P 0 16050 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 3 10 320 330 340 350 360 370 380 390 400 410 420 430 440 450 460 47 0 480 490 500 510 520 530 540 550 560 570 580 590 600
5. 1 50 CASSETTE PLUS MAGAZINE 43 60 N A DISK PLUS MAGAZINE 75 00 N A MICRO 80 is available New Zealand from MICRO PROCESSOR SERVICES 940A Columbo Street CHRISTCHURCH 1 N Z Ph 62894 MAGAZINE ONLY NZ 43 00 NZ 4 00 CASSETTE PLUS MAGAZINE NZ 89 00 NZ 5 00 DISK PLUS MAGAZINE 75175 00 87515 00 MICRO 80 is despatched from Australia by 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 Aus 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 Video Genie or Peach and its peripherals MICRO 80 is in no way connected with any of the Tandy Dick Smith or Hitachi organisations WE WILL PAY YOU TO PUBLISH YOUR PROGRAMS Most of the information we publish 15 provided by our readers to whom we pay royalties An application form containing full details of how you can use your microcomputer to earn some extra income is included in every issue CONTENT Each month we publish at least one applications program in BASIC for each of the micro computers we s
6. BC 40H BASIC 3 TO BASIC HL MESG4 PRINT COMPLETED MESSAGE DE 3D00H BC 40H BASIC RETURN TO BASIC d LOWER CASE CONVERTER FOR BASIC PROGR gt CREATED BY DENNIS WRIGHT gt PROGRAM CONVERTING RESIDENT BASIC P INIT NO BASIC PROGRAM LOADE CONVERSION COMPLETE VOLUME 3 NO 8 JULY 1982 7 10 CD 9 01 21 BC ZE 11 7 20 7 11 00 3D O1 40 00 7 50 SB 44 40 2A F9 40 B7 7E40 00 28 SD EB 25 23 23 7 50 7E FE 22 28 F2 FE 41 7E60 FE 22 28 FE 2E 28 7E70 C 20 77 18 E8 CD 99 7E80 CD 99 7E FE 22 28 CO 7E90 7E FE OO 28 19 23 23 7 0 21 7C 7F 11 OO 3D O1 7EBO 7 11 OO 3D O1 40 OO 7ECO 20 20 20 4 57 45 7EDO 56 45 52 54 45 52 7EEO 45 20 50 52 47 52 7 55 49 20 32 2E 7 00 20 20 20 43 52 45 41 7F10 4E 4E 49 53 20 57 52 7F20 20 20 20 20 20 20 28 7F30 55 4E 45 20 51 39 38 7F40 20 20 20 50 52 47 7 50 45 52 54 49 4E 47 20 7F60 42 41 53 49 45 20 50 7F70 20 20 20 20 20 20 20 7 80 20 20 20 20 20 20 20 7F90 20 4E 20 42 41 55 7FAO 4D 20 4C 41 44 45 7FBO 20 20 20 20 20 20 20 7FCO 20 20 20 20 20 20 20 7FDO 20 20 20 20 43 4E 7 4F 4D 50 4C 45 54 45 7FFO 20 20 20 20 20 20 20 MICRO 80 PAGE 24 VARIABLE WORKSHEET COLOUR COMPUTER 10 VARIABLE WORKSHEET 7 eSFOR THE TRSSCCOX ORIGINALLY BY S amp P MILLER 40 FOR THE TRS86 Se CLEAR 1000 64 CLS 76 PRINT 71 VARIABLE WORKSHEE
7. The subroutine continues to build up the string until it reads an asterisk Then by means of a quick POKE 16526 PEEK VARPTR P 1 POKE 16527 PEEK VARPTR P 42 we are all ready to do a USR call It is quite easy to set up several independent USR routines in this way I just make sure each set of DATA statements ends with an asterisk and save the routine in another string variable before calling the hex pack subroutine again One thing to watch when using dynamic string packing BASIC tends to move strings around in RAM to reclaim unused string space so set the VARPTRs immediately before making the USR call 0000000000 SERIES IMPEDANCE CALCULATIONS 12 16 by W G Heath This program illustrates one of the fundamental formulae connected with electrical problems and may be of interest to electrical engineering students and amateur radio enthusiasts As explained on the first two displays on the video screen a wide variety of problems are solvable and not confined to the general form of series resistance inductance and capacitance alone Some of these elements need not be present but the program is still adaptable it will also operate the OHM s law solutions of current resistance and voltage I E R Following an indication of the scope of the program a display list of all the variables involved is shown Then follows the request for input of known and unknown values related to the problem in question The calcul
8. 10 10 16 17 523 19 18 21 22 20 18 24 25 32 27 28 27 350 315 26 334 997 35 36 35 3 5 37 35 38 35 35 35 39 40 41 42 43 44 45 46 47 48 50 51 52 49 49 50 53 50 49 50 120 S FORI 1TO16 FORJ 1T04 READK S S CHR K NEXTJ I IFD lt gt 1T HENPRINT D CHR 34 S CHR 34 ELSEPRINTit 1 CHR 34 S CHR 34 130 DATA99 1 99 8 6 2 5 9 58 5 5 8 12 4 2 8 19 5 10 66 23 6 1 8 25 7 2 43 22 8 1 8 30 9 3 27 35 10 1 8 40 11 2 9 44 12 1 26 48 17 2 9 50 14 1 59 55 15 1 8 8 16 1 45 140 ST FORI 1T078 READX ST ST CHR X NEXTI IFD lt gt 1THENPRINT D CHR 34 ST CHR 34 ELSEPRINT 1 CHR 34 ST CHR 34 150 DATA31 36 36 42 45 42 20 17 28 52 45 46 51 6 50 33 59 16 6 2 6 3 3 21 7 8 15 60 2 160 DATAZ35 22 55 37 27 7 9 36 39 9 40 14 38 58 56 1 1 41 22 19 8 49 32 38 12 170 DATA37 23 33 10 39 2 40 99 11 46 57 43 99 2 35 41 17 48 53 5 4 5 5 4 4 44 180 PRINT Initiallisation finished IFD lt gt 1CLOSED DR WHO LEVEL II MAIN PROGRAM 10 GOTO640 Dr Who V3 1 James Smith 6 Northern Ave TARRO 2322 20 PRINTS7 deep pit GOSUB580 RETURN 30 PRINTS7 small chamber RETURN 40 PRINTSY following a trail around a steep cliff RETURN 50 PRINT The path forks here RETURN 60 PRINTS8 top 6070590 70 PRINTS8 base GOTOS90 80 PRINTSY lost in the maze RETURN 90 PRINT The path widens for a bit RETURN 100 PRINTS7 secret room RETURN 110 PRINTS7 pass
9. 1080 IFPO 1PRINT The tardis is sitting off to one side 1090 GOSUB1820 NO O FORI 1TO16 IFP O I 1 AND O 1 4 AND1 ONO NO 1 IFND 1THENPRINT Around you you sei PRINT 50 0 1 2 SO 0 1 2 1100 NEXTI GOTO780 1110 IFPO 99PRINTSY still in the tardis GOTO78OELSEY D P V 0 2 IFP 19ANDD 19 1 18THEN1680ELSEIFY 15THEN1SSOELSEIFY 130NLGOTO17 00 1110 1110 1740ELSEIFY 140NL 280T01710 1720 1730 1120 IFL lt gt 6ANDC gt 2 SANDRND 0 gt SIFL 2THENPRINT He has GOTO1690E LSEPRINT They 60701690 1130 IFP 36ANDRND O gt 3PRINT The ship just blasted off were underneath it at the time SY now slightly incinerated G0TO1420 1140 IFP 62ANDRND O gt 3PRINTSH been hit by a low flying tardis G0TO1420 1150 IFP 6ANDRND 0 9Y PO P 200RP 330RP 56 GOTO1060 1170 F 0 IFPO lt gt 99S already outside ELSES now outside PO 1 F i P 1 LX10 1180 PRINTSY S the tardis IFFTHEN1060ELSE780 1190 F 0 FPO 99S already inside GOTO1180ELSEIFPO 1THEN15 SOELSES now 0 99 1 180 1200 IFP0 lt gt 99THEN1540ELSETI TI 1 IFTI gt TLTHENPRINT Your tardis s run out of power SY Lost in 60701420 1210 FORI OTOA 1 L I DZIELSENEXTI D RND 7 1 1220 IFRND 2 1D RND 10 1 IFD 6PRINTSH materialised in space I will reset the tardis for you D RND 7 1 1230 L RINTSH materialised on 3 IFL 3PRINT the dark side o
10. 15 32 JULY STRINGS 20 32 amp AUGUST STRING 17 52 SEPTEMBER 620 H4 ST ING 11 32 OCTOBER STRING 18 32 NOVEMBER STRIN 6 17 52 630 INPUT FOR WHICH YEAR DO YOU WANT A CALENDAR 640 IFY lt 19010RY gt 1999THENPRINT PRINT OUT OF RANGE GOTO430 650 IF4 INT Y 4 YTHENL 1 660 I Y 1901 J INT I 4 I I 4 J42 670 K 5 J 7 INT J 7 12 D K 7 INT K 7 680 GOSUB220 PRINT PRINT PRESS NEWLINE WHEN READY 690 lt gt CHR 15 THEN699 700 GOSUB290 710 M O LPRINTH1 GOSUB440 720 M LPRINTH2 GOSUB440 730 LPRINTH3 GOSUB440 740 M LPRINTH4 GOSUB440 750 B CHR 27 LPRINTB QUT253 12 760 END eX C2 8 4X 13 1 STRINGS 70 LPRINTzLPRINT LPRINT ELSEC STR YR J W 2861 8 ON INTOA 08 0339IW 2 39Vd ee HEX CONSTANTS LEVEL 11 10 CONSTANTS C COPYRIGHT ROGER BOWLER 1981 20 30 40 50 60 DEFINT H N PRINT PLEASE WAIT MS 0 POKE VARPTR MS PEEK 16561 POKE VARPTR HM READ A IF GOTO 130 FORI 1TOLEN A 1STEP2 70 H ASC MID A 1 1 SL ASC MIDS AS 1 1 1 90 100 110 120 150 140 150 160 170 180 190 IFH gt 64THENH H 55ELSEH H 48 IFL 64THENL L SSELSEL L 48 J H 16 L POKE MS J IF PEEK MS J GOTO 120 PRINT YOU FORGOT TO SET MEMORY SIZE END MS MS 1 N
11. 2 x MPI B52 40 ea 2 x MPI B92 80 ea 40 ea lea 2 2 2 x 100K 2 x 200K 3 4 1125 2 x 400K 3 4 1454 3 3 874 Dual drive packaqe includes two bare disk drives self contained dual drive cabinet power supply as illustrated two drive cables and the version of Dosplus indicated All disk drive components are still available separately NOTE All 40 track drives are completely compatible with 35 track operating systems such as TRSDOS DOSPLUS allows you to realise additional 14 capacity compared with TRSDOS Under DOSPLUS 3 4 80 track drives can read 35 40 track diskettes BARE DRIVES MPI drives offer the fastest track to track access time 5 milliseconds available All drives are capable of operating in double density for 80 greater storage capacity Freight MPI B51 40 track single head 100K 5 00 MPI B52 40 track dual head 200K 55 00 MPI 92 80 track dual head 400K Simple wrap around cabinet Separate dual drive power supply Price 399 Reduced Price 449 619 12 85 5 00 2 00 800 Price 99 135 39 49 99 95 149 95 Freight 500 5 00 2 00 5200 5200 5200 Self contained single drive cabinet power supply Self contained dual drive cabinet power supply Two drive cable Fan drive cable DOSPLUS 3 3 DOSPLUS 3 4 Prices are FOB Adelaide Add 5 00 freight for single drive package 10 00 for dual drive package Prices are in Australian doll
12. 24047F 06400 EB 06500 7 06600 EDS2 06700 7C 6800 FEO 66900 2006 07000 7D 07100 FEO4 07200 DA217F 07300 DS 07400 2B 07500 2B 07600 19 07700 ES e78oo MICRO 80 PAGE 12 s PARTITION EXCHANGE SORT QUICKSORT AUTHOR ORG STACK DEFL STADD DEFW LENGTH DEFW LOWER DEFW UPPER DEFW STKSAV DEFW H START LD PARTN LD PUSH RETN LD RIGHT LD PUSHR PUSH LEFT LD PUSHL PUSH COPYRIGHT C 1980 CALLED FROM BASIC AFTER PASSING START ADDRESS AND LENGTH OF ARRAY TO BE SORTED B SIMSON 7F606H STADD 1 NEW STACK sSTART ADDR 5LENGTH OF ARRAY e 3BOUNDS OF DATA e CURRENTLY BEING PROCESSED sBASIC SP STKSAV SP sSAVE BASIC STACK SP STACK INITIALIZE NEW AF AF sSAVE BASIC REGISTERS DE STADD 3START ADDR HL LENGTH 5 IN INTEGERS HL HL BYTES HL DE 5 HL END 2 HL HL DE HL 3 HL START DE END HL sLOWER DE UPPER HL STACK 5 EMPTY A HL SP Z RETN s YES DE 5 UPPER HL LOWER LOWER HL 5 STORE UPPER DE BOUNDS 1 sSET 4 HL sI J HL DE A HL DE HL Z RIGHT 3Z IF I J CMPARE 3COMPARE ITEMS CHEKEG SP STKSAV sRESTORE BASIC SP 3RESTORE REGISTERS AF HL UPPER RIGHT SUBLIST SIZE HL DE 3SIZE 2 IN HL 3CHECK MSB NZ PUSHR 3RIGHT SUBLIST BOUNDS sLSB 4 5 2 INTEGERS C LEFT 5C IF HL lt 4 2 INT DE 5DE TO HL DIVIDER HL HL HL
13. CASO 390 FORX 1 TO 100 NEXT PRINT 1 M CC A B F D E H C FF WANT TO SAVE I PRINT HIT ENTER gt 75 CLOSE 400 CLS LOCATE29 10 PRINT DATA HAS BEEN DUMPED 410 LOCATE23 12 PRINT MAKE ANOTHER OPY lt Y N gt 420 GOSUB 440 450 GOTO 580 440 C INKEY IF THEN 440 450 IF C Y THEN RETURN ELSE IF C N THEN CLS 460 CLS 1 0 25 10 ANY MORE DATA lt Y N gt 470 G THEN 470 480 THEN 70 490 THEN CLS GOTO 500 500 CLS LOCATES1 3 PRINT M E N U 510 LOCATES1 3 PRINT SELECT 1 520 LOCATE2S 6 PRINT 1 INPUT DATA ROUT INE 550 PRINTTAB 23 2 PROJECTION CHART 540 PRINTTAB 23 3 SUMMARY 550 25 4 END 560 A INKEYS IF AS THEN 560 570 B VAL A 0N GOTO 70 580 680 1070 580 CLS LOCATE31 3 PRINT PROJECTION CHAR 590 PRINT PRINT ON THE AVERAGE HOW MANY KM LITRE DOES YOUR CAR DO 600 INPUT P 610 PRINT HOW MANY KM DO YOU WANT IT PRO JECTED FOR 620 INPUT PP 630 XX PP P 640 PRINT PRINT ON PP KM YOU WOULD NE ED 3XX3 LITRES OF FUEL 650 LOCATE17 17 PRINT PRESS ANY KEY TO RETURN TO MENU 660 D INKEYS IF 0 e 670 GOTO 500 680 CLS LOCATE31 3 PRINT SUMMARY 690 PRINT PRINTTAB 6 READS PRERECORDED DATA TAPE CREATED BY INPUT DATA ROUTINE PRINT 700 LOCATE21 7 PRINT MONTHLY OR YEARLY THEN 660 ELSE 67 750 STOP 74
14. 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 Composer 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 8 JULY 1982 MICRO 80 PAGE 2 wee EDITORIAL On behalf of all the staff here at MICRO 80 may I wish you all the best in the coming year I feel a little nervous embarking on this my maiden editorial and a little worried that some of you may not think me too bright considering that my decision to accept this position at this point in time was voluntary But I assure you that the discrepancy between the calendar and cover month has reached a maximum and that one of my main objectives is to remove this discrepancy altogether This will naturally enough take some time to accomplish and I hope that you will afford me the same degree of patience you have my predecessor if not more since by comparison I am but a novice Perhaps I should begin by telling you a little about myself and how I acquired my interest in computing A long time ago or so it seems now when I
15. EC2 IC2 X 2 480 PRINT RESISTANCE sR 490 T ATN X R 457 297578 500 PRINT PHASE ANGLE sT 510 Q COS T 01745329 520 PRINT POWER FACTOR 0 550 1 0 540 PRINT POWER WATTS 5P 550 Z SQR RL2 X L2 2861 8 ON 08 0331W 62 39Vd 560 570 580 590 600 610 620 630 640 650 660 670 680 690 700 710 720 730 740 750 760 770 PRINT IMPEDANCE 2 G W L PRINT INDUCTIVE REACT 6 VL 1 G PRINT INDUCTIVE VOLT DROP VL IF 0 GOTO 660 J 1 PRINT CAPACITIVE REACT sJ VC IXJ PRINT CAPACITIVE VOLT DROP VR 14R PRINT RESIST VOLT DROP 5VR 0 GOTO 720 0 GOTO 720 M 1 2 3 1416 SQR L4 C PRINT RESONANT FREQ sM GOTO 910 L X 1 WHC 7 W PRINT INDUCTANCE 3L RETURN C 1 WHL X W PRINT CAPACITANCE 780 RETURN 790 1 GOTO 390 800 X WXL GOTO 590 810 7 820 QR CZL2 RE2 830 L X W PRINT INDUCTANCE 3L GOTO 390 840 I E R 850 PRINT CURRENT 860 E IX R 870 PRINT VOLTAGE sE 880 R E I 890 PRINT RESISTANCE 900 PRINT INDUCTANCE GOTO 330 910 GOSUB 1530 920 GOSUB 1280 930 GOSUB 1530 940 GOSUB 1100 950 GOSUB 1530 960 GOSUB 1410 970 END 980 PRINT TAB 18 gt gt gt LIST OF VARIABLES USED lt lt lt 990 PRINT 3 86 STRING 22 131 3 PRINT PRINT 1000 PRINT I CURRENT PRINT L INDUCTANCE 1010 PRINT E VOLTAGE PRINT C
16. V 1 V 1 T RETURNELSERETURN 1860 SAVE DRWHO TBS DR WHO LEVEL II DISK CHANGES 720 OPEN I 1 DRWHO DAT 750 INPUT 1 SP INPUT amp 1 50 INPUTS 1 SO INPUT 1 S1 2S1 LEFT S1 60 CHR C34 MID S1 62 4 CHRS 34 51 512 CLOSE1 2861 8 3Wn 10A 08 0331IN ve 39Vd VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 35 NEXT MONTH S ISSUE Next month s articles 1 3 or System 80 Video Genie computers TRS 80 Colour Computer and the Hitachi Peach JUMP THE RAPIDS 111 16 80 This game makes use of the graphic utility MOVIE published in MICRO 80 issue 22 In this game you have to cross a river by jumping from log to log but with the graphic utility Movie driving the graphics it s not easy MORSE CODE TRANSMITTER LII 4K 16K This morse code program will transmit morse code out to the cassette port The code can be random or can be supplied by you As actual morse code is transmitted by this program it is conceivable that the computer output could be hooked up to transmitter for live transmission CHEQUE BOOK DATA FILE COLOUR This program enables you to save all your cheque book transactions cassette data file and retrieve them at will A better way to check queries than to search through the stubs sion of DOSPLUS indicated issue will contain at least the following
17. undefined Line error tends to make me suspect that the memory or some parts of it are defective When a situation such as this arises it is virtually impossible to debug any programs in the machine I once had a similar problem with a defective 16K block of memory in my machine Very short simple machine language programs would work for a moment and then fill the screen with junk turn on the disk drives and I would have to reset the machine It was only by accident that I suspected a hardware fault when after altering memory contents from a monitor I found that they had changed after examining them a few moments later without ever running the program Although line 10 lists as garbage this is in fact correct but the garbage should start just after the REM not where you have indicated The reason for this is that the first part of the program finds where in memory the BASIC program starts and positions to the memory location immediately after the REM token The machine language routine is then POKEd into the memory taken up by the title and explains why the warning regarding this Tine was necessary in the text accompanying the program If you refer to the reply to Mr Montero s letter you will notice that the DATA lines are the same and there are no errors here VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 6 What I would suggest is that you load the program into memory but do not run it Examine line 810 after a short time say 10 20 second
18. 5510 PARTITION LIST 5520 U S SP 5 5 1 1_ 5 5 5 5 1 5330 I zFL 1 5540 IFI JTHEN5400 5350 IFL 1 lt J THENS380 5500 T L I L I L J L J T 5570 IFFL 1FL ELSEFL 1 5380 IFFL 1J J 1 ELSEI I 1 5390 607053540 5400 SR U I SL I L 5410 IFSR gt SLGOSUB5440 605085480 ELSEGOSUBS480 GOSUBS440 5420 RETURN 5430 PROCESS RIGHT SUBLIST 5440 IFSR lt 1THENS460 5450 5 1 5 5 1 1 5 5 1 5 5 0 5460 RETURN 5470 PROCESS LEFT SUBLIST 5480 IFSL lt 1THEN5500 5490 SP SP 1 S SP L SP SP 1 S SP I 1 5500 RETURN The processing overheads of Microsoft BASIC running on a 1 7 or 4 MHz machine does not do justice to this algorithm For my own interest I developed an assembly language version to see just how fast it would be in machine language and I was surprised BASIC really does seem to take an eternity I also developed a BASIC driver to display the numbers on the screen as they were being sorted by the machine language routine QUICKSORT IN Z80 ASSEMBLY This routine will sort integers only allowing for negative values The following points may help to further clarify the assembly language program The start address and length of the array to be sorted are passed to the routine to the storage area labelled STADD and LENGTH This is all that the routine needs to work on the data The Basic stack is saved on initialization because Quicksort will use the stack for its own operations to st
19. CAPACITANCE 1020 PRINT R 1030 1040 PRINT F FREQUENCY EQUIVALENT P POWER WATTS RESISTANCE IMPEDANCE POWER FACTOR PRINT PRINT PRINT PRINT 7 1050 PRINT G INDUCTIVE REACTANCE PRINT VL INDUCTIVE VOLT DROP 1060 PRINT J CAPACITIVE REACTANCE PRINT VC CAPACITIVE VOL T DROP 1070 PRINT M RESONANT FREQUENCY PRINT VR RESISTIVE VOLT D ROP 1080 PRINT W 1090 PRINT TAB 10 2 3 14159 PRINT UNKNOWN VALUE NOTE CAPACITANCE USUALLY MEASURED AS MICRO FARADS AND INPUT AS PER EXAMPLE 600E 6 OR ALTERNATIVELY 0006 RETURN 1100 CLS PRINT352 E 1110 PRINT370 VL VC PRINT379 CHR 168 apium s CHR 148 1120 PRINT 143 CHR 170 PRINTD179 1130 PRINT VECTOR PRINT3207 CHR 170 1140 PRINT DIAGRAM PRINT3271 CHR 170 1150 PRINT3335 CHR 170 PRINT 3371 1160 PRINT3399 CHR 170 PRINT2408 T ANGLE OF LAG PRINT3432 VR PRINT3435 1170 PRINT3460 PRINT3243 PRINT3307 PRINT9463 CHR 130 gt I LET X1 32 Y1 21 X2 102 PRINT3563 CHR 168 PRINT3627 CHR 170 PRINT9629 X PRINT IMPEDANCE PRINT3691 CHR 170 2 4 GOSUB 1550 PRINT9693 LW 1 CW 220 PRINT DIAGRAM PRINT375 7 LW gt 1 CW 1230 PRINT3819 CHR 170 PRINT9821 I E 1240 PRINT9867 R PRINT3883 CHR 170 1250 PRINT2909 PRINT3912 STRING 35 14
20. EDITed these are Line 1000 change the 8 to 20 Line 1200 change the 45 to 57 Line 1670 change the 8 to 20 Line 2000 change the 8 to 20 Line 6025 change the 8 to 20 Line 10000 add an extra 12 keywords DATA items and that s the lot With more keyword files Versafile s searches are faster except global and you can store items under relevant headings There is only one other change I would recommend after you have entered two or three hundred lines print out the entire set of files with P and count the number of entries under each keyword Then EDIT line 10000 again and change the order of the keywords in it to reflect the frequency of use This gives you another boost of speed not much but enough to notice on long searches Since obtaining Versafile I ve finally found a way to store magazine article references and retrieve them in a few minutes without having to leaf through the whole collection for the reviews I need And a way to list all of my clients along with phone numbers computer systems programs used and possible future requirements My rating for Versafile is EXCELLENT 0000000000 THE THEORY AND TECHNIQUES OF SORTING PART 6 by B Simson In the first article of this series a simple method of sorting using exchange techniques was Shown which is the Bubble Sort Although it is one of the simplest algorithms around for handling more than 2 or 3 values it is not one of the most efficient
21. INT D 3 MILES 430 PRINT PRINT PETROL CONS FOR 3C3 KMS IS s PRINT USING 3E PRINT KMS LITRE 440 PRINT PRINT ABOUT INT MI LES PER GALLON 450 PRINT PRINT THAT IS s PRINT USING iH 4 FF PRINT LITRES PER 100 KM 466 PRINT PRINT WANT TO SAVE IT ON TAPE lt Y N gt 470 GOSUB 600 480 CLS 490 SOUND2eO 1 500 PRINT 162 PREPARATION S FOR DUMPING 510 PRINT 290 ENTE WHEN READY 3A 520 CLS PRINT 266 DUMPING DATA 530 AUDIOON 540 OPEN O 1 MILES 550 PRINT 1 M CC A B F D E H C FF 560 CLOSE 1 570 CLS PRINT 226 MAKE ANOTHER COFY XY N 5 S586 GOSUB 600 590 cOTOS520 600 SOUND200 1 610 C INKEY IF C THEN610 626 IF C Y THEN RETURN ELSE I F C THEN CLS 630 CLS PRINT PRINT ANY MORE DATA lt Y N gt 5 200 1 16 G 190 CLS GOTO 680 680 CLS PRINT 44 M ENU 690 PRINT PRINT 700 FRINT 1 INPUT DATA ROUTI 710 PRINT 2 PROJECTION CHAR 726 PRINT 3 SUMMARY 730 PRINT 4 END 740 SOUND200 1 INKEY IF A TH 760 B VAL A ON B GOTO 190 770 880 1550 779 CLS PRINT 4 PROJECTION CHA RT 780 PRINT PRINT ON THE AVERAGE OW MANY KM LITRE DOES YOUR CAR D 0 790 INPUT P 800 PRINT PRINT HOW MANY KM DO Y OU WANT IT PROJECTED FOR H 810 INPUT PP 820 XX PP P 850 PRINT PRINT ON PPs KM YOU W OULD NEED INT XX
22. LEVEL ROM REFERENCE MANUAL UPGRADE TO THIS ASSEMBLY LANGUAGE TOOKIT FOR ONLY 19 951 Send back your orlginal Level ROM Reference Manual plus a cheque money order or Bankcard authorisation for 19 95 plus 52 00 p amp p and we will send you the new ASSEMBLY LANGUAGE TOOLKIT MICRO 80
23. LITRES OF FUEL 840 PRINT PRINT PRINT PRESS ANY KEY TO RETURN TO MENU 850 SOUND206 1 860 D INKEY 1IF D ELSE 870 879 GOTO 680 886 CLS PRINT 44 SUMMARY 890 PRINT PRINT PRINT 900 PRINT MONTHLY OR YEARLY M OR Y 910 SOUND290 1 920 E E INKEY IF E EN 926 930 IF E M THEN950 ELSE1100 940 STOP 950 CLS PRINTG44 MONTHLY 960 SOUND2 1 970 PRINT PRINT PRINT INPUT MON THEN 860 TH TH NUMBER MM 980 0 996 CLS PRINT 230 READING MO NTH 3M 1 100 AUDIO ON 1919 1030 1170 1190 1020 INPUT 1 M CC A B F D E H C FF 1050 CLOSE 1 1040 IF lt gt THEN 990 1050 CLS PRINT 40 MONTH NUMBER 5 M PRINT PRINT 1050 GOSUB1360 1979 CLS PRINT 470 MONTHS lt Y N gt MORE 2861 8 ON AWNIOA 08 032IW 82 39Vd 1080 GOSUB 600 1090 1030 1170 1190 1100 PRINT PRINT 1110 SOUND200 1 1120 INPUT PRESS ENTER WHEN READY A 1130 CLS PRINT 102 READING Y EARLY 1140 M 0 1150 PRINT 234 MONTH M 1 1160 AUDIO ON 1170 OPEN I 1 MILES 1180 INPUT 1 M CC A B F D E H C FF 119 CLOSE 1 1200 Z 1210 1220 1230 RR RR E 1240 IF lt 12 1150 1250 CLS PRINT 44 COSTS 1260 PRINT PRINT 1270 PRINT TOTAL LITRES TOTAL cost 1280 PRINTY Z 1290 PRINT PRINT PRINT TOTAL KMS AVG KM L 130 R RR 12 1310 USING iHi 1320 PRINT P
24. PRINT EQUIV REACT x sX s IMPEDANCE 1 1470 ANGLE T 3 POWER FACTOR 2861 8 ON 3WNTOA 08 033IW 39Vd 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 1730 1740 1750 1760 1770 1780 1790 1800 1810 1820 1830 PRINT IND REACT 6 PRINT CAP REACT J PRINT R VOLT DROP VR PRINT POWER WATTS P PRINT3848 ALL CALCI 964 lt ENTER gt CLS RETURN IF ABS X2 X1 lt ABS Y2 Y DY Y2 Y1 2 1 IF X2 gt X1 GOTO 1640 FOR N X1 TO X2 STEP 1 SET N Y1 Y1 Y1 DY IF 1 lt 0 THEN Y1 O NEXT N RETURN FOR N X1 TO X2 SET N Y1 Y1 Y1 DY IF 1 lt 0 THEN 1 0 NEXT N RETURN DX X2 X1 ABS Y2 Y1 IF 2 gt 1 GOTO 1780 FOR N Y1 TO Y2 STEP 1 SET X1 N X1 X1 DX IF 1 lt 0 THEN X1 0 RETURN FOR N Y1 TO Y2 SET X1 N X1 X1 DX IF X1 lt O THEN X1 O NEXT N RETURN 56 5 IND VOLT DROP VL 3J 3 CAP VOLT DROP VC VR RESONANT FREQ M 3P s ULATIONS COMPLETED RETURN INPUT AS 1 GOTO 1580 DR WHO LEVEL II INITIALISER 10 CLEARSOOO DEF INTA Z DEFSTRS PROGRAM Initialliser for AUTHOR DATE James Smith Sth March 1982 ADDRESS 6 Northern Ave 20 CLS PRINT De Disk or Tape D T AS INKEYS IFAS D THEND ELSEIFAS T THEN 1 PRIN Dr Wh
25. a world of cities under deadly alien attack your weaponry is the latest rapid fire missiles long range radar and incendiary star shells Your force field can absorb only a limited number of impacts complex game ot strategy skill and reflexes from Melbourne House Price 26 50 SUPER NOVA gt Asteroids float ominously around the screen You must destroy the asteroids before they destroy you Big asteroids break into little ones Your ship will respond to thrust rotate hyperspace and fire Watch out for that saucer with the laser As reviewed in May 1981 Byte Magazine Price 26 50 ROBOT ATTACK Talks without a voice synthesizer through the cassette port With just a hand laser a remote space station you encounter armed robots Some march towards you more wait around corners Careful the walls are electrified Zap as many robots as you dare before escaping to a new section More robots await you Price 26 50 STELLAR ESCORT The latest super action game from Big Five As the Federation s top space fighter you ve been chosen to escort what is possibly the most important shipment in Federation history The enemy will send many squadrons of their best fighters to intercept With sound Price 26 50 MICRO 80 PRODUCTS CAT4 THE BEST IN ENTERTAINMENT FROM AMERICA S TOP SOFTWARE HOUSES MICRO 80 now has in stock some of the best games and adventures written for the 80s These p
26. and DE registers back into the sort array is the reverse of the process found in CMPARE Since a swap was done the flag in the C register is toggled TESTJ involves testing the status of the toggle flag to determine which index to update for the next comparison process VOLUME 3 NO 7FaO 7Fe6 7Fe2 7F64 7Fe6 7Fe8 7FOA 7FOE 7 11 7F12 7 13 7 17 7F1A 7F1B 7F1C 7F1D 7F1E 7F1F 7F20 7 21 7 24 7 25 7F27 7 7F2B 7F2C 7F2F 7 55 7 55 7F36 7F37 7F39 7F3A 7F3C 7F3F 7F41 7F45 7 46 7 47 7F48 7F4B 7F4C 7F4E 7F4F 7F51 7 55 7 54 7 56 7 58 7 59 7FSA 7 5 7FSC 7 5 7F60 7F61 7F64 7 5 7F66 7F68 7F69 7F6B 7F6D 7F6E 7 70 7 75 7 74 7 75 7 76 7F77 8 JULY 1982 06100 00200 00300 00400 90500 00600 607060 6860 660 80960 9800 01000 906 01106 000 01200 600 eisee 01400 ED73087F 01500 31FF7E 01600 01700 D 01800 ED5B007F 01700 24027F 02000 29 02100 19 02200 2B 02300 2B 02400 EB 02500 5 26060 DS 02700 21FF7E 02800 B7 02900 ED72 CA417F 03100 D1 03200 E1 03300 22047F 03400 ED53067F 03500 5 03700 B7 03800 EDS2 03700 E1 04000 280C 04100 CD7B7F 04200 18F4 04300 7 7 04400 D9 04500 04600 c9 04700 24067F 04800 B7 049700 ED52 95000 7C 05100 05200 2005 05300 7D 05400 FE04 5500 3809 95600 DS 5700 1 95800 23 95900 23 96000 ES 06100 24067F 06200 ES 500
27. because of uneven sublist sizes generated in the partition ing process but for general cases of random data it is one of the fastest I performed some timing tests and compared them with those for the SupersnappXSort published by Snapp Software which compares their sort with Racet GSF These are the results for 10 000 integers Racet GSF 59 seconds SupersnappX 39 seconds Quicksort 31 seconds Snapp claim that SupersnappXis guaranteed to be the fastest in memory sort on the market which may be true since this version of Quicksort isn t on the market but this comparison gives you an idea of its efficiency Timing figures for some other list sizes for Quicksort are 1 000 integers 2 2 seconds 2 000 integers 5 4 seconds 3 000 integers 8 1 seconds 4 000 integers 11 3 seconds VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 15 These were obtained on a Level 2 TRS 80 running at 1 7 MHz The Art of Computer Programming Volume 3 Sorting and Searching by D E Knuth he compares Quicksort s efficiency with that of the diminishing increment sort or Shellsort discussed 183 fourth article this series He shows that in the average case Shellsort will take 15 time units and Quicksort 11 67 n Log n 1 74n time units where n is the number of items being sorted He also indicates that the mx imum time for Shellsort is less than for Quicksort a point which was referred to above For comparison the formalae for the average case
28. before I became proficient in BASIC and still more time before I could cope with assembly language but shortly thereafter I decided to buy a computer For financial reasons I bought a System 80 with Level II BASIC and 16K of memory despite the fact that the 780 was a different processor Transferring from the 6502 to the 780 proved to be less difficult than I had imagined and it was not long before I had achieved the same level of proficiency with the System 80 Why did I buy a computer Well to be perfectly honest for the thrill of the arcade games I figured that at 204 a time it would eventually pay for itself But after a while the novelty wore off and I became more interested in the computer itself in how it worked and how it did what it did I soon found that 16k of memory was not enough and began to hate my cassette so I bought an expansion interface and a couple of disk drives from Dick Smith s Needless to say as these had only just been released my system had teething troubles for a long time When you add to that my disappointment in the DOS 0S 80 and the general lack of support software I began to seriously doubt the wisdom of making such a large investment in expanding my original system Then I had what I consider a lucky break I came across MICRO 80 right here in my own state no less I suppose there is no need to tell you the rest of the story but I found friendly help assistance and much of the support that I was l
29. decimal Maybe you have even looked enviously at the Disk Basic manual and wished you could write statements such as FOR I amp H3C40 TO amp H3CBF POKE I 8H86 NEXT Well in the world of software nothing is impossible and after running this short program you will be able to write and run programs containing hex constants as in the above example First power up the 80 with a MEMORY SIZE of 20416 4K RAM or 32704 16K RAM then CLOAD and RUN this program 11 the program does iS to POKE some machine code into the 60 bytes of RAM immediately above the MEMORY SIZE limit then it executes a couple of sample statements containing hex constants just to demonstrate that the machine code works Now you no longer need to keep the BASIC program resident so you can type NEW and your 80 will quite happily accept programs with hex constants in them Incidentally if you are typing this program in from a listing you would be well advised to CSAVE it before running it Of course this program will have to be CLOADed and RUN again every time you power on Now how does it work are fortunate that the BASIC interpreter used by the 80 was designed to allow extensions such as this There are about 2 dozen strategically located points during interpretation where the ROM code will jump out into the RAM to see whether the user wishes to do any additional processing This is called an exit from the ROM and in a normal cassette system all these exits are
30. errors but I can t get them to CLOAD correctly from DISK BASIC DOSPLUS NEWDOS and other DOS s more sophisticated than TRSDOS make the assumption that the user is already familiar with the Tandy version of DOS and DISK BASIC and therefore neglect to mention or emphasize the need to disable the interrupts during cassette I 0 All DOS s use the 25mS interrupt to update the software real time clock and perform other background tasks and as the ROM routines that read and write data to cassette have critical timing loops it is essential that interrupts be disabled during cassette 1 0 If they not disabled information coming in during reading will be lost and CSAVEd information will be overwritten with the interrupt pulses To disable interrupts under DISK BASIC type CMD T for TAPE and to enable them type CMD R for RESTART This must be done for both reading and writing to cassette while in DISK BASIC Note that returning to DOS or re booting the system enables the interrupts irrespective of whether or not CMD R has been entered Ed VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 5 From Mr L Montero Bellambi N S W I have bought a System 80 Blue Label and have been using it for quite a while with no problems I CLOADed the program SOUND EFFECTS REVISITED published in Issue 22 September 1981 page 29 My problem is that the program turns on the internal cassette port instead of the internal speaker Everything
31. for having auto start address of 693 is that this is the entry point for the SYSTEM command Here is a list of some parameters that I have discovered so far why don t you write in with some others PROGRAM START LENGTH ENTRY Adventure 3 17152 15616 17232 Air Traffic Controller 17152 2618 17152 Asylum 17139 15620 17326 Back 40 Advent Inter 17408 6145 17408 BMON 29248 3263 31641 Disassembler Instant Soft 28672 3012 28672 Edtasm Plus Microsoft 17280 12035 17280 Eliza Tandy 20480 10241 20480 Penetrator 17408 15360 17408 Penetrator Editor 17408 15360 17409 S Key 17216 1298 17216 Invaders Tandy 17174 3245 17717 Starfighter 17116 15652 17116 Starfighter Trainer 17116 15652 17116 Zbug stand alone 17280 6070 17280 Note that these are the correct parameters for ASYLUM last month s were incorrect LOTTO PREDICTOR Issue 10 Sept 80 pp 29 32 This program has two errors and some potential dangers that need clarification a The copy of this program as supplied on cassette has several control characters between the OPEN statement and the comment in line 690 that list as spaces These produce a SYNTAX ERROR during the execution of line 690 and the ON ERROR trap sends the program to line 790 VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 7 resulting in an endless loop Re type line 690 as it appears in the magazine listing to remove these characters 690 OPEN 0 1 LOTTO TXT FOR CASSETTE USE CHANGE TO 690
32. sound effects You must protect your cities against enemy missiles as your skill increases so does the level of difficulty making accuracy a must SPACEINTRUDERS 26 50 A very fast game with the deluxe version of Space Invaders complete with spitting invaders and the SOS of escaping aliens with sound effects MYSTERY FUN HOUSE 26 50 Can you even find your way in to the Strangest Fund House in existence let alone find your way completely through it or will you get kicked out when the park closes 26 50 An Egyptian Treasure Hunt leads you into the dark recesses of a recently uncovered Pyramid Will you recover all the treasures or more likely will you join its denizens for that long eternal sleep 26 50 Explore a deserted western mining town in search of 13 treasures From rattlesnakes to runaway horses this Adventure s got em all Also includes new bonus scoring System 26 50 Part 1 A small island in a remote ocean holds an awesome secret Will you be the first to uncover it NOTE This is the first partofa larger adventure It will be necessary to buy further tapes to complete the entire Adventure WARNING FOR EXPERIENCED ADVENTURERS ONLY SAVAGEISLAND 26 50 Part2 After struggling through Part 1 you have the consolation of knowing it s half over This concludes the twopart Adventure It requires you have completed Part 1 and received the password to start Part 2 GOLDEN VOYAGE 26 50
33. with a correctly positioned item between the sublists This algorithm can also be implemented recursively as can be seen by its definition but the approach in figure 1 is by iterative means The stack provided implicitly by recursion is used in the iterative approach to store the bounds positions of first and last item of the sublists as they are created THE ALGORITHM IN DETAIL The process starts by pushing the lower and upper bounds of the current sublist on the stack Then as the flowchart shows this list is partitioned until the stack is empty The partition module first gets the bounds of the sublist to be partitioned from the stack On the first time that this module is executed the sublist bounds popped from the stack are the bounds of the entire list as pushed in the initialization phase but as far as the partition module is concerned it is just another sublist to be partitioned The sublist bounds are used toinitialize two indices into the list Items are then compared using these two indices which will initially point to the first and last item in the sublist During the comparison phase the indices are brought closer together by either incrementing the lower index or decrementing the higher index depending on which one was changed last The decision on whether to increment the lower or decrement the upper depends on the status of a toggle flag If it is off the lower index is incremented otherwise the upper index is decrement
34. within itself all jumps are relative using the JR or DJNZ instruc tions So you may well prefer to save the machine code somewhere else in RAM to avoid having to protect high memory way of doing this is to shift the start of basic pointer at 40A4 to point to 4325 instead of 42E9 This is done by POKE 16548 37 POKE 16549 67 NEW The NEW forces BASIC to recompute its pointers to account for the new start address Ignore the SN ERROR Now you have freed up locations 17129 17188 42 9 4324 into which you can store the machine code Happy hexing I always build USR routines using dynamic string packing This technique described Appendix H of the Level II Basic manual involves packing the machine code into a string variable from DATA statements during program initialisation It has a number of drawbacks not the least of which being that it is rather S L 0 W But these I can live with What I do draw the line at is writing machine code in DECIMAL that is something I cannot do Hasn t this crazy computer heard of HEX Well mine has I write my machine code like this 200 DATA CD7F0A 5E23 56 EB C39A0A and I include a little basic subroutine at the end of each program to pack these DATA statements into strings VOLUME 3 NO 8 JULY 1982 0 80 PAGE 20 subroutine reads each instruction from the data as string then decodes and packs each pair of hex digits into a byte which it appends to string P
35. your north a deep hole to your south and a set of rough stone steps leading up the crater wall near a cave entrance RETURN 290 PRINTSY inside the ship near the airlock RETURN 300 PRINTSH just entered a room full of Cybermen Back out very slowly and they might not see you Be carefull RETURN 310 PRINTS8 base of the Cybership RETURN 320 PRINTS7 cave in the cliff face 330 PRINTSY beneath the Cybership 340 PRINTS8 top of a cliff overlooking a spaceship 350 PRINTS heavy machinery RETURN 360 PRINTS6 television screens showing views of different areas For example one shows a white crystal lying beside a mountain path RETURN 370 PRINTSY lost in the slime S9 a tree in the distance RET URN 380 PRINTSY standing at the high point on a vast plain of slime S9 a lone tree to your north RETURN 390 PRINTS8 top of a tall tree tardis can be seen to the south RETURN 400 PRINTSY at a clearing in the slime RETURN 410 PRINTSY following a narrow path along the edge of the cliff RETURN 420 PRINTSY in the midst of a thick fog RETURN 430 PRINTS7 valley between two mountains A thick fog is rolling in from the north RETURN 440 GOSUB610 PRINT upon a vast expanse of ocean RETURN RETURN S9 a tall tree here 450 GOSUB610 PRINT into a bottomless chasm filled with writhing yellow fog 460 PRINTSY on the brim of a deep volcano RETURN 470 PRINTS8 s
36. your existing disk drives on the LNW80 II LNW80 Il Computer complete except for disk drives and monitor Includes CPIM Disk Operating System Dosplus 3 4 Double Density Disk Operating System LNW Extended Colour Basic Interpreter 2750 INC S T 5 Green Phosphor Monitor Super HI RES Hitachi RGB Colour Monitor 265 INCST 1250 INC S T Two Singlesided 40 Track Double Density Disk in cabinet with power supply and cable 825 INC ST MICRO 80 PRODUCTS SCARFMAN This incredibly popular game craze now runs on your TRS 80 It s eat or be eaten You run Scrartman around the maze gobbling up everything in your path Try to eat it all before nasty monsters devour you Excellent high speed machine language action game rom the Comsoft Group With sound Price 17 95 SEA DRAGON Your submarine the USS Sea Dragon penetrates a mined enemy channel Armed with missiles and torpedos you engage the enemy while navigating unknown waters Succeed or come to a salty end in this 29 screens of horizontally scrolling sea scrape and sound from Adventure International Price 26 50 LUNAR LANDER As a vast panoramic moonscape scrolls by select one of many landing sights The more perilous the spot the more points scored if you land safely You control LEM main engines and side thrusters One of the best uses of TRS 80 graphics we have ever seen From Adventure International With sound P
37. 0 1690 PRINT taken an intense dislike to you and torn you to pieces 60701420 1700 PRINTSH to open the grate first G0T0780 1710 PRINTSH been strangled by a Cyberman G0TO1420 1720 PRINT You jumped from the tree and broke your neck Silly you GOTO1420 1730 PRINTSH jumped to your doom G0TO1420 1740 PRINTSH taken a mouth full of slime Uggh GOTO780 1750 PRINT These are not the right parts Take them from my si ght G0TO780 1760 PRINT The spider looked deep into the crystal turned green and rose slowly up through the roof I think it was dead GOTO780 1770 PRINT He doesn t seem interested in it GOTO780 1780 PRINT He takes it and scarpers 0 0 V 1 30 1 LE1O RNDC 10 1 G0T0780 1790 PRINT He eats it 0 V 1 30 1 91 C 01 60 0780 1800 PRINT The Daleks take one look at your copy of Playdalek and freak out down separate tunnels doing cartwheels and blasting the walls in strange ways This must be hot stuff GOTO780 1810 PRINT The creature has calmed down a little and looks frien dly ugly but friendly even talkative C 1 G0TO780 1820 IFP 99RETURNELSEPRINT You can go FORI 1706 IFD P 1 lt gt 151F I lt 3PRINTMID north south 147 6 7 ELSEIFI SPRINT up ELSEP RINTMID east west down I 6 17 6 1850 NEXT PRINTCHR 8 RETURN 1840 IFV O gt V 1 ORV O gt V 2 T CCV C12 42V 2 X1 102V 2 0 X2 T1 V O V 0O V T V T T1 1850 IFV 1 gt V 2 T V 2 V 2
38. 0 s CHR 142 1260 LET X1 33 Y1 42 X2 103 Y2 24 GOSUB 1550 1270 RETURN 1280 CLS PRINT 366 PRINT9 70 CHRS 172 3 CHR 186 CHR C17 1 s CHR C186 5 CHR 171 S CHR 186 5CHR 171 5 tnt 186 CHR 171 5CH R 86 5 CHR 171 5 CHRS 186 151 1290 PRINT392 STRINGS 12 191 5 PRINT3185 CURRENT ES PRINT9224 IND RINT9731 PRINT3755 CHR 170 X IS CHRS 170 1 SCHR 1 1300 PRINT3203 PRINT3243 CAP 1510 PRINT3259 CHR 170 NL PRINT3323 CHRS 138 CHR 170 3 lt s 170 CHR 170 3 VL LEAD 1320 E 1330 PRINT 475 mu cedet I 1340 PRINT3539 1350 PRINTS9603 CHR 170 PRINT3623 1360 PRINT9667 CHR 170 PRINT 687 1370 PRINT9708 gt VR 9751 CHR 170 1380 PRINT3772 1 1590 PRINT 854 1400 PRINT9918 APPLIED VOLTAGE PRINT3495 CHR 168 CHR 170 CHR 170 CHR 170 PRINT3731 CHR 170 PRINT 559 CHR 170 PRINT gt I PRINT3795 15 CHR 138 VC LAG GENERAL SERIES CIRCUIT STRINGS 22 131 RETURN CHR 130 1410 PRINT TAB 11 gt gt gt REVIEW OF VALUES OF ALL VARIABLES lt lt lt 1420 PRINT2379 STRING 55 151 1430 PRINT CURRENT I 31 5 INDUCTANCE L L 1440 PRINT VOLTAGE E E 3 FREQUENCY F 1450 PRINT RESISTANCE R R43 CAPACITANCE 1460
39. 0 00990 ROGRAM 7F7C 20 01000 D 7FBC 20 01010 7E10 01020 CONT SEARCH FSTCAP FNDLET CONVRT NUSENT LINEND NXTBYT NOPROG PROEND MESG1 MESG2 gt MESG3 MESG4 DEFM DEFM END MICRO 80 PAGE 23 A H 3LONG WHICH o 3 INDICATES Z NOPROG NO BASIC PROGRAM LOADED DE HL 3PUT PROGRAM START ADDRESS HL 3 INTO HL AND HL 3JUMP LINE HL 3 POINTERS NXTBYT 3GET NEXT BYTE 22H QUOTE NZ SEARCH 3TRY AGAIN NXTBYT ROUTINE LEAVES 1ST LETTER U 22H 32ND QUOTE Z SEARCH 3SEARCH FOR NEXT QUOTATION 41H LESS THAN C FSTCAP 3SEARCH FOR 1ST CAPITAL SBH GREATER THAN Z NC FSTCAP 3SEARCH FOR 1ST CAPITAL NXTBYT 22H 32ND QUOTE Z SEARCH 3SEARCH FOR NEXT QUOTATION 2EH 3 PERIOD Z NUSENT 3 CHECK FOR NEW SENTENCE 41H 3LESS THAN A C FNDLET FIND LETTER SBH 3GREATER THAN Z NC FNDLET FIND LETTER A 20H CONVRT TO LOWERCASE CHL A STORE BACK IN PROGRAM FNDLET NXTBYT 22H 32ND QUOTE Z SEARCH 3SEARCH FOR NEXT QUOTATION 20H 3 SPACE NZ CONVRT 3 THEN CONVERT NXTBYT 22H 32ND QUOTE Z SEARCH 3SEARCH FOR NEXT QUOTATION 20H 32ND SPACE NZ CONVRT 3 THEN CONVERT FSTCAP 3SEARCH FOR FIRST CAPITAL BC CLEAR STACK HL 3JUMP OVER HL 3LINE POINTER A HL 3 CHECK FOR o END PROGRAM Z PROEND RET TO BASIC HL 3JUMP OVER HL 3LINE NUMBER SEARCH 3LOOK IN NEXT LINE HL A HL 3LOAD NEXT BYTE o JEND OF PROGRAM LINE Z LINEND 360 JUMP LINE POINTERS HL MESGS PRINT NO PROGRAM MESSAGE DE 5
40. 0 CLS LOCATES31 3 PRINT MONTHLY 750 PRINT PRINT PRINT INPUT MONTH NUMBER 3MM 755 LOCATE26 9 PRINT MAKE PREPARATIONS 756 A 0 PRINT PRINT TAB 23 PRESS RETURN WHEN READY 757 G INKEY IF G THEN 757 760 M 0 CLS LOCATE29 10 PRINT SEARCHING FOR MONTH 3 MM 770 OPEN I st1 CAS DATA 780 INPUT 1 M CC A B F D E H C FF 790 CLOSE LOCATE29 12 PRINT JUST READ MONTH 3M IF M MM THENS ELSE IF M lt gt MM THEN 770 800 CLS LOCATES1 3 PRINT MONTH NUMBER PRINT PRINT PRINT 810 GOSUBi080 820 CLS LOCATE29 10 PRINT ANY MORE M ONTHS Y N 850 GOSUB 440 840 GOTO 740 850 CLS LOCATE31 3 PRINT YEARLY 860 LOCATE26 7 PRINT MAKE PREPARATIONS 870 A 0 PRINT PRINT TAB 23 PRESS RETURN WHEN READY 875 G G INKEY IF G THEN 875 880 CLS LOCATE29 1 PRINT READING YEAR LY PRINT PRINT 890 M 0 2Z 0 Y 0 Q 0 RR 0 PRINT 5 ONTH KM LITRES COST KM LITRE 900 OPEN 1 DATA 910 INPUT 1 M CC A B F D E H C FF 920 7 7 930 Y Y F 940 00 00 C 95 RR RR E 955 CLOSE PRINT 6 950 IF 12 970 ELSE 900 970 PRINT 5 00 2 00 980 PRINT PRINT 990 PRINT TAB 20 TOTAL LITRES TOTAL C OST 1000 PRINT TAB 26 Y 7 1010 PRINT TOTAL KMS AVG KM L 1030 PRINT GO QQ Y 1040 PRINT PRINT PRINT PR ESS ANY KEY TO RETURN TO MENU 1950 GOSUB 470 1060 RETURN 1070 CLS L
41. 12 11300 LD DE A sMSB 7 2 1 11400 DEC DE 7 78 11500 LD A B 3GET LSB 7FA4 12 11600 DE A 3LSB 11799 TOGGLE FLAG 7 5 3E01 11800 LD 8 1 7 7 9 11900 c 3J FLAG 7 4F 12000 LD 7 9 1808 12100 JR TESTJ 7 7 12200 UNEQU LD A H HL SIGN 7FAC E680 12300 AND 7 2957 12400 JP P SWAP 3P IF HL HIGHER 7FB1 1 12500 OK POP HL 3NO SWAP 7FB2 D1 12600 POP DE 7FB3 79 12700 TESTI LD A C 3TEST J FLAG 7FB4 B7 12800 OR A 7FB5 2003 12900 JR NZ DECR 3NZ IF SET 7FB7 23 15000 INC HL c 3NEXT INT 7FB8 23 13100 INC HL 3 FOR LOWER 7FB9 C9 13200 RET 7FBA 1B 13300 DECR DEC DE 3PREV INT 7FBB 1B 13400 DEC DE 3 FOR UPPER 7FBC C9 13500 RET 7Fea 13600 5 END 5 BASIC DRIVER The following BASIC program will drive the sort routine course before calling the sort the necessary parameters must be passed to it These are the start address of the unsorted array and the number of integers it contains for sorting this is done in lines 1220 1250 Line 1210 pokes the entry point for the USR 0 function which is used to invoke the machine language program The destination of the parameters is known by the assembly program and these are poked into their correct locations least significant byte first It is important at this point to mention that once the start address of the array is found by the VARPTR function no other variables should be defined before calling the sort si
42. 2 Load the machine language using SYSTEM 3 32272 ENTER NEWLINE to start To load from distribution disk 1 BASIC 65040 ENTER NEWLINE 2 CMD CONVERT 3 Type 65040 ENTER NEWLINE to start The program will initialize and display a copyright message Then load the BASIC program you want converted and when ready type SYSTEM ENTER NEWLINE 32272 ENTER NEWLINE You can use the converter as many times as you like The CMD file and EDTASM file supplied on the distribution DOS are for a 48k system For a 32k system and suitably assembled machine language program use 48656 as the memory size and entry address 0000000000 00010 00020 LOWER CASE CONVERTOR VER 2 0 00030 00040 CREATED 17 JUNE 1982 00050 BY DENNIS WRIGHT 00060 1 SNEAD COURT DINGLEY 5172 00070 C ALL RIGHTS RESERVED 00080 00090 BASBEG EQU 40A4H 40F9 00100 BASEND EQU 40F9H 00110 BASIC EQU 4020 00120 CURSOR EQU 4020H 00130 7 10 00140 ORG 7E10H 7 10 CDC901 00150 INIT CALL O1C9H 7E13 21BC7E 00160 LD HL MESG1 PRINT MAIN MESSAGE 7E16 11403C 00170 LD DE 3C40H 7 19 018000 00180 LD BC 80H 7 1 EDBO 00190 LDIR 7 1 213C7F 00200 LD HL MESG2 7 21 11003D 00210 LD DE 3DOOH 7E24 014000 00220 LD BC 40H 7E27 EDBO 00230 LDIR 7E29 218050 00240 LD HL 3D80H 3PLACE CURSOR 7E2C 222040 00250 LD CURSOR HL BELOW MESSAGE 7E2F EDSBA440 00260 LD DE BASBEG 7E33 2 940 00270 L
43. 210 60T01260 1210 16526 10 POKE16527 127 gt ENTRY 7F AH 1220 POKE32512 S AND 255 START 2 7 1230 POKES2513 S 256 AND 255 1240 POKE32514 L AND 255 gt LENGTH 3 7FO2H 1250 2515 L 256 AND 255 RETURN 1260 PRINT INPUT HIT ENTER TO START THE SORT S 1270 PRINT PRINTTAB 10 SORTING 1280 S USR e gt SORT ROUTINE 1290 PRINT AFTER SORT 1300 GOSUB1320 1310 END 1320 FORI 1TOL 1330 PRINTA CI 1340 NEXT 1350 RETURN 1360 VISUAL DEMO DATA 1570 V INPUT GRAPHIC amp SPL CHARS INCL V 1380 IFV Y THENR 159 D 32 ELSE R 26 D 64 1590 CLS PRINTCHR 25 FORI 15360T016382STEP2 1400 POKEI 0 POKEI 1 32 1410 NEXT 1420 S 15360 L 512 1430 GOSUB1210 1440 7 1 2 1440 1450 ISR 1460 7 2 1470 THEN1460 EFFICIENCY Quicksort performs well on large lists sizes It does not have the same property as Bubble etc where sort times increase dramatically as the list size increases linearly Its efficiency is similar to diminishing increment and tree sort of the order of n log n This algorithm is one of the fastest that I have come across for average random data here are algorithms around which will outperform this one but only for special forms of data e g the Radix sort is extremely fast on numbers which have a limited number of digits Also Quicksort does not perform very well on semi ordered lists
44. 219 PRINT 1 DEFINT 220 PRINT 1 DEFSNG 230 PRINT 1 DEFDBL 240 PRINT 1 250 PRINT 1 260 PRINT4 LIST OF DIMENSIONED ARRAYS 270 FOR X 1 TO A 280 PRINT 1 DIM NAME 290 NEXT X 30 PRINT 1 310 PRINT 1 SUBROUTINE INFORMATION 320 PRINT 1 330 PRINT 1 START 4 END COMMENTS 540 PRINT 1 35 FOR X 1 360 PRINT 1 3 370 PRINT 1 STRINGS 41 380 NEXT X 390 PRINT 1 400 PRINT 1 VARIABLE LIST 410 PRINT 1 420 PRINTit1 NAME LABEL USE 430 PRINT 1 440 FOR X 1 T0 c 450 PRINT 1 460 PRINT 1 STRINGS 44 479 NEXT X 480 PRINT 1 490 PRINT 1 PERIPHERALS REQUIRED 500 PRINT 1 510 PRINT 1 CASSETTE 1 CASSETTE 4 2 PRINTER DISCS NUMBER RE QUIRED 520 PRINTS I aNOTESE 530 PRINT 1 540 PRINT 1 550 PRINT 1 560 NEXT J 565 CLOSE 570 CLEAR 5e 58e VARIABLE LIST 59e NUMBER OF ARRAY LINES 600 SUBROUTINE LINES 610 VARIABLE LINES 620 COPIES REQUIRED 630 LOOP COUNTER FOR COPIES 640 AND C xa lt ow MILEAGE CALCULATOR HITACHI PEACH 10 MILEAGE CALCULATOR 12 FRANK GRECO 13 7 RIVERVIEW COURT 14 7 MARIBYRNONG VIC 15 HII 20 CLS LOCATE15 10 PRINT KILOMETERS PER LITRE MILES PER GALLON
45. 75 1 7 s X X First non blank character Position to 76 FORZ XTOC1 Now forwards along the line 77 2 220 2 128 XX to check for blanks 78 C Z kk First entry on line non blank to C 79 2 Characters in the range C to on this line 80 POKELO PEEK Z Poke them to the buffer string A 81 LO LO 1 Increment the buffer string pointer 82 NEXT kk Continue till that line completed 3 XX X 64 7 Go down one line 84 FORZ XXTOXX 63 And check it 85 2 Z320RPEEK 2 128 NEXT X X Cheek for blanks 86 POKELO 26 kk Put in a line feed 27 And don t forget the buffer counter gt 1 X Hold present position C2 89 FORZ C2TOCi1 64 End of top line to start of next 90 POKELO 24 k backspace characters 91 LO LO 1 X And increment the pointer each time 92 NEXT X until enough back spaces are entered 93 IFX 16380THENNEXT 7 End of Screen No another line 94 X LO L1 X X Number of characters into X 95 CLS k Must I do that again 96 PRINT THERE ARE X STATEMENTS IN THAT DRAWING 97 PRINT EDIT THE REO LINE AND ENTER STRING NUMBER AND BYTES NEXT RUN 98 END End of packing Easy heh 99 kk Transfer from buffer A to selected string 22 100 LO VARPTR A ZZ VLT address for selected string 101 LO PEER LO 1 256kP
46. C Clears the screen and leaves the cursor in the last position R Repeat the contents of the buffer onto the screen Useful for progressive animation sequences A Enters the ASCII mode This will show a large cursor which will respond to arrow keys to move without altering the existing graphics or will place any selected keyboard characters onto the screen Pressing ENTER returns control to the CURSOR mode Auto repeat is available after about a third of a second J If you have a printer with graphics capability this will dump the screen to paper Initialis ing your printer to the correct mode is your problem The dump is straight ASCII and emulates the features of NEWDOS As this information is taken straight from the screen no lower case is acceptable and this is the reason the LC is not available in the ASCII mode VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 16 Once the pack command has been given the contents of the screen will be transferred to the buffer when this is completed you will be informed of the number of bytes transferred Edit the string array to which you wish this design to be copied to the exact number of bytes required You won t be able to later The line number equals the string number 10 aid with this chore the target strings are set to 100 bytes Delete or add enough characters to suit your design and RUN This time answer the question about target and length with this information The b
47. CONVERSION 50 LOCATE25 12 PRINT WRITTEN BY FRANK GR ECO 2861 8 ON IWNIOA 08 0321H 92 39Vd 40 LOCATE20 14 PRINT MARIBYRNONG VICTORI A AUSTRALIA 3032 50 FORX 1 TO 30 0 NEXTX 6 GOTO 500 70 CLS INPUT PLEASE INPUT MONTH NUMBER 1 TO 12 M 80 INPUT PLEASE INPUT KILOMETERS AT THE START 3A 90 INPUT PLEASE INPUT KILOMETERS AT THE END B 100 INPUT PLEASE INPUT HOW MANY LITRES Y OU HAVE PUT IN THE TANK F 110 INPUT PLEASE INPUT COST CC 120 C B A 150 PRINT PRINT 140 PRINT YOU HAVE TRAVELLED C KILOM ETERS 150 PRINT PRINT 160 REM CONV KM TO MILES 170 D C 0 62 180 PRINT THAT S ABOUT D MILES 190 PRINT PRINT NOW I AM WORKING OUT YOU R PETROL CONSUMPTION 200 FORX 1 TO 1000 210 CLS 220 REM PETROL CONS 230 E C F 240 G ExO 62 250 H 6 4 5 260 REM LITRES PER 100 KM 270 FF F C 100 TOTAL DISTANCE TRAVELLED I 280 PRINT 5 sCs KMS 290 PRINT PRINT WHICH IS ABOUT D MILES 500 PETROL CONS FOR sC KMS IS KMS LITRE 310 PRINT PRINT THAT S ABOUT H s M ILES PER GALLON 320 PRINT PRINT THAT IS FF LITRES PER 100 KM 330 LOCATE19 14 PRINT T ON TAPE lt Y N gt 340 GOSUB 440 550 CLS 360 LOCATE25 7 PRINT MAKE PREPARATIONS F OR DUMPING 370 LOCATE29 10 PRINT WHEN READY G INKEY IF G THEN 375 ICATE29 10 PRINT DUMPING DATA 411
48. Can you rescuethe Blue Ox from the quicksand Or find your way out of the maze of pits PIRATE S ADVENTURE 26 50 Yo ho ho and a bottle of rum Meet the pirate and his daffy bird along with many strange sights as you attempt to get out of your London flat and get to Treasure Island Can you recover Long John Silver s lost treasures MISSIONIMPOSSIBLE 26 50 Good morning your mission is to and so it begins Will you be able to complete your mission in time Or is the world s first automated nuclear reactor doomed This is hard There s no magic and no help this time but plenty of suspense Good luck gt VOODOOCASTLE 26 50 Count Cristo has had a fiendish curse put on him by his enemies There he lies with you as his only hope Will you be ableto rescue him or is he forever doomed Beware the Voodoo Man THECOUNT 26 50 You wake up in a large brass bed in a castle somewhere in Transylvania Who are you what are you doing here and WHY did the postman deliver a bottle of blood You ll love this adventure in fact you might say it s Love at First Byte STRANGE ODYSSEY 26 50 Marooned at the edge of the galaxy you ve stumbled on the ruins of an ancient alien civilization complete with fabulous treasures and unearthly technologies Can you collect the treasures and return home or will you be marooned forever PYRAMID OF DOOM GHOSTTOWN SAVAGEISLAND MISSILE ATTACK 20 50 This is a real time game with
49. D HL BASEND 7E36 B7 00280 OR A 3CLEAR FLAGS 7E37 52 00290 SBC HL DE 3FIND PROGRAM LENGTH 7E39 7D 00300 LD A L ROUTINE CHECKS 7 2 00310 CP 2 31F PROGRAM LENGTH 7ESC 2005 00320 JR NZ CONT sIS ONLY TWO BYTES VOLUME 3 NO 8 JULY 1982 7ESE 7C 00330 7ESF 00340 7E41 285D 00350 7E43 EB 00360 7E44 23 00370 7E45 23 00380 7 46 23 00390 7 47 CD997E 00400 7E4A FE22 00410 7EAC 20F9 00420 7 4 CD997E 00430 7 51 FE22 00440 7 55 28F2 00450 7 55 41 00460 7 57 38F5 00470 7 59 5 4 7ESB 1 00490 7ESD CD997E 00500 7E60 FE22 00510 7E62 28E3 00520 7E64 FE2E 00550 7E66 280D 00540 7E68 FE41 00550 7 38F1 00560 7E6C FESB 00570 7 30ED 00580 7 70 C620 00590 7 72 77 00600 7E73 18E8 00610 7E75 CD997E 00620 7E78 FE22 00630 7E7A 28CB 00640 7E7C 2 00650 7E7E 20E8 00660 7E80 CD997E 00670 7E83 FE22 00680 7 85 28 00690 7E87 20 00700 7E89 20DD 00710 7E8B 18C1 00720 7E8D C1 00730 7E8E 23 00740 7 23 00750 7 90 7 00760 7E91 FEOO 00770 7 95 2819 00780 7 95 23 00790 7E96 23 00800 7E97 18AE 00810 7E99 23 00820 7E9A 7E 00830 7E9B 00840 7E9D 28EE 00850 7E9F C9 00860 7 217C7F 00870 7 5 11003D 7EA6 014000 00890 7 9 EDBO 00900 7 C3CCO amp 00910 7EAE 21BC7F 00920 7EB1 11003D 00930 7 4 014000 00940 7EB7 EDBO 00950 7EB9 C3CCO6 00960 7EBC 20 00970 AMS VERSION 2 0 7EFC 20 00980 17 JUNE 1982 7F3C 2
50. E USED FOR PRO ALTERNATIVELY NO INDUCTANCE IS P 90 PRINT INDUCTANCE CAN BE CALCULATED FOR AN INDUCTIVE CIRCUIT WITHOUT CAPACITANCE IF I E AND R ARE KNOWN VALUES PRINT 100 PRINT FINALLY THE PROGRAMME WILL ALSO OPERATE SI MPLE OHM S LAW SOLUTION I E R BY INPUTTING O ZERO FOR B OTH C CAPACITANCE AND L INDUCTANCE SIMULTANEOUSLY P RINT 110 PRINT AFTER ALL CALCULATIONS HAVE BEEN COMPLETED A FURTHER TWO SCROLLS OF THE SCREEN CAN BE MADE WHICH WILL DISPLA Y CIR CUIT DIAGRAM OF THE GENERAL SERIES CIRCUIT FOLLOWED BY VECTOR DIAGRAM AND IMPEDANCE DIAGRAM GOSUB 1530 120 GOSUB 980 130 GOSUB 1530 140 PRINT 15 gt gt gt INPUT OF KNOWN VALUES lt lt lt 150 INPUT CURRENT I 160 INPUT VOLTAGE 170 INPUT RESISTANCI 180 INPUT CAPACITANCE 190 INPUT INDUCTANCE L 200 INPUT FREQUENCY gt 210 INPUT EQUIV REACT 220 LET W 2 5 1416 230 IF 0 AND 240 AND 250 AND 260 AND AND L O GOTO 810 270 AND GOTO 790 280 AND X 0 GOTO 800 290 GOTO 340 300 GOSUB 730 310 LET W 2 3 1416 F 320 X WSL 1 WAC 330 PRINT EQUIV REACT sx 540 G W L 350 PRINT INDUCTIVE REACT 6 560 GOSUB 1530 370 IF 0 AND L O GOTO 390 380 IF 0 GOSUB 760 590 IF gt LETX X 400 IF Y I GOTO 430 410 IF Y E GOTO 450 420 IF Y R GOTO 470 450 I E SGR GRE2 2 440 PRINT CURRENT z 5I 450 E I SGR CRE2 CXE20 460 PRINT VOLTAGE sE 470 R SQR
51. EEK LO 2 XX Actual address to LO 102 FORX 1TOZ1 Number of Bytes to transfer 105 1 Transfer from A to 6 22 104 0 1 X Increment the counter 105 Until finished 21 bytes 106 END End of transfer from buffer to target string 107 kk The Screen Print Subroutine Emulates JKL feature 108 Z9 VARPTR Z9 7 VLT address of dummy string 29 109 POKEZ9 64 X X Tell the interpreter it s 64 bytes long 110 5560 TO 16585 STEP 64 XX Screen in lines to Z8 111 256 kk Extract MSB of 787 to 27 112 27 X256 7 And the LSB of 287 to 267 113 1 267 XX Transfer LSB of screen line to VLT 114 2 177 kk Transfer MSB of Screen line to VLT 115 LPRINTZ9 Now print that screen line as 29 116 NEXT XX And continue till end of screen 117 RETURN Then go back to caller 118 END This really is the end VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 18 SOFTWARE SECTION VARIABLE WORKSHEET Peach and CC It is good programming practice to document programs as an aid to understanding how they work At the time of writing a program this procedure seems totally unnecessary because you are thorough ly familiar with the program with its variable usage and with how it functions However if your memory is like mine when you come back to it after a month or so to tidy it up or improve it y
52. ELSEPRINT The spider has eaten GOTO1420 1PRINT Ohoh here comes a SI L ELSEIFCPRINTS9 a SI L here TOLEN A X MID A I 1 IFX 1 NEXTIELSEIFNOTKTHENSW J SW J X NEXTIELSEIFJ lt STHE NK 0 J J 1 SW J X NEXTI 870 FORI 1TOJ SW I LEFTS SW I 3 NEXTI K 0 FORI 1703 A1 1 0N 78 FORIi1 1TO78 AI INT A1 AN 2 X MID SC AI amp 3 2 3 IFSW I gt X A1 AI 1ELSEAN AI 1 880 lt gt 5 1 ANDA1 lt ANNEXTI 1ELSEIFX SW 1 ASC MID S1 AI 1 1 IFK gt 2THENGOSUB1840EL SENEX TI GOSUB1840ELSENEXTI GOSUB184 890 IFRND O gt 978ANDWTANDPS lt gt 99PRINTSY hit over the back of the head and everything goes black You awake to find that everything you were holding is gone FORI 2T016 1 1 90THENO I 1 6 GOTO84 ELSENEXTI GOTO840 900 IFV 0 22ANDV 2 1000RV 1 1 00AND V 0 gt 17ANDV 0 lt 27ANDV CO lt gt 22 PRINT Please be more specific GOTOB40 910 0 33aNDV 1 46THENIFO 3 1 900NDO 16 1 900 16 1 291 PR INTSH desionated the cumquat into GOTO1410ELSE1500 920 ONV O GOTO1110 1110 1110 1110 1110 1110 1190 1170 1020 1200 1240 1440 840 1060 1370 1280 970 840 1310 1310 1270 1350 1340 840 930 950 1040 PRINT What 2 GOTO840 930 IFV 1 lt 310RV 1 46THEN1 450ELSEX1 V 1 30 IFO X1 1 90 1 46 OELSEIFO X1 1 lt gt
53. ESETing its controls you can travel between the six planets and Galafry As usual the six parts are disguised as other things and you will have to use your intuition to figure out which is which There is a way to tell All the planets are inhabited and most inhabitants tend to be antisocial Whether you TALK to them HIDE from them kill them OFFER them gifts of appeasement or simply ignore them is up to you Most objects are obvious but some are hidden and have to be SEARCHed for Only one key part is on any one planet Beware the maze on Peladon You can use commands of up to 64 characters The program will ignore any words it doesn t under stand Commands can be one two or three words long When you find all the parts or think you have take them back to the throne room on Galafry to win The program only needs to read in data once You will only need to rewind the data tape if you type BREAK or answer no to the Another game question 0000000000 LOWER CASE CONVERTER FOR BASIC PROGRAMS by D M Wright After you have fitted a lower case conversion kit to your TRS 80 System 80 and have a Driver routine operating to your satisfaction you will no doubt look back at all those BASIC programs you have produced with only capital letters displayed While many programs have only a few statements in the way of instructions to modify the thought of virtually retyping some of the long Adventure type programs is most d
54. EXTI GOTOSO ERROR GOTO 110 LOCATE 1ST BYTE 1 16562 5 5 5 5 BEYOND MEM SIZE POKE 16789 PEEK VARPTR HX POKE 16790 PEEK VARPTR 1 CLS PRINT YOU CAN NOW USE HEX CONSTANTS FOR I amp H3C40 TO amp HSCBF POKE 86 PRINTO amp HCO HERE IS DEMO DATA D7 CF48 0604 110000 7E FE30 3B1F FESA 380A FE41 3817 DATA FEA47 3013 D607 E60F 48 0604 CB23 CB12 10FA B3 SF 41 DATA 07 100 78 4 029719 0552141 3 02 52 40 9 333 SERIES IMPEDANCE LEVEL II CIRCUIT 10 CLS PRINT TAB 16 gt gt gt SERIES IMPEDANCE CIRCUIT lt lt lt 20 PRINT 84 STRINGS 24 131 5 30 PRINT PRINT PRINT WIDE VARIETY OF ELECTRICAL CIRCUIT PROBLEMS OF THIS CATEGORY ARE SOLVEABLE DEPENDING UPON THE KNOWN AND UNKN OWN 40 50 PRINT VAR IABLES AVAILABLE PRI PREPARED BY W G HEATH 18 OXLEY ROAD NT NEWCASTLE N S W WARATAH 2298 THE PROGRAMME WILL CALCULATE ALL THE VARIABLE S SHOWN IN THE FOLLOWING SCHEDULE SUBJECT TO APPROPRIATE INPUT PRINT OVIDING ONE UNKNOWN IS EITHER I E OR R AND 1 OR MAKE NO ENTRY FOR THE UNKNOWN VALUES I E PRESS lt ENTER gt ONLY WHEN INPUT FOR THESE VARIABLES IS CALLED FOR ER 70 80 GOSUB 1530 PRINT PRINT PRINT BLEMS WHERE CAPAC ITANCE OR RESENT PRINT IT WILL HANDLE TWO UNKNOWNS SIMULTANEOUSLY PR THE SECOND IS EITH THE PROGRAMME CAN B
55. I1 VAL MID 0 1 12 I2 VAL 10 0 2 1 IS VAL MID Q 3 1 14 VAL MID 0 4 10 300 LPRINT LPRINT LPRINT 510 LPRINTTAB 20 M M III CCC RRRR 000 88 320 LPRINTTAB 20 MM MM I C CR RO 8 e 330 LPRINTTAB 20 M MM I C RRR O 0 88 0 o 340 LPRINTTAB 20 M M I C CR RO 0 o 350 LPRINTTAB 20 M M III CCC R R ooo 360 LPRINT LPRINT 370 LPRINT STRING 70 zLPRINT 380 0 09 390 B STRING 18 32 X 11 1 14 1 400 LPRINTB 410 420 LPRINT LPRINT 430 RETURN 440 LPRINT LPRINTAS 450 FORW OTO4 B 460 FORI OTO2 470 FORJ eTO6 480 IFYR M I J W OTHENC 490 IFLEN C XSTHENC C 500 B B 4C 510 NEXTJ NEXTI 520 LPRINTB 550 NEXTW 540 LPRINT RETURN 550 CLS PRINTTAB 23 MICRO 80 CALENDAR 23 STRINGS 17 PRINT 560 PRINT THIS PROGRAM WILL GENERATE A CALENDAR FOR ANY YEAR IN THE RANGE1901 1999 ALL YOU HAVE TO DO IS TO SPECIFY THE YEAR m 570 PRINT THE PROGRAM TAKES FEW SECONDS TO DO THE CALCULATION S AND YOU CAN SET THE PRINTER TO TOP OF FORM WHEN EVERYTHING IS READY A HARDCOPY OF THE CALENDAR WILL BE PRINTED 580 a SU MO TU WE TH FR SA A A A A 590 H1 STRINGS 11 32 JANUARY STRINGS 18 32 FEBRUARY STRIN 6 18 52 MARCH 600 H2 STRING 12 32 APRIL STRINGS 21 52 MAY STRING 22 3 2 4 JUNE 610 H3 STRINGS
56. INPUT READY CASSETTE 0 b The program should be terminated in line 780 and not allowed to proceed to line 790 Change line 780 to 780 PRINT RUN ENDED CLOSE END With these changes the program will function as described in the accompanying text However during the investigation of this program a number of interesting observations were made about the ON ERROR GOTO RESUME statements 0 The ERROR GOTO statement establishes an error trap and any subsequent errors that occur during program execution or after will be processed by the program line referenced The fact that an error at BASIC READY prompt causes resumed execution of the program in the error handler can be disatrous 2 An error trap can be reset using the statement ON ERROR GOTO f WARNING JOYSTICKS AND INPUT OUTPUT PORTS FOR YOUR 80 There is no actual bug in this hardware project but there is a potential source of trouble for the unwary Mr Tilley from Victoria had assembled the interface and connected it to his Model I only to find the system locked at power up He made every effort to try and determine the cause himself but to no avail so he contacted us for help I couldn t image what the trouble could be either and in turn contacted Allan Dent the author He informed me that the Tandy edge connector on the Model I has non standard numbering in that the odd numbered pins are on the top and not the bottom Although there should be no problems i
57. NEW x NEW x Tractor Feed Mechanism for Daisy Writer ET121 380 Now your Daisywriter 2 can handle continuous stationery Ideal for invoices and statements etc Prices include Sales Tax and are subject to change without notice Prices are FOB Adelaide Add 20 road freight anywhere in Australia All equipment carries MICRO 80 s Australia wide 90 day warranty covering parts and labour MICRO 80 PRODUCTS 7 DISK OPERATING SYSTEMS amp DEVELOPMENT SOFTWARE You can increase your programming productivity the execution speed and user friendliness of your programs by using an enhanced Disk Operating System DOS Together with the other utility software you can get the most from your disk drives DOSPLUS 3 3 Specify Model I single or double density or Model III An economic DOS intended for the first time user and requiring single sided disk drives The TRSDOS amp DISK BASIC MANUAL is required to supplement the DOSPLUS manual 99 95 DOSPLUS 3 4 149 95 Specify Model single or double density or Model III With a high degree of compatibility with TRSDOS DOSPLUS 3 4 supports single or double sided single or double density 5 or 8 disk drives with any track count up to 96 Suitable for the first time or experienced user wanting a fuss free bug free easy to understand but very powerful DOS which supports variable length records up to 255 bytes long Comes with a stand alone manual ENHBAS 52 95 ENHBAS ad
58. OCATE29 10 PRINT THE END END 1980 PRINT 20 LITRES cost 1090 PRINT TAB 26 F 3CC 1100 PRINT TOTAL KMS AVG KM L 1110 PRINT C E 1120 LOCATE21 17 PRINT PRESS ANY KEY TO RETURN TO MENU 1159 GOSUB 470 TOTAL 2861 1 8 ON 3Wfr0 08 033IW 42 39Vd CALENDAR 3396 LEVEL II 10 CALENDAR 20 WRITTEN BY R J WIWATOWSKI 40 CLEAR600 50 DEFINTD I N W Y 60 11 11 6 4 X 9 9 70 DATAS1 28 31 30 51 30 31 31 30 31 30 31 DATA 0600000 e0000000 e eo e e 000000 90 DATA 11 7 1j ys 11 y 11 11 1111117 100 DATA 222222 22222222 22 222222 222222 222 2222222 110 DATA 33333333 3 333 333333 120 DATA 4 4444 44 44 44444444 150 55555555 55555555 55 140 DATA 666666 66666666 66 66 150 DATA 77777777 555555 77 77 160 DATA 888888 888888 888888 88 170 DATA 999999 99999999 9999999 99 99 9 99999999 999999 180 FORI OTO11 READL I NEXTI 190 FORI 0T09 FORJ 0T09 READX I J NEXTJ NEXTI 200 B CHR 27 G LPRINTB 210 GOTOSSe 220 11 230 W 0 DT 1 240 YR M D W DT 1 D D 1 250 IFD 6THEND W 1 IFW gt 4THENW 0 260 IFDT lt L M 1 240 270 280 RETURN 290 O RIGHT STR Y 4
59. OTAL KM TRAVELLED AVG KM LITRE TOTAL LITRES When asked to do a summary for the year the data for all the months is read and summarised Note that in this mode the last month read must be a 12 or an error will result 0000000000 week CALENDAR LEVEL LL A program that produces a calendar seems appropriate at this time of year and this one follows the same sort of logic that a person would if the exercise were to be done by hand In order to produce any calendar you need two pieces of information 1 the day of the week when the year begins 2 if the year is a leap year or not Given the year for which you want the calendar there is an algorithm called Zeller s algorithm that generates a unique day number for any day this century starting from March Ist 1900 hence the restriction on the year With that it is a relatively simple task to find the first piece of information Knowing the year allows you to quite easily get the second Although I have not tested this program for all the 99 years this century my confidence in Zeller and modulo arithmetic leads me to believe the code in lines 650 670 is correct and it does produce an accurate calendar for 1983 The remainder of the program is concerned with formatting the layout of the calendar and is reasonably self explanatory The subroutine at 220 generates the calendar in a numeric array YR and that at 440 converts this array to character strings for printing one line at a ti
60. PROCESS RIGHT SUBLIS LEFT SUBLI PUSH PUSH LEFT RIGHT SUBLIST SUBLIST BOUNDS BOUNDS 1 d 1 e Consider the following list 39 24 68 45 37 57 pass in the partition phase will be examined asterisk before an item indicates the current item being compared using the two indices ILLUSTRATING TOGGLE FLAG 39 24 68 45 37 57 ON 37 24 68 45 39 57 OFF 1 amp 5 SWAPPED 37 24 68 45 39 57 OFF 37 24 39 45 68 57 ON 3 amp 5 SWAPPED 37 24 39 45 68 57 ON 37 24 39 45 68 57 ON Both indices point to the third item on pass completion This item has been placed in the correct final position in the list and separates two sublists The process has also guaranteed that all items in the left sublist have equal or smaller values and all items in the right sublist have equal or greater values Sublist 37 24 is then processed in the same manner while sublist 45 68 57 is stored It will eventually be processed when its bounds are popped from the stack at the start of a partition phase When a sublist of only one item is reached its bounds are no longer stacked and it is considered fully processed A variation to this algorithm involves using this method to create sublists of some critical minimum size When that size is reached another sorting algorithm is employed to sort the sublist by passing its bounds to the auxiliary sort This reduces the stack size in quicksort and fewer sublists are
61. R POWER WATTS P 2000 707107 DROP VL 215 448 FINALLY THE PROSRAMME WILL ALSO OPERATE A SIMPLE OHN S LAW SOLUTION I E R BY INPUTTING 0 ZERO FOR BOTH C CAPACITANCE AND L INDUCTANCE SIMULTANEOUSLY CAP VOLT DROP VC 75 0262 RESONANT FREQ M 29 4374 AFTER ALL CALCULATIONS HAVE BEEN COMPLETED A FURTHER TWO SCROLLS OF THE SCREEN CAN BE MADE WHICH WILL DISPLAY A CIR CUIT DIAGRAM OF THE GENERAL SERIES CIRCUIT FOLLOWED BY A VECTOR DIAGRAM AND IMPEDANCE DIAGRAM lt ENTER 2 ALL CALCULATIONS COMPLETED 20 VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 21 DR WHO ADVENTURE LII 16K or 32K Disk This adventure will just run a Level 2 16 machine provided the following instructions followed It will run also with Disk BASIC with at least 32K of memory For the disk version lines 720 and 730 are replaced by the two lines listed separately the program supplied on the distribution disk has already been converted for you This is an unusual adventure using a data file a manner similar to the games data file is the file called DRWHO DAT on the distribution disk This was created using the initialization program listed If you are entering this program from the magazine you will have to run this program to create a data file either on disk or cassette The program uses a full 16K which is why it needs the data file For a cass
62. R ASC B 100 IFL gt S7THENL L 7 110 IFR257THENR R 7 120 L L 48 R R 48 150 D 16XL R POKEP D 140 PRINT 896 POKE NO 3N 150 P P 1 N N 1 GOTO70 160 POKE16526 0 POKE16527 112 CLS X USR 0 170 DATAFS 21 OF 72 CD 4D 71 CD AS 71 21 4D 72 CD 4D 71 180 CONTINUE DATA LINES NOTE NO SPACE AFTER DATA OR BETWEEN 640 COMMAS AND DATA BYTES 650 DATA41 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 660 DATAEND Thank you for this contribution Mr Stobert The technique you use for POKEing machine language programs into memory is an interesting one and is certainly superior to the more common method of converting the machine code to Decimal manually and then entering it into the DATA statements By converting HEXadecimal code in your BASIC Program you save a considerable amount of work and if the data statements are laid out in lines of 16 bytes per line it is easy to check against a Hex dump It is only recently that we have seen this technique used and you are to be congratulated in being amongst the first to develop it Ed VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 4 From R Edwards Ivanhoe Vic To M Bauk Kalamunda W A In response to your letter in June 82 MICRO 80 where you requested help to the Other Venture entitled Excape from Tramm The first location is quite tricky and took me some hours to get past so you re not entirely alone I also believed it to be fa
63. R MEMORY DIAGNOSTIC Modell Disk 36 50 Model Ill Disk 43 50 THE MICRO CLINIC offers two programs designed to thoroughly check out the two most trouble prone sections of the TRS 80 the disk system controller and drives and the memory arrays Both programs are written in Z80 machine code and are supplied together on diskette for aminimum 32K one disk system Specify Model or Model III MORE ENTERTAINMENT SOFTWARE ADVENTUREHINTBOOK 10 95 If you can not go any further this will give you clues that may help written by Scott Adams for Adventures 1 9 LABYRINTH 26 50 Labyrinth you move through a gigantic labyrinth and scattered through this nightmarearea multitude of objects and obstacles A minotaur prowls the corridors you must kill it before it kills you Labyrinth has over 550 locations be patient ASYLUM 26 50 Asylum places you in a cell you have to escape It s harder than it sounds lots of hazards will be encountered DEATHMAZE 5000 26 50 Deathmaze 5000 is another 3 D adventure You movethrough a5 storey building your goal is to leave the deathmaze alive MICRO 80 PRODUCTS CAT8 New SEIKOSHA GP 100A GRAPHICS PRINTER If you have delayed buying a Printer then now is the time to reconsider The Seikosha has been designed for simple operation and puts full dot addressable graphics at your command You can repeat a column of data as many times as you like with just one comman
64. RINT PRINT PRINT PRE SS KEY RETURN MENU 1550 GOSUB 65e 134 RETURN 1550 CLS PRINTe200 1 447 3 1360 PRINT TOT L LITRES TOTAL cost 1370 PRINT PRINTF CC 1580 PRINT PRINT PRINT TOTAL KMS AVG KM L 1390 PRINT PRINTC PRINT USING PET 1400 PRINT PRINT PRINT PRESS ANY KEY TO RETURN TO MENU 1419 GOTO65e VARIABLE WORKSHEET HITACHI PEACH DI III III IIIA 3 7 VARIABLE WORKSHEET FOR THE TRS 8e 4 5 amp P MILLER 1 P O BOX 37 1 5 STOKES VALLEY s NEW ZEALAND gt FRI 10 CLEAR 1000 20 CLS 50 LOCATE13 4 PRINT VARIABLE WORKSHEET 55 PRINT 40 PRINT TAB 38 BY S amp P MILLER FOR T HE TRS 80 50 PRINT 60 PRINT 58 MODIFIED FOR HITACH I MB 6890 65 PRINT 70 PRINT 80 INPUT ENTER MAX NUMBER OF ARRAYS 3 90 INPUT ENTER MAX NUMBER OF SUBROUTINE LINES REQUIRED 3B 100 INPUT ENTER MAX NUMBER OF VARIABLE LINES REQUIRED 110 INPUT ENTER NUMBER OF COPIES REQUIRE D 115 OPEN O 1 LPTO 120 FOR J 1 TO Y 150 PRINT4 VARIABLE WORKSHEET 140 PRINT 1 PROGRAM PROGRAMMER bs DATE 19 150 PRINT 1 160 PRINT 1 MEMORY CLEARED MEMORY PROTECTION AT 179 PRINT 1 180 PRINT 1 LIST OF TYPE DEFINITIONS 190 PRINT 1 200 PRINT 1 DEFSTR
65. S 599 NO OF VARIABLE LINES 600 NO OF COPIES REQUIRED 610 LOOP COUNTER FOR COPIES 620 LOOP COUNTER FOR A B C MILEAGE CALCULATOR COLOUR COMPUTER 10 MILEAGE CALCULATOR 20 x xFOR THE TRS89CCoc exex ORIGINALLY BY FRANK GRECO 40 FOR THE TRS80 60 DISK USERS CHANGE 70 1 TO 1 IN LINES 540 560 80 ADD STRS M TO 540 7 STRS MM TO 1010 STRS M 1 TO 1170 i 90 LEAVE OUT THE AUDIO ON S 100 CHANGE TAPE S TO DISK S 110 120 150 CLS PRINTG65 KMS PER LITRE MILES PER CONVE RSION 140 PRINT WRITTEN BY FRANK GREC o 150 PRINT MARIBYRNONG VICTORIA AUSTRALIA 160 FORX 1 TO 3000 NEXTX 179 GOTO 680 180 SOUND200 1 190 CLS PRINT INPUT MONTH NUMBER 1 TO 12 200 IF lt 1 OR M gt 12 THEN 190 210 INPUT KILOMETERS AT THE STAR 220 INPUT KILOMETERS AT THE END 3B 230 INPUT HOW MANY LITRES HAVE Y QU PUT IN THE TANK 5F 240 INPUT COST CC 256 260 PRINT PRINT 270 PRINT YOU TRAVELLED 3 C KIL OMETERS 280 REM CONV KM TO MILES 290 D C 0 62 300 PRINT THAT S ABOUT 3 INT D 3 MILES 310 PRINT PRINT NOW I AM WORKING OUT YOUR PETROL CONSUMPTION 520 500 200 1 330 FORX 1 1000 540 cLS 350 REM PETROL CONS 360 376 380 390 LITRES PER 100 400 FF F C 100 410 PRINT DISTANCE TRAVELLED IS sCs KMS 420 PRINT WHICH IS ABOUT
66. T 82 PRINT TAB 15 BY 90 PRINT BY S amp P MILLER FOR THE TRS8 CC 16 PRINT 119 PRINT 126 INPUT MAX NUMBER OF ARRAYS 150 INPUT MAX NUMBER OF SUBROUT INE LINES REQUIRED B 140 INPUT MAX NUMBER OF VARIABL E LINES REQUIRED C 150 INFUT NUMBER OF COPIES REQUI RED Y 160 FOR J 1 TO Y 170 PRINT 2 CHR 27 CHR 14 V ARIABLE WORKSHEET 180 PRINT 2 PROGRAM RAMMER DATE 190 PRINT 2 200 PRINT 2 MEMORY CLEARED MEMORY PROTECTION AT PROG 119 210 PRINT 2 220 PRINT 2 250 PRINT 2 246 PRINT 2 LIST DIMENSIONE D ARRAYS 250 FOR X 1 TOA 260 PRINT 2 DIM AME 270 NEXT X 280 PRINT 2 290 PRINT 2 SUBROUTINE INFORMA TION 500 PRINT4 2 316 PRINT 2 START COMMENTS 320 PRINT 2 5350 FOR X 1 TO B 540 FRINT4 2 END 550 PRINT 2 STRING 41 560 NEXT X 370 PRINT 2 380 PRINT 2 VARIABLE LIST 390 PRINT 2 400 PRINT 2 NAME LABEL USE 410 PRINT 2 420 FOR X 1 TO C 430 PRINT 2 440 PRINT 2 STRING 44 450 NEXT X 460 PRINT 2 470 PRINT 2 PERIPHERALS REQUIR ED 480 PRINT 2 490 PRINT 2 CASSETTE PRI NTER DISKS NUMBER REQUI RED 500 PRINT4 2 NOTES 510 PRINT 2 520 PRINT 2 550 PRINT 2 540 NEXT J 559 CLEAR 5e 560 VARIABLE LIST 570 A NO OF ARRAY LINES 580 NO OF SUBROUTINE LINE
67. TH S ISSUE CASSETTE DISK EDITION INDEX ORDER FORM MICRO 80 is registered by Australia Post Publication SQB 2207 Category B AUSTRALIAN OFFICE AND EDITOR U K SUBSCRIPTION DEPT Printed by Published in Australia by MICRO 80 P 0 BOX 213 GOODWOOD SOUTH AUSTRALIA 5034 TEL 08 211 7244 24 WOODHILL PARK PEMBURY TUNBRIDGE WELLS KENT TN2 4NW Shovel amp Bull Printers 379 South Road MILE END 5031 MICRO 80 433 Morphett Street Adelaide SPECIAL OFFER TO NEW READERS AND READERS RENEWING THEIR SUBSCRIPTION SOFTWARE LIBRARY VALUED AT OVER 100 FREE MICRO 80 has developed new Library of Software consisting 7 programs comprehensive user manual The Software Library on cassette will be sent FREE to every new subscriber and to every subscriber who renews his sub 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 Convert your Level II TRS 80 or System 80 to operate as 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
68. TO PACK 77 71 S 7 Start positions for cursor 27 Strobe Keyboard and result to F 4 Was it an A for ASCII mode 5 GOTO26 XX or C for CLS 67 X or a P for J THENGOSUB108 GOTO26 7 or J for Screen Print R THENCLS 468 X or an for REPEAT 52 14590 X Load B with cursor arrow PEEK 55 If B O then Flash Cursor and back to get next job 54 IFB ZOTHENRESET X Y FORX121TO10 NEXT SET X Y GOTO26 35 Check for 00001000 Up arrow and dec Y but not lt 36 IFBANDSTHENY Y 1 IFYSOTHENY O 57 Check for 00010000 Down arrow and inc Y but not gt 47 38 IFBAND16THENY Y 1 IFY gt 47THENY 47 59 Check for 0010000 Left arrow and dec X but not lt 40 IFBANDS2THENX X 1 IFX OTHENX O 41 Check for 0100000 Right arrow and inc X but not gt 127 42 IFBAND64THENX X 1 IFX gt 127THENX 127 VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 17 SET X Y 7 SET the new value for X amp Y 44 Xk Check for 1000000 Space Bar then RESET pixel and pause 45 IFBAND128THENRESET X Y 1 05 NEXT 46 GOTO26 Back for more inputs 47 The ASCII input section 48 D PEEK A Peek the Screen location in A result in D 49 POKEA C Poke the Graphic Byte 191 into Screen Location SO X result to
69. WARNING For Experienced Adventurers Only The King lies near death in the royal palace you have only three days to bring back the elixir to cure him Journey through the lands of magic fountains and sacredtemples stormyseasand gold gold GOLD MICRO 80 PRODUCTS CAT5 BUY YOUR MODEL 3 FROM MICRO 80 AND SAVE 50075 DRIVE gt ACTIVE MICRO 80 WINCHESTER DISH SYSTEM MICRO 80 fits reliable MPI disk drives to the TRS 80 Model 3 to give system capacities and capabilities far in excess of those available elsewhere All our conversions utilise low dissipation switching mode supplies to avoid screen jitter and overheating The disk controller boards used incorporate special compensation circuitary for 80 track disk drives and may also be used to run 8 inch disk drives with an appropriate cable and DOS MODEL 340 3130 2 40 TRACK SINGLE HEAD DISK DRIVES GIVING 350K FORMATTED STORAGE 48K RAM MODEL 340 3350 2 40 TRACK DUAL HEAD DRIVES GIVING 700K FORMATTED STORAGE 48K RAM MODEL 500 5 MEGABYTE MODEL 3 5895 1 40 TRACK DUAL HEAD DRIVE GIVING 350K OF FLOPPY DISK STORAGE FOR TRANSFERRING PROGRAMS AND BACKUP 48K RAM EXTERNAL 5 MEGABYTE WINCHESTER SUB SYSTEM DOSPLUS 4 0 DISK OPERATING SYSTEM The MODEL 500 offers the high speed mass storage capacity and reliability of a Winchester drive for thousands of dollars less than you would pay for any comparable system Model 500 is a serious business computer able to tackle the most deman
70. age near some stairs RETURN 120 PRINTS8 junction of four underground passages RETURN 2861 AINC 8 ON IWNTOA 08 082 LE 39Vd 150 PRINTS ig valley the south stands a vast black monolith 59 thick haze to the north ETURN 140 GOSUBS7 RINT A message scrawled on it says DIG HERE RE TURN 150 PRINTS7 small cave of broken rocks RETURN 160 PRINTS8 base of the monolith S9 a small grate at your feet RETURN 170 GOSUB120 PRINT Under a grate RETURN 180 PRINTS6 Daleks Passages lead off in all directions I would not try to get past the Daleks however ETURN 190 PRINTS8 top of a hill looking down upon a domed city N 200 PRINTSY in the city s drains Tunnels lead off in all directions 3 GOSUB580 RETURN 210 PRINTS8 gates of the city At your feet is a manhole cover z RETURN 220 PRINTSY in the Dalek master strategy room Red lights are flashing and sirens screaming I would leave RETURN R sRETUR 230 PRINTSY in an alcove that had been hidden behind a deactivated Dalek RETURN 240 PRINTS6 broken machinery RETURN 250 PRINTS6 Bubbling Beakers Burning Bunsens Filter Funnels Colourful Chemicals etc RETURN 260 PRINTSY inside the Dalek experimentation room I wouldn t linger as the experiments look hungry GOSUBS80 RETURN 270 PRINTSB8 bottom of a deep dust filled hole RETURN 280 PRINTSY just inside a vast crater S9 a ship to
71. ain as there are a number of developments in this field in this country at this time still promised the Mini Disk and the Micro Disk but except for a few prototype units which are doing the rounds I have not seen any sign of a commercially available item However the cost of the standard Disc drives is falling all the time so perhaps the manufacturers are expecting the cheaper smaller units soon Even before these units have arrived the next step is arriving a hard disk or rather a programmable memory unit which is cheap enough to allow it to be used to store programmes for practically instant recall This is now becoming available in two forms preprogrammed and self programmable The potential size of the storage available is very great indeed and as the first cost of memory devices continues to fall this sort of storage becomes attractive I hope to test one of these devices in the next month or two and will of course report to you on the results Still on the subject of input output many of our older readers will remember my reports of the 1200 baud conversion program supplied by the UK software house Kansas It worked very well on the TRS 80 but was never successful on the GENIE SYSTEM 80 Kansas have now produced a different program which does work on the GENIE at least it works on mine It is simple to use and produces tapes of both machine language and BASIC programmes which load at double speed A good buy to load those long p
72. ars Freight is road freight anywhere in Australia All items carry a 90 day parts and labour warranty Repairs to be carried out in our Adelaide workshops MICRO 80 LEVEL 2 ROM ASSEMBLY LANGUAGE TOOLKIT by Edwin Paay FOR TRS 80 MODEL 1 MODEL 3 AND SYSTEM 80 VIDEO GENIE This is a new package consisting of two invaluable components A ROM REFERENCE Manual which catalogues describes and cross references the useful and usable ROM routines which you can incorporate into your own machine language or BASIC programs DBUG a machine language disassembling debugging program to speed up the development of your own machine language programs DBUG is distributed cassette and may used from disk or cassette Part 1 of the ROM REFERENCE manual gives detailed explanations of the processes used for arithmetical calculations logical operations data movements etc It also describes the various for mats used for BASIC System and Editor Assembly tapes There is a special section devoted to those additional routines in the TRS 80 Model 3 ROM This is the first time this information has been made available anywhere Differences between the System 80 Video Genie are also described Part 1 is organised into subject specific tables so that you can quickly locate all the routines to carry out a given function and then choose the one which meets your requirements Part 2 gives detailed information about each of the routines in the or
73. ations are then made and the individual variables are displayed together with their measured or calculated values A graphical display of the general series circuit only follows plus an outline of the various vector relationships and the impedance diagram 0000000000 Shown below are views of the screen gt gt gt SERIES IMPEDANCE CIRCUIT lt lt lt v A WIDE VARIETY OF ELECTRICAL CIRCUIT PROBLENS OF THIS VECTOR CATEGORY ARE SOLVEABLE DEPENDING UPON THE KNOWN AND UNKNOWN VAR DIAGRAM TABLES AVAILABLE THE PROGRAMME WILL CALCULATE ALL THE VARIABLES SHOWN 0 O IN THE FOLLOWING SCHEDULE SUBJECT TO APPROPRIATE INPUT VALUES a IT WILL HANDLE TWO UNKNOWNS SIMULTANEOUSLY PROVIDING INPEDANCE LW UD ONE UNKNOWN IS EITHER 1 E OR R AND THE SECOND IS EITHER L C DIAGRAM 1 LW 1 08 OR Y NO ENTRY FOR THE UNKNOWN VALUES I E PRESS ENTER LE X18 ONLY WHEN INPUT FOR THESE VARIABLES IS CALLED FOR 0 ENTER gt 8 lt ENTER 2 gt gt REVIEW OF VALUES OF ALL VARIABLES lt lt lt ERECT THE PROGRAMME CAN BE USED FOR PROBLEMS WHERE NO CAPAC ITANCE OR ALTERNATIVELY NO INDUCTANCE IS PRESENT CURRENT 1 INDUCTANCE VOLTAGE FREQUENCY INDUCTANCE CAN BE CALCULATED FOR AN INDUCTIVE CIRCUIT RESISTANCE CAPACITANCE WITHOUT CAPACITANCE IF 1 E AND R ARE KNOWN VALUES EQUIV REACT IMPEDANCE 1 PHASE ANSLE POWER FACTOR 0 IND REACT CAP REACT R VOLT DROP V
74. aunting The following Assembly language program goes a long way to solving the problem as it converts the characters inside PRINT statements into lower case with the exceptions of the first letter in the quotation and the first letter after a period and two spaces which is assumed to be a new sentence It only alters characters within the PRINT statement and does not convert program commands and statements VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 22 It will be necessary to finally edit the program to capitalise people s names or titles which occur in PRINT statemments such as system 80 trs 80 or commander smith Conditional statements may also need editing as follows IF A es THEN 100 would need to be altered back to IF A YES THEN 100 or perhaps better still IF A YES OR A yes THEN 100 So with a little care in final editing you too can have small letters in abundance throughout your programs and across your screen The program can be assembled with an Editor Assembler and can be relocated by altering the ORG in line 140 of the source listing to for a 32K system or to FEI H for a 48K system Alternatively the HEX dump for 16k system that follows the source listing can be entered with a low memory monitor For this program to work you must have lowercase installed your machine and a lower case driver active To load from tape 1 Answer MEMORY SIZE READY with 32272
75. created but I have found that this variation is still slower because of the less efficient sorting algorithm used to sort a particular sublist Bubble Selection or Insertion The method shown here processes sublists down to their absolute minimum size one DEMONSTRATION IN BASIC Following is a BASIC program demonstrating the algorithm You will find a great improvement in execution time when compared to Bubble Selection or Insertion sort particularly when the list size is large for BASIC say over 20 Variables used are I J INDICES INTO LIST L U LOWER UPPER SUBLIST BOUNDS s STACK SP STACK POINTER FL TOGGLE FLAG LO LIST OF ITEMS BEING SORTED SL SR SIZE OF LEFT RIGHT SUBLIST 5000 PARTITION EXCHANGE SORT QUICKSORT 5010 BY B SIMSON 5050 DEFINTA Z 1 0 J O SP O T O FL O 5040 CLS PRINT913 SORT QUICKSORT 5050 INPUT SIZE OF LIST TO SORTED EL VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 11 5080 X EL 4 IFX lt 10X EL 5090 DIML EL S X 5100 FORM 1TOEL 5110 L M RND 1000 500 5120 NEXT 5140 GOSUBS210 5150 PRINT INPUT HIT ENTER TO START THE SORT X 5160 PRINT SORTING 5605085260 5170 PRINT LIST AFTER SORT 5180 GOSUBS210 5190 END 5200 PRINT L LIST 5210 FORM 1TOEL 5220 PRINTL t 5230 NEXT 5240 RETURN 5250 QUICK SORT ROUTINE 5260 L 1 U EL 5270 SP SP 1 S SP L SP SP 1 S SP U 5280 IFSP THENS300 5290 605085520 650705280 5500 RETURN
76. d Double width character and dot addressable positioning are software controlled PRICED AT ONLY 475 Other features Automatic Printing avoiding data loss when the maximum line length is exceeded width characters on the same line Up to 50 characters per second Standard Centronics type Parallel interface Self test mode Optional RS 232 C Serial Interface PRINTERS GALORE AT UNBEATABLE PRICES MICRO 80 has a range of printers to suit every requirement from dot matrix to correspondence quality daisywheel Choose from the table below Allows mixing graphics regular and double BRAND MODEL TYPE SPECIFICATIONS COL SPEED BI DIR LOWER PAPER GRAPHICS INTER FREIGHT PRICE WEEKLY 5 CASE FEED FACES PAY MENTS EPSON MX 80III DM 80 80 Y FULL F T HI RES 1 999 835 EPSON MX 100III DM 132 100 Y FULL F T HI RES 1 81500 12 55 MICROLINE 83A DM 132 120 Y FULL BLOCK P S 1 1599 13 37 MICROLINE 84 DM 132 200 M FULL F T HI RES 1 2220 18 57 MICROLINE 84 DM 132 200 Y FULL F T HI RES s 1 2340 919 57 8510 DM 80 112 Y FULL F T HI RES P 1 999 9 19 C ITOH M1550 DM 132 120 Y FULL F T HI RES P 1 91499 12 54 OLIVETTI PRAXIS35 DW 100 6 N FULL F NO F T 895 833 OLIVETTI 121 DW 132 12 N FULL F NO P 2 1500 912 55 OLIVETTI ET221 DW 132 16 N FULL F NO P 2 2650 22 17 ITOH F10 40P DW 132 40 Y FULL F NO P 2 1950 16 31 ITOH 10 405 DW 132 40 Y FULL F NO s 2 82190 18 32 NOTE T
77. der in which they appear in the ROM It describes their functions explains how to use them in your own machine language programs and notes the effect of each on the various Z80 registers Part 2 also details the contents of system RAM and shows you how to intercept BASIC routines With this knowledge you can add your own commands to BASIC for instance or position BASIC programs in high memory the only restriction is your own imagination The Appendices contain sample programmes which show you how you can use the ROM routines to speed up your machine language programs and reduce the amount of code you need to write DBUG Eddy Paay was not satisfied with any of the commercially available debugging programs so he developed his own DBUG allows you to single step through your program has 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 displays edits memory in Hex or ASCII allows Register editing has the ability to read and write System tapes and all this on the bottom 3 lines of your screen thus freeing the rest of the screen for program displays Four ver sions of DBUG are included in the package to cope with different memory sizes The best news of all Is the price The complete Level 2 ROM ASSEMBLY LANGUAGE TOOLKIT Is only Aus 29 95 2 00 p amp p UK 18 00 1 00 p amp p SPECIAL OFFER TO OWNERS OF THE
78. ding tasks WINCHESTER DISK DRIVE SUB SYSTEM 5MByte 2995 10MByte 3750 This Winchester Disk Drive sub system provides either 5 or 10 Megabyte of reliable high speed storage It connects to any standard Model 3 equipped with one or more floppy disk drives and does not void the Tandy warranty Complete with DOSPLUS 4 0 Disk Operating system Prices include Sales Tax and are subject to change without notice Prices are FOB Adelaide Add 20 road freight anywhere in Australia All computers and peripherals carry MICRO 80 s Australia wide 90 day warranty covering parts and labour MICR0 80 PRODUCTS CAT6 UU EUN n H K NEW THE SMITH CORONA TP 1 DAISY WHEEL PRINTER A low priced letter quality printer Ideally suited for small businesses or the home user the 1 is a microprocessor controlled correspondence quality printer that prints fully formed characters at an average print speed of 12 characters per second This simple to operate compact printer is compatible with most microcomputers and comes with the standard Centronics parallel interface an optional serial data interface is available and features 128 ASCII Character Set 88 printable 10 CPI or 12 CPI character spacing 105 characters per line or 126 in 12 pitch Handles letter and legal sized paper up to 15 wide Variable line spacing and impression control Prints original plus up to three copies NEW x NEW
79. ds over 30 new commands and functions to your BASIC interpreter including high speed SORT labels in BASIC RESTORE to any line number WHILE WEND for structured programming SCROLL LEFT INVERT DRAW and PLOT to give you ease of control over graphics SOUND and PLAY to add realistic sound effects and many more Makes programming a breeze Available for Model or IIl disk or cassette specify which when ordering NEWDOS80 VERSION 2 0 Specify Model or Model III Newdos 80 suits the experienced user who has already used TRSDOS understands the manual and is prepared to learn the somewhat complicated syntax of one of the most powerful DOS s available With the correct hardware Newdos 80 supports any mix of single or double sided single or double density 5 or 8 disk drives with track counts up to 96 It provides powerful flexible file handling in BASIC including variable length records up to 4096 bytes Definitely not for the beginner 169 00 MASTER DISK DIRECTORY 20 95 FIND THE PROGRAM FAST PAYS FOR ITSELF BY RELEASING REDUDANT DISK SPACE MASTER DIRECTORY records the directories of all your individual disks onto one directory disk Thenitallows you examine them find an individual file quickly list files alphabetically weed out redundant files identify disks with free space list files by extension etc etc This program is invaluable for the serious disk user and will pay for itself many times over THE FLOPPY DOCTO
80. eTRS 80 SYSTEM80 CA GENIE ePMC 80 HITACHI PEACH lt 5 80 COLOUR COMPUTER Yale Vol 3 Issue 8 July 1982 Aon Standacd mdy edje Cosmet for ait IT Series Impedance VL LEAD D Circuit I GENERAL SERIES CIRCUIT ATE lt ENTER gt Also in this issue PROGRAMMING Automatic Graphics Packer The Theory and Techniques of Sorting Part 6 SOFTWARE CONSTANTS Level Il VARIABLE WORKSHEET eDR WHO ADVENTURE Colour Level Il e MILEAGE CALCULATOR eLOWER CASE CONVERTER Colour Level Il INCLUDING MICRO 80 CALENDAR MICRO 8 P O BOX 213 GOODWOOD S A 5034 AUSTRALIA TELEPHONE 08 211 7244 PRICE AUS 2 50 N Z 4 00 U K 1 MiCRO RD ecictered by Australia Post Publication SORB 220 ateaorv ABOUT 0 80 EDITOR RYSZARD WIWATOWSKI ASSOCIATE EDITORS SOFTWARE CHARLIE BARTLETT HARDWARE EDWIN PAAY MICRO 80 is international magazine devoted to the Tandy TRS 80 Model I Model III and Colour microcomputers the Dick Smith System 80 Video Genie and the Hitachi Peach It is available at the following prices 12 MONTH SUB SINGLE COPY MAGAZINE ONLY 26 00 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 MAGAZINE ONLY 16 00
81. ed The toggle flag is only toggled when item exchange is necessary that is when item pointed to by lower index is greater than item pointed to by upper index The comparison phase is complete when the lower and upper indices point to the same item being the item placed in the correct position in the final list It also now separates two sublists The larger sublist bounds are stacked and the process repeated on the smaller sublist Stacking the larger sublist ensures minimum stack growth The partition module in the flowchart shows that the larger sublist is processed first then the smaller but since the smaller sublist bounds are stacked last they are also popped first for processing in the partition phase when it is repeated QUICKSORT PUSH LOWER amp UPPER ON STACK PARTITION 1 Figure 1 Partition exchange sort algorithm Quicksort LOWER UPPER are bounds of the list being sorted a Main Routine b Partition Routine c Compare Routine d Process Left Routine e Process Right Routine PROCESS RIGHT SUBLIST PARTITION POP LOWER UPPER MOVE LOWER UPPER TO I J SET FLAG COMPARE PROCESS LEFT SUBLIST PROCESS LEFT SUBLIST PROCESS RIGHT SUBLIS COMPARE EXCHANGE LIST I LIST J DECR J INCR I 2861 8 ON 3WQTOA 08 0821 6 39 4 VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 10 PROCESS
82. else seems to be working perfectly I believe the problem is in the data in line 190 but I do not know what to do Can you please help me You are correct in suspecting the data in line 190 A number of people have contacted us concern ing this problem using the internal speaker on the Blue Label user after much experiment ing informed us that the way to cure the problem is not to set bit 2 of port 255 fFFH high Inquiries to Dick Smith s yielded the same information with an explanation In order to make the System 80 more compatible with the Tandy so that it could use existing Tandy software that has sound without any patches the Blue Label requires that bit 2 of port 255 be set low to enable the internal speaker What this means is that there now exists an incompatibility between the Blue Laba aid earlier System 80 s in this respect Line 190 as originally published is shown as 190 205 127 10 229 221 225 221 78 0 121 185 200 221 70 1 62 5 211 255 16 254 221 70 1 62 6 211 255 16 254 13 32 235 221 35 2 2 1 35 1 255 255 33 48 0 56 253 24 214 To enable sound on the Blue Label change it to 190 205 127 10 229 221 225 221 78 0 121 185 200 221 70 1 62 1 211 255 16 254 221 70 1 062 2 211 255 10 254 13 52 255 221 55 2 2 1 55 1 255 255 55 48 0 9 56 255 24 214 Note that the only changes occur the second line where 5 becomes 1 and 6 becomes 2 This will set bit 2 low and s
83. ette based system use the following procedure 1 Type in the initializer check it and SAVE it to tape 2 Type in the adventure check it and SAVE it to tape a different one leave this positioned to just after the program 3 Reload the initializer and swap back to the tape the adventure is on it should be positioned just after the program 4 Run the initializer and answer the question with T for tape 5 Rewind the tape reload the adventure and run it 6 Disk users type in both programs and SAVE them to disk Add the lines provided to make the cassette version work on disks Run the initializer and answer D Then run the adventure NOTE People with more than 16 and disk users may find it advantageous to merge the data in the initializer with the main program Although no explanation of how to do this is given here it should not be too difficult INSTRUCTIONS After Dr Who collected the Key to Time and defeated the Black Guardian he received many praises and went on to greater things The Key itself was again broken into its component pieces and scattered throughout the universe But the dark forces threaten and in order to save the universe the Timelords again need the Key You have been chosen to go forth and locate it for them You will be given a TARDIS rather old and unreliable but the best available that has the coordinates of the planets on which the six parts are located pre programmed into it By R
84. f the Moon GOTO780ELSEPRINTMID Pel adon Mutos Skaro Hidaous Diethyl amideGalafry L 12 1 12 GOTO78 As you 1240 PRINTSH found F 0 IFP 6ANDRND gt 3ORL 4ANDPO lt gt 6ANDPO lt gt 4A NDPO lt gt 1ANDRND gt ZTHEN1260ELSEFORI 1TO16 1 PTHENF F 1 PRI NT SO O I 2 20 1 4 COCI 40ORS 1 1250 NEXTI IFP 26F F 1 PRINT a deactivated Dalek D 26 3 5 1260 IFFTHEN78OELSEPRINT nothing GOTO780 1270 IFV 1 360RV 1 2420RV 1 A6IFO V 1 50 1 2OTHENO V 1 30 1 91 PRINT Delicious GOTO780ELSE15OOELSE1450 1280 IFO 2 1 lt gt 90THENPRINTSH nothing to dig with GOTO780ELSEIF P 12ANDD 12 4 15THEND 12 4 D 12 0 54 GOTO13OOELSE IFP 13ANDD 13 3 15THEND 15 5 4 0 15 0 4 60 01500 1290 PRINT You haven t dug up anything useful GOTO780 1300 PRINTSH broken a hole in the wall with your pick see vague chamber behind it 60TO780 1310 IFV 1 lt gt SS5ANDV 2 lt gt SSTHEN1 4SOELSEIFL gt 1O0RPO lt SORPO gt 6THEN1 480 ELSEIFO 4 1 lt gt 90THEN1 450ELSEIFV 0 20THEN1330 1320 D 15 6 D 16 5 5 GOTO600 1550 D 15 6 13 D 16 5 13 GOTO600 a secret passage hidden behind You can 2861 AnC 8 ON 3WQTOA 08 033IW 39Vd 1540 IFV 1 381FO 8 1 90THENPRINT This does nothing for me you know GOTO780ELSE1SOOELSEIFV 1 551 0 3 1 9OTHENPRINT It says 3 GOSUB1000 PRINTABS NO RND 3 2 RND 0
85. f you follow the instructions in the article Mr Tilley soldered the other end of the rainbow cable to IC plug In this case you must be very careful indeed because the leftmost strand of the cable will be connected to pin 2 on the edge and not pin 1 Mr Tilley found that after rectifying this and the rest of the wiring on the IC plug the interface functioned as intended 0000000000 SOFTWARE REVIEW TANDY S VERSAFILE by J Dowdall In my occupation as a software consultant 1 have occasion to evaluate many off the shelf programs and packages for clients Once in a while I find one which becomes a useful tool in my business VERSAFILE is one of these My client s requirement was for easy to use Data Base which would enable him to store and retrieve brief details on formulae used in his Plastics manufacturing Formulae were to be Stored by product category and data entry and retrieval had to be simple enough that relatively untrained operators could learn to handle it in a few minutes As it turned out even I can be lucky The first program I looked at was Versafile At first it seemed too simple and I went on to look at some more After two or three others though I was back to look again The Command language is straight English Versafile figures out what you mean Data entry and retrieval are done the same way by forming statements or questions Close your statements with a period and the statement i
86. far from it This is easily verified by performing a test on a fixed list of numbers and comparing the time taken to execute with some of the other algorithms shown in later articles However don t write off techniques of sorting by exchange as being too inefficient yet without examining at least one other exchange technique PARTITION EXCHANGE SORT QUICKSORT This sorting algorithm is a much more efficient method of exchange sorting than Bubble as its alias imples Quick Its use of specialized data structures is not as extensive as the list insertion sort or the tree sort It just uses a stack as an auxiliary structure to the main array holding the data The algorithm is defined in figure 1 It involves placing a par ticular item in its final position in the list In so doing all items which precede this item are equal to or smaller in value and all items that follow it are equal to or greater than this item in value This process splits or partitions a list into two sublists with the item between the sublists placed in the correct and final position in the list hence the name Partition Exchange a process of partitioning a list and exchanging items The key to understanding this algorithm is that the same process as was applied to the list before it was partitioned is applied to each sublist and that s all This will eventually place all items in the correct position in the list as more sublists are created by partitioning sublists
87. first GOTO780 1500 PRINT You aren t carrying it GOTO780 1510 PRINT He doesn t seem to want to go away G0TO780 1520 PRINTS9 nobody else here who can talk 1530 PRINTS9 no way to go in that directio 1540 PRINTSH to be in the tardis to use it 1550 PRINTS9 no tardis here 6070780 1560 PRINT You can t get through the grate without opening it fi 6070780 1570 PRINT They have spoken of a secret doorway behind a nearby curtain D 7 3 8 GOTO780 1580 PRINT One of them poked you with a spear but you were not killed just mortally wounded GOTO780 1590 PRINT E x terminate it zapped you slowly evaporating pile of grey powder GOT01420 1600 PRINT Have you got a spot of oil on GOTO780 1610 PRINT Creature hungry can creature eat 60 0780 1620 PRINT I say these sweeties are simply spiffing Rather Not at all like those bananas what C 01 G60T0780 SY now a Crunchy bananas are just simply not 1630 GOSUB1640 60 0780 1640 PRINT BEWARE OF LOW FLYING TARDISES RETURN 1650 PRINT Eeeeeeeeeecee R 17 Unintelligable GO TO780 1660 PRINT The fog muffles your voice so that he can t hear you G0T0780 1670 PRINT He has spoken of a strange crystal on a mountain many miles away G0TO780 1680 PRINT As you approached the spider it turned red and start ed spittingyellow poison I wouldn t try that again GOTO78
88. he following symbols are used DM DOT MATRIX DW DAISYWHEEL BI DIRECTIONAL Y YES N NO LOWER CASE FULL means Lowercase descenders to below line PAPER FEED F means Friction Feed T means Tractor Feed F T means both Friction and Tractor Feed included in price INTERFACES P PARALLEL Centronics S SERIAL RS232 FREIGHT 1 Add 10 for road freight anywhere in Australia 2 Add 20 for road freight anywhere in Australia MICRO 80 PRODUCTS Note Pricessubject to change without notice Prices quoted include Sales Tax at the 17 5 rate Call or writefor more details VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 19 the Form Feed character OCH through the printer driver Both of these lines may need to be changed depending on your computer and printer In the double strike mode the routine at 440 does not slow the process down but in normal mode the printer waits for a time as each new line is constructed The alternative would be to produce the calendar in a string array which would use much more string space and need more memory than the 4K used by this method 0000000000 EXTENDING THE BASIC INTERPRETER HEX CONSTANTS by Roger Bowler As a Level II user you may occasionally have grown tired of converting hex RAM addresses to decimal before you can use them in BASIC or you may find programs difficult to understand because they refer to RAM addresses in
89. hould fix the problem according to the above advice Unfortunately Mr Montero your letter omitted to include your full address and I am unable to reply in writing I hope this reply will suffice Ed From Mr S Goodhead London England I have just spent a major portion of my Christmas Holiday trying to type in a program from MICRO 80 No 6 Vol 3 May 82 SKYDIVER I was not surprised when after hours of typing and editing out errors it did not work It is a normal occurrence for me however this time it destroyed itself UL ERROR 810 An attempt to LIST gave what I think you call garbage LIST 10 10 Line 20 gives TT 26810 TA 26869 amp M 26820 It seems any attempt to poke a value into this area creates havoc I have tried under 100 NEWDOS and also under BASIC 2 without disk Poking the USR 0 Address it still corrupted the short program the values were now 17129 17188 17139 I am wondering if there is something wrong with my computer I would appreciate your observations I also suspect that data statements may contain errors Has any other reader had trouble or am I the only one I have TRS 80 Mod 1 Lev II Lowe electronic interface to Genie 32K expansion unit 2 disk EPSON MX 80 It is unstable disk unit starts up for no reason and everything locks up I think cable connections are unreliable Your last statement suggests very strongly that there is indeed something very wrong with your computer
90. me The title is printed by the subroutine at 290 Line 200 puts my EPSON into double strike mode and line 750 restores it to normal followed by a hard form feed the System 80 does not pass MICRO 80 PRODUCTS MICRO 80 PRODUCTS CATALOGUE This catalogue contains a selection from the wide range of peripherals interfaces computers and software carried by MICRO 80 for your computer If you don t see the item you want contact us we probably have it anyway MICRO 80 has been supplying customers throughout Australia and the Pacific region by mail order for 2 years Our customers find this a simple and efficient way to do business You may place your order by telephone or by mailing the order form from any issue of MICRO 80 magazine Generally it takes about one week from receipt of order until despatch You should allow 2 5 days for your letter to reach us and 7 10 days for the parcel to reach you making a total turnaround time of 210 5 weeks WARRANTY AND SERVICE All hardware products 90 day parts and labour warranty either from the manufacturer distributor or from MICRO 80 Pty Ltd In many cases warranty servicing can be arranged in your own city otherwise goods will be repaired by our own team of technicians in our Adelaide workshops TRADE INS AND TERMS MICRO 80 can accept your existing equipment as a trade in on new equipment We can also arrange consumer mortgage financing or leasing on larger hardware purchases Contact u
91. memory and the increase in speed makes it all worthwhile This program will enable you to draw a graphics design on the screen and automatically pack it into a string for you This and other features make it well worth the effort to type in What follows simple instructions The program itself is well REMed and those who wish will be able to decipher its logic without much effort The REM s may be omitted for speed and ease when typing in Once the program is loaded and RUN the screen will request information on STRING NUMBER AND LENGTH TO PACK If the buffer contains information then answer this question with the string to pack and number of bytes to transfer but if you are starting afresh either with a new design or a whole new run then just press ENTER Once this question has been answered the screen will clear and a graphics pixel will be flashing in the centre of the screen This single flashing pixel indicates the CURSOR Mode and all commands are available from this section You may move this cursor around using the arrow keys holding down the SPACE BAR will erase or leave a blank The following commands are available from this mode using the appropriate key Be sure to have upper case selected P Pack the design on the screen to the buffer for subsequent transfer to a string The buffer has a maximum capacity of 250 bytes so do not try too big a design to start with or problems will result from the buffer eating the program
92. nce defining further scalar variables will generate an entry in the simple variable table thereby shifting up the array which will then have a different starting address An option is provided for a visual presentation with optional graphic characters to be included If a delay is built in the machine language program you may be able to see the workings of the algorithm as execution proceeds To get the program running you should first protect memory at 32500 at the MEMORY SIZE question Then load in the machine language routine using SYSTEM if a tape has been made or by direct load with a VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 14 monitor Then load in the BASIC driver and run 1000 PARTITION EXCHANGE SORT DRIVER QUICKSORT 1010 AUTHOR B SIMSON COPYRIGHT C 1980 1020 THE SORT PROGRAM IS WRITTEN IN Z 80 ASSEMBLY 1030 AND IS CALLED FROM THIS DRIVER BY USR CALL 1040 AFTER START ADDR amp LENGTH OF DATA PARAMETERS PASSED 1050 SORT ASCENDING 1060 DATA TYPE SIGNED INTEGER ARRAY 1070 SUITABLE FOR LEV2 16K 1090 DEFINTA Y RANDOM 2 R e 1100 PRINTTAB 20 QUICKSORT ROUTINE 1110 INPUT VISUAL DEMO 1 560 1120 INPUT SIZE DATA LIST L 1150 DIM A L 1140 PRINTTAB 10 GENERATING RANDOM INTEGERS 1150 FORI 1TOL 1160 ACI RND 1000 200 GENERATE TYPICAL SIGNED DATA 1170 NEXT 1180 PRINT BEFORE SORT GOSUB1320 1190 S VARPTR A 1 1200 GOSUB1
93. o V1 1 TARRO 2322 octor Who data file initialliser PRINT Creating disk file DRWHO DAT Dumping data to tape ELSESO 40 IFD lt gt 10PEN O 1 DRWHO DAT 50 s ORI 1T0210 READJ S S CHR J IFDX 5 1 THENPRINTSD C 34 S CHR 34 ELSEPRINT 1 CHR 34 3 S CHR 34 60 255 159 159 255 47 243 145 255 255 31 84 255 159 246 243 247 111 63 100 102 87 86 255 255 255 255 241 66 255 240 104 152 2 85 50 255 21 63 255 21 242 255 255 243 255 17 50 253 112 152 2 23 150 152 137 112 96 7 240 118 112 70 DATA147 105 255 63 255 243 248 255 255 1 96 248 136 136 159 2 55 246 255 115 240 255 246 249 255 68 68 50 240 112 244 255 255 1 27 247 255 247 255 132 159 238 238 233 119 39 255 255 247 246 255 255 95 68 84 16 255 242 255 255 255 50 80 DATA146 134 253 146 51 255 24 48 253 37 17 253 238 238 246 83 5 117 253 120 112 79 105 86 253 96 146 253 23 128 253 62 228 254 4 1 120 255 113 54 111 231 226 242 126 9 247 142 158 249 232 46 248 152 33 63 101 25 95 24 69 79 90 DATA153 153 153 66 84 255 20 51 255 120 99 255 33 81 255 120 70 31 255 240 255 57 136 245 55 87 255 99 99 112 FORI 1TO70 READJ S S CHR J NEXTI IFD lt gt 1 THENPRINT D HRS 34 S CHR 34 ELSEPRINT 1 CHR 34 s S CHR 34 110 DATA99 1525 35455565 728575 10 11 12 55 599514 15 10
94. ooking for elsewhere I began to subscribe to the magazine and tolearn much more about my computer and in less time than I would have done alone My thirst for knowledge and understanding drove me further to the point where I undertook studies in Computing Science At the same time my association with Ian and this organisation grew to the stage where I am now in the position where I can offer to be of help to you through the pages of this magazine Lest he feel slighted in any way I think it essential to acknowledge the tremendous effort that Ian has made He has conceived the idea and worked hard to make it a success The combination of his efforts and yours the subscribers who provide most of the material and valuable input have made this enterprise so successful that he has been very hard pressed to find the necessary time to devote to the magazine Many thanks to you Ian for the work you have done I shall endeavour to meet this challenge 0000000000 NOTICE TO MAIL ORDER CUSTOMERS Very occasionally some people send cash through the post We would strongly advise against this procedure and make it clear that we will not accept any responsibility for any money sent as cash For your own protection use Postal Notes Money Orders etc but never send cash 0000000000 VOLUME 3 NO 8 JULY 1982 0 80 PAGE 3 PEEKing UK Tony Edwards This month I am going to talk about INPUT OUTPUT ag
95. ore sublist bounds Then the lower and upper bound addresses are found and pushed onto the stack Consideration is given to the fact that each item occupies 2 bytes integers PARTN involves checking if the stack is empty by comparing original stack address with current value of stack pointer If empty then the sort is complete If not the next sublist bounds are popped and stored in locations labelled LOWER and UPPER J FLAG refers to the toggle flag being the C register indices are check for equality If not equal then CMPARE is called to compare the items pointed to by HL and DE indices This particular version does not check which sublist is greater but processes the right sublist before the left This involves checking to see if they contain more than 1 integer and if so their bounds are stacked else processing returns to PARTN to partition the next sublist involves getting the actual integers items being compared pointed to HL and DE into HL and DE for easy comparison Then the sign Status is checked for both integers using logical operation XOR If they have the same signs then their signs are irrelevant in their ordering Because negative integers are stored in two s complement form If their signs are not the same then a further check is made in UNEQU to check the sign in HL Swapping two items is done most efficiently by using the EX DE HL instruction The task of placing the items in the HL
96. ou find that familiarity is gone and that you waste a lot of time trying to recover it With this program first published in the April 81 issue you can record much of this precious information systematically to serve as documentation for future reference a printer is required 00000000000 MILEAGE CALCULATOR Peach and CC With the aid of this program originally published in the July 81 issue you can use your computer to keep a record of your car s fuel consumption The program originally used cassette tape to store the information for a particular month and these modified versions do the same The program allows you to enter the data make projections about fuel requirements etc and to produce summaries 1 month number 4 litres 2 km at start 5 cost 3 km at end The program then works out 1 kms travelled 4 mp P g 2 miles travelled 5 litres per 100 km 3 km litre After this is done the user is asked if the data is to be saved to cassette When completed the program returns to the menu The second function projects the number of litres of fuel required for a given trip given the average 1 arid the distance The summary mode allows you to summarise a particular month or the full year Given the month the program will search the data tape provided one has been created and when it finds the specified month it will load the data and summarise under these headings TOTAL COST T
97. programs plus the usual An 80 after a program title indicates that the program will be for TRS 80 Model Colour features and indicates that the program will be for the FAULT FINDER LII 16K 80 This program is problem deductive logic The scenario is of a machine for tunately fictitious which is subject to three particularly undesirable faults when combinations of actions taken The computer will act as your agent in performing the actions that you order and reporting the results You are required to determine what the common features of combinations of actions which produce the faults are and hence by trial and error how to avoid the faults Huh Ed CHEQUE ACCOUNT MANAGER LII 16K 80 This program will store up to 50 transactions of your cheque account It maintains a balance of the account Being fully inter active it will check bank statements edit records sort records and run record searches PAYROLL COLOUR A simple payroll program originally designed to operate on a Level II 16 cassette system This program will allow you to manage the payroll for small staff your Colour Computer If it s a dual drive system you need then take advantage of our dual drive package and SAVE a further 40 on the price of two single drive packages No of Tracks No of DRIVE TYPE Heads Dosplus Version Price Capacity 2 x MPI B51
98. rice 26 50 os METEOR MISSION II As you look down on your view astronauts cry out for rescue You must maneuver through the asteroids and meteors Can you get back to the space station Fire lasers to destroy the asteroids but watch out there could be an alien Flagship lurking Includes sound effects Price 20 50 ARMORED PATROL A realistic tank battle simulation Your view is a 3 D perspective of an alien landscape Maneuver your T 36 tank to locate and destroy enemy tanks and robots that lay hidden ready to assault you Clever graphics create the illusion of movement and dimension From Adventure Inter national With sound Price 32 00 REAR GUARD Deadly waves of enemy Cyborg craft attack your fleet from the rear You are the Mothership s sole defender You have unlimited firepower but the Cyborgs are swift nimble attackers Your abilities are tested hard in this game or lightening fast action and lively sound from Adventure Inter national Price 26 50 STICKEROO JOYSTICK for the TRS 80 MODELS 1 amp III AND SYSTEM 80 ADD 2 00 p amp p CONVERT YOUR COMPUTER INTO AN ARCADE GAMES MACHINE MICRO 80 s STICKEROO FEATURE The famous Atari Joystick Saves your e Compatible wilh programs from leading U S software nousi eyboard from Big Five Cornsoft Melbourne House Adventure International Will be Supported in MICRO 80 be used with your o
99. rogrammes 0000000000 INPUT OUTPUT From Mr C Stobert Wellington N Z My hobby level of computer activity has been satisfied with BASIC though perhaps a couple of games may be better if they moved a little faster Three BASIC programmes in TRS80 Programs Cat No 62 2064 from Tandy produce hypnotic graphics displays using strings PRINTed Consequently I have been curious of the display of Graphix since it was published in Issue 7 of Micro 80 but not sufficiently so to delve into assemblers etc I recently compromised with the attached solution It may not get top marks for originality but may be of interest to other readers in a similar situation 16K Memory is reserved from 28671 I retained operation from 7000H BASIC loading of memory does not take too long but line 140 lets you see something is happening count to 784 Data lines were entered using two people one reading one typing then checking back before entering There are 49 lines of data entering 16 bytes per line but it did not prove too tedious and the result was worth the effort We took two dumps before running and surprise surprise It worked first time 10 CLS POKE16553 255 20 DEFINTL R D P N DEFSTRA B S 36 PRINT 202 GRAPHIX MICRO 8 JULY 1980 40 PRINT 452 PLEASE BE PATIENT WHILE I 50 PRINTG520 GET MY DATA INTO PLACE 60 P 28672 N 1 7 READS IFS END GOTO160 A LEFT S 1 B RIBHT S 1 90 L ASC A
100. rograms are supplied on cassette for the Level II 16K TRS 80 Model or Ill They are also suitable for the System 80 but sound may not be available unless a hardware modification has been fitted to reverse the roles of recorders 1 and 2 Limited stock is available at these prices FROM BIG FIVE COSMIC FIGHTER 20 95 Your ship comes out of hyperspace under a convoy of aliens you destroy every one but another set appears these seem more intelligent You eliminate them too Your fuel supply is diminishing You must destroy 2 more sets before you can dock includes sound effects ATTACK FORCE 26 50 In this fast paced game 8 alien ramships are warping towards your ship You must dodge them and fire your missiles before they destroy you but watch out for the flagship and its death beam complete with sound effects FROM ADVENTURE INTERNATIONAL ELIMINATOR 26 50 Your mission is to prevent the marauding alien hoards from recovering your energizers from the planet surface There are several types of alien ships each with different weapons to destroy you with sound effects PLANETOIDS 26 50 It s your ship against a swarm of killer planetoids as you try to destroy them before they destroy you with sharp graphics and sound effects ADVENTURELAND 26 50 Wander through an enchanted world trying to recover 13 lost treasures You ll encounter wild animals magical beings and many other perils and puzzles
101. s and if the line lists differently then you most probably are having trouble with the memory itself Ed 0000000000 MICRO BUGS Inevitably no matter how careful one tries to be there will be errors mistakes and omissions in articles and programs Here s where we make corrections Addendum to Mr Coleman s SAVING AND LOADING M L PROGRAMS ON ESF WAFER very important point that was missing from my original article on SAVING AND LOADING M L PROGRAMS ON ESF WAFER was how to save the utilities SAVER and LOADER onto wafer themselves Hopefully these few paragraphs will clarify everything First you will need to enter the machine language utilities into memory There are a number of methods of doing this most of them have been explained in this magazine before Probably the quickest and easist method would be to use any monitor such as BMON or the ESF monitor to load the bytes directly into memory Neither utility is lengthy so this shouldn t take too long Start off with SAVER and load the bytes shown in the second column of the listing into the locations shown in the first column Do the same thing with LOADER then exit the monitor and return to BASIC Now get out the wafer that you want these two utilities to reside on and put it into the drive It doesn t matter which one you save first so now save them using these parameters 16450 31 693 and SAVEX 16500 12 693 reason
102. s for details LEARNING LEVEL Il THE CUSTOM TRS 80 by David A Lien BOOKS AND OTHER MYSTERIES Written by the author of the by Dennis Bathory Kitsz Level I Users Manual Learning Ever wanted to do things to Level II covers all Level BASIC your TRS 80 that Radio Shack beyond Level I plus much said couldn t be done How more It shows you how to use about reverse video high the Editor explains what the resolution graphics and audible many error messages are really keystrokes saying and leads you through Now enough How about conversions of Level I programs turning an 8 track into a mass to Level II peu storage device making music Dual cassettes printers the ERU controlling a synthesiser Expansion Interface with clock THE CUSTOMTRSSO individual reverse characters and other features are 4 ommWSTUSS and a real time clock just to explained in the same easy to 2 few learn style that made the Level The Custom TRS 80 and Other I Manual famous Learning Level Mysteries is packed with more II is an invaluable supplement 4 than 290 pages of practical to the TRS 80 Level Il and gt information and can be yours System 80 manuals and is now gt for only 32 50 plus 1 20 only 7 95 plus 1 20 p amp p p amp p BASIC FASTER AND BETTER TRS 80 DISK AND OTHER MYSTERIES AND OTHER MYSTERIES by Lewis Rosenfelder by H C Pennington Basic is not nearly as slow as TRS 80 Disk and Other most programmers think Ba
103. s stored in a keyword file Close with a and the program searches the appropriate keyword file for entries which match and displays or prints them The program has a total of only seven commands all of which are one or two letters or symbols which fit neatly into an almost English syntax Records can be of random lengths from one to 240 bytes and no prior formatting is needed although the output is in the form of lines no formatted screen This could be a disadvantage especially if your records are near maximum length as words get chopped off as the line wraps around the screen Another disadvantage is that the records aren t numbered on the display or in print outs Considering the price of this program however these are minor annoyances The manual is supplied in a gold leaf on brown vinyl ring binder with the disk in a plastic pocket at the front Eighteen pages about one third of them blank with sample runs and pictures of the video are sufficient to get you up and away in less than twenty minutes Versafile is written in BASIC and the manual gives a few hints on changes you make to tailor the program to your own needs change not mentioned is altering the number of keyword files to be used As supplied eight keyword files are used My client needed twenty and the changes turned out to be quite simple VOLUME 3 NO 8 JULY 1982 MICRO 80 PAGE 8 To increase the number of keywords only six lines need be
104. sic Mysteries is the definitive fix it eaesu Faster and Better shows you book for disk users More than HASIC FASTER how to super charge your BASIC 130 pages of easy to read AND BETTER with almost 500 pages of fast entertaining and immensely R functions and subroutines useful information Find out You won t find any trivial how to recover disk files the poorly designed check book Pe layout of information on disks balancing programs in this THSSO DISK memory maps problem book it s packed with useful OTHER WSTERES solutions the list goes programs Many readers have saved days Tutorial for the beginner T of work by recreating disk files instructive for the advanced pray that were unreadable TRS 80 and invaluable for the e Disk and Other Mysteries which professional this book doesn t 0 has received favorable reviews just talk it shows how Basic in several magazines is yours Faster and Better is 32 50 for only 27 00 plus 1 20 plus 1 20 p amp p p amp p CAT 1 MICRO 80 PRODUCTS THE LNW80 MICROCOMPUTER CAT2 Manufactured in America by LNW Research Corporation the LNW80 Il has the following outstanding features Completely software and hardware COMPATIBLE with the TRS 80 Model 1 HIGH RESOLUTION COLOUR GRAPHICS 4 MODES BIWLO RES 128 x 48 B W HI RES 480 x 192 COLOUR LO RES 128
105. stal a blue crystal a sionated cumquat a skul 1 690 DATAgroup of Peladonians trio of ugly mutants group of Dalek s Cyberman single loathesome horrible creature Troglodyte Timelor d 49 56 57 58 27 59 60 2 3 4 6 5 99 1 700 SF 12111321121312231222122212221222112211241121122111111121 11511221111155111115155512111511121512251111151111151115 710 SC AGGBABBAGBANBLUBUNCLOCOMCOPCRECRYCUMCYBD DALDESDIEDIGDO WDROE EASEATENTEXIFIRGALGETGIAGIVGRAGUNHIDIN INVJELLARL ISLONLOOM AGMOOMUTN NOROBJOFFOPEQUTPELPICPLAQUIRAYREARENRESROCS SCASCRSEA SIOSKASKUSONSOUSPISTRTALTARTIMTROU UP W WESWHI 720 REM OPEN FILE HERE FOR DISK 730 INPUT 1 SP INPUT 1 SD INPUT 1 S0 INPUT4 1 S1 S1 LEFT S1 60 CHR 34 10 S1 62 4 CHR 34 RIGHTS 51 12 740 FORI 1TO16 FORJ 1TO4 0 I J 5 MID SO 1 1 4 7 1 I FORI 0T069 FORJ 1 TOSSTEP2 X ASC MID SP I3 7 1 2 1 DCI d INT X 16 DCI J 1 X INT X 16 16 NEXTJ I FORI OTO69 D 1 0 ASC M ID SD I 1 1 5 NEXTI 750 RESTORE F RI 1TO17 READSO 1 NEXT FORI 0T06 READSI 1 NEXT F ORI 0TO6 READL I NEXT FORI 1TO7 READPI I NEXT RETURN 2861 8 ON 3Wf10 08 0821 26 39Vd 780 IFPO 99P 99ELSEP L 10 790 IFP 60RP 80RP 250RP 440RP 990RL 46NDO9THEN840 800 IFC gt OC C RND O 810 IF P 660RP 7 ANDC 0ANDRND 0 gt 4ORRND 0 gt 9ANDC OC 1 820 IFP 19ANDO S 2 SIFC lt 4THENS40
106. the future and store recorded magnetic media away from sources of heat and magnetic fields Ed From J Finlayson Bluewater Qld In your journal I notice fairly frequent references to difficulties with tape loading with the System 80 I have one of the early models and I have found no difficulties with loading either BASIC or System tapes provided that I clean and demagnetise the tapehead frequently A nuwber of my acquaintances with later models have also found this a certain cure for any difficulties but I cannot say the same thing for TRS 80 owners problem I have found with saving on computer grade tapes has been failure after re using several times this has apparently been due to in complete erasure by the builtin deck and is easily overcome by erasing on a high quality tape deck if one is available I must agree with Mr Finlayson s comments as I have found the same is true on my early model System 80 Although I ve never demagnetised the heads I understand that a strongly magnetised head can erase a tape while playing it The motto for reliable cassette operation the mechanism needs to be clean and use good quality tapes Ed From Mr G Bull Balhannah S A Recently I bought an expansion interface and disk drives for my System 80 A copy of DOSPLUS was included with the purchase of the first drive from MICRO 80 but I have had problems copying my BASIC programs from cassette to disk They CLOAD in Level 2 without any
107. uffer will be transferred to the target string When this is completed you will be back to BASIC ReRUN the program without an entry for the first question and you will be ready to make your second design Once you have completed your designs merely delete all those lines not required and write your program on top of the packed strings DO NOT ATTEMPT TO EDIT THE PACKED LINES This program is a fully functioning utility but there are many other extras that could be added Please feel free to add anything you wish I would be pleased to see anything extra you might add For myself I have completely automated this program it even edits its own line numbers but how to manage that is altogether another story 0000000000 kkKKKK Automatic Graphics Packer X Xxxxxxx 1 Cox Written for Micro 80 25255524224 2 by x KKK Smith 222542 K 4 CLEARSOO kk 500 Bytes for Strings 5 CLS XX Clear Le Screen 6 DEFINTA K M Z Set up the integers 7 15560 kk Start of Screen Memory in C 191 X Whole graphic in 9 DIMA 10 X X Set up the array for A 10 k The Variables A 1 to A 9 all have 100 blanks 11 AS 1 12 A 2 13 A 3 14 4 15 5 16 6 17 7 18 8 19 9 20 XX A has 250 blanks and is the Buffer 21 A 22 19 zs kk A dummy string used in the screen print 23 INPUT STRING NUMBER AND LENGTH
108. ulty Nothing can be done on the ship so enjoy the crash landing Upon landing the command LOOK SHIP will reveal a nylon rope which requires GET NYLON ROPE to pick it up Moving south with S you will come to a cliff The command LOOK CLIFF will detect a bush growing on the cliff although this last command is not necessary Then type ROPE BUSH another tricky part and CLIMB ROPE to reach the top of the cliff From here you are on your own hope you have fun figuring out the rest of the Venture I think Mr Bauk will be eternally grateful for your assistance Mr Edwards From J Wragg Page A C T Recently I had a small mishap with several tapes all of the data just disappeared The tapes were stored in a desk drawer in cassette boxes but not all of the tapes were affected i e some tapes remained intact while others were completely wiped Can you offer any clues as to what may have caused this to happen Recorded information on cassette tapes or any magnetic media for that matter will be damaged or erased by exposure to strong magnetic fields which could have occurred by operating a television set or some appliance with an electric motor or transformer on the desk near the tapes These types of appliances can generate strong magnetic fields Eddy suggests that some of the cassettes may have been shielded from damage by the others but the incident does seem mysterious It would be wise to be careful in this respect in
109. ummit of a very tall mountain S9 a thick fog here RETURN 480 GOSUB620 PRINT 4 chimney from which is pouring ia very dense thick yellow smog RETURN 490 GOSUB620 PRINT small hole into which the fog is flowing RETURN 500 GOSUB620 PRINT fast flowing river The water is dull yellow shade RETURN 510 PRINTS8 intersection of two passages RETURN 520 GOSUBS1 0 GOSUBS80 RETURN 530 PRINTS6 broken down tardises RETURN 540 GOSUB510 PRINT A sign nearby says 380SUB1640 RETURN 550 PRINTS7 magnificent chamber S9 a large throne here RETUR N 560 GOSUB630 PRINT with a hole in it RETURN 570 G SUB630 PRINT RETURN 580 PRINT There are some stairs here 590 PRINT of a steep incline RETURN 600 6070780 610 PRINTS8 top of a mountain looking down RETURN 620 PRINTS7 valley beside a RETURN 630 PRINTS8 base of an unscalable wall of rock RETURN 640 CLEAR650 DEF INTA Z DEFSNGC DEFSTRS 650 DIMSO 17 D 69 6 0 16 4 SI 6 SX C6 V 22 SW S L 6 PI C7 660 DV 1 SY You are SH You have S7 You are in a S8 Yo are at the S9 There is S6 You are in a room full of CLS PRINT9342 Doctor Who 670 DATAAggador a pick a desionating renticulator a sonic screwd river a giant blue spider a bag of jelly babies a Dalek ray gu n a copy of Playdalek a large rock a long scarf a strange looki ng object a bunch of bananas a dead spider 680 DATAa white cry
110. unused The exit we are using is taken by the interpreter whenever it finds an expression in your program which starts with a amp it consists of a call out to RAM location 4162H unless you have Disk Basic loaded location 4152H contains a jump back into the ROM to a piece of code which prints the L3 ERROR message What we have done is to replace this jump by a jump to our own machine code in high RAM our code will function as an extension of the BASIC interpreter by packing the hex characters following amp H into their binary equivalent and passing the result back to the ROM When we come in to our code the ROM gives us the address of the amp character in the HL register pair In return for this generosity we have to update the HL register pair to point past the hex characters and we store the result i e their packed value as a 16 bit integer with LSB at location 4121H and MSB at 4122H We also have to set location 40AFH equal to 02 to tell the ROM that the value we re sending him back is an integer as opposed to single precision or string etc Then we can do a simple RET to continue interpretation So now you can run programs with amp H constants in them and what s more the syntax is compatible with Disk Basic Although the BASIC program shows the machine code being stored in high memory this is only an example since the machine code is completely relocatable This means it doesn t contain any references to addresses
111. upport also publish Utility programs in BASIC and Machine Language We publish articles on hardware modifications constructional articles for useful peri pherals articles on programming techniques both in Assembly Language and BASIC new product reviews for both hardware and software and we print letters to the Editor COPYRIGHT ATT the material published in this magazine is under copyright This 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 NO 8 JULY 1982 MICRO 80 PAGE 3o eekk CONTENTS EDITORIAL PEEKING UK From our U K Correspondent INPUT OUTPUT LETTERS TO THE EDITOR MICROBUGS TANDY S VERSAFILE SOFTWARE REVIEW THE THEORY AND TECHNIQUES OF SORTING PART 6 AUTOMATIC GRAPHICS PACKER SOFTWARE SECTION VARIABLE WORKSHEET VARIABLE WORKSHEET MILEAGE CALCULATOR MILEAGE CALCULATOR CALENDAR HEX CONSTANTS SERIES IMPEDANCE CIRCUIT DR WHO ADVENTURE LOWER CASE CONVERTER MICRO 80 PRODUCTS CATALOGUE NEXT MON
112. was still in high school I became very interested in electronics and spent the next few years trying to make the perfect hi fi amplifier Most of my attempts usually designs from various electronic magazines died horrible deaths at the moment of powering them up and I eventually bought one Nevertheless this fascination with electronics sustained me until I came across logic circuits in third year Physics at University At the same time I had my first taste of computing in Applied Maths but never had the faintest suspicions that the two were closely connected computers and logic circuits My greatest achievement was the perfection of a program written in FORTRAN to produce a calendar Elsewhere in this issue my latest attempt appears yet another milestone as it is the first of my programs to ever be published I seem to recall expending a great deal more effort the first time As Ian mentioned last month I was until recently a high school teacher in the areas of mathe matics and science When the Education Department took an interest in computers and purchased Apple microcomputers available for use schools my interest in computing was rekindled The technological revolution in the electronics industry was well under way and the price of the personal computer had fallen to the point where it was within my reach Yes I had thought of making the perfect computer but my past experiences quashed that idea pretty quickly It was some time
113. were applied to give the following figures LIST SIZE SHELLSORT QUICKSORT 200 11281 Time Units 12018 Time Units 500 35465 35392 1000 84351 78873 2000 200621 173925 4000 477162 380206 10000 1500000 1057000 You can see from this table that Quicksort is more efficient in the average case as the list size increases TO SUMMARIZE A method of sorting by exchange techniques known as the Partition Exchange sort is very efficient for the average case Items are sorted by placing them in their correct final position in the list producing sublists on either side of it which contain values that belong in that sublist sublist is stored while the other is processed in the same manner stack is used to store the bounds of the stored sublist This endsmy discussion of differerit internal sorting algorithms although it is not an exhaustive list of algorithms available It should be understood that no one algorithm is the best since different algorithms suit different applications and some present trade offs in memory usage that would not be acceptable in other applications The next article will discuss record sorting and external sorting techniques 0000000000 AUTOMATIC GRAPHICS PACKER by Ken B Smith Those of you who struggled through my article on STRING amp THING will by now have had enough practice at string packing to appreciate the time that even a simple graphic shape can consume Even so the savings in
114. wn BASIC or MLPrograms Comes complete ready to plug it ions required 10 your computer modifi and use Absolutely PRICE INCLUDES JOYSTICK STICKEROO INTERFACE INSTRUCTIONS DEMO PROGRAM LISTING PLEASE SPECIFY TRS 80 MODEL of OR SYSTEM BO WHEN ORDERING ALL GAMES ADVERTISED ON THIS PAGE ARE STICKEROO COMPATIBLE rh fin rv ra dh h Q ey s r A h rh h Pf 9909 8 0606 GALAXY INVASION The sound of the klaxon is calling you Invaders have been spotted warping toward Earth You shift right and left as you fire your lasers A few break formation and fly straight at you You place your finger on the fire button knowing that this shot must connect With sound effects Price 26 50 PENETRATOR Soar swiftly over jagged landscape swooping high and low to avoid obstacles and enemy missiles attacks With miles of wild terrain and tunnels to penetrate you re well armed with bombs and multiple forward missile capability From Melbourne House Features sound trainer mode and customizing program Price 36 50 TT TIPP DEFENSE COMMAND The invaders are back Alone you defend the all important nuclear fuel canisters from the repeated attacks of thieving aliens repeatedly An alien passes your guard snatches a canister and flys straight off Quick You have one last chance to blast him from the sky With sound and voice J STRIKE FORCE As the primary defender of
115. x 192 in 8 COLOURS COLOUR HI RES 480 x 192 in 8 COLOURS CPIM Disk Operating System Single and Double Density Disk Operation Supports 5 inch or 8 inch Floppy Disk Drives 48K RAM in TRS 80 mode plus 16K High Resolution graphics RAM 64K RAM in CPIM mode plus 32K Banked in usable in BASIC plus the 16K High Resolution Graphics RAM 4 MHz Z80A microprocessor over twice the operating speed of the Model 4 HI RES COLOUR and B amp W video outputs 3screen display modes 64 characters x 16 lines 80 characters x 16 lines 80 characters x 24 lines SOFTWARE SUPPORT Apart from being able to run all TRS 80 Model 1 software and all CP M software there is also an extended BASIC interpreter available for the LNW80 Il using most of the same commands as the TRS 80 Colour Computer but with full LNW Graphics Resolution SET RESET POINT LINE and CIRCLE as well as special commands to generate sound effects and tones TRS 80 Colour Computer BASIC programs can be transferred to the LNW with only minor changes The LNW80 is the ideal computer for the serious hobbyist or businessman who is seeking a higher performance more reliable computer to replace his TRS 80 Model 4 without sacrificing his investment in software or his programming experience The LNW80 II uses standard Tandy or Tandy compatible disk drives If you already have a disk TRS 80 system you may continue to use
Download Pdf Manuals
Related Search
Related Contents
Samsung 45 mm F1.8 2D / 3D 第十一章 特許権存続期間の延長 z/VSE service terms Pour le temps préparatoire du Synode : mode d`emploi Kobamatic Digi GMA_Manuel_fr_PARTIE 1 IMPCO Large Engine Catalog - IMPCO Technologies Europe Aurora PR720 calculator Copyright © All rights reserved.
Failed to retrieve file