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 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 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, 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 -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 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 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 ­ 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 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, Move the code to where 4F0A 77 00160 LD ,A BASIC programs normally 4F0B 13 00170 INC DE start 4F0C 23 00 180 INC HL 4F0D B7 00190 OR A 4F0E 20F9 00200 JR NZ,LOOP Loop until finished 4F10 22A440 00210 LD <40A4H>,HL Set new Start of BAS IC 4F13 CD4D 1B 00220 CALL 1B4DH Do a 'NEW' to setup the 00230 remaining BAS IC pointers 4F16 C3 191A 00240 JP 1A19H Return to BASIC 4F 19 CF 00250 DEFPRC RST 8 DEFUSR code 4F1A C1 00260 DEFB 0C1H 4F1B CF 00270 RST 8 4F1C D5 00280 DEFB 0D5H 4F1D CD3723 00290 CALL 2337H 4F20 E5 00300 PUSH HL 4F2 1 CD7F0A 00310 CALL 0A7FH 4F24 228E40 00320 LD (408EH>,HL 4F27 E1 00330 POP HL 4F28 C9 00340 RET 4F29 00 00350 NOP Mandatory terminator 4F()0 00360 END START

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 1983 BY G.S.THOMAS * �.0'.0'8� ;* * .0'�09.0' ;XXIIXXXXXIXIXIIXIIIIIIXIIIXXXIIXXIXXXIIXXXIXIXXIXXXX 00 10'.0' FF�� fJQJ11.0' ORG QJFF.QJ.QJH 4�2� .0'� 12� CURPOS EQU 16416 ;CURSOR POSITION ADDRESS �A7F 0f!J130 BASARG EQU �A7FH ;ARGUMENT FROM BASIC �A9A .0'.0'14.0' ALARG EQU QJA9AH ;ASSEMBLY LANGUAGE ARG 0049 .0'.0' 150 KBWA IT EQU 49H ;WAIT FOR CHAR FROM KB 002B .0'�16� KBCHAR E9U 2BH ;GET CHARACTER FROM KB FF0� 1841 .0'� 17.0' JR START ;SKIP STORAGE AREA 004� �� 18� INPUT DEFS 64 ;ROOM TO SAVE TEXT 0�01 .0'019� CHAREN DEFS 1 ;CONTAINS CHAR ENTERED FF43 CD7F�A 0.0'2�.0' START CALL BASARG ;GET ARG FROM BASIC FF46 45 0�2 1� BEGIN LD B,L ;B CONTAINS MAX LENGTH FF47 QJEQJQJ 0�220' LD C,.eJ C CONTAINS CURRENT LENGTH FF49 C5 0'0230 PUSH BC SAVE LENGTH INFORMAT ION FF4A 2A2QJ4QJ .0'0'24..0' LD HL , GET CURSOR POSITION FF4D E5 ..0'..0'25..0' PUSH HL SAVE IT FF4E 3688 .0'026..0' PROMPT LD , 136 PRINT CHRS <136) AT CURPOS FF50 23 0'027.0' INC HL NEXT SCREEN POSITION FF51 10FB .0'0'28.0' DJNZ PROMPT UNTIL MAX LENGTH FF53 3620 .0'..0'290' LD ,32 BLANK ONE CHAR AFTER FF55 E1 ..0'03.0'..0' POP HL RETRIEVE OLD CURPOS FF56 D1 0..0'3 10' POP DE LENGTH INFO INTO DE 0'.0'32..0' FF57 7A f!J0'33.QJ READKB LD A, D ;GET MAX IMUM LENGTH FF58 BB .0'0'34.0' CP E ;COMPARE CURRENT LENGTH FF59 282C 0'..0'350' JR Z,MAXLEN ;GO IF MAX = CURRENT FF5B QJE02 .0'..0'36..0' FLASH LD C,2 ;NO. OF TIMES THROUGH LOOP FF5D f!J65A f!J037..0' LD B, 90' ;DELAY TIME FF5F 368F .0'..0'38� CURON LD , 143 ;GRAPHICS BLOCK FF61 D5 0'039..0' PUSH DE ;SAVE LENGTH INFORMAT ION FF62 CD2B0'QJ .0'04..0'..0' CALL KBCHAR ;GET CHAR IF AVAILABLE FF65 D1 ..0'..0'410' POP DE ;RETRIEVE LENGTH INFO FF66 FE0'0 0..0'420' CP .eJ ;KEY PRESSED ?

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 , 136 ;DOT PROMPT FF76 D5 .0'05 1.0' PUSH DE FF77 CD2B00 CALL KBCHAR FF7A D1 POP DE VOLUME 4 No 4 (NOVEMBER/DECEMBER 1983) PAGE 8 MICRo .. ao ..

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 ,A ;SAVE THE CHAR ENTERED FF91 3E.I1Jfi!J eJ£167.0 LD A,f!J FF93 BB 0.068.0 CP E ;CURRENT LENGTH ZERO? FF94 3A42FF .0069.0 LD A, CCHAREN > ;RESTORE THE CHARACTER FF97 28 11 f!Jf!J7f!Jf!J JR Z, LETTER ;IF E=f!J THEN GO FF99 FE0D eJ£17 1.0 CP 13 ; ? FF9B 283 1 .0H72.0 JR Z, ENTER ;IF YES THEN GO FF9D FE-08 eJ£173.0 CP 8 ; ? FF9F 281F 00740 JR Z, ERASE ;IF YES THEN GO FFA 1 FE 18 eJeJ75EJ CP 24 ; ? FFA3 2905 eJ0760 JR NZ , LETTER ;IF NOT THEN GO FFA5 6A eJ0770 LD L,D ;MAX LENGTH BACK INTO L FFA6 26.0fi!J .0.078.0 LD H,J?I ;RESET H FFA8 189C 00790 JR BEG IN ;START INPUT AGAIN FFAA 7A .0.08.00 LETTER LD A,D ;GET MAXIMUM LENGTH FFAB BB .0.08 10 CP E ;COMPARE CURRENT LENGTH FFAC 28A9 eJeJ82eJ JR Z,READKB ;IF MAX=CURRENT THEN GO FFAE 3A42FF eJeJ83EJ LD A, CCHAREN > ;RESTORE THE CHARACTER FFB1 FE2QJ eJ084.0 CP 32 ;LOWER ASCII LIMIT FFB3 FA57FF eJeJ850 JP M,READKB ;IGNORE CHAR IF LOWER FFB6 FE7B 0eJ860 CP 123 ;UPPER ASCII LIMIT FFB8 F257FF eJ087eJ JP P,READKB ;IGNORE CHAR IF GREATER FFBB 77 0eJ88EJ LD CHL> ,A ;PRINT THE CHARACTER FFBC 1C EJS890 INC E ;INCREMENT THE LENGTH FFBD 23 .00900 INC HL ;NEXT SCREEN POSITION FFBE 1897 EJEJ9 1f!J JR READKB ;GO BACK 0092f!J FFC0 7A f!J!?J93J?1 ERASE LD A,D ;GET MAX IMUM LENGTH FFC 1 BB .0f!J94J?1 CP E ;COMPARE CURRENT LENGTH FFC2 2fi!JS6 0J?195f!J JR NZ, NOTMAX ;GO IF MAX <> CURRENT FFC4 362.0 !?1096£11 LD eJ THEN GO FFD2 362.0 !?11.!?160 LD CHL> , 32 ;PRINT A SPACE FFD4 18.06 fi!J107fi!J JR BASIC ;BACK TO BASIC FFD6 47 !?11..080 CLINE LD B,A ;DI FFERENCE INTO B FFD7 362.0 01.090 BLANK LD CHL> , 32 ;BLANK OUT SCREEN POSITION FFD9 23 01 1.!?10 INC HL ;NEXT SCREEN POS ITION FFDA 10FB !?11 110 DJNZ BLANK ;UNTIL ALL DONE FFDC 4B 01 120 BASIC LD C,E ;CURRENT LENGTH INTO C FFDD D5 ..01 130 PUSH DE ;SAVE LENGTH INFORMATION FFDE 2A2fi!J40 01 140 LD HL , ;GET ORIGINAL CURPOS FFE1 11.02FF 01 150 LD DE , INPUT ;DEST INATION FFE4 .06.0fi!J 01 160 LD B,f!J ;RESET B FFE6 EDB.0 01 17!?1 LDIR ;SAVE THE TEXT FFE8 D1 01 18!?1 POP DE ;RETRIEVE LENGTH INFO FFE9 26.0.0 01 19.0 LD H,f!J ;RESET H FFEB 6B 012!?10 LD L,E ;F!NAL LENGTH INTO L FFEC C39A0A eJ1210 JP ALARG ;PASS IT TO BASIC 00.0f!J 0122eJ END

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 'Calculate Most Si9nificant Byte 1000 I$ =" " 'Clear the variable to 350 IFTM-256*N2<172THENN2=N2-1 'Make room for rout ine contain the input 369 POKE16561 , 255 : POKE16562 ,N2-1 'Set NEW Top of Memory :X USR(L) 'Make the call 370 CLEAR50 'Make BASIC reco9nize new Top of Memory :POKE VA RPTR(I$),X 'Set the length 389 NT=PEEK <16562) +1 'MSB of Start of Rout ine of 1$ 390 SA=NT*256 'Start in9 Address for Rout ine :POKE VA RPTR(I$) + 1,2 'LSB of address 400 IFSA >32767THENSA=SA-65536 'Prevent OVERFLOW Error to 1$ 419 READA :POKESA,A: READA :POKESA+ 1,A 'POKE first two bytes :POKE VA RPTR(I$) + 2,NT 'MSB of address to 1$ 420 FORI =9T0171 '174 bytes in the DATA statements The argument L is the maximum 439 READA 'Read them length of input to be enforced by the 440 IFA=255THENA=NT 'Chan9e the NON-RELOCATABLE instructions routine. It may be a variable, a constant 450 POKESA+ I+67,A 'Put the byte into memory or an expression. Therefore if L = 15 then 460 NEXTI 'Do the next one the routine will only accept 15 legal 470 'Point to the USR rout ine: characters of input from the keyboard. On 489 ONERRORGOT03920 :DEFUSR=SA: GOT0599 'DISK Systems return from the routine the actual number 490 POKE16526 ,9: POKE16527 ,NT 'CASSETTE Systems of characters entered by the operator is 509 MS=NT*256 'Ref erence ad dress as stated in art icle stored in the variable X. This demonstrates a very power­ 510 IFMS> 32767THENMS=MS-65536 'Adj ust if necessary ful use of the POKE statement in conjunc­ 1900 ' tion with the VA RPTR (or variable pointer) Your pro9ram starts here function. If you have a string variable, for 1910 'This is a demonstrat ion pro9ram example A$, and you type 1029 CLS: PRINT•What is your name? •; '9uestion PRINT VA RPTR(A$) 1939 L=29 'Max imum permitted len9th the address where the length of the string 1940 POKEMS+115,45 'Halve per iod for wh ich cursor is •off • contained in A$ is stored in memory will 1950 POKEMS+136, 191 'CHR$(191> at end of input be returned. Therefore it follows that if you 1069 POKEMS+ 117, 42 'Set cursor •off • character to •*• type 1970 GOSUB2990 'Cal l subrout ine to accept input PRINT PEEK(VARPTR(A$)) then the length of the string contained in 1989 N$= 1$ 'Save contents of input - I$ wi ll be wiped next time A$ will be returned. Similarly, 1090 PRINT:PRINT•Your name is •Ns• .• PRINT PEEK(VARPTR(A$) + 1) 1109 PRINT•How old are you , •Ns•? •; 'New question will return the LSB of the starting address 1119 L=2 'Max imum len9th of the contents of A$ in memory and 1129 POKEMS+96,35 'Set cursor •on• character to •*• PRINT PEEK(VARPTR(A$) + 2) 1130 POKEMS+ 136,69 'End of input char to •<• will return the MSB of the same address. 1149 POKEMS+94,189 'Doub le the or i9inal •off • delay Proceeding further on this idea, if you let 1150 POKEMS+ 117, 32 'Set cursor •off • character to • • F = PEEK(VARPTR(A$) + 1 + PEEK(VARPTR(A$) + 2) * 256 1169 POKEMS+79 ,46: POKEMS+293 ,46 'Len9th of input char to and then type 1170 GOSUB2900 'Cal l subrout ine to ac cept input PRINT PEEK(F) 1189 AGE=VAL (!$) 'Save numer ic val ue of I$ then the ASCII value of the first character 1190 PRINT:PRINTN$ • is• AGE •years old. • in A$ will be displayed. 1290 END 'End o+ Pro9ram The program uses this idea in the 1999 ' last three POKE statements. Since 1$ is Subrout ine to ac cept input from the keyboard and set up the variable set up to contain the input and I$ to point to this input . X is the actual number of characters 299.@ I$=• • 'Clear the var iable to contain the input entered by the operator, it seems reasonable that the length of 1$ should be 2019 X=USR 'Cal l rout ine - set max len9th of L X. This is the purpose of the first POKE 2920 POKEVARPTR ,X 'Set len9th of I$ statement. It merely POKEs X in the 2930 POKEVARPTR

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 = 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- * * * 07/07/83 M I C R 0 - 8 0 P T Y L T D * * ning to the main menu should you have selected this function by mistake. For MENU either type of save the program will re­ quest an 8 character filename, write the KEYBOARD INPUT 5 SAVE DATA file and return to the SAVE MENU. (You 2 LOAD DATA 6 PR INT JOURNALS should make a note of the filename you use, particularly when saving to cassette, 3 READ ' · =:MORY 7 LINEPR INTER UT ILITY as the program requires the name when 4 ED IT MEMORY 8 LEDGER ACCOUNTS you wish to reload the data) .

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 'S DATE REF DETAILS ACC NO DEB IT CRED IT 6. Public Co. Shares 01/07/83 000 1 CAR SERV ICE CP075 43 .24 0. 00 7. Bank Accounts 10/07/83 0002 ENT-BILL MARY CP07 1 75. 40 0.00 15/07/83 0003 MICR0-80 CP076 85. 00 0.00 liabilities 15/07/83 0004 HOUSEKEEP ING CP073 400. 00 0.00 11. 1st Mortgage CP074 230. 63 0.00 12. 2nd Mortgage 31/07/83 0005 BU ILD ING INS. 31/07/83 0005 CONTENTS INS. CP074 250. 00 0.00 14. Credit Charge Accounts 31 /07/83 0006 A BANI< - PRIN. CP01 1 80 .00 0.0 0 15. Friendly Finance Corp 31 /07/83 0006 A BANK - INT. CP077 718. 75 0.00 16. Other Liabilities 31/07 /83 0007 A SBANK - PR IN. CP012 HH). 00 0. 0 0 31/07/83 0007 A SBANI< -INT. CP077 533 .00 0. 00 99. Owner's Equity. 31/0 7/83 0008 FR I ENDLY FINAN . CP015 1000. 00 0. 00 01/08/83 0009 DR . WHO CP082 10. 60 0. 00 Income and Expenditure Items Income 01 /(18/83 0')10 FR I ENDLY FINAN . CP015 9(;?00 . 00 0. 00 51. Husband's Salary 01/08/83 00 11 A SBANI< - PR IN. CP012 1000. 00 0. 00 52. Wife's Salary 10/(18/83 00 12 SCH . FEES - ANN CP08 1 100. 00 0. 00 54. Dividends Received 15/08/83 00 13 COUNC IL RATES CP083 212. 10 0. 00 55. Interest Received 15/08/83 00 14 HOUSEKEEP ING CP073 400. 00 0.00 58. Health Refunds 31/08/83 TOTAL PAYMENTS CP0 10 0. 00 14238 .72 59. Other Income

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 •N• AND AD$< >•v•THEN980 ID$(A$(IJ ,39,8J J:DTfi=DTH+DRH :CTH=CTfi+CRfi :NM$= • t:•+AD$: RETURN 1000 P= C AD$=•Y• J:IF P THEN OPEN • o•,H3, •L :BLM=BLft+DRM-CRfi 1610 LOCATE0, 8:PRINT•PRESS ANY KEY WHEN PTe: • 1280 NEXT DEVICE READY OR (EJ SCAPE *• t:PA=55B :LN 1005 RETURN 129� PRINT:PRI NTZ0$;TAB C36J J:PRINTUSI NGF �1 : GOSUB60:RETURN 1010 ZK$=• •:LOCATE0, 14:PRINT•WHICH •tZ7$ 3$ ;DTM ; CTM 1620 VX$=V1$+ •t•+V2$+•J•+V3$+ • •+V4$+ • ;• DO YOU REQUIRE ** '**'**• ;:FL=l : PA=922 1300 IF P THEN PRINTW3, " •:PRINTM3,ZS$JT •+V5$+ • •+V6$+V7$+ • •+VB$+ '" "'+V9$ : :LN=2 : GOSUB60:E$=AD$: IFE$= •0s•THENE$= ••s AB C36J J:PRI NTH3,USINGF3$JDTfi;CTfi RETURN •:ZK$= •ALL •:GOT01030 1310 PRI NTZ2$J • BALANCEn i:PRI NTUSINGF4$1 1630 GOSUB230 :GOSUB98S :GOSUB230 :GOSUB17B 1020 PA=925 : GOSUB60: E$=E$+AD$ :PA•928 :GOS BUt 0:LOCATE15, 7:PRINT•* * * W A I T * * * UB6� : E$=E$+AD$ : RETURN 1320 IF P THEN PRI NTB3,Z2$8 " BALANCE "B!P •:FOR I=l TO W-1:GOSUB1570:LBCIJ=VAL CRIG I 1111111 1030 GOSUB23S :LOCATE0,3:PRINTPT$t • •;Z4$ RINTfi3 ,USINGF4$JBLfi HT$ CV7$ , 3) J:NEXTI : J=0: DTM=0:CTM=9: BLH=0 n ;• FOR •;zK!fi; •c•;Z7$ ; •J•;E$: IF P THEN PR 1330 PRINT :PRINT: IF P THEN PRINTM3, " •:p 1640 GOSUB230: PRINT:PR INT•ACC NO. •JTAB C1 INTH3, • '":PRINTH3,PT$; • "JZ4$ ; • FOR ··zK RINTM3, '" • 6J ;Z6s ; •s• ;TAB C34J ;Z�s ;•s• vTAB (55J UZ0$ :u $; •c•;Z7$ ; •J• ;E$ 1340 GOT01 26� 1650 IF P THEN PRI NTM3, • ":PRINTM3, •ACC 0 I 1040 DTM=S :CTH=0 : BLM=S: GOSUB520 1358 X1$="SAVE To•:GOSUB� �80 No . •;TAB (16J ;Z6s ; •s• ;TAB C34J U Z5$J •s• tTAB 1050 FORI=lTOW ()') 1366 GOSUB1 59f1J C55J ;Z0$ 0 1060 IFMID$ CA$CIJ,26,2J < >KA$THEN111S 1370 IF SF=3THEN2�0 1660 TTM=0:DRD=0 :CRM=0: J�J+1 1070 IFE$=••s•THEN1990 1380 GOSUB1600 1670 VF=LB CJJ :FORI=1TOW: IFL B(IJ=VF AND L 1080 IFE$< >LEFT$CA$Cii ,6JTHEN1110 1398 GOSUB161S! IF AD$= "E" THEN GOT01350 BCI><>0THENGOSUB1770 1090 GOSUB1570: GOSUB1620: PRINTVX$: IF P T 1400 IF SF=1 THEN N1$=RIGHT$ CNM$ , 8J :OPEN 1680 NEXTI:LB(JJ=S: IFJ=WTHEN1740ELSE169S HEN PR INTM3 , VX$ •o• ,fi2, •CASS: DATA •;pRINTM2, Nl$, W 1690 IFVF=0THEN1660 110� DRH=VAL CMID$CA$CIJ ,31,8J ):C RM=VAL CM 1410 IF SF=2 THEN OPEN•o•,1,NM$ 1700 TTM=DRM-CRM: DTM:DTM�DRM :CTM=CTM+CRH ID$CA$CIJ ,39, 8J J:DTM=DTM+DRH :CTM=CTH+CRH 1428 IF SF=1 THEN FOR I=1 TO W STEP4 :PRI :BLM=BLM+TTM :BLM=BLM+DRH-CRM NTM2 ,A$ SB$ THEN SB$=A$ (SP. � 1170 PR INTM$: PRI NTM3,M$: GOT01160 :INPUTM1 ,A$CIJ:NEXT: CLOSE J:A$CSAJ =A$ CSA+l )!A$CSA+1 J =SB$ 154.111 GOT01450 1810 NEXTSA :NEXTSC : RETURN 330 L= LEN !LE$1 : IF RI$=• • THEN R= -1 E L 720 IF L0=7 THEN L0=8 ELSE IF L0=19 THEN SE R= LEN ! RI$) L0=20 ELSE IF L0=20 THEN L0=21 349 FOR I=1 TO VB: IF L> LEN CA$(I)) THEN 730 IF LO=OL THEN GOSUB 1860 a E 360 740 RETURN s: 350 IF LE$< > LEFT$ (A$(ll ,L) THEN 360 EL 750 IF L0=2 THEN L0=3 ELSE IF L0=3 THEN m 380 .t:>. S S SE L0=4 ELSE IF L0=7 THEN L0=10 **** IRIU ADVENTURE **** z 360 760 20 NEXT I I F L0=8 THEN L0=7 ELSE IF L0= ��N 9 370 IF C$( >•• THEN PRINT•! don't unders L0=19 ELSE IF L0=21 THEN L0=20 .t:>. HITACHI PEACH tand •cHR$ ! 34 );Cs;CHR$ C 34 )•, chec k my vo 770 IF LO=OL THEN GOSUB 1860 z cabu lar y. •: GOTO 270 780 RETURN �m 380 IF R= -1 THEN 420 790 IF L0=7 THEN L0=6 ELSE IF LO= i8 THEN s: 18 REM SIRIUS ADVENTURE CD 390 1 1860 70 1983 M FOR J = TO ND L0=17 ELSE GOSUB m REM CC I MA Y L ADEN BAUK . :n 400 IF RIS< >BS(J) THEN NEXT J ELSE 420 800 RETURN 30 RE� 0 410 810 m M I PRINT•I don' t understand •cHRS !34l ;R IF L0=6 THEN L0=7 ELSE IF L0=17 THEN 0 40 REM OD FIED FOR THE HITACHI PEACH m IS; CHR$!34) •, check my vocabulary. •: GOT L0=18 ELSE GOSUB 1860 BY -- MICR0-89 s: 0 270 820 RETURN CD 69 C LS: S CREEN0, ,0 m 420 ON I GOSUB 450, 450,459, 450, 830, 889, 8 830 IF J=0 THEN J=3 :n 70 LOCATE7 ,4:PRINT• S I R I U S •:LOCAT 80 , 880, 950 , 950, 950, 950,980 , 1050,980, 1230 840 IF J< >2 THEN PRI�T·I can' t eat that E7,5:PRINT• ADVENTURE •:FOR X=1 T02900:N co ,98 0, 1 120, 1160, 1290, 1360 ,2010 , stupid. •: RETURN CXl EXT :CLS � 430 IF I>4 AND I<13 THEN 210 850 IF J=2 AND B(J)=0 THEN PRINT•I alrea 80 CLEAR 200 : VB=22 : ND=26 : L=21 : OB=6 : 440 180 170 dy ate it. •:RETURN L 33 IF I=22 THEN ELSE N= 7 450 860 IF J=2 THEN S: IF J - the creambun was de l icious! •: BC2 l = e• : PM$=• )•: PF$= • • 460 J=J -OB: ON J GOTO 550, 640, 710, 750,55 0: RETURN 100 LOCATE9,5:PRINT"Press : nstruct i 0,640 ,710, 750,470,490 ,510, 539,470,490,51 870 PRINT"ERROR• : STOP ons or • 0, 530, 790, 810, 790, 810 880 IF J>OB THEN PRINT"I can't •cHR$ (34) 110 LOCATE17,6:PRINT• e9in. •: CL$= • 470 IF L0=13 THEN L0=1 1 ELSE GOSUB 1860 ;CS; CHR$(34) •.•: RETURN i 480 RETURN 890 IF BCJ)= -1 THEN PRINT•I already hav 120 DIM A$ !VBJ , B$ !NDJ, L$ ( Ll , B!OBJ : GO IIIII 490 IF L0=12 THEN L0=11 ELSE IF L0=14 TH e it!": RETURN SUB 1430 f) EN L0= 15 ELSE GOSUB 1860 900 IF B!Jl< >LO THEN PRINT•I can't see 130 A$= INKEY$ : IF A$ =• • THEN 130 :u 500 RETURN the •;BS(J);• here. ":RETURN 140 IF As=•I• THEN 1720 510 IF L0=11 THEN L0 =12 ELSE IF L0 =15 TH 910 I T=1 : FOR I9=1 TO OB : IF BCI9>= -1 T 0 150 IF AS< >"B" THEN 130 a EN L0=14 ELSE GOSUB 1860 HEN IT=IT+1 160 CLS Q) 520 RETURN 920 NEXT I9: IF IT>3 THEN PRINT•I am carr 170 IF LO�OL THEN 270 0 1860 yi 180 OL=LO: CLS: 15,3 530 IF L0=1 1 THEN L0=13 ELSE GOSUB n 9 too much, chec k inventory. •;: RETURN L OC ATE : PRINT•st rius A 540 RETURN 930 PRINT•Ok. I ad d a •B$(J) • to my inve dven ture• 550 IF L0=2 THEN L0=1 ELSE IF L0=5 THEN ntor y. • 190 IF L0>4 AND B!1l< > - 1 THEN PRINT: P L0=4 ELSE IF L0=6 THEN L0=5 940 B(J)= -1: RETURN RINT " It's too dark to see! •: GOTO 2 560 IF L0=7 THEN L0=9 ELSE IF L0=1 1 THEN 950 IF J>OB THEN PRINT•I can•t •cHR$ (34) 70 L 0=7 ;C$;CHR$ (34) •.•: RETURN 200 PR INT"I am . .. •:PRINTL$ (L0l 570 -1 187 960 IF B!J>< > -1 2 10 LINE<9, 190l -(656 , 1001 ,PSET IF L0=16 AND B(4)= THEN GOSUB THEN PRINT•I don•t hav 0 e a •RI$: RETURN 220 TR=0 : LOCATE7 ,20:PR I NTCLS; : L OCATE7, 580 IF L0=16 AND B!4> < > -1 THEN L 0= 17 970 BCJJ=L O: PRINT•ok •: RETURN 2B :PRINT"Visible obj ec ts >>> •; 599 5 -1 19 980 IF J>OB THEN PR INT"I don't see anyth 230 IF L0=18 AND B ( l = THEN L0= FOR I=J TO DB 609 -1 1 IF IF L0=18 AND B(5l < > THEN GOSUB in9 spec ial .•: RETURN 740 BIIJ=LO THEN PR I NTBS(IJ;•. •;: T 870 990 -1 R= -1 IF B< > THEN PR INT"I am not ca 610 L0=16 250 IF L0=15 THEN rryin9 a •BS(J) : RETURN NEXT I 620 1860 1000 1010, 1020, 1030, 1030 , 1030 , IF -1 C 27, 0: • IF LO=OL THEN GOSUB ON J GOTO 260 TR< > THEN L O ATE 2 PRINT N RETURN 1040 one . •; 630 640 IF L0= 1 THEN L0=2 ELSE IF L0=4 THEN 1010 PRINT•It burns bri9h tly. •: RETURN 270 LOCATE0, 15: PR INT.What should I do?• ; L0=5 ELSE IF L0=5 THEN L0=6 1029 PRINT•It looks tasty !•: RETuRN CL$; : C$=• •:GOSUB 1900 : PR INT: PRINT 650 I F L0=9 THEN L0=7 ELSE IF L0=7 THEN 1030 PR INT•Ma9ic seems to emanate +rom t 280 Cs=• • THEN PR INT "Huh?": GOTO 270 IF •B$CJl : 1=1 S MID$( C$ L0=1 1 ELSE IF L0=16 THEN L0=15 he RETURN 290 FOR TO LENIC $) : IF A C ( 660 I L0=16 1040 , I, ll l=32 THEN 3 1 0 F L0=17 THEN PR INT"Its beautiful !": RETURN 670 IF L0=19 AND B(5)= -1 THEN L0= 1 8 1050 IF J>OB THEN PRINT•You are be in9 si 300 NEXT I: GOTO 320 680 IF L0=19 AND B ! 5 l < > -1 THEN GOSUB 1 lly. •: RETURN 3trnLE $= LEFT$ ! CS , I-ll: RIS= MID$( CS, ;g 870 1060 IF B(J)< > -1 THEN PR INT•I don' t ha G) 1�1. LEN 3 THEN PRINT•Wav in9 the •B$( 710 IF L0=3 THEN L0=2 ELSE IF L0=4 THEN J) :PRINT• is not very reward in9. •: RETUR L ELSE 0= 3 IF L0=10 THEN L0=7 N 1�80 PRINT "The room dims and blurs, and . 1490 FOR 1=1 TO OB: READ Bfl) : NEXT I 17�� DATA •in a large room , littered wit ' 1500 FOR 1=1 TO L: READ L$ ( I): NEXT I: R h alabasterslabs. Some obvious ex its: We j;2 1000 FOR 1=1 TO 1��0 : NEXT I ETURN st . East .• m(j) 11�� IF L0= 13 THEN L0= 14 ELSE IF L0=14 T 1510 DATA •at a plateau near a cliff. A 1710 DATA •tn the throne rocm of the ev i 1\J HEN L0= 13 ELSE PR INT"noth in9 happens. •: rocky path leads south. Some obv ious ex J Ur l ord ! A low door leads east . Some o RETURN its: South ." bvious ex its: East .• 1110 PR INT "! am m�9ical ly transported !•: 1520 DATA •on a rocky path lead in9 north 172� CLS: LOCATE7,3:PRINT••;:PRINT•Your q FOR 1=1 TO 10�� : NEXT I: RETURN and curvin9 to the east . Some obv uest is to explore the cave of- the• ; 112� PR INT"Conf irm ?" ;: C$= • •: LO ious ex its: North. East .• 1730 PRINT •evil Ur lord , and br in9 back t C�TE7, 3:PRINTN, CL$: GOSUB 19�� 1530 DATA "at the ent rance to a dark cav o the ed9e of the cl iff the fol lowing va 113B IF C$=•y• THEN A=USR1 (�) !CLS: END e. A rocky path to the west curves north luab les: • 1140 IF C$( >•N" THEN 112� . There is a si i9ht breeze.Some obv ious 174� PRINT•1. The white go ld rin9. • 11�0 PR INT:PRINT:PRINT"Conf irm

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 ont inue. • 120� PR INT" You have"IN"points out of a p Some obv ious ex its: North. South• 1809 FOR 1=1 TO 4990 ossible 60 . " 1569 DATA •in an ova l cavern. There is a 1810 A$= INKEY$: IF A$=•• THEN 184� 1210 IF IN=6� THEN A=USR1 (�) :CLS: END forbiddin9stone stai rcase here. Some ob 182� IF A$< >•c• THEN 1819 122!J RETURN vious ex its: North. Down. • 183� GOTO 17� 1230 PR INT"! am carryin9 >>> •; 157� DATA •tn a hi9h , square cave with w 184� NEXT I 124� IN=0 : FOR 19=1 TO OB al l5 of- frozen ice. There are passa9e 1850 GOTO 17� 1259 IF B(l9)= -1 THEN PRINT"A "B$(I9J ;• s in many direct ions. Some obv ious ex it 186� PRINT• You cannot 90 in that direc ti . •;: IN= -1 s: North. South . West . East . Up .• on .•: RETURN I 1260 NEXT 19 1580 DATA •tn a triangu lar side-chamber . 187� PR INT•An invisible -force prevents y - 1270 IF IN< > -1 THEN PRINT "No thin9 at a Some obv i ous ex its: East .• ou -from pas sin9. • n 188� FOR 1=1 TO 1��� : NEXT I II.•: RETURN 1590 DATA "in a musty-smel l in9 alcove . S lJ 1280 RETURN orne obv i ousex its: South.• 189� RETURN 0 1290 PRINT" Ready tape .•.pr ess " 1690 DATA •in an eer ie chamber - smal l s 19�0 LOCATE18, 15:PRINTC$;PM$; • •; I 13�0 IN$= INKEY$: IFIN$="•THEN1 399 queal in9 sounds come from the walls. S 1919 A$= INKEY$: IF A$=•• THEN 191� co 1310 OPEN "O",ff1, "CAS0 : URLORD " orne obv i ousex its: West .• 192� LOCATE18, 15:PRINT,PF$; : A=ASC (A$) 0 1320 FOR !9=1 TO OB: PRINTH1 ,B(I9J ;: NEX 1610 DATA "in an enormous cave . There is 1930 IF A>31 THEN 199� 1940 IF A=B AND LEN (C$) )� THEN C$= LEFT$ T 19 a doub le pil lar of green stone down th 1330 PR INT tt1 ,LO e centre. Some obv i ous ex its: North. So (C$,LEN (C$) -1)! LOCATE18, 15:PRINTCL$; :LO 1340 CLOSE ff1 uthwest . Southeast .• CAT E18, 15 :PRINTC$; : GOTO 19�0 ELSE IF A

1 350 RETl.lRN 1620 DATA "in a ma l odourou5 tunnel . Some =8 THEN 19�0 1360 PR INT"Ready tape •..pr ess • obv ious ex its: Northeast .• 1950 IF .A=13 THEN GOSUB2�40 :FOR X=15 TO 1370 IN$= INKEY$: IFIN$=••THEN1 379 163� DATA •in a room in wh ich the on ly V 23 : LOCATE�,X:PRINT • 1380 OPEN "I",ff1, aCAS0 : URLORD• !SIBLE ex itis the way I came in. Some ob •:NEXT : LOCATE0,15:RETU C5 1390 RN E FOR I9=1 TO OB : INPUTH1 ,B(I9) ! NEXT vious exi ts: Northwest• � I9 164m DATA "in a sec ret room,reached on ly 196� IF A=19 THEN A$= CHR$ (92) ELSE IF A m =27 THEN A$=•@• +:>. 1400 INPUTtt1 ,LO by ma9icalmeans. Some obv ious ex its: No z 1410 CLOSE tH rtheast .• 197� IF A=9 THEN A$= CHR$(187) ELSE IF A 9 1420 RE TURN 1650 DATA •in a oc ta9onal room . Some obv =31 THEN A$=•%• +:>. 80 IF A=24 THEN C$=••: LOCATE18, 15:PRI 143@ r_ o= 1 ious ex its:North. Southwest. • 19 z 144? F�R 1=1 TO VB: READ A$ ( 1): NEXT I 166.0 DATA •tn an enormous misty cavern. NTCL$; : GOTO 19�0 m� 1450 FOR I=1 TO ND : READ B$ ( 1): NEXT I Mist obscures the cei lin9. Some ob 1990 C$=C$+A$ ! IF LEN (C$J )20 THEN RETURN � (JJ 1460 DATA GO , WALK ,RUN, CRAWL,EAT,GET , TAKE vious ex its: North . South. • 2��� LOCATE18, 15:PRINTC$j ! GOTO 19�� m ::n ,GRAB ,DROP , THROW,PUT , LEAVE ,LOOK, WAVE ,EXA 167� DATA "in a tiny box-shaped room . Do 20 10 CLS: LOCAT E15, 3:PRINTA$(22) ! LOCATE7, 0 M!NE, INVENTORY ,IN SPECT ,GUIT,SCORE ,SAVE,L or leads south and stairs lead down . S 4:PRINT; m m0 OAD , VOC�BULARY orne obv i ousex its: South. Down. • 2020 FOR 19=1 TO VB : PR INT A$ (19) ,: NEXT � DATA LAMP,BUN ,ROD ,RING,STATUE ,CROWN 168� DATA "in a stran9e room . There •s a I9 (JJ 1470 m ,N,S,W,E, NORTH,SOUTH, WEST, EAST,NW, NE , SW , faint wh iffof chlo rine. Some obv ious exi 2030 A$= INKEY$: IF A$=•• THEN 2�39 ELSE ::n S� , NORTHWEST , NORTHEAST ,SOUTHWEST , SOUTHEA ts: North. Up ." RETURN <0 (X) ST ,UP, DOWN,U, D 169� DATA "in a steamy chamber , with war 204� X= f PEEK (39)*256+PEEK (4�) )-fPEEK (33) � 1480 DATA 1,6,9,8, 12,21 m wal ls. Some obv ious ex its: West. Sout *256+PEEK (34) ):RETURN

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 :NEXT 370 X=X-1:E=E+l:IF X=< 259 THEN M 615 PRINT•satel lite"CHR$C128) •ce 0 110 PR INT @365 , B$; =M-400 : GOSUB580: GOT0500 ased "CHR$C128J •to• ;:PRINT@160, •f I 12� FOR T=l TO 8: PLAY •01L20CP1QJ• 380 GOSUB 430 unction•;:PRINT@230, •ea rth•CHR$ C Q) :NEXT 390 GOT0230 128) "was•cHR$(128J •destroyed •; 0

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 . • :PR 500 R=R+l:Sl=S 1+1: IF R>ll THEN 7 F Q$="N" THEN END ELSE 700 INT" BE WARNED THE RAYS TRAVEL 20 ELSE CLS0:FOR Z=1 TO 10:X1=RN 710 REM YOU'VE WON AT EVER INCREASING SPEEDS. " DC64l - l:Y1 =RND C32) -1:SE TCX1,Y1,5 720 CLS0:PRINT@170, "con9ra tulat i

15� PR T NT@484, "PRESS TO l :NEXT ons• ;:PRINT@234, "ea rth•CHR$(128) BEG IN" ; 510 IF S1>=5 THEN S1=2:SH=SH+ 1:I "was"CHR$(128) •saved•; :A=361 :GOf 1�0 T=- 1 F SH >5 THEN SH=5 0640

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 , B$ (ND> , L$ (L) , B )•!•: GOTO 270 770 IF LO=OL THEN GOSUB 1860 0 (0B) : GOSUB 1430 I 460 J=J -OB: ON J GOTO 550,640 ,71 78£'J RETURN 130 A$= INKEY$ : IF A$=• • THEN 13 0) 0, 750, 550,64 0, 710, 750 ,470, 490, 51 790 IF L0=7 THEN L0=6 ELSE IF LO 0 0 0, 530,479,490s510, 530, 790, 810, 79 =18 THEN L0=17 ELSE GOSUB 1860 140 IF A$=•I• THEN 1720 9,810 800 RETURN 150 IF A$( >,B. THEN 13� 470 IF L0=13 THEN L0=11 ELSE GOS 810 IF L0=6 THEN L0=7 ELSE IF LO 160 PCLS UB 1869 =17 THEN L0= 18 ELSE GOSUB 1860 170 IF LO=OL THEN 270 48� RETURN 820 RETURN 180 OL=LO :PCLS: PRI NT@8, •Strius 499 IF L0=12 THEN L0=1 1 ELSE IF 830 iF J=0 THEN J=3 Adventure• L0=14 THEN L0=15 ELSE GOSUB 1860 840 IF J< )2 THEN PRINT•I can•t 190 IF L0>4 AND B(1J< > -1 THEN 500 RETURN eat that , stupid. •: RETURN PR INT: PRINT • It•s too dark a 510 IF L0=11 THEN L0=12 ELSE IF 850 IF J=2 AND B(J)=0 THEN PRINT to see! •: GOTO 270 E L0=15 THEN L0= 14 ELSE GOSUB 1860 •r already ate it. •:RETURN s: 200 PR INT •J am ... •:PRINTL$ (L0) m 520 RETURN 860 IF J=2 THEN PR INT •Munch, cho 210 LINE <0, 100J - (256 , 100) ,PSET � 530 IF L0=11 THEN L0=13 ELSE GOS - the creambun was de z 220 TR=0 : PR I NT@448 ,CL$ ; : PRINT@ mp , 0 UB 1860 1icious• ": B\2)=0: RETURN 448, "Vislble obj ec ts >>> •; -J:>. 540 RETURN 870 PR INTDERRORD : STOP 230 FOR 1=1 TO OB -z: 550 IF L0=2 THEN L0=1 ELSE IF LO 880 IF J>OB THEN PR INT•! can't " 240 IF B(I)=LO THEN PR I NTB$(1) ;• � =5 THEN L0=4 ELSE IF L0=6 THEN L CHR$(34);C$; CHR$ (34) •. •: RETURN m . •;: TR= -1 $': 0=5 890 IF B(Jl= -1 THEN PR INT•I air OJ 250 NEXT I m 560 IF L0=7 THEN L0=9 ELSE eady have it••: RETURN :0 260 IF TR< > -1 THEN PRINT@468, • IF LO 900 0 =1 1 THEN L0=7 IF B< >LO THEN PR INT• I ca m None. •; 0 570 IF L0=16 AND B(4)� n• t see the •:PRI NTB$(J) • here. • 270 PRI NT@320, .What shou ld I do? -1 THEN G m :RETURN s: •;CL$; : C$=••:GOSUB 19�0 : PRINT : OSUB 1870 CD 910 IT=1 : FOR I9=1 TO OB: IF D - m PRINT 580 I� L0=16 AND B(4)< > -1 THEN :0 L0= 17 9)= THEN IT=I1 +1: NEXT I9 ELS 280 IF C$=• • THEN PRINT•Huh?•: G -1 (() E NEXT 19 OTO 270 590 IF L0=18 AND B(5)- -1 THEN L a:, 920 IF IT>3 THEN PRINT•! am carr � 290 FOR 1=1 TO LENCC$) : IF ASC ( U= 19 ying too much, chec k inventory MID$( C$, I, 1))=3?. THEN 310 6@0 IF L0= 18 AND B(5} < ) -1 THEN .":RETURN 300 NEXT I: GOTO 329 GOS!JB 1870 930 pr:nNT "B$(J) :PR "Ok . I add a 1250 IF B119J= - 1 THEN PRINT "A • 1540 DATA "just inside a dark ca B$ INT•to my inventory .• ( I 9 I ; "' . '" ; : IN= - 1 ve . Li9htcomes from an entranc (§ 940 B!Jl= -1: RETURN 1260 NEXT 19 r e to the west . Ther� is a �an s::c 950 J>OB THEN PR IN • ! can't • 1270 IF IN< > -1 THEN PRINT •Not h IF T k, mouldy smel l. A tunnel .2ad rn CHR$!34l ;C$; CHR$!34J •.•: in9 at al l.": RETURN RETURN s south . Some obv i ous ex its: W z.p.. B(JJ< > 960 IF -1 THEN PR INT"! d 1280 RETURN es t. South. • 0

••. " tunnel . Some obv i ous ex its: z N 0 980 IF J>OB THEN PRINT" ! don' t s 1300 IN$= INKEYS: IFIN$='" •THEN13� or th. South'" < ee m ?ntth1n9 special.•: RETURN f{J 1560 DATA •in an ova l cavern. s:: 990 B!Jl< > OJ IF -1 THEN PR INT•! a 1310 OPEN" O" ,W-l, •URLORa • There is a forbiddin9 stone stai m :0 m �at carry in9 a "BS(JJ : RETURN 1320 FOR 19=1 TO OB : PRI NT#- l,B( rcase here. Some obv i ous ex its: N 0 1000 ON J GOTO 1010, 1029, 1030, 10 I91 ;:NEXT 19 orth. Down. • m 0 0 30 , 1030 , 1 4 0 1339 PRINTtt- 1,LO 1570 DATA '"in a high,square cave !] 1340 CLOSEM-1 1010 PR1NTu lt burns br i9h tly. ·� wi th wa l lsof frozen ice. There a 65m RETURN 1350 RETURN re passa9es in many direc tion s.So :0 1020 PR INT"It looks tasty ••: RET 1360 PR INT " Ready tape •••pr ess '" URN st .East .Up. • �co 1030 PR INT"Ma9 ic �eems to emanat 1370 INS= INKEYS: IFINS=••THEN137 158� DATA •in a tri an9u lar side­ •as!JJ : e from the RETURN 9 chamber . Some obv ious ex its: E 1040 PR INT" Its beau tiful �·: RETU 1380 OPEN • I•,tt-l, '"URLORD" as t. • RN 1390 FOR 19=1 TO OB : INPUTtt-l,B«I 159� DATA "in a musty-sme l in9 a J>OB 1050 IF THEN PRINT " You are 9) :NEXT !9 Icove . Some obvious ex its: South. be in9 si l ly. •: RETURN 1400 INPUT#-l ,LO B!J)< > 1060 IF -1 THEN PRINT"! 141.0 CLOSEtt- 1 1b0� DATA •tn an eer ie chamber - don't have the "B$(J) •. •: RETURN 142f'l RETURN smal l squeal in9 sounds come 1070 IF J< >3 THEN PR INT"Wa vin9 143f'l L0=1 i from the wal ls.Some obv ious ex 1111111 "B$!JJ :PRINT• the is not very re 1440 FOR 1=1 TO VB : READ A$ (1): its: Wes t. • n ward in9. • : RETURN NEXT I 1610 DATA "in an enormous cave. :D 1080 PR INT�The room dims and blu 1450 FOR 1=1 TO ND: READ DS ! II: There is a double pi l lar of 9r r· s, and ... NEXT I een stone down the centre. Some 0 M; I J090 FOR I=1 TO 1000 : NEXT I 146� DATA GO , WALK ,RUN, CRAWL,EAT , obvi ous exits: North. Southwe (» 110 � IF L0=13 THEN L0=14 ELSE IF GET ,TAKE , GRAB,DROP , THROW,PUT ,LEA st . Southeast ." 0 L0=14 THEN L0=13 ELSE PRINT "not VE , LOOK ,WAVE , EXAM!NE, I N VENTORY ,I 162� DATA •in a malodourous tunn hin9 happens. •: RETURN NSPECT ,QUIT, SCORE ,SAVE ,LOAD , VOCA el . Some obv i ous ex its: Nor the

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 ?" ;: C T,EAS T,NW, NE,SW,SE,NORTHWEST ,NOR ay I came in.Some obv ious exits $= ·•: PR INT@LN , CL$ : GOSUB 1900 THEAST ,SOUTHWEST , SOUTHEAST ,UP,DO : Northwest• 1 1 0 TH E N A=USR1 (0J :CL WN , U, D 3 IF C$=•Y" 1640 DATA •in a secret room,reac S: END 1480 DATA 1,6,9,8, 12,21 hed on ly byma9ical means . Some ob 1140 IF C$< >"N" THEN 1120 1490 FOR 1=1 TO OB : READ B(l) : N v!ous ex its: Nor theast .• 11�0 PRINT:PRINT: PRINT"Conf irm EXT I 1650 DATA "in a oc t a9onal room.S ": RETURN 1500 FOR 1=1 TO L: READ L$ (1) : N ome obv iousex its: Nor th. Southwe 19=4 11h0 JN=0 : FOR TO 6 EXT I: RETURN st .• 117 0 IF B!I9) =1 THEN IN=IN+20 1510 DATA •at a plateau near a c 166� DATA "in an enormous misty

l 1 R0 NE � f 19 liff. A rocky pa th lead s so cavern . Mist obscures the cei IF IN=60 THEN 119 0 PRINT•Fan tast uth. Some obv i ous ex its: South. lin g. Some obv ious ex its: Nor th. ic' you h�ve so l ved the adven tu South .• r" e •" 1520 DATA •an a roc ky path lead i 1670 DATA "in a tiny box -shaped 1200 PR INT"You have" IN"points •: n9 north and curv in9 to the ea room . Door leads south and stai r PR INf"o11 t nf � pnss ible 60 . " st . Some obv ious ex its: North. s lead downSome obv i ous ex its: S IN=A0 THEN A=USR 1 !0l :CLS 1710 IF E�st ... ou th. Down .• 1530 DATA •at the entra nce to a : ENP 168� DATA "in a stran9e room . l ] !77Cl RF: fURN dark cave . A rocky path to the w here is a faint wh iff of chlori GJ m PR INT"! am est curves north. There is a sl i ne . Some ob vious ex its: North. 1?3� carryin9 >>> t0 Ul !24A IN�0: FOR 19=1 TO OB gh t breeze. Some obv ious ex its: W Up . • E;ost_. " es • . 230 IFPEEK !K2l=25 I THENPR INT@GP, B JOQ@ C$=C$+A$ : IF LEN!CSl >20 T HE Ji,<:.>OI !lA TA "1n a st Pamy chamber' , N RE TURN L$ ; : GP=GP+ 1:PO I:EK2, 0: I FGP"-� 10THE wt t� warm wa lls. Some obv ious e :g NGP=509 2800 PR I NT@LN,CS; : GOTO 1900 Cl '< 1 t s: Wes \ . ;:; ou t h. " m 20 10 PCLS :PRINT@8,A$!22l :PRINT@6 240 1FGOTHENIFPEEK !K31=247THENM= DATA large room , lit t r0 1700 •tn a (]) 4, ; GP -480: M=M*2:M=M+1:G0=0:f=-1:POK Pr�� wi th alahaster slabs . Some FOR 19=1 TO VB : PR INT A$ !19 EK3 ,0 obv io�s ex its: West. East .• 2020 l,: NEXT 19 250 POKE 1 7023 ,0: SOUND 100, 1:SOUND 1710 DATA "in the thr one room of A$= INKEYS: IF A$=• • THEN 20 200, 1 the ev i I Ur 1 or d 1 A I ow door 2030 30 ELSE RETURN 260 IFFTHENY=Y-1 : 1FY ont i nue. • 50 KK= 1 400 CLS C0) 1800 FOR 1=1 TO 4000 3: - 60 K1=16946 : K2= 1 6948 :K3=1 6952 :PO 410 V7$=BL$ 1810 A$= INKEY$: IF A$=• • THEN <120 F=0: G0=- 1 n 840 KEK1 ,0:POKEK2 ,0:POKEK3 ,0 430 GOSUB 150:SOUND20 ,2: SOUND10, 4 :a 1820 IF A$( >"C" THEN 1810 70 CLS !0) 80 0=0 : GOSUB300:V1$=TF$:0 =16: GOS :SC=SC+10: IFSC=70THENGOT0450 1830 GOTO 170 0 440 RETURN I 1840 NEXT I UB300 : V2$=TF$ :0=32 : GOSUB300 :V3$= 450 CLS: PRINT"YOU WIN. YOUR SCOR ()) 1850 GOTO 170 TF$ : 0=48 : GOSUB300 :V4$=TF$: 0=64:G E WAS 100• : GOT0470 0 1860 PRINT " You cannot go in that OSUB300 :V5$=TF$ :0=80 : GOSUB300 460 CLS:PRINT •YOU LOST . YDUR SCO direction. •: RETURN 90 V6$=TF$:0=96: GOSUB300 :V7$=TF$ 100 BL$=CHR$ C128 l +CHR$ !128 ) RE WAS ";SC 1870 PRINT"An invisible force pr 110 GN$=CHR$ !247l +CHR$ C242 ) 470 PR INT"PLAY AGAIN CY/N) • events you from pas sing. • 480 IN$= I NKEY$: IFIN$="•THEN480 120 GP=490 1880 FOR 1=1 TO 1000 : NEXT I 130 P= 1 490 IFIN$="Y"THENRUN30 1890 RETURN 140 GOSUB150:GOT01 70 500 CLS : PRINT"BYE " 1900 PRINT@LN+LEN CC$l ,PM$ ; 150 DL$=BL$+BL$+BL$+Vl$+BL$+BL$+ 510 END 1910 A$= INKEY$: IF A$=• • THEN 1 V2$+BL$+BL$+V3$+BL$+BL$+V4$+BL$+ �L� CLS :PRI�T"�J��·� MC 1g MICRO a 910 E BL$+V5$+BL$+BL$+V6$+BL$+BL$+V7$+ VADERS ****** "; s: 1920 PR I NT@LN+LEN CC$l ,PF$; : A=AS m BL$+BL$+BL$ 530 PRINT:PRINT•SHOOT DOWN ALL 0 CCA$1 � 160 RETURN F THE INVADERS BEFORE THEY LAND z 1930 IF A>31 THEN 1990 0 170 PRI NT@GP ,GN$ ; TO WIN. 10 POINTS FOR EA 1940 IF A=8 AND LEN!C$) )0 THEN C � 180 I=l+l: IFI=50THENI=0:CL S(0) :K CH INVADER THAT " $= LEFT$ !C$,LE N!C$l -1 l: PRI NT@LN =K +32:KK=KK+2: Y=29 :F=0 :GO =-l : IFK 540 PRINT"IS DESTROYED. A BONUS z ,CL$; :PRINT@LN,C$; : GOTO 1900 EL =448THENGOT0460 OF 30 POINTS IS AWARDED FOR m2 SE IF A=8 THEN 1900 s: 190 PRINT@K,MID$CDL$,P,32l ; DESTROY I NGALL THE INVADERS . MAXI 1950 IF A=13 THEN GOSUB2040 :PRIN OJ 200 IFOKTHENP=P+l :IF P+20=LEN CDL$ MUM SCORE IS 100" m T@320, "";:FOR 9= 1T08:PRINT" JJ )THENOK=0 550 PR INT "PRESS TO MOVE LEFT •; :PRI m0 210 IFNOTOKTHE NP=P-l : IFP=lTHENOK PRESS TO MOVE RIGH () NT@320 , "";:N EXT : RETURN m = - 1 T PRESS THE SPACE BAR TO s: 1060 IF A= 10 THEN A$= CHR$ !92) E OJ 220 IFPEEK CK1l =254THENPRINT@GP,B FIRE " m LSE IF A�27 THEN A$="@" JJ L$;: GP=GP- l:POKEK1 ,0: IFGP=479THE 560 PR INT :PRINT"PRESS ANY KEY TO 1970 IF A=9 THEN A$= CHR$C187l E NGP=480 BEGIN" (!) LSE IF A=3 1 THEN A$= "%" OJ 570 IN$= I NKEY$: IFIN$="" THEN570 � 1980 IF A=24 THEN C$=• •: PRI NT@L 580 RETURN N,CLS; : GOTO 1900 00240 **** L2/4K BOLD TYPE FOR THE LPVII **** 0�250 YOUR BASIC PROGRAM WILL STILL RUN AFTER YOU 00260 HAVE PUT THE SPACES IN. a 00270 TRS-89/SYSTEM-89 -THIS PROGRAM SHOULD NOT BE USED TO SPACE OUT s::E 0028£1 BASIC PROGRAMS WITH VERY LONG LINES, AS THEY m -1'>­ 00290 MAY BECOME TOO LONG WITH THE EXTRA SPACES. z £10300 S 19 LPRINT.THIS IS A •; :P$= •TEST• : GOSUB1909 fitt NOTE-CMD ..SPA CE" DOES NOT WORK FROM NEWDO -89, p 2� LPRINTU OF THE •; :P$= - BOLD TYPE•: GOSUB1999 003 10 'J BUT MUST BE RUN WHILE IN DOS . -1'>- 0032eJ 39 LPRINT" S UBROUT I NE ":END z STOP : eJeJ33eJ TO USE FROM DISK BASIC 99Q • ; tttt m� O * •*** ******************************* **••••• 9eJ349 ; !/L OAD BASIC PR GRAM s:: tttt CD THIS * 00359 ; 2/TYPE CMD•s• m � SUBROUT INE PR INTS P$ IN BOLD TYPE . tttt :0 �R I TTEN GEORGE U * 90369 ; tUt 3/TYPE SPACE CTO RUN PROGRAM ) * BY DA . 19-3-83 FOR THE * m0 * LINE PRI NTER VII. * 00370 ; tUt 4/TYPE BASIC () 90380 TO MOD FOR LEVEL2 C �ANGE THE ORIGIN IN m **�**************************************** ; tUt s:: eJ0390 ; tttt LINE 290 TO SAY 7500H ,AND CHANGE LINE 330 CD 1000 m 904eJ0 ; tttt TO • DOS EQU 96CCH • :0 ZP = PEEK C16 539> : £184 10 IF LEN (P$) +ZP > 80 THEN cOOJ £10420 ORG 0F999H PR INT CHR$(13> ; •P$ TOO LONG. •: � EN D 90430 SBASIC EQU 49A4H ;START OF BASIC PTR EL 9eJ440 EBAS1C EQU 49F9H ;END OF BASIC PTR SE 004.59 I XPTR EQU !AFBH ;ADJUSTS PTRS ZS$ = STRING$(ZP,32> : F 09460 DOS EQU 492DH ;RETURNS HERE AT END. FOR Z = 1 TO 3: 00470 POKE 16539,0: 00480 NBYTES LD DE , (SBASIC) LPR INT CHR$(26> ;ZS$;P$; : 9 NEXT z: 0490 L D HL , CEBASIC) 09500 OR A POKE 16539 , PEEK (16539�-1 : 095 10 SBC HL ,DE I RETURN - 00529 INC HL n 09530 PUSH HL lJ 00549 POP BC ;NO. BYTES TO MOVE 09559 RET 0 • 9�560 MOVE CALL NBY:TES m 0057£1 LD HL , lEBASIC) ;SOURCE 0 00580 LD DE , CUT-1 -; DESTINAT ION 00590 CUT LDDR ;BLOCK MOVE **** 48K/DISK SPACE UTILITY **** 00600 INC HL ;POINTS TO START BASIC 096 10 INC DE TRS-89/SYSTEM-89 ;PTS TO START BAS PROG . 0eJ620 RET 00630 START DI 0eJ640 CALL MOVE 00 1 00 SPACE/ED 4BK DISK ;MOVE BASIC PROG 00650 LOOP! LD 00 110 B,4H 0eJ660 LOOPS XOR A 00 12eJ DENNIS BARE IS (C) eJ9670 LD 09 1 30 286 LENNOX ST CCOUNT) ,A ;ZERO COUNT OF • 00680 LD (REM) ,A ;ZERO REM 00140 MARYBOROUGH ,4650 . 0eJ69� LOOP3 LD A, CDE) 00150 THIS PROGRAM 09790 LD (HL> ,A 001 60 WILL ADD SPACES TO A BASIC PROGRAM MAKE eJ07 10 INC HL 00170 TO IT READABLE . IT WILL NOT ADD SPACES IF THERE IS ALREADY eJ0720 INC DE 00 1 80 A SPACE. SPACES ARE INSERTED AROUND BAS IC KEYWORDS . 99739 DJNZ LOOP3 ;MISS LINE NO . PTR 00190 � SINCE SOME PROGRAMS 00749 LOOP2 LD A, CDE> ;GET BYTE OF BAS PROG 00200 HAVE M/L AFTER REM STATEMENTS WILL 90 750 CP 22H ;TEST FOR • 002 10 IT NOT ADD SPACES TO A LINE AFTER IT HAS FOUND A REM STAT. , BUT 90769 JR NZ ,SKIP 00?'20 ANY SPACES ADDED BEFORE 90779 PUSH AF 00230 THE REM WILL HAVE TO BE REMOVED. 90789 LD A,

9079� XOR 01H ;COUNTS ,A m 0@8 19 POP AF f\) 0@820 SK IP CP BBH ;TEST FOR KEYWORD ----! 90838 JR NC , KEYWRD 00840 CP 3AH ;WANT SPACE AROUND : 01440 INC DE 00850 JR Z,COLON .01450 LD A,

01030 JR Z,ELSE ;NO SPC BETWEEN : � ELSE 01630 LOOPS LD B,3H 01040 LD A, (REM J 01640 JP LOOPS 01050 CP 0H ;ZERO IF NO REM IN LINE 01650 COLON XOR A 01060 LD A, (DEJ 01660 LD (COUNTJ ,A ;ZERO COUNT OF • 01070 JR NZ , LOOP6 ;COULD BE M/L AFTER REM 01670 JR KEYWRD 0108@ LD A,B {?)1680 COUNT DEFB 0H ;.0=EVEN ,1=0DD 01090 CP 0H 01690 REM DEFB fi1.0H ;0=NO REM IN LINE 01 100 JR Z, SKIP2 ;NO SPACE AT START LINE 0170fJ END START 01 110 DEC HL 3: 111111 01 120 LD A, (HLJ n 81138 CP 20H ;TEST IF SPACE BEFORE SPACE DUMP 01 148 JR Z,SPACE1 ;ALREADY SPACE BEFORE KWRD J 81 150 INC HL START END ENTRY 0 F.0CC F01C I 01160 LD (HLl ,20H ;NO SPACE, ADD ONE F00.0 co 01 170 SPACE! INC HL 0 01180 SK IP2 LD A, ­ 01290 LD (HLJ ,20H ;NO SPACE, ADD SPACE F.09.0 : 18 BB 2B 18 E7 2B 7E FE 20 28 01 23 1A 77 23 13 z 9 01300 INC HL F0A0 : 1A FE 08 C2 20 F0 77 23 13 1A FE .0.0 20 12 77 23 01310 JR LOOP7 F.0B.0 : 22 F9 4.0 22 FB 4.0 22 FD 40 CD FB 1A FB C3 2D 40 -1>- z 01320 F0C.0: .06 .03 C3 22 F0 AF 32 CB F0 18 85 00 00 01330 ELSE DEC HL S2m s:: 01340 JR SK IP2 (D m 01350 JJ

01 360 ENDPRG DEC HL **** YAHTZEE **** m0 0 01370 LD A, (HL) m s:: 01 380 CP ;SEE IF SPACE AT END LN MODEL 3 (D m 01390 JR Z,SPC ;DEL SPC ( LEAVE HL AS ISJ JJ 01400 INC HL <0 01410 SPC LD A, (DEJ 1.0 REM ••••••...••••..YAHTZEE /BAS ••••••.••••••••••..••.•.•••••••• OJ � 01420 LD (HLJ ,A .•••••••.•••• (c) 1982 by Tony Dom i9an ••••••.••••••••••••••.•••••

01430 INC HL •••••••••••••m/ 1 is entered into this lin e ...•..•..••••.••.••••• 20 CLS: CLEAR7.00:DEFINTA-Z: RANDOM: DIMP1 (15J ,P2(15J :BV=13150:C=-1 30 BX= l760: BW=25550 :TEST=PEEK (16548 l +PEEK (16549 l *256+5:GO J 017B� 63� IF <0=1) 0THENGOSUB40ELSEGOT0660 4� YP= l :IF!Z$=P l $ANDP 1 !121 >CIOR(Z$=P2$ANDP2 1121 >C J THEN5�ELSEYF:1 640 IF I YPANDNOTYGJ THEN660:ELSEIF IYGJTHENRETURN 50 IF ! Z$=P l$ANDP1 C J THENYG=l:RETURN 650 IF IYFJTHENRETURN (§ E 60 IF ! Z$=P2$ANDP2 1IJ=CANDP2 (12J >C J THENYG=1 ELSEYG=9 660 GOSUBB9 :RETURN s::: 670 se=SV-6: 0NSQGOT0690,720, 750, 790,940, 1919 m 70 RETURN .j:>. 80 SC=Sill +5 (2J + S!3J + 5(4) +5 (5J :RETURN 680 GOT01210 z 90 PRINT@752 ,K$; : PR I NT@880, K$; : PRINT@948, K$; 690 IF 1 10=3JORI0=4JORI0=6J ) THENGOSUB80 :RETURNELSEGOT0799 9 .j:>. 100 N=N+J : IF !N=1 J THENZ$=Pl$ELSEIF (N>3ANDN<6JTHENZ$=P2$ 700 IF I0=101 THENGOSUB49ELSESC=0 : RETURN 710 IF I YPANDNOTYGI THENGOSUB89 :RETURNELSEIF CYG)THENRETURN z 11� PR I �T@948 ,T1$; Z$; T2$; : IFN=7THENN=� :GOT01�� 720 IF I0=6 1 THENGOSUB80 :RETURNELSEIF I0=10) GOSUB49 120 PP I NT@337, S$; : JZ=JZ+ 1:PRI NT@370, •Rol l No• ;JZ; �m s::: 130 IF !JZ=1JTHEN250ELSE IF ! JZ=3 J THENJZ=9 730 IF I YPANDNOTYGJTHENGOSUB80 :RETURNELSESC=9:RETURN CD m 140 Y$�" ":H$= " ":GOSUB 1030: L$=LEFT$ CH$, 1) 740 IFIYFITHENRETURNELSESC=0 : RETURN :n 750 IF I0=4 1 THENSC=25 : RETURN 150 LH=LEN !H$l + C:Y$=R IGHT$ (H$,LHJ : H$=Y$ 0m 160 IFL$="R" THEN1 70ELSEIFL$= "S•THEN1210ELSEPRINT@337 ,S$; : GOT0149 760 IF I0=10J THENGOSUB40ELSESC=0 : RETURN 0 m P= 121 770 IFI YPANDNOTYG I THENSC=25 : RETURNELSEIFIYGJTHENRETURN s::: 170 CD 180 FORJ=1T05: KCJJ=9: NEXTJ : FORDI=1TOLEN IY$) 789 IF IYF)THENRETURNELSESC=0: RETURN m :n 190 Yl$=LEFT$ 1Y$, 1J:Y$=R I GHT$ (Y$,LEN (Y$J +CJ 790 IFI0=191 THENGOSUB49ELSE829 209 Y2=VAL IY1$I !K!Y2J=Y2: NEXTDI 800 IFI YPANDNOTYGJ THENSC=39: RETURNELSEIF IYG)THENRETURN cO co 210 FOR ZZ=1 T05 810 IF IYFJTHENRETURN � 220 IFKIZZ><>BTHENP=!l21+(K (ZZJ*12J J:GOSUB1170 820 IF I0<>1JTHEN900ELSEW=0 230 NEXTZZ 830 W=W+l 240 �LAG=0 : GOT0480 840 IFSIW+1 JJT HEN839 250 PR I NT@467,A1$; :PRINT@491 , Al$; 850 W1=S IW+1 J:IFIW=1 1THENS (2J=5(3) :5(3)=514J :SI4J=SI5J :SI5J=W1 260 GG=l : HH=6 :WP=0: IF CZ$=P1$JTHENSU I11=0ELSESU (2J=0 860 IFIW=2 J THEN5(3J=SI4J :SI4)=5151 :SI5J=W1 270 GOSUB 1490 879 IF IW=31 THENSI4J=S(5J !SI5J=W1 280 GG=7 :HH= 13:WP=l :IFIZ$=P l$J THENTU 11J=0ELSETU 12J=9 880 FORW=1T05:PRINT@260+W*2,S (W) J!NEXTW 290 GOSUB1499 890 V1=0:V2=0 I 900 IFIS!1)+1=S I2JANDSI2) +1=513JANDSI3J+1:S(4) JTHENV1=1 309 P= 121 : FORW=1T05 : P=P+ 12: PRINT@P ,D7$; : NEXTW: GOSUB1 039 - 310 P=121 : FORK=1T05: P=P+ l2 910 IFIS12)+1=5 13JAND5(3) +1=514)ANDSI4J +1=5 (5) )THENV2=1 n 320 GOSUB349 929 IFIV10RV2 J THENSC=30ELSESC=0 ::D 930 RETURN 330 R=RND!6l :SIKJ=R:ONRGOT0389, 399,499, 419, 420 , 439 940 I F I0>0J THENGOT0970 0 340 GOSUB1480:PRINT@P,D7 $; : GOSUB 1480:PRI NT@P , D5$; I 350 GOSUB 1489 : PR INT@P, D7$ ; : GOSUB1480: PRI NT@P ,D2$ ; 950 !FSI11=S(2) +CANDS12J=SI3J +CANDS I4) =St5J +CTHENSC=40ELSESC=0 Q) 960 RETURN 368 GOSUB 1480 :PRINT@P, D7 $; : GOSUB1489:PRINT@P ,D4$ ; 0 370 GOSUB148B : PRI NT@P,D7$ ; : GOSUB1480 : RETURN 970 IF 10=101 THENGOSUB40ELSESC=0 : RETURN 380 PR I NT@P, Dl$; :E=USR IBXJ : GOT0449 989 IF ( YPANDNOTYGJ THENSC=40: RETURNELSEIFIYGJTHENRETURN 990 IF IYFITHENRETURN 390 PR I NT@P, D2$ ; : E=USR IBX> : GOT0440 1000 SC=0: RETURN 400 PR I NT@P , D3$ ; :E=USRIBXJ : GOT0440 418 PRINT@P,D4$ ; :E=USRIBXI: GOT0449 1910 IFI0=10J THENSC=50 :RETURN 420 PR TNT@P, DS$ ; : E=USR !BXI : GOT0449 1020 SC=0: RETURN 103� DE=0:PRINT@257,STRI NG$ 160,• •J; 430 PR INTQP, D6$ ; : E=USR !BXJ 1040 PRINT@275 ,•**** •;z$; • T o Go **** • ; aq0 IF CK=5 1 THEN450ELSEX=59 :GOSUB1410 1050 IF -LAG=l > THENFLAG=0 :RETURN 460 J� ( ST�0J THENRETURN 1060 DE=DE+l:IF IDE< >1) THEN1 970ELSEE=USR IBV+10) 1070 J$= INKEY$ 478 NEXTK 1980 IFJ$< >CHR$113JTHEN1 120 48@ Q=G� l:GOSUB 1648 1090 IF ILEN IJ$) =1ANDJZ=1 J THENPRINT@337, S$; : E=USR IBVJ :RETURN 490 IF !Q=3 l THENQ=0 :GOT01210ELSEGOT0190 1100 !F ILEN CH$J )01 THENE=USR IBVJ : RETURN 500 M=0 : 0=0 510 FORW= 1T04: I FCS(NJ<=S(W+11 J THENS30 1110 GOT01 070 520 Wl=S!WI : 5(Wl=S(W+1 J:SIW+1 l=W1 :M=M+ l 1120 IF IJ$<>m•JTHENE=USR IBV) 530 NEXTW 1130 IF(LEN IH$1 =1 1 THENPRINT@337,S$;ELSEIFIJ$�· ·>THEN1970 540 IFM>0THEN500ELSE0=0 1140 IF (J$< >CHR$18J JTHEN1 160 � 550 FORF= lT04 : FORG=F+lT05: IF !SIFI=SIGI JTHEN0=0+1:H=S IFJ 1150 IF ILEN IH$) )91 THENH$=LEFT$ 1H$, LEN IH$1 +CJ:PRI NT@347 ,H$; • •;: OT01 070ELSEJ$= ••:H$= • •:GOT01030 560 IF C 0=60R0=30R0= 11THENI=HELSEIF !0=2 J THENII=H 116� H$=H$+J$: IF CLEN IH$J )7J THENH$=• •:GOT01030ELSEPRI NT@347 ,H$; :G 570 N�XTG,F OT01070 sag SC=0 : SV=VAL (H$1 !IF �ANDSV< 71THEN6 1�ELSEIF ISV=13J THEN639 1170 IF IJZ= 1JTHENPRINT@ ,337, S$ ; m 1180 R=RNDI6J :SIZZJ=R:FLAG=1 : GOSUB340 600 IF THEN670ELSEGOT01210 1\) 1190 ONRGOT03B0,390,400, 410. 420 , 430 (!) 610 FORW= 1T05: IF THENSC=SC+SV:NEXTWELSESC=SC : NEXTW 1200 RETURN 620 RETUPN 1210 YF=0 :YP=0 : YG=0: PRINT@337 ,S$; 1790 ONERRORGOT023 10 1220 PR I NT@275,Z$J l$; : E=USR CBV+35 J 1800 P=858 : GOSUB2 120 1230 H$=" ":J$= ··:GOSUB1079 }5 181� PRINT@275, TI$: GOSUB32f1J :ST=1 Gl 1240 Y3$=LEFT$ 1H$, 1J :IFCY 3$=•R•ORY3$= •s•oRY3$=CHR$ (13) JTHEN1219 1820 E=USR CBVJ : PRINT@466, J:INPUT .First Players Name •JP 1$ m w 1250 GOSUB500 1830 E=USR CBVJ : PRINT@593, ;:INPUT • Second Players Name •JP2$ 0 1260 IF CYFANDNOTYG J THENE=USR CBWJ : PR I NT@337,F$; : GOT01 779 1840 IF 5J THENP2$=LEFT$ CP2$,5) 1280 IF CZ$=P1$J THENIFCP1 CSVJ =CJTHENP1 CSVJ =SCELSEGOT01 408 1869 A2=LEN CP1$) :1FtA2<5JTHEN P1$=Pl$+CHR$ C32J : GOT01860 1290 IFI Z$=P2$ JTHENIF CP2CSVJ =CJTHENP2 CSVJ=SCELSEGOT01 409 1870 A3=LEN (P2$J :IF(A3<5JTHEN P2$=P2$+CHR$ C32J : GOT01 87f1J 1300 GG=1 : HH=6 :WP=0: IF CZ$=P1$J THENSU C1J=0ELSESU C2)=9 1880 E=USR (BVJ : FORZ2=1T013:P1 3J THENN=6 :JZ=9 1920 B$=CHR$tl91 ) +CHR$(199) +CHR$Cl91 J +CHR$(195) 1350 J$=••:H$= • •:Q=0 : SCWJ=0:FORW= 1T05:SCWJ=9:NEXTW 1939 B$=B$+B$+B$+B$+B$+CHR$ (196 ) 1360 PR I NT@338,E$; : PRI NT@260, Q$; : E=USR CBV+29 J 1940 C$=STRING$C9, 131 J +CHR$ (195) 1370 RE$= INKEY$: IFRE$=••THEN1 370 1950 C$=C$+C$+C$+C$+C$ 1380 PRI NT@337,S$; : eE=QE+ 1:IFCQE=26 J THEN1 720 1960 A$=A$+B$+B$+C$ 13t;'0 GOT090 1970 PRINT@3, A$i 1400 PR INT@337,M$J !E=USRCBWJ : PRINT@337 ,S$J ! GOT01220 1980 PR INT@199, •t•; :PRINT@211,•2 •;:PRINT@223, •3•;:PRINT@235, •4• f 1410 FORJ=1TOX :NEXTJ :X=0 : RETURN :PRINT@247, •5• ; 1420 'OUT 254, 16 REM SYSTEM 80 EXT CASSETTE 1990 PRI NT@384 ,R$1 : PRINT@448, 9:

1430 FORA=TEXTTOTEXT+28:READB : POKEA ,B: NEXT 2000 PRINT• Aces ...... < 7> 3/Kind •••••••

1440 ONERRORGOT01450 : DEFUSR0=TEXT : RETURN 20 10 PRINT.<2> Two' s •.•••••.. < 8> 4/Kind •••.•••

1450 POKE 16526 , TEXT AND 255 : POKE 16527 , INT CTEXT /256 ) :RETURN 2020 PRINT•<3> Three's••.•••• 9> F/House ••••• •

1460 DATA205, 127, 10, 229, 193, 197,65, 16, 254,58,61,64,246, 2,203 2630 PRINT•<4> Four 's•••••••• <16> S/Strt •.••• •

1470 DATA215,211,255,65, 16,254 , 230,253, 2 11,255, 193, 16, 233 , 201 2040 PRINT• Fives •••.••••• <11> L/Strt •.....•

1480 NZ=1600+RND C55J : E=USRCNZJ : GOSUB1719: RETURN 2056 PRINT•<6> Sixes .•••••••• <12> Yahtzee ..••• • I 1111111 1490 FORPQ=GGTOHH :IFCW P=0 J THENPR=403+PQ*64ELSEPR=427+ ((PQ-6)*64J 2066 PRINT• Bonus .•••••••. <13> Chance •...••• n 1500 IF CZ$=P1$JTHEN1540 2070 PRINT• Subtotal ••••.. Subtotal ••..• : 9 :1 1510 IF CP2CPQJ=CJTHENQ8=0 :GOT01 520ELSEPRINT@PR,USINGU$JP2CPQJ f 2080 PRINTR$; : PRINT@496, •Y A H T Z E e•; 8=P2 (PQ) 2090 PRI NT@56f1J, "Rnnnn=Rol l Dice• ;:PRINT@624 ,•S =Score Dice" ; 0 B 1520 IF CWP=0J THENSU C2J= SU C2J +Q8ELSETU C2J=TU C2J +Q8 2100 PRINT@688,•Sorted Die Below• J:PRINT@816, • Total Score "V m 1530 GOT01560 2110 GOT099 0 1540 IF ( P 1 ( PQ J =C ) THENQ8=0: GOTO 1550ELSEPR I Nn!!PR , US I NGU$ J P 1 ( PQ) J : 9 2120 Dl$=STRING$(5, 128J +CHR$ C27J +STRING$(5, 24J +STRING$C2, 128J +CH 8=P1 CPQ) R$ Cl76J +STR ING$C2, 128J 1550 IF C WP=0 J THENSUC1J= SU C1J+Q8ELSETU C1J=TUC1J+Q8 2130 D2$=STRING$C4, 128J +CHR$ C140J +CHR$ (27J +STRING$C5,24J +CHR$ C13 1569 NEXTPQ 1)+STRING$(4, 128J 1570 IF CZ$=P1$JTHENQ4=1 ELSEQ4=2 2140 D3$=STRING$C4, 128J +CHR$ C140J +CHR$ C27J +STRI NG$ (5,24J +CHR$ C13 1580 IF CWPJTHEN1620ELSEPT CQ4)=9 1J+CHR$Cl28J +CHR$ C176) +STRING$C2, 128) 1599 IF CSU CQ4J >=63 J THENBS CQ4)=35ELSEBS CQ4)=9 2150 D4$=CHR$ Cl40 J +STRING$C3, 128J+CHR$ C140 ) +CHR$ C27J+STRI NG$ C5,2 1600 PT CQ4J=SU CQ4J+BS CQ4) 4J +CHR$(131 J +STRING$(3, 128J +CHR$Cl31 J a 1610 PR I NT@851 , USINGU$;B SCQ4) 1!PRINT@913,USINGV$JPTCQ4) 1!R ETURN 2160 D5$=CHR$<140J +STRING$(3, 128J+CHR$i140J +CHR$ (27J+STR ING$C5,2 E 1620 PRINT@937 ,USINGV$J TU CQ4) J:TSCQ4 J=PT CQ4J+TU CQ4J s: 4) +CHR$C131 J +CHR$(128J +CHR$ C176J +CHR$ (128 J +CHR$(131) m 1630 PR I NT@885 ,USINGV$1 TS (Q4J J:RETURN 2170 D6$=CHR$ (140J +STRING$(3, 128J +CHR$(149J +CHR$ (27J+STRING$C5,2 .j::. 1640 FOREE=1T05:RCEEJ=SCEEJ :NEXTEE z 4J+CHR$ Cl79 J +STRING$C3, 128J+CHR$ (179 ) 0 1650 M=0 2180 D7$=STRING$ C5, 128J+CHR$ C27J +STRING$(5,24J+STRING$C5, 128) .j::. 1660 FORW= 1T04: IF CRCWJ <=R CW+l )JTHEN1680 2190 E$= •Press To Clear • z 1670 Wl=RCWJ :RCWJ=RCW+l J:RCW+l J=Wl:M=M+l 2200 F$= "* YAHTZEE Not Yet Scored *" 1680 NEXTW m� 2210 G$=• •s Must Be Scored First • s: 1690 IF CM>0 J THEN1 650 2220 I$=• Enter Score Please• : K$=STRING$C13,32J OJ m 1700 FORW=1T05 :PRINT@752+W*2,RCW) J!NEXTW 2230 M$= • Incorrect Cate9ory •:N$= "Press To Start• :0 0 1710 RETURN 2240 P$=" WINS With•:X$= "Points vs• :O$= • Po ints For • m 0 1720 PRINT@275 ,•===2 Game Fini9 hed == · 2250 PP$= •** DRAWN GAME ** •:PX$= • VS •:PO$= • Points • m s: 1730 IFCTSC1J > TS C2J JTHENPRI NT@328,P1$J P$JT SC1JJX$;T SC2J IO$;P2$J 2260 Q$=STRING$ (4f1J, 32J :R$=STRING$(63, 140J :S$=STRI NG$ (32,32J OJ m 1740 IF CTSC2J >TSC1J J THENPRINT@328,P 2$JP$JTSC2J f X$J T SC1J J0$JP1$J 2270 Tl$=CHR$C143) +CHR$C32J : T2$=CHR$ C32) +CHR$ (143J :0 1750 IF CTSC1J=TSC2J JTHENPRI NT@330 ,PP$; TS C1J JPX$1 TSC2J JP0$ 1 2280 U$=•nD• :V$= "DHHH•: TI$=•**** Yahtzee vl .S **** • <0 1760 RE$=INKEY$: IFRE$= "•THEN1 760ELSERUN 2290 FORA1=1T08:Al$=Al$+•**•+CHR$ (24) +CHR$ C24)+CHR$ C26J : NEXTA1 .£9co 1770 PRINT@337 ,S$; : YG=0: GOT01210 2300 W$= •**• : RETURN 1 7Eif1J GOSUB 1430 2310 PRINT•Error Occurred In •JERLJ • Cod e• IERR/2+1 itititir VI:.K �. !1 HUUoi:.HULD ACCOUNTING ****

330 CHAIN •MODULEI IBA s• ,ALL MODEL 4 340 CH AIN "MODULE3/BAS ",ALL 350 CHAIN •MODULE4 1BA S•, ALL a 360 CHAIN °MODULE6/BA S• , ALL Es:: 37B CHAIN •MODULE7/BA S•,ALL m 380 CH AIN •MODULE81BAS•,ALL -1>­ 10 CLEAR 50 : VV INTC ( MEM - 2000 ) 69 ) vv - vv * cvv < 6 I 390 CHAIN •MODULE51BAS•,ALL z 98 ) - CVV 697 ) * 697: REM > 400 CHA IN •MODULE21BA S•, ALL 0 MODULES /BAS -1>- 410 REM WRI TTEN BY THE LARGEST MO DULE , CMODULE61BAS>, IS 4203 BYTES LONG z SUNBURST SOFTWARE SERV ICES �m � 20 CLEAR 62 * VV + 700 : VV INTC ( FRE CZ0$ ) - 700 ) I 62) : DIM OJ A$ 1VV + 1J,LBCVV + 1) : F3$ F4$ = • $$HH ,#H . m �"��.... �. � .. - � 10 REM MODULE11BAS :n : F5$ = • • + F3$ + ��- · 20 COMMON Z0S,Z1$, Z2$, Z3$, Z4S,Z5$, Z6$, Z7 $,A $( ),L B(),DT$ , DE$,RF$ , m0 30 W = 1 : SO$ = •Press any ke y to conti nue *• : ZB$ = •Total • : 0 PR$, DB$, CR$, A D S, AD,VV,W m Z1S = •Memor y• : Z2S = •Account • : Z3$ = •select Function *• : � 30 GOTO 410 OJ Z4S = •Journal • : Z5$ = •credit• : Z6$ = •nebit• : Z7$ = •nate• m 40 ADS = :n 40 PRINT CHR$(15) 50 FOR T = 1 TO LN 50 GOSUB 230 : PRINT @40-B, •Max imum number o+ records = •;vv : PR <0 60 GOSUB 130 : IF IN$ = CHR$(13) THEN 110 ELSE IF IN$ CHR$(8) OJ INT @80-B, SO$; :PRINT@1840, • ...... •...... ••. Wr i tten by Sunb � THEN 90 ELSE IF IN$ = CHR$ (32) THEN GOSUB 150 urst So+ lware Services ...•...... •;: PA = 826 : LN = 1 70 AD$ = AD$ + IN$ : PRINT @PA, AD$; : NEXT : RETURN : GOSUB 60 : GOTO 250 80 NEXT : RETURN 60 AD$ = 90 IF T = 1 THEN 60 ELSE T = T - 79 FOR T = 1 TO LN 100 AD$ LEFTS (ADS , LEN C AD$ ) - 1) PRINT @PA,ADS; •**• ; GOTO 80 GOSUB 150 : IF IN$ = CHR$(13) THEN 130 ELSE IF IN$ CHRSC8> 60 THEN 110 ELSE IF INS = CHR$ (32) THEN GOSUB 170 110 IF FL = 9 THEN BL$ = STRI NG$ (LN - LEN (AD$) ,• •) : AD$ = AD$ 90 AD$ = AD$ + INS : PRINT @PA, ADS ; : NEXT : RETURN + BL$ : PRINT @PA,AD$ ; : RETURN 100 NEXT : RETURN 120 BL$ = STRI NG$ CLN - LEN ( AD$ ) ,"0• ) : AD$ = AD$ + BL$ : PRINT I 110 IF T < = 1 THEN 80 ELSE T = T - 1 IIIII @PA ,AD$ ; : RETURN 120 AD$ = LEFTS CADS , LEN C AD$) - 1) : PRINT @PA, ADs; •**• ; : GOTO 130 IN$ = •• : IN$ = INKEY$ : GOSUB 140 : IF IN$ = •• THEN 130 E n 80 LSE RETURN :D 130 IF FL = 0 THEN BL$ = STRI NG$ CLN - LEN CAD$ ) ,• •) : AD$ = AD$ 140 PRINT @PA , AD$; CHR$(143) ;: RETURN 0 + BL$ : PRINT @PA , ADS ; : RETURN 150 IF FL = 0 THEN RETURN I 140 BL$ = STR I NG$ ILN - LEN C AD$ J ,•s• J : AD$ = AD$ + BL$ : PRINT co 160 IN$ = •0• : RETURN @PA ,ADS ; : RETURN 170 T = 1 0 150 IN$ = •• : INS = INKEY$ : GOSUB 160 : IF IN$ = •• THEN \50 E 180 IF 5 THEN AD$ = • 0• : RETURN LSE RETURN T > 190 IF MIDS CADS , T, 1) = •0• THEN T = T + 1 : GOTO 180 160 PRINT @PA,ADS ; ;CHR$(14 3) ;: RETURN 200 AD$ = ST RING$ CT - 1,32) + RIGHTS CAD$, 6 - T) : RETURN 170 IF FL = 0 THEN RETURN 210 PRINT @160, CHR$C31J; : RETURN 180 IN$ = •s• : RETURN 220 CHAIN •MODULE0/BA S", 250,ALL 190 T = 1 230 PR INT @19B, •KEYBOARD INPUT • 200 IF T > 5 THEN AD$ = • 0• : RETURN 240 PR INT @320,Z 7 s; • **1**1**" ; : PRINT @400, .REF NO . **** •; 210 IF MIDSIAD$ , T, 1) = •s• THEN T = T + 1 : GOTO 200 : PRINT @480, .DETAILS *KMKKKKK**-*********************• ; : PR INT 220 ADS = STRI NG$ CT - 1,32} + RIGHTS CAD$, 6 - T) : RETURN @560 ,.PREF IX *it-" ; : PRINT @640, "ACC NO . ***" ; : PR INT @720 ,Z6$ ; 230 CLS : PR INT @0 , •*** Household Account in9 Ver *****· **'" ; 5.0 for the Mode l 4 ***• ; : PRINT @80, • -�f-** ( 250 PRINT @24B, •RECORD NO . •rii C) 1st November 1983 M 1 c r o - 8 0 P t y L t d 260 PRINT @800,Z5$; • *****·**· ; PRINT @880, . CORRECT CY/NJ *• ; ***. ; : RETURN 240 PR INT CHRSt3 1); : RETURN @160, 270 GOSUB 210 : GOSUB 230 250 COMMON VV ,A$() ,LBC >,F 3S ,F4S , F5S, W,SO$, Z0$, Z1$,Z2$, Z3$, Z4$,Z 5 280 FL = 1 : PA = 328 : LN = 2 : GOSUB 40 : DTS = AD$ : IF DT$ = S, Z6S, Z7S,PA,LN, A D, ADS, DTS, RFS, DES, PR $, DB$ ,CR$, P •00• THEN RETURN 260 P=0 : GOSUB 230 :PRINT@196,.MENU• :PRINT:PRINT:PRINT•1 = Keyboar 290 GOSUB 300 : GOSUB 310 : GOSUB 320 : GOSUB 330 : GOSUB 340 rl Input 5 = Save Data• FL = 1 : GOSUB 350 : GOSUB 360 : GOSUB 370 : GOSUB 380 : FL = 0 270 PR INT:PRINT•2 Load Data 6 : GOTO 390 Pr int Journa ls• 300 PA = 331 : GOSUB 40 : DT$ = DT$ + AD$ PA = 334 : GOSUB 40 280 PR INT:PRINT•3 Read Memory 7 : DT$ DT$ + AD$ : RETURN Linepr i nter Ut ility• = 310 PA = 408 : LN = 4 : FL = 9 : GOSUB 40 RF$ = AD$ : RETURN G):B 290 PR INT: PRINT•4 = Ed it Memory 8 m 320 PA 488 LN 31 : GOSUB 40 : DE$ AD$ : RE TURN Led ger Accounts • = 330 PA 568 LN 2 : GOSU B 40 : PR$ = AD$ : RETURN l:j 300 PR INT @1200, Z3S; : PA = 1216 : LN = 1 : GOSUB 60 340 PA 648 LN : GOSUB 40 : PR$ AU$ : RE T URN 1 � PRS = + 310 AD = VAL CAD$ ) : IF AD < OR AD > 8 THEN 300 320 ON AD GOTO 330,400, 340 ,350, 390 , 360, 370 , 380 J 'liBiii �v ..,mu�PF�� 35� PA = 727 LN 5 GOSUB 49 GOSUB 17flJ DB$ AD$ + "." 349 FL = 0: GOSUB 220 : PRINT @428, " ENTER FILENAME ******** "I : RETURN PA = 443 : LN = 8 : GOSUB 40 : NM$ = AD$ : RETURN 369 PA = 733 LN 2 GOSUB 4flJ DB$ = DB$ + AD$ RETURN 350 PRINT @492, "PRESS ANY KEY WHEN DEVICE READY OR CEJSCAPE *. G)j2. m 379 PA = 897 LN 5 GOSUB 4flJ GOSUB 17flJ : CR!fi AD$ + •." : ; : PA = 538 : LN • 1 : GOSUB 40 : RETURN w RETURN 36flJ CHAIN "MODULEflJ/BAS ",250, ALL 1\) 380 PA = 813 LN 2 GOSUB 49 CR!fi = CR$ + AD$ FL = flJ : RE TURN 39� PA 894 : LN GOSUB 4flJ IF ADS = "N" THEN 279 ELSE IF lflJ REM MODULE3/BAS AD$ < •y• THEN 39flJ 2flJ GOTO 221!1 499 A$ (1) = DT$ + RF$ + DE$ + PRS + DB$ + CR$ : RETURN 3flJ AD$ = 41J� FOR I = W TO VV : GOSUB 279 : IF DT$ - "flJflJ" THEN W I GOT 40 FOR T = 1 TO LN 0 229 5flJ GOSUB 12flJ : IF IN$ = CHRSC13) THEN 19flJ ELSE 1F IN$ = CHR$ (8) 429 NEXT I : GOTO 22flJ THEN 80 ELSE IF IN$ = CHR$ (32) THEN GOSUB 14flJ

6flJ AD$ = ADS + INS : PRINT @PA , AD$ J : NEXT : RETURN 7flJ NEXT : RETURN

lflJ REM MODULE2/BAS 80 IF T < = 1 THEN 50 ELSE T T - 1 29 COMMON VV,A$CJ,LB C J,F3!1i,F4$,F3$, W,SO$,ZflJ$,Zl$, Z2$, Z3$,Z4$, Z5$ 9flJ ADS = LEFTS CAD!Ii , LEN C AD$ ) - 1) : PRINT @PA,AD$J "**·" J : GOTO 5 ,Z6!fi ,Z7!1i, PA, LN, AD, AD$, DT$, RF$, DE$, PR$, DB!Ii, CR$, P flJ

30 GOTO 23flJ 1.!2JflJ IF FL a flJ THEN BL$ = STRI NG$ CLN- LEN C ADS J ,• ") : AD$ = AD$ 4flJ AD$ = + BL$ : PRINT @PA, AD$9 : RETURN 50 FOR T = 1 TO LN 11flJ BLS = STRI NG$ CLN- LEN C ADS J ,"9" ) : AD$ = AD$ + BL$ : PRINT

60 GOSUB 139 : IF IN$ = CHR$Cl3) THEN llflJ ELSE IF IN$ • CHR$ (8) @PA, AD!Ii l : RETURN THEN 9flJ ELSE IF IN$ = CHR$ (32) THEN GOSUB 15flJ 12flJ IN$ = "" : IN$ = INKEYS : GOSUB 13flJ : IF IN$ = •• THEN 12flJ E 7flJ AD$ = AD$ + IN$ : PRINT @PA , AD$J : NEXT : RETURN LSE RETURN 8flJ NEXT : RETURN 13flJ PRINT @PA ,AD$J CHR!IiC143J I: RETURN 9flJ IF T < = 1 THEN 6flJ ELSE T = T - 1 14flJ IF FL = 9 THEN RETURN 190 AD$ = LEFT!fi CAD!fi , LEN C AD$ ) - 1) : PRINT @PA, ADS ' "**" B : GOTO 150 IN$ = "0" : RETURN I 60 160 T = 1 - 110 IF FL = 0 THEN BL$ = STRING$ CLN- LEN CADSJ ,• ") : ADS = AD$ = R 170 IF T > 5 THEN AD$ • flJ" : RETU N n + BL$ : PRINT @PA,ADS J : RETURN 18flJ IF MID$CADS, T, 1) = •g• THEN T = T + 1 : GOTO 17flJ :D 120 BL$ = STRING$ CLN- LEN CADSJ ,"flJ" ) : AD$ mAD$ + BL$ : PRINT 190 AD$ • STRI NG$ CT - 1,32) + RIGHT!Ii CAD$,6 - TJ : RETURN @PA ,ADS J : RETURN 200 CLS : PRINT @flJ , " *** Hous�hold Accounting Ver 0 I 13� INS = •• : INS s INKEYS : GOSUB 149 : IF IN$ a •• THEN 139 E 5 .flJ for the Mod� l 4 *** "J : PRINT @80, "*** ( 0) LSE RETURN C) 1st November 1983 M 1 c r o - 8 flJ P t y L t d 0 · 14� PRINT @PA ,AD$J CHR$Cl43J J: RETURN *** · 158 IF FL = flJ THEN RETURN 210 PRINT @160, CHR$(31)1 : RETURN 16flJ IN$ = •f!J• : RETURN 220 COMMON VV,A$CJ,LBCJ,F 3$ ,F4!1i ,F5!1i,W,SO$,ZflJ$, Z1$,Z2$,Z3S, Z4S ,Z5 170 T = 1 $, Z6S,Z7$,PA,LN,AD,AD$,DT$,RF$, DE$,PRS, DBS, CR$,P

180 IF T > 5 THEN ADS = • f!J• : RETURN 230 GOSUB 21flJ : GOSUB 24flJ : GOSUB 280 : GOTO 34flJ 19flJ IF MIDSCADS, T, lJ = •e• THEN T = T + 1 : GOTO 18flJ 24flJ PRINT @19B, • Contents of •;Z1$J 20flJ AD$ = STRI NG$ CT - 1,32) + RIGHTS CAD$,6 - Tl : RETURN 250 PRINT @240,Z7$; • REF DETAILS A 21flJ CLS : PRINT @flJ , " *** Hous�hold Accounting v�r CC NO "JZ6!fi ; • "IZ5$ (§ 5.flJ for th� Model 4 ***" J : PRINT @8flJ, " *** ( 260 IF P THEN LPRINT Z7$1 • REF DETAILS s::E CJ 1st November 1983 M i c r o - 8 0 P t y L t d ACC NO •;Z6$ 1 • • v Z5$ m 27flJ RETURN .p.. *** "' z 22flJ PRINT @16flJ, CHRSC31J; : RETURN 280 L = 1 FOR I = 1 TO W - 1 9 23flJ Xl$ = "LOAD FROM" : GOSUB 310 29flJ GOSUB 339 : GOSUB 35flJ : PRINT VX$ .p.. 24!2J GOSUB 33.!2J 390 L = L + 1 : IF L = 2flJ THEN L = 1 : PRINT @184flJ , SO$J PA 1 z 25!2J IF SF = 2 THEN 36flJ 866 : LN =·1 : GOSUB 30 : GOSUB 21flJ : GOSUB 248 m� 26!2J GOSUB 34!2J 310 NEXT I s:: 270 co GOSUB 35!2J : IF AD$ • "E" THEN 23flJ 320 PRINT @1840,. END OF DATA - •gsOS J : PA = 1880 : LN 1 : GOS m 280 IF SF = 1 THEN OPEN "1",1,NM$ UB 30 : RETURN :n

290 IF SF a 1 THEN INPUT M1 ,W : FOR I = 1 TO W INPUT M1 ,ASCI) 33flJ V1!1i = LEFTS CA$CIJ ,2l : V2$ = MIDSCA$CIJ,3,2) : V3$ = MIDS(A$ m0 0 : NEXT : CLOSE Cil,5,2) : V4$ = MID$CASCil ,7,4) : V5$ = MID$CASCIJ,11,31l : V6$ m s:: 3!2J!2J GOTO 23flJ = MID!IiCA$CIJ,42,2) : V7$ = MIDSCA$CIJ,44,3) : V8$ = MID$CA�\I) , co m 31!2J GOSUB 22flJ : PRINT @19flJ, "DATA "J LEFTSCX1S,4) f " 47,8) : V9$ = MID!IiCA$(IJ ,55,8) : RETURN :n 32flJ PRINT:PRINT" 1 = "JX ls; • DISK":PRINT 349 CHAIN •MoDULEm/BAs •,25B,ALL <0 :PRINT" 2 = EXIT TO MENU" : RETURN 358 VX$ = Vl!li + •t• + V2$ + •t• + V3$ + • • + V4$ + • • + V5$ + �CP 33flJ PRINT @832 ,Z3S ; : PA = 848 : LN = 1 : GOSUB 49 : SF = VAL CAD • + V6$ + V7$ + • • + V8$ + • • + Vq$ : RETURN $) : IF SF < 1 OR SF > 3 THEN 330 ELSE RETURN 420 PR INT @32B, V1$; : PRINT @331 , V2S ; : PRINT @334 ,V3S; : PRINT 1e REM MODULE4/ BAS @408 ,V4s ; : PRINT @488 ,V5$ ; : PRINT @56B ,V6$; : PRINT @648 ,V7$ ; 1 a 20 GOTO 220 : PRINT @727 ,V8$ ; : PRINT @807 ,V9$ ; E 967 : LN 1 : GOSUB 30 : IF AD$ = •;• THEN PRiNT @960 , s:: 30 AD$ = 430 PA = = m I I 1 : IF I V I VV 40 FOR T = 1 TO LN •ADVANCE•; : = + > V THEN = _,. ELSE IF IN$ CHRS CB> 44£1 IF ADS = •+• THEN PR INT @960, . ADVANCE •; : I=I + 10 : IF I z 5e GOSUB 120 : IF IN$ = CHR$(13) THEN 100 p THEN 80 ELSE IF INS = CHRS f32) THEN GOSUB 140 > VV THEN I = VV _,. 60 ADS = ADS + INS : PRINT @PA ,ADS; : NEXT : RETURN 450 IF AD$ = •-• THEN I I - 1 : PRINT @960, • REVERSE •; : IF I < z 70 NEXT : RETURN = 0 THEN I = 1 460 IF I I - 10 : PRINT @96£1, • REVERSE •; : IF I m� 80 IF T < = 1 THEN 50 ELSE T = T - 1 ADS = •=• THEN s:: 90 ADS = LEFT$ ( ADS, LEN {AD$) - 1> : PRINT @PA ,ADs; •**•; : GOTO 5 < = 0 THEN I = 1 OJ m 470 I F AD$ THEN 650 0 :::0 480 IF AD$ "E• THEN PRINT @960, •* EDIT •• , GOSUB 100 IF FL = 0 THEN BL$ = STRING$ ;: RETURN 510 DT$ = ADS GOSUB 260 �

140 IF FL = 0 THEN RETURN 520 GOSUB 270 IF RF$ = " • THEN RF$ V4$ PRINT @40B ,RF$;

150 INS = •0• : RETURN 53£1 GOSUB 280 IF DE$ = • • THEN 160 T = 1 DE$ = V5$ : PRINT @48B,DES; 170 I F T > 5 THEN ADS = • 0• : RETURN 540 GO SUB 290 : IF PR$ = • • THEN P1$ V6$ PRINT @56B ,V6$; : 180 IF MID$(A DS, T, 1) = •0• THEN T = T + 1 : GOTO 170 GOTO 56.0 190 ADS = STRI NGS fT - 1,32) + RIGHTS : RETURN 550 P1$ = ADS

