Vol. 4, Issue 4, November/Decernber 1983
You--> x
A R E
H E R E ! A S
•
Also in this issue: PROGRAMMING: Galactic Battles Level I Peek, Poke and USR Track Racer Peach Statements Explained Sirius Adventure Peach Household Accounting Peach REVIEWS: Yahtzee Level 2 The Adventure System Bold Type for LP VII Level 2 The TRS-80 MC-10 Computer LVAR Level 2 GRAFX Disk SOFTWARE: Space Utility Model 3 ·HI-RES Text Colour Source Utility Model 3 Killer Satellite Colour Household Accounting- Sirius Adventure Colour Model 4 Track Racer Peach Space Invaders MC-10 �OLY�B�. Australiafs broadest range of software for TRS-BOfs and SYSTEM BOfs
MOLYMERX has the Australian distribution rights for literally hundreds of top grade programs from American, Canadian and British publishers. From games to utilities, from DOS's to Databases, if it's top quality then MOLYMERX almost certainly has it. Now, MOLYMERX is being distributed in Australia by MICR0-80. To help you chose from the incredibly wide range of programs available, you may purchase a MOLYMERX catalogue. For only $3.00 you receive over 80 pages of what is virtually an encyclopedia of '80 software plus regular updates for 12 months. The useful information contained in this catalogue is worth many times its cost. There are now generous BULK BUY ING DISCOUNTS of 10°/o off list price for single orders in excess of $500 or 15°/o for single orders in excess of $1,000. So get together with your friends or User Group members to place a combined order and save yourselves real $$$.
EXPANSION INTERFACES FOR SYSTEM 80 and TRS-80 COMPUTERS
MICR0-80's new family of expansion interfaces for the System 80 and TRS-80 offer unprecendented features and reliability including: Up to 32K STAT IC RAM : to ensure high noise immunity and reliability Centronics Printer Port: The Systems 80 Expansion Interface has a double-decoded port to respond to both port FD and memory address 37E8H, thus overcoming one of the major incompatabilities with the TRS-80. RS2 32 Communications Port: for communicating via modem or direct link to other computers Single Density Disk Controller: for complete compatability with all Disk Operating Systems Supports double-sided Disk Drives up to 80 tracks: with a suitable disk operating system such as DOSPLUS, NEWDOS 80 or LDOS, the interface will support single or double sided drives of 35-80 track capacity. Economical double density: an economical, high quality double-density upgrade will be released shortly to enable you to increase the capacity of your disk drives by 80°/o. Real time clock interrupt: provides software clock facility used by most DOS's. AVAILABL E MARCH 1984, price to be announced shortly. Demand is sure to be heavy. Interfaces will be supplied on a first-come-first-served basis. To avoid disappointment you should write in NOW to be included on the no-obligation waiting list.
SYSTEM 80 PRINTER INTERFACE $99 + $3.00 p&p For those who wish to add a printer to their SYSTEM 80. MICR0-80's new printer interface provides the ideal solution. Double-decoded to both port FD and address 37E 8H, this interface overcomes one of the major incompatabilities between the SYST EM 80 and the TRS-80. Price includes a Centronics printer cable. Operates with Centronics compatible printers including GP-80 and GP-100. Similar interface is also available for the TRS-80 $99.00 + $3.00 p&p VOLUME 4 No. 4 (NOVEMBER/DECEMBER 1983) MICRO-SO PAGE 1
SOFTWARE TElliS COLOUR COMPUTER HI-RES TEXT &)t_ ABOUT MICR0-80 EDITOR: IAN VA GG M/CR0-80 is an international magazine devoted to the Ta ndy TRS-80 Model 1, Model Ill and Colour microcomputers. the Dick Smith System 80Nideo Genie and the Hitachi Peach . It is available at the following prices: 12 Months Single Copy MAGAZINE ONLY $ 36.00 $ 3.50 CASSETTE SUBSCRIPTION $ 96.00 $ 6.00 DISK SUBSCRIPTION $125.00 $10.00 (disk) M/CR0-80 is available in the United Kingdom from: U.K. SUBSCRIPTION DEPT 24 Wo odhill Park, Pembury, Tu rnbridge We lls, KENT TN2 4NW MAGAZINE ONLY £16.00 £1.50 CASSETTE SUBSCRIPTION £43.00 £NIA DISK SUBSCRIPTION £75.00 £N/A M/CR0-80 is available in New Zealand from: MICRO PROCESSOR SERVICES, 940A Columbo Street, CHRISTCHURCH 1 NZ. Ph . 62894 MAGAZINE ONLY NZ$ 59.00 NZ$ 5.60 CASSETTE SUBSCRIPTION NZ$130.00 NZ$ 7.50 DISK SUBSCRIPTION NZ$175.00 NZ$15.00 M/CR0-80 is despatched from Australia by airmail to other countries at the following ra tes: (12 MONTH SUB) Magazine Cass Sub Disk Sub PA PUA NEW GUINEA Aus$53.50 Aus$115.50 Aus$148.50 HONG KONG/SINGAPORE Aus$58.00 Aus$122.00 Aus$157.50 INDIA/JAPAN Aus$64.00 Aus$129.00 Aus$165.00 USA/MIDDLE EAST/CA NADA Aus$73.00 Aus$140.00 Aus$177.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 M/CR0-80 is to publish software and other information to help you get the most from your TRS-80, System 80Nideo Genie or Peach and its peripherals. MICR0-80 is in no way connected with any of the Ta ndy, Dick Smith or Hitachi organisations. WE WILL PAY YOU TO PUBLISH YOUR PROGRAMS: Most of the information we publish is provided by our readers, to whom we pay royalties. An application form containing full details of how you can use your 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 microcomputers we support. We also publish Utility programs in BASIC and Machine Language. We publish articles on hardware modifications, constructional ar ticles for useful peripherals, articles on programming techniques both in Assembly Language and BASIC, new product reviews for both hardware and software and we printer letters to the Editor. COPYRIGHT: All 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 M/CR0-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. M/CR0-80 is Registered by Australia Post - Publication No. SBQ2207 AUSTRALIAN OFFICE AND EDITOR: M/CR0-80, P.O. Box 213, Goodwood, S.A. 5034. Te l. (08) 211 7244 U.K. SUBSCRIPTION DEPARTMENT: 24 Wo odhill Park, Pembury, Tu rnbridge We lls, Kent TN2 4NW TYPESETTING & MAKE-UP: Fo rmgraphic, 117 Wright Street, Adelaide, S.A. 5000. Te l. (08) 211 7866 PRINTED BY: Shovel & Bull Printers, 379 South Road, Mile End, S.A. 5031 PUBLISHED IN AUSTRALIA BY: M/CR0-80, 433 Morphett Street, Adelaide, S.A. 5000 PAGE VOLUME 4 No. 4 (NOVEMBER/DECEMBER 1983) 2 MICR0-80 with 2 disk drives and 64K of RAM sells so that small, specialist suppliers will be in the U.S.A. for $US1, 799.00. Since the able to afford to advertise. We will shortly 4P has not yet been announced in launch a New Products column contain Australia its price here is unknown but will ing information about relevant new pro probably be $2,600-$2, 700, now that the ducts for '80 computers. In these ways, Model 4 itself has been reduced to MICR0-80 will become a more complete We lcome to our new-look $3,000. There seems little doubt that like reference to all things '80 and help max MICR0-80 magazine. We hope you find ra dios and calculators before them, com imise the diminishing support. While some the new layout more readable than the puters are going to become portable. The of this may not be of great relevance to old. For those interested in the main impediment to this process is the overseas readers we are sure that the mechanics of magazine production, our bulk and weight of a readable sized changes in content which are planned will type setting is now being done on a display. Once flat screen or large liquid be very appealing. Compugraphic 80 Electronic photo crystal displays become available at a Over the years we have received typesetting machine. This is effectively suitable price the desk-top microcomputer many comments from readers, both a multi-user computer/word processor as we know it today is certain to become positive and negative. Analysis of these which produces its output photo a quaint relic of the past. The only ques comments indicates that whilst the newer graphically. The equipment is pretty tion now seems to be, how quickly will it computer owners find the material in much state-of-the-art and is another pro all happen? MICR0-80 to be pretty much what they duct of the microprocessor revolution. On a less buoyant note, we have want, the more experienced owners find Just in case you think we must have won heard form a usually reliable source that fewer articles and programs to suit their the lottery, the type setting equipment EACA , the Hong Kong firm that manufac tastes. One of the most consistent com is not ours but is the property of tured System 80Nideo Genie, has ceas plaints is that we publish too many games Fo rmgraphic, a very progressive type ed trading altogether. This will mainly af (usually expressed by the disgruntled as, setting house located nearby. fect those System 80Nideo Genie owners "A ll you publish is games"). There are two Quite apart from making the who are planning to upgrade their systems interesting observations to be made here. magazine easier to read, the new type to include disk drives or a printer, since Firstly, we do publish many other types of setting fits double the amount of informa printer interfaces and expansion interfaces programs besides games. Secondly, the tion on each page thus enabling us to are no longer available. Fo rtunately, here programs we publish represent a fair reduce the paper used by almost 25% at M/CR0-80 we had already commenc cross-section of those being written (and (the Listings still occupy the same space ed design work on a new expansion in presumably used) by Readers so we are as before). So when future issues look a terface and also a printer interface, when probably catering to the "average" taste. little slimmer, don't fret, you will still be the news broke. The interfaces will be That said, we accept that we do not re ceiving the same amount of information. available for sale towards the end of publish many "Serious" programs in terms The reduction in paper content is aimed Fe bruary 1984. The expansion interface of relatively complex applications such as at reducing the magazine's production (there is also a TRS-80 version) includes Accounting Systems, Data Management costs. It is now 2 years since the price a printer port, RS232 port, floppy disk etc. Certainly, those of our critics who of M/CR0-80 was last set. In that time, controller and up to 32K of static RAM. suggest we should publish full-featured production costs have increased The use of static RAM gives high noise working accounting systems for example, dramatically. Even with the reduction in immunity and removes many sensitive tim are being somewhat unreasonable. Such material costs we have now effected, we ing problems associated with the dynamic software sells for $2,000 or more. It must reluctantly increase the selling price RAM used in the early designs. The seems a little much to expect to be given of M/CR0-80. The new rates which printer interfact is decoded to both port it for the price of a magazine subscription. become effective immediately, are publish FD (standard System 80Nideo Genie The reason these programs cost so much ed on the index page. The price increase printer port) and also to memoryaddress is the very considerable amount of work. is modest and will enable us to continue 37E8H, the address used in the TRS-80 often amounting to man-years, required to to improve our magazine and adapt it to Model 1. In this way Ta ndy software which write, test, debug and maintain them. meet the changing requirements of our drives the printer port directly will operate Speaking personally, if it were my readers. Of course, you will not be re satisfactorily on the System 80. The ex business at stake, I would make sure that quired to pay the new rates until your pansion interface has the same ar I paid the full rate for a properly supported subscription comes up for renewal. In rangements for its printer port, too. program because, when things go wrong cidentally, we do send Reminder Notices The demise of EACA is somewhat I want them fixed quickly. Nevertheless, when your subscription nears its expiry symptomatic of the changes taking place there is considerable scope to increase date. in the '80 world. The proliferation of dif our coverage in the serious applications There have been several changes ferent brands of microcomputer, each area. We will therefore, introduce a in key staff at M/CR0-80. Ryzard more dazzling and spectacular than the number of changes over the next few Wiwatowski, the Editor for the past 12 last, has reduced the total amount of sup issues. Firstly, we will support two data months has resigned as has Charlie port available for any one brand. In par base programs, the Ta ndy Profile series Bartlett, the Software Editor for the past ticular, older machines such as the and ENbase from Southern Software. The 2% years. Charlie is moving to sunny TRS-80/System 80 are suffering badly. first because they are useful programs Queensland. I am sure we all wish both There are many fewer organisation cater that are very widely used, the second men well in their future careers. /an Va gg ing for these machines and even their because we believe ENbase to be the has assumed the role of Editor once more original distributors Ta ndy and Dick Smith most powerful data base available for the whilst Ed Grigonis who operates a Model have markedly reduced their levels of sup '80 computers. Our support will take the 1 system with disk drives and is an active port in favour of later models or different form of articles to assist you to unders member of the Adelaide Micro Users machines altogether. At the same time, tand the concepts behind the programs Group, has become Software Editor. The these computers still have a good deal of and how to get the best form them and departure of Ryzard and Charlie caused useful life left in them and there are literally also "Listings" of specific applications no small disruption in our production tens of thousands of owners who have a which you can use just as you would a schedule. The result is the issue you are large personal investment in them through BASIC program. We would welcome (and reading now. It is a double-sized issue acquired knowlede and programs, both pay for!) submissions by our readers. (after allowing for type setting) and en written and purchased. We believe that In a similar vein, we will support compasses both November and the TRS-80/System 80 computers are far VIS/CALC and SUPER VIS/CALC with December 1983 editions. It is also rather from finished and it is time that owners articles, templates etc. late. The delayed production ran us slap drew together to assist each other even We will publish more in-depth bang into the Christmas season and the more as commercial support wanes. reviews of serious applications software subsequent annual close down of our MICR0-80 intends to become an even such as word processors, graph printers. It will take a month or two until more important focal point for this support. generators, data bases etc. Games play we are once more back on schedule so The development of new expansion inter ing can also be a serious business for the please accept our apologies for any in faces for the TRS-80 and the System 80 real enthusiast so Ed Grigonis has under convenience caused. and the distribution of Molymerx software taken to write a series of detailed reviews Much has been happening of late in Australia are just two of the ways in on many of the better quality games. Ed's in the '80 field. Ta ndy has announced which we have increased our support for first contribution on the Adventure System several new products including a portable the owners of '80 computers. M/CR0-80 is in this issue from which you will see that Model 4 known as a Model 4P. This is itself will also change to better reflect the he writes very high standard reviews essentially a Model 4 in a more compact interests of its readers. We will for the first indeed. package with 9" monitor, half-height disk time encourage the placement of One of the more neglected fields drives and separate keyboard which all advertisements for relevant products in in computer magazines of all kinds, is that packs away into a large carrying case. The our magazine. Rates will be much lower of utilising the graphics capababilities of complete unit weighs in at about 12kg and than in the general computing magazines dot-matrix printers. The ubiquitious Epson VOLUME 4 No 4 (NOVEMBER/DECEMBER 1983) MICRO ..SO PAGE 3 MX-80 has spawned a host of cheap com assist the very many owners of such We hope you will find reading our patibles in its wake. There seems to have printers to improve their usefulness. "New-Look " MICR0-80 as exciting and been few articles published anywhere to interesting as we find the prospect of pro assist the owner unravel the Jinglish in the Even with the increased emphasis ducing it. We believe that, whatever your instruction manuals, let alone make use of on "Serious" computing planned, we will background and experience, each issue the extremely versatile bit-graphics not neglect our less experienced readers will contain something to interest and capabilities of these printers. MICR0-80 and will continue to provide articles and challenge you. will attempt to rectify these omissions by programs to suit the new and intermediate publishing articles, programs etc which will owner. space is managed by the BASIC interpreter. EllS The program, first of all, reserves some high memory for a machine language subroutine and POKEs it into memory. The subroutine modifies the CIPE display offset register in the SAM chip and If you own a Peach and are a new allow you to display any portion of the 16K subscriber or have renewed your RAM. The routine is called in line 40 and subscription with or subsequent to the sets the display memory to addresses first issue of Volume 4, then you are en $300 - $3FF (in fact, any parameter in A major drawback in using the high titled to the new free software offer. this range would set the display to this resolution screen on the Colour Computer However, the SOFTPAK program library is page of memory). Lines 50 to 70 do some not suitable for the Hitachi Peach - in is the difficulty encountered when you try string manipulation which you can watch to mix the text with the graphics. One way stead, we offer our Peach readers the on your screen (the subroutine at line 90 of solving this problem was presented in choice of one of three commercial games, is used to slow the process down to a last month's issue, but the WRITER pro viz. Peach Invaders, Ghost Gobbler or pace with which the eye and brain can gram in this issue by Geoffrey Williamson Scrambler. We are now at the stage where cope). demonstrates a much more flexible and we wish to prepare and distribute this soft Yo u should see that the interpreter useful solution to the problem. Those of ware gift but have encountered two uses up free string space at a rather rapid you with Ta ndy's Editor/Assembler Plus difficulties: rate until it runs out of space. When this who wish to type in the source code from 1. Our mailing list does not irlentify all of happens a garbage collection routine the magazine will notice that a 'few lines' our Peach subscribers. compacts all the currently active strings have been left out between lines 1500 2. We have no record of which particular at the top of string space and then and 12,040. This omission is quite game you wish to receive. releases the remainder and returns to run deliberate and in the interest of saving If you are a Peach owner already ning the program. With a very large space - the source lines omitted are entitled to receive the new free software amount of string space, this garbage col simply the multitude of FCB's that define or who will become eligible by renewing lection routine can sometimes take several your subscription at some stage during the bytes of the character table and these minutes to executive and if the actual can be just as easily read from the Hex Volume 4, then please drop us a line as amount of free string space is small, then soon as possible with the following Dump. For reference, source line 1410 it will take place frequently, slowing down corresponds to the Hex Dump at $30CO. information: the speed at which the BASIC program Fo r those of you entering the Hex Dump, (i) Yo ur name and address is running. the memory addresses commencing at (ii) Yo ur subscription expiry issue The machine language subroutine $3000 are only a suggestion since you (iii) Yo ur selection of one of the following: is completely relocatable but does use A-Peach lnvadersB-Ghost Gobbler cannot place the code starting at zero in one ROM call to retrieve the parameter C-Scrambler reserved RAM. However, the program is passed by the USR function. This address Please direct this information to: written in position independent code and ($B3ED) may need to be changed in PEACH FREE SOFTWARE, you can locate the program anywhere you future revisions of the Colour BASIC MICR0-80, find it convenient ROMs. Yo u can use this technique to look PO. BOX 213, at the operation of other BASIC GOODWOOD, S.A. 5034 WATCH BASIC AT WORK statements by changing the program lines Normally, the text video display 40-80 and you will probably need to look memory on the Colour Computer is at different areas of memory to see where located at $400-·$5FF The actual values the action is taking place. The only limita stored here determine which characters tion so far seems to be that when the in are displayed on the screen of your TV terpreter uses the normal text page, it sets set However, the combination of SAM and the display offset register in the SAM to VDG potentially allow you to set the loc <;I show the normal text page. However, with tion of display memory to anywhere m a little trial and error, you can use this Many of our readers with disk memoryaligned on a 512 byte boundary. method to explore the workings of your systems will appreciate the GRAFX utility in this month's issue. A number of people For those of you who are interested in how Colour Computer and its BASIC a BASIC program or the interpreter itself interpreter. have recently pointed out that many Level works, this capacity provides a rather uni 2 BASIC programs utilizing machine que opportunity for a visual language subroutines more often than not demonstration. do not work with Disk BASIC (see In In the September '83 issue, the put/Output and below). The reasons !or piece on conserving memorymentioned this are fairly obvious. Most Z80 machme the frivolous and extravagant use of the code contains local absolute address CLEARed string space by the BASIC in references and cannot be easily relocated. terpreter. The following programprovi �es Secondly, on 16K Level 2 machines, these a graphic illustraiton of how the stnng subroutines are usually placed at the top of memory (i.e. below address 8000 Hex) 10 CLEAR 200,&H3F00 which usually conflicts with the program 15 DIM B$(26 > storage area in Disk BASIC in the case of 20 A=&H3F00 : DEFUSR0 = A all but the smallest of BASIC programs. 30 FOR I=0 TO 26 : READ A POKE A+ I,D NEXT I The program RECALL on the SOFTPAK 40 A=USR0<&H3E00 > : A$="" disk offers one type of solution to this pro 50 FOR I=0 TO 26 blem. Another approach is the following 60 A$=A$+CHR$< I+63) : B$ =CHR$(32) GOSUB 90 from one of our readers. Mr. Wilson of To ronto: 70 NEXT I 80 A=USR0<&H400> : END MODIFICATION OF 'GOLF' FOR DISK 90 FOR J=0 TO 750 : NEXT J : RETURN USAGE 100 DATA 77,38,23,189,179,237,70,198 1 recently added a disk drive to my 110 DATA 7,142,255,198,70,36,6,48 System 80 and then, of course, set about 120 DATA 1,167,128,32,2,167,129,90 transferring all my tape based progratr�s 130 DATA 38,242,57 to disk. With most BASIC programs thrs PA GE 4 MICRO-SO VOLUME 4 No" 4 (NOVEMBER/DECEMBER 1983) presents no problem at all. However, any 80 can only handle integers up to 32767 such program which contains a machine it is necessary to use negative integers language subroutine will require some for the addresses above this value in Fill modifications" One program of this type POKE and PEEK statements. which I have converted is GOLF which With these two changes GOLF was published in the July 1983 issue of Now runs as it used to on tape. MICR0-80. The changes I made may be of interest to some other readers. This is THREE particularly true because, although articles are often published which point out that changes are needed and some describe the disk instruction DEFUSR, I have not NEWDOS 80 provides a copy of seen any which explain in any detail all the the original Radio Shack Editor/Assembler changes needed to convert a given modified so that source files can be sav program. ed to or loaded from disk. However, on the The DEFUSR function was Model 3, Apparat chose to drop support described in the August 1983 issue of for cassette tape so that you cannot load MICR0-80. However, a brief recap of its source files from cassette at all. This can use is given here again for completeness. be quite frustrating if you wish to modify Set out below is a list of some of In tape-based Level 2 BASIC the a source file you may only have on tape. the programs published in early issues of entry address of a machine language sub The Source utility in this month's issue will MICR0-80 magazine. Back issues are ro utine is divided into its least and most overcome this problem and save you hav available for $2.50 each or at the annual significant bytes which are POKEd into ing to tape the source code in a second subscription rate for 12 or more copies. locations 16426 and 16527 before the time. Cassette editions are available for all routine is called using the A USR(O) call. issues for $4.00 each whilst DISKS are In disk BASIC the entry address is BMON ON THE MODEl 3 available for all issues FROM defined by DEFUSRn address where A number of readers have en SEPTEMBER 1981 onwards. Fo r 12 or address is decimal or hexadecimal. The quired about using BMON on the Model more magazines with cassette/disks number n in the DEFUSRn statement can 3, without much success. Interestingly, ordered at the same time, the relevant an be 0 to 9 thus allowing up to 10 machine the Adelaide Micro User Group publish nual subscription rate applies. Programs language subroutines to be defined. The ed in their October newsletter some pat for the Hitachi Peak/TRS-80 Colour Com calls to the subroutines are made by ches developed by one To ny Domigan to puter were first published in the April 1982 A USRn(x). More details on DEFUSR make BMON work on the Model 3. His issue. Complete indices to the first three and USR will be found in your DOS item is reproduced here with permission volumes of MICR0-80 magazine are in manual. for the benefit of our readers. cluded in the December 1980, December In the GOLF program there is a Eddy Paay 's BMON will not work 1981 and the August 1983 edition. short machine language subroutine defin on the Model 3 because it uses the Model ed in statements 10 to 60. This routine ISSUE 10-SEPTEMBER 1980* 1's keyboard caller address (03E3H), and actually stores the screen image of the ESCAPEE (L1) jumps to BASIC via 06CCH. Rather than GOLF hole so that it can be restored to THE WORLD (L1) just patch the old caller with 3024H I have the screen later in the program. The CUP '80 (L1) reworked some of Eddy's code to patch machine language statements are stored CUP '80 (L2) the current keyboard caller thus allowing in the dummy string LL$. The address of TRIANGLE (L2) BMON to work in Newdos, Ldos and LL$ is then POKEd in line 60. THE WORLD (L2) TRSdos Disk BASICs as well as Model 3 The machine language ro utine SOLVER (L2) BASIC. Furthermore, all cassette routines works by storing the 1024 screen data LOTTO PREDICTOR (DB) will prompt you for the baud rate to use and the ASCII character will now be values from addresses 15360 to 16383 ISSUE 20-JULY 1982 displayed alongside the hex character in into memorylocations 30720 onwards. In SHARE GRAPH (L1) the edit mode. a 16K machine the locations are above the CHEQUE BOOK DATA FILE (L1) Edit characters (below) enclosed addresses needed for the BASIC program BLOWFLY (L2) in brackets, e.g. (FX) are for the 48K ver so theY_ are in a safe location. However, MILEAGE CALCULATOR (L2) sion only. If you are using a 32K BMON when d1sk BASIC such as DOSPLUS 3.4 CONVERSIONS (L2) then substitute 'BX' and for the 16K ver is used, space up to about 21 K is used STAR SHOOT (L2) sion use '7X'. by disk BASIC and GOLF then stores up BINGO (L2) to about 35K. Thus the machine language GENIUS (L2) 1. (a) Reserve Memory routine uses locations in which BASIC pro DISK INDEX (DISK) (b) Load BMON thru SYSTEM ... gram statements are stored. This will VOLUME 3 NO. 7-JUNE 1982 BMON cause chaos to say the least! The solu UNIT CONVERSIONS (CCIPEACH) (c) In place of answering '/ENTER' tion is to change the ro utine so that it NORMAL DISTRIBUTION (CCIPEACH) substitute ... 164464 (48K), 148090 uses much higher locations in memory. MICRO GRAND PRIX (32K), /3 1696 (16K) The address which must be (L2) PA SSWORD (L2) 2. Edit address FB99/BB99/7B99 and changed in the machine language routine PA SSWORD CHANGE PROGRAM (L2) enter ... CD, C9, 01, 21, 25, (FB), CD, is given by the sequence 0.120 which ap OTHELLO (L2) 1B, 02, 2A, 16, 40, 22, C7, (FB), 21 , pears in line 10 and line 20 DATA LOAN CALCULATION PA CKAGE (L2) C6, (FB), 22, 16, 40, 01 , 18, 1A, C3, statements. In line 10 it is items 14 and AE, 19, CD, C9, 01, CD, 42, 30, C9, L1-Level 1 15 and in line 20 it is items 7 and 8. 0,120 CD, 33, 00, E5, 7E, 2A, 20, 40, C3, L2-Leve/ 2 defines a hex location 7800 (or decimal OC, FC, CD, 24, 30, B7, C8, FE, 02 CC-Colour Computer 30720). My machine has 48K RAM and 3. Edit FB4E/BB4E/7B4E and enter 43 , HP-Hitachi Peach thus addresses up to 65535. I therefore 54, 52, 4C, 3E, 20, 20, 42 decided to place both the machine *Issue incorrectly labelled August. 4. Edit FB60/BB60/7B60 and enter 29, langu_age ro utine itself and the storage The following back issues of OD locations used by the routine above MICR0-80 magazine are still available: 5. Edit address FBFB/BBFB/7BFB and 63000. I used location FA OO (or decimal '79 '80 '81 '82 '83 enter ... �4000) in the routine as a storage loca Jan 21, E8, (FB), CD, 1B, 02, 21, 00, 50, tion. The value FA OO translates into data v v v Feb CD, 60, 00, CD, 42, 30, 18, OC, 77, values 0,250. Thus, to effect the change, v X v Mar 23, 3E, 20, 77, 23, 22, 30, 40, F1 , C9, alter the value 120 in item 15 of line 10 v v v Apr X 00 and item 8 of line 20 to 250. v v May 6. Edit address FD6E/BD6E/7D6E and The routine itself I decided to v v v enter CD, A8, (FB) Jun X loc te at 63500 (F80C in hex). This is v v 7. Edit address F9C1/B9C1/79C1 and 13: Jul ach1eved by replacing lines 30 to 60 of v v v v enter CD, B4, (FB) Aug X the original program by: v v v 8. Select (B)asic and execute the BASIC Sep 30 FOR I= 63500 TO 63529 v v v v line applicable to your BMON version. Oct X X 35 READ LO v v 10 POKE - 2558, 187: POKE - 2557 Nov X 40 POKE /-65536 ,LO v 2�'�8� ' Dec 45 NEXT I v v v 10 POKE -- 18942, 187: POKE 50 DEFUSR = 63500 - means never published - 18941, 187' (32K) The final point to note is the POKE 10 POKE 30209, 187: POKE 3 v means issue available 0210 address in line 40. Because the System X means issue out of print 123' (16K) ' VOLUME 4 No 4 (NOVEMBER/DECEMBER 1983) MICRO-SO PAGE 5 9_ Cassette users enter CTRL-B Model 3 48K cassette based computer: Three column of the same issue). The (shift/down arrow/ B) to enter BMON and My belief, through some experimenta second is to 'hide' the program bet create a system tape of the modified tion, is that the program is in a bad area ween the reserved RAM and the start BMON. of memory, but have found no way to of the BASIC program storage area by BMONStart End Entry make the program work. I would ap moving the latter to a higher memory Addresses preciate it if you could help me out with location. 16K 7210 7EFE 7B99 this problem." If the particular machine 32K B210 BEFE BB99 The memory from 4040H to language program is not relocatable and 48K F210 FEFE FB99 404FH is not a good place to put contains local absolute address Disk users should re-boot DOS machine language programs on the references, then these must all be and transfer the program using the Model 3. Although the Level 2 scratch changed to reflect the program's new 'DUMP' command. pad areas used by the Model 1 and location in memory. If the source code -Adelaide Micro User News, Model 3 are the same, most of the is available then this is best done by October, 1983. reserved RAM area used by the Disk reassembling the program at the new DEFUSR PROBLEM Operating System is quite different. memorylocation by changing the ORG Some programs intended for Parts of the Model 1 DOS reserved statement. If only the object machine Level 2 systems will cause problems RAM is used to implement other code is available, then this can be a long when you try to run them on the Model features in the basic Level 2 mode of and complex task which must be done 3. For example, Andre Marino reports the Model 3 and more low memory is by hand. Fortunately, the DEFUSR pro the following difficulty: reserved for use by the DOS. This gram does not require any such "I am writing about a program means that those machine language changes as it is relocatable. The first you have already published two months programs residing in Model 1 DOS method has the additional disadvantage ago (August, 1983). The program is reserved RAM locations will probably that you must protect high memory OEFUSR. I am having problems in get not work on a Level 2 Model 3. There each time before using the program. ting the program to load. The program are two solutions to this problem. The The second method is more loads for a brief second and then the first involves protecting some high elegant in the case of relocatable screen scrolls up with a continuous flow memory and moving the program to machine language programs and can be of question marks. I have a TRS-80 high memory (suggested in the Fo rm achieved by the following code: 00 100 � DEFUSR for the Model 3 4F,�0 00 110 ORG 4F00H Entry /20224 4F�H� 2AA440 �10 120 START LD HL,<40A4H) Start of BASIC pointer 4F,33 225C41 00 130 LD (4 15CH> ,HL Disk BAS IC e!d t for DEFUSR 4F06 11 194F 00 140 LD DE,DEFPRC The DEFUSR code address 4F09 lA 00150 LOOP LD A, This program will tuck OEFUSR between reserved RAM and the BASIC Be warned, this will destroyany program storage area_ This technique resident BASIC Program so CSAVE the could also be used to place other pro program before you RUN it. grams here with some precautions. The program should be relocatable and must 10 'DEFUSR for the Model 3 not contain a zero within its code (since 20 POKE 16526,0 : POKE 16527,79 • Set USR entry point the particular loop that moves the pro 30 A=20224 •start Address gram code terminates when a zero is 40 FOR I= 0 TO 41 : READ D :POKE A+ I,D : NEXT I encountered - a different loop struc 50 X=USR<0 > ture could be used). If you don't have ,35,183,32,249 an assembler then the following BASIC 60 DATA 42,164,64,34,92,65,17,25,79,26,119,19 program will load the program into 70 DATA 34,1 64,64,205,77,27,195,25,26,207,193,207,213,205,55,35 memory and run it: 80 DATA 229,205,127,10,34,142,64,225,201,0 The object of this article is to ex cassette and disk systems (and all other plain the use of the PEEK, POKE and software compatible computers) with any PIIGIAMIIII USR statements and functions in Level memory size. It is not applicable to Level 2/Model 3 BASIC following a request in 1 BASIC computers since they do not the "Readers' Requests " section in have these statements. Micro-80 Vo l. 3 No. 10 (September 1982). The computer's memory is made AN EXPLANATION OF HOW TO The article assumes no previous up of two main types of memory, which MAKE FULL USE OF THE PEEK, knowledge of the uses of these are Read Only Memory (ROM) and Ran POKE AND USR STATEMENTS statements. dom Access Memory (RAM). ROM is Unless otherwise stated, all infor where the Level 2/Model 3 BASIC inter by Gordon S. Thomas mation contained herewith is equally ap preter is stored. ROM cannot be chang plicable to TRS-80 Models 1 and 3 ed by any software (i.e. written to). VOLUME 4 No. 4 (NOVEMBER/DECEMBER 1983) PAGE 6 MICRO-SO RAM, on the other hand, can be This effectively subtracts 65536 cle provides an example of the use of this changed and it is here that all user pro from the address. facility. grams and data are stored (until the power For X< = 32767 the expression POKE is also used on the model is disconnected). Therefore, to modify the (X> 32767) will be FA LSE, resulting in 0. 3 to set values for a whole range of dif computer's operation in any manner by This will not affect the address in ferent features, e.g. to prevent the top two software requires that the contents of any way. lines of the screen from scrolling, type RAM be changed. The same rules apply for the ad POKE 16916,2 The Z80 microprocessor contain dresses in the POKE statement. or, to set the special characters mode, ed in the computer is capable of inter POKE: If we want to change the contents type acting with 65536 memory locations. of a particular memory location we use the POKE 16420,1 Depending on the computer, anywhere POKE statement. Its syntax is (This saves using PRINT CHR$(22) which between 12K and 14K of these memory POKE address, value can be a nuisance since it is effectively locations are used by the ROM with the e.g. to store a ''1 '' in the top left hand cor only a toggle switch and the programmer rest being used by the RAM. Each one ner of the screen we would type can never be certain which mode is set). of these memory locations is assigned a POKE 15360, 49 Forother useful addresses on the number, called an "address". It is these (49 is the ASCII code for the number "1") Model 3, refer to the Model 3 BASIC addresses which the PEEK function and The POKE statement is useful for Reference Manual, pp. 83-84. the POKE statement re quire in their loading small machine language routines USR: The USR function is used to respective syntax. into memory to be accessed from BASIC. provide an interface between a BASIC pro There are various, different ways It also has many other uses. Some of the gram and a machine language subroutine of referring to these addresses. They can most common are: to be called from the BASIC program. be numbered using the decimal system 1. setting memory size from BASIC Once a machine language subroutine has (which is just our normal everyday coun (addresses 16561 - 16562) been poked into memory (see later) BASIC ting system) or they can be numbered us 2. loading graphics character onto the needs a way to call it. The USR function ing the hexadecimal system, which is what screen caters for this requirement. the computer uses. (This is not strictly (addresses 15360 - 16383) Before BASIC can call a machine correct but is adequate for the purposes 3. disabling the (BREAK) key in Cassette language subroutine, it needs to know of this article). BASIC where the entry point is located in The hexadecimal system uses the (addresses 16396 - 16397) memory, i.e. where to start executing from. digits 0-9 and the letters A-F to designate 4. pointing to a USR routine in Cassette In Cassette BASIC this is achieved by the decimal numbers 0-15 respectively. In BASIC POKEing the address in LSB, MSB for stead of each place in a number being a (addresses 16526 16527) mat into memory locations 16526-16527. power of 10 (as it is in the decimal system) In order to be able to fully utilize For Disk BASIC it is achieved by typing the hexadecimal system has every place the capabilities of the POKE statement it DEFUSRx = address representing a quantity of a power of 16. is necessary to have a basic under where x is a number from 0 to 9 indicating which USR routine is being used (since e.g. 38 (decimal) = (3x101) (8x10°) standing of the terms "least significant + Disk BASIC provides the choice of 10 30 (hex) = (3x 161) (8 x16° ) byte" and "most significant byte". When + possible USR routines). = 56 (dec) we see the number 327 in everyday life 38 (dec) (2 x 161) (6 x160) we all know what it represents, since we e.g. If the entry point is 40000, + For Cassette BASIC, type = 26 (hex) are used to dealing with decimal quan·· tities. The 3 can be thought of as the POKE 16526,64 (LSB) PEEK: If we want to know what value is most significant digit and the 7 can be POKE 16527,156 (MSB) stored in a particular address all we have thought of as the least significant digit. In For Disk BASIC, type to do is type: PRINT PEEK (address) hexadecimal we group two digits together DEFUSRO = 40000 e.g. to find out what is stored in the top and call it a byte. or DEFUSRO = &H9C40 to use USR left hand corner of the screen (address e.g. for 9C40H (40000 decimal) routine 0 15360) we wouid type the most significant byte is 9CH with the The machine language subroutine PRINT PEEK (15360) least significant byte being 40H. The can then be accessed by typing This will return a decimal number decimal equivalents of 9CH and 40H are X = USR (arg) for Cassette BASIC which represents what is contained in ad 156 and 64 respectively. There is an alter and X = USRO (wg) for Disk BASIC dress 15360. Therefore if the top left native way of determining these numbers. (Note: The Disk BASIC call will function hand corner of the screen contains the Note that 156 is actually stating how many correctly without the 0 but it is always letter "B" then the decimal value 66, whole lots of 256 (decimal) that there are safest to include it so you don't forget which is the ASCII code for the letter "B", in 40000, and that 64 is stating how many which routine you're accessing). will be returned. lots of 1 there are left over. The number enclosed by the Any 'ddress in the computer's parentheses, (arg), is an integer argument i.e. 40000 (156 X 256) + (64 X 1) memory can be PEEKed (i.e. from 0 to top Therefore we can arrive at the which can be sent to the machine of RAM). The top of RAM addresses for same numbers using the following language routine. For example, if we had the various memory sizes are as follows: procedure: a routine to scroll a certain number of lines Mem Size Hex Dec up the screen, the argument would be the MSB = /NT (400001256) = 156 16K 7FFF 32767 number of lines that we wanted to scroll. LSB = 40000 - (256 xMSB) 64 32K BFFF 49151 Either of these methods may be The argument sent to the routine may be 48K FFFF 65535 used to determine the LSB and MSB of any integer in the range - 32768 to In order to PEEK any address any address for which they are required. + 32767 inclusive. If the programmer above 32767 it is necessary to subtract Many settings require this exact does not wish to send an argument then 65536 from the address in question. format to be used in order to change the number enclosed by the parentheses e.g. to display the contents of 40000, type them. For example, the memory size is is considered to be a dummy argument PRINT PEEK (-25536) stored in addresses 16561 - 16562 in and is only there to satisfy the syntax re quirements of the USR function. since 40000 - 65536 = - 25536. The the format LSB,MSB. hexadecimal equivalent of 40000 is i.e. 16561 contains the LSB, and The variable assigned to the USR routine (in this case X) will contain the 9C40H since 9C40H = (9x 163) + 16562 contains the MSB. 2 argument sent from the machine language (12 X 16 ) + (4 X 161) + (0 X 160) = This is true in general for all two 40000 where H indicates that it is hexa· byte quantity storers. The first address routine, if any. decimal quantity. contains the LSB and the second address LOADING MACHINE LANGUAGE However, if you type (for Disk contains the MSB. Therefore to set a SUBROUTINES INTO MEMORY: There BASIC only) memorysize of 40000 we would have to are several ways of loading machine PRINT &H9C40 (syntax for 9C40 hex) the type language subroutines into memory. The computer will respond with - 25536, i.e. POKE 16561,64 easiest and the most obvious way is to the computer takes care of the conversion POKE ·16562,156 load it via the SYSTEM mode in a cassette process. This is why many programmers CLEAR xxxx system or via the DOS command LOAD prefer to use hexadecimal when referring where xxxx is the string space required. In a disk system. However, these two to memory addresses - it re quires no ad The CLEAR forces BASIC to methods are only any good if you have an ditional calculations to determine what recognize the new top of memory. This assembled version of the subroutine number to use to designate a particular technique for setting the memory size can stored on disk or tape, whatever the case address. In general, to PEEK any address be used on both cassette and disk may be. in the computer's memory, type systems and saves the operator from hav For other methods of loacing PRINT PEEK (X + 65536 * (X> 32767) ing to enter the memory size at power-up machine language subroutines into For X> 32767 the expression in response to the "Memory Size? " ques memory, I thoroughly recommend a copy (X> 32767) will be TRUE, resulting in - 1. tion. The program included with this arti- of Lewis Rosenfelder's book "BASIC VOLUME 4 No. 4 (NOVEMBER/DECEMBER 1983) MICRO-SO PA GE 7 Fa ster and Better & Other Mysteries'', grammer in the USR call) and then the the 49H ROM ro utine which waits for a which is available from M/CR0-80 for cursor is changed to a non-flashing character to be entered from the $39.95 and is also listed in Ta ndy's RSC-9 program-definable character indicating keyboard, and the 2BH ROM routine Catalogue for $39.95. that no more input will be accepted. which accepts a character from the The method that I will use is the 6. Because it is written in machine keyboard if a key has been pressed. Both one which I consider to be the easiest to language, it cannot be out-typed as can of these ROM routines c.re documented understand and modify for the various so many of the equivalent BASIC in the technical information section of the memory sizes. This method involves routines. Model Ill Reference Manual. I checked POKEing the values into memory byte by 7. It shows the operator how many with the Memory Map for Level l/ in '80 byte from DATA statements. characters may be entered by display Micro - a Wayne Green Publication (Dec. I have included two sample pro ing a number of characters on the 82 pp. 298-311) and found these same grams with this article. The first of these screen corresponding to the maximum ROM routines for the Model /. The other programs provides a substitute for the length of the input. ROM routines referred to are the ones for BASIC INPUT statement. It is superior to 8. 1t will accept all delimiters (e.g. commas) accepting and sending arguments from the statement it replaces in the following without ignoring the characters which and to BASIC. These routines (OA7FH and respects: are entered after them. OA9AH) are documented under the USR 1. The BREAK, CLEAR and all arrow keys In summary this routine effective function in both the Level II and Model 3 except the back arrow are all locked ly gives BASIC a super-powered LINE BASIC Reference Manuals. They are the out. INPUT function. It can be used on both same for both computers. Therefore I 2. The ENTER key will be ignored if the cassette and disk systems, as can the foresee no problems with getting this current length of the input is zero. BASIC program which enters the routine routine to work on either computer. 3. It provides a flashing cursor (for both and demonstrates how to use it in your The source listing as shown has Models 1 and 3). program. been assembled for a 48K computer with 4. The cursor may be changed to any Program Listing 1 is the an origin of FFOOH. However, this should character available in the computer's documented source code for the USR be changed to BFOOH for a 32K com character set with a simple POKE routine to replace the INPUT statement. puter and 7FOOH for a 16K computer. statement. This routine only makes use of four ROM The source code may then be entered in 5. It will only accept a predetermined routines all of which are located in the to a computer via an editor/assembler length of input (specified by the pro- same place on Models 1 and 3. These are such as EDTASM. 00010 ;XXXXXIIXXXXXXXXXXXXXXXIIXXIXXXXXXIXXXXXXXXIXIIIXIIXI .0'.0'02� ;* * .0'0.0'3.0' ;* PROGRAM LISTING 1 * QJQJQJ40 ;* * .0'0050 ;* USR ROUTINE TO REPLACE THE 'INPUT' STATEMENT * 0.0'.0'6.0' ;* * .0'0.0'7� ;* COPYRIGHT FF68 2.0'24 .0'..0'430' JR NZ , KEY ;IF YES THEN GO FF6A 10F3 0'..0'44� DJNZ CURON ;ELSE TRY AGA IN FF6C 0D 0.0'45.0' DEC c ;ONE LESS LOOP FF6D B9 0'.0'46..0' CP c ;ANY LOOPS LEFT? FF6E 2QJEF .0'.0'470 JR NZ , CURON ;IF YES THE GO FF7QJ QJE0'2 0.0'48..0' LD C,2 FF72 QJ65A ..0'0'49..0' LD B, 9.eJ FF74 3688 .0'..0'50.0' CUROFF LD FF7B FEeJQJ .0$3540 CP eJ FF7D 2f:1.0F eJeJ550 JR NZ , KEY ;ETC FF7F 1QJF3 eJeJ56eJ DJNZ CUROFF FF8 1 QJD eJ057eJ DEC c FF82 B9 0.0580 CP c FF83 2QJEF 9eJ590 JR NZ , CUROFF FF85 18D4 0060eJ JR FLASH ;KEEP FLASHING FF87 363C 0$36 10 MAXLEN LD CHLl , 6eJ ;PRINT •<• FF89 D5 eJeJ620 PUSH DE ;SAVE LENGTH INFORMATION FF8A CD4900 eJeJ63eJ CALL KBWAIT ;WAIT FOR CHAR FROM KB FFBD D1 ��640 POP DE ;RETRIEVE LENGTH INFO eJeJ650 FFBE 3242FF .0.066.0 KEY LD 1eJ For those who do not have an 'KXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 20 editor/assembler, Program Listing 2 is the '* * 30 BASIC program which will enter the '* PROGRAM LISTING 2 * 40 routine into memory. This program will '* * 50 work on either a disk system or a cassette '* BASIC PROGRAM TO POKE USR ROUTINE INTO * 60 system with any memory size. The '* MEMORY TO REPLACE THE INPUT STATEMENT * numbers contained in the DATA 70 '* * statements are the decimal equivalents of 80 '* COPYRIGHT CCl 1983 BY G.S.THOMAS * the hexadecimal numbers in the second 90 column on the left of the source listing. '* * VOLUME 4 No. 4 (NOVEMBER/DECEMBER 1983) MICRO-SO PAGE 9 110 • The program operates in the 120 'NOTE : The rout ine wi ll work as is without chan9 in9 any following manner: 130 ' o+ the settin9s . The setti n9s are there purely and It obtains the current tup of 14.@ ' simply for the pro9rammer 's conven ience. memory from the addresses 16561-16562 15� ' and allocates room for itself just below the 160 ' To save memory , al l the REM statements can be removed top of memory. This is done in 256 byte increments so as to make relocating the 170 ' and the smal ler lin es can be compounded to9ether usin9 routine easy. Unfortunately, I could not 189 ' the co 1 on < • : • > • make the routine truly relocatable (I had 190 ' For examp le, see lin e 369 to include two JP instructions which are 299 ' not relocatable) and therefore I had to have 210 DATA24 ,65,205 the BASIC program which POKEd the 220 DATA 127, 19, 69, 14,0, 197,42,32,64,229,54, 136,35, 16,251 ,54,32 routine into memory do the relocating for 239 DATA225 ,209, 122, 187,40, 44, 14,2,6,99,54,143,213,295 ,43,9,299 me. It then resets the top of memory to protect itself and prevent BASIC from stor 240 DATA254,0, 32,36, 16,243 ,13, 185,32,239, 14, 2,6,90, 54, 136,213 ing data up there and writing over the 250 DATA205, 43,0,299 ,254,0, 32, 15, 16,243, 13, 185,32,239,24,212,54 routine. It then proceeds to POKE the data 260 DATA60, 213,295 ,73,0, 2.@9 ,59,66, 255, 62,9, 187,58,66,255 , 40 into memory and once this has been com 279 DATA17,254, 13,49, 49,254,8, 40,31,254 ,24,32,5, 196,38,9, 24, 156 pleted, the routine is ready for use. The 289 DATA 122, 187,4.@, 169,58,66,255,254,32,250, 87 , 255, 254, 123,242 program then sets up the USR routine 29.@ DATA87 ,255, 119,28,35,24, 151 , 122, 187,32,6,54,32,29,43,24 pointers using the addresses 300 DATA141,54, 136,24,248, 122, 147,32,4,54,32,24,6,71,54,32,35 16526-16527 or the DEFUSR statement, 310 DATA16,251 ,75,213, 42,32,64, 17,2,255 , 6,9,237, 176,209 ,38 whichever is applicable. 329 DATA9, 197, 195, 154, 1 0 To access the routine from BASIC, insert a line of the following form in your 330 TM=PEEK <16561 l +PEEK <16562> *256 'Get Top of Memory program: 349 N2= INT imum memory address accessible by back on it (whether positive or negative) enhancements were added by Bruce BASIC i.e. the memory size). The variable so that I will know whether I have covered Hansen. This first effort evolved into what NT contains the MSB of the memory size the requested material adequately. became known as ''The Adventure and it is this value which is POKEd into 58 Wa rnbro Beach Road, System''. the MSB location. On completion of these SAFETY BAY, W.A. 6169 Current versions of "The Adven three POKEs, the variable /$ will contain I will be happy to try and answer ture System" have been fully implemented the input entered by the operatorand may any queries that readers may have. Please in machine language by Bruce Hansen be processed in the same manner as any include a self-addressed stamped and are, so far, fully compatible with the standard string variable (because that's all envelope. Scott Adams effort. "The Adventure it is). To process numeric data, the VA L System'' is available to anyone who cares function of BASIC can be used. to send The Alternative Source enough e.g. if $1 "23" then PRINT VA L(/$) will money to buy it. return the number 23 as distinct from the I mentioned that this system re string "23". THE quires you to learn a new language. What The routine should be POKEd in· follows is a discussion of the language and to memory very early on in your program h0w it is used to create an Adventure since it adjusts the memory size and which looks just like a Scott Adams' clears all variables on initialization. It only ADVEIITIRE original. uses about 250 bytes of top memory and ''The Adventure System'' requires once it has been entered into memory the you to specify the following details when data lines can be deleted if memory is entering your data: precious. (a) Objects. In order to be able to make use of SYSTEM (b) Messages. the many features of the routine, it is ad (c) Rooms. vantageous to set up a variable just after A SOFTWARE REVIEW (d) Vo cabulary. the initialization sequence as follows: (e) Actions. by Ed Grigonis MS = NT * 256 (f) Header information. Once this has been done POKE ing different numbers into the following ad OBJECTS dresses allows you to change the settings Those of you who have ever con Each object specified in the data of the routine: sidered writing an Adventure would know must contain three parameters: object SETTING ADDRESS DEFAULT that there are a number of ways of achiev number, starting location and object Character to be displayed in· ing this objective. These various methods description. dicating length of input MS+ 79, may be summarised as follows:-- The object number is specified by MS + 203 136 (a) Dig into an existing Adventure the Adventure Editor when you first enter Cursor character (when "on") MS +96 143 and change the existing data. The major the information. The first object will always Cursor character (when "off") MS + 117 32 flaw with this method is that you are be numbered 0 (zero) and the last object Character to be displayed in· restricted to the original Adventure format. will always be numbered one less than the dicating end of input MS + 136 60 (b) Write a BASIC Adventure. This total number of objects. Cursor flashing speed...;'on" is OK but you will find that memory limita The starting location is the number �cy �+� 00 tions (particularly in a 16K computer) will of the room in which the object will be _:·off" delay MS + 115 90 prove frustratingly restrictive. The process placed at the beginning of the Adventure, All settings listed here require in of actually coding the Adventure will also i.e. if you specify 3 then the object would teger values in the ra nge 0-255. In the detract from the task in hand. initially be located in Room 3. case of characters to be displayed, ensure (c) Use the Adventure Generator The object description tells you that the number you choose has a included in "The Captain 80 Book of what the object actually is, whether it can character corresponding to it which is Basic Adventures'' to get rid of the be manipulated and whether or noi it is displayable by your computer. Where two drudgery. This is OK as well, but you may a treasure. addresses are listed, this means that both still be hampered by memory limitations. Consider the following three addresses must be changed for the (d) Learn machine language. If you objects: feature to function properly. want the latest fantastic graphics Adven 0: 3 Pile of rocks There are two states in which the ture then this is the way to go. Be 1: 5 Large rock/ROCK/ cursor can be. It can either be "on" (like prepared to devote a lot of time to the 2: 4 *SPARKLING DIAMOND*IDIAMI it is for the length of time that you can task! Object number zero will be found see it while it is flashing) or it can be ''off''. If, on the other hand, your only ob when the adventurer goes into Room 3 If these staleS change at regular time in jective is to write a great Adventure and with the above description displayed by tervals (e.g. every half a second) the ef you aren't particularly interested in the Adventure Driver. The object cannot fect of a tlashing cursor is created. This graphics then you can always take the be manipulated. is what is meant by the cursor being "on" easy way out. This will still involve learn Object number one will be found and "off". We usually associate a flashing ing a new computer language but the ef in Room 5. The provision of the short cursor with a CHR$(143) graphics block fort required is minimal when stacked up description between slashes tells the blinking on and off. In this case, the "on" against the alternatives. Adventure Driver that this object may be character is CHR$(143), the graphics What I am talking about is the manipulated, i.e. picked up, thrown. block, and the "off" character is a Adventure Language as contained in ''The whatever. CHR$(32), a blank. This routine allows you Adventure System'' from the Alternative Object number two will be found to define what the cursor's "on" and "off" Source. in Room 4. This object can be characters are and by POKEing values into First, a bit of history. Hands up all manipulated. The leading asterisk in the the specified addresses you can change those who think Scott Adams actually sat object description tells the Adventure these characters to what every you like. down and wrote a completely new Driver that this object is a Tr'easure. Ob By POKEing different values into machine language program for each of his ject two would be taken into account for the addresses specified above for the Adventures? Sorry, folks! 'Taint so!!! What scoring purposes if you placed it in the "on" and "off" delay, you can increase or he actually did do, very early on, was to Tr'easure Room. decrease the flashing speed of the cur sit down and write himself an Adventure As you can see, there is nothing sor according to your re quirements. To Editor in machine language. Most of his difficult about specifying objects. see which values are currently set, all you Adventures were actually written by Object number 13 is reserved for have to do is PEEK the addresses cor feeding data into this program and letting the artificial light source, viz. lamp, mat responding to the feature about which it do all the hack work. I suspect that ches, etc. your require information and this will tell similar methods were used to get his you the value of the setting. Always Adventures onto other computers. MESSAGES remember that just because you have a Unfortunately, the Adventure Editor Specifying messages is even machine language routine stored up there used by Scott Adams has never been simpler than objects. The Adventure Editor in protected memory, that doesn't mean available via the commercial market. Into will specify suitable numbers when you that you cannot modify its operation to suit the picture stepped Allan Moluf, well first enter the messages. Message 0 is your own ends by using the POKE known author of programs for the TRS-80, reserved so your messages will always statement. and Bruce Hansen, author of "Tasmon". start at number one. In conclusion, I hope that this ar Allan Moluf produced a BASIC Adventure A sample message would appear ticle has fulfilled the needs of those peo Editor as well as a companion BASIC as follows: ple who requested it, and since this is my Driver program to use the generated data 1: There is a fly in my soup. first article, I would appreciate any feed- base. Subsequent machine language This message would be printed VOLUME 4 No 4 (NOVEMBER/DECEMBER 1983) MICRO-SO PA GE 11 whenever the driver was required to print a good idea to liberally comment source DAY Clears the light/darkness flag. message number one. code. SETZ PA R 4 would cause bit flag The verb and noun entered by the number 4 to be set. ROOMS adventurer are used to determine which X- > RMO The parameters required when conditions and commands will be acted PA R 5 would cause object 5 to entering Room details into the Editor are on. For example, if the adventurer were be moved to Room zero. Room Number (given by the Editor), to enter ''CLIMB TREE'', the Driver would CLRZ PA R 4 would cause bit flag allowable directions and Room only consider those Action entries with number 4 to be cleared. description. the verb, noun combination of "CLIMB DEAD Clears the light/darkness flag, When entering Room details the TREE". Of course, if "CYPRESS " had moves the player to the last Editor will ask for six Room numbers cor been defined as a synonym of ''TREE'', Room and tells him he is dead. responding with Rooms which may be then "CLIMB CYPRESS " would also be X- > Y PA R 5 PA R 22 would cause ob- entered from the current Room. These acceptable in the example given. ject number 5 to be moved to numbers will also correspond with the The "conditions" of an Action en Room number 22. directions North, South, East, West, Up try provide a list of test which must be FIN/ Indicate that the game is over and Down. passed in order for the "commands" of and enquire about a replay. The Room description determines the Action entry to be carried out. The DSPRM Display current room if it is light what the Driver will print when you are in "commands" of the Action entryare only or the artificial light source is pre a particular Room. carried out if all the "conditions" are met. sent, else display "It's too dark Consider the following two Room Before describing a few Action en to see". descriptions: tries I will discuss the available ''condi SCORE Display number of treasures in 1: 0 5 23 0 0 0 large crate tions'' and ''commands''. the rreasure Room and the 2: 0 0 0 12 6 0 *I'm outside the shop CONDITIONS percentage of treasures stored. Room number one leads into PA R This condition always passes and INV List inventory. Rooms 5 and 23 by going South and East is used to pass a parameter on SETO Set bit flag zero. respectively. The Driver would show South to a commend. The analogy with CLRO Clear big flag zero. and East as obvious when you are in FILL BASIC is the 'DATA' statement. Refill the artificial light source. Room 1. The actual Room description HAS This conditions passes if the CLS Has no effect but was included would be preceded by the phrase "You're adventurer is carrying the object to maintain compatibilitywith the in a". referred to, i.e. HAS 15. original BASIC system. Room number two leads into INIW passes if the adventurer is in the SAVE Save the game to disk or tape Rooms 12 and 6 by going West and Up same Room as the numbered depending on the version. respectively. The leading asterisk in the object, i.e. INIW 15. EXX ,X PA R 5 PA R 15 wo1 ·'1 cause the description prevents the default phrase AVL passes if the adventurer is in the location of object number 5 to be being printed. same Room as the object or is swapped with the location of the It is importa nt to note that the carrying the object. object number 15. allowable directions can be overridden by IN passes if the adventurer is in the CONT Allows continuation of an Action allowing the adventurer to move to another numbered Room, i.e. IN 5. entry. room by specifying a suitable command, -INIW passes if the numbered object is AGETX PA R 5 would enable object i.e. GO SHED. either held by the player or is in number 5 to be obtained even if If the adventurer moves in an illegal another ROOM, i.e. -INIW 15 the carry limit has been direction when a light source is available, -HAVE passes if the player is not carry exceeded. he will receive the message "/ can't go ing the numbered object. BYX- >X in that direction". If he moves in an illegal -IN passes if the player is not in the PA R 5 PA R 15 would cause ob direction in the dark, he will be killed. numbered Room. ject number 5 to be placed in the The last Room is reserved for a BIT passes if the numbered bit flag same Room as object number "Limbo" state when the person has been is set. 15. killed, and may or may not have exits into -BIT passes if the numbered bit flag CT-1 Subtract one from the counter other rooms. is cleared. value. ANY passes if any objects are being DSPCT Display current value of the VOCABULARY carried. counter. The vocabulary details all verbs -ANY passes if no objects are being CT< -N and nouns which may be used in the carried. PA R 100 would set the counter Adventure. -AVL passes if the numbered object is to a value of 100. Predefined Ve rbs are as follows: in any other Room. EXRMO Exchange the current Room 0 AUTO -RMO passes if the numbered object is number with the Room number 1 GO not in �oom zero. held in Alternate Room Register 10 GET RMO passes if the numbered object is zero. 18 DROP in Room zero. EXM,CT PA R 5 would cause the value of Predefined Nouns are: CT < = passes if the counter is less than the current counter to be ex 0 ANY or equal to the number specified. changed with counter number 5. 1 NORTH ORIG passes if the numbered object is CT + PA R 60 would add 60 to the cur 2 SOUTH in the same room it started in. rent counter. 3 EAST -ORIG passes if the numbered object is CT- N PA R 10 would subtract 10 from 4 WEST not in the same Room it started the current counter. 5 UP in. SAYW Display the noun (second word) 6 DOWN CT = passes if the counter is equal to input by the player. Primary vocabulary words may the number specified. SAYCR Start a new line on the display. have as many synonyms as required but (Any numbers input with a condition must EXC,CR PA R 2 would cause the current these must follow the relevant primary be in the range 0-1600) Room number to be swapped for word and must each be preceded by an the Room number currently held asterisk, i.e. COMMANDS in Alternate Room Register 7 DOG 0 This is a "null" command. number 2. 8 *HOUND 1-99 Display messages 1-99. DELAY Pausefor about 1 second before 9 *BASSET GETX If this followed a PA R 5, then ob going on to next command. ject number 5 would be picked ACTIONS up. EXAMPLES Actions are the heart of an Adven DROPX If this followed a PA R 5, then ob To discuss all of the possibilities ture and are where newcomers to ''The ject number 5 would be dropped. inherent in the above would take a year's Adventure System" will have the most GOTOY If PA R 22 was specified, the issues of this magazine so I will just give difficulty. player would be moved to Room a few examples from the Manual. Action entries contain the follow 22. 0: AUTO 100 BIT 1 PA R 1 0 0 0 ing information: X-RMO PA R 5 would cause object 5 to MSG 1 SETZ INTRO Ve rb, Noun, Conditions, Commands and be moved to Room zero. The 0: shows that this is Action 0. Action Titles. NIGHT Sets the light/darkness bit flag AUTO 100 causes this action to be con Action Titles simply document the (15). If the artificial light source sidered all of the time. When the Adven function of a particular entry. They act as is unavailable the Room will be ture is started, all bit flags are clear. In this comments and may be omitted, although dark and no Room description case BIT 1 would therefore be true. as with any programming language, it is will be given. PA R 1 passes the parameter 1 to the PAGE 12 MICRO-SO VOLUME 4 No. 4 (NOVEMBER/DECEMBER 1983) commands. The O's indicate that there are (8) Maximum length of Action titles is 20 no more conditions to be met. MSG 1 characters. causes Message Number 1 to be printed. To give you a comparison, the SETZ obtains the parameter of 1 from the following are the maximums from the PA R 1 condition and therefore sets bit flag Scott Adams Adventures: number 1. Unless bit flag number 1 is 270 Action entries. cleared at a later stage by a different com 80 Vo cabulary words. mand, this is the last time this command 100 Objects. will be executed. The d�shes indicate that there are no more commands in the Ac WHEREDAYAGEDDIT??? tion entry. INTRO is simply a comment. 11: GET KEY IN/\N 12 PA R 12 As far as I am aware, ''The Adven 0 0 0 GET MSG 5 ture System'' is only available from The If the player were to enter "GET Alternate Source, 704 N. Pennsylvania, KEY" this Action entry would be con LANSING, MI. 48906 U.S.A. The cost of sidered. If the player is in the same Room the program is $US49.95 plus postage. as the key (IN/\N 12) the parameter of 12 If you write to them to ask about the cost (COLOUR COMPUTER) (presumably the object number of the key) of airmail, make sure you enclose some would be passed to the GETX command international reply coupons. by Charlie Bartlett which would cause the player to pick up the key. Message 5 would then be printed. WA DDAYAGET??? Note that if the player was already carry Before I tell you what you get, I ing the key he would automatically get the should point out that you will need to have It never ceases to amaze me how message "I'm already carrying it". 48K of RAM available. There are versions, computers are getting smaller all the time. 14: GO DOOR IN 2 PA R 3 0 0 0 however, for both disk and tape. When the Model 1 TRS-80 came out, it GOTOY MSG 5 If you order the tape version you was thought to be incredible that a com If the player was to enter "GO will get two programs. ADVEDT - the ac puter was actually crammed underneath DOOR" then, provided he was currently tual Adventure Editor and ADVTT which the keyboard. Now we have the TRS-80 in Room 2, the parameter of 3 would be will enable you to create a SYSTEM tape MC-10 upon us and it makes the Model passed to the GOTOY command and the from any Adventure data base you create: 1 TRS-80 look like an Elephant or maybe player would be moved to Room number The disk version also includes ADV which a Dinosaur would be more appropriate 3. Message number 5 would be printed. consindering that the Model 1 is out of is a disk based Adventure driver. ADVEDT These are only three examples. in both versions contains ADV so when production. However, by studying these examples and you are writing Adventures you can jump The MC-10 is 2 inches high, 8Y2 also the conditions and commands sum back and forth between the Editor and inches long and 7 inches wide, (51 mm x marised earlier, you will see that the scope Driver. 216mm x 178mm), and weighs in at 29% provided within "The Adventure System" Each version also includes a short ozs (836.32 grams). The Microprocessor is indeed comprehensive. Adventure which is fully explained in the is an 6803 and is not fussy about spaces documentation as well as two full length around keywords as is the 6809E in the HEADERS Adventures. Colour Computer, which is just as well The best way to explain the header The documentation is supplied in considering the 3142 bytes of memory is to give an example from the manual. a sturdy black vinyl binder. The original available in the MC-10. I was quite surpris Adventure Z Ve rsion 1.01 14500 manual was somewhat hard to follow in ed at the number of commands that such bytes free parts. However, there is now a much more a small machine supports, in fact it has Bytes under 16K = 7523 detailed manual which just about ranks NEARLY as many commands as the unex #OBJ #ACT #VOC #RM alongside Bruce Hansen's excellent tended Basic in the Colour Computer. 14 41 22 8 "TASMON" documentation for ease of After some digging around in the memory MAX BEG #TR WLEN use and clarity. I also found some commands that it sup 5 1 1 4 ports that are NOT in the manual, more TIME #MSG TR-RM on this in a minute. Listed below are com 999 16 7 WHAT? IS THERE MORE? mands that are available, (as listed in the The name of the Adventure is Also included is Issue No. 1 of the manual). "Adventure Z" and the version number is Auggies newsletter ·�ugment". If you buy ASS Computes absolute value. 1.01. There are currently 14,500 bytes "The Adventure System" you are entitled ASC Returns ASCII code of first free, although for any particular Adventure to join the Auggies (Adventure User character of string. this would uepend on your computer's Group). For$US 12.00 per year (extra for CHR$ Returns character for ASCII or configuration and the presence of any airmail) you receive the ·�ugment" graphics code. high memory drivers. There would be quarterly which includes at least one CLEAR Reserves bytes of string 7523 bytes free if this Adventure was Adventure. Yo u are eligible to market your storage. entered as a SYSTEM tape in a 16K com Adventures through The Alternate Source, CLOAD Loads Basic program from puter. There are 14 objects and 41 ac provided they are suitable, and thereby cassette. tions. There are 22 verbs and 22 nouns derive royalties. Yo u can also purchase any CLOAD* Loads numberic data into an ar (although one might be less). There are Adventures created with ''The Adventure ray from cassette. 8 Rooms. The adventurer can carry a System" at a discount. CLS(x) Clears display to specified col maximum of 5 objects. The adventurer will The Alternate Source also have the our "x". begin in Room number 1. There is only following Adventure utilities available for CONT Continues program execution if one treasure. The number of significant purchase. ADVTAPE is similar to ADVTT BREAK has been pressed. letters in nouns and verbs is four. The time and will create a SYSTEM tape from a disk cos Returns cosine. limit is 999 moves. There are 16 data base. This avoids having to save the CSAVE Saves a Basic program to tape. messages. The treasure room is Room data base to tape first. ADVCOPY will take CSAVE * Save contents of a numeric ar number 7. the Adventure off a protected Scott ray to cassette; All of this information is entered Adams Adventure disk and place it on an DATA Stores data in your program . when you commence compiling the unprotected disk. ADVDUMP will read in DIM Dimensions an array. Adventure. a tape Adventure and dump the data base END Ends program. to disk. Yo u have to be an Auggie to get EXP Returns natural exponential ADVEDT LIMITATIONS these utilities. I Exponentiation character. The following limitations (if you can I could quite easily go for a lot FOR : Creates call them that) are imposed on the data longer. There is so much that I haven't TO :aloop entered into the ADVEDT program: even touched on. NEXT : in a program. (1) Maximum of 500 Action entries. To summarise, if you like playing STEP : with step to increment. (2) Maximum of 150 vocabulary entries Adventures or if you are at all interested GOSUB Sends computer to subroutine. (150 verbs and 150 nouns). in writing Adventures, then you should GOTO Sends computer to a line. (3) Maximum of 100 rooms. definitely buy "The Adventure System". IFffHEN Te st a relationship. (4) Maximum of 99 messages. Yo u won't regret it! INKEY$ Strobes the keyboard and (5) Maximum of 250 objects. returns the key being pressed. (6) Maximum characters in description of INPUT Computer waits for input from object, room or message is 255. the keyboard. (7) Maximum word length of vocabulary INT Converts a number to an words is 7 characters. integer. VOLUME 4 No 4 (NOVEMBER/DECEMBER 1983) MICRO-SO PAGE 13 LEFT$ Returns left portion of string. is the case it would seem that Ta ndy have the pin connections are the same. It also LEN Returns the number of been very crafty, you can load a machine has an RS232 DIN socket, this also has characters in a string. language tape but you cannot save one. the same pin configuration as the Colour LET Assigns value to variable Now you ask, if that is the case how did Computer. (optional). I determine that CLOADM works, since To sum up, it is a very nice little LIST Lists program lines on screen. there are no machine language programs machine at a reasonable price, the only LUST Lists program lines to printer. for the MC-10 at this time. thing lacking at the moment seems to be LOG Returns natural logarithm. We ll for a start CLOADM does not the software. LPRINT Prints an item on the printer: return a syntax error, it switches on the MEM Returns the amount of free cassette, clears the screen and prints an memory. "S" at the top of the screen indicating MID$ Returns a substring of another that it is searching. If a BASIC program is IIPIT/IUTPIT string. encountered it returns an FM error (file NEW Erases memory contents. mode). If a machine language tape from FROM: R.J. Mclean-Formartin, Old. ON x GOSUB the Colour Computer is encountered it I own a System-80 on which I am Multi-way branch to specified happily loads in the file name and only fails using a Ta ndy green screen monitor. At subroutines. with an 110 error when the 6809E code times the display shivers and this makes ON x GOTO is encountered. Which leads me to believe it difficult to read. However, if a key is Multi-way branch to specified that given a MC-10 machine language file, pressed (a character entered), or the lines. it would load. NEWLINE key is depressed the shivering PEEK Returns contents of a memory What use are VA RPTR, EXEC and stops. Wo uld you have any idea of a solu location. USR, well even if you cannot save a pure tion to this problem? POKE Puts value into specified RAM machine language program, there is no (It sounds like you have an inter location. reason why you could not have a BASIC mittent fault of some sort and you should POINT Te sts whether a graphic cell is program with machine language poked in refer the problem to a qualified technician on or off. to the lines with the help of VA RPTR or for repair. - Ed.) PRINT Prints to screen, abbreviation of you could have your machine language in FROM: Mr. G. Whitcher--Yunderup, W.A. ? is available. DATA statements and poke this into It would be helpful if programs that TA B Moves cursor to specified memory and then EXEC to execute. use USR calls were printed with the column. Video Memory is from 16384 to necessary information to convert from PRINT @Print at specified location. 16895, other addresses also work in Level 2 BASIC to Disk BASIC for those READ Reads the next item in a DATA tandem, the reason for this is not of us who are too mean to buy the Disk line. understood. Some keyboard addresses subscription for the sake a few pro REM Remark. are in the region of 16940 and up, for ex <.... grams which may be of interest. I only RESET Erase dot that was SET. ample the address 16952 is used by the RESTORE subscribe to the casette subscription for space bar and returns a value of 247 the ease and not having to type the pro Resets DATA pointer: when the space bar is pressed, if you grams that interest me. RETURN Returns computer from a write a program where you want (Your point is well taken and we subroutine. something to happen - FOR AS LONG RIGHT$ Returns right portion of string. would like to include the information need AS the key is held instead of IF the key ed to modify Level 2 programs with USR RND Return pseudo random number. is pressed then you can read this memory RUN Executive a program. routines so that they will work with Disk location for the value and if the value is BASIC but we do not have the time to SET Sets a dot at a specified loca found poke zero into it so that on the next tion to a specified colour. dissect machine language routines that pass, if the key is still held down it will are only provided in object format or the SGN Return sign of specified return the original value and if not it will number. BASIC equivalent. If the program author return zero, this procedure applies to the would supply commented assembly SKIPF Skips to end of next program other memory locations in this area. language source code for the USR on cassette. Blindly poking into various memory routine, we would be happy to publish that SIN Returns sine. locations brought interesting responses along with the program listing and any SOUND Sound specified tone for that would seem to indicate that with relevant suggestions for disk users. specified duration. some detailed information higher resolu RECALL on the disk version of STOP Stops execution of program. tion graphics might be possible. Tr y pok SOFTPAK is intended to overcome this STR$ Converts a number to a string. ing location 20 (decimal) with different difficulty in most cases by running the SQR Returns the square root of a values to see what I mean, (it locks the Level 2 program in the Level 2 environ number. machine up though and you will have to ment. However, there are those cases TA N Returns tangent. press the reset button). where modifying the program for disk VA L Converts a string to a number: Having a Colour Computer here, I BASIC is the preferred solution.-Ed.) Quite a powerful Basic for its size thought I could save some typing time by isn't it, the following command are not loading a Colour Computer Basic program, FROM: Mr. J. Linton-Malabar, N.S.W. listed in the manual or anywhere else for I thought I was on to a good thing for a As the SYSTEM 80 is going out that matter. while since the Colour Computer and the of production, is there an alternative �x VA RPIR This command has the normal MC-10 will both load each other's tapes. pansion system to allow update to d1sk syntax of A= VA RPTR (B$) and However, unfortunately different values are drive or do I have to buy a SYSTEM 80 it works, so I don't know why used for the keywords in both machines expansion unit before they go out of it was not mentioned. so what is loaded in has the same line production? USR This command is supported by numbers but all of the keywords are swap (By now you will probably know the Basic interpreter though at ped around, pity!! the answer to this question as it is the moment it is not much use The MC-10 has a DIN socket for discussed in the Editorial. Briefly, until some technical information a cassette, no cassette cable is supplied. MICR0-80 will have expansion inter becomes available to find out but if you have a Model 1 or a Colour faces for the System 80 available about where to poke the entry points. Computer you can use the same cable as the end of Fe bruary, 1984. - Ed .) EXEC This command also has the normal syntax of EXEC addr where ''addr'' is the entry point of a machine language program "Australia II " broke the longest winning or subroutine. streak in sporting history by defeating the CLOADM This command will load a SOFTIAIE American yacht 'Liberty ' four wins to machine language program in three. Every Australian can now relive that to memory and has the syntax day (or should I say, early morning!) by of CLOADM ''filespec'' or playing the Australia's Cup game!!! Up to CLOADM ''filespec'', addr six people can play and place bets on the where "addr'' is the position in outcome of the ra ces. Complete instruc memory that the routine is to AUSTRALIA'S CUP tions on how to play are included in the be loaded to. -L2/1 6K program. As far as I could determine the command CSAVEM is NOT supported, by Carl Cranstone HOW TO GET THE PROGRAM (that is unless it has a very different syn Australia recently won the RUNNING(?) tax from normal), I tried several variations America's Cup which the Americans had To get the program 'Australia's Cup' on the syntax and nothing worked. If that held for 132 years. The Australian yacht running, those of you who are entering the PAGE VOLUME No. (NOVEMBER/DECEMBER 1983) 14 MICRO-SO 4 4 program from the magazine will have to gram when AUSCUPIDAT and AUSCUPI e(X)it follow my instructions below to the letter LST have been merged into one program. : Returns you to COM (or at least to the word!). There are three MAND MODE programs that I have written for this game. GRAFX The first AUSCUP/LST is the Australia's L2/32K Disk HUGE LETTERS MODE: Cup program in its raw form (i.e. it con Enables HUGE letters to be tains no graphics). The second is by Bob Wilson entered for titles. AUSCUPIDAT which is a program that Screen capacity is 80 characters creates the program lines that contain the WHAT IS GRAFX? and the Character Set available is: graphics. The third is AUSCUPILNW GRAFX is a tool for use in ABCDEFGHIJKLMNOPQRSTUVWXYZ which is an LNWBASIC Programto enable generating bold titles or graphics for in 123456789!?;:,. LNW-80 owners to see Australia's Cup in corporation in programs. colour. Once you have designed your NOTES titles or graphics, GRAFX will write a Input always starts at the top left of the screen. 1. AUSCUP/DAT BASIC program to reproduce them. If you reach the bottom of the This program reads in the data for screen, the top line will be scrolled off the the graphics and POKEs it into memory INITIAL SET-UP screen and lost. - creating assembled strings. (Exactly If you are typing this program in The screen will be cleared on the same as those created by Charlie from the magazine, you must first type in entering this mode. Enter HUGE LET Bartlett's Graphic Assembler program the /NIT program and run it. The /NIT Pro TERS BEFORE entering GRAPHICS. issue 5 April 1980). gram creates a disk file called BIGLTRS. To exit this mode enter SHIFT/ ***STEP ONE: Ty pe in the AUSCUP/DAT This file gives GRAFX the ability to pro BACKSPACE. program and RUN it duce the big letters. GRAFX will require SAVE and RECALL MODES: ***STEP TWO : delete lines 1 & 2 the B/GLTRS file to be on disk before it On selecting either of these ***type LIST- you should see some will run; once the /NIT program has been modes you will be asked for screen thing resembling a garbaged program. run you will not need it again. If you are a number. Don't worry! This garbage is really a disk subscriber you will not need to run The screen contents (15 lines) will assembled strings. /NIT as the BIGLTRS file is already on your be SAVED to, or RECALLED from , the ***SAVE or CSAVE the strings disk. The /NIT program is also on the disk screen memory you select and you will be immediately!!! in case you should want to use it. Make sure you have plenty of free returned to command mode. disk space for the programs that GRAFX 2. AUSCUP/LST will write for you. Better still, prepare a PROGRAM MODE This is the program which uses the disk containing only your operating Yo u will be asked for one letter to strings. system, GRAFXand B/GLTRS and initialize be included in the FILESPEC. Yo ur letter ***STEP THREE: LOAD OR CLOAD the your AUTO command as BASIC will appear as the 'x' in the followiing strings and type in this program around RUN"GRAFX". filespec: the strings. Yo u will notice that lines 1350 If you use NEWDOS 80 Ve r 2 as T/TLEx/GFX and 1560 in this program are reserved for your DOS you can run the program as it A BASIC program will be written to the strings. is. If you use another DOS, you will need reproduce the current screen constants, ***STEP FO UR: When you have typed to delete the last statement from line 80 and will be dumped to disk in ASCII in the program around the strings SAVE of the program. The statement to delete is format. or CSAVE it immediately (This program will CMD"F" DELETE 10-70 The program created will contain now be known as AUSCUPIBAS). Y�ur Disk is now ready to run 4 lines which will create and print a series WA RNING: BE VERY CAREFUL THAT GRAFX on power-up or RESET. of strings from data contained in the YO U DO NOT ACCIDENTALLY ERASE A subsequent lines. LINE WITH AN ASSEMBLED STRING IN USING GRAFX The END command terminates the IT OR EDIT IT. THIS CAN RUIN ALL OF Power-up or RESET with your running of GRAFX. YO UR HARD WORK!!! GRAFX Disk in Drive 0. ***STEP FIVE: LOA D or CLOAD the pro GRAFX will grab as much of your gram in and RUN it. The first thing you memory as possible for use in string SOURCE UTILITY should see is a large map of Australia. Yo u manipulation when it writes programs. It Model 3 Disk must press ENTER to continue into the will do this calculation for itself. The pro game. If you don't, the game will go into gram writing operation will take longer on by T. Domigan Demo Mode. To start the game you must a 32K '80 than on a larger machine, press ENTf ·1 from the map. If you press because the string area management SOURCE/BAS is a program to ENTER from the Demo Mode, you will functions (when string space becomes transfer EDTASM source files between return to the map. full) will operate more often. tape and disk for Model 3 users of Fifteen lines of your screen will be NEWDOS80 V2.0. 3. AUSCUP/LNW available for you to use in designing your APPARAT discontinued support for This is for the benefit of LNW-80 titles or graphics. The bottom line is us Ta pe 110 in EDTASM for the Model 3 as owners who want to see Australia's Cup ed tor prompting you and to advise you they were concerned with the unreliabili in colour. of the current mode of operation. ty of tape. Whilst object code can be mov· ***STEP SIX: Ty pe in the AUSCUPILNW After the initialization routine, the ed between tape and disk with LMOFF program and RUN it. program will display the COMMAND SET, source files cannot. SOURCE/BAS ***STEP SEVEN: Press Break and then MODE prompt line on the screen. fills this gap and also allows the copying type in the following line: of source tapes. FLS:SAVE''AUSCUP/G RF:d'': GRAFX COMMANDS To use SOURCE/BAS enter the PLOAD' 'AUSCUP/GRF:d" In COMMAND MODE the prompt command "BASIC IV" from DOS. This where :d is drive number. line displayed is: special command is necessary as a non This will fill the screen enabling (C)/ear (G)rafx (H)uge (S)/ave (R)ecall standard logical record length is used to you to see the colour. The /G RF file will (P)rogram (E)nd get the coc!e from disk. Once you have be saved and reloaded again so that you The appropriate letter entered BASIC, "RUN " the program. can verify that you have a good save. (C G H S R P or E) will select the various The machine language section For those who don't want colour, functions: resides in the bootstrap stack area and you will have to delete the following GRAFX mode therefore does not require memory size statements from the program: In GRAFX MODE you have several to be set. However, memory is protected Line 10 'OUT254,0:' options available: by the program in line 20, from 8000H to Line 140 'OUT254, 116:' (C)ursor Mode FOOOH for the storage of up to 26K of Line 530 'OUT254,0:' : Use the arrow keys to text. Line 630 'OUT254,0:' move the cursor This program is fully-menu driven A typical chain file to load in the (D)raw Mode and is self-explanatory. colour would be as follows: : Use arrows to draw lines Ta pe 110 can be made at high or (Newdos80 2.0 users use (E)rase Mode low speed as desired. Disk 110 will tend CHAINBLDIBAS) : Use arrows to erase lines to be slow so have patience with large LNWBASIC PLOAD' 'ASUCUP/GRF'' (T)ext Mode files. CMD"S = BASIC" : Enables text to be Always exit the program via menu RUN' 'AUSCUP/BAS '' entered starting at the cur option 6 as this ensures that the disk file NOTE: AUSCUPIBAS is the resulting pro- rent cursor position is closed and BASIC is correctly restored. VOLUME 4 No. 4 (NOVEMBER/DECEMBER 1983) MICRO-SO PAGE 15 LVA R it can ALL be loaded with one (C)LOAD, 4. EXEC the machine code program. This L2/32K as if the machine code where not there! places it behind the BASIC program This program is fully compatible and the WHOLE program can now be by Tim Fish with disk systems and 16K or 32K of (C)SAVE 'd like a normal BASIC memory. With it, you can use the PRINT@ Program. This is an extremely useful debug command as you would on the text screen 5. RUN you new creation - I hope it ging tool for BASIC programs. The pro normally if the graphics screen is PMODE works!! gram resides at the top of memory but, 4. on first being run, it initialises the DOS exit Yo u can also use it with any start for the Disk BASIC verb NAME to a jump page, and there are some interesting ef instruction to its own start address. Ty pe fects in the coarser PMODE's - how THE KILLER SATELLITE about video titles using PMODEO or 2? NAME from ROM BASIC now, instead of {COLOUR) giving you an L3 ERROR, gives you a list However, the PRINT@ statements will not work normally except in PMODE of all the single precision, double preci by Scott Edwards sion, integer and string variables used in 4. If you crash out of the program abnor� your program and their values. So when ma//y, and are still on the graphics screen, "The Killer Satellite" is an original your BASIC program fouls up press just type A= USR1(0) to get back to the action game for the 16K, extended basic, BREAK (if necessary) and type NAME. text screen. colour computer: It should run oin all col The variables are displayed in "pages" of Ty pe in the demo BASIC program our computers with extended colour 15. Press any key for the next page. Ar it is certainly simple, but does give you basic. ray variables are not listed. an idea of what is possible. A war satellite in space has mal functioned and is sending its deadly LOADING INSTRUCTIONS: PROGRAM DESCRIPTION cosmic rays at Earth. Yo u must protect MEMORY SIZE 32320 As the program is written in Earth by destroying these rays until the SYSTEM *? LVA R machine code it is very fast, and you sate/lit runs out of energy. *? /ENTER or /32321 would be hard up to find any slow down The cosmic rays are represented > - load your BASIC program (tape con from that of the BASIC interpreter acting by a random sequence of coloured tains a daft demo program) normally. squares, all rapidly approaching your ship. RUN ENTER ... The source code is well com The ''colour'' of your ship can be varied . . . (BREAK) NAME ENTER mented and the remarks here are only in by pressing the space bar. By matching tended for amplification. the colour of your ship to the components The source code from line 120 to of the beam, portions of the beam (or ray) line 270 is all for relocating the machine can be destroyed. If you jestroy the code invisibly behind the BASIC program whole ray, you go to the next level where TRACK RACER - invisible to the BASIC interpreter that a new raymoves faster. If the deadly beam Hitachi Peach is. Once that relocation is done the loader reaches your ship, you are destroyed. is dispensed with - in fact, it cannot be To begin the game you have 3 by D.C. Kelly re-used - see line 250. ships, and extra ships are obtained as you Lines 330 to 550 are for keeping progress through the various levels. If all In this race game you must steer your rac tabs on the USR calls from the BASIC pro ing car down the track while avoiding the of your ships are destroyed before the gram. There is provision for two USR calls. satellite fails, the satellite destroys the oncoming cars. Yo u will crash if you run The first (USRO) turns on the graphics off the track or hit an oncoming car. The Earth and you lose. On the other hand if display, and the second (USR1) turns it off. you can protect the Eart for 11 ro unds, the further you travel the greater your score. The code in this section is there to make satellite runs out of power and the Earth Yo u steer the car using the left and right sure that all errors from errant BASIC pro is saved. arrow keys. After you have crashed the grammers are properly trapped! All this makes for an entertaining program will display: The main code starts at tine 610, game which becomes quite difficult at the CRASH INS = PLAY AGAIN and is commented extensively in the higher levels. For added interest a score DEL = FINISH listing. Yo u will note that no control is displayed at all times. If a ship is If you want another game press characters are allowed in the listing, but destroyed you continue on the same level the INS key, otherwise press the DEL key. these could be easily added if yo uwish until you are successful or otherwise. ed to work out their parameters for the To use the program simply type look up table. RUN, read the introduction, then hold down any key until the game begins. From HI-RES TEXT SET UP then on simply use the spacebar to match Colour Computer 1. Ta ke very careful note of the addresses the colours -Good Luck. in the object code in the first twenty The functioning of the program is by Geoffrey D. Williamson or so lines of code. If you are using Ta n explained below: dy's EDTASM + to assemble this pro Line 60, 70: One of the most annoying features gram you MUST force the assembler Generate initial display of the CoCo is its lack of a true lower case to use the direct page mode of ad line 90, 100: display. It does not take too many hours dressing by using the < symbol. If you Generate the strings for the in front of the monitor to become do not, the assembler will default to ex· number of ships lett, and the col thoroughly annoyed with Ta ndy's excuse tended page addressing. This will our sequence of your ship. for lower case! slightly slow the code down, but more Lines 110, 120: Unfortunately, this is fixed by hard importantly, the addresses I have given Complete initial display ware, and one may resort to alternative in the demonstration program for the Lines 130-150: hardware lower case drivers to overcome USR calls (and for the loader program) Print scenario this problem. Alas, these are expensive; will be incorrect. Lines 160, 170, 180: yet there is a cheap way out of this dilem There is nothing sacrosanct Flash screen, wait for continue ma, thanks to MICR0-80; Just type in the about the values in the program , but be Line 200: following program and you will be able to prepared to spend a fair bit of time in Initializes variables have true upper and lower case on the debugging if you do not stick slavishly Line 210: screen at the same time. Not only that, to them! Go to round generation but this text is usable at the same time 2. Once you have the machine code safe Lines 240-290: as graphics -- here come some graphic ly assembled (and backed up) CLEAR Loops for colour mate between adventures!! some space at the top of RAM - if you ship and ray by using INSTR ( ), One final feature of this program have 16K try CLEAR200,&H3000: or then uses the MID$ () functions is its relocatability by this. we mean it CLEAR200,&H7000 for 32K. availble in BASIC to manipulate the can live anywhere in memory quite hap (C)LOADM the machine code into this ray string. pily, as it is written in position-independent area with the APPROPRIATE OFFSET. Lines 310, 320: code which is much easier to do on the Remember, it is ORG 'd at zero. If you Update display, and makes sound 6809 than most 8 bit microprocessors. forget the offset, you will bring down effects. Because of this relocatability you your whole system! Line 340: can 'hide' the machine code program 3. Now that the machine code is safely If 1st character of A$ = blank, ray behind the BASIC program - this is tucked away in protected RAM you can is destroyed, you win this round. achieved by a little driver attached to the load in your BASIC program. Once you Line 370: program proper. The advantage of all this are happy with the latter you can go to Update variables, if ray at your ship is that once the whole program is set up, the next step. you lose round. PA GE 16 MICRO-SO VOLUME 4 No. 4 (NOVEMBER/DECEMBER 1983) Line 390: Line 690, 700: all available drives for the file starting with Go to beginning of loop - con- Another Game? drive 0. tinue round. Line 720: In the case of a cassette load the Lines 420-480: Yo u Wo n. program will read in the name of the first Check for spacebar being press file found on the tape, if this does not ed, and change ship colour, if Va riable List: match the filename you supplied the pro necessary. Also controls speed of A$ Cosmic Ray gram will display the filename read from ray. 8$ Colour sequence of ship tape and abort the function. Line 500: Q$ Displayed portion of A$ (usually) After a successful load from either New round, if you complete 11 X Position of left portion of 0$ on disk or cassette the program will return rounds then you've won, otherwise screen to the LOAD MENU. oenerate stars . SH Number of ships 3. READ MEMORY Line s{o: R Number of rounds This function scrolls ALL data If 5 successful rounds, get extra M Score stored in memory, up the screen. ship. G, SV, S Line 520: Determines speed of ray 4. EDIT MEMORY Print satellite S1 Used to determine when to get This function is used to add new Line 530: new ship records, or to change the data stored in Print score, print round, generate E Length of Q$ any one record. It uses the same input ray. C Determines colour of ship and display format as the keyboard input Line 540: Y1 , X1 Position of starts mode except that it gives several extra Time delay and colour sequence. Z, T, ZZ, V options: Line 560: Va riables used for - next loops. Respond to the prompt SELECT Print remaining ships. N.B. The use of INSTR$ ( ) and with one of the following: Line 580: MID$ ( ) = ..., both functions of ex E This will put you into edit mode. The Destroy ship, same round again. tended BASIC allow this program to run input format is the same as the Line 590: at a reasonable speed. Therefore this pro Keyboard input function EXCEPT that If last ship you lose gram would be difficult to modify for com this time if the RETURN key is press Lines 600-680: puters without these special string handl ed at the start of an entry field, that Yo u lost, wait for key. ing routines. field will remain unchanged and input will move to the next field. HOUSEHOLD ACCOUNTING VER 4.2 & VER 5.0 This will increase the record count by one and display the next record. This is an all new version of the program, type LOA D, press RETURN and + This will increase the record count by earlier Household Accounts program press the PLAY key on the recorder. The ten and display a higher record. programwill then load. When loaded, type published m M/CR0-80 magazine. Input This will decrease the record count has been simplified. all bugs eliminated RUN and press RETURN. The Household by one and display the preceding and, the program will load and save to disk Accounting copyright message will be record. or tape as required. The program will carry displayed together with the program This will decrease the record count out many of the bookkeeping functions for menu. by ten and display a lower record. a small business. RETURN in response to the SELECT * prompt will return you to the LOADING FROM CASSETTE FUNCTIONS main menu. The program is written in BASIC. The following MENU is displayed s. SAVE DATA Simply position the tape to the start of the when the program starts: This function enables you to save a complete set of records. The program will display a menu giving you the choice * * * H 0 u s E H 0 L D A c c 0 u N T I N 6 VER 4• 0 * * of saving to cassette or disk, or of retur- * * * 1. KEYBOARD INPUT GJ = General Journal 6. PRINT JOURNALS This function is for the input of SJ = Sales Journal This function enables you to print data and starts from record 1 and works Input to the numeric field of DEBIT the four journals to the screen and to a up to the maximum record number for and CREDIT must have leading zeroes, or printer (optional). Fo llow the instructions your system. Re-entry to this function blanks. on the screen. Note: Do not attempt to when data is still resident in memory will i.e. enter: use the printer option unless there is a cause the program to resume at the next $10.10 as 00010.10 printer connected to the computer. Press record after your last entry (this also ap $10.01 as 00010.01 ing RETURN in response to the DATE plies where a file is loaded from disk or $1.10 as 00001 .10 prompt will cause all dates for that jour tape). Yo ur input is displayed next to the $101.10 as 00101.10 nal to be printed. re quest for details. The cursoris displayed When all fields have been filled the at the point where your entry is going to program will respond with: IMPORTANT NOTE take place. The asterisks in each input CORRECT (YIN) Before the Ledger Balances are field indicate the maximum number of If 'N ', the program will return you calculated and printed, the records in characters that the field will accept. When to the start of input for that record. If 'Y', memoryare sorted according to Account a field has been filled, your input will move the program, will respond by going to the No. This destroys the normal DATE-order to the next field. Yo u do not have to fill next record. To return to the menu press sequence of the record in memory, which each field. When you have entered the in RETURN in response to the DATE field is the preferred order for all other prin formation you require simply press input. touts. Make sure that you SAVE a copy RETURN and the program will move on of your data before using this function. to the next field. The only exception to this is the first input of DATE * *I* *I* *. If 2. LOA D DATA 7. LINEPRINTER UTILITY RETURN is pressed in response to the This function enables you to load This function allows direct inter first input field the program will return you a complete set of data. The program will face between the keyboard and the to the menu. displa.y a menu giving you the choice of printer, i.e. whatever is typed onto the The field "PREFIX" is used to in loading from cassette or disk, or of retur screen will be printed as soon as the dicate to the program the ledger into ning to the main menu should you have RETURN key is pressed. This utility is which the record is to be placed. This selected this function by mistake. useful for setting up headings on reports. should be one of the following: Foreither type of load the program Note: Do not attempt to use this function CP Cash Payments Journal will re quest an 8 character filename. In the unless there is a printer connected to the CR = Cash Received ,Journal case of a disk load the program will search computer. VOLUME 4 No. 4 (NOVEMBER/DECEMBER 1983) MICRO-SO PAGE 17 8. PRINT LEDGER ACCOUNTS system in showing that the total of debits shown as the balance this indicates an er This function allows you to print and credits agree and that there is no im ror in processing has occurred and re the ledger accounts to the screen and to balance. If a figure other than $0.00 is quires investigation and editing). a printer (optional). Follow the instructions on the screen. Note: Do not attempt to use the printer option unless there is a CASH RECEIPTS JOURNAL printer connected to the computer: USING THE PROGRAM CASH RECE IVED JOURNAL FOR ALL TOTAL 14238 .72 14238.72 Expenditures General BALANCE $0 .00 71 . Entertainment 72. Household Repairs LEDGER BALANCES (TRIAL BALANCE) 73. Housekeeping 74. Insurance 75. Motor Ve hicle Costs 76. Subscriptions ACC NO. DEB ITS CRED ITS TOTAL 77. Interest paid 00 1 1000(1. 00 0.00 10000. 00 78. Health Insurance 002 65000 .00 0. 00 65000. ')0 003 25000 .00 0. 00 25000 .00 Ta xation Deductions 004 19000. 00 0.00 19000. 00 81. Education 006 5000 .00 0. 00 5000 .00 82. Medical Costs 83. Rates & Ta xes 007 150(10 . 00 0. 00 15000.00 84. "Trade Subscriptions (;H (:, 14135. 76 14238 .72 102. 96- To commence processing the tran 01 1 80 .00 25000.00 24920 .00- sactions shown in the example the open 012 1 100. Ol) 40(1(,0 . 00 38900 .00- ing balances need to be entered. This is 015 10000 . () 0 10000. 00 0.00 done via the keyboard input. Fo r this pur 05 1 0. 00 2100. 00 2100. 00- pose the General Journal (GJ) prefix is 052 0. 0 0 1200 . 00 1200 . 00- used. 054 150. 00 150. 00- (N.B. The print out of the General 0. 00 450. 00- Journalprocessing demo nstrates the self 055 0. 00 450. 00 checking mechanism of the double entry 1) 58 0. (1 0 10. 60 10. 60- PAGE 18 MICRO-SO VOLUME 4 No. 4 (NOVEMBER/DECEMBER 1983) 059 0. 00 10000 . (1 0 10000 . 00- SPACE UTIUTY DISC BASIC 07 1 75 .40 0. 00 75 . 40 by D. Bereis 073 800. 00 0. 00 800. 00 This utility will go through a Basic 074 480. 63 0. 00 480.63 program and insert spaces around all of (1 75 43. 24 0. 00 43.24 the keywords, this not only makes the listing easier to read on a Model 1, but if 85. 00 0. 00 85 . 00 076 you have purchased a Model 4 and still (1 77 1251 .75 0. 00 1251.75 have your Model 1 it will be essential if 08 1 100. 00 ,::) .00 100. 00 you want to convert your old Model 1 pro 082 10. 60 0. 00 10.60 grams, since the Model 4 WILL NOT run 083 212. 10 0. 00 212. 10 a program that does not have spaces bet 099 0. 00 64225. 16 64225. 16- ween the keywords. Using this utility will save you hours of typing. To use it simply load your Basic program then type: TOTAL 167374 .48 167374.48 0. 00 CMD"S" This facility summarises the ther modified to make use of the Model TI-Jen type: balances of ali active ledger accounts 4 features: the description field has been SPACE and press ENTER/NEWLINE showing the total debit and credit entries expanded to 31 characters and the pro Then type: and the balance of each account. Va lida gram has been broken up into modules to BASIC * and press ENTER/NEWLINE tion of the processing is ascertained when gain maximum use of the memory. Model Then save the program. If you have the total debits and credits are the same 4 owners should type in each module a Model 4, all you have to do now is put amount and the total equals 0. 00. If the from the magazine and save it to disk as the disk in your Model 4 and run the con total does not equal 0.00 an imbalance an ASCII file using the filename that is version program on it. Remember you will has occurred which requires checking and listed in the module, ie: still have to check for things like PEEK's correction. SAVE ''MODLILEO/BAS '',A and POKE's before you run it. Normally, each of the four journals When the program is run, YA HTZEE L2/16K would be individually checked prior to per MODULEO must be the first program that by T. Domigan forming a trial balance to ensure that each is loaded and run, this module initializes YA HTZEE is based on the popular journal is itself balanced. The trial balance the sytem. The program will load the other poker-like 5-dice game of the same name. is then merely a formality and should show modules as required. no imbalance. Model 4 users should ignore any AIM references in the main text to cassette 110, The aim of the game is to score IMPORTANT NOTE these functions are not supported by your in each of 13 categories and the winner Before the Ledger Balances are machine. Model 4 owners MUST be in the is the player with the highest total scom calculated and printed, the records in Model 4 mode to run this program . memoryare sorted according to Account ROLLING THE DICE No. This destroys the normal DATE-order BOLD PRINTING ON liNE PRINTER VII Each player is allowed 3 rollsof the sequence of the records in memory, This 1 line subroutine which dice to maximise the score in each of the which is the preferred order for all other enables owners of a Lineprinter VII to use 13 turns. The first roll changes all 5 dice printouts. Make sure that you SAVE a bold type. The subroutine may also work whilst the remaining 2 players allow selec copy of your data before using this on other Printers, but I have not tried tive rolling of any of the 5 dice, e.g. if Rolls function. them. 1 gives 4, 3, 6, 1, 4, to maximise the To use the subroutine, simply score by rolling more 4's, then "R234" LEDGER ACCOUNTS LPRlNT your normal text, and when you would be suitable. If a good score results This function enables each in want to use bold type, put the tex in P$ after the first or second roll then you may dividual account to be printed showing all and use GOSUB 1000 (or wherever you immediately score by entering ''S '' instead the transactions processed to that ac put the subroutine). The text must not go of "R". When scoring it is only necessary count. For the purposes of illustration the over on to the next line, or an error will to enter the category number e.g. 13. Bank Account (#10) and the Interest Paid result. On returning from the subroutine, SCORING Account ( #77) are listed below. the Printer's carriage will be placed just To obtain a complete print out of after the last character of P$. The routine Categories 1-6: Sum of that ledger accounts it is necessary to input will work in normal and double size Print category dice in hand. each account number in response to the mode, but if both are mixed on one line, Category 7: 3 of a kind. Score total of "Which Account Number do you require" problems will result. dice. question. The subroutine works by simply 8: 4 ...... In c 3es where the record max 9: Full house. . . 25 pts printing P$ in the same place three times. imum is reached this can be overcome by 10: Small Straight (sequence of 4 dice) The control code 26 executes a carriage obtaining a print out of all journals and 30 pts return with no line feed. ZS$ is a string ledger accounts for retention as a perma 11: Large Straight (sequence of 5 dice) of blanks, which will return the carriage nent record and repeating the procedural 40 pts to the start of P$ after each carriage functions outlined above. return. ZP is used to check that P$ will 12: YA HTZEE (5 of a kind)score 50 pts This commences by clearing the 13: CHANCE = anything fit on one line and to calculate the length memory and inserting the closing of ZS$. If you want the bold type darker, score sum of dice balances for each ledger account via the If a second or later YA HTZEE (5 increase the length of the FOR . . . NEXT General Journal prefix. ot a kind) is scored and the appropriate loop. The program provides great flex category 1-6 has been filled, it may be ibility as to the types of accounts that may used in categories 7-11. SIRIUS ADVENTURE be incorporated into the chart of accounts. Sound is available but memory for the Colour Computer and Yo ur requirements can be specifically need not be protected as the mil will Hitachi Peach designed for your own particular cir reside in the REM statement of line 10. This Adventure was originally writ.. cumstances. The design and allocation of NOTE: Although written for a ten to run on the Model 1. account numbers should be thoughtfully Model 3, this program will run on a Model It has mainly been converted to considered prior to commencement as 1 without modification. take advantage of the HI-RES WRITER any subsequent change in account published elsewhere in this issue. If you SPACE INVADERS numbers for particular purposes will re are typing this program in from the for the TRS-80 MC-10 quire the editing of prior transactiuons to magazine, follow the instructions for merg This short Space Invaders game is accounts affected. ing the HI-RES WRITER with this program included in case any of you have bought SALES JOURNAL and then save it. If you have a cassette an MC-10 for Christmas, the program is The Sales Journalwill often not be subscription you only to load the program short and simple, (out of necessity due applicable in the normal household situa and the HI-RES WRITER will load into to the limited memory). To move your laser tion. It is, of course, useful for a small memory as well. cannon left and right press the ' 'A'' or the business. The adventure is fairly small by "S" keys respectively, these keys were Ve rsion 4.2 has been modified to normal standards, though it will still pro chosen because they have the left and run on the Hitachi Peach. vide you with a challenge. The Hitachi right arrow symbols on them as well. Ve rsion 5.0 has been modified to Peach version is essentially the same pro Press the Space Bar to fire. Te n points are run on the TRS-80 Model 4. gram, but without the need for the HI-RES given for each invader that is destroyed. Instructions for the Model 4 ver WRITER. As is usual with Adventures, no If you shoot all the Invaders before they sion are the same as those for the Hitachi further clues to its operation will be given land you get a bonus of 30 points. If any Peach, the program has however been fur- here, you'll just have to sweat it out!!! Invaders land, you lose. 550 L=1 : FORI=1TOW-1 250 P=0 : GOSUB230 :LOCATE28 ,3: PRINT•MENU• 560 GOSUB1579 : GOSUB1620: PRINTVX$ 255 LOCATE1 ,6:PRINT•1 = KEYBOARD INPUT 570 L=L+1: IFL=1 1THENL=1:LOCATES, 15:PRINT (§ : 5 = SAVE DATA•: LOCATE1 ,7:PRIN E SO$J : PA=986 :LN=1 : GOSUB60 : GOB���230 :GOSUB5 $: T•2 = LOAD DATA : 6 = PRI m NT JOURNALs • 10 -!'> **** VER 4.2 HOUSEHOLD ACCOUNT ING **** 580 NEXTI 260 LOCATE1,8:PRINT•3 = READ MEMORY z 0 : 7 = LINE PRI NTER UTILITY• :LOC 590 LOCATE9, 15:PRINT•END OF DATA - •JSO$ HITACHI PEACH -!'> ATE1 ,9:PRINT•4 = EDIT MEMORY ;:PA= 1000:LN=1 : GOSUB60: RETURN z : 8 =PRINT LEDGER •cZ2$ J•s• 600 I=l : FL=0 270 LOCATE0, 13:PRI NTZ3$J : PA=848:LN=1 : GOS 610 LOCATE28 ,3:PRINT•EDIT •uZl$; �m $: UB60 620 GOSUB230:GOSUB310: LOCATE0,13:PRINT• CD 10 REM WRI TTEN BY m 280 AD=VAL CAD$) ! IFAD< 1 OR AD>8 THEN270 •;:LOCATE0, 15:PRINT•SELECT JJ SUNBURST SOFTWARE SERVICES , 0 290 ON AD GOT0480, 1450, 500,600, 1350, 740, .. m FOR 630 LOCATE0 ,4: PRINT • RECORD NO . •111 0 1150,1 180 m MICR0-80 PTY LTD 640 GOSUB1570 $: 300 LOCATE18,3:PRINT.KEYBOARD INPUT • CD 20 CLEAR 1610S: SCREENS, ,1: VV=350:POKE�2 650 IFV1$=• • THENGOSUB31S:LOCATE0, 13: PRIN m 310 LOCATE0,5:PRINTZ7$; • **'**'**• I:L JJ 3C ,16:POKE164 ,10 · OCATE0, 6!PRINT•REF NO . ****• J:LOCATES,7: T ., 39 DIM A$ C351 )9LBC351 ):F 3$= • MMMMMMM.Mfi 660 LOCATEB,5:PRINTV1$S : LOCATE1 195:PRINT cO PR INT•DETAILS MMMKKKMMKMMKHMH•g:LOCATES, CP •:F4$= • $$Mfi ,MMM. Mfi- •:F5$= • •+F3$+ • V2$J ! LOCATE14,5: PRI NTV3$; : LOCATE8,6:PRIN 8:PR INT"PREFIX **• I:LOCATE0,9:PRINT.ACC � TV4$J !LOCATE8,7: PRINTV5$J ! LOCATE8,8:PRIN NO . *** • ;:LOCATE0, 10: PRI NTZ6$ U • *** ·.. 40 W= 1:SO$= •PRESS ANY KEY TO CONTI NUE •• TV6$V : LOCATEB,9: PRI NTV7$J : LOCATE7,10: PRI **. , :Z0$= •TOTAL• :Z1$=•MEMORY •:z2$= • ACCOUNT •: 320 LOCATE0, 4:PRINT•RECORD NO. •III NTVB$; : LOCATE7, 11:PRINTV9$ J Z3$= •SELECT FUNCTION ••: Z4$= •JOURNAL •:z5 670 PA=967 :LN=l : GOSUB60: IFAD$= • •THENLOC 330 LOCATE0, 11:PRINTZ5$J • *****· **• f:LOC 1 $= ·cREDIT•: Z6$= •DEBIT• : Z7$= •DATE• ATE0, 15:PRINT"ADVANCE•J : I=I+1 :IF I>VV TH ATE0, 13:PRINT"CORRECT CY/N) *• J:RETURN 50 GOSUB230:LOCATE10, 10:PRINT•MAXI MUM NU EN I=VV 340 GOSUB230 :GOSUB3ss MBER OF RECORDS = •;VV: LOCATE10, 13:PRINT 680 IF AD$=•+•THENLOCATE0, 15: PRINT.ADVAN 350 FL=1 : PA=328 :LN=2 : GOSUB60 : DT$=AD$ :IFD SO$; : PA=868 :LN= 1:GOSUB60 :GOT0250 CE•I : I=I+10: IF I>VV THEN I=VV T$= •00•THENRETURN i 60 AD$=• •:WX= INT CPA/64) ! WY=PA- CWX*64 ) 690 IF AD$= •-•THEN I=I-1:LOCATE0, 15:PRIN 1111111 360 GOSUB370 :GOSUB38S : GOSUB390 :GOSUB40S : 7� FORT=1TOLN T•REVERSE•J :IF I<=0 THEN I=l GOSUB41S: FL=1 : GOSUB420 :GOSUB43S : GOSUB44S n 80 GOSUB150: IFIN$=CHR$ C13)THEN130ELSEIFI :GOSUB450: FL=0: GOT0460 700 IF AD$= •=•THEN I=I··10:LOCATE0, 15:PRI :D N$=CHR$ (8) THEN1 10ELSEIFIN$=CHR$ (32JTHENG 370 PA=331 : GOSUB60: DT$=DT$+AD$ :PA=334 :GO NT . REVERSE•; :IF I<=S THEN I=l 0 OSUB 170 SUB60 :DT$=DT$+AD$:RETURN 710 IFAD$= • •THEN250 I 90 AD$ =AD$+ IN$: LOCATE WY ,WX:PRI NTAD$J !NE 380 PA=392:LN=4: FL=0: GOSUB6S:RF$=AD$:RET 729 IF AD$= •E•THENLOCATES, 15: PRINT•* EDI (X) XT : RETURN URN T •• ;:GOSUB84S : GOT0620 0 100 NEXT : RETURN 390 PA=456 :LN=15:GOSUB60 :DE$=AD$:RETURN 730 GOT0630 110 IFT<=1THEN80ELSET=T-1 400 PA=52S :LN�2 : GOSUB69:PR$=AD$ :RETURN 740 GOSUB230 :LOCATE18, 3:PRI NTZ4$; •s AVA! 120 AD$=LEFT$ CAD$,LEN CAD$) - 1l: LOCATE WY , LABLE • 410 PA=584:LN=3 : GOSUB60 :PR$=PR$+AD$ :RETU WX :PRINTAD$J •**• J:GOT080 745 LOCATE0,5:PRINT•1 s PRINT LEDGER BAL RN 130 IF FL=0 THENBL$=STR ING$ CLN-LEN CAD$ ) , ANCES : 4 = GJ GENERAL •;Z4$J !LOC 420 PA=647 :LN=5: GOSUB60:GOSUB190:DB$=AD$ • •) : AD$=AD$+BL$ :LOCATE WY , WX :PRINTAD$ 1 ATES,6"PRINT•2 = CP CASH PAYMENTo •IZ4$1 +•.•:RETURN :RETURN • = SJ SALES 8JZ4$J : LOCATES ,7:PR 430 PA=653 :LN=2: GOSUB6S :DB$=DB$+AD$:RETU � 5 140 BL$=STRING$ C LN-LEN CAD$ ) ,•g •):AD$=AD$ INT•3 � CR CASH RECEIVED •tZ4$J • : 6 RN +BL$ : LOCATE WY , WX :PRINTAD$; : RETURN = RETURN TO MAIN MENU • 440 PA=711:LN=5 : GOSUB6S :GOSUB190:CR$=AD$ 150 IN$= • •:IN$= I NKEY$!GOSUB160: 1FIN$=• •T 750 LOCATES, l3:PR I NTZ3$J : PA=848 :LN= l :GOS +•.•:RETURN HEN150ELSERETURN UB60: AD=VAL CAD$ ) 450 PA=717:LN=2: GOSUB6S :CR$=CR$+AD$:FL=S 160 LOCATE WY , WX :PRINTAD$JCHR$C134 ) U:RE 760 IFAD< l OR AD >6 THEN750 :RETURN TURN 770 ON AD GOTO 16309 7809 790, 800, 8109 250 460 PA=846 :LN=1 : GOSUB60: IF AD$= •N•THEN34S 170 IFFL=0THENRETURN 7BS PT$= •CASH PAYMENTS •:KA$=•cp•: GOTOB2� ELSEI FAD$( )•y•THEN460 180 IN$=•0" : RETURN 790 PT$= •CASH RECEIVED•:KA$=•cR•: GOT0820 470 A$ Cll=DT$+RF$+DE$+PR$+DB$+CR$!RETURN 190 T= 1 800 PT$= • GENERAL •:KA$= •GJ ":GOT0820 480 FORI =WTO VV : GOSUB340: I FDT$3 •ss•THENW 200 IFT >5THENAD$= • s• : RETURN 810 PT$= •SALES•:KA$=•sJ• =I : GOT0250 210 IFMID$CAD$, T9 1)=•0•THENT=T+l : GOTL20� 820 GOSUB980 :GOSUB1S1S: GOT01030 490 NEXTI : GOT0250 220 AD$=STRING$CT-1,32) +R I GHT$ CAD$, 6-Y) : 830 PRINTSO$ ! �A=1022 :LN= 1 : GOSUB60 :GOT025 500 GOSUB230 :GOSUB510:GOSUB550 :GOT025S RETURN 0 510 LOCATE25,3:PRINT•CONTENTS OF •;Z1$1 230 CLS : LOCATE0,0: P RINT•* * * H 0 U S 840 FL=1 : PA=328 :LN=2 : GOSUB60: IFAD$= •ss•T 520 LOCATE0, 4:PRINTZ7$J • REF DETAI E H 0 L D A C C 0 U N T I N G VER 4.2 HENDT$=V1$+V2$+V3$ :LOCATEB,5: PRINTVl$g •/ LS ACC NO •BZ6$ ; • •;Z5$ (j)� * * •• ;:LOCATE0 , 1:PRINT •* * * CC) •;V2$ ; •J•;V3$ ; :GOT0860 530 IF P THEN PR I NT�3,Z7$ ; • REF DE m 07 /07/83 M C R 0 - 8 0 P T Y L 850 DT$=AD$: GOSUB370 1 TAILS ACC NO .,Z6$ ; • ., cO T D * * *• ; •THENRF$=V4$:LOC Z5$ 860 GOSUB3B0 :IFRF$= • 240 LOCATEJ ,3: RETURN ATE8, 6: 540 RETURN PR I NTRF$; 87� GOSUB39� :IF DE$= " '"THEN 1180 GOSUB230: LOCATE18,2:PRINT.LEDGER •t 1550 LOCATE0, 13! PRINT "THIS IS FILE "JNl$ DE$=V5$: LOCATE8,7:PR I NTDE$f Z2$; •s• : LOCATE0,�:PRINT•TYPE •tc HR$ C34J U J• NOT FILE "IN2$;: CLOSEM2 889 GOSUB4��: IFPR$= • •THENP1$mV6$:LOCAT •999•; CHR$ C34J ;• TO EXIT• 1560 LOCATE0, 14:PRINT •PRESS ANY KEY TO A ]5 E8 , 8:PRINTV6$J : GOT09�9 1190 GOSUB9BS BORT *• ;:PA=919:LN=1 : GOSUB60:GOT01450 G) m 890 Pl$=AD$ 120� LOCATES, ��:PRINT"WHICH •IZ2$ J • NO. 1�70 V1$=LEFT$ (A$CIJ,2} :V2��riiD$(A$(IJ,3 ['\) 9�0 GOSUB41�: IFAD$= • •THENPR$=P1$+V7$: 0 DO YOU REQUIRE ***• ;:PA=993 :LN=3: FLc1 :GO ,2J :V3$=MID$CA$CIJ ,5,2J :V4$=MID$CA${IJ�7 LOCATE8, 9:PRINTV7$J : GOT092S SUB60: N=VAL CAD$ ) ,4> :V5$=MID$CA$CIJ,11,15J :V6$=M ID$(A$CIJ 91f:J PR$=P 1$+AD$ 1210 IFN< 10RN> 999THEN1 2SS ,26, 2J : V7$=MID$CA$(IJ ,28, 3J :VB$=MID$(A$ C 92� FL=f:J : GOSUB42f:J: IFAD$= • '"THENDB$=V 12�� BLH=0 :DTfi=0:CTM=�: I FN=999THENCLOSEfi IJ ,31,8J :V9$=MID$CA$CIJ,39,8J :RETURN 8$ : LOCATE7 ,10�PRINTV8$J : GOT094S 3:GOT02�0 1580 GOSUB230 :LOCATE23 ,3: PRINT "DATA •;LE 930 GOSUB19S: GOSUB43S 1230 GOSUB240:LOCATES,3:PRINTZ2$; • NO. • FT$CX1$, 4) :LOCATE�,5 :PRINT"1 2 •;Xl$J • T 940 FL=0: GOSUB440 :IFAD$= • "THENCR$=V ;AD$ J !IF P THEN PRI NTH3, • •:PRINTM3 , Z2$' APE•: LOCATE0,7:PRINT"2 � "IX1$; • DISK":L 9!fi : LOCATE7, 11:PRINTV9$; : GOT0960 " NO . •;AD$ OCATES, 9:PRINT"3 = EXIT TO MENU• : RETURN 950 GOSUB190:GOSUB450 124B LOCATES, 6:GOSUB52f:J :FORI=1TOW 1590 LOCATE0, 13:PRI NTZ3SJ : PA=848:LN=1 :GO 960 GOSUB47f:J 12�0 IFN< >VAL CMID$CA$CIJ ,28,3J JTHEN12BS SUB6� : SF=VAL CAD$ J :IF SF< 1 OR SF >3THEN159 970 FL=0 : RETURN 1260 GOSUB1�70:GOSUB1620:PRI NTVX$: IF P T 0ELSERETURN 980 LOCATE0, 13:PRINT•I s THE PRINTER REQU HEN PRI NTH3 , VX$ 1600 FL=0: GOSUB230 :LOCATE0,7: PRINT•ENTER ' IRED CY/NJ *'" f:PA=862 :LN=1 : GOSUB60 1270 DRM=VAL ED >": RETURN 1540 DATA "j ust inside a dark cave . Li9h 1 769 PRINT•3. The jewel !ed crown of the 116 0 IN=� : FOR 19=4 TO 6 t comes from an entrance to the west . Ur lor d. •; 117� IF B 1 350 RETl.lRN 1620 DATA "in a ma l odourou5 tunnel . Some =8 THEN 19�0 1360 PR INT"Ready tape •..pr ess h. n a s::E m .j::.. 170 IF IN KEY$=• • THEN IF T THENP 520 PRINT@244 ,CHR$C249J ;:PRINT@2 z 0 LAY "01L10GP8 •:SCREEN0, 1 ELSE PLA 77 , CHR$(175) ;:PRI NT@308 ,CHR$ (246 .j::.. y•otL10CP8" : SCREEN0,0 ELSE 190 ) ; z 180 T=NOT (Tl :GOTO 170 530 PRI NT@457, "SCORE ";M;:PRINT@ 0 < **** KILLER SATELLITE **** 190 REM INITIALIZE VARIABLES 11, .ROUND ";R; :X=275:E=1 :S=S-10: m s:: 200 CLS0:X=270:S=110: SH=3:E=1 :S1 A$=" ": FOR T=1 TO 40 : A$=A$+CHR$ C OJ m COLOUR COMPUTER =0 : M=0 : R=0 RND C7)*16+143J :NEXT : A$=A$+STRING :n 210 GOT0500 $(20, 128) m0 220 REM CONTROL LOOP 0 540 IF R<5 THEN PRI NT@480, B$; :G= m 1� REM THE KILLER SATELLITE GOSUB 430 2: SV=S /2-5 ELSE G=1 : SV=S s:: 23.0 OJ ERSION 1.1 240 REM FIND COLOUR MATCH 551iJ REM PRINT SHIPS LEFT m 2� REM V :n 30 REM 1518/83 250 F=0 560 PRI NT@496+ C5-SHl*3,LEFT$ C SH$ 4.eJ REr-1 ** BY N. S. EDWARDS ** 260 F=INSTR CF+1,Q$,D$l :IF F=0 TH ,3*SH l ;:GOTO 230 cO 50 REM CXl INITIAL DISPLAY EN 290 570 REM SHIP DESTROYED � 15:SET CRND C64 1,0 CLS0 : FOR T= 1 TO 270 MID$CA$, Fl=MID$CA$,F +1) 580 FOR Z=1 TO 10:PRINT@258 , CHR$ l-l,RND C32l -1 ,5) :NEXT:PRINT@262 , 280 X=X+1:M=M+ 10:E=E-1 130 CLS:PRINT•A SATELLITE ORBIT! 400 REM END CONTROL LOOP 620 A=359 NG FAR ABOVE THE EARTH HAS MALF 410 REM 630 REM FINAL SCORE UNCTIONED. IT HAS BEGUN SEND! 420 REM CHANGE SHIP COLOUR 640 PR I NT@A ,"y our • CHR$C128) "scor NG DANGEROUS COSMI C"; 430 FOR V= 1 TO G e•CHR$(128J ;M; 135 PRINT" RAYS TOWARDS THE EART 440 IF PEEK C345) =247 THEN C=C+1: 651iJ REM NEXT GAME H. YOU MUST PROTECT THE EARTH IF C>7 THEN C=1 660 PRINT@500, •conti nued•; FROM THE COSM IC RAYS BY MATC 450 D$=CHR$ C143+ 16*Cl : PRI NT@258, 670 Q$= INKEY$ HINGTHE COLOURS OF THE APPROACH! D$; 680 IF INKEY$=• • THEN 680 NG RAYS" ; 460 FOR I=1 TO SV : NEXT 690 CLS0:PRINT@106, . ANOTHER GAME PR INT" WITH YOUR SHIELD UNT I 470 NEXT V 1q0 ., . ; L THE SATELL ITE RUNS OUT OF POWE 481iJ RETURN 700 Q$= INKEY$: IF Q$=• • THEN 700 R Ill ROUNDSl .":PRINT:PRINT "TO D 490 REM NEXT LEVEL ELSE IF Q$=•y• THEN 200 ELSE I 0 THIS USE THE 15� PR T NT@484, "PRESS jl.(j) m f\) 0:J 610 IF L0= 15 THEN L0=16 310 LE$= LEFT$ ( C$, I-1): RI�= M **** SIRIUS ADVENTURE **** 620 IF LO=OL THEN GOSUB 1860 :g ID$ ( C$, 1+1 , LEN CC$) - LEN (LE$) - G) 630 RETURN m COLOUR COMPUTER 1):GOTO 330 640 IF L0= 1 THEN L0=2 ELSE IF LO [\) 320 LE$= LEFT$ (C$, !): RI$=•• � =4 THEN L0=5 ELSE IF L0=5 THEN 330 L= LEN CLE$) : IF Rl$=• • THEN L 0=6 10 REM SIRIUS ADVENTURE R= -1 ELSE R= LEN IR!$) -I F L0=9 THEN L0=7 ELSE IF LO 20 REM (C) MAY 1983 MLADEN BAUK . 340 FOR I=1 TO VB: IF L> LEN CA$( 650 I)) THEN 360 =7 THEN L0=1 1 ELSE IF L0=16 THEN 350 IF LE$< > LEFT$ (A$(I) ,L) THE L0= 15 30 REM HI-RES WRI TER 1.1 N 360 ELSE 380 660 IF L0= 17 THEN L0=16 (C) 1983 G.D. WILLIAMSON 360 NEXT I 670 IF L0=19 AND B(5)= -1 THEN L 370 IF C$< >•• THEN PRINT •! don • 0= 18 40 REM MODIFIED FOR THE COLOUR t understand •cHR$(34> ;C$;CHR$(3 8 IF L0= 19 AND B(5) < > -i THEN COMPUTER BY -- MICR0-80 6 0 4) •, check my vocabulary. •: GOTO GO SUB 1870 270 690 IF LO=OL THEN GOSUB 1860 50 A=PEEK (�H1B>*256+PEEK ��H 1C)-� 380 IF R= -1 THEN 420 700 RETURN H4CD 390 FOR J=1 TO ND 710 IF L0=3 THEN L0=2 ELSE IF LO 60 DEFUSR0=A :DEFUSR1=A+�H1D:A=US 400 IF RI$< >B$(J) THEN NEXT J E =4 THEN L0=3 ELSE IF L0=10 THEN R0 (0) : PMODE2, 1:PCLS : SCREEN1,1 LSE 420 L0=7 70 PR INT@64, • S IRIUS •:PRI 410 PR INT•I don•t understand wcH 720 IF L0=7 THtN L0=8 ELSE IF LO NT@1Z8, • ADVENTURE •:FOR X=1T02 R$ (34> ;RI$; CHR$ (34) •, c�eck my v =19 THEN L0=20 ELSE IF L0=2£J THE 000: NEXT : PMODE4, 1;PCLS: SCREEN1 ,1 oc abu lar y. •: GOTO 270 N L0=21 80 CLEAR 200 : VB=22 : ND=26 : L=21 420 ON I GOSUB 450,4 50,450, 4 50, 8 730 IF LO=OL THEN GOSUB 1860 : OB=6 : LN=337 30 , 880 , 880 , 880, 950, 950, 9 50,950 ,9 740 RETURN 9flJ CLS : PRI NT@8, .Sirius Adventur 80 , 1050,980, 1230,980, 1 120, 1160 , 1 750 IF L0=2 THEN L0=3 ELSE IF LO e• : PM$=•>•: PF$= • • 290, 1360, 20 10 =3 THEN L0=4 ELSE IF L0=7 THEN L 100 PRINT @13ftJ, •Press : nstru 430 IF I>4 AND 1< 13 THEN 210 0= 10 I ct1ons or • - 440 IF 1=22 THEN 180 ELSE 170 760 IF L0=8 THEN L0=7 ELSE IF LO 110 PR INT@170, . egin.•: CL$= • n 450 IF J ••. 1110 PR INT "I am magical ly transp BULARY ast. • �r ted1": FOR 1=1 TO 1000: NEXT I 1470 DATA LAMP,BUN,ROD, RING,STAT 1630 DATA •in a room in wh ich th UE , CROWN,N, S,W, E,NORTH,SOUTH ,WES : RE.I URN e on ly VISIBLE ex it is the w 112 0 PR INT"Conf irm