200 CLS � PR INT @0, • *** Household Account in9 Ve r 560 GOSUB 300 : IF AD$ " THEN PR$ P1$ + V7$ PRINT @648 5.0 �or the Mo del 4 ***• ¥ : PRINT @80, •*** ( ,V7s ; : GOTO 580 I 57£1 1111111 C) 1st November 1983 M i c r o - 8 0 P t y L t d PR$ = P1$ + AD$ 580 GOSUB 31£1 : IF AD$ ***" ; FL = 0 : • THEN DB$ VB$ PRINT n 210 PR INT @160, CHRSf31) ; : RETURN @727 ,V8s ; : GOTO 60£1 " O 220 C MMON VV ,A$( ) ,LB(J,F3S,F4S ,F5$,W,SO$ ,Z0$,Z1$,Z2$,Z3$,Z4$ ,Z5 590 GOSUB 160 : GOSUB 320 0 S, Z6$, Z7S, P A,LN,AD, AD$, DTS, RF$, DE$, PR$,DB$,CR$,P:GOTO 360 600 FL = 0 : GOSUB 330 : IF AD$ • THEN CR$ V9$ PR INT I 230 PRINT : PRINT @400, .REF NO . **** •; @807, V9$ � : GOTO 620 co @320, Z7S; • ** '**'**" ; 0 = PR Jt�T @480, "DETAILS ******************************* • ; : PRINT 610 GOSUB 160 : GOSUB 340 620 @�A0, "PRF F IX **" ; : PR INT @640, "ACC NO . *** •; : PRINT @720,Z6$; GOSUB 350 630 FL : ***** ·**" ; = 0 RETURN ?40 PR INT @240, "RECORD NO . ";I; 640 V1$ = LEFT$ (A$(1),2) : V2$ = MID$(A$(1> ,3,2) : V3$ = MIDS(A$

2�0 PR INT �800, Z5S ; " *****·**· ; : RETURN (1) ,5,2) : V4$ = MIDS(A$<1>,7,4) : VS$ = MIDS(A$(1), 11,31) : V6$ ?A0 P� = 331 : GOSUB 30 : DT$ = DT$ + AD$ PA = 334 : GOSUB 30 r- MID$(A$(!) ,4292} : V7$ = MID$(A$(1),44,3) : V8$ = MID$(A$(l), = PTS = DT$ + AD$ : RETURN 47, 8) : V9$ = MIDS(A$(1) ,55,8) : RETURN 7.70 PA = 408 : LN = 4 : FL = 0 : GOSUB 30 RFS = ADS : RETURN 650 cHAIN uMODULE0tBAs ·,zs0,ALL 280 PA = 488 LN 31 : GOSUB 30 : DE$ = AD$ : RETURN 200 PA = 568 LN 2 : GOSUB 39 : PR$ = ADS : RETURN 300 PA = 648 LN 3 : GOSUB 30 : PR$ = PR$ + ADS : RETURN 10 REM MODULES/BAS = 3U3 PA 7 27 LN 5:GOSUB 30 : GOSUB 160 : DB$ = ADS + •. • 20 COMMON VV ,A$(J ,LB(),F3$, F4$,F5$,W, SO$, Z0$, Z1$, Z2$,Z3$, Z4$, Z5$ RETI IPN ,Z6S ,Z7$,P A,LN ,AD,AD$,DT$, RF$ ,DE$, PR$, DBS, CRS, P

320 PA = 733 LN 2 GOSUB 30 DB$ = DB$ + AD$ RETURN 30 GOTO 230 33f!f PA = 807 LN 5 GOSUB 30 GOSUB 160 CR$ ADS + ". • 40 AD$ = PET URN 5£1 FOR T = 1 TO LN 34� PA = 813 LN 2 GOSUB 30 CRs = CR$ + AD$ FL = 0 : RE 60 GOSUB 130 : IF IN$ = CHR$ (13} THEN 110 ELSE IF IN$ CHR$ (8) TliRN THEN 90 ELSE IF INS = CHR$ (32) THEN GOSUB 150

350 A$ (!) = DT$ + RFS + DES + PR$ + DB$ + CR$ : RETURN 70 AD$ = AD$ + INS : PR INT @PA , ADS ; : NEXT : RETURN I 3 60 = 1 : FL = 0 80 NEXT : RETURN . • ; zt$ ; T 370 PR INT @2 l3, EDIT 90 IF T = 1 THEN 60 ELSE = T - 380 GOSliB 21£1 : GOSliB 230 : PR INT @832 , PRIN AD$ 5 ' 10£1 LEFT$ (ADs , LEN (AD$ ) - 1> PRINT �PA,ADs; •**• ; : ��70 T �960, .SELECT *� ; 60 G)j1. 30� PR INT m @240, "RECORD NO . •;I; 110 IF FL = 0 THEN BL$ = STRI NG$ (LN- LEN ( ADS > ,• •) : AD$ = ADS w 4elf!Y GO<:;UB 640 + BL$ : PRINT @PA ,ADS ; : RETURN w

= " @8 2 . 120 BLS = STRI NG$ (LN- LEN < ADS) ,•e• > : ADS = AD$ + BL$ : PRINT 410 JF Vl$ " THEN GOSUB 230 : PR INT 3 ,• '. @PA ,ADS ; : RETURN 130 INS = "" : INS = INKEYS : GOSUB 140 IF INS •• THEN 130 E 200 CLS : PR INT @9 , "*** Household Accou nt in9 Ver LSE RETURN 5.0 for t h e Model 4 ***" I : PRINT @80, •*** 149 PR INT @PA ,ADS ;CHR$(1431 ;: RETURN C) 1st November 1983 M i c r o - 8 0 P t y L t d � G)m 150 IF FL = 9 THEN RETURN ***" ; w -"" 169 INS = •0• : RETURN 210 PRINT @160, CHR$(311; : RETURN

170 T = 1 220 COMMON VV ,ASCI ,LB!I,F3$,F4S, F5S, W,SO$,Z0$, Z1$, Z2$, Z3$,Z4$ , Z5 18� IF T } 5 THEN ADS = • 0• : RETURN $, Z6S, Z7S,PA,LN, AD, AD$, DT$,RF$, DE$, PR$, DBS, CR$, P!GOTO 2�m 190 IF MIDSCADS, T, ll = •9• THEN T = T + 1 : GOTO 180 230 PRINT @320, Z7s; • REF DETAILS A 200 ADS = STRINGS CT - 1,321 + RIGHTS !AD$,6 - Tl : RETURN CC NO •;z6s ;• ";Z5S 210 CLS : PR INT @9, •*** Househo ld Accountin9 Ver 240 IF P THEN LPRINT Z7s ; • REF DETAILS 5.9 for t h e Model 4 ***" ; : PR INT @80, •*** ( ACC NO •;z6s; • • JZ5$ Cl 1st November 1983 M i c r o - 8 0 P t y L t d 250 RETURN ***" ; 260 GOSUB 200 PRINT @190 , Z4s; •s Avai lable• :PRINT:PRINT•1 = Pr i 220 PR INT @160, CHRS!311; : RETURN nt Led9er Ba l ances 4 = GJ General •;z4s:PRINT"2 = 230 XIS = •sAVE To • : GOSUB 319 CP Cash Payments •;z 4s ; • 5 = SJ Sales •;Z4$ :PRINT•3 . . . 240 GOSLIB 330 = CR Cash Received •;zqs • ' 250 IF SF = 2 THEN 360 270 PRINT " 6 = Return To Ma in Menu• 260 GOSUB 340 280 PRINT @832,Z3S ; : PA = 848 : LN = 1 GOSUB 30 AD VAL !AD 270 GOSUB 350 : IF AD$ = •E• THEN 239 $) 280 IF SF = 1 THEN OPEN •o•,1,NM$ 290 IF AD < 1 OR AD > 6 THEN 280

290 IF SF = 1 THEN PR INT H1 ,W : FOR I 1 TO W PRINT H1 ,ASCII 300 ON AD GOTO 560, 310, 320, 330 , 340, 530 : NEXT : CLOSE 319 PT$ = •cASH PAYMENTS " : KA$ = •cp• : GOTO 350 300 GOTO 230 320 PTS = •cASH RECEIVED" : KA$ = •cR• : GOTO 350 310 GOSUB 229 : PRINT @199, •DATA •; LEFTS !X1S,4) ;• 339 PT$ = "GENERAL • : KA$ = •GJ" : GOTO 350 329 PR INT :PRINTu 1 = •;X1s; • DISK•: PRINT 340 PT$ = •sALES• : KA$ = "SJ" :PRINT" 2 = EXIT TO MENU • : RETURN 350 GOSUB 369 : GOSUB 390 : GOTO 410 330 PR INT @832 , Z3S ; : PA = 848 : LN = 1 : GOSUB 40 : SF = VAL CAD 360 PR INT @832, aiS THE PRI NTER REQUIRED CY/NI *• ; PA 862 L I $) : IF SF < 1 OR SF > 3 THEN 330 ELSE RETURN N = 1 : GOSUB 30 - 340 FL = 0: GOSUB 220 : PRINT @428, .ENTER FILENAME KKKIKKJM•; : 370 IF AD$ < > •N• AND AD$ < > •y• THEN 360 n PA = 443 : LN = 8 : GOSUB 49 : NM$ = AD$ : RETURN 380 P = !AD$ = •y• ) : RETURN :rJ 350 PR INT @492, .PRESS ANY KEY WHEN DEVICE READY OR !EISCAPE *• 390 ZK$ = •• : PRINT @896, •WHICH •;z7s ; • DO YOU REQU IRE **'**'** 0 ; : PA = 538 : LN = 1 : GOSUB 40 : RETURN •; : FL = 1 : PA = 922 : LN = 2 : GOSUB 30 : �$ = AD$ : IF E$ • 360 CHAIN "MODULE0/ BAS ",259, ALL "00• THEN E$ = ••s• : ZKS = •ALL • : GOTO 410 (X) 400 PA = 925 : GOSUB 30 : E$ = E$ + AD$ : PA = 928 : GOSUB 30 0 E$ = E$ + ADS : RETURN 10 REM MODULE6/BAS 410 GOSLIB 210 : PR INT : PR INT PTs; • "JZ4s ; • FOR •;zKs ; •c•;z7s ; •) 20 GOTO 220 •;Es : IF P THEN LPR INT : LPRINT PT$J • •;Z�$; • FOR •;zKs ; •c•;Z7$

39 AD$ = ; n) •;E$ 40 FOR T = 1 TO LN 420 DTH = 0 : CTH = 0 : BLH = 0 : GOSUB 230 50 GOSUB 120 : IF IN$ = CHR$!131 THEN 100 ELSE IF IN$ CHR$ !8) 430 FOR I = 1 TO W THEN 80 ELSE IF IN$ = CHR$ !321 THEN GOSUB 140 440 IF MIDSCA$!11 ,42,21 < > KA$ THEN 490 60 AD$ = AD$ + IN$ : PRINT @PA ,ADS ; : NEXT : RETURN 450 IF ES = ••s• THEN 470 a r 70 NEXT : RETURN 460 IF E$ < > LEFTS CA$CII ,61 THEN 490 � 80 IF T < = 1 THEN 50 ELSE T = T - 1 470 GOSUB 540 : GOSUB 550 : PRINT VX$ : IF P THEN LPRINT VX$ m 90 ADS = LEFTS !ADS , LEN CAD$ ) - 11 : PRINT @PA ,ADs; •**• ; : GOTO 5 480 DRH = VAL C MID$CA$CII ,47 ,8) ) : CRH = VAL C MIDS!A$(11 ,55 ,81 1 -"" z 0 : DTH = DTM + DRH : CTM = CTM + CRH : BLH = BLH + DRM - CRH 9 100 IF FL = 0 THEN BL$ = STR ING$ CLN- LEN CADSJ ,• ") : ADS = ADS 490 NEXT -"" + BL$ : PR INT @PA ,ADS; : RETURN 500 PR INT : PRINT Z0$ ; TABC361 J : PR INT USING F3S;DTM ;CTM : PR IN z 110 BL$ = STR ING$ CLN- LEN ! ADS J ,•0• 1 : ADS = ADS + BL$ : PRINT T •BALANCE •; : PRINT USING F4S ; BLM m� @PA ,ADS ; : RETURN 510 IF P THEN LPRINT : LPRINT Z0$J TABC361 J : LPRINT USING F3$; D $: (!) 120 IN$ = •• : IN$ = INKEY$ : GOSUB 130 : IF IN$ = •• THEN 129 E TH ; CTH : LPRINT •BALANCE •; : LPR INT USING F4S;BLH m :n LSE RETURN 520 PRINT @960, "PRINTOUT COMPLETE - ";SOS J : PA = 1006 : LN = 1 0 m 130 PR INT @PA ,ADS ; CHR$!1431 ;: RETURN : GOSUB 3� : GOTO 260 0 m 140 IF FL = 0 THEN RETURN 530 CHA IN •MODULE�/BAS•,250 ,ALL $: (!) 159 IN$ = "0" : RETURN 54� Vl$ = LEFT$ !AS(II ,2) : V2$ = MIDS!A$(11 ,3,21 : V3$ = MID$!A$ m :n 160 T = 1 (11 ,5,2) : V4$ = MIDS!A$CII,7 ,41 : V5$ = MIDS(A$!11, 11,31) : V6� 179 IF T > 5 THEN ADS = • 9 " : RETURN = MIDSCA$(11,4 2,21 : V7$ = MID$(A$(1) ,44,31 : VS$ = MIDSCA$(11 , co 180 IF MIDSCADS , T, 1) = •0• THEN T = T + 1 : GOTO 170 47,8) : V9$ = MIDSCA$(1) ,55,81 : RETURN �(X) • 190 AD$ = STRI NG$ !T - 1,321 + RIGHTS CAD$,6 - Tl : RETURN 550 VX$ = V1$ + •J• + V2$ + •Jw + V3$ + • • + V4$ + • + V5$ + • + V6$ + V7$ + " " + VS$ + • • + V9$ : RETURN 9.0 0 AD$ = LEFT$ (AD$ , LEN (AD$ ) - 1) : PRINT @PA , AD$ ; "**• ; : GOTO 5 56� GOSUF 2 0 � GOSUB 360 : GOSUB 200 : GOSUB 710 : PRINT @463, • 0 * * * W A I T * * *" : FOR I = 1 TO W - 1 : GOSUB 540 : LBCIJ 100 IF FL = 0 THEN BL$ = STRI NG$ CLN - LEN fAD$) ,• •) : AD$ = AD$ =VAL ( RIGHT$ {V7$, 3) ) NEXT I : J = 0 : DT# = 0 : CT# = 0 : BL# a + BL$ : PRINT @PA ,AD$; : RETURN = 0 E 11� BL$ = STRI NG$ fLN - LEN CAD$) ,•0• ) : AD$ = AD$ + BL$ : PR INT $: 570 GOSUF 210 : PRINT PRINT "ACC No . •; TABC16J ;Z6$; •s• ; TAB C34 m @PA ,AD$ ; : RETURN );Z5$ ; •s•; TAB f55) ;Z0S +>­ 120 IN$ = •• : IN$ = INKEY$ : GOSUB 130 : IF IN$ = •• THEN 120 E z 580 IF P THEN LPRINT : LPR INT •ACC NO . •t TAB(16J ;Z6$; •s• ; TAB f34 0 LSE RETURN );Z5$ ; •s• ; TAB (55) ;Z0$ +>- 130 PRINT @PA ,AD$ J CHR$(143) J: RETURN 590 TTtt = 0 : DR# = 0 : CRD = 0 J = J + 1 z 140 IF FL = 0 THEN RETURN 600 VF = LB (J) : FOR I = 1 TO W IF LB (I) = VF AND LB (I) < > 0 � 150 IN$ = "0" : RETURN m THEN GOSUB 700 $: 160 T = 1 OJ 610 NE XT I : LB (J) = 0 IF J W THEN 670 ELSE 620 m 170 IF T > 5 THEN AD$ = • 0• : RETURN ::n 620 IF VF = 0 THEN 590 19� IF MID$CAD$, T, 1J = •0• THEN T = T + 1 : GOTO 170 m0 630 TTff = DRff - CRff : DTff = DTH + DR# : CTH = CTH + CRH : BLH = 0 190 AD$ = STRING$ •N• AND AD$ < > •y• THEN 260 n IF SA$ > SB$ THEN SB$ = A$ (SA) A$ (SA) A$ CSA + 1) : A$ fSA + 280 P = fAD$ = wy• ) : RETURN :D 1> = SB$ 290 GOSUB 210 : PRINT @190, •Led9er •;Z2$; •s" :PRINT:PRINT • Type •; 740 NEXT SA : NEXT SC : RETURN 0 CHR$ C34J ; •999•; CHR$ f34J ;• To Exit• I 300 GOSUB 260 to 310 PRINT @960, .Which •;Z2$; • No. Do You Require ** *• ; PA 99 0 10 REM MODULE7/BAS O 3 � LN = 3 : FL = 1 : GOSUB 30 : N = VAL CAD$) 20 N ERROR GOTO 100 320 IF N < 1 OR N > 999 THEN 310 30 GOTQ 50 330 BLH = 0 : DTH = 9 : CT# = 0 : IF N = 999 THEN 480 40 PRINT @l60, CHR$(31); : RETURN 340 GOSUB 200 : PRINT ; PRINT Z2$J • NO. •;AD$; : IF P THEN LP RIN 50 COMMON VV ,A$() ,LB(J,F3$,F4$, F 5 $,W,SO$,Z0$, Z1$,Z2$, Z3$,Z4$, Z5$ T: LPRINT Z2$; • NO . •;AD$ ,?6$ ,Z7$,PA,LN,AD, AD$,DT$ ,RF$ ,DE$,PR$ ,DB$ ,CR$,P 350 GOSUB 230 : FOR I = 1 TO W 60 GOSUB 40 : PRINT @190, "LINEPRI NTER UTILITY•:PRINT:PRINT• TYPE 360 IF N < > VAL ( MID$CA $CIJ ,28,3) ) THEN 390 HEADINGS OR NOTES AS PEQU IRED":PRINT:PRINT.TYPE •; CHR$ f34) ; •EXI 370 GOSUB 460 : GOSUB 470 : PRINT VX$ : IF P THEN LPRINT VX$ T• ; CHq$ 134) ;" TO RETURN TO MA IN MENU• :PRINT CHR$(14) 70 380 DRfi = VAL C MID$CA$CIJ ,47,8) ) : CRfi =VAL l MID$ fA$fiJ ,55,8) ) M$ = •• : INPUT M$ : IF M$ = "EXIT" THEN PRINT CHR$f15) :GOTO : DTH = DTH + DRH : CTH = CTH + CRH : BL# = BLH + DRfi - CRH 90 79 390 NEXT 80 PR INT M$ : LPRINT M$ : GOTO 400 PRINT : PRINT Z0$ ; TAB f36) J : PRINT USING F3 $; DTfi ;CTfi 00 CHAIN ·MoDULE0tBAS ",250 , ALL 57 410 IF P THEN LPRINT : LPR INT 29$ ; TAB C36) J : LPRINT USING F3$;D 10� JF ERR � THEN PR INT"Dev ice I/0 error ":PRINT •PLEASE CONNEC Tfi ;CTH T PR JN fER OR TYPE EX IT" :PRINT: RESUME 70 420 PR INT Z2$; • BALANCE"; : PRINT USING F4$; BLH 430 IF P THEN LPRINT Z2s; • BALANCE "; : LPRINT USING F4$; BLH 440 PR INT : PR INT : IF P THEN LPRINT ,. " : LPRINT • • 10 REM MODULES/ BAS 450 GOTO 310 2""1 GOTO 220 460 Vl$ = LEFT$ CA$(IJ ,2) : V2$ = MID$CA$CI),3,2) : V3$ = MID$(A$ 30 All$ = O 1 (I) ,5,2) : V4$ = MID$ CA$fiJ ,7,4) : V5$ = MID$CA$(I),11,31) : V6$ 40 F R T = TO LN 120 = MID$(A$IIJ ,42, 2) : V7$ = MID$CA$tiJ ,44,3) : VB$ = MID$CA$fi) , 50 GOSUB : IF IN$ = CHR$(131 THEN 100 ELSE IF IN$ CHR$ (8) 80 $ 47, 8) : V9$ = MID$(A$fi) ,55,8) : RETURN J(j) THEN ELSE IF IN = CHR$ (32) THEN GOSUB 140 m $ 470 VX$ = Vl$ + "I" + V2$ + •t• + V3$ + • " + V4$ + • • + V5$ + 60 AD$ = AD$ + I N : PR INT @PA ,AD$ ; : NEXT : RETURN w • + V6$ V7$ + • • V8$ + • • + V9$ : RETURN ()1 70 NE XT : RE TURN + + 1 480 CHA IN "MODULE0/ BAS ",250, ALL 80 (� T 0: -= 1 THEN 50 ELSE T = T - PA GE 36 MICRO-SO VOLUME 4 No. 4 (NOVEMBER/DECEMBER 1983)

000 1� ·�····***··········�······ 00�70 . WR I TER 1.1 + 00030 +

fi:lei?Rel +

00290 .. 0ef3el0 +T h is is the entry point for USR0 003 10 .. 00320 .. 00330 BEG IN PSHS cc ,x Save thea 130340 ORCC H'5f21 D i sab l e int errup ts 00350 TST

004A0 *Thi s is the en try poi nt for USR 1 C!l047C?J * 0c:::'f480 *

11'(!14 90 PSHS x,cc Save thwm et0""i00 ORCC H50 D i sable interrupts 005 10 TST

ei056Y.J * 00'570 * 00580 +S tart of our ma in rout ine 00590 * 00600 ..

0e'l6 10 CHROUT PSHS U,D,X,Y,CC SavE" al l .00620 CMPA #8 ?Backspace .0Q'I630 BNE CRTRNG If not l ook for nacre contro ls 00640 LDA #$20 ASC II for spacE" 30650 BSR DSPLY Go show it 00660 LEAX -1,X Bac k one pas 0Q'I670 BSR SHOW Rub ou t charac f'l0f:J80 BRA STOP Ex it 0el690 CRTRNG CMPA #$2eJ ?Contro l char ac 09700 BLO STOP Ex it if so 00' 10 CMPA #$7F ?Graphics cha.rac 00720 BH I STOP Ex it if so QU21730 RSR DSPLY Go show it QH2174f21 BSR SHOW Q'f07'5f21 RRA STOP Exit VOLUME No. (NOVEMBER/DECEMBER 1983) PAGE 37 4 4 MICRO-SO

(�0760 DSPLY PSHS A Save charac 0et77et LDD ($88 Basic 's cursor pos 0€'1780 PSHS B Save LSB 007Qet LSRA MSB of A into carry bit 00RJ30 RORB And into MSBit of B etetR leJ LSRB Sh ift into lower nybb le 013820 LSRB 00830 LSRB 00840 LSRB 008'50 LDA 12 bytes /charac: 0i:J860 MUL Mod ify position 12'0870 LDA 32 byt@s /row 008Rfll MUL Get row position 0fll89fll TFR D, X Swap for later etfll90fll PULS B Retrieve it 009 10 ANDB h1F Clear bits 5-7 0092fll ABX Get co lumn position eeq�e LDD

3020 : 3411 1A50 6D8C 7F26 106C 8C7A BE01 68AF 338v : 0�00 0"3C 0404 0404 "404 "43C ""03 0003 3030: 8D00 1730 8C 18 BF01 681C AF35 9134 111A 339£J : 1C2A 4908 0808 0808 0800 0000 �008 102� 3040 : 506D 8C62 27F3 6F8C 5D8E 1111 20E8 3477 33A0 : 7F20 1008 0000 0000 0000 0000 0000 0000 3050 : 8108 260A 8620 8D14 301F 8D30 2046 8128 338£J: 0000 0000 0000 3C02 3E42 423C 0000 0040 3060 : 2542 817F 223E 8D04 8D22 2038 3402 DC88 33C0: 4040 7C 42 4242 427C 0�00 0000 0000 3C42 3070 : 3484 4456 5454 5454 868C 3D86 203D 1F01 33D0 : 4040 423C 0000 0002 0202 3E42 4242 423E 3080 : 3504 C41F 3ADC BA30 8835 0239 8020 C60C 33E0 : 0000 0000 0000 7C44 7C40 407C 0000 000A 3090 : 3D33 8D00 1233 C8C6 0CA6 C0A7 8430 8820 33F0 : 0808 08 1E 0808 0808 0000 0000 000£J 3C42 30A0 : 5A26 F639 35F7 0000 0000 0880 0008 0800 3400 : 4242 423E 0242 3C4£J 4040 7C42 4242 4242 3080 : 0000 0000 0808 0808 0808 0880 0800 0000 34 10: 0000 00£J0 1000 3010 1010 107C 0000 0000 30C0 : 2424 0000 0000 0000 0000 0080 8024 247E 3420 : 0002 0006 0202 0202 0242 3C40 4044 4870 30D0 : 2424 7E24 2400 0008 3E49 281C 0A09 493E 3430: 4844 4242 0000 001£J 1010 1010 1010 1010 3440: 0000 0000 0000 7749 4941 4141 0000 0000 i 30E0: 8808 0000 7051 7204 8810 2745 0700 000C IIIII 30F0 : 1212 0C 18 2542 4639 0000 0000 1810 0000 3450: 0000 5C62 4242 4242 0000 0000 0000 3C42 n 3100 : 0808 0000 0000 0008 1010 1010 1010 1008 3460 : 4242 423C 0000 0000 0000 7C42 4242 427C :1 31 10: 0000 0008 0404 0404 0404 0408 0000 0000 3470 : 4040 4000 0000 3C42 4242 423E 0202 0300 3120: 0000 4122 147F 1422 4100 0000 0000 8088 3480 : 0000 4C52 6040 4040 0000 0000 0000 3E40 0 D 3130: 087F 0808 0800 0000 0000 0000 0000 0018 3490 : 3C02 027C 0000 0008 0808 3E08 0808 0A04 0) 3140 : 1808 1000 0000 0000 7F00 0000 0000 0000 34A0 : 0000 0000 0000 4242 4242 463A 0000 0000 0 3150: 0000 0000 0000 1818 0000 000 1 0102 0408 3480 : 0000 4242 4242 24 18 0000 0000 0000 4141 3160: 1020 4040 0000 003E 4143 4549 5161 413E 34C0: 4149 4977 0000 0000 0000 4224 1818 2442 3170: 0000 0008 1808 0808 0808 083E 0000 003E 34D0: 0000 0000 0000 4242 4242 423E 0242 3C00 3180: 4101 0204 0810 207F 0000 003E 4101 010E 34E0 : 0000 7E02 04 18 207E 0000 0000 0000 3190: 0101 413E 0000 0002 060A 1222 7F02 0202 31A0: 0000 007F 4040 407E 0101 413E 0080 003E 3180: 4140 407E 4141 413E 0000 007F 8 181 82S4 1 31C0: 08 10 2020 0000 003E 4141 413E 414 413E a 31D0: 0000 803E 4141 413F 0101 413E 0000 8088 s:E 31E0: 0000 8018 1800 1 � 18 0000 0000 0000 0018 m 31F0: 1800 1818 0810 0000 0204 0810 2010 0804 .,.. **** TRACK RACER **** z 3200 : 8280 0000 0000 007F 007F 0008 0000 0008 9 3210: 20 10 0804 0204 0810 2808 003E 4181 0284 .,.. HITACHI PEAC H 3220 : 0888 8088 8888 003E 4140 484E 5151 493E z 3238 : 0008 0008 1422 417F 4141 4141 0000 807E � 3248 : 2121 213E 2121 217E 0888 883E 4148 4840 m 10 REM TRACK RACER BY D.C. KELLY,20 RUTH s: 3258 : 4040 413E 8080 807E 2121 2121 2121 217E OJ ST . CORI NDA,BRISBANE ,4075 m 3268 : 0800 007F 4048 487E 4040 407F 000" 007F :::0 20 WIDTH40! INPUT •Do YOU WANT DIRECTIONS 3270 : 4"40 407E 4"40 404" 0000 ""7F 4840 4341 m0 (Y/NJ •;DR$ : IFDR$= •Y•THEN220 () 3280 : 4141 417F 0000 0041 4141 417F 4141 4141 m 30 RANDOMIZE (PEEK (�HFFE0 )*255+PEEK ( �HFFE s: 3290: "000 00 1C 0808 0808 0808 081C 0800 0804 OJ 0J J:Z=20 : B$=CHR$ (254J : D$=CHR$C94J : S$=CHR m 32A0 : 0404 0404 0404 441C 0000 004 1 4244 4870 :::0 $(92J :TIME$= •00:0S:Se• : SCREEN S:WI DTH40 3280: 4844 4241 00"" 0040 4"40 4040 4040 4"7F 40 FORY=0T024 co �OJ 1 a 50 PRINTTAB C15) B$; :PRINTTAB C25JB$ r 1420 SL$= •123456789 123456789 123456789 123456789 123456789 1234 cs: 68 NEXT 56789 123456789 123456789 • m 70 X1=INT C RND*9+ 1)+15 1430 RL$= •123456789 123456789 123456789 123456789 123456789 1234 -"" 88 PRI NTTAB C15J B$; : PRINTTAB CX1)D*I :PRINT z 56789 123456789 123456789 w 0 TAB C25JB$ 1440 A$ (1)=•123456789 123456789 123456789 123456789 123456789 • -"" 98 X=POS C0J : Y=CSRLIN 1450 A$ (2)=•123456789 123456789 123456789 123456789 123456789 . z0 108 LOCATEZ, 11:PRINT • • < 1460 A$ (3)=•123456789 123456789 123456789 123456789 123456789 u m 118 K$=I NKEY•: IFKs�· ·THEN148 1470 A$ (4)=•1 2 3456789 123456789 123456789 123456789 123456789 u s: 128 IFASC -2BTHENZ=Z·H IJJ fl($) 1480 A$ (5)="123456789 123456789 123456789 123456789 123456789 .. m 130 IFASC CK$)=29THENZ�Z -l ::0 1490 A$ (6)=•1 2 3456789 1234567�9 123456789 123456789 123456789 " 0 140 IF SCREENCZ, 12) < >32THEN 188 m 1508 A$ (7)="1 2 3456789 123456789 123456789 123456789 123456789 u 0 158 LOCATEZ,12:PRINTH:LOCATE8 ,8:PRINTTI m 1510 A$ (8)=•123456789 123456789 123456789 123456789 123456789 u s: ME IJJ 1520 A$ (9)=•123456789 123456789 123456789 123456789 !23456789 u m 168 LOCATEX ,Y 1539 A$ (10) =•123456789 123456789 123456789 123456789 123456789 • ::0 170 GOT078 1540 A$ (11>=" 123456789 123456789 123456789 123456789 123456789 . *256+PEEK C VARPTR CAC$J +1J:FORT=IiJTOB4 :G >=18THENCLS: RUN OSUB5390 :POKEAC+T ,X: NEXT 298 IF ASC CK$J =8THENCLS: END 5020 DATA 160,191,191,191 , 143, 191,191 ,191 , 144,26,24,24, 24,24,24,2 2HJ GOT0198 4,24, 24,24, 165, 138, 191, 149, 179, 170, 191 , 133,154, 26,24,24,24, 24,24 228 PRINTTABC14J •TRACK RACER•:PRINT.The ,24,24, 2 4,24, 32, 131 , 139, 191 ,191 , 191, 135, 131 ,32,26,24,24,24, 24,24 ob ject is to steer a car c•;cHR$ C92J ;•) ,24,24,24, 24,32 ,32, 32, 162, 191 , 145,32, 32,32 for as long as possible,without hi I 5030 DATA26, 24,24, 24,24, 24,24,24,24,24,32, 131 , 131,131,131,131,13 - tt ing any obstac les,or go ing of f the tr 1,131 ,32 n ac k.You control it with the left and ri 5040 T1=PEEK C VARPTRCT$(1J J+2)*256+PEEK C VARPTR CT$(1J J+1J :FORT=0TO ght arrows of the cursor control keys. •: :D 42: GOSUB5390 :POKET1+T, X:NEXT FORI=1T09801iJ 0 5050 T2=PEEK C VARPTR CT$(2) J+2)*256+PEEK ! VARPTRCT$C2J J+1J:FORT=0TO • 230 NEXTI : GOT030 42: GOSUB5399 :POKET2+T, X:NEXT : T3=PEEK C VARPTR CT$(3) )+2)*256+PEEK CV CD ARPTR CT$(3) )+1J : FORT=0T042 : GOSUB5391iJ: POKET3+T ,X: NEXT 0 5060 DATA 152,137,144, 149, 32 , 149, 150, 131 , 132, 131 ,151 , 129,151 ,131 , 148, 152, 137, 144, 149,32,32, 131 , 151 , 129, 152, 137, 144, 134, 129, 150, 13

**** L2/ 16K AUSTRALIA' S CUP CAUSCUP/DAT J ***-lt- 1, 132, 32, 3 2, 168, 131 , 137, 170, 32, 170, 170, 131 , 169 5070 DATA151 ,131 , 149, 149, 32, 149, 146, 131 , 148, 32, 149,32, 151 , 167, 32 TRS-80/SYSTEM-80 ,151 , 131 , 149, 149,32, 32,32, 149,32, 151, 131 , 149,32,32, 146, 131 , 148,3

2, 32 , 17�, 32 , i6�, 17V, 32, i7V, l70, 131, 129 5080 DATA129,32, 129, 130, 131 ,32, 130, 131 ,32, 32, 129,32, 12 9,32, 129, 1

1 REM U J( H KIE****** H 29 ,32, 129, 131 ,131 , 129,131 ,131 , 129, 129,32, 129,32,32, 130,131,32,32 * AUSCUP / DAT * ,32,32, :31 , 129, 32, 131 , 129, 139, 32,32

***-*lllEli)()(KKKm 5S90 SR=PEEK C VARPTR CSR$J +2) *256+PEEK CVARPTR CSR$ J +1) ! FORT=0T079 !G 2 CLS : CLEAR3000: DEF INTT:DIMA$C13J :REM OSUB5399:POKESR+T,X:NEXT DELETE THIS LIN E BEFORE TYP ING IN THE REST OF THE PROGRAM !! 5100 DATA32,32,32, 160, 190, 170, 168, 144,32, 32,32,2 6,24,24,24,24,24 1350 AC$=n 1 23456789 123456789 123456789 1 23456789 123456789 1234 ,24,24, 24,24,24,24,32, 32, 184, 191,191 , 170,170, 191,180, 32,32,26,24 56789 123456789 123456789 12345 • ,24,24, 24,24,24, 24 , 24 , 24 , 24 ,24, 32, 178, 179, 179, 179, 186, 178, 179, 17 1360 T$ (1)=• 12�456789 123456789 123456789 123456789 123" 9, 177, 32,26, 24,24,24,24,24,24, 24, 24,24,24,24 1370 T$ (2)=• 123456789 123456789 123456789 123456789 123• 51 10 DATA32 ,32, 131,131,131,131 ,131 , 131 , 131 ,32,32 1380 T$ !3) =•123456789 123456789 123456789 123456789 123" 5120 RR=PEEK C VARPTR CRR$) +2)*256+PEEK I VARPTR CRR$ ) +1):FORT=0T079 !G 1390 SR$= "123456789 123456789 123456789 123456789 123456789 1234 OSUB5390!POKERR+T ,X: NEXT

56789 123456789 123456789 n 5130 DATA32,32,32,32, 160, 190, 144,32, 32,32,32,26, 24 ,24,24,24,24,2 1401iJ RR$= •123456789 123456789 123456789 123456789 123456789 1234 4,24,24,24,24,24,32, 32,32, 32 , 190, 191 , 189,32, 32, 32, 32, 26,24,24,24 56789 123456789 123456789 • ,24,24,24,24,24,24,24,24,32,32,32, 178, 179, 187, 179, 177,32,32,32,2 1410 CS$=• 123456789 123456789 123456789 123456789 123456789 1234 6, 24,24 ,24,24,24,24,24,24,24,24,24 G)"15 56789 123456789 123456789 • 5140 DATA32 ,32, 32, 130, 131, 131 , 131 , 129,32, 32, 32 m (0 . 0 516� DATA32,32,32,32,32, 170,32,32,32,32,32,26,24,24,24,24,24,24, 191,191 ,191 ,86,73,67, 191 , 189, 189, 143, 131 , 129,32,32 24 ,24,24,24,24,32,32,32,32,32, 17B ,32 ,32•3�,3�,32, 26, 24,24,24,24, 5350 DATA32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, 32,32,3 24 ,24,24,24,24,24 ,24,32,32,32,32, 160, 186, 176,32,32, 32,32,26, 24,2 2,32,32,32,32,32,32,32,32,32,32,32,32,32, 3� , �2. 32 ,�2 . 131,131,19 1 4,24,24,24,24,24,24,24,24 ,24 ,143,175 , 191,191 , 143, 135,32,32,32,32,32 517� DATA32,32 , 32, 32,32, 131, 129, 32, 32, 32, 32 536� DATA32, 32,32, 32, 32,32, 32, 32 , 32 ,32,32, 32, 3 2, 32 ,32, 32, 32, 32,3 5180 SL=PEEK ( VARPTR (SL$) +2)*256+PEEK CVARPTR CSL$) +1):FORT=0T079:G 2,32,32,32 ,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, 13 OSUB539� :POKESL+T,X:NEXT 8, 188, 188, 132,84,65,83,32,32,32, 32 519� DATA32,32,32, 184, 170, 170, 180,32,32,32,32,26 ,24,24,24,24,24, 5370 DATA32,32,32,32,32,32 ,32,32,32,32,32,32,32,32,32,32,32,32,3 24 ,24,24,24,24,24,32, 160, 190, 191, 170,170, 191 , 189, 144,32,32,26,24 2,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, 32 ,24,24,24,24,24,24,24,24,24,24,160, 179, 179, 179, 186, 178,179, 179, 1 ,131, 129,32,32,32,32,32, 32,32,32 79 ,144,32,26,24,24,24,24,24i24,24,24,24,24,24 5380 DELETE5000-5430 5200 DATA32,130, 131, 131, 131,131, 131,131, 129,32, 32 539� READX 5210 RL=PEEK ( VARPTR (RL$) +2) *256+PEEK C VARPTR CRL$ ) +1):FORT=0T079:G 5400 V=V+1: IFV< 1BTHENPR INT@410, • •;:RETURN OSUB5390 :POKERL+T,X: NEXT 54 10 IFV>=10ANDV< =20THENPRINT@419, • standby! •; 5220 DATA32,32,32,32,32, 186, 180, 32 ,32,32,32,26,24,24,24,24,24, 24 5420 IFV >20THENV=0 ,24,24,24,24,24,32,32,32,32, 168, 191 ,191, 148,32,32,32,26,24,24,24 5430 RETURN ,24,24,24,24,24,24,24,24, 32,32,32, 160, 179, 187, 179,179, 144,32,32, 26 ,24,24,24,24,24,24,24,24,24,24,24 5230 DATA32, 32, 32,32, 131, 131 , 131 , 131,32, 32, 32

524� FORG=1T013: AA=PEEK C VARPTR (A$(6) )+2)*256+PEEK C VARPTR (A$(6) )+ **** L2/ 16K AUSTRALIA' S CUP (AUSCUP/LST ) **** 1) : FORT=�T049 : GOSUB5390:POKEAA+T,X: NEXTT : NEXTG 5250 DATA32,32,32,32,32,32,32,32,32,32,32,32,32,32,32 ,32,32,32,3 2,32,32,32,32,32,32,32,32, 160, 176, 176, 176,32,32,32,32,32,32,32 ,1 I 6� ,148,32,32,32,32,32,32,32, 32,32,32 10 OUT254 ,0: CLEAR40B:DIMA$C13) :GOSUB101B:CLS: PRINTTAB (15) •T he -

5260 DATA32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32 ,32,3 A u s t r a 1 i a • s C u p• : PRI NTSTRI NG$ (64, 140) n 2,32,32, 176, 176,32, 160, 190, 191,191,191,191,191,191,32,32,32,32,3 20 MS$= •How many are playin9 ?•:PP=192:SL=l : GOSUB920: IFVAL (QQ$) ( J 2, 160, 191 ,191 , 180, 144,32,32,32,32,32,32,32,32 10RVAL (QQ$) >6THEN20 0 5270 DATA32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32, 160, 144 30 NP=VAL (QQ$) : CLS: PRINT•Piayer •s names are now required. •:PRINT I ,176, 188, 191, 191 ,191 , 183, 191 , 191 ,78,84, 191 ,191, 191 , 191 , 189, 156, 1 STRING$(64, 140) : PP=192:FORZ=1TONP : MS$=•Player •+sTR$(Z) +•, pleas (X) 76 ,176 ,160 , 186, ��1 ,191 , 191 , 191 , 144,32, 32,32,32,32,32,32 e enter name ?•:SL= 10: GOSUB920: PN$(Z) =QQ$: PP=PP+64 : NEXTZ 0 5280 DATA32,32,32,32,32,32,32,32,32,32,32,32,32, 176, 176,188, 1 91 , 49 CLS:PRINT•Pi ease place bets ! (Max : $1��) •:PRINTSTRING$(64, 1 4 191,191,191,191 , 191,191 , 157, 191, 191,191, 191,191,191,191,191 ,191, 0J : GOSUB 1580:PRINT •Defend in9 yacht is •;DF$; " at ";DO$ :PRINT "Cha 149, 191,191 ,191 ! 191,191,191,191,191 ,191 , 188, 144,32,32,32,32,32 lle n9i n9 yacht is •;C H$ ; • at •;CO$: PRINT 5299 DATA32, 32,32,32,32,32,32,32,32, 184, 188, 191,191,191 , 191 , 191, 50 PP=384 :FORZ=1TONP : MS$=PN$ CZ) +•, please make your bet ?• :SL=3 : 191,191,191 , 191,191,191 ,191 , 183, 191, 191 ,191 , 191 , 191,191,191 ,191 , GOSUB920: PB(Z)=VAL (QQ$) : GOSUB181S: PP=PP+64 : NEXTZ 191 , 149, 191 ,191 , 191 , 191,81 ,76,68, 191,191,191 ,191 , 188, 180, 144,32, 60 PR I NT@384 ,CHR$(31) i 32 70 PP=384 :FORZ= 1TONP : MS$=PN$ (Z) +", who do you bet on , C or D ?" : 5390 DATA32,32,32,32, 32,32,32,32, 189, 191,191, 191,191 ,191, 191 , 191 SL=1 : GOSUB92�: IFQQ$=•c•oRQQ$= •c•ORQQ$= •n•oRQQ$= •n•THENPB$ (Z}=��S a ,191 , 191 , 191 , 191 ,191 , 191 ,191 , 157, 159, 159, 159, 159, 159, 159, 159, 159 :PP=PP+64 : NEXTZELSEZ=Z-1:NEXTZ s::E ,159 ,149 , 159, 159, 191,191,191,191,191,191,191, 191 ,191 , 191,191 , 189 80 PRI NT@832 ,.The chal len9i n9 yacht comes from •;CN$;CHR$(31) ; m .j>. ,176 ,32 90 PR I NT@979 ,•P ress any key for the first rac e! "; : FORT= 1T05000 z 53 10 DATA32,32,32,32,32,32,32, 136, 178, 191,191 ,191 , 191 ,87,6 5, 191 , 100 IFPEEK (15359 ) =0THENNEXT:RUN 0 191,19 1,191,191,191 ,191 , 191 , 183, 191,191,191 ,83,6 5, 191,191,191 ,19 110 RN=B .j>. 1,191 ,191 , 157, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 159, 15 12� RANDOM :DS=259:CS=579 :DD=1 : CD=1 : CL=0:DL=0:CT=�: DT=S: MN=0 : SE=0 z 9, 191 130 RN=RN+ 1 �m 5320 DATA32, 32 ,32,32,32,32,32,32, 130, 175, 191,191 , 191,191,191 , 191 140 OUT254, 116:CLS: PRI NT@0, •Race ";RN; " -Between •;DF$; • and � �i OJ ,191 , 191,191,191 , 191 , 191 , 191, 157, 191,191,191,191,191,191 , 191 , 191 m CH$ :n ,191 , 191 ,191, 183, 191,191 ,191 , 191 , 191 ,191 ,78, 8 3,87, 191, 1 9 1,191 ,19 150 PRI NT@266 ,SR$ ;: PRINT@266+89, DF$ ;: PRINT@586 ,SR$ ;: PRI NT@586+89 0 m 1, 151 ,CH$; : FORG=1T0800: NEXTG :PRINT@64 ,CHR$(31);:FORT=1T050:PR I NT@RND ( 0 m 5330 DATA32,32, 32, 32, 32,32, 32,32, 32 , 32, 130, 175, 191 ,191 , 191,191 ,1 896) + 6 4, •.•;:NEXT s:: OJ 91 , 191 , 191 , 191 , 143, 143, 135, 131 , 131,32,32, 130, 131 ,131, 143, 191 , 135 160 PR I NT@DS ,SR$;: PRJNT@CS,SR$ ; m ,187 ,191 , 157, 187, 187, 187, 187, 159,159, 159, 191 ,191 , 191,191 , 191 , 135 :n 170 ONRND \2iGOSuB376 ,380 ,32 180 IFCL=5THEN530ELSEI FDL=5THEN630 <0 �CXl 1

19� IFCT> DTTHENPRI NT@� ,"The Chal lenger ";CHR$(34> ; CH$; CHR$ (34) i" a 680 PRINT r lead s. •;cHR$ ( 3� > ; 690 DW=DW+ l:IFDW >=4THEN750 $:c m 20� IFDT > CTTHENPRINT@0, .The Def ender ";CHR$ (34> ;DF$ ; CHR$(34) i" 1 7�0 PRINT "The tal ly so far is: ":PRINT" -�'> eads . ";CH R$ (3.t:J) ; 710 PRINT "Defender has won •;DW z 21£'1 GOT0 170 720 PRINT "Chal lenger has won •;cw () 220 GOT0220 730 PRINT:PRINT: INPUT "Press to start the next rac e• ;ZZ$: -�'> z 230 IFDS > =305THEN250ELSEDS=DS+DD GOT0120 0 < 240 PR1NT@DS ,SR$; : RETURN 740 FORG= 1T0800:NEXTG:Wl$=CH$: GOT0760 m $: 250 DC=DC+1 :IFDC=1THENPRINT@DS ,RR$; : RETURN 750 FORG= 1T0800:NEXTG:W l$=DF$ (D m 260 IFDC=2THENPR INT@DS ,CS$ ; :RETURN 760 CLS: PRINT.The Austral ia's cup has come to an end ! !" ::n 27� IFDC=3THENPR INT@DS ,RL$;: RETURN 770 PRINT: PRINT"The winning yacht was ";W I$; " from •; 0m 0 280 IFDC=4THENDC=0 :PRINT@DS ,SL$ ; :DD= - 1:DL=DL+1 780 IFWI$=DF$THENPRINT"Australia !"ELSEPRINTCN$ m 29� RETURN $: 790 PRINT (D 300 IFDS< =260THEN320ELSEDS=DS+DD m 800 IFWI$=DF$THENPR INT"Au stral ia has defended the cup yet again ::n 310 PRI NT@DS, SL$ ;: RETURN 1 !•E LSEPRINTCN$; • has won the cup from Austral ia ! !" cO 320 DC=DC+1: IFDC=1THENPRINT@DS ,RL$;: RETURN 810 PRI NT@512, • ";AC$: PRI NT@512+30+64, ""; CXl 330 IFDC=2THENPRI NT@DS ,CS$;: RETURN 820 IFWI$=DF$THENPRINT"<-- Austral ia's Cup"; ELSEPRINT"<-- •;C N$ ; � 340 IFDC=3THENPRI NT@DS ,RR$ ;: RETURN "'s Cup"; 350 IFDC=4THENDC�0 :PRINT@DS .SR$ ; :DD=1 :DL=DL+l 830 PRI NT@896, ""; : INPUT "Press to see betting res ul ts• ;zz 360 RETURN $

370 DT=DT+1 : IFDD=1 THEN230ELSE300 840 IFWI$=DF$THENX$="D" :XX$="d•:xV=DVELSEX$="C" :XX$="c":XV=CV 380 CT=CT+ 1:IFCD=1THEN39�ELSE460 850 FORZ= 1TONP: IFPB$(Z>=X$0RPB$ =XX$THENPB <2>=PB (2l*XV :Z$(2l=" 390 IFCS>=625THEN4 10ELSECS=CS+CD won•ELSEPB <2>=0:2$(2)=" lost " 400 PRINT@CS ,SR$ ;: RETURN 86� NEXT2 410 CC=CC+1:IF CC=1THENPRINT@CS,RR$;: RETURN 870 CLS:PRINT"The betting resu lts for al l players are be low. ":PR I 420 IFC C=2THENPR INT@CS, CS$; : RETURN INTSTRING$(64 , 140) ; 1!1111 430 IFCC=3THENPRINT@CS, RL$ ;: RETURN 880 FOR2=1TONP :PRINTPN$(2) ;• has ";2$(2) ; n 440 IFCC=4THENCC=0: PR I NT@CS,SL$; :CD= -1: CL=CL+1 890 IFPB (2)=0THENPRINT" !•E LSEPRINT" ";PB(2) :D 450 RETURN 900 NEXT2 :PRINTSTRING$ (64, 140) 0 460 IFCS< =580THEN480ELSECS=CS+CD 910 MS$= "Press for another Au stral ia's Cup" : PP=960: SL=1 : B 470 PR I NT@CS, SL$ ;: RETURN GOSUB920 :RUN CD

48� CC=CC+1 :IF CC=1THENPRINT@CS, RL$ ;: RETURN 920 QQ$=• •:PRINT@PP,MS$; " "; 0 490 IFCC=2THENPRINT@CS, CS$; : RET!JRN 930 FORT= 1 TOSL :PRINTCHR$(95> ;:NEXT : FORT=1TOSL :PRINTCHR$(24) ;:NEX 500 IFC C=3THENPR INT@CS,RR$;: RETURN T 510 IFCC=4THENCC=0 :PRINT@CS, SR$ ; :CD= 1:CL=CL+1 940 AS$= INKEY$ 520 RE TURN 950 IFAS$=• • THEN940 530 FORG= lT0600 : NEXTG :CLS: OUT254 ,0:PRINT"The Chal lengi ng sh ip "; 960 IFAS$=CHR$ (8)ANDLEN (QQ$ ) =0THEN940 CH$; M from •;CN$ ;" has wo n! u 970 QQ$=QQ$+ASS: I FAS$=CHR$( 13) THENQQ$=LEFT$ (QQ$, LEN (QQ$l - 1> :RETU 540 PR INT:PRINT RN 550 CT= *6:MN=INT : SE=CT- ( MN*60 ) 980 PRI NTAS$; :IF AS$=CHR$ (8lTHENQQ$=LEFT$ (@Q$, LEN (QQ$) - 2l : PRI NTCH 560 PR INT"The Chal lenger won by •;MN; • minutes � •;sE; " seconds. R$ (95) ; CHR$ (24> ;:GOT0940 990 IFLEN (QQ$ } =5LTHENRETURN 570 PR INT 1�00 GOT0940 580 CW=CW+1:IFCW >=4THEN74� 1010 GOT01 350 590 PRINT•The tal ly so far is: •:PRINT" 1020 CLS: FORT= 1T03:PRINT " ";T$(T) : NEXT : FORT=1T012: PR INT 600 won •;cw PR INT"Chal lenger has •;A$(T) :NEXT:PRINT• •A$(13> ; 610 PRINT "Defenoer· has won ";DW 1030 PRI NT@769 ,"You -->";:PRINT@833, •are• ;:P RINT@896, "here• • ; 620 PR INT:PRINT: INPUT "Press to start the next rac eu ; ZZ$: 104� FORH= 1T025 GOT0 120 1050 PRI NT@780, "X" ; 630 FORG= lT0600: NEXTG: CLS : OUT254,0:PRINT"The Defend ing sh ip ";DF 1060 FORG= 1T090 : NEXTG $; • won ! 1 ! " 1070 PRI NT@780, • •; 640 PR INT:PRINT "Austral ia wi ll be celebrat ing 1080 FORG= 1T090 : NEXTG 659 PR INT: PR INT 1090 IFINKEY$="•THENNEXT :GOT01 880ELSE 1100 660 DT= (DT-CT l*6:MN= INT

ill - G):g 1110 CLS :PRINT " We 1 come to the ";CHR$ (34) ;" AUS T 1360 '* * m R A L I A ' S CUP •;cHR$ C34l :PRINTSTR IN6$C64, 140l ; .j>. 1370 '* * f\) 1120 PR INT"On the 26th o+ September 1983 , the Amer ica' s Cup was 1380 '* * lost by theAmer ican yacht 'Liber ty• to the Au stral ian yacht 'Aus 1390 '* * tral ia II' " 1400 '* THESE LINES WILL CONTAIN THE GRAPHIC STRINGS * 1130 PR INT"This day wi ll go down in h1story because a 132 year w 1410 '* * inning streak final ly came to an end . The peop le of Austral i 1420 '* * a rej oiced in Austral ia II's tr iumph and celebrated the win +or 1430 '* * many days (and ni9htsl af ter the glor ious event .• 1440 '* * 1140 PR INT "The Amer ica' s cup (affectionately known as The Au ld M 1450 '* * ug) was transported to Austral ia a nd to the Royal Per th Yacht 1460 '* * Club where it was gazed upon in wonder by al l." 1470 '* * 1150 PRINT "The Au ld Mug 's prev ious home had b een the New York Ya 1480 '* * cht Club wh ich was renowned for its sly and devious tactics us 1490 '* * ed to stop the cup from leavin g their shores. ":PR I NTSTRING$(64, 1 1500 '* * 40 ) ; 1510 '* * 1160 PRINT@979 ,"P ress any key to cont inu e• ; 1520 '* * 1170 IFPEEK C15359 l =0THEN1170 1530 '* * 1180 CLS:PRINT" T h e A U S T R A L I A ' S C U 1540 '* * p• 1550 '* *

119» PRINTSTRING$(64, 14Bl t 1560 'IIKIIIIIIIIIIIIIIII******IIIIIIIIIIIIIIIIIIIIIIIIIII 1200 PRINT "The New York Yacht Club could not de+ eat Austral ia II 1570 GOT01020 ne ith er on shore or off and had to surrender the cup to synd i 1580 RESTORE :FORT= 1T01000 : READS$: IFS$( )"AUSSIE"THENNEXTT cate head Alan Bond and the Austral ian crew. • 1590 FORT=1 TORND C10l : READS$ :NEXT : DF$=S$:FOR T=1T01000 :READS$: IF5� 1210 PRINT "Austral ia II owed muc h of its success to the cont rove <>"THEM" THENNEXTT i rs ial 'Winged Keel ' as we ll as its sturdy management. " 1600 U=RND C30l : FORT= 1TOU : READS$: NEXT: CH$=S$ - 1220 PRINT "The Austral ian Yacht earned a good reputat ion as we ll 1610 IFU<=10THENCN$= "Amer ica• (') as a few nicknames - One of these be ing 'The wonder from Down 1620 IFU>10ANDU< =20THENCN$="England " :a Under• .• 1630 IFU>20ANDU< =30THENCN$= "New Zealand " 0 1230 PRINT :PRINT"It is now some time a+ ter that glorious day and 1640 X=RND C7l : ONXGOT01650, 1660 , 1670 ,1680, 1690, 1700 , 1710 I you must defend the Austral ia' s Cup . Austral ia II wi ll not be c 1650 D0$="2/1":DV=2 :GOT0 1 720 Q) ompet ing as it isnow in a museum , stuffed , along with other spor 1660 D0$="5/1":DV=5 :GOT01720 0 ting greats such as Denn is Lil lee & Robert de Castel la. • 1670 D0$=" 10/1":DV=10: GOT01720 1240 PR I NTSTRING$C64, 140l ;:PRINT@979, "Press any key to cont inue" 1680 D0$= "20/ 1":DV=20 :GOT01 720 1690 D0$= "40/ 1":DV=40:GOT01 720 1250 IFPEEK C15359 l =0THEN 1250 1700 D0$= "50/1 ":DV=50 :GOT01 720

1260 CLS :PRINT" T h e A U S T R A L I A ' S c u 1710 D0$="100/ 1•:DV= 100: GOT01720 P" : PRINTSTRING$C64 , 140l ; 1720 X=RND C7l : ONXGOT01730, 1740 , 1750 , 1760 , 1770, 1780, 1790 1270 PRINT "The chal lengers for this years cup were from the Un it 1730 C0$="2/1":CV=2 : GOT01 800 ed States , Engl and and New Zealand . The Australia n trials have a 1740 C0$="5/1":CV=5 : GOT01800 (§ lready beenheld to decide the defender and the chal lengers have 1750 C0$="10 /1•:cV= 10: GOT01 800 :;::E al l competed to dec ide the chal lenger. • m 1760 C0$= "20/ 1":CV=20: GOT01800 .j>. 1280 PR INT"The Australias Cup wi ll be awarded to the yacht that 1770 C0$= "40/ 1":CV=40 :GOT01800 z wins the best o+ seven races to be held in the forthcoming wee 1780 C0$= "50/ 1":CV=50: GOT01800 0 .j>. k • • 1790 C0$="100/1":CV=100:GOT01 800 1290 PR I NTSTRING$C64, 140l ; 1800 RETURN z 1300 PRINT"Up to 6 peop le can bet on the outcome of the seven ra 1810 IFPB CZl >=0ANDPB CZl <=100THENRETURN �m ces. The names of the Chal lengi ng and Defe nding yachts will be :;:: 1820 PP=PP-64 : PRI NT@960, "Sorry ";PN$ CZ) ;•, but you're bet is ill OJ displayed along with the odds +or each ." m ega l !!";:PRINT@PP+64 ,CHR$(30l ;:PB CZ)=0: Z=Z-1 : RETURN :n 1310 PRINT:PR INT "Australia' s Cup CC) 10/83 by Car l Cranstone. Al 1830 RETURN 0m 1 Rights Reserved "; 1840 DATA"AUSSIE",Austral ia III,Down Under , Kangaroo !,Kangaroo I 0 m 1320 PRI NT@979 ,"P ress any key to start. •; !,Koa la I,Emu II,Auss ie Crawl, Kookaburra !,Advance II,Wal laby I :;:: OJ 1330 IFPEEK C15359 l =0THEN1330 18�0 DATA " THEM ",Yankee !,Yankee II,Liber ty, Stars n' Str ipes , Newp m :n 1340 RETURN ort , Yankee Dood le, Boston Strangler,Lost Angeles,Apple Pie, Titan i 1350 ' ******IIIIKMKKKKKIKIIKIIKIKIIIIIMIIIIIIIIIIIIIIIIIII c I cO �(X) a 1860 DATAUn ion Jack , Royal !,Britannia II,Victorious, Uns inkable,B 70 DATA 149, 149, 32 , 149, 130, 131 , 32, 149, 32, 149, 165, 160, cr s: odyl ine '32, Vict ory '83,Britain !,Britain II,En9l and III 133, 32, 129, 32, 149, 32, 149, 149, 148, 149, 131 , 131 ' 129, 1 m 1870 DATAK iwi I,Kiwi II,Auck land I,Wel lin 9ton II,New Zealand I,l 65 , 160, 133, 152, 137, 144, 129, 32, 129, 149, 32 , 149, 130, 15 .;:.. z ntrepid II,Rest l ess Native,N.Z. Chal len9e,Kee lHaul,Dead ly Weapon (lJ. 32. 32. 129' 32 ' 131 • 163 p 1880 OUT254 ,116:DS=259 :CS=579:DD= 1:CD=1 : CLS: PRINT@0, • Australi 80 DATA 133, 152, 129, 32, 131 , 131 , 129, 32, 32, 32, 32 , 32, 32 .;:.. a's Cup (c) 1983 by Car l Cranstone ** Demo Mode ** •: PRI NTSTRI NG� • 32, 32, 32 , 134, 163, 132, 32, 133, 32, 32, 129, 32 , 32 , 149, ' z (64, 131) ; 32, 32 , 133, 32, 32, 129, 32, 32 , 32, 32 , 32, 32, 32, 32 , 131 , 3 m� 1890 DE$= • 2, 32 , 32, 32 , 32, 140, 32, 32 s: llJ ** Austral ia's Cup ** - ** Press to start ** 90 DATA 131 , 32, 32 , 32, 32, 32 , 149, 32, 32, 139, 32, 32 , 32 , 3 m ** For up to six players ** 2, 32, 32, 32, 32, 139, 32, 136, 149, 32, 32, 149, 32, 130, 131 , :n 32, 134, 131 ' 148, 152, 131 , 32, 131 ' 131 , 129, 134, 131 ' 148, m0 0 1900 FORT=1T050: PR I NT@RND (832) +128, •.•;:NEXT 144, 131 ' 148, 130, 131 , 32 , 169 m :;:: 1910 X=RND (2J : ONXGOSUB370 ,380 199 DATA 174, 32, 141 , 174, 132, 32 , 139, 32, 183, 1 79 , 129, 144 llJ m 1920 IFPEEK (15359J<>0THENRUN ' 32 , 149, 13flJ, 131 , 32, 152, 131 , 129, 151 , 131 , 148, 130, 131, :n 1930 ZZ=ZZ+ 1:IF ZZ >=LEN (DE!P J THENZZ=0ELSEPRINT@960, MID!P(DE!P, Z Z, 6 2) 32 , 131 , 163, 133, 32, 149, 32 , 32 , 129, 32 , 150, 131 , 148, 150 <0 ;:GOT01910 ' 131 , 148, 130, 131 , 32, 15.9 �()) 1940 V=V+1 :IFV=2THENRUNELSE 1910 11flJ DATA 131 , 148, 130, 163, 133, 131 , 129, 32, 150, 163, 148, 1 57, 129, 149, 130, 131 , 32, 184, 184, 144, 174, 174, 132, 128, 1 **** L2/ 16K AUSTRALIA' S CUP (AUSCUP /LNW J **** 28, 128, 164, 181, 132, 155, 159, 145, 128, 129, 128, 156, 157, 10 MODE2 : 0UT254 ,116:PCLS5 :FLS 132, 179, 183, 149, 128, 129, 32 20 COLOR4 :LINE0, 0, 159, 11,SET , BF

30 COLOR2:LI NE0 , 48 ,159 ,79, SET ,BF **** 321 : FORZ= 1T08 : A=PEEK (14 400 > : B=PEEK (14368J : IFA=0AN 30 DATA 152, 137, 144, 157, 140, 149, 129, 32, 129, 151 , 131 , 14 DB=0THENNEXTZ : GOSUB 190: I FA=STHEN120ELSERETURN 8, 151 ' 131 ' 148, 131 ' 131' 32, 150, 131 , 132, 149, 32 , 144, 130 130 IFM=0THENSET CX,Y>ELSERESET CX, Y)

• 131 , 32, 151 ' 131 p 148, 149, 32, 149, 131 p 131 , 32, 151 p 131 , 140 GOSUB15S:GOT0129 129, 151 ' 131 ' 32, 131 , 131 , 129 159 IFAAND8THENY=Y+ ( Y)0)*1 : RETURN 4£1 DATA 151 , 131 , 129, 151 , 129, 32 , 129, 32, 32, 150, 131 , 132, 160 IFAAND16T HENY=Y- CY<44>*1 :RETURN 149, 136, 148, 13.0, 131 , 32, 149, 32, 149, 151, 131 , 149, 129, 170 IF (AAND32 >0RCBAND16)THENX=X+ CX>0>*1 : RETURN 32 , 129, 130, 151 , 32, 32, 149, 32 , 130, 131 , 32, 130, 131 , 149, 180 IFCAAND64)0R(BAND64 ) THENX=X- CX< 127)*1 :RETURN 144, 32 , 149, !.30, 131 ' 32, 149 190 A$= INKEY$: IFA$=• • THENA$= • • 50 DATA 152, 129, 151 , 164, 32, 129, 32, 129, 149, 32 , 32 , 149, 200 A=I NSTR (•CDETX.,A$) :IFATHENRETURNELSEA=INSTR (•cdetx• ,A$) :RET 32 , 32, 131 , 131 , 129, 157, 152, 149, 149, 32, 149, 129, 32, 129 URN ' 181 , 32 , 149, 149, 137, 149, 129, 32 , 129, 1 50 , 131 , 148, 149, 210 W1=CHR$(3 1> :W3=•[ 32 , 149, 130, 131 , 32, 151 , 131 •+CHR$ (08) +CHR$ (09) +•,.•: W2=W1+•GRAFX MODE : % %: use ARRO 6B DATA 148, 151 , 131 , 32 , 129, 32 , 32 , 150, 131, 148, 149, 164, WS or < > ESC CTRL• 149, 13.9, 131 , 129, 151 , 131 , 148, 151 , 167, 32, 129, 32 , 129, 220 X$= •ABCDEFGHIJKLMNOPQRSTUVWXYZ ?! .:;,1234567890ti*!P• : X1$=•abc 150, 131 , 132, 146, 131 , 148, 130, 1 31 , 128, 131 , 151 ' 129, 32, def9hijklmnopqrstuvwxyz •:DIMT$ (LEN (X$) ,3) ,SS% ( 3360 ) ,6$(25) ,P(25) {j)� m 149, 32 , 32, 129, 32 , 149, 32 ,U(15) .;:.. w

... G)"ll 230 OPEN• J•,t, •BJGLlRS• :pRJNT•InittaJ jzjng HUGE Jetters• : FORX=lT 650 PRINT@98B,X- C; : IF (PEEK (X) ( )32ANDPEEK (X) < >l28)THEN660ELSENE XT m .(.>. OLEN (X$J : FORY= lT03 : FORZ= 1T03: INPUTKl ,C:T$(X,YJ=T$ (X,YJ +CHR$(C) :N X:PR I NT@896,Wt•screen is emp ty : TRY AGA I N• ;:FORD=1T0500:NEXT:GO .j:. EXTZ: :NEXTY ,X: CLOSE T0250 240 FORX=0T0 15:READU (X) :NEXT :J=0 :CLS: S$=•s• : FORSN%= 1T07 : GOSUB790 660 B=X -C :L=INT(B/64J : R=B-L*64 :IFR=0THENR=64ELSEL=L+1 :NEXT 670 G=5 : P(1J=•t CLS : CLEAR2000 :READL:DIML(L) ,T$(L) • 250 PR I NT@960, •Iear rafx uge ave ecall

ro 680 P(2)=•2 FORX= 1TOL : READL (XJ : NEXT :FORX=1TOL :FORY=lTOL (XJ :READC gram n d•;:GOSUB 100 :T$(XJ=T$ (XJ +CHR$(CJ :NEXTY ,x• 260 S= I NSTR <•CGHPSRE •,A$J :IFSTHENONSGOSUB300, 310, 470, 620 , 770 , 780 690 P(3J =•3 FORX= 1TOL : PR I NT@ €X-1 J*64,T$(XJ ;:NEXTX� :P(4J=•4 DATA• ,830 +STR$(LJ :P(5)=•5 DATA • 270 S= I NSTR (•cghpsre •,A$) : 0NSGOSUB300, 310, 470, 620 , 770,780 , 830 700 FORX=1TOL : SB=C+ (X-1 J*64 :G$(XJ=• •:POKEVARPTR 220THENGOSUB760: G=G+1 :P(GJ=STR$(GJ+• DATA • J:IFA=0ANDB=0THENNEXTZ :GOSUB190: I FA=0THEN340ELSE290 730 NEXTZ,X:GOSUB760 :K=G : G=3 : GOSUB760:S$=•s• : SN%=7 : GOSUB790 350 POKECP,CH:GOSUB150:GOT0330 740 CLS:PRINT@256 ,.PROGRAM COMPLETE : 360 PRINT@960, USINGW2; •DRAW • ;:M=0 : GOSUB120:SET to Ex it•;:GOSUB110 Fi lespec : •F$ 390 CH=PEEK (CPJ :POKECP,140: FORZ=1T010: AS= INKEY$: IFA$=• • THENNEXT: 750 PRINT• POKECP, CH: FORZ=1T010: A$= INKEY$: 1FA$=• • THENNEXT: GOT0390 DUMPING PROGRAM :•:oPEN •o• ,t,F$:FORX=1TOK :PRINT Kl ,P(XJ :NEXT : CLOS -i 400 POKECP,CH:ONINSTR 15423 J*64: GOT0390 770 PRINT@960,Wt •save as screen K <1-6>•;:GOSUB100: SN%= INSTR <•t2 0 I 440 CP=CP- (CP< 16256 J*64: GOT0390 3456. ,A$J :IFSN%THENS$=•s• : GOT0790ELSE770 450 CP=CP+ (CP>15360)*1 : GOT0390 (X) 780 PRI NT@960, W1•Recal l sc reen K <1-6)•;:GOSUB100:SN%=INSTR (•t23 0 460 CP=CP- (CP< 16319J * l:GOT0390 456• ,A$J : IFSN%THENS$= •R•ELSE780 470 L=0 : GOT0580 790 DEFUSR=VARPTR (U(8} J:IFS$=•s•THENU (9J=15360: U(11J=VARPTR (SS% ( 480 GOSUB600 :PRINT@9+64, •xxx • ;:GOSUB100:S=INSTR (X$,A$J : IFSTHEN55 (SN%-1)*4B0J JELSEU (9J =VARPTR . 550 GOSUB610 z 560 L=L+ l:IFL<80THEN480 **** L2/ 16K LVAR UT ILITY **** 0 .f:>. 570 DEFUSR=VARPTR (U(0J J:J=USR(0J : PRINT@768,W l:L=L-16 580 PRI NT@960, Wt •SHIFT/BACKSPACE to Ex tt•; :GOT0480 TRS-80/SYSTEM-80 z 590 PRINT@9+64, • •;:RETURN m� :s:: 600 9= INT (L/16J*192+ (L-INT (L/16)*16)*4:RETURN 00001 HLVAR=NAMEH co m 610 FORY=1T03:PRINT@9 +(Y-1 )*64 ,T$(S,YJ;:NEXT : RETURN 00002 :n 620 TL=0:C=15360:PRINT@960,Wt•Enter 1 letter to identify program 00003 BY TIM FISH 0 . m . . 0 00004 9 CAVENDISH RD m 630 A$= INKEY$: IFA$=• • THEN630ELSES=ASC (A$J : IFS<650RS>90THEN630 00005 :s:: COLLIERS WOOD co 640 F$=•TITLE . +A$+ •/GFX• : PRINT@960, Wl •LOCATING END OF DATA• ;:FOR 00006 m LONDON SW19 2ET :n X= 16319TOCSTEP- 1 00007 ENGLAND <0 00008 �co l

(§ f!Jf!J88flJ SBC HL ,DE ;TWOS COMPL IMENT IT EJ0f!Jf!J9 s:E f!Jf!J 19f!J ORG 7E41H flJ09f!J!!J LD A, • - • m LD A,.f!JC3H ;C3=JP OP f!JflJ92.f!J CALL 33H -"" f!Jf!J 1f!J2 INIT z 0f!J1f!J4 LD C418EH) ,A ;ADRRESS OF •NAME • DOS EXI 0f!J94flJ POS PUSH BC C) T f!Jf!J96f!J CALL 0FAFH -"" f!Jf!J 1f!J6 LD HL , START flJ.f!J98f!J POP BC z C418FH) ,HL f!J1f!J.f!Jf!J INC BC 90 108 LD m� 00110 JP 1A33H .f!J1f!J2.f!J STEP JR NEXT s: co 00 12� BC , t4"'F9H) ;START OF VLT f!J104.f!J OUT HALT m START LD :n f!Jf!J 122 NEXT LD A, CCOUNT ) .f!J106f!J NOTINT CP f!J4 ;SINGLE PREC ISION? JR NZ , NOTSNG m0 f!Jf!J 124 CP flJ .f!J1.f!J8.f!J 0 LD A, •=• m f!Jf!J 126 JR NZ, NOT15 f!Jl lf!J0 s: f!Jf!J 128 AGN CALL 2BH 01120 CALL 33H co m f!Jf!J 13f!J OR A f!J114.f!J INC BC :n 00 132 JR Z,AGN f!J116f!J INC BC <0 flJ1 18f!J INC BC ;POINT TO VALUE 00134 LD A, 15 �CP 00136 NOT15 DEC A f!J12f!Jf!J LD D,4 f!Jf!J 138 LD CCOUNT) ,A f!J122f!J LD HL ,4121H 0fll 140 PUSH BC f!J124f!J LOOP! LD A, CBC) fllf!J142 POP HL 01269 LD CHL) ,A f!Jfll 180 LD DE , C4flJFBH) ;END OF VLT+1 flJ128f!J INC HL 0f!J2f!Jf!J SBC HL ,DE ;TEST FOR END flJ130f!J INC BC f!Jfll22f!J JR Z,OUT flJ132flJ DEC D f!Jf!J24f!J INC BC 01340 JR NZ, LOOP1 A,f!J ;NO PRINT USING f!Jf!J26f!J INC BC flJ1360 LD -I f!Jf!J289 LD A, flJDH ;LINE FEED 01380 PUSH BC n f!Jf!J31i!1121 CALL 33H 01400 CALL f!JFBEH ;CONVERT TO ASCII � STORE f!Jf!J32f!J LD A, CBC) 01420 CALL 28A7H ;PRINT IT :1 f!Jf!J34f!J CALL 33H f!J144f!J POP BC 0 I f!JflJ36f!J DEC BC flJ1460 HALFWY JR STEP C) f!Jf!J38f!J LD A, CBC) 91480 NOTSNG CP 8 ;STRING? 0 121flJ4flJflJ CALL 33H 015.f!JflJ JR NZ , STRING 0flJ42f!J DEC BC ;POINT TO CODE LENGTH 01520 LD A, 'D' ;MUST BE DBL f!Jf!J44f!J LD A, CBC) 01540 CALL 33H 0f!J46f!J LD C4f!JAFH) ,A 01560 LD A, •=• f!JflJ48.f!J CP 2 ;IN TEGER? fll 158f!J CALL 33H flJflJ500 JR NZ , NOTINT .f!J16f!Jf!J INC BC flJf!J52f!J INT LD A, '%' !H62.f!J INC BC f!Jf!J54f!J CALL 33H 0164f!J INC BC f!Jf!J56f!J LD A, • =• 01660 LD D,8 flJfll58.f!J CALL 33H f!J168f!J LD HL,411DH f!Jf!J6.f!Jf!J INC BC flJ170flJ JR LOOP! 0flJ62f!J INC BC f!J172fll STRING CP 3 0f!J64f!J INC BC 01740 JR NZ, OUT f1Jf!J660 LD A, CBC) SVALUE MSB 01760 LD A, '$' 00680 LD C4121H) ,A ;WRA1 01780 CALL 33H f!JflJ7f!J0 INC BC 01800 LD A, •=• f!JflJ720 LD A, CBC) flJ182flJ CALL 33H f!Jf!J74.f!J LD C4122H) ,A 01840 LD A, • • • f!J076f!J LD HL , C4121H) 91860 CALL 33H f!Jf!J78.f!J BIT 7,H ;TEST FOR NEG VALUE flJ188f!J INC BC flJf!J8fll.f!J JR Z,POS flJl9flJ0 INC BC 0f!J82.f!J LD DE ,.f!J 01920 INC BC EX DE ,HL LD A, CBC) G)"}; 00840 f!J1940 m f!Jf!J86.f!J XOR A ;CLEAR CARRY flJl96flJ PUSH AF -"" Ol

J -. f\\ -J ::.... - V\ � \,.� =- v I"'T'\ ltJ "'L:.. � 01980 INC BC 20 POKE�H40B I,�H00 : POKE�H40B2 ,�H80 : POKE�H407F ,PEEK I �H40A0 ) (j) m ;MSB STR ING ADDRESS 02000 LD A, (BC> 30 CLS: CLEAR50 :DEFINTA-Z: CP=�H4023 :CC=PEEK . (J) 02020 LD L,A 40 PRINT@72 ,.E DTASM ASSEMBLER SOURCE UT ILITY FOR MODEL III• 02040 INC BC 50 PRINT TABI19l ; •NEWDOS80 Vers ion 2.0• 02060 LD A, (BC) 60 PR INTTA BI15 );•( Copyr i9ht 1982 T. Dom i9an )•: GOSUB470 02080 LD H, A 70 DEFUSR0=�H404E : DEFUSR 1 =�H4070 : BU=�H8000 :MD=�H4056 02100 POP AF 80 POKE�H4024 ,�H0 1 : POKE�H4210, �H28 : POKE�H421 4,�H04 02120 CP 0 90 H$=CHR$ 1244 ) +CHR$ (245 l +CHR$ (246 l +CHR$ (32) 02140 JR Z,SKIP ;IF NULL STRING 100 CLS:PRINT:PRINTTAB (29J ;•MENU • 02169} PUSH BC 110 PR INT :PRINT• 1 . DISK FILE TO MEMORY BUFFER 02180 LD B,A 2. CASSETTE FILE TO MEMORY BUFFER 02200 LOOP2 LD A, (HL) 3. MEMORY BUFFER TO CASSETTE FILE 02220 CALL 33H 4. MEMORY BUFFER TO DISK FILE• 02249 INC HL 12£1 PRINT " 5. CLEAR MEMORY BUFFER 02260 DJNZ LOOP2 6. EXIT PROGRAM AND REPAIR BASic• .02280 POP BC 130 GOSUB460 02300 SKIP INC BC 140 IF !Ee <1lOR!Ee>6l THENGOT01 30ELSEIF (EQ<6l THEN170

• • 02320 LD A ' • 150 POKE�H4214, �H00: POKECP ,CC:POKE�H40B 1,�HFF : POKE�H40B2, �HFF 02340 CALL 33H 160 POKE�H40A0 ,PEEK ( �H407F >:POKE�H40A1 , �HFF :CLEAR : CLOSE :CI_S :END 0236.0 JR HALFWY 170 ONEQGOT0180,240 , 300,350,430 e2380 COUNT DEFB 15 180 ME=BU:CLS :PRINT@398, .DISK FILE TO MEMORY ROUT INE • 024.00 END INIT 190 PR I NT@582 ,•E nter Fi lespec ( wi t h Extens ion l == > •; 200 LINEINPUTFS$ :OPEN•R• ,1,FS$, 1:PRINT@720, •opENING FILE •;H$;FS $ 210 FIELD1 ,1ASA$ I START END ENTRY - 220 FOR I%=1TOLOF (1) :GET1 ,I%: Y=ASC IA$) : ME=ME+1 : POKEME ,Y:NEXTI� 7E4 1 7F2C 7E41 n 230 CLOSE :PRINT@855, .END OF FILE• : GOT0290 240 CLS:PRINT@39B, • CASSETTE FILE TO MEMORY ROUT INE• :G 7E41 : 3E C3 32 BE 41 21 4F 7E 22 SF 41 C3 33 1A ED 4B 250 PRINT@590, •Press ENTER when cassette is ready •:GOSUB460 0 a 7E51 : F9 49 3A 2C 7F FE 00 20 08 CD 2B 00 B7 28 FA 3E 260 POKEMD ,150 : POKEMD+2, 205 :POKEMD+3,53: POKEMD+4 ,2: POKEMD+5, 119 0F 3D 32 2C 7F C5 El ED 5B FB 40 ED 52 28 4A 03 m 7E61 : 270 X=USR0 (P) 0 7E71 : 03 3E 0D CD 33 00 0A CD 33 .00 0B 0A CD 33 00 0B 280 PRINT@845, • Cassette file has been READ to memory• 7E81 : 0A 32 AF 40 FE 02 20 32 3E 25 CD 33 00 3E 3D CD 290 FORT=1T01000: NEXTT : GOT0100 7E91: 33 00 03 03 03 0A 32 21 41 03 0A 32 22 41 2A 21 300 CLS:PRINT@398, . MEMORY TO CASSETTE FILE ROUT INE• 7EA1 : 41 CB 7C 28 0C 11 00 00 EB AF ED 52 3E 2D CD 33 310 POKEMD, 135:POKEMD+2, 126:POKEMD+3, 205 : POKEMD+4 , 10B:POKEMD+5, 2 7EB1 : 00 C5 CD AF 0F C1 03 18 99 76 FE 04 20 20 3E 3D 320 PRINT@590, "Press ENTER when casset te is ready• : GOSUB460 7EC 1: CD 33 00 03 03 03 16 04 21 21 41 0A 77 23 03 15 330 X=USR0 (P) 7ED1 : 20 F9 3E 00 C5 CD BE 0F CD A7 28 C1 18 D9 FE 08 340 PR I NT@847, •Cassette file has been WR I TTEN• : GOT0290 7EE1: 20 14 3E 23 CD 33 00 3E 3D CD 33 00 03 03 03 16 350 CLS: PRI NT@39B, •MEMORY TO DISK FILE ROUT INE• 7EF1 : 08 21 1D 41 18 D5 FE 03 20 BF 3E 24 CD 33 00 3E 360 PR I NT@585, "E nter Fi lespec ( with Extension l == > , c§ r 7FiH : 3D CD 33 00 3E 22 CD 33 00 03 03 03 0A F5 03 0A 370 LINEINPUTFS$:OPEN•o•,t, FS$: SM=BU: SO=BU+ l c $: 7F 11: 6F 03 0A 67 F1 FE 00 28 0A C5 47 7E CD 33 00 23 380 PR I NT@722 ,"0PENING FILE •;H$; FS$ m .j>. 7F21 : 10 F9 C1 03 3E 22 CD 33 00 18 B1 0F 399 Sl=PEEK (SM) : S2=PEEK (S0l :PRINT H1,CHR$(S2 l ; z 400 IF IS2< >26 l THENGOT0420ELSEIF IS1=13l THENCLOSE 0 410 PRINT@855, •END OF FILE•: GOT029B .j>. z 420 SM=SM+l :SO=S0+ 1:GOT0390 0 430 CLS : PRI NT@400, • CLEAR BUFFER ROUT INEa < m **** MODEL 3 SOURCE UT ILITY **** 440 Y=USR1 (Q) $: OJ 45� PRI NT@721 ,•BUFFER IS NOW CLEAN• : GOT0290 m ::0 TRS-80 460 EQ$= INKEY$: IFEQ$=• • THEN460ELSEEQ=VAL tEQ$) : RETURN 0 470 FORDT=�H4�4ETO�H407E :READD: POKEDT ,D: NEXTDT : RETURN m 0 m 480 DATA2�5, 6 6,48,33, 1, 128,243 ,205,0,2,0,0, 0,0, 35, 254 $: 490 DATA 26 ,32,24 7,43,43, 126,254, 13, 40,4,35, 35,24, 236 OJ 10 REM SOURCE/BAS m EDTASM SOURCE-TAPE UTILITY FOR MODEL III NEWDOS80 V2 .0 500 DATA205 ,248, 1,201 ,33, 1,128, 17,2, 128, 1,0, 112 ::0 iD (copyr i9ht 1982 T. Domi9an ) 510 DATA62,0, 119,237 ,176 ,201 .0OJ VOLUME No. (NOVEMBER/DECEMBER 1983) PAGE 4 4 MICRO-SO 47 II IE

Next month's issue will contain at least the following programs plus the usual features and articles. An (80) after a program title indicates that the program will be for TRS-80 Model 113 or System 80Nideo Genie. A (CC) indicates that the program will be for the TRS-80 Colour Computer and (HP) that the program is for the Hitachi Peach. CRICKET (CC) Join in the Summer fun and play your own Wo rld Series Cricket on your COCO. Complete with batsmen, bowler and fielders. A game for two players. ALIEN CHASE (HP) Another ''get them before they get you '' game for Peach users. Yo u pursue the Aliens around the screen and are in turn pursued by them. AUTOMATIC DIRECTORY (80) - 32K DISK Some of the newer DOS's have a facility to speed up file manipulation from the Directory. AUTOMATIC DIRECTORY gives you this facility from earlier DOS 's. You may KILL, LOAD or LIST a file simply by placing the cursor against that file name on the DIRectory display and pressing the appropriate key. In addition, you may assign keys to particular files so you may load such a file with a single keystroke. DISK DIRECTORY RECORDER (MODEL 3) About the time you start on your second box of diskettes, you run into the problem of keeping track of all those files. It seems a shame to use pen and paper to do this when you have a perfectly good computer there. Disk Directory recorder stores a sorted catalogue of all files showing the name of each file, its extensions and the name of the disk on which it may be found. It is thus a simple matter to update your catalogue as you add and delete new files. FILM COSTING (80) L2/16K Whilst we do not expect too many of our readers are involved in processing large quantities of photographic film, this program which calculates processing costs does illustrate some interesting programming points and could probably be adopted to a variety of similar uses.

The cassette edition of M/CR0-80 contains all the applicable software listed each month, on cassette. Formachine language programs copies of both the source and object file are provided. All programs are recorded twice. Level 1 programs can only be loaded into a Level 2 machine if the 'Leve/ 1 in Level 2' program from the M/CR0-80 Software Library - Vo l. 1 is loaded first. Note: System 80Nideo Genie computers have had different tape-counters fitted at different times. The approximate start positions shown are correct for the very early System 80 without the volume control or level meter. They are probably incorrect for later machines. The rates for a cassette subscription are printed on the inside front cover of each issue of the magazine. The disk edition contains all applicable programs which can be executed from disk. Level 1 disk programs are saved in NEWDOS format. Users require the Level 1/CMD utility supplied with NEWDOS + or NEWDOS 80 version 1.0 to run them. Approx. Start Position Side 1 Ty pe I.D. Disk Filespec CTR-41 CTR-80 System 80 GRAFX /NIT PROG 32K DISK I /NIT/BAS 18 10 6 GRAFX /NIT PROG 32K DISK I /NIT BAS 47 26 11

E 0 e 01 0.(I') 0 E o._ � Q) (I') Q) r -s 0 [ u c:Q) Q) > u Q) 0 c If (I') co ""lJ0 Q) u o._ F u E +-"(I') 0 +-'Q) s... 0 c > 0 ...... (I') co 4- Cl. .. (I') c IC .. c E E 0 ...::.:: li:) 1- -� 0. c s... C/) +-' O"l u 0 ..J ;s £ s... �(I') c 0... :::.:::: c Q) 0:::l u u > -o LU c Q) J: � co +-" Vl co co 0 u ::J u -E . rr ,...... Q) c +-"(I') uo .. Q) . c c:co .. "0co Q) Cl Q)f BQ) 0 E Q) O:: >- - Q) , ..s:::: u 0.. ·'= > 0. (1') -t-1 ...... Q) 0 :::E ::J o._ s... (I') 0 Q) c: ::J-o E -o .,..... (I') 0 .,..... Q) > ·'= 0 Vl c: � � (I') c: 0 E +-' 0 Q) O•r­ co :g �..c E 01 I U-t-1 <( c li:) z +-'"0c e co Q) C.) Q) co .c Vl•r­ ::J..._ (I') � u n:;j ,..­ (I') Q) Q) Q)..Q c 0 ..c ..- ::::J w-o 0 I- Cl.. 0... LL PA GE 48 MICRO-SO VOLUME 4 No. 4 (NOVEMBER/DECEMBER 1983)

GRAFX 32K DISK G GRAFX/BAS 74 41 19 GRAFX 32K DISK G GRAFX/BAS 138 77 41 AUSTRALIA'S CUP L2/16K A AUSCUPIBAS 180 101 56 AUSTRALIA'S CUP L2/1 6K A AUSCUPIBAS 269 151 87 LVA R UTILITY SYSTEM LVA R LVAR/CMD 348 196 122 LVAR UTILITY SYSTEM LVA R LVAR/CMD 353 199 122 LVA R UTILITY EDTASM LVA R LVAR/EDT 359 202 128 LVA R UTILITY EDTASM LVA R LVAR/EDT 38 1 215 136 SOURCE UTILITY MODEL 3 s SOURCE/BAS 403 227 148 SOURCE UTILITY MODEL 3 s SOURCE/BAS 422 238 160

Side 2 HI RES WRITER 1.1 COCO EDTASM HIRES 18 10 HI RES WRITER 1.1 COCO BINARY HIRES 25 1 141 HI RES WRITER 1.1 COCO BINARY HIRES 307 173 TRACK RACER HITACHI PEACH TRACK 352 198 TRACK RACER HITACHI PEACH TRACK 364 205 DECEMBER

YA HTZEE MOD 3/BASIC y YA HTZEE/BAS 18 10 6 YA HTZEE MOD3/BASIC y YA HTZEEIBAS 101 58 39 BOLD PRINTING L2/16K B BOLD/BAS 178 101 68 BOLD PRINTING L2/16K B BOLD/BAS 188 107 72 SPACE UTILITY SPACE SPACE SPACEICMD 200 112 75 OBJECT CODE SPACE SPACE SPACE/CMD 210 115 77 SPACE UTILITY SPACES SPACES SPACE/EDT 220 120 81 SOURCE CODE SPACES SPACES SPACE/EDT 260 144 97 SPACE UTILITY L2/16K SP16K 300 166 112 OB,JECT CODE L2/16K SP16K 308 170 114 HOUSEHOLD ACCOUNTS MODULE 1 MOD4/DISK 1 MODULE1/BAS 316 176 MODULE 2 MOD4/DISK 2 MODULE2/BAS 336 187 MODULE 3 MOD4/DISK 3 MODULE3/BAS 352 196 MODULE 4 MOD4/DISK 4 MODULE4/BAS 370 206 MODULE 5 MOD4/DISK 5 MODULE5/BAS 398 222 MODULE 6 MOD4/DISK 6 MODULE6/BAS 413 23 1 MODULE 7 MOD4/DISK 7 MODULE7/BAS 444 249 Side 2 HOUSEHOLD ACCOUNTS MOD4/DISK 8 MODULE8/BAS 18 10 MODULE 8 SIRIUS ADVENTURE PEACH SIRIUS 51 30 HOUSEHOLD ACCOUNTS PEACH ACCTS 159 92 KILLER SATELLITE C.C. KILLER 280 162 KILLER SATELLITE C.C. KILLER 293 170 SIRIUS ADVENTURE C.C. SIRIUS 308 180 SIRIUS ADVENTURE C.C. SIRIUS 342 200

)> z C/) � tE' ::::r..., 0 )> :::::1 CD 0 s C)) JJ m 2 0 s m .... (") C/) CD ::::r (") C/) CD JJ CD .0 0 :::J c (') CD d Co 0 0 );; CDV> r- ""0 ..., ['..) a. JJ :::::1" ['..) ['..) rr, CD � :!!: 0 0 3 3 3 (1) < 0 C) ,... 0 C") C) 0 ..... � r- m .....CD ?" ?" ::l. (1) ::0 C/) c "" (Jl (Jl ::J:J t:.nO OJ a (") ..... c c :::::1" C)) (") (Jl c: 0� :::::1 Cr) JJ C/)..., v;· 0"' 0"' c Cr) rr, - (Jl 0"' co 7\ c � � en ::t _,. (') t:::J ""0 v;· CD --1 0..... 0..... :t:-t' C)) .....CD 0 3. s v 0 a. - 0.. � s s � 3 )> 9 g z 0"' s C o::J )> 6' :ON.. :::::1 t:::J Co CXl s �· _...... CD ,., Co p p !:.w z < ::J:J 0 "0 "0 () :3 c t'l ;t>G') m 3 0 rJI c c ::0 t'l ro 0 :::::- (J'10 X 0"' "" V> 0.. ro Co 0 oo ? ::::r...... ::::r w � � a· CD CD 0 � e m a: a. (') ,:r:a.� ro t::l- 0 :::J C)) - v;· V> £t 0 a. (') V>CD 0 0 CD 0 .o a...... Q) � ..... CD..... � (') ;::;: CD 0 ""0 < 6' a. JJ � :::J ;:;: (") g 6' m :::::1 � (i' £. SAVt: A PACirnT ON PIICK0·80's DISK DKIVt: PACKAGt:S fOR TKS·80 MODt:L 1 AND SYST:EM 80 MICROCOMPUTt:RS

SINGLt: DRIVt: PACKAGt:from ... $499 DUAL DRIVt: PACKAGt:from .•. $874

Bigger volume means lower cost price, which we are passing on to you. Avoid the annoying bundle of cables, wires and separate boxes. MICR0-80 is now offeringour well-proven PIPI disk drives in attractive, self-contained single or dual-drive cabinets complete with internal power supply. Our drive 0 and dual-drive packages also in· elude the appropriate version of DOSPLUS and dual-drive cable. The best news of all is the specially reduced package prices ... SAVE $23 - $107 over our already low prices! Choose the appropriate system from the table below:

No. of No. of Dosplus * DRIVt: TYPt: Capacity Price Tracks Heads Version

DRIVt: 0 3.4 $137.95 1 x MPI B5 1 40 1 lOOK $499

1 x MPI B52 40 2 200K 3.4 $639 $97.95

1 x MPI B92 80 2 400K 3.4 $799 $107.95 DRIVt: I $33.00 1 x MPI B51 40 1 lOOK $415

1 x MPI B52 40 2 200K $525 $23.00

1 x MPI B92 80 2 400K $695 $23.00 *Represents the saving compared with buying all the items included in the package separately

• Drive 0 package includes one bare disk drive, self-contained single- • Drive 1 package includes one bare disk drive and self-contained drive cabinet/power supply as illustrated, two drive cable and the ver- single-drive cabinet/power supply as illustrated. sion of DOSPLUS indicated.

If it's a dual-drive systemyou need, then take advantage of our dual-drive package and

SAVt: a further $40 on the price of two single· drive packages .••

No. of No. of Dosplus DRIVt: TYPt: Capacity Price Tracks Heads Version

2 x MPI B5 1 40 ea 1 ea 2 x lOOK 3.4 $874

2 x MPI B52 40 ea 2 ea 2 X 200K 3.4 $1125

2 x MPI B92 80 ea 2 ea 2 X 400K 3.4 $1454

Dual·drive package includes two bare disk drives, self-contained dual­ NOTE: All 40 track drives are completely compatible with 35 track drive cabinet/power supply as illustrated, two drive cables and the operating systems such as TRSDOS. DOSPLUS allows you to realise an version of Dosplus indicated. additional l4% capacity compared with TRSDOS. Under DOSPLUS 3.4, 80 track drives can read 35/40 track diskettes. All disk drive components are still available separately:

BARt: DRIVt:S - MPI drives offer the fastest track-to-track access time (5 milliseconds) available. All drives are capable of operating in double density for 80% greater storage capacity.

Price freight MPI B51 40 track, single-head, lOOK $349 $5.00 Self�contained, single drive cabinet/power supply $99 $5.00 MPI B52 40 track, dual-head, 200K $449 $5.00 Self-contained, dual·drive cabinet/power supply $135 $5.00 MPI B92 80 track, dual-head, 400K $619 $5.00 Two drive cable $39 $2.00 Separate, dual·drive power supply $85 four drive cable $49 $2.00

Prices are fOB Adelaide. Add $5.00 freight for single drive package, $10.00 for dual-drive package. Prices are in Australian dollars. freight is road freight anywhere in Australia. All items carry a 90-day parts and labour warranty. Repairs to be carried out in our Adelaide workshops. LEVEL 2 ROM ASSEMBLY LANGUAGE TOOLKIT

• by Edwin Paay FOR TRS-80 MODEL 1, MODEL 3 AND SYSTEM SONIDEO GENIE

This is a new package consisting of two invaluable components:

• A ROM REFERENCE Manual which catalogues, describes and cross-references the useful and usable ROM routines which you can incorporate into your own machine language or BASIC programs.

•DBUG, a machine language disassembling debugging program to speed up the development of your own machine language programs. DBUG is distributed on a cassette and may used from disk or cassette.

Part 1 of the ROM REFERENCE manual gives detailed explanations of the processes used for arithmetical calculations, logical operations, rtata movements etc. It also describes the various for­ mats used for BASIC, System and Editor/Assembly tapes. There is a special section devoted to those additional routines in the TRS-80 Model 3 ROM. This is the first time this information has been made available, anywhere. Differences between the System 80/Video Genie are also described. Part 1 is organised into subject specific tables so that you can quickly locate all the routines to carry out a given function and then choose the one which meets your requirements.

Part 2 gives detailed information about each of the routines in the order in which they appear in the ROM. It describes their functions, explains how to use them in your own machine language programs and notes the effect of each on the various ZBO registers.

Part 2 also details the contents of system RAM and shows you how to intercept BASIC routines. With this knowledge, you can add your own commands to BASIC, for instance, or position BASIC programs in high memory - the only restriction is your own imagination!

The Appendices contain sample programmes which show you how you can use the ROM routines to speed up your machine language programs and reduce the amount of code you need to write.

DBUG: Eddy Paay was not satisfied with any of the commercially available debugging programs, so he developed his own. DBUG: allows you to single-step through yo"ur program; has a disassembler which disassembles the next instruction before executing it or allows you to bypass execution and pass on through the program, disassembling as you go; displays/edits memory in Hex or ASCII; allows Register editing; has the ability to read and write System tapes and all this on the bottom 3 ljnes of your screen, thus freeing the rest of the screen for program displays. Four ver­ sions of DBUG are included in the package to cope with different memory sizes. The best news of all Is the price. The complete Level 2 ROM ASSEMBLY LANGUAGE TOOLKIT Is only: - Aus. $29.95 + S2.00 p&p - UK £18.00 + £I .00 p&p SPE<..IAL OFFER TO OWNERS OF THE LEVEL II ROM REFERENCE MANUAL ... UPGRADE TO THIS ASSEMBLY LANGUAGE TOOKIT FOR ONLY $19.951 Send back your original Level II ROM Reference Manual plus a cheque, money order or Bankcard authorisation for S 19.95 plus S 2.00 p&p and we will send you the new ASSEMBLY LANGUAGE TOOLKIT