An ECC Publication.Volume I Issu

A micro solution to a jumbo problem

Research Machines review

Battleships, racing cars and monster games r - The 200 mph micro

Imagine installing a microprocessor on a Formula 1 racing car. This was just one of the varied tasks given to Scicon's Micro Systems team. Speed, suspension movement, g -forces and chassis roll were the parameters that had to be measured. Vibration, interference, weight and temperature were just some of the problems to contend with. Our Micro Systems team took it in their stride and came up with an innovative solution. They are also at home with commercial, industrial, scientific and military applications. For further information about Scicon's capability in micros circle No. 101 on the free reader enquiry service. We can't offer you a drive around Brands Hatch but we can offer you fast, effective solutions to your special microcomputer requirements. Or if you like the sound of working for a team involved with advanced technology telephone or write to - John Howes, 01-580 5599. Scicon Micro Systems, Scicon Consultancy International Limited, Sanderson House, 49-57 Berners Street, London W1P 4AQ.

SCAsil0 Circle No. 101 SYSTEMS Practic,a1Admm""ff-ms"-Contents Compptmg MICRO SOLVES JUMBO Managing Editor PROBLEM Dennis Jarrett How a micro is running an airline reservations system for a travel agent handling package Cornputabits Editor tours. Nick Hampshire Page: 18 Production Editor Harold Mayes IR r,SF AR CH MACHINES REVIEW We test the Research Machines 380Z micro, a Advertisement Manager system which is said to be ideal for use in Erica Gibson educational environments. Page: 27 Advertisement Representative Tom Moloney CHOOSING YOUR FIRb Subscription Manager COMPUTr Annabel Hunt The plain man's guide to buying a computer and how to get started, whether you want a kit or a Publisher complete system.Plus our Buyers'Guide, Wim Hoeksma listing prices, equipment and applications in an Company Secretary easy -to -read chart. Carole Fancourt Page: 38 Managing Director WIN £3,000 WORTFrihr Richard Hease CO! TPUTER Editorial, Advertising and A special competition for Christmas with £3,000 subscriptions: 01-278 9517. worth of computers which must be won. We are offering a Digital LSI-11, a Research Machines Practical Computing is published 380Z and a Nascom 1. by ECC as a subsidiary of Page: 59 WHICH COMPUTER? Ltd at its registered office, 2 Duncan GAM "1, GAMES, GAMES Terrace, London, NI, and printed Play Battleships, Racing Cars or Monster by Bournehall Press Ltd, games. We detail Basic program listings showing Welwyn Garden City. Distributed how to get the games running. by Moore Harness Ltd, 31 Corsica Page: 44 Street, London, N5. © Practical Computing 1978 ISSN 0141-5433. ITT INTERVIEW We interview ITT, a multi -national company Subscription rates: Single entering the home computing market. The com- copy: 50p. Subscriptions: U.K., £6 pany says it starts manufacturing the Apple II per annum (including postage); in the U.K. from January and is looking for overseas, £12 (including airmail dealers. Page: 34 postage). Every effort has been made to AND MU Cii MORE ensure accuracy of articles and Computabits, page 63;Software, page 36; program listing. Practical Teach -yourself -programming with Illustrating Computing cannot, however, Basic, page 51; Feedback, page 15; Letters, accept any responsibility page 17; Printout, page 21; Education, page 30; whatsoever for any errors. Sumlock Bondain shop, page 33; Glossary, page 74.

PRACTICAL COMPUTING December 1978 3 ATE

Eli! 31:11111:1111Pi5 Come and see for yourself at the

EVILSKIP hi

Stockists of the largest range of micro computers in the U.K.

Take the opportunity to experiment with and get to know any of the vast range of micro computers always in stock at The Byte Shop. Whether you want a micro computer for your home, your business, for industry, for education - or if you'd just like to find out which model you get on with best - you'll find a visit to The Byte Shop a new and invaluable experience. Call in at The Byte Shop any time from Monday to Saturday. It's right by Gants Hill tube station. The Byte Shop 426/428 Cranbrook Rd., Gants Hill, Ilford, Essex. Telex 897311 Telephone 01-554 2177

Circle No. 102 PRACTICAL COMPUTINGDecember 1978 Our Feedback columns offer readers the opportunity of bringing their computing experience and problems to the attention of others, as well as to seek our advice or to make suggestions, which we are always happy to receive. Make sure you use Feedback - it is your chance to keep in touch.

Required reading import licence. Is it really cheaper to buyvarious machines on the market in this AS AN absolute novice, I would like to ask from U.K. importers, or to do the jobrespect and users' experience with them. advice. The first thing I need to discover is yourself? If you have any advice to offer I would exactly what all the terms you use mean. I I wonder if you could find out thebe grateful. In particular, if you know of am sure your glossary will help but I details of the import regulations, and print any company which has some link with a would prefer not to have the informationa statement letting us know the position. Icompany in Spain, I would be most inter- spread over a period of months. Can youfor one, would be very grateful. ested. suggest some publication(s) which would L. M. Newell Peter Shafe explain what you are writing about? University of Essex Alicante Is there also some way of obtaining Colchester Spain information about the 'best' set-up for a Obviously a good idea; we shall look The Pet has a good reputation for particular requirement-I suppose this into it. reliability.Mostmicrocomputersare will come with knowledge-but where do fairly modular indesign, which means I start? I want a computer mainly for mySynopsis that replacement by post is feasible, so own personal use,for the playing ofmAv I say welcome to a very informative maintainability probably will not be too games-yes, an expensive toy-and themagazine for computer 'freaks'? Perhapsmuch of a problem if you stay with the 'umpiring' of more complicated multi - in the next issue, or otherwise, could you famous -name makes. Would any manu- player games. I would also like to use itplease inform me how to put together afacturers care to comment? for small business purposes. Could I use it small processing system? I should like, if also to store an index of 600-700 books possible, to construct my own rather thanWar -gaming and authors? lay out what seems to me an extremelyI WORK in electronics and my hobby is Your review of the Pet made it appear high price for a manufactured Americanwar -gaming. A recentarticle(July/ attractive butI don't know as yet to system. August) in Strategy and Tactics, War - what many of the specifications refer and I What we buffs need is a schematic dia- games and the (micro) computer, made have nothing with which to compare. gram of the basic unit to which we couldme eager to try something similar. I need Ian Waugh add, as finances permit. Failing this, a to know what systems are available, and Wardley good British kit, if there is one on the mar- the prices, as well as which ones can be ket, as described by the technical director used/programmed to play war games. Ourfavourites amongintroductory of Bywood Electronics. I would like also to find out how to pro- books are: An Introduction to Personal and But who are Bywood Electronics?gram for war -gaming and contact anyone BusinessComputing, by Rodney ZaksWhere do they operate? Is the systemwho has already done something of this (Sybex); Your Home Computer, by James worth buying? Can a compatible system kind. White (Dynex); Computers and Common-be made from a kit? Who supplies both R. Meattie sense, by Roger Hunt and John Shelley calculatorandmicroprocessorchips? MESF/EEC, RAF, (Prentice Hall Inc.). How about keyboards? Will the com- Bury St Edmunds, The first two are American but arepleted unit interface with a video input on Suffolk available widely in specialist bookshops.a UHF TV? Willitinterface with a Any offers? The third is British. portable cassette tape recorder? What There is no easy way for us to tell you about power supplies? Which system? exactly what you need. We like Pet, to be I could go on but let us have your views I WAS delighted to read your Feedback sure, but it is by no means the only good, and ideas on the above, by letter or bycolumn in Practical Computing as itis cheappersonalcomputer.The Tandyreply in the magazine. In the meantimeexactly whatI,and no doubt, many TRS-80 reviewedinNovemberisan may I wish you every success with yourothers in my situation are seeking. obvious alternative, and it costs less. publication and may your circulation ever I wish to build my own micro system to Understanding Basic will give you a increase. understand the various aspects of how good introduction to the subject. J. C. Ayresthey work, their limitations and the like. Lowestoft Having built a simple system, I would like How to buy Suffolk to be able to expand it as my understand- THE LETTER by John Miller -Kirkpatrick in You have just writtena synopsis ofing and experience allows, to finish with a Practical Computing in October raised what we plan to cover in the forthcoming useful system which could be used as a some interesting points concerning theissues. We will deal with the issues youdevelopment tool for smaller dedicated finances of U.K. importers of American raise as quickly as possible. systems. equipment. For some time I have been Although my experience of micros so contemplatingbuying some computer Pet for Spain? far is limited to an introductory course of parts from the States, simply because the I AM hoping to buy a computer in Englandevening classes at the local polytechnic, I price is so low. next year and to bring it to Spain with mehave a background of sequential logic and I have tried, without success, to dis- in the autumn. My present indications are am involved with a large sequential logic cover the procedure for importing suchthat I shall go for a Pet. system for a newly -commissioned process equipment as a private individual. Several I am most concerned about the relia- plant. banks were unable to tell me if import bility and servicing of the computer I buy, Being virtually a complete novice to duty would be payable, although oneas there are no service facilities near memicros and clearly falling into the home 'thought' that U.K. VAT would be due. and so I am trying to find out as much as Icomputeristorhobbyistcategoryof Yet another said that I would need ancan about the comparative merits of the (continued on page 17)

PRACTICAL COMPUTING December 1978 15 58-60 Northfield Road P6 ala lir Kings Norton ELECTRONIC SERVICING LTD. Birmingham B30 1JH WANTED ft*111WWWW141kPhone: 021-459 5959 Good Homes for Intelligent Pets THE PET 2001 Computer DATA DESIGN TECHNIQUES LTD £64352 plus VAT

We have the answer to your small system peripheral requirements

PRINTERS TERMINALS This unbelievably versatile, compact, - portable and self-contained unit has

DECwriter I I LA36 KSR many varied applications and offers tremendous benefits in the worlds of Teletype 43 KSR RO BUSINESS and COMMERCE: Tally 1612 KSR RO Can be used efficiently for Trend Analysis - Stock Control PayrollInvoicing Tally 1202 Parallel Inventory Control, etc. SCIENCE and INDUSTRY: PLUS The 'PET' has a comprehensive set of scientific functions useful to scientists, A wide choice of reconditioned printers engineers and industry. available at rock -bottom prices. EDUCATION: An ideal tool for teaching and it can be used to keep records, exam results, attendance MAINTENANCE SUPPORT figures, etc. A full range of service, including ENTERTAINMENT: Games including Backgammon, Noughts and on site and base workshops. For Crosses, Pontoon, Black Jack and Moon allMicros and peripherals, our Landing Possesses all usual alphanumerics engineers will integrate, build and PLUS 64 graphic characters for debug your systems. plots, artwork, etc., a , 2nd cassette deck and software available AND IN THE NEAR FUTURE 'Floppy Disc' data and CALL YOUR NEAREST OFFICE programme storage system. and We have six years' experience in servicing electronic calculators, mini- DISCUSS computers in S.E. England. 24 -hour service contract available at £6950 per your annum. Credit and leasing terms available. REQUIREMENTS For full details and demonstration contact Peter Watts ... Now! PIEVAZemer DDT MAINTENANCE LTD ELECTRONIC SERVICING LTD 12 Leeming Road 5-6 Lower Church Street (Authorised Commodore Pet Dealer) Specialists in Borehamwood Chepstow Electronic Servicing, Programming, Electronic Design and Prototype Manufacture Herts Gwent WD6 4DU NP6 5HJ 33 PORTUGAL ROAD, WOKING, Phone: 01-207 1717 Phone: 02912 2193 SURREY GU21 5JE. Tel: Woking (04862) 69032/68497 SEE US AT COMPEL

Circle No. 118 Circle No. 119

16 PRACTICAL COMPUTING December 1978 Feedback

(continued from page 15) Hire service can't seem to find much information on (potential) users, my initial requirement is DO you know of any firm which hiresthis subject, I don't know what subject I information on Which type of system to microcomputers like the Pet, Researchhave to take at A level, and I can't find acquire: Machines 380Z or Tandy on a short-term anything about university courses in this I have been advised to start with a kit, to basis? Our school would eventually like to field. appreciate the hardware aspect, and purchase but cannot do so until next year. Please could you help me to get to also for the technical back-up I may Mrs. J. K. Cameronknow more about what I have to do to go require during the initial stages; Northgate High School into this area? The minimum practical amount of test Ipswich, Suffolk I am also thinking of buying a mini- gear/tools which would be required; CCS Microhire (046 26 73301) specia-computer kit which can be expanded into Cost and availability. lises in very short-term rentals. For longer - a comprehensive system. I have in mind at Any recommendations you may care termperiodsyou couldtryHamilton the moment the Kim 1system. Please to make would be gratefully received. Rentals (01-739 3444) or a new company, could you give some advice about this, P. Walton MBS Rentals (093 23 49511). too, and whether it is the right system? It Yarm will have to be on a budget of about £200. Cleveland THE following letters are typical of a I know this is a lot to find out but I Club call mixed bagofqueriesaboutbuying would be very grateful for all the advice systems: you can give me. WHILEreadingthefirsteditionof Practical Computing, I read an articleManx appeal David Griffin mentioning the Amateur Computer Club. London NWIO Could you tell me how I may contact thisVERY SHORTLY I hope that my school will No jargon man club, with a view to joining or corres- be allocated some money to buy a com- ponding with members having interests puter.Itisdifficult for me, from my AS A small business man I am interested in similar to my own? isolated position in the Isle of Man, tocomputers as I feel that this would reduce Ingrid Princedecide what should be ordered. So I wouldmy workload on wages, stock control, Edgbaston appreciate any advice that you can giveaccounting and VAT. Birmingham me. As I have no knowledge whatsoever I Our contact at the Amateur Computer The school isa comprehensive, witham confused with the computer jargon. Club is Mike Lord and he is at 0268pupils aged 11 to 18, in a mainly rural Perhaps you could suggest a booklet 411125. May we also suggest the Mid- area;it has a largely traditional back-explaining in plain English what on earth lands Amateur Computer Club, based atground. is 32K of a 64K memory, or the differ- 27 Loweswater Road, Coventry? Our con- At present, we do a little computing ence between a ROM and a RAM, byte, tactthereis Roy Diamond (Coventrywith the sixth form, using punched cards,I/O port, and the like. 454061). which we sendtoImperialCollege, As indicated the computer would in the In last month's issue, by the way, we London. The language used is Fortran 4. first place be required for business pur- published a list of user groups. I should like to expand computing andposes and, of course, the cost is of import- run a course perhaps to 0 level standard ance.Ithought perhaps a Pet, Kim, Mailing programs or further, and I can see that some or ourNascom 1 or Sym 1 would be in my range, university -bound sixth formers will wantwith the opportunity of expanding into I READ with great interest the letter fromto make considerable use of the compu- print-out at a later stage. G. Myles, London SW6 as I, too, run a ter. I should be pleased to receive your chartered surveyors and estate agents and I should also like to establish links with advice arid guidance. I should like to men- would be pleased if you could send me athe science department and I hope thetion that I have a portable TV and tape selection of names of firms who run mail- restof theschool mightnoticetherecorder, should this help to reduce costs. ing programmes and the machines to benefit of having a computer. J. H. Gibb which they are appropriate. As with Mr The recognised schools' language seems Barford Miles, my budget is about £1,000. to be Basic and microprocessors or micro- Warwickshire C. E. P. Darleycomputers have been recommended to me We have sent some to Mr Darley. by the schools inspector. Small budget Anyone with mailing programs,please I should like some practical advice I SHOULD be grateful if you would please write to us. from people who have some knowledge oftell me of any build -it -yourself computers microcomputers, or better still, have usedwhich could be built over a period of Mersey Z -men them. about 2-3 years from component pads. WITH reference to your user group listings It is suggested that up to £1,000 may be This time limit will have to be so, since I in the November issue, we have formed a available to buy a microcomputer, withdo not have much of a budget for com- sub -group of the STEM minimicro club possibly more money available in the nearputers at the age of 16. I hope you can for users of 380Z/280Z systems in Liver- future. oblige. If so, you've started a computer pool. I hope that you will give me the benefit fanatic on his way. Could you include us in your listings toof your knowledge, as I would very much Andrew White help people with systems in the Mersey- liketoknow whichmicrocomputer Co. Armagh side area to be able to get in touch? would be most suitable for our use. Northern Ireland It would be nice to see some Basic pro- P. Kinnish grams in your magazine, especially in a Ramsey Practical Computing will be examinng subset of Basic which could be used by Isle of Manhow you can choose your first computer in many types of systems which run variousA -level choice forthcoming issues. In this issue we detail types of Basics. what to look for from the point of view of a Alan PopeI AM soon to make my choice for A levelscomplete novice. There is a Buyers' Guide PAAL Enterprise and I hope later totake a universitywhich we shall be printing in each issue, Crosbydegree. The region of computing I amdetailing equipment available, the price Liverpool hoping to head for is hardware design. Iand typical applications.

PRACTICAL COMPUTINGDecember 1978 17 BUNAC, the BritishUniversities North America Club, is a non profit -makingA computerised reservations system for less organisationwhicharrangescharter flights and working holidays to Norththan £5,000 sounds like an impossibility. Yet America for British students. It is run largely by voluntary helpers, most ofit is something the British Universities North whom are involved in running the 52America Club has achieved. BUNAC clubs on university campuses, but has a permanent staff of seven at its headquarters just off Tottenham Court Road, London. Micro system One of the main tasks of the permanent staff is to process the 2,500 flight reserva- tions they receive each year-a trivial number by British Airways standards, oftackles course, but a different matter for a small staff doing everything by hand. Until recently, the process involved 11 operations for each passenger, startingJumbo job with the printing of a metal addressing plate with all relevant details, includingmanager, Jim Buck, says: "Conceptually,of the cost of the SWTPC hardware. that required by the Civil Aviation Autho-we wouldn't have come within light years Theprocessofshoppingaround, rity. In addition, each passenger is con-of computers ourselves. Shortage of fundshowever, provided BUNAC staff with a tacted in writing five times in the course ofand total ignorance of computing madebetter insight into the potential of com- dealing with his booking. the idea virtually unthinkable". puters. From thinking in terms of little Illuminationspreadfirstfroma more than a glorified addressing machine, television feature on Tomorrow's Worldthey appreciated other advantages. Overwhelmed by and an article in a Sunday newspaper, Most important of them was security of paperwork detailing computers for as little as £2,000.information, a factor which Buck stresses Impressed, Buck telephoned the BBC torepeatedly in discussing the system. The The result was that, at peak periods, theask for the names of the manufacturer, levelof paperwork overwhelmed the idea that information, once entered cor- office. The system worked reasonablyand it proved to be SWTPC. Then herectlyintothecomputer,couldbe began searching to see what else wasguaranteed accurate, and that it could be well up to about 1,500 flights a year.available. Above that level, the number of misfilings guaranteed not to be lost, was a revelation. of records increased and began to create Tracking -down micros in October, 1977The first time the computer produced a proved to be tricky, especially for some- something of a chain reaction. passenger list without a single mistake he was seeking.was a milestone. "Nobody ever had There were also occasional disasters,Buck never discovered who were the such as the time the complete filing sys- passenger lists as accurate as that", says othermanufacturers. The BusinessBuck. tem was spilt on the floor. Efficiency Exhibition was full of equip- It was a clear case for computerisationment which was fast, glamorous and very Mental anguish but even so, the BUNAC U.K. generalexpensive, but nothing was within £1,000 factor The BUNAC system; 32K processor, twin FD8 discs, printer and VDU. Financial and staff savings, however, were a secondary consideration. BUNAC was able to hire one fewer tem-

20 porary staff during the three peak months 27 2 and handled more flights than in the previous year. More important, Buck says, is the saving in "mental anguish" and the long hours of overtime for BUNAC permanent staff. The decision to buy the computer was taken in November, 1977 and the machine was delivered in February. Systems design IIMMIIIIIIMM111 WWII and programming was carried out by Tim Beyts of Beyts Logic, to whom BUNAC was introduced by SWTPC. 1111111111111111111111111111111 After evaluating BUNAC requirements, ntlis Beyts specified a 32K system, with a VDU, twin FD8 disc drives and a Cen- tronics 701 printer. The cost, including software, was about £4,750. Meanwhile, Buck rushedtobuy a Basicmanual. He settledonJerald Brown'sInstant Basicand recommends it to others who are baffled by the mathe- matical aspects, which he feels are over- emphasised in most manuals. As a result, he was able soon to provide (continued on next page)

PRACTICAL COMPUTING December 1978

18 Applications

on input so far have been negligible. Apart from the built-in validation routines, Buck attributes that to a new-found pride in accuracy which the computer seems to have generated. He speaks of "a small sense of achievement" as each entry is in- put correctly. He is also relieved to find that the com- puter has not deprived him of his "feel" for the way the businessisworking. Partly because he still deals with much of the data entry himself, he finds he is, for example, still able to decide which would be the best alternative date for a flight which has to be altered, without having to run throughthelistofpassengers' second choices first. Goodwill has improved Tim Beyts,who wrote the software. On the passenger side, he also feels that goodwillhas,ifanything,improved, (continued from previous page) though this is difficult to assess with a a rough specification of his requirements,different set of passengers each year. in terms of input and output, amendment, BUNAC is sufficiently impressed with enquiry and reportingfacilities.Theits computer to be planning a second sys- system was operational by March 15.tem for installation in the States. It will Data, as before, is taken from passen-deal with applications for jobs as camp ger reservations and output in the form ofcounsellors in BUNAC camps. Although booking details in CAA format, passengerthe number of people involved is smaller lists, address labels and analyses of totalthan the passenger booking system, the bookings.Accountingisreasonablyproblem is complicated by the need to simple, since most charges are fixed andmatch counsellors' skills and availability common toallpassengers, and wasto the available jobs. omitted from the original design, though It is also looking for ways of making it will probably be added next year. use of spare computer time, particularly in the winter months. The club booking season lasts effectively from March to Data errors are October; the rest of the year, the computer negligible is effectively lying fallow. Anyone with a The passenger file builds up over thegood use for four months' computer time season to create a bulky database, occupy-could contact BUNAC. ing three discs. So even a short enquiry or amendment run can take 40 minutes butJim Bush, BUNAC U.K. general this is not regarded as a great handicap-manager. the staff proceed with another task. At present, three of the seven staff have learned to use the computer, though an operator manual is being prepared which will enable anyone, including temporary staff, to carry -out data entry. Data errors

PRACTICAL COMPUTING December 1978 I9 Why not Expand with Crofton?

For potential Micro users/builders the advantages are enormous. Our philosophy from the start has been to fully develop the system to its maximum complexity incorporating Mini Floppys, Hard Copy Printer, 65K Memory and numerous in/out Interfaces, and then to reduce the System to its minimum configuration for the beginner or hobbyist. As a Company we have kept a low profile on the Micro front for some twelve months whilst testing and evaluating our System. It has much to offer. We are, we believe, the only British Company who can offer a small Hobby (LMI) Kit Micro package including a tiny basic interpreter and a full ASCII Keyboard for £220.00p., (Built and Tested £255.00p.), that can be fully expanded up to a full "business" package. This system provides semi -intelligent terminal allowing ten different cursor commands. LMIM - The minimum System I LM I) would comprise a mother board, with on board serial and master clocks, provision for power supply components and video character generator, (16 lines of 64 characters), accommodating three plug-in boards, and a standard ASCII encoded "QWERTY" keyboard. Plug -ins as follows: 6800 Processor board including parallel to serial communication port (ACIA), a 512 word (included in ROM (Monitor), 256 word RAM (STACK), sundry logic and buffering which allow all LM IC - LMI Idevices in system to talk to each other in correct order. LMI4 - 'included inMemory board comprising 2K of user RAM and 2K ROM. (The ROM may either be LMI purchased clear or programmed with "2K Tiny Basic Interpreter 0". Includes an on board PROM programmer (for 2156's) and sundry logic and buffering (a temporary + 25v. at 50 m.a. supply is required during programming). LMP - A power supply giving + 5v. at 2 amps. and ± 12v. at 1/2 amp each would be required for the LMI. Available inKit form at £20.00p. or Built and Tested at £25.00p. Extending the basic system is a simple matter using the Crofton modules and the following are readily available. 4KSR 4K Static RAM Board - Kit £65.00p. Built and Tested £74.00p. AD2P - Port Address Decoder complete with two 20 line peripheral line interface devices to enable the user to read/write to outside electronics and to interface our standard parallel Printer (or any other standard parallel Printer). Kit price £45.00p. Built and Tested £55.00p. 2P - Dual PIA Board as above but without address decoding for additional input/output lines. (Requires an Address Decoder to be fitted as above AD2P). Kit £35.00p. Built and Tested £42.00p. ME4 - Mother Bopid. Bus Extender which utilises the spare edge connector on the main Mother board then allows 4 boards to be plugged in to extend the system (staircase fashion). The main Mother board power supply is only sufficient to power the standard system, an additional + 5v. supply will be required. Kit £25.00p. Built and Tested £29.00p. AIK - Kansas CityInterface Board. This isa free standing board with flying lead connections to Mother board. Kit £38.00p. Ready Built and Tested £48.00p. 4KRM 4K ROM Board complete with one empty 2K x 8 E PROM (2516) which you can programme on your existing LMI4 Memory board. Additional empty E PROM (2516) can be supplied at £35.00p. each: (PRICE LIKE ALL MEMORY IS SUBJECT TO RAPID CHANGE!!) The other 2K of ROM is for 2 off 1K x 8 (2708) E PROMS's. Users intending to fit will require one of these boards complete with 1K x 8 ROM (2708) for part of the Disk operating software. Alternatively you may utilise the programme space available within these 2 ROM's (2708) to store your own programme. You will, however, have to programme your own 2516 with the on board programmer and arrange for us to transfer the programme to 2708's. Kit £65.00p. complete with empty 2516. (Note no 2708's are supplied.) Built and Tested £73.00p. 2708PS - Charge to supply 1 2708 programmed from one of your 1K continuous programmes written in your free issue 2516 ROM £11.00p. NOW FOR A FLOPPY DISK x im - The first requirement is to fit a crystal interface adaptor on to the basic Mother board in place of existing free running clock. Kit £18.00p. Built and Tested £23.00p. SMPF - Power supply to run Floppy Disk and sufficient Memory £152.00p. (not offered as a Kit). CS25 Floppy Disk Drive Built and Tested £250.00p. NOTE You must have at least 3 off 4K Memory Boards and your original 2K RAM in the unit (14K of Memory) in order to use a Floppy Disk System. FD11 - Floppy Disk Board able to control1 Floppy Disk Drive £167.00p. in Kit. This includes cables to connect to drive and a 2708 as previously mentioned as well as an exchange Monitor ROM (with one altered jump instruction!). Built and Tested £194.00p. MED8K - In order to run your now very powerful Micro you will require a Mini Floppy Disk with standard programmes which include an 8K extended BASIC and Disk Operating Software - £150.00p. 712 A Hard Copy Printer as covered in our Data Sheet MC1 is available at £1570.00p. which includes connecting cable. 12" Uncased Monitor Built and Tested £60.00p. Video Modulator Built and Tested £18.50p. ALL PRICES ARE EX -WORKS WHICH DO NOT INCLUDE POST/PACKING/ ALL MAJOR INSURANCE ETC. CREDIT CARDS V.A.T. TO BE ADDED AT PREVAILING RATE (CURRENTLY 8%) (Modulator 12)M PLEASE ADD SUFFIX 'K' OR 'B' TO PART NUMBERS TO INDICATE KIT OR ARE ACCEPTED BUILT & TESTED RESPECTIVELY. CROFTON ELECTRONICS LIMITED

35 GROSVENOR ROAD TWICKENHAM MIDDLESEX TW1 4AD Telephone:01-8911923 Circle No. 120

20 PRACTICAL COMPUTING December 1978 Printout Pascal is rivalling Basic PASCAL seems to be rivallingdiffering from the rest of theguage LISP. Fortran is pro-about 4.5 times as long. The Basic as the favourite pro-family of S-100 bus systems bymised next year. memory overheadissigni- gramming languageoftheincorporatinga16 -bitpro- Equinox will also be offeringficantly lower with FORTH, computer aficionado. At anycessor as the Western DigitalFORTH on the 300 in 1979.too. rate, the U.S. hobbyist maga-IDP-16 chip set, functionallyWe have commented before on One thing more-part of the zines are all full of it and sosimilar to the LST-11. thisoperatingsystemandpurchaseis"accesstothe was our last issue. The argu- Equinox offers a 64K sys-embedded programming lan-MicroFORTH telephone Hot- ment is advanced thattem with 600KB floppy discguage for microprocessorline" which provides "immedi- PASCAL is more flexible, moreforabout£5,000-upgradedevelopment systems, but it isate" help in answering queries. powerful across a good rangegoodies include Calcomp hardnow available, and apparentlyYou have to wait until after of applications, and generallydiscs from 10 to 300MB. Thefully -supported, in the U.K. 4 pm, of course, to give the easier to use. price includes all system soft- MicroFORTHis,predict-Californians time to put away Not too many systems avail-ware, which means the lan-ably enough, the micro ver-their wheaties but this sounds able here have the language,guages are bundled. As well assion;thereisalso a Mini -like a really useful standby.al but Equinox is making it avail-the new PASCAL, there is aFORTH. The microimple- able with its 300. This is thecompiler for extended Basicmentation gives all the system top end of the Equinox line,andthemathematicallan-software you need, including a text editor, in less than 6KB. ItBookshop has a floppy disc plus docu-RESIDENTS in the Birmingham mentation and already therearea not already aware of its My Practical are versions for most of theexistence should hasten to the morepopularprototypingComputer Bookshop, where Computing week hardwarepackages. Pricesbooks on all aspects of comput- I BEGIN on Monday rangebetween$2,500anding and microprocessors await my own very first $3,500 perusal. practical home computing week. Is it worth it? Well, Forth They range from books for Inc quotes impressive savingsthe raw newcomer, to games, Washing away my bleary-eyed blues on program development time.to the finer points of micro- with solders and patches and soft kind of glues, Using an Assembler is reckon-processor programming. I fixed me the bodywork in which I could drive ed to take nearly 10 times as The shopisatTemple data down buses like bees to a hive. long; PL/M weighs in with 6.5House,43-48 NewStreet, times; and Basic systems takeBirmingham B2 4LA. rzi Tuesday dawned slowly roundabout noon and by the end of the day I was over the moon, because I'd practically knitted and crotchetted and sewed a cosily -structured basic utility softwear workload. Graffiti competition Wednesday was friends' day, the communications trends day where after surprise presents switching packets play WINNER ofthis month'sA Z80 phreak name of Smiler we settled to sherry drinking chat, both bitty and baudy. Graffiti competition is R. W.Invented the Basic compiler Stranks of Cheltenham, Glos.,When he turned the thing on Multimillipede bugs, with bells on each anlde, swarmed the who will be receiving a calcula-It burst into song next morning tor. The fact that he sent sixAnd its printout was never and joy began passing, the problems were dawning entries had nothing to do withworthwhiler. as with a thunderous crash fell my very own personal hissuccess.Someofhis computing world offerings are: * * * and into dumping, debugging, depression, despair I was There is a young fellow called Programmers delighting in head -longingly hurled. Snow chess Whose micro we can't get to Created one hell of a mess Black coffee -hazy towards Friday I sped, go They set up a grapple turned tail on the bugs and to my allotment I fled The contents of the Stack Twixt a PET and an APPLE for some practical gardening while munching wafers We never get back With a result that was anyone's and chips, Just FF, FA and FO. guess. I tended my loopins and with my nerves came to grips. Second best was from R. J. * * * Fiddik of West Loo, Cornwall: Calmed and relaxed (Chelsea had won) "Itiswell worth putting in I darned and I patched and it all became fun, "Abandon hope all ye that enteryour memory that all Apples do playing Star Wars and micro -based railways, here" Rem. statement above thenot have cores". I'd found my Nirvana for all my unemployed days. `you're lost' routine, from Third, from M. Collinsof 0 TH ELLO Letchworth, Herts : Next morning in bed I read the Sunday viewpapers "All loads come from ROM". like the Prestel Express and the News of the Telecapers * * * then turned to my automatic, all -purpose-built woman A gallant programmer from Entriesfornextmonth's knowing now why I'm a practical computing leisure Tooting Great Graffiti should be re- society fan. Took a fancy to Practical ceived by December 31, 1978. Computing Malcolm Peltu Address them to Great Graffiti His program for VAT Editor, Computer Weekly. Competition, Practical Com- Was far better than that puting,2DuncanTerrace, Anyone else had been mooting. London, Ni.

PRACTICALCOMPUTING December 1978 21 EvaluationByte stake for Musical aids Charterhouse effects ARE YOU disappointed with the THE growing range of RCA THE £100,000Charterhousedelivers them with workingmute responses of your VDU, evaluationsaidsforunder-investment in The Byte Shopapplications software. or irritated by the chattering of standing microcomputer sys-probablywillnotsignala The Byte Shop has ambi-your output printer? We know tems has been expanded by thegeneral rush on the part oftions, though, with "nationalhow you feel. So it's nice to addition of a new assembler/City institutions to put moneycoverage" promised by the endknowGeneralInstruments editor design system. Based oninto the glorious and profitableof 1980 and five more shopsMicroelectrics has taken to the RCA CDP1800 family offuture of microcomputers, butdue to open soon as a start. heart your plight and produced microprocessors, the kit en-at least it demonstrates that The Charterhouse investmenttwo devices to enable you to ablestheusertodevelopsomeone under the shadow ofis in the form of a 25 percentobtain more interesting assembler -language programsSt Paul's is taking an interest instake by one of the group'ssounds from your micro sys- for his micro system. the computer business. venturecapitalsubsidiaries.tem. Charterhouse is no strangerAlsotaking25percentis They are two new peripheral The resident editor programto the idea, of course; it hasUnited Electronic Holdings, amicrocircuitswhich,under allows standard text editing,money in CAP. CAP, though,newelectronicdistributionmicroprocessor control, can be includingtheadditionoris a fairly conservative homecompany in which Charter -made to emit a wide range of deletion of characters, wordsfor your cash by computinghouse has a substantial hold-complex sounds. or complete lines. The residentstandards, and The Byte Shoping. The package involves a assembler translates mnemo-is a very different kettle oftotal of £100,000. Program Sound Generators nic commands into machinechips. That leaves Bill Cannings,have applications in entertain- code and generates any neces- The Byte Shop Ltd is onefounder of CAS and The Bytement, education and security. sary error messages. shop in Gants Hill selling homeShop, with half the company,They can produce sounds like a and hobby micros. It has nobut since he risked his existingmusicalinstrument,sound A 4K read-write memory isconnection with the U.S. Byteoperation toget the microeffects for electronic games, or supplied with the kit, enoughShop chain, incidentally, norbusiness under way, and sincewarning sounds forsecurity to hold the editor program andwith Byte magazine. It begana bank manager proved to besystems. a working buffer of 1K bytes,as a spin-off from Computerdistinctlyfrostywhenap- Anyoneinterestedshould or to hold the assembler withAided Systems, a South Lon-proached, Cannings is boundtelephone 01-439 7052 so that enough storage for the assem-don turnkey system supplierto be pleased about the outsidethey can hear an automatic bler and 100 labels. which still packages minis andcommitment. demonstration.

MICRO COMPUTING FOR BUSINESS THE TOTAL SOLUTION FROM Seminars on microcomputers, ALMARC suitable even for those with no OF COURSE! prior knowledge. Now Almarc & Vector Graphic offer the complete solution to your computing needs for £2300.00* . . The Vector MZ needs only the addition of a V.D.U. and it's ready to go. I. Learn how to use a micro on our three-day Completely assembled and fully tested the Vector MZ Offers the following features as standard:- practical course for small groups in London, * S -I00 bus £108; includes an introduction to Basic. * 4 MHz Z80A processor * 158 instructions * two quad density Micropolis floppies-over 630k bytes 2. A similar course to (I) above but in a larger on line group setting over five evenings, £27. * serial port * two parallel ports * 32K static ram 3. Learn what a micro can do for you and how * I2K prom/ram board with extended monitor to choose one; suitable for management as * Extended disc Basic well as users, £43.20. Simply connect your peripherals (Elbit V.D.Us & Centronics printers are available from Almarc) and your up and running and, because the MZ uses the S-100 bus, you can plug in a massive range of add on units. Beyts Logic Ltd. Ring or Write for a demonstration to:- Windmill Hill, Sunbury, Almarc Data Systems Ltd., BETTSMiddx. U.K. 29 Chesterfield Drive, Burton Joyce, Telephone (09327) 86262 Nottingham. Tel: 0602 248565. LOGICTelex 928185 * Discount terms available. Circle No. 121 Circle No. 122 December 1978 22 PRACTICAL COMPUTING Hard -copy for your Pet Cornish IF YOU criticise the Commodorequality units with an excellentwith matrix printers. Commo-link -up Pet, you will probably be com-pedigree. They are IBM 3982s,dore's 80cps matrix printer is plaining about the lack of awhich are like a golf -ball type-due to reach the U.S. marketA GROUP of Cornish computer hard -copy output device. Nowwriter without the keyboard. now,thoughintheU.K.enthusiasts has set up a com- you will not have that excuse- GR has had second-handdeliveriesprobablywillnotpany in Penzance to sell com- GR Electronicsis supplyingunits renovated by a specialistbegin in earnest until the Newputer equipment and services. Petsystemscompletewithwho will also look after main-Year. printers and they are high -tenance oftheprinters. American dealers have the Factor One's first product is According to GR's Doug Wat-printer at around $700. Ana micro -based system for a kins,they should costlessalternative alreadyavailablefirm of local accountants. It is Managing than £500 each. Which meanshere is the Teletype 43, withbased on the S-100 bus and a that you'll be able to obtain a30cps and many fans, and now280A drive and can handle with Pet system with a letter -qualitya Pet interface by courtesy ofaccounts, payroll and adminis- printer for less than £1,100,Peripheral Hardware Ltd. tration. micros and that's a system which will If you're tired of waiting for The firm had made contact produce business system withthe Commodore floppy discwith some U.S. suppliers and is A ONE -DAY conference toword processor capabilities. system to add to your Pet,offering the Sorcerer computer explore the potential impact Not wanting to rush any-there's one appearing from afrom Exidy Inc in the U.S., of microprocessors on the pro-body, but there are only sonew company, Midlandreviewed in this issue. cess of management is to bemany used IBM 3982s around.Micronics Ltd, in Solihull. It held on January 10 atSt. It drives one or two minifloppies In addition, Factor One is is about time those re- building a business of supply- Albans, Herts. It is sponsoredfurbishedIBMtypewritersanditiscomplete with a jointly by Practical ComputingstartedreachingtheU.K.PROM which you plug intoing parts and accessories for and Eastern Counties Oper-market. American hobbyiststhe Pet board. micros. It is representing the ational Research Society. Thehave been able for some time The complete bundle,in-Jade Corporation and has an types of questions the con-to attach them to microcom-cluding a twin disc drive costsEnglish version of the Jade ference will be attempting to £1,300; for a single disc drive,catalogue which details com- puters. ponents, complete computers answer are: To befair,the excellentit costs £870. Deliveries should How can OR use micro-print quality and the goodbe starting now, and you'll beand peripheral equipment. processors in solving com-pricing of the GR/IBM printerable to obtain the kit through Copies can be obtained from plex management de-is achieved with a fairly slowthe Pet dealer network, we'reFactor One at17Market cision problems? performance by comparisontold. Place, Penzance, Cornwall.El What new management tasks will micropro- cessors perform and what tasks will they take overWe're with the Woolwich from office workers, sec-Practical Computing is starting a tour of Thefirstwindow featuring Practical retaries, mini computersthe top Woolwich Building Society windows, Computing is at the Woolwich Building and mainframes? detailing everything you want to know about Soeiety in Victoria Street, London SW1, What effects will there bemicros but have been afraid to ask. opposite Westminster Cathedral. on managementcom- munications? How will microprocessorslinkto communication networks? Howwillmanagement interact with the shop- . floor microprocessor? to know about small How far will computer- computers but weroOtalcagetig isationgo?Willevery afraid toask! small business be using fljellMay amicroprocessor and :!rMtake every executive have one Practical at home? Comp iting The conference will include a session on the "office of the future" by Logica Ltd. A dis- play of microprocessor and wordprocessingequipment will be included. Numbers are limited to 120, so apply early. Tickets cost £5 each. Write for tickets and further information to: Ian Roderick, 237 Lonsdale Road, Stevenage, Herts., en- closingpayment. Cheques should be made payable to Eastern Counties Operational Research Society.

PRACTICAL COMPUTINGDecember 1978 23 SORCERER -IT'S MAGIC A HOBBYcomputer just comingsomewhat limited, although the to the market in the U.K. is thegraphics and keyboard facili- Sorcerer. Itis made by theties, as well as the potential to American firm, Exidy Inc, aadd other languages, compen- videogamesmanufacturer.sates for this. (See table, next First shipments are being de-page, for Basic commands and livered to two firms, Compstatements). 11110311111likNIf you are thinking of ComputerComponentsof Upper- and lower-case CO buying computers, New Barnet and Factor Onealphanumerics are included in equipment or services then Computers of Penzance. the 128 pre -defined and fixed WHICHWH COMPUTER? can help you. It is a machine we intend tocharacter set, so the keyboard We are a monthly magazine packed with easy review in more detaillater.is truly typewriter style and can to understand reports on all aspects of computing. Comp Computer Components,be used easily for letter writing We can show you how to save money buying however, loaned us its demon-or text editing. Thirty lines of computers, word processors, small business systems stration system briefly to trytext,amountingto 1,920 and new products. We look at how companies its facilities and it is impressive.characters, are visible at any install equipment, and we detail everything you The main selling point of thetime before automatic scrolling need to know to make the right choice. Sorcerer is price. You can buyto the next page. There are 64 Below is a sample of some of our reports. a 16K version for £760 or adefined graphics characters and 32K versionfor £950 and,64user -definedcharacters; Small Business Systems IBM April 1978 Hourds Computing IBM System 32 Sept 1977 Unicorn May 1978 Services Dec 1977 considering itsfacilities,thisalternatively, all128 graphic NCR 8250 Sept 1977 Digital WS 78 June 1978CDC Data Services Jan 1978 ICL System 10 Sept 1977 Burroughs UCSL Jan 1978 representsgoodvalueforcharacters may be user -defined. IBM System 34 Sept 1977 Redactor II July 1978 APL on bureaux Feb 1978 money. (Seetechnicalspecifications, CIC Executive Oct 1977 Rank Xerox 850 Aug 1978 BOC DatasolveMarch 1978 KPG Solitaire Oct 1977 Cable 8 Wireless Sept 1978 SIA April 1978 The system loaned to us wasnext page). ABS Multibus Oct1977 Cabtext 80 Oct 1978 UCC April 1978 ICL 2903 Oct1977 ABS Type Recorder Nov 1978Rair May 1978 the 32K version.Standard Wang PCS 11 Nov 1977 Minicomputers Gamma May 1978 configuration includes a 61 -Two manuals Olivetti P6060 Nov 1977 Varian V77 Sept 1977 Geest June 1978 IBM 5100 Nov 1977 Data General C/300 Oct 1977 Charrington June 1978 key typewriter -type keyboard There are two manuals with Hewlett Packard Hewlett Packard Mills Associates July 1978 9830 Nov 1977 1000 Nov 1977 Computer Services and 16 -key pad. It looks likethe systems-A Guided Tour of Burroughs B80 Dec 1977 CTL 8000 Dec 1977 Company July 1978 the Tandy keyboard withoutPersonal Nixdorf 8870 Jan 1978 IBM Series I Jan 1978 MPL Aug 1978 Computing and A Nixdorf part 11 Feb 1978 Interdata 7/32 Feb 1978 Wellorax the numeric pad. To that youShort Tour of Basic. Mini -Computer Prime 300 March 1978 Geest June 1978 Systems Inc. Feb 1978 Honeywell Level 6 April 1978Charrington June 1978 add your own power supply. The first, which takes you CMC Reality March 1978 Digico May 1978 Mills Associates July 1978 Geest G10 March 1978 Interdata 8/16E June 1978 Computer Services TV monitor and cassette tapethrough system set-up and in- Jacquard April 1978 Digital PDP 11/03 July 1978 Company July 1978 recorder(s). troduces you toallof the Systime range May 1978 Data General MPL Aug 1978 Philips P410 June 1978 Nova 3 Aug 1978 Wellorax Aug 1978 machinefacilities,iswritten Suppliers Guide July 1978 Digital PDP 11/34 Oct 1978 Globe Sept1978 Striking Business Texas 990 Oct 1978 Tempo in a typically American style, Computers 3200 Aug 1978 DTC Microfile Nov 1978 Timesharing Sept1978 For expansion purposes itwasting no time on explana- Basic Timesharing Bureaux Baric Oct 1978 4000 Sept1978 CMG Sept 1977 CCF Nov 1978 takes the S-100 bus,whichtions but bringing you right IBM System 3 Oct 1978 Gordon 8 Gotch Alphanumeric gives you the ability to inter- CPU Computers Computer CentreSept 1977 Services Nov 1978 into the operation of the com- M -One Nov 1978 Computerline Oct 1977 Plus Special reports and connect large memories, discputer. It's breezy and, in a way, Word Processing Compute' Oct 1977 guides to Production Control Wang WP10A Sept 1977 ADP Network Systems (Oct 78); Word drives, speech and communica-easy to read but not quite as Wordplex I Oct 1977 Services Nov 1977 Processors (Jan 78); Small tions facilities. Wordwright Nov 1977 OLS Computer BuSiness Systems (July 78); easytounderstand asthe Vydec Dec 1977 Services Nov 1977 Magnetic Media Suppliers The striking feature of theTandy TRS 80 manual. Suppliers Guide Jan 1978 Allen Computer (Oct 78); Accounting Monotype 80 Feb 1978 Services Dec 1977 Packages (March 78): Visual Sorcerer, though, is the way The second manual wel- AES March 1978 Display Terminals (April 78). you loadthe Basic.It'sacomes you to Basic and is NMI 111M mMe Me li= f MI MI WHICH COMPUTER? is available on subscription. standard Basic which is loadedexcellent.Itis very easy to UK rate is £18 per annum for 12 issues including by way of a cartridge into theunderstand and within a couple postage. Back copies are available at £2 each. side of the keyboard. It looksof weeks of evening learning, LI Please start me a subscription from your next issue. rather like an 8 -track stereothe novice should be writing cartridge but inside is a read-Basic programs and spending Please send me.the following back copies only memory device whichhours debugging them. storesthelanguage,which As an aside, it is a pity most El I enclose a cheque for £ does not have to be Basic. of the manuals we have read EIPlease invoice. my company £ In addition to standard Basicdo not concentrate more on El Please charge my credit card. is Assembly, APL, Pilot, DOStelling you how to develop a (Fortran and Cobol); even asystem. It is as if to know Basic Name of card No. of card word processing packageis is enough. What is needed is a Name under development. simple systems analysis book Position Unfortunately, only theto accompany these manuals, Company Basic was available with ourinstructing the user how to Address system and it would be unfairdevelop a system and then to to review the system in greatprogramit.Theflowchart detail without being able toina manualisnot good Tel. use the other languages or,enough. Signed Date indeed, any of the packaged Itwillbeinterestingto Now post please to WHICH COMPUTER? software which has yet to findundertake a detailed review of 2 Duncan Terrace London Nl. its way to the U.K. thecapabilitiesof Sorcerer The Basic, in our opinion, is (continued on next page)

24 PRACTICAL COMPUTING December 1978 PtiritOlit

(continued from previous page) (Fortran, Cobol). when all the software and lan- Cassette Tape Media: Standard Phillips cassettes guage facilities of the system Programs: Casino, Personal a day keeps are available. Physician, Personal Data Comp Computer Compon- Management, Management Aids, your Apple in play ents and Factor One Compu-Computer Aided Instruction, ters say that there is a great Advance Engineering. interest being shown inthis machine, so it should not be A 60K Apple II long before we will be able toKeenness test it in greater detail. microcomputer Standard Basic Commands at Poly and Statements IF ANYONEdoubted the quality will cost you less Statements of interest in home and hobby Let Rem Fn Wait computers in North London, Then Stop Data On..GoTo than £l per day GoTo Def Dim If..GoTo the inaugural meeting of the Restore Print GoSub On..GOSub Return NextInput If...gosub North London Hobby Com- Read Get Out puter Club would have set under our lease Step End For them straight. The organisers Commands Run Null say400peopleattended, or leaselpurchase List CSave New CLoad which seemed a little on the Clear Peek high side to us, but it was cer- Cont Poke tainly more than 300, and that facilities Mathematical Functions astonished us. Abs Int Sgn Tan Send for details Atn Inp Sin Usr There was a strike at the Cos Log Sqr And Exp Pos Spc Or Poly of North London, which Fre Rnd Tab Not meant a cold theatre and no String Functions amplificationforthe hardy. Asc Str$ Len Mid$ Pets and SWTP systems were Val Left$ on show but most were dead. Chr$ Rights$ The introductory speeches were Operators inevitably a trifle turgid, though = - // < = > To obtain your Apple II manuals please complete the + the two "respectedindustry details below: Editing figures" invited to share the ..Control C ? ..Control 3 : Return platform did well-they were from Practical Computing and Please send me: Each Qty Total the differentbutequally Specifications Apple II reference manual ES Processor: Z80 excellent magazine ETI. Processor clock: 2.1 MHz Those present seemed keen, Applesoft extended BASIC manual Serial I/O: RS232, 300 or 1,200 filling -intheir questionnaires (includes a summary of commands and baud, 25 -pin "D" type connector. procedures for the disc operating without a murmur and cluster- system, new major commands, and high Parallel I/O: 8 -bit input and resolution graphics commands) output, latched and buffered port ingaroundthehalf -dozen with hand -shaking, 25 -pin "D" `interest groups' the club pro- Teach -Yourself BASIC programming manual L5 connector. poses to run. Memory: Read-only memory Add 50p p&p to each order. (ROM) 4K byte. Power -on Membership will cost them monitor program connection for £10, for which they have some Name 16K ROM PAC program use of the Poly facilities- cartridge. Random access Poly electronics and business Address memory (RAM) for 8K bytes expandable to 32K byte. departments are the moving Expansion: Edge -card connection spirits of the venture. to S-100 bus expansion unit. Cassette I/O: Dual recorders, 300 or 1,200 baud data transfer rate, remote control of motor on/off. Video I/O: 30 lines of 64 For you. . . I enclose cheque/P.O. payable to PADMEDE Ltd for characters or 1,920 characters IN next month's packed issue full screen, 128 full ASCII of Pratical Computing: character set. 64 defined graphic PC4 characters and 64 user -defined How to convert an IBM Signed characters; alternatively all 128 typewriter into an output graphic characters may be user - terminal. Now post to address below defined. 512 (hor.) x 240 (vert.) Installing a word processing graphic resolution. system on a Nascom. Automatic scroll, erase end of Why Panther is putting a Pet PADMEDE COMPUTERSERVICES line and end of screen, delete Agents for the character, erase screen. in its car. Cursor Home, Up, Down, Left, We review Nascom. SOUTH/HOME COUNTIES Right. More software business packages. for the Cabinet: Dimensions 19-25in. x APPLE II I3in. x 4in., weight 13 lb. Low-cost printers. ROM PAC Cartridges: (Standard Af unction generator for the Kim. Basic included) Plus Games, Glossary, Printout, The Tuns, High Street, Odiham, Media: 8 -track cartridge Letters and much, much more. Nr Basingstoke, Hants. enclosure, read-only memory on PC board. At all good newsagents from Tel: Odiham (025-671) 2434 Programs: Standard Basic December 15, 1978. Credit facilities can be arranged. Assembly, Pilot, APL, DOS Subscription details 01-278 9617. Circle No. 123 PRACTICAL COMPUTING December 1978 25 !leen Computer5 13ranche5 Out ! Keen Computers are now agents for South West Technical Products (UK) Ltd and also stock the BUS -2 EVERYTHING YOU NEED FOR YOUR COMPUTER! A comprehensive range of computer stationery and accessories is also readily available: - Floppy disk files £9.98 Suspension binders...from £1.28 Floppy disks £3.00 C15 cassettes £0.85

Haan Computer5is a main dealer for the nipple!! computer. Simply a betterand more advanced machine for many business purposes *It uses a 6502microprocessor - a very updated version of Motorola 6800 * It is a completelybuilt system with colour graphics and comprehensivebasic

Apple II Computer 16K . £1050 Additional memory per 16K ...... £250 Disk with controller £425 Disk without controller £375 Applesoft card £115 printers

Data 100 fast matrix printer £1750 DDT DECwriter II £1050 Centronics 779 £750 Centronics Microprinter £350 0 As well as our.normal consultancy service we also market the following software packages: - Addressing and mailing program £50 Incomplete record accounting £250 Word processor upper and lowercase £50Co resident assembler £20 Personal accounting £10 Sales growth analysis £10 Shape -create aid £25 A variety of statistical packages from £25 A large range of games are available (Prices subject to change without notice) For a full catalogue please contact: Dr. T. KEEN, KEEN COMPUTERS LTD., 58 CASTLE BOULEVARD NOTTINGHAM TEL: 45865/49588

Circle No. 124

249 Research Machines 380Z micro by Martin Collins

MOSTmanufacturers tellus that theirfitted with an alternative output for an data logging or experimental control, or computer can be used for anything. "Youunmodified television set, an alternative it can be linked to other minis for data want a system for the home, small busin-display can be used easily if the monitor capture. ess, education? Look no further. Ours is fails. the one you want". The cassette recorder was unmodified It was most refreshing, therefore, whenexcept for the fact that RML checks theHardware Research Machines approached us and head alignment before supplying it to a Opening the system cabinet revealed said: "Our system is sold for the most partuser. This, it claims, largely overcomes that RML had left plenty of room for to the education and scientific market". any problems of tape incompatibility expansion. The processor (280A), 32K of Knowing a system is aimed at a specific between different recorders. We certainly memory, cassette, keyboard input and market also makes it easier to review, as had no problems in reading any tapes. display interfaces are contained on two we can evaluate it in the light of the re- boards, and there is plenty of room for quirements of the potential users in thatApplications expansion, as the cabinet can hold eight market. more boards. That said, it is a pity Research Mac- When RML began designing the system The bus uses flexible flat cables rather hines' system is not a little more com-it was involved in many discussions withthan the more usual motherboard. This mercialised. A few games packages and some London Education Authority micro- means that the system is "non-standard" some business applications would provide computer working parties then lookingbut RML isprevaricating about an a powerful system, and we would be backat the requirements of a system suited for S-100 interface to enable S-100 cards to be on the roundabout. use in schools and colleges. used with the 380Z. Research Machines Ltd is characterised Some computer educationalists may RML claims that the cable bus is both best by its lack of packages. The company, argue that it is better to purchase 20 Petscheaper and more reliable than an S100 formed in 1973 and operating in Oxford, than one system on to which you wouldmother board. A further possible ap- is a British company. hang a number of terminals. RML doesproach is to offer boards like parallel and not subscribe to that view, which 1 amanalogue interfaces, high -resolution Very tough sure was prevalent around 1974, but which graphics and voice input. The system is is less common today. not available in kit form. The boards, and The system supplied for review was a For the most part, the 380Z is being indeed the whole system, were built to a 32K 380Z with keyboard, monitor and,used by schools to teach the principlesvery high standard. cassette recorder. We were supplied alsoand programming of computers. Itis The only controls on the system cabinet with a set of documentation and a numberideal for teaching Basic, Cesil, machineare power on/off and re -set. Turning -on of program tapes. and assembly languages. It can cope withpower causes the system to enter the I asked RML if I could take home the up to eight simultaneous users. cassette (COS) which system for the weekend if I promised to Other applications include its use in (continued on page29) keep the children from it. "Don't worry about the children", they said, "it's very tough, they will do no harm". It certainly seems, physically, to be the most robust system we have yet reviewed. One disappointmentforthe children as well was that RML supplies no games. If you form the impression we like playing games, you are correct. The system was supplied with a 13A extension box in addition to all the plugs and cables and we had no problems in setting up. As it is in four separate units- system chassis, keyboard, display and cassette recorder-there are many wires but this means that the failure of a single unit does not necessarily render the system inoperative. For example, we output the display to a Hitachi monitor but, as all 380Zs are

PRACTICAL COMPUTING December1978 27 The world's bestselling CCS Microhire MICROCOMPUTER RENTAL SPECIALISTS Before you buy a micro, why not hire it for a day or a weekend? From £2 a day we hire out a range of micros for evaluation/experience or program development.

Apple II * Commodore Pet * Nascom Ior Micros

APPIE II Research Machines 380Z * New powerful basic and new graphics on Rom. £75 card. *Talk to Apple with voice recognition, speaker trained, 32 word vocabulary. £165 card. * Rockwell AIM65 * Colour Graphics. High resolution 280h x 192v, 6 colours, easy -to -use. 16 colours, very powerful. Low resolution 40h x 48v, SWTC 6800 or MSI 6800 *Apple's disks. Powerful DOS.116K bytes capacity, multiple drives, fast access. £395. *Use Apple as a computer terminal 110 or 300 BAUD. Full or half duplex or use with * Tandy TRS 80 a Dec -writer. £95 card. *Use any 8 bit parallel printer with Apple11. Print up to 3,700 lines per minute. 255 character lines, upper and lower case. £100 card. Protect your future investment. Try out a system now. Personal Computer For details write to CCS Microhire, Freepost, Limitec Letchworth, Herts SG6 4YA 194-200 Bishopsgate, London E.C.2. 01-283 3391 Circle No. 125 Circle No. 126 EUA" 1cLtd 224 TOTTENHAM COURT ROAD, LONDON Wl. TEL: 01-636 8161

For electronic calculators and We stock the watches. COMMODORE PET 2001-8 We have the largest range in London at the most competitive prices. Export and Personal Export Tax, free facilities arranged.

HEWLETT PACKARD * CASIO * SHARP * TEXAS INSTRUMENTS * OLIVETTI * APPLE II SEIKO * SINCLAIR * microcomputers with a full COMMODORE * SANYO + range of hardware and 11JUST OPEN1; NATIONAL PANASONIC, ETC. our new software options. MICROCOMPUTER CENTRE AT: 55-56 HIGH HOLBORN 111111111111111111 LONDON WC1 Circle No. 127 28 PRACTICAL COMPUTINGDecember 1978 Review

(continued from page 27) registers and a selected portion of memory and the run-time error messages are not occupies 3K of ROM on the processor on the screen. very explicit. board. The re -set button causes the system To the first-time user this will be very to return to COS. The monitor supplied confusing but in a teaching environment,System expansion was a standard Hitachi unit and the dis- or for an experienced user, it is a very RML announced recently two floppy play was very clear and stable. The key-powerful aid. COS documentation in- discsystems which willbe available board, like the rest of the system, was very cludes a full source listing and a descrip-shortly. They are the MDS, with mini well built. tion of the subroutines which are avail-floppies giving 80K bytes per drive, and The cassette interface can run at 300 or able to the assembler programmer. FDS double -sided, full-size discs giving 1,200 baud. Tapes distributed by RML The text editor and assembler were de- 500K bytes per drive, The FDS will be are recorded normally at 300 baud as thisveloped by RML. We did not have time toupgradable to double -density some time reduces the possibility of a tape not load-use them but from the documentation during 1979. ing correctly. RML says that users nor- they appear more than adequate. RML will offer the CP/M operating mally have no problems in using the inter- The three versions of Basic are: system, so a wide range of software, face at 1,200 baud. Tiny Basic, with integer arithmetic; including Fortran and Cobol compilers, 9K Basic with single precision floating point will be available on the system. Addi- arithmetic (six significant figures), Software strong variables, and graphics tionally RML XDB,thecompany's statements; extended disc Basic, will be available. The system is controlled by the COS 12K Basic; as 9K Basic but, without graphics, with extended precision Conclusions monitor, which is held in ROM on the arithmetic (12 significant figures), processor board. There is a text editor, PRINT USING, and a number of The 380Z is one of the best micro systems assembler, three versions of Basic and a other extensions. we have examined and it is British. number of diagnosticprograms. The Documentation on the Basics is very ID It is more expensive than some com- documentation supplied was in a single - sketchy. On the whole it assumes that the petitive systems but the extra cost is ring binder and although we managed to reader is already an experienced Basic justified by the high standard of manu- find out everything we wanted to know, it programmer. It is also confusing in that facture. was difficult to find any particular piece ofthe description of 12K Basic refers to 8K RML is not selling to first-time users information. Basic (what is that?). and the documentation reflects this fact. The COS monitor, developed by RML, Both the 9K and 12K Basics are based For the enthusiast a 280Z is available provides the usual functions of program on TDL Basic. We had no problems using comprising the CPU board and VDU loading and dumping, starting programs, them and they appear to be reasonably board assembled and tested, to which and debugging aids. There is a front -panel fast. One disadvantage is that there is no must be added cabinet, power supply, mode which displays the contents of thesyntax checking as statements are entered cassette recorder and television set.al

port the 380Z graphics and allow the plotting of symbols,specialfeatures to speedprogram development on Technical specifications characters and numbers. Two versions are available, thecassette -based systems. also the ability to read and write dataSource text is copied into memory during the first pass; files on cassette, utilising the RML cassette file system. the second pass can be made using this stored copy, by- HARDWARE RML 12K Basic: Size, approximately 12K bytes; suggested passing the relatively slow process of re -reading the CPU: The 380Z uses the Zilog Z80A microprocessorminimum size of memory, 20K bytes; precision; 12 digits;source from cassette. Errors can be co, rested using a floating point. co -resident editor which implements a subset of the with a 4MHz clock. commands available in the RML text editor. Larger pro- RAM (Random Access Memory): The 380Z has socketsGeneral: This includes all the features of RML 9K Basicgrams can be assembled in stages in a similar manner, if and circuitry for two blocks of dynamic RAM. Each blockwith additions. Lines may be formatted. AUTO linedesired, or in the normal line by line fashion. can use either 4K or 16K bit devices. 4K and 16K blocksnumbering. A REM can follow every statement, M1D$Utilities: Supplied free with all 380Z/280Z systems. can be mixed. Thus the basic 380Z can be supplied with upcan be used to insert a substring into an existing string.Diagnostics, Memory, cassette. to 32K socket on one of the circuit boards. PRINT USING statement for formatted output-options, right -justified,name, icfields,decimal pointalign- Printer interfaces: The S10-1 interface card is availablement, floating £ sign, commas every threedigits,Prices to provide RS232 or 20mA current loop standard serialstring field specification. Hexadecimal constants. Sub - input output to serial peripherals. string search. Enhancement of user -defined functions4K Bytes £834 Input/output support: cassette I/O can be selected to(multi -line, recursive). Program loading under program8K Bytes £684 be at 300 or 1,200 bits/second. Output to the VDU is at acontrol. COPY. EXCHANGE. CALL. 16K Bytes £965 speed equivalent to about 5,000 baud with automatic 20K Bytes £1,015 The RML 12K Basic will be of use in business and scientific32K Bytes {1,158 paging, which can be suppressed. Output routines areapplications requiring features not found in the RML 9K L1,421 included for the S10-1, 2 and 3 interfaces and for theBasic. Due to its 12 digit precision, however, RML 12K48K Bytes Centronics Line Printers. Basic is not as fast as the RML 9K Basic. Graphics com-A 3K TOM Monitor is supplied as standard. The 380Z mands will be added to 12K Basic in late 1978. may be supplied without a keyboard. For cost of the Hard -copy: Three printers are available. The Centron- 3802 without a keyboard, subtract £159 from the above ics 701is a 132 -column dot matrix printer which usesRML 2K Tiny Basic: Suggested minimum size of memory, 'intelligent' bi-directional printing to achieve a through-4K bytes: precision: INTEGERS only Range -1-32767 to prices. put of about 60cps. The Centronics 779 is an 80 -column -32767; commands, RUN, LIST, NEW, OLD, SAVE.280Z: Consists of the two PCBs usedinthe 380Z, dot matrix printer with a throughput of about 30cps.Keywords: REMARK, LET, INPUT, PRINT, PLOT, IF,assembled and tested. To complete a system the user will The Trend 800 is a quiet, lightweight (II kg) printer withGOTO, GOSUB, RETURN, FOR, NEXT, STEP, GRAPH,require a TV set, power supply, cassette recorder, key- a 30cps throughput. It uses standard Teletype paper. TEST. board and a case, if required. Specifications are otherwise Disc system: Floppy disc systems are being developedFunctions: ABS, RND, SIZE. as for the 380Z. along with the requisite software. General: This is a small, powerful, integer Basic adaptedOther hardware from Li -Chen Wang's Palo -Alto Tiny Basic for the 8080.4K Bytes £398 SOFTWARE The original 8080 code has been streamlined to use Z808K Bytes £448 codes and graph plotting with 380Z VDU graphics has 16K Bytes £529 RML 9K Basic: Size approximately 9K bytes; suggestedbeen ad ied. This is a Tiny Basic for graphics, games and20K Bytes £579 minimum size of memory, 16K bytes; precision; 7 digits;learning Basic programming. 32K Bytes £722 flowing point. FDS-2 dual full floppy disc system £1,695 RML Interactive Text Editor: Suggested minimumMDS-2 dual minifloppy disc system L895 Commands, keywords and functions size of memory, BK: This is a character -orientated textMDS-I single minifloppy disc system L629 ABS FN LNULL PLOT SPC editor comparable to text editors available on large AND FOR LOAD POKE SQR mainframes. The editor responds to a command stringPrinters ASC FRE LOG POS STEP which can include commands to locate, delete, type and Centronics 701 LI,389 ATN GOSUB LPOS PRINT STOP insert characters andlines, and to move an internalCentronics 779 £847 CHR$ GOTO LPRINT RANDOMIZESTR$ pointer. A command string can be saved and executed asCentronics connecting cables L5 CLEAR GRAPH LVAR READ TAB a Macro. Accessories COS IF LWIDTH REM TAN Inthe interactive mode, normal editor operation is 380Z -compatible cassette recorder with DATA INP MID$ RENUMBER THEN continued and uses four scrolling lines at the bottom ofrecord/playback head accurately aligned. Includes DEF INPUT NEW RESTORE TO the console screen. Whenever a command stringis connecting cable L40 DELETE INT NEXT RETURN TRACE terminated, text either side of the pointer is displayedVideo monitors from £123 DIM LEFTS NOT RIGHTS USR immediately on the upper 20 lines of the screen. Portions EDIT LEN NULL RND VAL of the command string can be repeated n times usingInterfaces £74 ELSE LET ON RUN WIDTH brackets-brackets can be nested up to eight levels. The510-I Serial Interface Card END LIST OR SAVE editor also includes an immediate mode. S10-2 Serial Interfaced Card £19 £18 EXP LLIST OUT SGN General: A powerful text editor. SIO-3 Serial Interface Card FILES LLVAR PEEK SIN RML Z80 Assembler: This is an absolute assemblerSoftware General: This is a fast, general-purpose Basic interpreterusing Zilog mnemonics and producing object code inZPL 8K Basic Interpreter L24 50 with floating point numbers, string -handling functions,either the industry -standardIntel format or the RMLZPL 12K Basic Interprater £75 graphics, re -numbering and line editing. Extensions sup-binary format. The assembler incorporates a number ofRML Z80 Assembler £25

PRACTICAL COMPUTINGDecember 1978 29 ,a=111 .111117S .11 iv tat 4 4..

IN PERIOD 3 at 11.30 a.m. in room 213, playing music, controlling a mechanical allowed greater scope for more general a lower six form takes 0 -level Physics.`turtle', or producing poetry. The breadth application.Certainly the availability of They are studying the effects of super-of computer usageattheschoolis microprocessors has allowed Wells to imposing one waveform on another, using unusual, partly because of the nature of extend the uses of computing to a far the school's computer to plot the resultsthe school, but more because of Wells, greater extent than was possible previous- of varying parameters. The experimentwho hasbeen developing computing ly. takes about five minutes to set up, 10 there since 1970. Since1970the school has passed minutes to explain, and 20 minutes for The Downs School has some 1,900through most of the familiar phases of every member of the class to run. pupils and is that rare bird of moderneducational computing-batch processing ColinWellsdeputisesforanothereducation, a secondary modern, though at a local college; remote batch processing teacher in Period 4 at 1.30 p.m. with aon the verge of becoming comprehensive.on an off-line terminal; an on-line ter- lower -stream, second -year class. They are Possibly the absence of a strong academicminal to a computer bureau; and in the playing five-a-sidefootball on a TV stream has helped avoid the bias of com-summer of 1976, the loan of an Arcturus monitor connected to the computer. puting towards examination courses and minicomputer for three months. "Of course, it's not the sort of thing we That last development which for the do normally during lessons, but as I'mColin Wells firsttime made a computer directly only covering, and you did express an accessible to the users, generated so much interest.. .". The class has had little enthusiasm among staff and pupils that it experience of computers. rt takes all of 10 was handed back with great regret. On the minutes for them to grasp the principles of other hand, its departure coincided with the game and how to use the keyboard to the arrival of the first low-cost micro- move the players. Boys against girls, they computers in this country, and success take it in turns to move, acquiring speed withtheminicomputer helped Wells and enthusiasm all the time. One -nil to the to convince the governors that micro girls-loud cheers. would be a worthwhile investment. More serious Assembly time

Period 5 at 2.30 p.m. is much more The decision to buy the Altair was serious. A fourth year CSE class is writing taken in the autumn of 1976. Wells notes its own programs as part of the computer that only three months before he had studies course. As they finish their pro- suggested to an incredulous headmaster grams, they go to the computer, type them that the school might have a computer in, and run them. They know exactly of its own before 1980. what to do, and Wells is able to let them The computer arrived in Kit form in proceed while he discusses the effects of December, 1976, its 16K memory board a computing on the school. month later, and was augmented pro- Those three lessons give a reasonable gressively by a SWTPC video terminal, a cross-section of computing at The Downs cassette drive and a Trend 30cps printer. School, at Dartford, Kent. On other days Assembly of this heterogeneous collection the computer, an Altair 680b, might be (continued on next page)

30 PRACTICAL COMPUTING December1978 Education

(continued from previous page) took more than three months and provid- ed a catalogue of mishaps and frustrations which, two years later, it would be unfair to the manufacturers to relate. Wells' emphasis on the need for sound technical knowledge, supplied by the head of modern languages, Chris Dyos, con- tinues to apply to anyone still contemplat- ing building a computer from a kit. The Altair has been in heavy demand, averaging at least 30 hours' usage per week. A keenly -supported computing club keeps it occupied after school hours and it has been put to use by the physics, English, modern languages and music departments, as well as to extensive use for computer studies.

Sources for ideas

Thelistofavailableprogramsis seemingly endless, for Wells is a prolific programmer. Many ideas are borrowed from existing programs but generally are modified or enhanced in the process of editing them for the Altair. For sources of ideas, he scours con- ference papers, Computer Education, the journal of the BCS Computer Education Group, and MUSE newsletters. He also recommends theScottish Centres for Computer Education and the Advisory Unit for Computer Based Education, among other sources. Some of the more off -beat ideas are worth mentioning as examples. For the English department, there is a readability program which enables the computer to suggest a suitable reading age for any passage typed -in, based on established standards of word and sentence length. Insight to control

The mechanical 'turtle' derives from the idea that, if a computer can control the two motors in a cassette drive, it can con- trol any other two similar motors. The Science teacher Martin Lawrence until the last question has to be answered in turtleconsistsof two motor -driven wheels in a simple chassis, controlled bywith a lower sixth physics class. one second. The effect,according to keyboard commands or program. As Wells, is riveting. well as giving insight into machine con-in the third year, so that they are aware trol by computer, it can be used, givenof what the computer can do for them in Impressive results sufficientaccuracy,inavarietyofother subjects by the time they start their mathematical studies. examination courses. Wiring a loudspeaker to some of the Some results produced by pupils are address lines has provided a musical He alsofeelsthat,particularlyat also impressive, including the simulation facility. Besides providing considerablesecondary modern level, the entertainingof a banking operation, the analysis of scope for CSE projects, the precise con-aspects of computing are important forelection results with output in the form of trol over pitch and speed is useful to the pupils initially to be involved. As a result, histograms, and, of course, the famous music department for studying sound andmany of the programs he has written havefive-a-side football game-a joint effort by musical components. a strong games content. the computing club. Allthisactivity stems from Wells' A simple arithmetic test is turned into a At the end of the year, Wells is leaving belief that, while computer science exam- fascinating challenge by adding a timingto join a research group in Plymouth, ination courses may be used to justify theroutine. For the first of a series of nine working on the uses of micros in the class- purchase of a computer, its main function questions, the pupil is given nine seconds room. Not surprisingly, he hopes to find should be as a teaching aid in all subjects. to answer but,if heiscorrect, only timetocontinuewritingprograms, All pupils take a computer studies course eight seconds for the next and so on, particularly for use in lower forms.

PRACTICAL COMPUTING December1978 31 The microcomputer for those who Languages need more than the minimum. The Powerful Basic including sequential right processor for business, THE and random access disc files scientific and educational use. formatted output strings line Proven applications include Games editor machine languageCALL Educational Word Processing E many other facilities.Opfronal Invoicing. Stock Control additional software Sales Ledger (under CP/M Purchase Ledger operating system) Mailing Scientific. HORIZONincludes BASIC compiler, FORTRAN and COBOL. The Horizon computer Horizon Z80A computer with 24K RAM includes:- and 1 disc drive £1483. Specification 2 Disc drives £1823 (exclusive of VAT Zilog Z80A MPU S-100 bus (12 slots) Solidand carriage). well-built case Up to three Shugart mini -floppy disc drives, 90KB each Serial port for CRT or Equinox Computer Teletype Real-time clock on motherboard. Systems Ltd, Optional additional 32-35 Featherstone Street, serial port and London EClY 8QX. parallel port Tel: 01-253 3781/9837. Powerful operating system and monitor Access to wide range of S-100 special application boards. Circle No. 128 SINTROM means business

From an established base in scientific, educational and personal computers using SWTPC 6800 and Si 00 8080 equipment, Sintrom announces a range of small systems for the business user. Easy availability of Micropolis -compatible applications software plus CP/M, COBOL, APL, FORTRAN and BASIC allows a speedy implementation of the total system. *Ledger PayrollInventoryVVord ProcessingHigh Resolution Graphics Industrial Control

Single Disk 143K£453 Host S100 computer with 32K and ADM 3A VDU £620 Dual Disk630K£1159 1/0 card Centronics µPrinter£350-£400 From £1200 Include PSU, S100 controller, Basic/M DOS. Centronics 701 £1400 Add-on 143K£399 Plus integral dual Disk Add-on 630K£859 From £2200

Office Hours: Monday - Saturday Write for Sintrom Microshop Arkwright Road, Access/Barclaycard free catalogue Reading, Berks. RG2 OLS. Prices exclude VAT/CARR SIN TROIV7 GROUP Tel: Reading (0734) 84322 Circle No. 129 32 PRACTICAL COMPUTINGDecember 1978 BOWLER -HATTED, pin-striped and twin- setted, the grey hordes of commuters pour en masseeach weekday morning from London's Cannon Street station, boundSomething in for their working days in the City. Since April, there has been a friendly face to welcome them as they go through the ticket barriers. A Commodore Petthe City gleams through the window of a shop in the complex outside the station and spells - out continuously its inviting message. the shop at the moment is the Pet; the tions in the shop with different packages", The shop is run by Sumlock-Bondain, a remainder of the space is occupied by cal- says Kick. "One week it will be a solici- company with its roots in the Sumlock-culators. The company also supplies the tor's systems. The next week it will be Anita calculator business. It was formedAdler TA20 system, and the Compucorppackages for accountants". by people made redundant by the take- 625 series. The plan is to have a qualified adviser over of Sumlock-Anita by the U.S. giant As well as the casual shopper, big com- on hand at all times to deal with customer Rockwell, who did not want to see theirpanies are catered for. Among recent queries. talents going to waste and decided toorders have been Pet systems delivered What about back-up? "People with any continue in the same line of business. to ICI, and a £25,000 Compucorp system problem are always at liberty to come to OriginallytheysoldtheSumlock for London Transport. us with their problems", says Kick. An calculator range but whenthat was That isall somewhat up-market andaddedadvantage is thatSumlock- wound up by Rockwell, they found favour Sumlock-Bondain realises the potential ofBondain has a sister organisation-Anita with Texas Instruments, for whom theysome of the cheaper microcomputer sys-Electronic Services (London)-which arewholesalers,andwithHewlett- tems as well as anyone. It has been look-specialises in servicing and maintenance. Packard, for whom they act as a main ing at other systems to fill its range andThe links with software houses should agent. has signed an agreement to stock thealso provide the necessary help with any As the company was getting on its feet, Horizon machine from North Star Com-programming difficulties. disaster struck. A fire at its London head- puters, which starts at justless than quarters destroyed a great deal of pro- £1,000. perty and many valuable files. The shop now also has the right toLooking for growth Managing director John White recalls:market the Equinox system-price range "We were the first of the Green Goddess £1,800-£2,500. According to shop So what kind of people does Kick find fires-during the firemen's strike-and wemanager Mike Kick: "After the Christ- attractedtohis shop? "Anyone and lost the records of all our clients in themas rush, in which we expect tosell everyone, really". City and the West End." plenty of calculators, more space will be Casually he mentions, too, that Lord given to computer systems". Rothschild goes in to browse round from Promoting systems The emphasis will be still on ready -to - time to time. "He has bought two calcula- run systems. As well as carrying most oftors but has so far resisted the attractions Records of that kind are the life -blood the Commodore and Petsoft program cas-of the Pet. He's shown an interest in it", of any company, so special measures had settes for the Pet, Sumlock-Bondain hassays Kick, "but he's not bought one yet". to be taken. "We needed somewhere fast commissioned a software house, Micro As to the future, White and Kick see in the City. The situation inside Cannon Software Systems of Grays Thurrock, only growth and expansion. "We shall be Street station seemed ideal, with people Essex,towritesoftwareforspecific opening a new shop in Norwich very passing through on their way to and from applications. shortly", says White, "and there will be work". "We shall be running full demonstra- more in London, too". The area contains the greatest concen- tration of mainframe computer systems in the U.K. and so the shop tends to attract many computer people, as well as hard- headed businessmen wanting to know what a personal computer can do for them. "It has worked very well", says White, who used his first Pet system to do some initial advertising for the shop. Although it was not open until May, from April the shop had a Pet system in the window run- ning a continuous program informing cur- ious passers-by of what was to come. Being in the centre of the financial dis- trict of London, the policy of the shop is to promote systems for business use. "We've no real intention of going to- wards the hobby market", says White. With his experience in the calculator field, and still with a strong investment in that side of the business, the same philo- sophy is applied to microcomputers. He wants to supply systems which the un- skilled user can operate without resorting first to the soldering iron. The only computer system on show at

PRACTICAL COMPUTINGDecember 1978 33 Interview

IT HAD to happen sooner or later-a multinational company taking an interest in microcomputers. ITT needs little intro- duction, if only because of its size. It is to Big Apples manufacture the Apple II personal com- puter in Europe. The prime reason for the interest of Practical Computing in the ITT consumer from little products division is that in May, the com- pany informed the world at large of the wonders of Prestel and of its plans for the viewdata market. applesgrow The ITT microcomputer was one of a range of products for viewdata demon- computer, a minifloppy disc drive and amanufacturing will be Basildon, where the strated, but the eagle-eyed were quick to printer. keyboard and casing will be made. The note that the microcomputer was, in fact, "We have had firm indications frompower supply will be manufactured in an Apple II with an ITT label on it. AndreSousanof Eurapple-Apple'sGermany and the UHF modulator in Many things have happened since, notexporting arm-that whereas in the past France. least the launch of Practical Computinghobbyists have been the main market for "Our intention in the U.K. is to build a when it reviewed the Apple II and re- Apple, this trend is now decreasing. network of distributors over the next few ferred to ITT intentions. "Spending patterns differ between the weeks. We are looking essentially for soft- Curiosity aroused, however, we decid- U.S. and the U.K., anyway. We feel thatware houses, because ITT will not be invol- ed to visit ITT at Basildon to interview the the U.K. market for the ITT 2020 willved directly in the provision of software. man in charge of the company's viewdatacome from the small businessman. There "We will award distributorships to some strategy for the U.K., Graham Pypus, is bound to be an over -spill to hobbyists 15 companieswhichwillundertake who proved to be most helpful. but the message we want to put across isfull responsibility for servicing systems that it is a small business system". and software back-up. One of the prime Colour matching The agreement with Appleisnon- requirements is that they have a direct exclusive. ITT would not need one any-sales force. It seems ITT will begin manufacturingway; it would take a sizeable organisation the Apple in the U.K. early next year andto gear production to a competitive capa- Keen interest will sell it as the ITT 2020 personal com-city. Also the ITT image lately does not puter. The company has entered into an accord with anything which might suggest "The distributors, in turn will allocate agreement with Apple in California toany hint of a monopoly, particularly indealership franchises within their areas. buy the basic Apple printed circuit board Europe. We're not looking to proliferate on the and to market the micro in its finished retail market; we do not necessarily be- form in the U.K. and Europe. Made in Basildon lieve that the High Street shop is neces- "We'll be making our own casings in sarily geared to provide the product. thefirstquarter of next year", says "Obviously a lot depends on the spirit "So far we have received direct applica- Pypus. "They will have certain cosmeticof the agreement", Pypus continues. "Wetions for virtually every area for distribu- alterations-essentially colour matchingwould not be too happy if Apple supplied torships and dealerships, despite having to our product range insilver with a its boards to others in competition with us. made no formal announcement of our black keyboard. We're hoping to launch It is in Apple's interest, too, that we should intentions. this as a product shortly". spearhead the introduction of the product "Initially we will have a sales liaison ITT isnot aiming at the hobbyist to the European market". team of two people who will deal with market essentiallybutislookingto European operations will be directed end -user problems and enquiries and refer assemble complete systems configurationsfrom ITT plants in the U.K., France andto the appropriate distribution". for business users-comprising the micro - Germany. The U.K. headquarters for Prestel, though, has been pushed back somewhat. Pypus says: "We had hoped An Apple in disguise. for the first public trial in June but there have been slippages on the date, although we understand that there will be some 40 or 50 connections in the near future. Our viewdata products will be launched in March or April". ITT forecasts that some 25,000 viewdata sets will be installed in 1979, increasing to around one million in 1983. That would mean nearly two -and -a -half million sets in the home, or one in every eight house- holds. Total sales value for the micro- computerisexpectedtoreach £160 million by 1982. A printer to which the contents of a televisionscreen may be dumpedis offered at the low -end configuration and called a rotary printer, manufactured by SCI in the U.S. Likely prices are: ITT 2020 4K bytes RAM, £827; 16K bytes RAM, £950; 32K bytes RAM £1,114; 48K bytes RAM, £1,278. (All prices plus 8 percent VAT).

PRACTICAL COMPUTING December1978

314 Computerl'179 Show 5-7 July '79 Bloomsbury Centre Hotel, London Following the huge success of the 1978 Do-it-yourself Computer Show, Online have planned a seventy-nine spectacular Three Day Exhibition Personal Computer Exhibitors from both sides of the Atlantic Three One -Day Seminars Authoritative speakers on microprocessors including Portia Isaacson and Adam Osborne from the USA

Exhibitors at the 1979 Show will be able to Many exhibitors at this sell their goods direct from their stands, which will be of particular benefit to the year's Show reported ever-growing number of personal com- record business, so book puter retail outlets, who may wish to use your stand now and get this show to market their products. your share in 1979

For full Exhibition details contact Eddie Dawe, Online Conferences Ltd Cleveland Road, Uxbridge, England Tel: Uxbridge (0895) 39262

Circle No. 130 PRACTICAL COMPUTINGDecember 1978 35 Software Off -the -shelf packages THIS MONTH we start a regular software wanting to use a Pet in a stock control column which will look at off -the -shelf type of application. packages. We begin with three business The sales analysis package is available applications which have been developed for Petfrom Petsoft, a company specialising in to run on the Commodore Pet. writing and selling software for the Pet. The Pet, reviewed in our October issue, It is for companies wishing to maintain costs £695 and is complete with built-in up-to-date sales figures. Typically it can screen, tape recorder and keyboard and is be used by firms such as car dealers, suitable for limited business applications. wholesalers of electrical components and Until recently, there has been little off - the food industry, who are at present the the -shelf -software business, available for biggest customers for the package. thePet. The programs reviewed this It displays and compares in easy, read- month are two for stock control and one able visual graphic form, the achieve- for sales analysis. ments of, for example, salesmen within Both the stock control packages cost their respective divisions and their total between £15 and £20. They consist of one sales over a period of time. program each and are complete with documentation, at present half -a -dozen The program holds a capacity of four photocopies of type -written A4 sheets. divisions, six salesmen and 12 months. It They are distributed by Commodore at converts this information into a graphic 360 Euston Road, London, NW 1. display (bar charts) so avoiding the con- The programs were written by Pet fusion of interpreting many over -lapping dealers, Rockstock by Rockliff Brothers numeric figures. of Liverpool and Ardenstock by Arden By loading information once a month, Data Processing of Leicester. maximum of 90 products, a total whichthe program analyses that information Rockstock was written for a Pet with could be increased to 255 by adding moreand keeps a company up-to-date on its two cassette decks and is capable of hand- memory. Whereas the data in Rockstocksales figures. The program shows the ling an unlimited number of products. We is accessed sequentially from the data tape, sales trend or how seasonal fluctuations in found the documentation of averageArdenstock stores all the data as datathe market have affected sales over the quality and even a complete newcomer toarrays within the Pet memory, thus allow- previousmonths.Afterthisdatais computing would find it fairly easy toing the user fast random access to anyanalysed, it is then compared and display- follow. data. ed on bar charts. The examination mode in Ardenstock is Three modes very simple and fast. Because only oneTime -saving There are three main modes of opera- cassette deck is used, the creation and in particular the update mode are rather Small companies do not always have tion. The creation of a new master file, the time to look at sales figures until audit lengthy and involved processes. which will contain the data on all the time; then it is often too late. This can be product linesis the first thing the user This is a factor imposed by the limita- tions of the Pet as a computer system andavoided by the sales analysis program will do having purchased the program which is time -saving, easy to follow and after, of course, taking a copy of his should be relieved when the manufacturers produce a floppy disc for the machine. simply efficient.It can correct things program tape in case of accidents. when they are wrong, before it is too late, The second mode is used to examine Like Rockstock, there is good and ample documentation with this program. and does not require a qualified person to the stock file. In this mode the data on operate it. each product is displayed sequentially; it is obtained as required from the data tape Well written A similar program on a larger computer would obviously be far more expensive, on drive 2. Both programs are well written and the The data is displayed in scrolling or authorshavetriedwithreasonable and at £10, the program iscertainly page mode; data on each item is displayedsuccess to overcome the limitations of the worthwhile for what it will do. for about 10 seconds and then data for themachine and produce a viable business If it has a limitation it is because it is next item is displayed, the user having the program. It is arguable,however, only for companies whose turnover does option to freeze the display on the screenwhether either of the programs is actually not exceed £512,000 per month. at any time. a stock control program; they seem more The third is the update mode which like stock recording programs. Petsofthasalsoannouncedthe allows the user to change the data on any Some attempt has been made in Arden - release of a new catalogue featuring more particular product or to add new productsstock to show and record stock move- than 100 business, educational and applica- to the file. ments; no attempt has been made, how- The user can thus sellstock, orderever, to utilise this data to produce, fortions programs for use with the Pet. As stock, or add stock, or alter the buying example, automatic re -ordering of stock. well as programs, there are new software and selling prices, the re -order level, or The time taken to access data in both tools available, among them an Auto- the product description. programs is rather long; this is more the matic Program Linker (£10) and some To try to avoid unauthorised access and fault of the system rather than the pro- changing of data, the program employs gram. Users of Rockstock can, however, clever new games, includingthelong- password encoding of the data files and reduce the information access time by awaited American Micro -chess program uses threelevels of fullor restrictedlimiting the number of products on a tape (£14). Catalogues can be obtained from access. to between 25 and 50. Ardenstock uses one cassette deck on One or other of the two programs Petsoft, PO Box 9, Newbury, Berkshire. the basic Pet and thq user is limited to ashould prove a useful purchase to anyone 0635 201131.

36 PRACTICAL COMPUTING December 1978 Introducing the personal computer you've waited for. The Exidy Sorcerer.

16K£760

LOOKAT THESE FEATURES"K CicT8% VAT WORD PROCESSING, COBAL, FORTRAN etc The Sorcerer Computer is a completely assembled and tested computer system ready to plug in and use. The standard configure- * PLUG IN ROM CARTRIDGES tion,includes 63 key typewriter -style keyboard and 16 key numeric pad dual cassette I/O, with remote computer control at 100 and * WORKS WITH NORMAL TV SEND 50p 1200 baud data rates, RS232 serialI/O for communication, FOR LATEST parallel port for direct Centronics printer attachment, Z80 pro- * S100 EXPANSION UNIT JADE cessor, 4K ROM operating system, BK Micrsooft BASIC in separate CATALOGUE plug-in Rom Pacno cartridge, composite video of 64 chars 30 tersionl lines, 128 upper/lower case ASCII character set and a 128 user - * CASSETTE INTERFACE contains Sin defined graphic symbols, up to 32K on -board RAM memory, inineluction to operators manual, BASIC programming manual and cassette/ Microcomputers video cables, connection for S100 bus expansion unit giving * Z80 CPU etc. access to the spectrum of exciting and useful peripheral devices, such as Floppy disk drives, voice recognition/synthesis battery * 32K RAM ON BOARD back-up board in case of power failure, additional memory boards, E -PROM cards give you the facility to program and re -program *A REAL BUSINESS MACHINE your own ROM memories etc. etc. This is the most useable and flexible system that's now available to the home and business user please make cheques and postal orders payable to JADE at such a low price. phone your order quoting ACCESS or VISA number technical advice phone 0736 66565 Supplied by - Factor OneComputers 17 Market Place, Penzance,Corriwa11. Circle No. 132 The Altair 300 Business System

Based on the ALTAIR 8800b micro -computer this system was designed to solve the problems of the medium to small business. Simple to use, it has the power to perform ALL the functions essential to a successful business. The system can be further tailored to meet any specific requirements. Contact: COMPELEC: 107 Kilburn Sq., London NW6 6PS, Telephone: 01-624 7745, 01-328 1124

Circle No. 133 PRACTICAL COMPUTINGDecember 1978 43 LABYRINTHhas been written in Basic by Sean McHugh to run on a Pet but can obviously be converted to run on mostTakeyourpickas 3 micros. Some program notes at the end of the program take into account a few peculiarities of the printer we used. chase the monster, You are placed in the centre of an invisible maze in three dimensions and you have to get out. sink the Mk There are monsters in the maze. Poor,gloryor starving victims of a rather primitive ecology, or blood -crazed carnivores, de-This month we show you how to program three exciting games into pending on your point of view. your system. All are written in Basic. Labyrinth is a monster -versus - The monsters can hear movement and will devour you if they can reach youman game. Cars puts you at the controls of a Formula One racing before becoming confused by the repeated car and Battleships is the popular find -the -enemy game. blows to the head which they suffer by 015 PRINT "3": H =10: H2" = INT (10* RND 2810 PRINT' wandering around in the dark. (TI) -110); FR-- FR= 1-* 020 IF PEEK (S9 HI °;, *40 + H2%<>32 THEN 2815 NEXT," You can defend yourself by cueing all 1010-* 2817 PRINT "3 = "-* of the known anit-monster spells in button 030 POKES 9 + HI%*40 + H2°, 83-* 2820 RETURN-' 040 MI % - INT (10*RND(T1) + 10): M2% = INT (IV 2900 CH= INT ((100-I)* RND (I) + I):RETURN-' presses, the alphabet serving in this case RND (TI) +10)-* 2950 CH= INT ((9-1)RND (I) + I): RETURN-* 045 IF PEEK (S9 -f- MI% 40 + M2%) =IO2TH 3000 FOR 17 = I TO 8-* for cues. EN 1100- 3010 T3 = F3+ C (17,1):T4 -F4 + C (I7,2)CL=59+ You can grope your way to the various 050 IF PEEK (S9 + M 1 %*404 M2%) <>32THEN 1040-* T340+T4-* 100 REM MOVE SEQUENCE," 3012 IF PEEK (CI) = 83 THEN 4000-* doors of the maze and find behind them 130 GOSUB 2800 : PRINT "32 PRESS A NUMBER 3015 IF PEEK (CI)=102 THEN POKE CI,81:POKES TO MOVE" - 91-F3+40 + F4:102:F3=T3:F4=T4; GO TO gold, stairs, or yet more monsters. 135 GET D$ : N - VAL (D$) IF N< I THEN 1135-* 3110-* 140 IF N = 5 THEN GO SUB 2800: GO SUB 2900: 3020 GO SUB 2900: IF CH<25 THEN POKE CL,160-* GO TO 9000- 3030 IF T3(1 or T3>A 1 or T4(1 or T4>A2 THEN Fast and clever 150 Fl - HI",,:F2 = H2%:TI == Fl +V (N.1):T2= 3090- F2 + V(N.2)-* 3050 IF PEEK (CL)= 160 THEN 3090-' You have to be fast, cautious and clever 155 IF TI > I ORT 1> AI ORT 2 A2 THEN 3070 POKES 9 + F3 *40+ F4,IO2:POKE CL, 81: to survive the Labyrinth. 9100-* F3=T3, F4=T4: RETURN-. 160 H= 59 + Fl *40 + F2 :G - S9+TI* 40+T2-* 3090 NEXT-' The -* at the end of each program line 162 IF PEEK (H) - 160 THEN PRINT "3 YOU GOT 3110 RETURN-' CRUSHED BY A FALLING WALL": END," 4000 REM.WEAPON-* signifies end of line and doe not have to be 165 IF PEEK (G) =- 160 THEN CH = 25 :GO TO 4005 GO SUB 2950:PRINT "IT'S THE " SY$ (CH -I); typed in the program. 1270-* GO SUB 2750-* 168 IF PEEK (G) 102 THEN 1300-* 4010 GO SUB 2800: PRINT "YOU GOT THREE With Pet a'? means a PRINT state- 170 GO SUB 2900-* SECONDS TO HIT THE RIGHT SPELL LETTER-" ment. 180 IF CH <15 THEN POKEG,132: GO TO 2000-* 4025 GO SUB 2750: GO SUB 2800-* 270 IF CH THEN POKE G,160 :POKEH,214 : GO 4030 NI =TI :SP = INT (C90-65) *RND (I) + 65)- The particular printer used could not SUB 2700:POKE H, 83: GO TO 1130-* 4035 PRINT "FROM NOW!"-* 300 POKE H, 102: POKE G, 83-* 4040 GET As," print Pet's specific command characters 305 H I % = TI: H2% -T2"-' 4050 IF A$ = CHR $ (SP) THEN H I %=TI :H2%= 310 GO SUB 2800-* T2:CD=CD+ I GO TO 4085-* nor the graphics characters. There are five 350 GO SUB 2950 : NM = CH," 4060 MI -TI:IF MI >NI + 1080 THEN 4100-* command characters to watch for, as well 390 F3 = MI";, F4- M24;,-* 4070 PRINT " 3 N OPE, YOU GOT":PRINTINT 400 FORMO -1 TONM-* ((1080 -(M 1-N1))/360; PRINT"SECONDS as the home symbol and the clear screen 410 H= S9 + F3 40 + F4:IF PEEK (H) = 83 NOW !--* symbol. THEN 1430-* 4080 GO TO 4040-' 420 POKE H, 102-* 4085 GO SUB 2800; IF INT ((RND (I) + FR.)) THEN Figure 3 stands for CLEAR SCREEN 430 DI =TI F3:D2= T2=F4-* 4100-* 450 R- (D PT) I + D2D2) 5:IFR<1.2 THEN 4000-* 4090 FOR 1=0 TO 10:PRINT "O.K!, NEXT:PRINT on the following lines:10,1010, 2130, 510 JI =INT (DI/R):12- INT (D2/R)-* "YOU GOT IT"?-' 2140, 4150, 8000, 8100. 530 G = S9 + (F3 + 11) *40 FT4+ J2- 4094 POKE H.102:GO TO 1040-* 544 IF PEEK (G) = 83 THEN 4000- 4100 FOR I = I TO 20:PRINT "CURSES, CURSES, The printer has reproduced the graphics 545 IF PEEK (G) = 160 THEN 1610-* GERROFF YOU BRUTE"- 548 IF PEEK (G) --102 THEN 1570-* 4110 PRINT " 2 YAMM CHOMPA CHOMPA ASHRRUP characters in lines 8100, 8200 and 8300 as 550 GO SUB 2900-* CHOMP"-' lower-case letters. The relevant symbols are 560 IF CH 50 THEN POKE G,160:POKE H, 214: 4130 PRINT "DOWN ,BLAST YOU"-* GO SUB 2700:POKE H, 81 :GO SUB 3000, 4140 NEXT: GO SUB 2750-* slanting lines at the four corners and GO TO 1610-. 4150 FOR I: I TO 100: NEXT : PRINT "3 1570 POKE H,102:POKE G,81:F3 -F3*+11= F4 AAAAAAAGH"' straight lines at the four sides. The S in the F4+12-* 4160 PRINT:PRINT: PRINT:PRINT "2 CHOMP!-* middle is a "heart" symbol to indicate the 1610 NEXT-' 4170 END-' 1630 1 F M 1"-F3 AND M2%F4 THEN POKE 8000 PRINT "3 HAVING OFFENDED 311 THE SEER man. In line 8070 the "Q" stands for a S9 +F3 *40 1-F4; 102: GO TO 1040-' SPEKTAKLES"-* 1650 MI% = F3 :M2% - F4 -* 8005 PRINT "1 BY ASKING IF HE HAD CRYSTAL small dot-about the size of a match- 1700 GO TO 1100-* BALLS"-' stick head" which is the monster. Have 2000 REM D S G M SEQ-' 8010 PRINT "I YOU HAVE BEEN CAST"-' 2010 PRINT "3 WOULD'NT YOU JUST LOVE TO 8015 PRINT "I INTO THE CORRIDORS OF fun. We did. OPEN THAT DOOR?-' REWOP"-* 2020 PRINT: PRINT "PRESS Y FOR YES OR N FOR 8020 PRINT "I YOUR PET DEMON -ME -WILL HELP NO"-' YOU":PRINT "I BY THIS SCREEN"- 10 PRINT"3"-' 2030 GET A$ :IF AS "THEN 2030-* 8030 PRINT " I YOU WILL SEE':PRINT"12 2 WALLS 20 Al-20:A2 = 36: S9 -- 33008-* 2040 IF A $="N"THEN TI =FI :T2= F2: GOTO 2150-* LIKE THIS"-' 40 DIMV (9.2)-* 2050 POKE H, 102:POKE G, 83: GO SUB 2900-* 8040 PRINT "& CORRIDORS"-* 50 FORK -I TO 9 :READY (K.I), V(K.2): NEXT-' 2055 GO SUB 2800- 8050 PRINT "2D2 DOORS"-' 70 DATA 1,-1 ,I,0, 1,1-* 2060 IF CH <30 THEN PRINT "WHOOPS! " GO SUB 8060 PRINT "2A2 STAIRS"-' 80 DATA 0,-1,0,0,0,1-* 2700: GO TO 4000-' 8070 PRINT " Q MONSTERS"-' 90 DATA -I,- I ,- I ,0,- I ,1-* 2070 IF CH<60 THEN GL = GI + CH: FOR I = I TO 8080 PRINT "S AND YOURSELF: PRINT "I PLEASE 120 DIMC (8.2)-* 7, PRINT "GOLD!!, NEXT "PRINT CH; PRESS A BUTTON"-' 130 FORK I TO 8;READ C (K.I), C(K.2) NEXT," PRINT" PIECES!"-* 8090 GETA$ :IF AS= " THEN 8090- 140 DATA -1.0-1.1.0. I .1.1.1.0-1.- 1.0-1,-1,-I.-* 2080 IF CH<60 THEN GO SUB 2750: GO TO 1305-* 8100 PRINT "31111111" PRINT TAB.(9) "M B N" 200 DIMS $V (8)-' 2090 POKEH, 83: POKE G, 147,PRINT "DO COME PRINT TAB (9) 789"-' 210 FORK = 0 TO 8 (READS V$(K): NEXT-' DOWN THE STAIRS"-* 8200 PRINT TAB (9) " 4 S 6"-' 220 DATA "HEAVING MOUNTAIN BLOAT", 2110 PRINT "PRESS U FOR UP, D FOR DOWN, N FOR 8300 PRINT TAB (9) "123":PRINT TAB (9) N B M"-' "PURPLE BELCH THING", RANDY NO"-' 8400 PRINT "II PRESS THE NUMBERS SHOWN TO NEWPUNK"-' 2120 "GET A$ :IF A$="" THEN 2120-* MOVE IN THE I DIRECTIONS INDICATED"-* 230 DATA "OVERWEIGHT WRAITH", 2130 IF A$ = "U" THEN IV= IV I-I:PRINT "3" 8410 PRINT "I IF YOU ARE UNLUCKY ENOUGH "GALLOPING TWITCHER"-* GO TO 1010-* TO MEET A I MONSTER"-' 240 DATA "GROUP 0 VAMPIRE", DANDRUFFED 2140 IF A$ -L "D" THEN LV=LV-1: PRINT "3" GO 8420 PRINT "1 YOU HAVE ONLY ONE CHANCE"-* WEREWOLF", "RABID GROPE", "BLOODY TO 1010-* 8430 PRINT "I TO PRESS THE CORRECT LETTER 'ORRIBLE"-' 2150 GO SUB 2800: PRINT "VERY WELL - BE OF THE ALPHABET"-* 400 PRINT "DO YOU KNOW HOW TO PLAY"-* UNADVENTUROUS":PRINT"STAY ON 8500 PRINT "I PLEASE PRESS A BUTTON"-' 410 PRINT "I PLEASE PRESS Y FOR YES N FOR NO"-* LEVEL' _ 8600 GET A$ :IF AS = "" THEN 8600-* 420 GET AS : 1FA$ = "N" THEN 8000-* 2155 PRINT LV: PRINT "WITH",: PRINT GL; PRINT 8700 GO TO 1010-* 430 'FAS <> "Y" THEN 420-* "GOLD PIECES"; GO SUB 2750-* 9000 REM HELP-' 1010 PRINT "3 YOU ARE. ON LEVEL "LV" WITH 2160 T1= Fl :T2= F2: GO TO 1305-* 9010 PRINT "I ASSUME YOU NEED HELP I CAN "GL" GOLD PIECES"-* 2700 FOR DL = I TO I00:NEXT: RETURN-* CAN TRY":PRINT"I IF YOU PRESS Y FOR 1012 PRINT "YOU HAVE SPELL -BLASTED "CD" OF 2750 FOR DL- I TO 2000 NEXT: RETURN-* YES"-* THE LOCAL NASTIES"-* 2800 REM BLANKS. SCREEN TOP," 9020 PRINT "IN FOR NO WILL LET YOU MOVE"-* 1013 PRINT : PRINT "PLEASE PRESS S TO START"-* 2802 PRINT "3 -" -* 9030 GET X$:IF X$= "Y" THEN 9060-* 1014 GETS S :1FS$"="THEN 1014-* 2805 FORT = I TO 5-* 9040 IF X$ = "N" THEN 1100-*

44 PRACTICAL COMPUTING December 1978 Games Oil drive to :et 9050 IF X$=" " OR X$= "5" THEN 9030-* 9060 IF CH> = 50 THEN LV=LV-I :GO TO 1010-* 9070 GO TO 4100-* 9100 REM TEST EXIT-* 9110 IF LV THEN POKE S9 + TI.40 + T2,160: GO TO 1130- 9120 PRINT "3 YOU GOT OUT !! 311 YOU TOOK "GL" GOLD PIECES, 31111 AND KILLED " CD" MONSTERS"- 9140 PRINT:PRINT "WELL DONE INDEED"- 9150 FOR DI= I TO 5000:NEXT- 9160 FOR I=I TO 10 PRINT:"WATCH OUT !!": NEXT:M=M + 1-* 9170 IF M<2 THEN GO TO 4000- 9180 PRINT "NO IT'S O.K. YOU ARE OUT !- READY - READY -I Note: in line 10 "3" means clear screen. -*signifies carriage return and does not need to be programmed in. In any line where number 32 occurs this signifies a reverse field. On the grid In this program you are at the controls of a Formula One racing car attempting to complete a lap round the Brands Hatch circuit. At each of 22 points round the circuit you are given a description of the next section of the track, and have to type three numbers, separated by commas, to indicate the gear, the brake setting and the acceleratorsettingsrespectively.The clutchis automatic and former world champion racing driver Jackie Stewart 360 READ K, 5, W will steer for you. another lap. You may choose to drive 370 DATA 0,I, 0 yourself, or be shown how it should be 380 PRINT The data input for gear, brake and 390 PRINT "FLAG DROPPED - YOUR'E OFF" accelerator settings are checked to ensure done by an expert. 400 FOR I = I TO 22 that the values are integers, that the gear 410 PRINT "ENTER G, B, A" 10 DIM M$(10), QS(18), J$(9), X(22), Y(22), Z(22), 420 IF = "EXPERT" THEN 650 is in the range 1-5, and the brake and G(5), 1(22), L(I0) 430 INPUT GI, BI, Al 20 PRINT TAB (8); "CARS" 440 IF AI + 81 + G 1 = INT(A+ INT(81) + accelerator settings are in the range 0-9. 30 PRINT TAB (8); "= = = =)) INT(G I) THEN 470 The new speed is calculated based on the 40 LET 3$ = "NORMAL" 450 PRINT "VALUES MUST BE WHOLE 50 PRINT "WOULD YOU LIKE INSTRUCTIONS! NUMBERS - "; speed for the previous section, plus a fac- TYPE YES OR NO & PRESS RETURN." 460 GOTO 550 60 INPUT Q$ 470 IF GI = 0 THEN 600 BRAKE AND ACCELERATOR" 580 PRINT "TRY PRESSING THE ACCELERATOR (iii) Have you slightly over -revved the 150 PRINT 'SETTINGS AT EACH OF 22 POINTS ON PEDAL DOWN - "; THE CIRCUIT." 590 GOTO 550 engine? You will be warned, but 160 PRINT "THE CAR HAS FIVE FORWARD GEARS" 600 LET BI = BI + I should you do this three times you 170 PRINT "MAX. SAFE ENGINE SPELD IS 10,000 610 IF Al <= 9 THEN 690 RPM. DON'T OVER -REV" 620 PRINT "YOU HAVE PRESSED THE will blow-up the engine. 180 PRINT "AT EACH POINT ON THE CIRCUIT ACCELERATOR THROUGH THE ENTER G, B, A." FLOORBOARDS!" (iv) Have you seriously over -revved and 190 PRINT TAB(6); "WHERE G = GEAR", 630 PRINT "TAKE YOUR BOOTS OFF AND TRY blown the engine? "(I-5)" AGAIN" 200 PRINT TAB(15): "B = BRAKE", "(0-9)" 640 GOTO 410 (v) Have you exceeded the maximum 210 PRINT TAB(6); "AND A = ACCELERATOR", 650 LET GI = X(I) "(0-9)" 660 LET BI = Y(I) + I safe speed for the section by 10 mph? 220 PRINT" PLEASE FASTEN YOUR SAFETY 670 LET Al = Z(I) If so, you have crashed. BELT****" 680 PRINT X(I); Y(I); Z(I) 230 MAT READ G 690 LET S=S+Al 3.2 G(G1) - L(B I) - S / 20 700 IF S > 2 THEN 730 (vi) Have you exceeded the maximum 240 DATA 2.4, 1.9,1.5,1.2, I 250 MAT READ L 710 PRINT "CHICKEN! YOU HAVE BRAKED TO A safe speed by up to 10 mph? If so, you 260 DATA 0, 6, 15, 20, 25, 30, 40, 59, 80, 95 STANDSTILL." skid and lose 25 percent of your 270 MAT READ 720 GOTO, 410 280 DATA 180, 180, 90, 180, 180, 64, 75, 180, 125, 44, 730 LET R = S G(G I) 61 speed. 180, 180, 94, 180 740 IF R > 2000 THEN 790 Barring fatal mishaps, you are told the 290 DATA 73, 180, 62, 31, 180, 121, 86, 180 750 PRINT "ENGINE STALLED" 300 MAT READ X 760 PRINT "SELECT FIRST GEAR & START HER UP speed you have attained and the engine 310 DATA I, 3, 5, 4, 5,I, 3, 3, 4, 5, 3, 4, 3, 4, 5, 3, 2, AGAIN!" 4, 2, 4, 5, 4 770 LET S = 0 revs, and you are given the information 320 MAT READ Y 780 GOTO 410 for the next section. 330 DATA I, 0, 4, 0, 0, 9, 0,I,1, 8, 0, 0, 5, 0, 6, 0, 9 790 IF R (= 10000 THEN 920 7, 0, 0, 6, 0 800 IF R > 11900 THEN 900 When you have either crashed or com- 340 MAT READ Z 810 PRINT " WARNING - YOU HAVE SLIGHTLY 350 DATA 9, 9, 5, 9, 9, 3, 3, 9, 7, 2, 9, 9, 3, 9,I, 8, 9, OVER REVVED ONCE"; pleted a lap, you are invited to attempt 8, 9, 8, 9 (continued on next page)

PRACTICAL COMPUTINGDecember 1978 45 (continued from previous page) 470 DATA "GO MAN GO. 480 DATA "BANKED CURVE. (x, y) of a square you think is occupied by 820 IF W = 2 THEN 890 490 DATA "BEND TIGHTENING UP. " a ship, and are told which type of ship 830 IF W = I THEN 860 500 DATA "LAST CHANCE TO VAIN." 840 PRINT "& GOT AWAY WITH IT" 510 PRINT "JUST YOU DRIVE HOME you have hit, or alternatively if you have 850 GOTO 870 CAREFULLY!" missed. To sink a ship you must hit each of 860 PRINT "AGAIN" 520 END 870 LET W = W + I the squares the ship occupies. 880 GOTO 920 TRIAL RUN 890 PRINT "TOO OFTEN!" CARS Our intelligence organisation has inter- 900 PRINT "ENGINE SEIZED WHEN YOU WOULD YOU LIKE INSTRUCTIONS? TYPE YES OR cepted a map of the enemy fleet position, REACHED"; R; " REVS!" OR NO L PRESS RETURN. 910 GOTO 1090 ?NO which may be a true map, or in one of 920 IF S < 1(1 THEN 1000 930 IF S < (1(1) 4-10) THEN 980 FLAG DROPPED - YOU'RE OFF three codes. In the first code the true 940 PRINT ' YOU HAVE CRASHED *****" ENTER G, B, A 950 PRINT "YOU WERE TRYING TO CORNER AT "; positions are reflected across a vertical ? 1,0,9 S; " M.P.H." *** WARNING - YOU HAVE SLIGHTLY OVER mirror through the centre of the map, 960 PRINT "1HE MAXIMUM SAFE SPEED FOR THIS REVVED ONCE & GOT AWAY WITH IT SECTION IS"; .1(1); " MPH." SPEED = 70 M.P.H. , TACHO = 10258 R.P.M. hence a ship actually in square 1, 6 would 970 GOTO 1090 be shown in code on the map as 8, 6. 980 PRINT "YOU HAVE SKIDDED AND LOST 25% POINT I ON THE STRAIGHT. OF YOUR SPEED" ENTER G, B, A The second code involves reflection of 990 LET S = S - S / 4 4,0,9 000 PRINT "SPEED - ";INT(10S)/10;" M.P.H. , SPEED = 101.1 M.P.B. , TACHO = 7402 R.P.M. theco-ordinatesacrossahorizontal TACHO = ";INT(R);" R.P.M." mirror through the centre of the map, 010 LET K - K + S POINT 2 SLOW FOR RH BEND. 020 IF I - 22 THEN 1060 ENTER G, B, A hence position 2,1 would be shown as 030 READ M$ ? 2,4,4 040 PRINT *** WARNING - YOUR HAVE SLIGHTLY OVER 2,8. The third code involves reflection 050 PRINT "POINT"; I; M$ REVVED ONCE AGAIN across averticalmirror followed by 060 NEXT I YOU HAVE SKIDDED AND LOST 25% OF YOUR 070 LET SI K / 22 SPEED reflection across a horizontal mirror, and 080 PRINT "LAP COMPLETED - AVERAGE SPEED SPEED = 71.5 M.P.H. , TACHO = 11055 R.P.M. WAS "; SI ; " M'P.H." corresponds to a rotation of 180 degrees 090 PRINT POINT 3 DOWNHILL STRAIGHT. about the centre point on the board. 100 PRINT "WOULD YOU LIKE ANOTHER GO? ENTER G, B, A (YES/NO)" 5,0.9 The game provides a good exercise in 110 INPUT Q$ SPEED = 96.7 M.P.H. , TACHO = 5902 R.P.M. 120 IF Q$ = "YES" THEN 1160 identifying coordinates in a two dimen- 130 IF Q$ - "NO" THEN 1510 POINT 4 KEEP GOING NOW. sional plane, and also in the reflection and 140 PRINT "REPLY '"; Q$; " ' NOT ENTER G, B, A UNDERSTOOD. PLEASE ANSWER YES OR NO" 5,0,9 rotation of coordinates. 150 GOTO 1110 SPEED - 120.7 M.P.H. , TACHO = 7364 R.P.M. 160 RESTORE The eight ships Occupy 20 or the 64 170 IF J$ <> "EXPERT" THEN 1200 POINT 5 SHARP CORNER. squares, hence the chance of hitting a ship 180 LET J$ = "NORMAL" ENTER G,B,A 190 GOTO 230 2.4,3 by firing at random is 20/64. Since you 200 PRINT "AFTER YOUR MISERABLE ATTEMPT ENGINE SEIZED WHEN YOU REACHED 12509.2 have only 25 rounds of ammunition, AT DRIVING" REVS! 210 PRINT "WOULD YOU LIKE A WOULD YOU LIKE ANOTHER GO? (YES/NO) winning the battle depends on decoding DEMONSTRATION BY AN EXPERT DRIVER ? NO (YES/NO)" JUST YOU DRIVE HOME CAREFULLY! the map very rapidly. 220 INPUT is 230 IF .1$ = "YES" THEN 1270 The computer chooses the fleet position 240 IF is = "NO" THEN 230 250 PRINT "REPLY '"; JS; " ' NOT Sink the fleet randomly, with the ships arranged along UNDERSTOOD. PLEASE ANSWER YES OR NO" horizontalorverticallines,avoiding 260 GOTO 1220 This program is based on the popular 270 PRINT "NOW WATCH A LAP BY 1. D. LEE I" game in which the users fire shells attempt- touching or intersection of ships. The code 280 LET 1$ -- "EXPERT" used for the first map is chosen randomly 290 GOTO 230 ing to sink the enemy fleet. Eight ships are 300 DATA "ON THE STRAIGHT. " by asking the player to type in the time. 310 DATA "SLOW FOR RH BEND. " hidden on an 8 x 8 grid or matrix: 320 DATA "DOWNHILL STRAIGHT. " (i) twoaircraftcarriers(eachfour At the end of a game, the player is 330 DATA "KEEP GOING NOW " asked if he would like another game using 340 DATA "SHARP CORNER. squares long) 350 DATA "CORNER-EASING UP." a different map, and if so, whether he 360 DATA "STRAIGHT AHEAD. " (ii) two battleships (each three squares 370 DATA "FAST LH BEND. long) would like the same or a different code. 380 DATA "ANCHORS ON NOW. " At any time the user can abandon the 390 DATA "ALL CLEAR. (iii) two cruisers (each two squares long) 400 DATA "TRY FOR 163 M.P.H. and game by firing a shot at the point 0, O. The 410 DATA "FAST R/H BEND. computer checks that : 420 DATA "SHORT STRAIGHT. (iv) two minesweepers (each one square 430 DATA "TAKE CARE. (i) shots are aimed only at squares on 440 DATA "DOWNHILL STRAIGHT. " long). 450 DATA "TRICKY R/H BEND. " You type the rectilinear co-ordinates the board 460 DATA "HAIRPIN. (ii) whole numbers are used for co-ordin- ates (iii) answers to questions are either YES or NO. If the fleet has not been sunk in 25 shots, you have lost the battle and the computer terminates the game.

10 DIM A(8), B(8, 8), C(8), F(8, 8), Q$(9) 20 PRINT TAB(8); "BATTLESHIPS" 30 PRINT TAB(8); " 40 LET G = I 50 PRINT 60 REM ***RANDOMIZE 70 PRINT "TIME CHECK" 80 PRINT "PLEASE TYPE THE NUMBER OF MINUTES PAST THE HOUR" 90 PRINT "THEN PRESS RETURN." 00 INPUT T 10 FOR I = I TO ABS(T) 20 LET CI = RND(0) 30 NEXT I 40 PRINT "THIS MAP OF THE ENEMY'S FLEET POSITIONS HAS BEEN CAPTURED." 50 PRINT "TRY TO DECODE THE MAP, AND USE IT IF YOU CAN." 60 PRINT 70 REM ***SET CODE 80 LET CI = INT(RND(0) * 2) 90 LET CI = 1 - CI 200 LET C2 = INT(RND(0) * 2) 210 MATF = ZER 220 MAT READ A 230 DATA I. 0. 0. I. -I, 0, 0, -1 240 REM ***SET UP THE BOARD (continued on next page)

PRACTICAL COMPUTING December 1978

4(12 Games

(continued from previous page) 250 FOR I = 8 TO 1 STEP -1 260 LET S = INT (1 + I) / 2) 270 LET X = INT(RND(0) * 8) + I 280 LET Y = INT(RND(0)* 8) + I 290 LET D = INT(RND(0) * 4) * 2 + I 300 FOR 1 = 0 TO S - I 310 IF X + 1* A(D) = 9 THEN 270 320 IF X + 1* A(D) = 0 THEN 270 330 IF Y + A(D + I) = 9 THEN 270 340 IF Y + 1* A(D + I) = 0 THEN 270 350 IF F((X + J * A(D)), (Y + 1 * A(D + I))) <> 0 THEN 270 360 NEXT 1 370 FOR = 0 TO S - 1 380 LET XI = X + 1* A(D) 390 LET YI Y + J * A(D + I) 400 FOR K = I TO 7 STEP 2 410 IF XI + A(K) = 9 THEN 460 420 IF XI + A(K) = 0 THEN 460 430 IF YI + A (K + I) = 9 THEN 460 440 IF YI + A (K + I) = 0 THEN 460 450 LET F((XI + A(K)), (YI + A (K+ I))) = -I 460 NEXT K 470 NEXT 480 FOR= 0 TO S - I 490 LET F((X + 1* A(D)), (Y + J* A(D + I))) = 500 NEXT 510 NEXT 1 520 REM ***PRINT MAP 538 FOR J = I TO 8 540 PRINT " ("; (9 - 1); ") "; 550 LET Y I = (1 * CI + CI)* (9 -J)) 560 FOR K = I TO 8 570 LET XI = (K C2 + (1 - C2) (9 - K)) 580 IF F(XI, YI) > 0 THEN 620 590 LET F(XI, YI) = 0 600 PRINT " . 610 GOTO 630 620 PRINT P(XI, YI); 630 NEXT K 640 PRINT 650 NEXT 660 PRINT 670 PRINT TAB(7); "(I) (2) (3) (4) (5) (6) (7) (8)" 680 MAT B = ZER 690 IF G >I THEN 980 700 PRINT 710 PRINT "WOULD YOU LIKE INSTRUCTIONS? TYPE YES OR NO & PRESS RETURN" 720 INPUT Q$ 730 IF Q$ = "YES" THEN 770 740 IF Q$ = "NO" THEN 990 750 PRINT "REPLY '"; Q$; " ' NOT UNDERSTOOD. PLEASE ANSWER YES OR NO" 760 GOTO 720 770 PRINT "THE MAP GIVEN MAY BE CORRECT, OR 190 IF F(X, Y) = 0 THEN 1350 730 IF F(X, Y) <= 2 THEN 1760 IN ONE OF THREE DIFFERENT" 200 IF C(F(X, Y)) < 4 THEN 1230 740 PRINT " CRUISER"; 790 PRINT "CODES. THE POSSIBLE CODES ARE:" 210 PRINT "WA KEY-WAKEY! YOU HAVE 750 RETURN 790 PRINT "(A) THE POINTS ARE REFLECTED ALREADY SUNK A"; 760 PRINT " MINESWEEPER"; ABOUT A VERTICAL LINE" 220 GOTO 1330 770 RETURN 800 PRINT "(B) THE POINTS ARE REFLECTED 230 IF B(X, Y) > 0 THEN 1320 780 END ABOUT A HORIZONTAL LINE" 240 LET B(X, Y) F(X, Y) 810 PRINT "(C) BOTH (A) & (B) ARE CARRIED OUT 250 PRINT "DIEPCT HIT ON A"; TRIAL RUN SIMULTANEOUSLY" 260 GOSUB 1670 820 PRINT "THE GRID SQUARES ARE 270 LET C(F(X, Y)) = C(F(X, Y)) + I BATTLESHIPS NUMBERED CONVENTIONALLY, WITH 280 IF C(F(X, Y)) >= 4 THEN 1370 SQUARE" 290 IFS = 25 THEN 1470 TIME CHECK 830 PRINT "I, IIN THE BOTTOM LEFT HAND 300 PRINT " - NEXT SHOT" PLEASE TYPE THE NUMBER OF MINUTES PAST THE CORNER. OTHER SQUARES ARE" 310 GOTO 1040 HOUR 840 PRINT "REFERENCED BY TYPING TWO 320 PRINT "YOU HAVE ALREADY HIT A"; THEN PRESS RETURN. NUMBERS SEPARATED BY A COMMA, TO" 330 GOSUB 1670 ? 13 850 PRINT "INDICATE THE X & Y RESPECTIVELY" 340 PRINT " AT THIS POINT." THIS MAP OF THE ENEMY'S FLEET POSITIONS HAS 860 PRINT "THE BOARD COMPRISES OF rwo 350 PRINT "MISS!"; BEEN CAPTURED. MINE SWEEPERS (I SQUARE EACH)" 360 GOTO 1290 TRY TO DECODE THE MAP, AND USE IT IF YOU 870 PRINT TAB(23); "TWO CRUISERS 370 PRINT " - AND YOU SUNK IT"; CAN.

(2 SQUARES EACH)" 380 LET L - L + I ( 8 ) . . 7 . . . 4 4 880 PRINT TAB(23); "TWO BATTLESHIPS 390 IF L < 8 THEN 1290 ( 7 ) . . 7 2 . (3 SQUARES EACH)," 400 PRINT ( 6 ) . . 7 . . 5

890 PRINT TAB(19); "AND TWO AIRCRAFT 410 PRINT ( 5 ) I . 7 . 3 . 5

CARRIERS (4 SQUARES EACH)." 420 PRINT "YOU HAVE WIPED OUT THE ( 4 ) . . . . 3 . 5 900 PRINT "WHEN INVITED TO SHOOT A SHELL, ENEMY'S FLEET"; ( 3 ) 6

YOU TYPE THE CO-ORDINATES" 430 PRINT " USING "; 5; "SHOTS" ( 2 ) . 6 . 8 8 8 8

910 PRINT "OF THE SQUARE YOU WANT TO HIT, 440 IFS > 20 THEN 1490 ( I ) . 6 ...... & THE COMPUTER WILL TELL" 450 PRINT "YOU MUST KNOW THE CODE -A (I) (2) (3) (4) (5) (6) (7) (8) 920 PRINT "YOU WHETHER YOU HAVE HIT, DIRECT HIT EVERY TIME." WOULD YOU LIKE INSTRUCTIONS? TYPE YES OR SUNK, OR MISSED A SHIP." 460 GOTO 1490 NO & PRESS RETURN 930 PRINT "TO SINK A MINE SWEEPER YOU MUST 470 PRINT "YOU HAVE USED UP YOUR 25 ?NO HIT IT ONCE, A CRUISER" ROUNDS OF AMMUNITION !" TYPE THE CO-ORDINATES FOR FIRST SHOT X,Y 940 PRINT "MUST BE HIT TWICE, A 480 PRINT "WAVE THE WHITE FLAG & BEG FOR ?, 8.8 BATTLESHIP THREE TIMES, & AN" MERCY." MISS! - NEXT SHOT 950 PRINT "AIRCRAFT CARRIER FOUR TIMES." 490 PRINT ? 8,1 960 PRINT "YOU ONLY HAVE 25 SHOTS TO SINK 500 PRINT "WOULD YOU LIKE ANOTHER GAME" MISS! - NEXT SHOT THE ENEMY FLEET" 510 INPUT Q$ 1,8 970 PRINT "TO ABANDON THE GAME TYPE IN 0,0 520 IF Q$ = "YES" THEN 1560 DIRECT HIT ON A CRUISER - NEXT SHOT WHEN INVITED TO SHOOT." 530 IF Q$ = "NO" THEN 1640 ? 2,8 980 PRINT 540 PRINT "REPLY ' "; Q$ " ' NOT DIRECT HIT ON A CRUISER -AND YOU SUNK IT - 996 LET L = 0 UNDERSTOOD. PLEASE ANSWER YES OR NO." NEXT SHOT 000 MAT READ C 550 GOTO 1510 ? 4,7 010 DATA 3, 3,2 2,I,I, 0, 0 560 RESTORE DIRECT HIT ON A MINESWEEPER - AND YOU 020 LET S 0 570 LET G = G I SUNK IT - NEXT SHOT 030 PRINT "TYPE THE CO-ORDINATES FOR FIRST 580 PRINT "WOULD YOU LIKE THE SAME CODE 8,5 SHOT X,Y" AGAIN?" DIRECT HIT ON A MINESWEEPER - AND YOU 040 INPUT X, Y 590 INPUT Q$ SUNK IT - NEXT SHOT 050 IF X <> 0 THEN 1090 600 IF Q$ = "YES" THEN 210 060 IF Y <) 0 THEN 1160 610 IF Q$ = "NO" THEN 190 070 PRINT "GAME ABANDONED" 620 PRINT "REPLY ' "; Q$; "' NOT Cars and Battleships are from a new 080 GOTO 1490 UNDERSTOOD. PLEASE ANSWER YES OR NO" 090 IF X + Y = INT(X) + INT(Y) THEN 1120 630 GOTO 1590 book, Computer Programs that Work. The 100 PRINT "DON'T CHEAT - YOU MUST USE 640 PRINT "OK - GOODBYE" book, which runs to 100 pages, contains 24 WHOLE NI MBERS. TRY AGAIN." 650 STOP 110 GOTO 1040 660 REM SUBROUTINE TO IDENTIFY TYPE OF programs in Basic. 120 IF X > 8 THEN 1160 SHIP 130 IF X 8 THEN 1160 680 PRINT "N AIRCRAFT CARRIER"; available from Sigma Technical Press, 23 150 IF Y )= I THEN 1180 690 RETURN 160 PRINT "SHOT OFF THE BOARD. TRY AGAIN." 700 IF F(X, Y) <= 4 THEN 1730 Dippons Mill Close, Tettenhall, Wolver- 170 GOTO 1040 710 PRINT " BATTLESHIP"; 180 LET S = S + I 720 RETURN hampton, West Midlands. Price £2.40.

PRACTICAL COMPUTING December 1978 47 JOHN THEODORSON knew virtually nothing about computers last February. Since then, he has taught himself to program inGADGET FREAK Basic; bought a CBM Pet and installed extensive modifications; and programmed it to deal with much of the paperwork in- volved in running his firm, TametrendHIS PET COLLEC landscape contractors. Tametrend tidies the landscape after theto signal to the operator, allowing him, of boxes connected by a jumble of cables; roadbuilders,townplanners,gravel for example, to get on with something else it springs to life when you plug it in; and diggers, and so forth have dishevelled it. during a long print run. The other is a itcan be understood and explained Theodorson runs the firm from his homejoystick,atpresentused mainlyfor without the need for a barrage of buzz- in Long Buckby, Northamptonshire. "zapping klingons", but intended for words. Downstairs, the house is full of animalsmore productive graphic usesinthe At the time, Theodorson knew very -five dogs, four cats and a cage of white little of what computers could do for budgerigars. A number of consumer by him or what he wanted from them. Since durables suggest another foible-a video then, he has learned a great deal both camera, an elaborate TV games unit, a HUGH BUSBY about computing and about the limita- radiotelephone in the car. Theodorson is, tions of the Pet. He still feels the Pet is the he admits cheerfully, a gadget freak and a ideal beginners' computer for those who man who loves pets. future. All these devices have been de-want to advance in programming rather Upstairs, in the study, is perhaps theveloped with help from Mick Hambly ofthan delve into the mysteries of elec- ultimate in both categories. Apart fromHB Computers of Kettering, who, we tronics. the extra cassette drive on top, the Petunderstand, will be offering some of them looks fairly conventional at first sight, for sale. Beginner's choice until you notice the DECwriter printer The system has developed to its present "If you put me back to square one, alongside it connected by an interface box state by a classic "suck -it -and -see" pro- knowing what I know now", he says, on the window-cill. cess. Impressed by what he had read about "then, no, I probably wouldn't buy a Pet. Open the casing and the other majormicrocomputers, Theodorson visited an As an absolute beginner, though, I still modification is revealed-a 24K memoryexhibition in February to discover whatdon't think I could have made a better board on top of the original CBM board.they could do to relieve some of thechoice". Between them, these add-ons convert thedrudgery of his own business. The Pet, ordered from the stand at the Pet from a useful beginner's computer He looked at several machines, but was exhibition, was delivered in April and into a powerful business system. impressed by what he calls the "pro- was, he thinks, the second to be installed In addition, Theodorson has added two fessionalpresentation"ofthe CBMin the U.K. The interval permitted time minor enhancements. One is a software - machine. In other words, it is a neat, self- for learning Basic and the first project, a controlled bleeper unit, which can be usedcontained unit, rather than an assortment (continued on next page) 2)9, Pets of all kinds-and they're not al computers. John Theodorson has five dogs, four cats and four budgerigars.

, Applicationsa ADDS TO TION (continued from previous page) program to deal with VAT returns, was under way rapidly. Programming seemed to take "weeks and weeks and weeks" but was probably more like two weeks. Programming the hard core of calculations was straight- forward enough and took about a day. Most of the time was spent dealing with unfamiliar problems such as data for- matting and in 'polishing' the program, improving its efficiency and adding extra facilities. At this point the limitations of the Pet began to show. The VAT program work- ed well but required all results to be copied from the visual display. Theodorson soon became disenchanted with that and started looking for a printer. The DECwriter, a 30 characters -per -second LA36, arrived from Data Design Techniques of North London in May.

Transformation Theodorson's system, showing thefor other applications, led him to think of The transformation was dramatic. The printer interface. Pet with extrafurther expansion, such as extra memory chore which used to take two -and -a -half - cassette drive, joystick and printer.and disc drives. The memory, a 24K days per quarter now takes some two -and - RAM board from Robin Bailey Associ- a -half hours and is virtually guaranteed to ates, was no problem, except that he had be error -free. to wait until August for delivery. At the same time, each new stage of With no prospect of disc drives from development seemed toreveal further CBM in the foreseeable future and noth- limitationsinthe system. One smallInside the Pet. The 24K add-on ing else available in the U.K., Theodorson problem concerned the printer. While the memory is purpose-built. At leftshopped around in the U.S. He settled Pet software recognises the printer,it finallyon aHorizonsystem,using allows only half the full range of ASCII is the bleeper unit. Shugart discs and an S-100 bus. Inter- commands to be used in addressing it. The facing it to the Pet required an IEEE to result is that lower-case characters cannot S-100adapter,availablefrom Huh be used, although they are available on ElectronicsintheU.S.,whichalso the DECwriter. CBM is circumventing the supplied the bleeper unit. problem by using an intelligent printer. Another problemisthe keyboard, Games, too which is not really suitable for the input of Despite a background as an officer in large amounts of data, particularly by a the Royal Corps of Signals, Theodorson trainedtypist.The keyboard of the claims that he is not particularly hard- DECwriter is much more suitable and the ware -orientated. "I spent all my time in the bi-directionalinterface,fromRobin army charging around in canoes", he says, Bailey Associates, allows it to be used as a "so I wound up as an administrator". replacement. All the installation work he has done so far, he points out, requires nothing more Expansion than the most basic skill with a soldering On the software side, the next problem iron, and very little of that. Building the to be tackled was payroll. Despite a adapter board for the disc drives will be relatively small staff-eight permanent the most elaborate job he has done. plus half -a -dozen subcontractors- The next software projects are sales and Theodorson found that doing it manually purchase ledgers, using a full double - occupied most of Friday, allowing for entry system, and invoicing. In addition to interruptions. its business uses, Theodorson has found Running it on the computer, of course, time to program a good deal of fun into eliminates nearly all the manual work but the Pet, and a sizeable chunk of his pro- even so is a fairly lengthy business, due to gram library consists of games programs. the speed of the tapes, the need to update Some are bought from the States, of which and copy, and the fact that a separate file his favourites are an eight -level chess has to be set up for each employee. program and a bridge program, both That, together with Theodorson's plans from Personal Software.

PRACTICAL COMPUTINGDecember 1978 49 smanumrnimmosomummra MICROCOMPUTERS

\-\

& WE CAN HELP SAVE

CASH & CARRY i YOU BOTH WITH A

i TIME IS (PET and KIM off the shell) k

MONEY... MICROCOMPUTER

OR

tI. TOTAL TURNKEY

4. II

(and everything in between)

\ Full sales and Software Advisors,

NI technical support Hardware

from our team of Demonstrators,

Systems Engineers, plus Telephone

Programmers, Emergency

Business Service and

Let us advise you as to the best system

Analysts, Fast Field

whether it be for business, industry, medi- Support. tine or education. : We can install a complete system ready to

go and easy to use.

WE ARE AGENTS & SPECIALISTS FOR

THE A -P -P -L -EII

The "BIG TEAM" for the "LITTLE COMPUTER"

hil ICROSOLVE Visit our showrooms and meet the Team -

Microsolve Computer Services DATA EFFICIENCY LIMITED

Microsense Computers Division Limited

Maxted Road Maylands Avenue 252 HaleLane, Edgware, Middx HA8 8NT Hemel Hempstead Herts HP2 7LE

Telephone: 01-958 4347 Telephone: Hemel Hempstead (0442) 41191 (3 lines)

rAmsimmummmo, Telex: 825554 DATEFF G Circle No. 134 Circle No. 135

INTERESTED COMPUTER COMPONENTS A selection of our Computer components IN HOME ascomMN Microcomputers CPU AND SUPPORT DEVICES MEMORIES Z80 cpu 14.90 2102 1K 1.20 COMPUTING? BLANK C12 Z80A cpu 20.50 21L02 1K 1.40 Start now and don't get left behind Racal Quality Z80 PIO 9.90 2101 1K 2.95 Z80 CTC 9.90 2111 1K 3.95 THE NASCOM 1is here CASSETTES 8080A cpu 7.95 2112 1K 2.95 £4.90 for 10 8212 8 Bit I/O Port 3.50 2114 4K 9.95 Ex -stock with full technical services 8214 Priority Interrupt Control 9.00 4116 16K 19.90 Plus the opportunity to join the fastest moving club of personal 8216 Bi-Directional Bus Driver 3.75 1702A 2568 5.00 8224 Clock Generator & Driver (2MHz) 3.50 2708 1K 10.90 computer users enabling you to get the most our of your 8224-4Clock Generator & Driver (4MHz) 9.95 2708 INASBUGI 13.90 computer. You can OBTAIN and EXCHANGE programs and 8226 Inverting Bi-Directional Bus Driver 3.95 2716 15V, INTEL)29.00 other software many now available 8228 System Controller & Bus Driver 7.95 8238 System Controller & Bus Driver 7.50 OTHER The Powerful Z80 8251 Programmable Communication Int 9.95 USEFUL DEVICES Microprocessor 8253 Programmable Interval Timer 18.95 Professional Keyboard 8255 Programmable Peripheral Int. 12.00 6576 char gen 10.90 8257 Prog. Direct Mem. Access Cont. 17.95 6402 UART 9.90 1 Kbyte Monitor in EPROM 8259 Programmable Interrupt Cont. 17.95 1771Floppy disk 2 Kbyte RAM (expandable) 6800 cpu 11.90 controller 49.00 Audio Cassette interface Plugs into your domestic TV Full selection of US and British Magazines and books for the Computer Hobbyist. Easy construction from straightforward instructions AT LAST A COMPUTER JOY STICK Complete with hardware which neatly packs into a stylish plastic joystick case, - no drilling or special tools plugging directly into your NASCOM PIO port with no extras. Full documen- - Just neat soldering required. tation is supplied. Each joy stock is supplied with a test routine that allows you Only £197.50 + 8% VAT (includes p & p +insurance) to draw pictures on your VDU and step routines to write your home games. Manuals seperately 3.50Monitor quality improved Plus one free game on cassette. I joystick L14.90 I pair of joy sticks C2890 includes VAT, post and packing Z80 programming Manual 6.90 TV Modulator 2.50 The NASCOM SOFTWARE USERS BOOK is being compiled;if you Z80 Technical Manual 3.40Power supply suitable for would like your program included sendittous with ans.a.e.,inreturn you will get a personal copy of the book. PIO Technical Manual 3.40 NASCOM 19.90 B BUG monitor for NASCOM users. Well worth the money. Send s.a.e. for (Allprices add8% VAT) details. E23.40 including VAT, post and packing.

All prices include VAT except where shown. Orders over £5 post and packing free otherwise -eBARCLAYCARD add 20p. Please make cheques and postal orders payable toCOMP.or phone your order quoting BARCLAYCARD or ACCESS number. 14 STATION ROAD NEW BARNET - HERTFORDSHIRE TEL: 01-441 2922 COMPUTER CLOSE TO NEW BARNET BR STATION MOORGATE LINE 01-449 6596 COMPCOMPONENTS OPEN-10am to 7pm - Monday to Saturday

Circle No. 136 50 PRACTICAL COMPUTING December 1978 WE CONTINUE our series of articles on how to program in Basic, probably the most widely- COATIEMS used programming REFACE language for small computers. l(:)PAP0NENT5 OF THE LANGUAGE 2 For the series, we have obtained the serialisation rights for t3oINPUT ScOUTPUT y EXPRESSIONS AND FUNCTIONS 15 one of the best books on the subject, Illustrating Basic by Donald Alcock. *

Each month, we are PRINT .GoTHE MOST VERSATILE INSTRUCTION 28 publishing a part of the 44 USEFUL FOR PLOTTINGCRUDE GRAPHS 32 book, so by the end of PRINTUSING4za, MORE VERSATILITY 34 the series you will have the complete book. It is written with a ctONTROL 39 distinct informality and has a rather unusual presentation; but it is '+l0 ARRAYS this style, we believe, 59 which makes it one of the most easy to read tutorials. 0a,ZATRICE5 75

13o OMPIZrE EXAMPLE PROGRAMS 101 Alcock Illustrating Basic. Chapter 2. c Cambridge 111 University Press. 0 M AN D S AND SIGNING ON Reprinted by permission. ) r./f * ILES OF DATA 119

Copies of Illustrating SYNTAX Basic can be obtained 127 from Practical Computing. JNDEY 132

PRACTICAL COMPUTING December 1978 51 CHAPTER CHAPTER t MUCHTHISIN BASIC IS THE MOSTIN INTERPRETATION VERSATILE STATEMENT FROM ONE AND ALSO ONE WHICH DIFFERS BASIC 1 PRINT A; B NOTNUMBER TOA SEMICOLON MOVE OR TEXT SIGNIFIED TELLSBEFORE THE PRINTING HEAD PRINTING THE IN THIS 1HE FOLLOWING 10 LET E$ = "EQUALS" PROGRAM PRINT5 THE SQUARE OF ANY NUMBER TO ANOTHER o THENCASE THE THE PRINTING VALUE HEAD OF B),:, RETURNSIF THERETO START ISN'T ENOUGHA COMMA ROOM ON THE TELLS THE PRINTING HEAD TO A NEW LINE o LINE 50403020 PRINT PRINT "THE "TYPE SQUARE A NUMBER" OF"; A ; ENDINPUT A AVAILABLEPRINTINGNUMBER2 PRINT OR ZONE TEXT HEAD A; B , C 15 ALREADYSIGNIFIED A AVAILABLEMOVE TO THE ZONE.SOMEWHEREONIN BEFORE THIS THE CASEFOLLOWING PRINTING IN THEZONE. VALUE THE 5 LINE OF C FIRST POSITION THEN THE NEXT IN THE NEXT IF THE THETYPERUN? SQUARE OF 4 EQUALS 4 A NUMBER 1.6 3 PRINT A; B, 15 ZONE I. BASICLISTTHEN tuCH WHAT AS ABOUT c) 7 NO THE EXCEPTION ACTS ON THE COMMA OR SEMI- FIRST ITEM IN A TI4ATLINE 4.0 SHOWS EXAMPLES OF IN THE UST FOLLOWINCa FOUR OF THE POSSIBLE THINGS COLONyOU4 HADPRINT AT THE TYPED ENDC, D OF THE. L IN THIS CASE ) g PREVIOC/S LIST 9 EXACTLY AS THOUGH * "THE SQUARE OF CAN BE PUT FIT THE LINE A WHICH GETS PRINTED EXACTLY AS TYPED A TEXT A ANY LENGTH THAT WILL THE WORD PRINT t G COLONWHAT AT THE END OF THE PREVIOUS IF THERE IS 3 PRINT A; B ,C,D NO COMMA OR SEMI- PRINTEDBUT WITHOUT J A NUMERICAL VARIABLE WHOSE NOT THE QUOTATION MARKS,. ITS NAME, VALUE GETS SEMICOLONANSWER:65 AFTERPRINT OBEYING E; F PRINT AT THE END OF A PRINT STATEMENT ITSHAVING LIST THENO COMMA PRINTING ORLIST,;:* HEAD RETURNS OR NO PREVIOUS TO LIST AT ALL 7 * A a A AN EXPRESSIONTEXTUAL WHOSE VARIABLE WHOSE VALUE TEXT GETS PRINTED GETS PRINTED BASICSTART OBEYS A NEW LINE o THE VERY FIRST YOU MAY ALSO ASSUME THIS HAPPENS BEFORE THEN BAS/CWHAT PRINTS IF PRINT STATEMENT THERE IS AN NOTHINGEMPTY ON THE UST A PRINTAND EXPRESSIONS STATEMENT MAY* HAVEA*AEt ANy :MIXTURE OF TExTS, VARIABLES AS LONG AS THE LIST WILL FIT THE LINE COMMA OR7 SEMICOLON PRINT THE PRINTING HEAD RETURNS TO START A LINE AND BECAUSE THERE IS NO VI HEABOVE)INTHEY ORARE SEPARATED FROM ONE ANOTHERZONES BY PICTURE BELOW SHOWS A PAGE. WITH 72. ASby DESCRIBED COMMAS BELOW WHICH CAUSE BASIC POSITIONS ACROSSSEMICOLONS IT, (LAS TO PRINT ITEMS MAKEHEW LINE BASIC PR/NT A BLANK LINEAS DESCRIBED ABOVE 0 ditk-- DrI SOMETHE PUNCTUATION ON EITHER SIDE OF A BASICS ALLOW YOUIN SHORT g TANS /S THE TO LEAVE OUT WAy 7D CONCEPTBOTHPOSITIONS,BASIC IN WIDTH AND OFONE. PAGE ZONE AND OF IN12 WIDTHo Ct OF ZONE 9 BUT THE DIVIDES THE PAGE INTO 4. ZONES , EACH OF 15 CHARACTER BAS/CS DIFFER GREATLY HERE HERESEMICOLON IS8 AN PRINT DEPENDING EXAMPLE. 14,SQD- ON THE SHOWINGPARTICULAR THE VERSION, USE OF COMMAS & SEMICOLONS, TEXT 4;7c ASSUMING EITHER A COMMA OR DON9T DO IT, NUMBEREDBASICS FROM NUMBER FROM IS UNIVERSAL,) L , A5 DONE BY SOME THE. CHARACTER POSITIONS ARE BASICS, INSTEAD OF BUT MANY 320010 DATA "DAYS ", T$, 28, 30,A ,31 B, C AT THE STARTNOTE OF THE COMMA ZERO 4-i.e. 0 To 71 1 TO72.4 PRPE,REAIINNDTT "JA THE LIST, CAUSING OUTPUT.PA6E.,.5N DWING,CH ARA Cr EIVOSI 7ION5 IIIIIIIIIIII 4,0GO50RUN PRT/ITEND O; "r*,, A; T*, C; T$ , 3; rr"(25 IN LEAP YEARS)" "FEB", "MAR", 'APR" A 'skip" TO SEcoN A ZONE. THE -4-ZONE /5 CHARACTERS --..-{.-zonz 2 -- /5 CHARACTERS +---ZONE3/5 cHARAC7ERS --#}-.--zovE4. -414-zoNE /5 CHARACTERS /2 CHARACTER 5 JAN 31 DAYS FEB(29 IN LEAP28 YEARS) DAIS MAR. 31 DAYS APR 30 DAYS ILLUSTRATING, BASIC PAGE 2E3 ILLUSTRATING SAW PAGE 29 CHAPTER CHAPTER t MUCHTHISIN BASIC IS THE MOSTIN INTERPRETATION VERSATILE STATEMENT FROM ONE AND ALSO ONE WHICH DIFFERS BASIC 1 PRINT A; B NOTNUMBER TOA SEMICOLON MOVE OR TEXT SIGNIFIED TELLSBEFORE THE PRINTING HEAD PRINTING THE IN THIS 1HE FOLLOWING 10 LET E$ = "EQUALS" PROGRAM PRINT5 THE SQUARE OF ANY NUMBER TO ANOTHER o THENCASE THE THE PRINTING VALUE HEAD OF B),:, RETURNSIF THERETO START ISN'T ENOUGHA COMMA ROOM ON THE TELLS THE PRINTING HEAD TO A NEW LINE o LINE 50403020 PRINT PRINT "THE "TYPE SQUARE A NUMBER" OF"; A ; ENDINPUT A AVAILABLEPRINTINGNUMBER2 PRINT OR ZONE TEXT HEAD A; B , C 15 ALREADYSIGNIFIED A AVAILABLEMOVE TO THE ZONE.SOMEWHEREONIN BEFORE THIS THE CASEFOLLOWING PRINTING IN THEZONE. VALUE THE 5 LINE OF C FIRST POSITION THEN THE NEXT IN THE NEXT IF THE THETYPERUN? SQUARE OF 4 EQUALS 4 A NUMBER 1.6 3 PRINT A; B, 15 ZONE I. BASICLISTTHEN tuCH WHAT AS ABOUT c) 7 NO THE EXCEPTION ACTS ON THE COMMA OR SEMI- FIRST ITEM IN A TI4ATLINE 4.0 SHOWS EXAMPLES OF IN THE UST FOLLOWINCa FOUR OF THE POSSIBLE THINGS COLONyOU4 HADPRINT AT THE TYPED ENDC, D OF THE. L IN THIS CASE ) g PREVIOC/S LIST 9 EXACTLY AS THOUGH * "THE SQUARE OF CAN BE PUT FIT THE LINE A WHICH GETS PRINTED EXACTLY AS TYPED A TEXT A ANY LENGTH THAT WILL THE WORD PRINT t G COLONWHAT AT THE END OF THE PREVIOUS IF THERE IS 3 PRINT A; B ,C,D NO COMMA OR SEMI- PRINTEDBUT WITHOUT J A NUMERICAL VARIABLE WHOSE NOT THE QUOTATION MARKS,. ITS NAME, VALUE GETS SEMICOLONANSWER:65 AFTERPRINT OBEYING E; F PRINT AT THE END OF A PRINT STATEMENT ITSHAVING LIST THENO COMMA PRINTING ORLIST,;:* HEAD RETURNS OR NO PREVIOUS TO LIST AT ALL 7 * A a A AN EXPRESSIONTEXTUAL WHOSE VARIABLE WHOSE VALUE TEXT GETS PRINTED GETS PRINTED BASICSTART OBEYS A NEW LINE o THE VERY FIRST YOU MAY ALSO ASSUME THIS HAPPENS BEFORE THEN BAS/CWHAT PRINTS IF PRINT STATEMENT THERE IS AN NOTHINGEMPTY ON THE UST A PRINTAND EXPRESSIONS STATEMENT MAY* HAVEA*AEt ANy :MIXTURE OF TExTS, VARIABLES AS LONG AS THE LIST WILL FIT THE LINE COMMA OR7 SEMICOLON PRINT THE PRINTING HEAD RETURNS TO START A LINE AND BECAUSE THERE IS NO VI HEABOVE)INTHEY ORARE SEPARATED FROM ONE ANOTHERZONES BY PICTURE BELOW SHOWS A PAGE. WITH 72. ASby DESCRIBED COMMAS BELOW WHICH CAUSE BASIC POSITIONS ACROSSSEMICOLONS IT, (LAS TO PRINT ITEMS MAKEHEW LINE BASIC PR/NT A BLANK LINEAS DESCRIBED ABOVE 0 ditk-- DrI SOMETHE PUNCTUATION ON EITHER SIDE OF A BASICS ALLOW YOUIN SHORT g TANS /S THE TO LEAVE OUT WAy 7D CONCEPTBOTHPOSITIONS,BASIC IN WIDTH AND OFONE. PAGE ZONE AND OF IN12 WIDTHo Ct OF ZONE 9 BUT THE DIVIDES THE PAGE INTO 4. ZONES , EACH OF 15 CHARACTER BAS/CS DIFFER GREATLY HERE HERESEMICOLON IS8 AN PRINT DEPENDING EXAMPLE. 14,SQD- ON THE SHOWINGPARTICULAR THE VERSION, USE OF COMMAS & SEMICOLONS, TEXT 4;7c ASSUMING EITHER A COMMA OR DON9T DO IT, NUMBEREDBASICS FROM NUMBER FROM IS UNIVERSAL,) L , A5 DONE BY SOME THE. CHARACTER POSITIONS ARE BASICS, INSTEAD OF BUT MANY 320010 DATA "DAYS ", T$, 28, 30,A ,31 B, C AT THE STARTNOTE OF THE COMMA ZERO 4-i.e. 0 To 71 1 TO72.4 PRPE,REAIINNDTT "JA THE LIST, CAUSING OUTPUT.PA6E.,.5N DWING,CH ARA Cr EIVOSI 7ION5 IIIIIIIIIIII 4,0GO50RUN PRT/ITEND O; "r*,, A; T*, C; T$ , 3; rr"(25 IN LEAP YEARS)" "FEB", "MAR", 'APR" A 'skip" TO SEcoN A ZONE. THE -4-ZONE /5 CHARACTERS --..-{.-zonz 2 -- /5 CHARACTERS +---ZONE3/5 cHARAC7ERS --#}-.--zovE4. -414-zoNE /5 CHARACTERS /2 CHARACTER 5 JAN 31 DAYS FEB(29 IN LEAP28 YEARS) DAIS MAR. 31 DAYS APR 30 DAYS ILLUSTRATING, BASIC PAGE 2E3 ILLUSTRATING SAW PAGE 29 s WHY DOES BASIC PRINT ,LOSTWITHOUT BASICS ADDING PRINT TRAILINGTEXTS AND SPACES TEXTUALAND VARIABLES WITHOUT STRIPPING cHAPTgR AND NOT eeTHE SQUAREREMEMBERING OF 4.00000 BASIC DOES ARITHMETIC TO AT LEAST 6 FIGURES ) COATIMOE D EQUALS THE SQUARE 0FlUALSA 16,0000 INTERESTED IN " TRAILING SPACES110100 FROM THE TEXTS 'THEMSELVES DATAREAD "CATCH" , "DALMATIANS " D$ ,a WIDTH"TRAILINGTHE ANSWER ZEROS IS THAT " o BASIC ASSUMES YOU ARE NOT AND STYLE OF BASIC TAKESPRINTED OTHER NUMBERS DECISIONS AS ABOUTEXPLAINED THE BELOWc, 140130120 DATAPRINT C45; C READ 22 .00 C , , D;D 1.01E2 D$ OF SIX DIGITS 2010FOR PRINTLET LESS A THEN= 654321 B71S/C APRINTS NUMBER IT AS CAN AN BE INTEGER ACCURATELY o EXPRESSED AS AN INTEGER A ; -A RUN170160150 PRINTPRINT Cs; -O END 8; 5$ ,------",,-....,---..--....-...------.----...... 30 PRINTF A NUMBER 15 IT IN 0.00 ; SMALLER 20.0;A NEARER 20.00002 TO ZERO) THAN 0.1 BASIC CATCHCATC-8.221 -22A v39A STEPS 101ADALMATIANS 39A STEPS -101ADALMATIANS PRINTPRINTBEFOREPRINTS THE DECIMAL POINT AND FIVE AFTER 9 ALL SIX E -FORM oDIGITS AFTER THE POINTo MOST BASICS PLUS OR MINUS SIGN PRINT ONETHEN DIGIT MOST 8,48/CS BUT SOME FOLLOWED ZONE I ZONE 2 --o+--ZovE 3 -4-1-4-z cwr 4 --0-4-ZOAV 5 -1.-1 BY TWO DIG ITS40 50PRINT PRINT AN E FOLLOWED By A A/10f0. 7 060; ; FOR THE EXPONENT o --A 0. / 000610 f 9 76.00000E+021v6.54321E-03,-6.54321E-4. -6.00000S-4, THREE.TOTYPEVERSIONS SEE AND CHARACTER RUN THAT THE PCSITIONSMAKE THE LENGTH OF EVERY NUMBER A MULTIPLE OF IF yOUR VERSION OF BAS/C BEHAVES DIFFERENTLYo FROM PROGRAM ABOVE (1 FROM LINE 10 TO LINE 170) THE OUTPUT WOULD BE BASIC ALSO PRINTS BIG NUMBERS 106 AND BIGGER 1) ,6.54121E+07 A-6.54321E+2A, IN E -FORM CATCHCATCH,2212,,, -22,,,t, .7398STEPS,101A 4D A LMATIAN5 -10 fkADALMATIANS v39A STEPS BASIC 90 80PRINT PRINT PRINTS NUMBERS BETWEEN 0.1 AND 106 -A/1000A/10 ; -A/100 ; A/I 00000 ,65432.1,--6543.2I-654.321,7.654321 IN DECIMAL FORM, isV IS WHAT NEGATIVEPRINTS 9 BASIC DOES WHENA MINUS PRINTING SIGN OTHERWISE A SPACE ; IF THE. NUMBER A NUMBER IS # THENA DECIMALPRECISIONTHEN NUMBER DEPENDING ON SIZE AND PRINTS PRINTS AS AN INTE6ER ORONEEXPLAINED ABOVE ; TRAILING SPACE MI E -FORM OR MULTIPLESPACESSOME SAS/CS OF TO THREE MAKE THEN THE : ADD TOTAL TWO NUMBER OR ONEA OF OR NO OTHERS ALWAYS PRINT TWO TRAILING SPACE.3 9 PRINTED CHARACTERS FURTHER TRAILING LLUSFRATiN G BASK PAGE 30 ILLUSTRATING BASIC PAGE 31 s WHY DOES BASIC PRINT ,LOSTWITHOUT BASICS ADDING PRINT TRAILINGTEXTS AND SPACES TEXTUALAND VARIABLES WITHOUT STRIPPING cHAPTgR AND NOT eeTHE SQUAREREMEMBERING OF 4.00000 BASIC DOES ARITHMETIC TO AT LEAST 6 FIGURES ) COATIMOE D EQUALS THE SQUARE 0FlUALSA 16,0000 INTERESTED IN " TRAILING SPACES110100 FROM THE TEXTS 'THEMSELVES DATAREAD "CATCH" , "DALMATIANS " D$ ,a WIDTH"TRAILINGTHE ANSWER ZEROS IS THAT " o BASIC ASSUMES YOU ARE NOT AND STYLE OF BASIC TAKESPRINTED OTHER NUMBERS DECISIONS AS ABOUTEXPLAINED THE BELOWc, 140130120 DATAPRINT C45; C READ 22 .00 C , , D;D 1.01E2 D$ OF SIX DIGITS 2010FOR PRINTLET LESS A THEN= 654321 B71S/C APRINTS NUMBER IT AS CAN AN BE INTEGER ACCURATELY o EXPRESSED AS AN INTEGER A ; -A RUN170160150 PRINTPRINT Cs; -O END 8; 5$ ,------",,-....,---..--....-...------.----...... 30 PRINTF A NUMBER 15 IT IN 0.00 ; SMALLER 20.0;A NEARER 20.00002 TO ZERO) THAN 0.1 BASIC CATCHCATC-8.221 -22A v39A STEPS 101ADALMATIANS 39A STEPS -101ADALMATIANS PRINTPRINTBEFOREPRINTS THE DECIMAL POINT AND FIVE AFTER 9 ALL SIX E -FORM oDIGITS AFTER THE POINTo MOST BASICS PLUS OR MINUS SIGN PRINT ONETHEN DIGIT MOST 8,48/CS BUT SOME FOLLOWED ZONE I ZONE 2 --o+--ZovE 3 -4-1-4-z cwr 4 --0-4-ZOAV 5 -1.-1 BY TWO DIG ITS40 50PRINT PRINT AN E FOLLOWED By A A/10f0. 7 060; ; FOR THE EXPONENT o --A 0. / 000610 f 9 76.00000E+021v6.54321E-03,-6.54321E-4. -6.00000S-4, THREE.TOTYPEVERSIONS SEE AND CHARACTER RUN THAT THE PCSITIONSMAKE THE LENGTH OF EVERY NUMBER A MULTIPLE OF IF yOUR VERSION OF BAS/C BEHAVES DIFFERENTLYo FROM PROGRAM ABOVE (1 FROM LINE 10 TO LINE 170) THE OUTPUT WOULD BE BASIC ALSO PRINTS BIG NUMBERS 106 AND BIGGER 1) ,6.54121E+07 A-6.54321E+2A, IN E -FORM CATCHCATCH,2212,,, -22,,,t, .7398STEPS,101A 4D A LMATIAN5 -10 fkADALMATIANS v39A STEPS BASIC 90 80PRINT PRINT PRINTS NUMBERS BETWEEN 0.1 AND 106 -A/1000A/10 ; -A/100 ; A/I 00000 ,65432.1,--6543.2I-654.321,7.654321 IN DECIMAL FORM, isV IS WHAT NEGATIVEPRINTS 9 BASIC DOES WHENA MINUS PRINTING SIGN OTHERWISE A SPACE ; IF THE. NUMBER A NUMBER IS # THENA DECIMALPRECISIONTHEN NUMBER DEPENDING ON SIZE AND PRINTS PRINTS AS AN INTE6ER ORONEEXPLAINED ABOVE ; TRAILING SPACE MI E -FORM OR MULTIPLESPACESSOME SAS/CS OF TO THREE MAKE THEN THE : ADD TOTAL TWO NUMBER OR ONEA OF OR NO OTHERS ALWAYS PRINT TWO TRAILING SPACE.3 9 PRINTED CHARACTERS FURTHER TRAILING LLUSFRATiN G BASK PAGE 30 ILLUSTRATING BASIC PAGE 31 cHAPTER HAPTER MOSTFUNCTION BASICS WHICH HAVE THEMAY TABBE THEFUNCTIONPC6ITION PAGEIF izo THE PRINTINGEVALUATED HEAD PIAS OR IF THE EVALUATED POSITION By THE APPROPRIATE TAB ALREADY PASSED THE 15 OFF VO VARY THE LAYOUT OF RESULTS UNDER CONrROL A' A PROGRAM TAB FUNCTIONS 4 USEDIN THE WITH LIST THAT FOLLOWS.14VCit THE THEDONPTACTIONS EXPRESSIONS RELY ON RIGHT USUALLY RESULTING DIFFERENT BASICS TAKE DIFFERENTSPECIFIC INTERPRETATIONS; GET IN MESSY oUTpur0 YOUWORD MAY PRINT PUT co 10 PRINT 'GIVE ME A VALUE FOR A" ) SIMPLEITTAB( MAy THE) NOT EXPRESSION: BE COMBINED IN MUST STAND ALONE AS AN ITEM IN AN EXPRESSION HOWEVER THE LIST; X 3020 PRINTINPUT TAB(A); A "MAN"; TAB (2*A) ; " EATING" ; TAB(3*A+5) ; 100 PRINT 4AB(A*6); ?GIVERUN40 3 ME A VALUE FOR A END rise LETSPAGETAB()PAGE. X TAKE 48 IS USEFULFOR AN FOR EXAMPLE PLOTTING OF CRUDE THIS WE WHICH EXPLAINS WHY STATEMENT 30SUCCESSIVE VALUES OF HAVE TO ANTICIPATEGRAPHS ON THE OUTPUT BELOW RUNGIVE ME A VALUE FORMANEATING A FISH 1510 PRINT PRINT "THE" GRAPH OF COSINE(X)IN STEPS FOR OF x 15 - o DEGREES" TO 180'; 0,15,30 etc. to 18o0 ? 5 MAN EATING FISH (30 FOR504o20 PRINT LET PC =X INT(soCO3(X = ** ABS(C)+.5)3.141592" X"; / 190)* SGN(C) 0 TO TAB(62);"Co5(x)" 180 STEP 15 CONVERT TO RAO/ANS& GET COS/NE 30 C05(0) AS STALED TO PR(Nr PostrfoN5 C AFTER THE WORD PRINTQ TAB FUNCTION ONLY MAKES SENSE AS AN ITEM IN A LIST you MAY PUT A VARIABLE OR 807060 ENDNEXT X PRINT X; TAB(P + 36); "*" VERTICAL36 AX/8 /5 OFFSET POS/ T OF PAGE IONS 70 MIDDLE ROUNDED 70 ME NEAREST FOS/T(0N BYANDEXPRESSION MOVES THE PRINTING HEAD TO THETHE CHARACTER RESULT., POSITION GIVEN INSIDE THE BRACKETS ; BASIC WORKS OUT 1T5 THERE ARE SOME TRICKY RANTS 70 WATCH WHEN VALUE THERUN GRAPHX OF COSINE(X) FOR X = 0 TO 180 IN STEPS OF /5 DEGREES USING TAB: BUTSOME MANY BASICS NUMBER THEM FROM ZERO., BA5iCs NUMBER CHARACTER POSITIONS FROM 1 (jPAGE28) you 30015 * cosoo CANFROM MAKE 1 AND PROGRAMS NEVER USING "PORTABLE" POSITIONS GREATER THAN 71 c, USE BY ALWAYS NUMBERING 604575 * SOME BASICS INTEGRALOFINTEGRAL THE EXPRESSION PART. WHEREAS MANY BASICS TAKE THE RESULT USEIF YOURINT TO FUNCTION ENSURETHE COULD THE NEAREST RESULT YIELD INTEGER A youNON - TO THE RESULT 90120105 INTEND.SOME BASICS DISREGARD THE PUNCTUATION MARK FOLLOWING e.g. ;TAB( INT (P/3 + 5) ); IS TREATED THE SAME WAY AS 180165150135 * MOVINGT.AB(6),ASA TAB( AN THE 4c:sERROR ) 4;:o.e.y.TAB(6); PRINTING ; HEAD TO THE NEAT ZONE. 0 BUT OTHERS TREAT YET OTHERS ACT ON SUCH A COMMA By A COMMA AFTER TAB SO ILLUSTRATING,BASIC PAGE 3Z ALWAYS USE SEMICOLONS AFTER TAN( ); ILLUSTRATING BASIC PAGE" 33 cHAPTER HAPTER MOSTFUNCTION BASICS WHICH HAVE THEMAY TABBE THEFUNCTIONPC6ITION PAGEIF izo THE PRINTINGEVALUATED HEAD PIAS OR IF THE EVALUATED POSITION By THE APPROPRIATE TAB ALREADY PASSED THE 15 OFF VO VARY THE LAYOUT OF RESULTS UNDER CONrROL A' A PROGRAM TAB FUNCTIONS 4 USEDIN THE WITH LIST THAT FOLLOWS.14VCit THE THEDONPTACTIONS EXPRESSIONS RELY ON RIGHT USUALLY RESULTING DIFFERENT BASICS TAKE DIFFERENTSPECIFIC INTERPRETATIONS; GET IN MESSY oUTpur0 YOUWORD MAY PRINT PUT co 10 PRINT 'GIVE ME A VALUE FOR A" ) SIMPLEITTAB( MAy THE) NOT EXPRESSION: BE COMBINED IN MUST STAND ALONE AS AN ITEM IN AN EXPRESSION HOWEVER THE LIST; X 3020 PRINTINPUT TAB(A); A "MAN"; TAB (2*A) ; " EATING" ; TAB(3*A+5) ; 100 PRINT 4AB(A*6); ?GIVERUN40 3 ME A VALUE FOR A END rise LETSPAGETAB()PAGE. X TAKE 48 IS USEFULFOR AN FOR EXAMPLE PLOTTING OF CRUDE THIS WE WHICH EXPLAINS WHY STATEMENT 30SUCCESSIVE VALUES OF HAVE TO ANTICIPATEGRAPHS ON THE OUTPUT BELOW RUNGIVE ME A VALUE FORMANEATING A FISH 1510 PRINT PRINT "THE" GRAPH OF COSINE(X)IN STEPS FOR OF x 15 - o DEGREES" TO 180'; 0,15,30 etc. to 18o0 ? 5 MAN EATING FISH (30 FOR504o20 PRINT LET PC =X INT(soCO3(X = ** ABS(C)+.5)3.141592" X"; / 190)* SGN(C) 0 TO TAB(62);"Co5(x)" 180 STEP 15 CONVERT TO RAO/ANS& GET COS/NE 30 C05(0) AS STALED TO PR(Nr PostrfoN5 C AFTER THE WORD PRINTQ TAB FUNCTION ONLY MAKES SENSE AS AN ITEM IN A LIST you MAY PUT A VARIABLE OR 807060 ENDNEXT X PRINT X; TAB(P + 36); "*" VERTICAL36 AX/8 /5 OFFSET POS/ T OF PAGE IONS 70 MIDDLE ROUNDED 70 ME NEAREST FOS/T(0N BYANDEXPRESSION MOVES THE PRINTING HEAD TO THETHE CHARACTER RESULT., POSITION GIVEN INSIDE THE BRACKETS ; BASIC WORKS OUT 1T5 THERE ARE SOME TRICKY RANTS 70 WATCH WHEN VALUE THERUN GRAPHX OF COSINE(X) FOR X = 0 TO 180 IN STEPS OF /5 DEGREES USING TAB: BUTSOME MANY BASICS NUMBER THEM FROM ZERO., BA5iCs NUMBER CHARACTER POSITIONS FROM 1 (jPAGE28) you 30015 * cosoo CANFROM MAKE 1 AND PROGRAMS NEVER USING "PORTABLE" POSITIONS GREATER THAN 71 c, USE BY ALWAYS NUMBERING 604575 * SOME BASICS INTEGRALOFINTEGRAL THE EXPRESSION PART. WHEREAS MANY BASICS TAKE THE RESULT USEIF YOURINT TO FUNCTION ENSURETHE COULD THE NEAREST RESULT YIELD INTEGER A youNON - TO THE RESULT 90120105 INTEND.SOME BASICS DISREGARD THE PUNCTUATION MARK FOLLOWING e.g. ;TAB( INT (P/3 + 5) ); IS TREATED THE SAME WAY AS 180165150135 * MOVINGT.AB(6),ASA TAB( AN THE 4c:sERROR ) 4;:o.e.y.TAB(6); PRINTING ; HEAD TO THE NEAT ZONE. 0 BUT OTHERS TREAT YET OTHERS ACT ON SUCH A COMMA By A COMMA AFTER TAB SO ILLUSTRATING,BASIC PAGE 3Z ALWAYS USE SEMICOLONS AFTER TAN( ); ILLUSTRATING BASIC PAGE" 33 CHAPTER ti CHAPTER. 51. THISNOT EVERYSTATEMENT BAS/C HAS aF THE PROGRAM COMPUTES NUMBERS TOO BIG TO FIT T IT IS A DEVICE FOR BUILDING IMAGES OF AMONGDETAILED THOSE RULES THETHAT VARY DESIRED DO, OUTPUT, MOULDMOULDS WITH THEN ASTERISKS BASIC OBJECTS o SOME BY THISSTOPPING MOULD CAN COPE WITH POSITIVE NUMBERS a SOME BY CHANGING OR EXTENDINGEXECUTION THE ALTOGETHER SOME BASICS BY FILLING 4010 30:20ENDLET PRINT ####GuILDERS! G=1000.00 USING 30 con,,G G/20 TAKE #-#! 4=1 L/57-57-ARTMGWITNA COMMA NECESSARY.NO HARM AS -99.99999###.## 99 ,;;;t DONE BY MAK/NG AS BIG BIG AS AS 999. -99.99 99 AND NEGATIVE NUMBERS THE MOULDS LOOSER THAN STRICTLY 'SHE PRINT USING RUN1000 GUILDERS!STATEMENT COME, POINTS TAKE 50! TO ANOTHER LINE OF THE 5: INTEGRAL1510 PRINT USING## 5 LET A = 9.999 DECIMAL ### ## BASICBASICTOMOULDS LEFT:FILLS FILLS FROM INTEGER DECIMAL RIGHT # ### CORRESPONDINGEACHTHISPROGRAM MOULD DETERMINES THE PLACE AND SHAPE IMAGE MAy CONTAIN MOULDS HOLDING AN IMAGE OF WHAT IS TO BE ITEM IN (1 USUALLY CALLED FORMATS )0 OF ITS PRINTED INTEGRALRUN20 9 END DECIMAL 10. 00/N7EGRAL PARTOF 9.99.9 ,A,A PoINTMOULDS OUTWARDS FROM THE 4=0 a=i> #`4# BE4-1FTERLINE ANYWHEREc, OF THE PROGRAM WORDS IN THE WHERE"PRINT PROGRAM THE ANDIMAGE SEVERAL PRINT STATEMENTS THE PRINT LISTUSING" TYPE THE. NUMBER OFIS THE TO BE FOUND 0aTHIS MAy WHEN PRINTED MOULDBASICMOULD, PUTS TO THE THE NUMBER INTEGRAL OF PART PLACES OF SIGNIFIEDA NUMBER BAS/C /`ROUNDS' A NUMBER DESTINED FOR A DECIMAL 0 INTO ### AN INTEGER RETURNSTYPEMAyOF USE VARIABLES A COMMAIT AT.) OR EXPRESSIONS THEN TYPE THE END OF START A SEPARATEDCOMMATHE f WHICH LIST ; By LINE THE COMMAS STARTSPRINTING A HEADDON'T LIST OFFERS3F ME MORE PRINT ITEMS LIST 2010 PRINT:4s' USING BARLEY 10 LOAVES & ## SMALL FISHES p STATEMENTPRINTINGPRINT USING AUTOMATICALLYHEAD XE3 ler TO IS OBEYEDSTATEMENT ; HAS BEEN OBEYED 0 ITSTART A NEW LINE BEFORE STAYSSUCH WHERE A A NEW IT WAS LEFT By THE CONVERSELY WHENTHE A BASICCANTHAN DIGEST USES THE THEIMAGE THEN RUN30 END ,5,2,10, 4, 20 THENPREVIOUS TYPE `PRINT" OROR "PRINT THE IMAGE LINE : EXACTLY WHAT TYPE you WANT THE COMPUTERUSING", TO A COLON AFTER THE LINE NUMBER, PRINT CONSUMEDUNTILANDIMAGE AGAIN THE AGAIN LIST szip s. IS 2010 BARLEY LOAVESLOAVES5 BARLEY & & LOAVES4 SMALL & FISHES 2 SMALL FISHES ,;:sPOINTWANTMOULD FOR THE SHAPE OF BUT REPRESENT EACH DIGITINSIDEA By THE46 MOULD , DECIMAL POINT PRINTED THEN THE PRINTED NUMBER IN ORDER TO FIX PUT A DECIMAL IF A you FRUSTRATEDTOOTHIS EXAMPLEFEW ITEMS ALSO FOR SHOWS THE IMAGE WHAT HAPPENS WHEN THE LIST OFFERS MOULD 0 THE RULES ARE. THE SAME FOR NEARLY ALL PRINTING STOPS AT THE FIRST 302010:FL ENDPRINT #### USING ##: COME, 10 TAKE FL#####! , 1000,50 PL /s THE f DEMANDSTHESEA ARETHE FORMSOPTIONAL SHOWN FACILITIES HERE:AT LEAST ONE, HOWEVER VERSIONS of BAS/C THAT OFFER PRINT USING. , 110100 PRINTLET AS= USING "ANS A ## #11 ,X t N.C.C. "STANDARD BASIC" SAYS A COLON: IT WOULD BE MUCH NICER THAN A COMMA BAS/CTHE TOFACILITIES ANOTHERIN SEVERAL & RULESTHAN THOSE OVERLEAF BASICS ARE MORE VARIABLE FROM ONE c, EXPLAINED SO FAR 100 PRINT USING HANS-##46",X FOR THE ILLUSTRATING BASIC BUT I NAVE PAGESTILL TO MID A BAS/C 34 - THAT ALLOWS A COLON SAKE OF "PORTABILITY" IT WOULD BE BEST TO AVOID THOSE. ILLUSTRATIN4 BASIC PACE OVERLEAF. CHAPTER ti CHAPTER. 51. THISNOT EVERYSTATEMENT BAS/C HAS aF THE PROGRAM COMPUTES NUMBERS TOO BIG TO FIT T IT IS A DEVICE FOR BUILDING IMAGES OF AMONGDETAILED THOSE RULES THETHAT VARY DESIRED DO, OUTPUT, MOULDMOULDS WITH THEN ASTERISKS BASIC OBJECTS o SOME BY THISSTOPPING MOULD CAN COPE WITH POSITIVE NUMBERS a SOME BY CHANGING OR EXTENDINGEXECUTION THE ALTOGETHER SOME BASICS BY FILLING 4010 30:20ENDLET PRINT ####GuILDERS! G=1000.00 USING 30 con,,G G/20 TAKE #-#! 4=1 L/57-57-ARTMGWITNA COMMA NECESSARY.NO HARM AS -99.99999###.## 99 ,;;;t DONE BY MAK/NG AS BIG BIG AS AS 999. -99.99 99 AND NEGATIVE NUMBERS THE MOULDS LOOSER THAN STRICTLY 'SHE PRINT USING RUN1000 GUILDERS!STATEMENT COME, POINTS TAKE 50! TO ANOTHER LINE OF THE 5: INTEGRAL1510 PRINT USING## 5 LET A = 9.999 DECIMAL ### ## BASICBASICTOMOULDS LEFT:FILLS FILLS FROM INTEGER DECIMAL RIGHT # ### CORRESPONDINGEACHTHISPROGRAM MOULD DETERMINES THE PLACE AND SHAPE IMAGE MAy CONTAIN MOULDS HOLDING AN IMAGE OF WHAT IS TO BE ITEM IN (1 USUALLY CALLED FORMATS )0 OF ITS PRINTED INTEGRALRUN20 9 END DECIMAL 10. 00/N7EGRAL PARTOF 9.99.9 ,A,A PoINTMOULDS OUTWARDS FROM THE 4=0 a=i> #`4# BE4-1FTERLINE ANYWHEREc, OF THE PROGRAM WORDS IN THE WHERE"PRINT PROGRAM THE ANDIMAGE SEVERAL PRINT STATEMENTS THE PRINT LISTUSING" TYPE THE. NUMBER OFIS THE TO BE FOUND 0aTHIS MAy WHEN PRINTED MOULDBASICMOULD, PUTS TO THE THE NUMBER INTEGRAL OF PART PLACES OF SIGNIFIEDA NUMBER BAS/C /`ROUNDS' A NUMBER DESTINED FOR A DECIMAL 0 INTO ### AN INTEGER RETURNSTYPEMAyOF USE VARIABLES A COMMAIT AT.) OR EXPRESSIONS THEN TYPE THE END OF START A SEPARATEDCOMMATHE f WHICH LIST ; By LINE THE COMMAS STARTSPRINTING A HEADDON'T LIST OFFERS3F ME MORE PRINT ITEMS LIST 2010 PRINT:4s' USING BARLEY 10 LOAVES & ## SMALL FISHES p STATEMENTPRINTINGPRINT USING AUTOMATICALLYHEAD XE3 ler TO IS OBEYEDSTATEMENT ; HAS BEEN OBEYED 0 ITSTART A NEW LINE BEFORE STAYSSUCH WHERE A A NEW IT WAS LEFT By THE CONVERSELY WHENTHE A BASICCANTHAN DIGEST USES THE THEIMAGE THEN RUN30 END ,5,2,10, 4, 20 THENPREVIOUS TYPE `PRINT" OROR "PRINT THE IMAGE LINE : EXACTLY WHAT TYPE you WANT THE COMPUTERUSING", TO A COLON AFTER THE LINE NUMBER, PRINT CONSUMEDUNTILANDIMAGE AGAIN THE AGAIN LIST szip s. IS 2010 BARLEY LOAVESLOAVES5 BARLEY & & LOAVES4 SMALL & FISHES 2 SMALL FISHES ,;:sPOINTWANTMOULD FOR THE SHAPE OF BUT REPRESENT EACH DIGITINSIDEA By THE46 MOULD , DECIMAL POINT PRINTED THEN THE PRINTED NUMBER IN ORDER TO FIX PUT A DECIMAL IF A you FRUSTRATEDTOOTHIS EXAMPLEFEW ITEMS ALSO FOR SHOWS THE IMAGE WHAT HAPPENS WHEN THE LIST OFFERS MOULD 0 THE RULES ARE. THE SAME FOR NEARLY ALL PRINTING STOPS AT THE FIRST 302010:FL ENDPRINT #### USING ##: COME, 10 TAKE FL#####! , 1000,50 PL /s THE f DEMANDSTHESEA ARETHE FORMSOPTIONAL SHOWN FACILITIES HERE:AT LEAST ONE, HOWEVER VERSIONS of BAS/C THAT OFFER PRINT USING. , 110100 PRINTLET AS= USING "ANS A ## #11 ,X t N.C.C. "STANDARD BASIC" SAYS A COLON: IT WOULD BE MUCH NICER THAN A COMMA BAS/CTHE TOFACILITIES ANOTHERIN SEVERAL & RULESTHAN THOSE OVERLEAF BASICS ARE MORE VARIABLE FROM ONE c, EXPLAINED SO FAR 100 PRINT USING HANS-##46",X FOR THE ILLUSTRATING BASIC BUT I NAVE PAGESTILL TO MID A BAS/C 34 - THAT ALLOWS A COLON SAKE OF "PORTABILITY" IT WOULD BE BEST TO AVOID THOSE. ILLUSTRATIN4 BASIC PACE OVERLEAF. cHAPTEK CHAPTER tJa COSTMOKO VARIABLE5e,ir 15IN MOST BASICS POSSIBLE THESE ARE TO MAKE MOULDSOFFERING FOR EXTREMELY USEFUL PRINT USING TEXTUAL. 1Z:if( BYONEyou ADDING CAN VERSION MAKE MOULDSOF BASIC FOR PRINTING NUMBERS IN UP-ARROWS TD THE NUMBER OF ARROWSA DECIMAL 15 MOULD* AND SOME BASICS FORE -FORM ANy 102.0 REM BUT UNFORTUNATELYCOMMON START THEIR DETAILS DIFFER 4 USE.FIXED AN : IN EXCLAMATIONSOME FOUR; INMARK OTHERS FIVE IN PLACE OF AN ARROW Do 30 LET 'Ili=B$.- "TO' "5E" THERETO RESERVE A POSITION-34.5600 FOR THE SIGN MUST BE AT LEAST ONE # BEFORE * #4 Mt THE DECIMAL FoiNT 4060 REMPRINT USING 50 COMMON ENDING ,T$,B$,T4,B$ 20:10 :***A TITLE*** AiAyIN SOME HAVE BASICS you AN EMPTY EVEN DIFFERENT LINES RUN70 END 50 FOR DIFFERENT RUN5040BO END PRINTPRINT USING 1020 AN EMPTyPRINT IMAGELIST THESEEASIER THINGS DONE ARE By IMAGEILLUSTRATED BELOW,' IS SHOWN IMMEDIATELY BELOW THAT THE RESULT PRODUCED BY USING EACH VERSIONS OF BASIC ARE IMAGE 9 ***A TITLE*** wirwour PRINT THE USINGO;) LEFT50: TO##FILLED glair ### FROM OR NOT #.# # TO BE OR NOT TO THETRUNCATION RONT /A 7Ex7 7D0 LONG FOR MOULD re. SOME BASICS ALLOW CURRENCY SIGNS IN THE MOULD,. 23.4561.234 $345.68 423.46$1.23 50: 'LL L's SAY TO 'RRR OR NOT BE OR NOT R's SAY 'CCC TO C§ SAY ASTERISKSTHETHE LEFT. CURRENCY SIGN 345.678 SOME BASICS PERFORM THE SAME TRICK WITH (I POSSIBLY og IN THE U.K. 'FLOATS' TO 50: \ \ Justify LEFT JUSTIFY RIGHT OR NOT CENTRALIZE CHARACTER.FOR SNELL OFSOME THE MOULD + SAYS BASICS ALLOW 'PRINT A PLUS SIGN IN FRONT OF THE e.g. + 4-#7;e.# A PLUS OR MINUS SIGN IN FRONT AND -### TO \\BE OR. NOT ARESPACESIS SIENIF/CANTFILLED FROM p LEFT ro \ 8E ToweEFF AND . THE MOULD - SAYS 'PRINT A SPACESIGNNUMBER IF IF NEGATIVE" IT IS POSITIVE ; IN FRONT OF THE A MINUS 50: <# 0 <#BE OROR NOT NOT >#### N.C.C.8/1.57C".DNS "STANDARD ONE IS IT IS NOT ALWAYS CLEAR FROM THE. MANUALS WHETHER THIS NUMBERSIGN IF IF NEGATIVE" IT IS POSITIVE A MINUS ToLEFT 0 TRUNCATE SAYS Jumpy -'2` t/VC.0.FACILITY CAN BE USED IN CONJUNCTION WITH THE CURRENCY .SIGN* "STANDARD BASic REQUIRES A sioN IN FRONT OF THE MOULD. EVENMERE BADMAY STANDARDSBE WOULD BE BETTER THAN NONE AT ALL* MORE WAYS YET s WHY CAN9T WE STANDARDIZE ILL-uSiP-AT1Nc I3A Sic PAcE 36 ILLUSTRATING BASIC PAGE 37 cHAPTEK CHAPTER tJa COSTMOKO VARIABLE5e,ir 15IN MOST BASICS POSSIBLE THESE ARE TO MAKE MOULDSOFFERING FOR EXTREMELY USEFUL PRINT USING TEXTUAL. 1Z:if( BYONEyou ADDING CAN VERSION MAKE MOULDSOF BASIC FOR PRINTING NUMBERS IN UP-ARROWS TD THE NUMBER OF ARROWSA DECIMAL 15 MOULD* AND SOME BASICS FORE -FORM ANy 102.0 REM BUT UNFORTUNATELYCOMMON START THEIR DETAILS DIFFER 4 USE.FIXED AN : IN EXCLAMATIONSOME FOUR; INMARK OTHERS FIVE IN PLACE OF AN ARROW Do 30 LET 'Ili=B$.- "TO' "5E" THERETO RESERVE A POSITION-34.5600 FOR THE SIGN MUST BE AT LEAST ONE # BEFORE * #4 Mt THE DECIMAL FoiNT 4060 REMPRINT USING 50 COMMON ENDING ,T$,B$,T4,B$ 20:10 :***A TITLE*** AiAyIN SOME HAVE BASICS you AN EMPTY EVEN DIFFERENT LINES RUN70 END 50 FOR DIFFERENT RUN5040BO END PRINTPRINT USING 1020 AN EMPTyPRINT IMAGELIST THESEEASIER THINGS DONE ARE By IMAGEILLUSTRATED BELOW,' IS SHOWN IMMEDIATELY BELOW THAT THE RESULT PRODUCED BY USING EACH VERSIONS OF BASIC ARE IMAGE 9 ***A TITLE*** wirwour PRINT THE USINGO;) LEFT50: TO##FILLED glair ### FROM OR NOT #.# # TO BE OR NOT TO THETRUNCATION RONT /A 7Ex7 7D0 LONG FOR MOULD re. SOME BASICS ALLOW CURRENCY SIGNS IN THE MOULD,. 23.4561.234 $345.68 423.46$1.23 50: 'LL L's SAY TO 'RRR OR NOT BE OR NOT R's SAY 'CCC TO C§ SAY ASTERISKSTHETHE LEFT. CURRENCY SIGN 345.678 SOME BASICS PERFORM THE SAME TRICK WITH (I POSSIBLY og IN THE U.K. 'FLOATS' TO 50: \ \ Justify LEFT JUSTIFY RIGHT OR NOT CENTRALIZE CHARACTER.FOR SNELL OFSOME THE MOULD + SAYS BASICS ALLOW 'PRINT A PLUS SIGN IN FRONT OF THE e.g. + 4-#7;e.# A PLUS OR MINUS SIGN IN FRONT AND -### TO \\BE OR. NOT ARESPACESIS SIENIF/CANTFILLED FROM p LEFT ro \ 8E ToweEFF AND . THE MOULD - SAYS 'PRINT A SPACESIGNNUMBER IF IF NEGATIVE" IT IS POSITIVE ; IN FRONT OF THE A MINUS 50: <# 0 <#BE OROR NOT NOT >#### N.C.C.8/1.57C".DNS "STANDARD ONE IS IT IS NOT ALWAYS CLEAR FROM THE. MANUALS WHETHER THIS NUMBERSIGN IF IF NEGATIVE" IT IS POSITIVE A MINUS ToLEFT 0 TRUNCATE SAYS Jumpy -'2` t/VC.0.FACILITY CAN BE USED IN CONJUNCTION WITH THE CURRENCY .SIGN* "STANDARD BASic REQUIRES A sioN IN FRONT OF THE MOULD. EVENMERE BADMAY STANDARDSBE WOULD BE BETTER THAN NONE AT ALL* MORE WAYS YET s WHY CAN9T WE STANDARDIZE ILL-uSiP-AT1Nc I3A Sic PAcE 36 ILLUSTRATING BASIC PAGE 37

Competition Result Winnersplan to assist An application to employ the analytical powerof themicrocomputertothe rehabilitationofseverely -handicapped physically people into the mainstream of society has won forJ Rand G Seagrave, of Ruislip, Middlesex the Apple II computer in the Practical Computing competition. handicapped The winning entry will be published next entries which would make effective use of the Computer for Christmas announced in month. an Apple II, which was kindly donated tothis issue. We will allow this to happen us by Mike Sterland of Personal Com-twice, so one competition entry will do for Judges' report puters Ltd. Some of those short-listedtwo consecutive competitions providing By the closing date we were positively were hand-written attempts from youth-you send two appropriate entry forms- overwhelmed by the number of entries, ful amateurs; some were carefully -typed notnecessarilyatthe same time,of most of them arriving in the last threepresentations from businessmen. In thecourse-and tell us you want your entry days. Several others failed to arrive by the final group we had games, project control, to carry forward. Since each competition closing date. Competitions are obviously manufacturing,house design,business will have different criteria for winners, and popular or perhaps itis the appeal of a (forecastingaswellasaccounting), since each competition will have a differ- class microcomputer like Apple II. teaching (for the handicapped and forent winner, everyone is guaranteed the It is usual for the judges' report in com-others), medical applications, and several chance to win. petitions of this kind to include some home systems. In any case we shall be printing the best sycophantic reference to 'the surprising We also had a number of interestingof the entries in future issues; many of quality of the entries' or something of that `radical technology' ideas. We consideredthem are well worth sharing with you. We kind. In this case, we mean it sincerely.a number of 'think' pieces, on the nature will also look at the suggestion that we The winnowing -out which produced theand role of microcomputers in society, actually print a booklet of the games final short-list was done initially by theespecially,ofcourse,inrelationto entered for competitions, probably with editorial team, and they nominated moreemployment. our own people turning them first into than 70 of the entries as being good We found a winner and we did so by Basiccode(guaranteedtowork)if enough to publish. Of those, 32 reachedapplying some fairly simple rules. We that is needed. the judging table. We could not produce a wanted an entry which utilised the small shortershort-list-thequality was socomputer appropriately, and some of you The winner good. wrote about limited systems which madeThe entry from the Seagraves met all the somewhat inadequate use ofitspro- criteria the judges used and as we pro- Wide scope grammability. We kept the competition deliberately The winner, we feel, demonstrated an and successive ratings of the remaining wide open. The rules asked for uses for anappreciation of the potential and the candidates, itbecameincreasingly Apple II. We did this to give everyone a limitations; it would make full use of the obviousthatthisapplicationwas chance and, incidentally, that will be a system described. favoured by all of us. feature of most of our competitions. We Meanwhile, all other contestants areAs Mr Seagrave notes, this application do not wish to restrict entries to particularwelcome to allow their competition entries represents one of the greatest relative applications; we do not want to excludeto carry forward to the next competition- (continued on next page) any age orinterestgroups; and we definitely do not want to pre -suppose aJUDGING the competition, left to right, Richard Hease, Dennis Jarrett knowledge of computers or programming. and Wim Hoeksma of Practical Computing with Mike Sterland of So for this competition we looked forPersonal Computers Ltd, donor of the Apple II computer.

PRACTICAL COMPUTING December 1978 61 Competition Result

(continued from previous page) ber of customers. This system would A G Roberts-teaching typing. benefits of the computer. We feltit handle stock control and customerThought out very carefully, defining the also made good use of the capabilities records, and one interesting develop- problem and also defining the con- of the microcomputer system under ment using the Apple's special attri- straints under which a solution had to offer. butes would be to colour -code those be implemented. records. The runners-up JohnRoddy - elementary reading MR Hodder-an Apple today keeps Ten prizes of £25 are on their way to the assistance system. the doctor away. A "practical and entertaining use of a best of the rest, and deciding on only 10 The success of this entry proves that we was not easy. small processor/display system" is a did not disqualify automaticallyall word recognition exercise for children Ian Clark-project for the classifica- awful puns. Apple would be used in a hos- just reaching reading age. tionof stickand leaf pital pharmacy to file data on drugs,

insects. particularly on drugs which cannot or C T Stevenson-cardiac monitoring At first we thought this would be too should not be used in combination. system. esoteric an application for Apple but, T J Radford-Warlock Warren. Chris Stevenson is keen to develop a com- reading on, it emerged as a classic of itsThis includes a neat introduction to the pact diagnostic tool for GPs, a system kind. 'dungeons and dragons' school of fan- which would be implemented as firm- ware on a portable cardiac recording MalcolmCox - microprocessor -con- tasy games before Radford gets under way with his contribution. device to be carried "at all times" by trolled lighting system. people at riskbut whose condition This entry would produce a pyrotechnic J S Raynor-a program to demonstrate does not merit admission to hospital. light show for discos. It looks feasible, the distribution of day- though perhaps Apple is a trifle over- light inside buildings. R M Wellings-atool for company powered. Architects have to make many decisions representatives. when designing buildings, which is oneThis is a good, solid use for a small com- Barry Denyer-customer information, reason why many people dislike their puter. The author is a representative for wholesale warehouse. designs. This program details one area a major international company and has Or indeed in several other similar applica- of building design which in the author's to keep detailed records on 1,200 cus- tions areas with a fairly restricted num- view receives too little attention. tomers. Honourable Mentions M Adams Biofeedback systems G Hayes Domestically -orientated G Offord Comic stocks R Adams Gardener's database computer D Oldfield Teaching aid in the home A Arblaster (Several) W Henry Puzzle techniques M Parry Flight simulator I Baron Ley -line investigation R Higginson Computers in schools D Paul Project and data M Barrett A preparation tool for C Homewood King for a Year, a game management performance artists which involves ruling an J Pearson Making car number plates C Baughan Turning brain patterns imaginary country W Ramsbottom Fossil features database into music P Hough Learning to drive K Randall Analysis of musical style K Bean Travellers' database J Howden Submarine Commander, aG Relf Timing and scoring in G Brennand Data capture and war game orienteering processing for L Howe Towards tomorrow, a P Reynolds Forecaster archeologists training requirement A Rigby Computer Scrabble M Brook Quarry engineering programme D Robinson Control of the home maintenance M Hughes Simulation techniques P Rodwell Taking computers to the R Burdon Mailing list and record - P Jamieson Library system spynteopaIxe keeping 1 Jaworski Animated graphics P Ruffhead checker for I Chapman Anagram game A Jones Chess game recording programming languages P Charlton Voice -controlled system D Ryan Micro -controlled central microprocessor I Jones Articulation training heating J Crombie Car race game R Jones The 'keyword' game M Schorah Cyphering M Dixon Perception game C Kah Printed circuit board K Seville Operating schedules for T Dixon Controlling mass data design distributed processing storage C Kelly Text editing networks G Kitt Testing for colour K Shore Teaching programs H Dobbs A system for managing P Smallwood Bullet game proportional blindness M Knight Genetic engineering gameA Smith Teaching the handicapped representation in the M Spencer Explosion game electoral process P Landless Diary A Langley Small business accounting M Spicer Micro in engineering N Dransfield MLA-a system for J McConnell Astrophotography design de -centralising J McIntosh 3D graphics R Stewart Using an Apple organisations S McMillan Motor vehicle diagnostic E Sunderland Program for home S Edwards Research for a new typeof system for the layman teaching generator S Mann Micros in the home J Sylvester Computers in education C Faulkner-King Developments of the F Marden Invasion game S Taylor Letter writer 'pathfinder' game S Marsh Filing system for abstractsD Teller Analysis of space satellite I Feaver Equine database B Martin Health service program pictures J Finnie Garment production and N Martin Simple robot E Thornton Medical records stock control system S Massey Teaching aid R Toogood Digital compass R Ford Predicting air traffic I Matthews Calendar program S Towsend Medical tests control conflicts N Matty Car fault diagnosis J Uff House design B Waddell Charity finance office G Foster Teaching aid A Mayne Microviewdata P Wall Business game G Foy Analysis of the T Moore Vehicle simulator for E Ware Central heating alternative culture driver performance specification D Francis Carpet design A Mothew Flight planning for light A White School computer A Gray Mapping the night sky aircraft P White Battle game K Hall Wobbly Jelly game F Murphy War -gaming R Wood Process controller system D Hand Wordlab-a teaching W Nicholson Currency Corner, a Anon Archiving information system money management game system

62 PRACTICAL COMPUTINGDecember 1978 /AM computabits

You can advertise your shops, products and servicesinour Shop Window Kim projectscolumns for only £6 per single column centimetre (minimum Scm). For details, contact: THIS MONTH we continue our article on adding analogue input/output to the Kim Tom Moloney, Practical Computing, and other 6502 -based machines. Last month we looked at the circuits used and outlined 2 Duncan Terrace, London, N.I. some applications. For convenience, last month's diagrams are repeated. Tel: 01-278 9517

In the first example of A/D conversion, which in turn sets the carry bit and the using A2DRMP, theinternalbinary program counter jumps to DONE. counter of the ZN425E is driven directly from software in the Kim -1. Fig. 1is the Two ways circuit layout and fig. 2 shows how the P. I. P. S. program and electronics interact to form It is possible that the unknown target COMPUTER SERVICES the simplest of A/D converters. voltage is greater than the highest voltage produced by the ZN425E. This being so, North-East England By storingzeroin DA boththe the internal counter, and SUM, would ZN425E counter re -set pin and the clock distributors for the reach 255 and promptly re -start at zero best selling micro, the pin are taken to logical zero. By clearingand the program is potentially in a most the counter in this way the analogue out- undesirableinfiniteloop.Thesub- APPLEII put of the D/A chip is guaranteed to be at routine should try only once to find a zero volts. At the same time zero is stored value; unpredictable infinite loops are Full range of accessories in the variable SUM, which will be used generally frowned upon in computing. and software can be as a tally of how many steps it took for the BEQ OVFLOW detects when SUM falls applied. test voltage from the chip to rise above the to zero and control jumps to OVFLOW. unknown target voltage. Telephone John or June Page There are two ways in which this sub- on (0632) 482359 to INC DA sets PAO, the clock line, toroutine can return to its calling code. If discuss your requirements. high. This has no direct effect; it is PAOthe code branches to DONE, the data falling to zero which advances the coun-stored in SUM is valid and the A -resistor ter. To check to see if the test voltage is contains 0. If the counter has overflowed, NEWCASTLE and the branch was to OVFLOW, then UPON TYNE Figure I the A -resistor will contain $FF (-1) and the contents of SUM should be ignored. SUM will contain zero, because that Circle No. 143 caused the subroutine to return. In fact,itis common programming practice to make a subroutine return the THE actual result of its computation in one resistor or location and to set the content of another resistor according to the exit MIDLANDS conditionswhichcausedthereturn, error, failure or success. *CBM PET * TEXAS * CASIO* CALCULATORS & PERSONAL Direction resistor COMPUTERS Program DVMI uses the A2DRMP _Delos routine to read in a voltage value and then (SYSTEMS) LIMITED display either the number in SUM or an BENNET HOUSE 155 MANSFIELD ROAD, overflow message on the Kim -1 display. NOTTINGHAM NG I3FR Telephone (0602) 48108 First SETUP is called. This loads $FF still less than the target voltage, the DBinto DDA, setting the data direction Circle No. 144 resistor is loaded into the A-resistor-resistor PAO-PA7 all to outputs. It then PBO is connected to the comparator out- loads $00 into DDB, setting the data put. By rotating A to the right, this bit is (continued on next page) ,...... ,...... ), transferred from the low order bit of the g ?, NewBear Computing Store resistor into the carry bit. Assuming this is Figure 2 ? stillclear DEC, DA clears PAO. The SYM-1 (Formerly VIM -1) ? internal counter in the D/A chip incre- 0 The new 6502 based Micro from 0 22,F +52 0 ments by one and hence the analogue /5 Synertek Fully assembled and 4 0 tested 1 K byte storage, expand-/2 output rises by 8.52mV. //. / OV ---a11-10 REF OUT able an board to 4K byte 04K byte /.., _1 0 ';, 2 LOGIC REF IN / -2.1WsiCi T ANALOGUE 14 0 ROM monitor El 99 plus 8% VAT OT i3 PBO / Keeping count -O'CLOCK '6 L eIBITU I --PA7 /, £1 carriage Send for data 0' I. 311 PAO --755IBITI3 BIT 2 '2 --PA6 0 For further details: Visit Newbear Computing PAI -- - --BIT 7 NT 311- 945 0 Store, 2 Gatley Road, Cheadle, Cheshire, 0 Incrementing SUM keeps count of the PA 2- 7-11SIT6 BIT 4 10 -PA4 I 061-491-2290. Or visit, or write to: Newbear 1, number of steps so far. In fig. 2 the test +55 91,5 BIT 5 9 --PA3 Computing Store, 7 Bone Lane, Newbury, ', Berks. 0635-49223. Send for catalogues of voltage rises above the target after eight EST 0-- Hardware Components, Literature and I INPUT clock pulses, showing that the unknown 0. Software. I,/ voltage was just above 59.6mV. When this !xwwww.xwvwxvw:ww.svwsswwwxwwwx.~,:q occurs the comparator output goes high, Circle No. 145

PRACTICAL COMPUTING December 1978 63 (continued from previous page) set (SEC), indicating no borrow. This is direction resistors for PB0-PB7 setting all done dutifully,according tothe pro- these to inputs. gramming manual. If the A -resistor does not contain zero, Because the previous instruction was CMP 40 is false. The program, DVM1, branch, however, if carry clear (BCC) the will display an out -of -range error message. carry bit must be set at this point. Carry ufflWiTRUMM It might display the word "ERROR". on writing code like that and the bogey Unfortunately, the Kim -1 SCANS routine man will get me. works only for the hexidecimal digits 0-9 and A -F and "EAAOAI" didn't look so Continuous display good.Intheend, "ABCDEF" was settled on-not very original but effective The lOs are now in the bottom four bits enough. of DISP, corresponding to the sixth dis- SCANS displays the 24 bits in DISP + 2,play. By shifting DISP to the left four DESP + 1 and DISP as six groups of four - times-multiplying by 16-they are then bit hex digits. It is these locations which in the top four -bitlocations, the fifth are loaded with the message. This done, display. The units remainder is still in the the code returns to the conversion and A -resistor and this is finally added into the starts all over again (JMP DVMIA-the FEATURES setup is not required again). Figure 4: Test circuit. TSB CHARACTER DISPLAY IN Is ROWS BY as

UPPER AND LOWER CASE CHARACTERS

PAGE CLEAR AND CURSOR CONTROL

USES UN-MODIFIED T1 RECEIVER

ALL DISPLAY FUNCTIONS SOFTWARE CONTROLLABLE Clearing locations REPLACES ANY STANDARD TELETYPE S stet sits test AlOWEE UTIOSAT .-aupt

10 DIFFERENT BAUD RATES ex 110 WITH RS 2T2 b 20 of BWA COMPATABILITY OR PARALLEL OPERATION

SIMPLE LOW POWER REQUIREMENTS If the result of A2DR MP was valid, we

ALL CONTROL CHARACTERS DECODED FOR EXTERNAL FUNCTIONS wish to display the contents of SUM, not COMPOSITE VIDEO OUTPUT AVAILABLE -BELL.' OUTPUT FOR DIRECT SPEAKER DRIVE as hex digits $00 to SEE, but in decimal 0- SWITCHABLE CURSOR AND AUTO -FEED FULL AND HALF DUPLEX 255. The contents of SUM are loaded into COMPREHENSIVE APPLICATIONS HANDBOOK BUILT AND TESTED UHF MODULATOR the A -resistor and a call to DECMAL is

Should you wish to receive further details, please made. 10K send a self-addressed envelope, or if you require TO COMPARATOR INPUT a kit send a cheque or money order for E139-86 to (PIN 31 On entering DECMAL, the A -resistor OV Tangerine Computer Systems Ltd., has to be used to clear the three DISP Rivermill Lodge, London Road, St. Ives, locations used by SCANS. So the con- Cambridgeshire tents of this resistor are pushed on to the stack (PHA) and the resistorisused before the original contents are restored bottom four bits of DISP. As before, ifidIETNME2N from the stack (PLA). The binary -to - SCANS is called and the program jumps decimal conversion works by subtracting back to the conversion routine again, Circle No. 146successively 100 from the A -resistor until providing a continuous display. Fig, 4 it is less than 100. Each time one is addedshows a potential divider set-up to test HUMBERSIDE DVMI. MICROPROCESSOR SERVICES Figure 3: A2 DRMP algorithm There are clearly disadvantages with THE COMPLETE this A/D conversion technique. The con- INDEPENDENT SERVICE version is by no means the fastest possible. Application areas: - UNKNOWN TARGET VOLTAGE Worse than that, it does not take a fixed Business, process control, education, SUM. 8 Personal Computing time. If the target voltage is low, it is fast. We can provide for you: - If the target voltage is high, or above the 36 9mV Consultancy, training, supply, 3 range altogether, it becomes progressively maintenance and software to suit TEST VOLTAGE FROM slower, to such an extent that the display 0 VOLTS your individual requirements D NCHIP INC DA dims noticeably withhighervoltages, Including - -PAD solely due to the increased conversion Commodore P.E.T. DEC DA M6800 PAI time. Z80 - - -rsa and full ancillary equipment. MicroprocessorServices, Fewer wires I Nunburnholme Avenue, 00 N. Ferriby, On the advantage side there are only Humberside. three parallel port locations used, with For further details ring (0482) 631015 correspondingly fewer wires to be mis- toDISP 1,the fourth seven -segment placed. The second conversion algorithm, Circle No. 147display position on the Kim -1. From the variously called the Successive Approxi- remainder, which must be less than 100, mation Technique or Binary Chop, uses DEVON 10 is subtracted repeatedly until the A -nine ports. On the other hand, it is much resistor contains less than 10. As before, faster and always takes eight attempts. Apple Nascom Newbear Atari etc each subtraction is accompanied by an The successiveapproximationtech- For computers and components increment of DISP. Call or phone nique is the optimum strategy for finding an unknown number between fixed limits, CRYSTAL ELECTRONICS Redundant with the only clue given being "too high" 40 Magdalene Road, or "too low". The next attempt is always Torquay, Devon You may notice a totally redundant halfway between the limits. The limits are instruction inthis code. For the twosadjusted after each response. The higher TORQUAY (0803) 22699 compliment subtraction (SBD *10) tolimit is dropped to the last guess if the function correctly the carry bit must be (continued on next page) Circle No. 148 64 PRACTICAL COMPUTINGDecember 1978 Computabits __AAA Ili

(continued from previous page) and I or 1 and 0) then that bitis set, response was "too high", the lower limitgiving 01111111. By ANDing (AND) this raised if "too low". with the current contents of DA the mask The unknown voltage is assumed to bebit, and only the mask bit,is cleared. in the range 0 to 2.18v, the D/A chipControl carries on from the label ONE. HAPPY MEMORIES output corresponding to the numbers 0 to ASCII KEYBOARDS 255. The output of the comparator indi- Others unchanged 59 keys, full 128 ASCII -character repertoire on 7 -bit cates whether the converter voltage is paralleloutput,positiveand negativestrobe, MASK is then shifted to the left, giving alphalock,two -keyrollover,auto -repeat,two greater (`I') or less (`O') than the unknown01000000. This is then ORed into DA re-legendable keys for user designation, value. E49 plus El p&p setting PA6 but leaving all the other ports Add-on 5 -key cursor control kit, L2-50. Send SAE unchanged. If our target voltage was for full data. Electronic layout greater than 1.09v we have 11000000 Building a Science of Cambridge MK14? Complete set of 18 profile sockets, L2 80. Fig. 3 shows the electronic layout in stored in DA, and if less (0.95v) we have 21 L02 4SOns, 95p this case. The internal counter of the I6up 92p, 64 up 89p. For 250ns, add 15p to 450ns ZN425E has been disabled (by connecting Figure 6: Altering the reference voltage prices. the LOGIC SELECT (pin 2)to zero on 2N425E 2114 300ns E7 25 4 up L7. volts). The chip now converts the eight - 4116 16K DRAM E12.50 bit number from the parallel port (PAO- 4 up L12 PA7) directly into a voltage. Fig. 5 shows Texas low profile DIL sockets +5V a tree diagram of the program over the .229F Pins 8 14 16 18 Pence10 1 I 12 17 first three of the eight stages of the con- Pins 20 22 24 28 40 Pence18 20 22 28 38 version. A2DSAT isthe Kim -1code 100 up prices less Ip each. implementation of the algorithm. Antex I mm Bits for CXI7 and CCN models, Work through A2DSAT, referring to V REF OUT 16 45p V REF IN 15 fig. 5. Assume a target voltage of 0-95v. 2 20n All prices include VAT. Add 20p p&p except where First load the A -resistor with 1,000,000 14 shown. ($80) and store it in MASK and the out- 13 HAPPY MEMORIES 5 Cranbury Terrace, put port DA. The ZN425E assumes an Southampton, Hants. output voltage of 1.09v, $80 is 128, half- SOZ OLH way between 0 and 255.The NOP ov instruction allows a time for the D/A chip Circle No. 149 to settle to its correct value. Next the state of the comparator isloaded into the A -resistor and PBO is rotated right into CAMBRIDGE the carry bit. COMPUTER STORE 01000000. In the former case the unknown Control transfer voltage is now known to be between 1.09 East Anglia's leading computer and and 218v. Then the new comparison will electronics store offers you: If 1.09v is greater than the target volt- be between above 1.635v and below it-in age, the carry bit will be set and control the latter case, above and below 0-545v. TRS-80 will be transferred to the label ONE. If C The comparator output is read again is clear, as it will be in our example, theand the current test bit cleared or left. In APPLE II code must clear the testing bit. To this endthe example the test voltage is less than N -S HORIZON the target, so it remains at 01000000. The Our store is open 6 days a week from 9-5-30 with Figure 5: First three stages of the succes- next bitis set (01100000) and the test demo. systems'always in operation - We offer a professional standard of advice and after -sales sive approximation algorithms (underline determines whether the unknown voltage support and we're ready to discuss your (010) indicates position of mask bit) is above or below 0.8175v; 0.95v is above, application any time. so 01100000 remains. After only three Ourstock includes a vastrange of components as well as computer books iterations around the loop, the target of and magazines. 2189(255) 0.95 is known to be between 0.8175 and 111 19075V 1.09v.Afterafurtherfive iterations, no CAMBRIDGE COMPUTER STORE 1635V the target voltage will have been measured 1 EMMANUEL STREET 101 to with -in 8.516mV. 136250 CAMBRIDGE (0223) 68155 100 lot Embedded Circle No. 150 011 81756 010 MASK only ever contains one bit set. 545V 010 This starts in the high -order bit position TRS-80 .27250 and is shifted successively left towards the 001 000 SAVE £80ONI6K MEMORY 00 low -order bit for each branch decision in UPGRADE the tree. After all eight bits have been Install your own chips and save L80. Kit tested, the testing bit will appear in the includes full instructions and eight 16K carry bit. Instead of branching to NEXT chips.Simpleplug-ininstallationand the final value in DA will be loaced into jumper wire change. Prime first -grade the A -resistor and the subroutine will devices. KIT AND INSTRUCTIONS £149 MASK (10,000,000)is loaded into the return. inclusive of VAT A -resistor and Exclusively ORed (EDR) A2DSAT is embedded in DVM2. Like DISPLAY ELECTRONICS with 11111111. If the corresponding bit in DVM1, it uses SETUP to initialise the 215 White Horse Lane, London SE25 MASK is the same as the A -resistor (0data direction ports. Then it jumps to the 01-771 2027 and 0 or 1 and 1) then that bit in the A -conversion routine, transfers the answer resistor is cleared. If they are different (0 (continued on next page) Circle No. 151

PRACTICALCOMPUTING December 1978 65 (continuedfrom previous page) switch in the 0-2-55v postion, the input in the A -resistor directly to DECMAL,voltage goes directly into the comparator. and then displays the value using SCANS. With the switch inthe 0-25.5v range This lot isrepeated ad infinitum byjump- position, only one -tenth of the voltage >VAN SYSTEMM-ing directlytothe conversion routineappears across the 1000K ohm resistor (DVM2A). The re -set button is provided made up from 68 +22 + 10K resistors and to terminate this loop; it also tidies up the nine -tenthsis'lost'acrossthe 900K stack. resistor (680 +220K). Xitan Systems is now proud In the 0-255 volt range, 99/100ths of the to announce it has moved to Need for caution input voltage is across the 990K resistor (680 +220 +6822K)andonlyone - new showrooms in the Remember that any negative voltage hundredth across the 10K resistor and the centre of Southampton. displaysaszero, and any over -rangecomparatorinput.Iwouldbevery voltage as 255. So treat those values withdubious about putting 250v anywhere caution. near a C-MOS microprocessor. The 2.2K New address: While DVM1 and DV M2 are supposedresistor and 4.7 volt zener diode should to stand for Digital VoltMeter, theyhave provide adequate protection from all but a very unfortunate anomoly. When 255 is themostardent high -voltagewire 23 Cumberland Place, displayedit corresponds only to 2.18v. danglers. There are at least four solutions to this Southampton Transformation Figure 7: Input attenuation for three - Tel: range digital voltmeter using KIM -I SCOPE is a further demonstration of the capabilities of the A/D conversion Southampton 38740 routine. It transforms an ordinary oscillo- VOLTAGE TO RE scope into a digital storage oscilloscope. MEASURED Fig. 8 shows a dual -beam oscilloscope 25V attached to the A/D converter and the South coast stockist for the PINS M3II Kim -I.In record mode, the signalis ALL DIVIDER 22K5 whole range of Comart RESISTORS torn displayedonbothchannelsofthe oscilloscope, on one directly. On the By products. Also a wide range ZENER other, it appears as part of the A/D con- 1400,,W) version process, monitoring the ZN425E of other microcomputer OV analogue output. equipment. This second signal shows the successive approximation technique, trial voltages `homing' -in on the waveform during each Circle No. 152 disparity.One,itcouldbeignored. sample. Each time the signal waveform is Second, itcouldbemultipliedby digitised by A2DSAT, the result is stored HAVE A NIBBLE OF THE 11697248, either with a pocket calculator away in a buffer, 512 bytes long. When- orby some verytiresomesoftware. ever the end of the buffer is reached the TANDY TRS-8, TAKE A PEEK Third, a resistive potential divider couldpointer is set to the beginning again. It is, AT THE PET, OR TRY A BYTE be arranged so that a voltage of 255 gives in effect, circular and always contains the OF THE APPLE II at: a reading of only 128 instead of the over - last 512 samples. The current value over- range indication (see fig. 4). writes the sample read in 513 bytes before. RADIO SUPPLIES If the result of the conversion is shifted (SWANSEA) LTD one place to the right-multiplied byLogic input 80 GOWER ROAD two-before jumping to DECMAL, the voltmeter skill displays 0-255, except that Further, a logic input to PB1 is moni- SKETTY tored with each sample. While it remains SWANSEA thesenow correspondtoaninput between 0 and 2.55v. These are now in Tel: (9072) 24140 steps of two. Figure 8: Layout for digital storage scope Circle No. 153Best method TANDY TRS-80 Fourth and best, the ZN425E generates GOES WEST an internal voltage reference for the con- Now available in West London version of about 2.5v; this is fed normally 45-o At TANDY EALING, directly into the reference input pin (15). SWITCH 6 New Broadway Ealing, W5 If those two pins are disconnected and a normal I) (Ealing Broadway Tube 2 mins away) KIM -I slightly higher voltage derived from a INPUT Come in and try our demonstration WAVEFORM potential divider, fig. 6, across the 0 and PA7 models and discuss with us your +5 supply rails, is fed into pin 15 a full ONVERT R applications. We can produce calibration may be achieved in this way. Customised Systems for your use. Also make use of our In -House A voltmeter will usually be calibrated Software Service. Peripherals, books by comparison with a device known to be and a large variety of pre-recorded accurate. Feed one volt into the compara- programs available. tor and adjust the 220 ohm potentiometer PHONE: 01-579 1320 until the display reads 100. low, the recording continues. As soon as 9-5.30 Mon -Sat Access, Barclaycard and instant credit Fig. 7 shows an input potential divider it goes high, the recordingstops and the for measuring higher voltages. With the (continued on next page) Circle No. 154 66 PRACTICAL. COMPUTING December 1978 Computabits

(continued from previous page) immediately. Code could be written here to last 512 bytes are frozen. Just beforeuse the display. Remember, if you use the returning, the recording routine saves theswitch, to test for both on and off before current value of the buffer pointer inyou return from YOURS, otherwise the SYNCL and SYNCH, showing where theprogram will cycle through values as if it stored sample begins and ends. Fig. 8wasn't there, each time the switchis CYTEK shows a microswitch wired into PB1; any pressed. logic signal would do. Because the buffer is more than 256Not instantaneous AUTHORISED PET DEALERS bytes long, the convenient absolute indexed mode cannotbeused.Instead,the Even with A2DSAT, the conversion is (indirect), Y mode isemployed. Forby no means instantaneous, requiring IN MANCHESTER RECORD, the address of the beginningsome 350 microseconds. Further, while of the buffer is loaded into POINTR andthe conversion time is more consistent POINTR +1, the Y resistor is zeroed. Thethan A2DRMP, it still varies according to Computerising is "a big step and sampleisdigitised and stored inthe the input voltage. For each trial in which it pays to speak to the addresscontainedinPOINTR andthe testing bit must be unset before con- professionals. At CYTEK we have POINTR +1. The state of PB1 is moni-tinuing at ONE, 13 extra machine cycles both the Hardware and Software tored;ifitissetcontrol jumpsto occur which would not have done so if the ENDREC, where the sync value is savedtesting bit was leftset. They could be expertise to make your and control returns. padded out with NOPs, but at the expense application a success. of further increasing the conversion time. In any case the effect is not apparent in Next sample most applications. 12 EXCHANGE HALL The low -order pointer byte isincre- It is worthwhile to optimise the code in CORN EXCHANGE mented and if it is less than 256 the next A2DSAT as much aspossible. Each BUILDING sample is obtained. If it was not-i.e., it instructionconsumes valuablemicro- was 255 and has become 0-the high -seconds; any instruction omittedisa MANCHESTER M4 3EY order POINTR +1 byte is incremented contribution to efficiency. This is especial- 061-832 7604 and loaded into the A -resistor. If A is ly true if the instruction is removed from equal to #PHIGH +2, then both 256 theinside loop,between NEXT and Circle No. 15 byte halves of the buffer are full, and theBCC NEXT. The LDA DA instruction pointer is set to its initial value at RESET.might be omittedif DB was rotated If not, A is stored back in POINTR +1 directly,thereby saving four machine and samples will continue to be stored incycles eight times. the second 256 buffer page. The A/D converter is a real boon to the TOPMARK PLAY is the playback routine. It starts Without doubt, it with FB2 being configured as an output; is the ability to enter your move or action Computers the signal to syncronise the oscilloscope into the computer quickly and easily and will appear here. POINTR is set to the to have the machine respond instantly, start of the buffer and Y is cleared; thewhich adds greatly to the excitement of sample v2lue is taken from the buffer andany game. APPLE II stored in DA. The value appears on pin 14 Joystick controls make superior input of the D/A chip and is displayed on thedevices. Recently they have become easy second channel of the oscilloscope. The to obtain cheaply, mainly due to the boom comparator output is ignored. in television game chips and the need to If POINTR and POINTR +I are equal input to them. to SYNCL and SYNCH respectively, PB2 isbrieflypulsedhigh,therebySlick control Simply the best! synchronising the timebase scan to the At first sight it would seem impossible buffer. After this POINTR and Full details from Tom Piercy on POINTR +1 are manipulated to keep theto read more than one voltage into the Huntingdon (0480) 212563 or circle pointer cycling round the buffer as inmicro with a single A/D converter, and enquiry card. RECORD. This code continues to displayjoystick controls for two players would the contents of the buffer until the re -set generate at least four voltages. Fortunat- button is used. ely, C-MOS integrated circuits are avail- Circle No. 156 able to multiplex two, four or even 16 Numeric display channels into one converter, under soft- °IesaIN DATALOG LTD ware control. You don't need an oscilloscope to use Using a joystick could make for rather Extra memory for your P.E.T. this code. If, instead of putting the bufferslick cursor control in a memory -mapped I 6K £328 value out to the D/A converter the codeVDU-just the job for a fast text editor or 24K £388 + 8% VAT 32K £438 jumped to DECMAL and SCANS, itthe like. For full catalogue and pricelist of would display the sample on the seven - The photographer and Kim -1owner programs and accessories for your segment displays. As it stands, it wouldcould design an intelligent light meter, P.E.T race through the values too quickly to be with a digitised photocell value. The pro- Write to: any use. Intex Datalog Ltd, gram could calculate the optimal shutter Eaglescliffe Industrial Estate, If the switch connected to PB1 wasand aperture settings, given the desired Eaglescliffe, used to step through the buffer, however, depth of focus and film characteristics, the Cleveland TSI6 OPN it would make a useful numeric display. speed of the subject, and so on. Unfor- The nullsubroutine YOURS returns (continued on next page) Circle No. 157

PRACTICAL COMPUTING December 1978 67 (continued from previous page) calculatorforinstance)andspeech tunately, by the time the programmer recognition by softwareallbecome a understands the problem well enough to reality. code it, he can usually take one look at the scene-f8 at 100th; click; before you even have time to press the GO button. The DEFINE SYSTEM LOCATIONS AND 4Z444444444446ZKim would fare better during the more ROUTINES sedate and deliberate darkroom phase, as DA -$1700 Z ROBIN BAILEY Z DDA -$1701 an enlarger timer/exposure meter and DB =$1702 Z ASSOCIATES Zprocess controller. DDB =$1703 SCANS --$1F 1 F 4)62 New Cavendish St. DISP London W1 PLOW =$00 Z ZFor the garden PHIGH =$02 01-637 0777 0000 TEST *=*+I Z Z 0001 MASK .=*+ I 4ii). The gardener could attach a thermistor 0002 SUM .=*-F 1 0003 POINTR =*+2 PET temperature probe to the converter and 0005 SYNCL "=*+ 1 z z 0006 SYNCH "---*+ I z EXTENSION Zthen run RECORD with a 169 -second MEMORY (169 x 512 -about 24 hours) delay be- ;TEST DECMAL - DISPLAYS Z Ztween data samples. On playback each ;NUMBER IN LOCATION 0000 BOARDS ;USING SCANS. 4L. Zday, the gardener sets the most expensive and IEEE 0007AS 00 TESTD LDA TEST iD MAX -MIN thermometerthisside of 000920 SC 00 JSR DECMAL to Surbiton. 000C 20 IF IF PDLY JSR SCANS Z Z 000F4C OC 00 IMP PDLY RS232 As a final thought while on the subject 41) INTERFACES Z ;DIGITAL VOLTMETER USING of A/D converters and SCOPE, it is worth ;RAMP A:D Z Price and delivery on trying to record a sample of speech with 001220 51 00 DVM I 158 SETUP Z application this program. You would need some kind CONFIGURE PORTS of amplifier and level shifter to bring the 0015 208C 00DVMIA JSR A2DRMP Z ROBIN BAILEY Z GET VOLTAGE Z ASSOCIATES microphone signal up to 2.5v. You might 0018C9 00 CMP *0 Z IS IT VALID? also be well advised to put some kind of 00IA FO 12 BEQ VALID ZIC6CCC66C6660Zattentuationon theanalogueoutput YES 00IC A9 AB LDA *$AB Circle No. 158 beforefeedingthatsignalintoyour 001E85 FB STA DISP4-2 0020 A9 CD LDA *$CD stereo amplifierinstead of the oscillo- 002285 FA STA DISP+ I scope for playback, thereby preventing 0024A9 EF LDA 4:t$EF 002685 F9 STA DISP DAVIDSON RICHARDS LTD., the loudspeaker coils jumping out of the 002820 IF IF JSR SCANS DISPLAY "ABCDEF" Management Consultants cabinet at you. The speech sample is very 002B 4C 15 00 IMP DVMIA short with the memory available in the 002EAS 02 VALID LDA SUM Systems and Software Division 003020 SC 00 JSR DECMAL basic K im-l-only about 0.2 seconds. 003320 IF IF JSR SCANS *APPOINTED AGENTS FOR DISPLAY DATA COMMODORE PET* With a 4K memory expansion block the 0036 4C 15 00 IMP DVMIA recording will last about one and a half * Extensive range of peripherals available* ;DIGITAL VOLTMETER USING seconds. "One, two, three, fo . . .". The ;SUCCESSIVE APPROXIMATION For further information, write or phone: replayed speech is even then only just TECHNIQUE. recognisable. Itis improved by using as 003920 51 00 DVM2 1512 SETUP 14, Duffield Road, 003C 20 BI 00 DVM2A JSR A2DSAT much treble cut as possible; a synthesiser 003F20 SC 00 JSR DECMAL Derby low-pass filter is ideal to reduce the distor- 004220 IF IF JSR SCANS 0332-366803/4 tion caused by the digitisation steps. The 00454C 3C 00 IMP DVM2A main problem is the low sampling rate. It ;DIGITAL STORAGE SCOPE Circle No. 159 should be at least 6,000 times a second, a 004820 00 01 SCOPE JSR RECORD complete conversion and storage cycle of 0048 20 33 01 SCOPEA JST PLAY SIRTON PRODUCTS(sP) 166 microseconds. 004E4C 4B 00 IMP SCOPEA

;SETUP DATA DIRECTION We specialise in the S100 bussytemwith There are various ways in which the ;REGISTERS 8080 or Z.80 CPU's. conversion code could be speeded. The conversion would no longer be a separate 0051 A9 FF SETUP LDA *$FF OUTPUT SIRTON VDU Board with case 0053 8D 01 17 STA DDA subroutine; the call and return take 12 0056 A9 00 LDA INPUT 1- reverse video + character flash£97.50 0058 8D 03 17 STA DDB Z80 CPU Kits from £94 50 cycles. The playback switch would be 0058 60 RTS 8080 CPU Kits from £7250 connected to the interrupt line (10 cycles). ;CONVERTS NUMBER IN A REG 8K RAM Kits from £94.50 The digitisation could be reducedto ;TO DECIAMAL IN DISP, READY 16K ROM Kits from £4700 ;FOR A CALL TO SCANS. I/O Board Kits £9450 seven, or even six, bits-by loading MASK with $40 or $20 instead of $80. Mainframe £187.00 005C 48 DECMAL PHA 005D 48 00 LDA -0 Keyboards from £3850 CLEAR DISP 005F85 F9 STA DISP Bare Boards: Z80 CPU, 8080 CPU, Speeding code 0061 85 FA STA DISP+ I 8K RAM, Proto-type from £1500 0063 85 FB STA DISP+2 0065 68 PLA Hardware As an alternative it is possible to con- 0066 C9 64 NI00 CMP *100 5100 edge connectors £3.45 struct the successive approximation algori- BRANCH IF<=99 Bridge Rectifier 18 Amp £3.95 006890 08 BCC NIO thm from electronic logic rather than soft- 006A 38 SEC Transformer Pri 110/240V; sec 8V NO BORROW @ 10 Amp and 25V CT @ 2 Amp £12.75 ware. A 15 -microsecond A/D converter is 006BE9 64 SBC *100 A LESS 100 possible with the ZN425E, which is about 006D E6 FA INC DISP+1 WRITE/PHONE FOR CATALOGUE as fast as a microprocessor could store the HUNDREDS + I 006F4C 66 00 JMP NI00 VAT and Postage not included. results anyway, without some kind of AND AGAIN 0072C9 OA NIO CMP *10 SIRTON PRODUCTS direct memory access (DMA). BRANCH IF <=9 13 Warwick Road With this equipment experiments into 007490 08 BCC NI Coulsdon, Surrey 007638 SEC digital sound processing-real-time digital 0077E9 OA SBC *10 Tel: 01-660 5617 filters-speaking computers(atalking (continued on next page) Circle No. 160

68 PRACTICAL COMPUTINGDecember1978 Computabits

(continued from previous page) 0 OD 20 81 00 AQUIRE JSR A2DSAT CONVERSION 0079E6 F9 IMC DISP O 1091 03 STA (POINTR),Y TENS + I SAVE 007B4C 7200 JMP NIO 012 AD 02 17 LDA DB 007E06 F9 N 1 ASL DISP O 15 6A ROR A SHIFT TENS TO O 166A ROR A

008006 F9 ASL DISP O 17 BO 1 I BCS ENDREC UPPER DIGIT O 19E6 03 INC POINTR 008206 F9 ASL DISP 0 IB DO FO BNE ACQUIRE POSITION IN END OF PAGE 008406 F9 ASL DISP O 1 D E6 04 INC POINTR+I HB COMPUTERS DISP. 0 IFA5 04 LDA POINTR+1 0086 18 CLC 0 21 C9 04 CMP #PHIGH+2 East Midlands Area 0087 65 F9 ADC DISP 0 23 FO DE BEQ RESET ADD UNITS 0 2585 04 STA POINTR+ I Distributor for 0089 85 F9 STA DISP 0 274C OD 01 IMP AQUIRE 008B60 RTS 0 2A A4 03 ENDREC LDA POINTR PET 2001 SAVE SYNC Visit our showrooms at: ;ANALOGUE TO DIGITAL 0 2C 85 05 STA SYNCL 22 NEWLAND STREET, KETTERING ;CONVERSION -I CLOCKS 0 2E AS 04 LDA POINTR I ;ZN425E D TO A CHIP UP TO POINTR for personal service with technical back-up. ;256 TIMES. RAMP ALGORITHM 0 3085 16 STA SYNCH Machines normally available for hands-on O 3260 RTS experience, business programs available ;IF VOLTAGE IN RANGE: for demonstration. Many other systems ; RETURNS IN SUM, SETS A REG ;REPLAYS CIRCULAR BUFFER ; TO 0 ;FILLED BY RECORD. P81 stocked including kits from the following ;IF VOLTAGE OUT OF RANGE: ;SYNCHRONISES SCOPE TO START manufacturers: SYNERTEK SYM 1, ; SETS SUM TO 0 AND A REG ;OF BUFFER CBM KIM 1, RCA CosmacVIP. ; TO $FF Software available for PET 008C A9 00 A2DRMP LDA #0 0133A9 04 PLAY LDA #4 HB Mastermind using graphics 008E13D 00 17 STA DA PB2 AS SYNC RESET ZN245 0135 8D 03 17 STA DDB HB Card matching-Test your COUNTER OUTPUT memory-For two players £5 0091 85 02 STA SUM 0138A9 00 RESTRT LDA *PLOW CLEAR SUM 0I3A 85 03 STA POINTR (Send for full list) LDA *PHIGH 0093 A9 02 LDA #2 0I3C A9 02 ** STOP PRESS .... Now stocked! 0095 80 00 17 STA DA 013E85 04 STA POINTR+I COUNTER READY 0140 AO 00 LDY *0 The fabulousAPPLE II - -colour 0098 EE 00 17 COUNTINC DA 0142BI 03 CONT LDA (POINTR),Y computing for the common man * ** 0098 AD 02 17 LDA DB 014420 72 01 JSR YOURS COMPARATOR STATE 0147 8D 00 17 STA DA Call or write for details. 009E 6A ROR A OUTPUT SAMPLE KETTERING (0536) 83922/5209102 lines INTO C BIT 014A A5 05 LOA SYNCL 009F BO OA BCS 014C CS 03 CMP POINTR DONE IS HIGH 014E DO 10 BNE NOSYNC Circle No. 161 00A I CE 00 17 DEC DA 0150 A5 06 LDA SYNCH CLOCK ZN425 0152 C504 CMP POINTR-- 00A4 E6 02 INC SUM 0154 DO OA BNE NOSYNC KEEP COUNT 0156 A9 04 LDA *4 00A6 FO 06 BEQ SYNC PULSE TO OVFLOW VOLT 0158 8D 02 17 STA DB OVERRANGE 01ID E604 INC POINTR+I 00A8 4C 98 00 IMP COUNT 01IF A504 LDAPOINTR+I OOAB A900 DONE LDA 11-0 IF A-- 0 0121 C9 04 CMP *PHIGH+2 PET FOR SALE SUM IS VALID 0123 FO DE BEQ RESET GOAD 60 RTS 012585 04 STA POINTR I-1 f595 00AE A9 FF OVFLOW LDA *$FF 01274C OD 01 IMP AQUIRE IF A=-I SUM IS 0I2A A5 03 ENDREC LDA POINTR INVALID SAVE SYNC for one week old 00B0 60 RTS 0I2C 85 05 STA SYNCL 012E A5 04 LDA POINTR+I PET 2001 POINTR ;ANALOGUE TO DIGITAL STA SYNCH ;CONVERSION -2 SUCCESSIVE 013085 06 with 8K RAM. ;APPROXIMATION TECHNIQUE 013260 RTS ;RETURNS IN A REG BASIC in ROM. ;REPLAYS CIRCULAR BUFFER Demonstrations provided. 00B1 A9 80 A2DSATLDA *$80 ;FILLED BY RECORD. BPI TOP BIT ;SYNCHRONISES SCOPE TO START Inquiries welcome. 008385 01 STA MASK ;OF BUFFER 0085 8D 00 17 STA DA Tel: Yateley (0252) 876650 0088 EA NOP 00B9 AD 02 17 NEXT LDA DB 0133 A9 04 PLAY LDA *4 (near Camberley, Surrey) GET RESULT. PB2 AS SYNC 00BC 6A R OR A 01358D 03 17 STA DDB INTO CARRY OUTPUT OOBD 90 OA BCC ONE 0138 A9 00 RESTRT LDA *PLOW LEAVE SET 013A 85 03 STA POINTR Circle No. 162 00BF A5 01 LDA MASK 013C A9 02 LDA *PHIGH ELSE CLEAR 013E85 04 STA POINTR+ I 00C I49 FF FOR *$FF 0140 AO 00 LDY *0 00C3 2D 00 17 AND DA 0142 131 03 CONT LDA (POINTR),Y COMPLEMENT DA 014420 72 01 JSR YOURS 0006 8D 00 17 SRA DA 0147 8D 00 17 STA DA 00C9 46 01 ONE LSR MASK OUTPUT SAMPLE TERMINALS IN 00CB A5 01 LDA MASK 014A A5 05 LDA SYNCL OOCD OD 00 17 ORA DA 014C C5 03 CMP POINTR SET NEXT BIT IN DA 014E DO 10 BNE NOSYNC STOCK OODO 8D 00 17 STA DA 0150 A5 06 LDA SYNCH 00D3 90 E4 BCC NEXT 0152C5 04 CMP POINTR» I MASK INTO CARRY? 0154 DO OA BNE NOSYNC USED OLIVETTI TE 300Series e.g. 00D5 AD 00 17 LDA DA 0156A9 04 LDA #4 Upper/Lower-case, high -quality printout YES! SYNC PULSE TO 00D8 60 RTS 0158 8D 02 17 STA DB RS232 serial interface, from £300. 0158A9 00 LDA *0 0I5D ED 02 17 STA DB TC 380 intelligent terminal for 00D9 *-$100 SCOPE 0160 E603 NOSYNC INC POINTR connection to modem as new, only ;CONTINUALLY SAMPLES AN BUFFER £400. ;INPUT WAVEFORM AND STORES 0162 DO DE BNE CONT POINTR IBM 735 I/O writers from £175. ;IN A CIRCULAR BUFFER OF 512 0164E6 04 INC POINTR+ I ;BYTES' IF P81 GOES HIGH RESET ;RECORDING STOPS, BUFFER 0166 AS 04 LDA POINTR+I ;POINTER IS STORED IN SYNCL & 0168C9 04 CMP *PHIGH+2 J & A COMPUTERS ;SYNCH. 016A FO CC BEQ RESTRT 0I6C 85 04 STA POINTR+I 016E 4C 42 01 IMP CONT 15 Fleetwood Gardens 010020 51 00 RECORD JSR SETUP 0171 60 RTS Market Harborough 0103A9 00 RESET LDA *PLOW 010585 03 STA POINTR Leicestershire LE16 9LX POINTER TO 0107A9 02 LDA *PHIGH ;USER DEFINED ROUTINE Tel:(0858) 7620 BEGINNING OF 010985 04 STA POINTR+ I 017260 YOURS RTS CIRCULAR 0173 010B AO 00 LDY *0 BUFFER Circle No. 163

PRACTICAL COMPUTING December 1978 69 Basic aid to small eme,mmeem PROFESSIONAL business BUSI NESS This article is the first of two from embarking on a course of computer- SYSTEM isation. parts describing a program in It would, however, be unfortunate if N We can offer a complete Turnkey Basic to aid a small business inthese factors dissuaded him, since they are installationwith everything including far from the only applications for a com- evaluation, system design, install- the preparation of quotations, E. puter in business. ation and training. invoices and order forms. We are familiar with these applications Our range of systems handles pay- a simply because they have been available for roll, accounts, inventory, invoicing, N. many years on time-sharing bureaux and financial planning, plus any by Nick Hampshire large mainframes, but we are wrong to specialised applications you think of them as the only applications; the require. ANYbusinessman considering purchase ofaverage business abounds with candidates Why not contact us Today? a computer, however big or small thefor computerisation, applications which GRAFFCOM machine, must be certain the machine will willresultin increased efficiency and 52 Shaftesbury Av., LondonW1 not only pay for itself but actually contri- reduced effort both for the businessman 01 -734 8862 bute towards theprofitabilityof his and his employees. company. For many, thisis a difficult Examples of such applications are the MIMIEMMEISM decision. production of quotations,orders and In most businesses the main financialinvoices, all three of which consume a return from buying a computer willlarge amount of time and are prone to a Circle No. 164result from a reduction of costs through considerable degree of error. greater efficiency and improved produc- tivity. Obviously, the number and scope Three ideal jobs PET Owners of the applications depend a great deal on It is not unusual for a businessman to M icrochess £14 Payroll II £25 the size and power of the machine andhave to produce a dozen quotations a Stock Control Ill £12 also, though perhaps to a lesser extent, theweek, each accurate and fully -itemised. Income Tax 77/78 £12 nature of the business. Each involves a long and complex process, Word Processor III £12 The average smallbusiness systemwhich usually has to be done by the Data File Handler £12 Text Editor & Manual £12 would be a disc -based computer with abusinessman himself and, depending on Cassette Filing Tutor £10 medium -speed printer, programmable inthe length of the quotation, each can take PET Basic Tutorial £19 Basic and costing about £3,500. It would him well over an hour to produce. Assembler/Editor £25 not be unreasonable to expect such a Production of orders and invoices in- Backgammon £8 Bridge Challenger £9 system to pay for itself in two years. Thisvolves a similar process; a large number Access/Barclaycard orders accepted by would require the computer to contributeof calculations are involved where, if a telephone. more than £30 pereek in increased pro- mistake is made, considerable inconven- For a copy of our new catalogue ductivity and efficie cy. ience and perhaps financialloss may of 100 Business, Educational and To justify the p rchase of a computer result. Applications programs send s.a.e. by a business, we must look for the Again, it is usually advisable that the to: applications where the greatest improve-businessman supervises and checks the ments in efficiency and productivity can writing of orders, time which he can often etsofi ill afford to spare. PO Box 9, Newbury, Berks. RGI3 1PB be achieved. Preferably this should be Tel. 0635-201131 01-352 1100 done with the minimum programming We thus havethesethree jobs as PET is the trademark of Commodore Systems effort and changes in organisation of the idealcandidatesforcomputerisation, business. since they are both labour-intensive and Circle No. 165 prone to potential costly error. I have Intricate written a fairly simple set of programs,

\JIM vay LUUI JCJ 011 LIIC .1.11UJ1113 411U There are many well-known applica-included in this article, to perform these

Professional Use of Microcomputers tions for computers in business, stockfunctions. It will, I hope prove a useful control, general ledger and payroll. Anguide to those considering implementing a Held in a pleasant rural setting

less than 2 hours from London. application such as payroll is very intri- similar system.

cate and requires that the person writing Course fee of £18 includes lunch the program has a very good understand- Quotations and full documentation. Full

ing of taxation. Such applications can, if The writing of an order, invoice or a range of equipment demonstrated. TRS-80 Level 2 debug routine not properlywritten,be apotential quotation can be divided into two pro- . source of serious financial losses in the cesses. The first is the selection of the items, plus graphics locator software on

business. such as charges, to be included; in the cassette £2 plus SAE.

A stock control system may result in the case of an invoice, this will be derived PROTECHNIC holding of excessive or inadequate stock, from the customer's order and your own Yarwell, Peterborough

Tel: (0780) 782746 due to a badly -written and designed re-delivery notes. The second process is the

NIIMMINIIIIIM11111110111111111111111111111W110 ordering algorithm. These are factorswriting of the document, with a short Circle No. 166which often discourage a businessman (continued on next page)

70 PRACTICAL COMPUTINGDecember1978 Computabits

(continued from previous page) In a system running Altair or Micro- description of each item, the quantity, its soft Basic, the LPRINT statement can be unit price, VAT, and total price. It is this used. The Teletype 43 was chosen as a second process with its requirements ofconsole/printer, firstly because it offered neat formatted typing and a considerable the lowest -cost peripheral option for the -9 number of calculations which we shallCromemco system. Secondly, the 43 is a Distributors in -0 computerise. medium -speed printer with a high -quality `~Scotland for .?" cp With such a computer program all thatdot matrixtype -face;thisprinteris NASCOM 1 1/ is requiredisthat we enter the codeavailable also in a friction -feed version Nascom 1 can be seen in action 9-5Mon.-Fri. number of an item obtained from a stock which would allow one to use existing Callers welcome list of prices and charges and the numberstationery. of units of that item, a process repeated STRATHAND SECURITY 44 St. Andrew's Sq. BARCLAYCARD for all the items to be included. File structure Glasgow G1 5PL Given that information, the computer The most important part of our pro- extracts from memory all the relvant data, posed system is the data or stick file; this Enquiries invited from prospective performs the correct calculations, andis the common element around which all Dealers throughout Scotland. prints -out our order, invoice or quotation.our programs will be constructed. Since it GLASGOW (041) 552 6731 The product is neat, accurate, and, abovewill be necessary to access quickly a set of Tel. order welcome with Access and Barclaycard. all, produced very quickly. The computerdata which may not necessarily be in the thus is paying for itself by increasing pro-same order as it appears on the file, we Circle No. 167 ductivity,withtheaddedbonusof will use random access files. improved efficiency. A random access file is divided into an indefinite number of records, each con- Software taining a complete set of data. In our appli- The software is of very general design COMMODORE cation, a record will contain a description Solve your and can be used by any business; whatof an item of stock, its retail price, VAT Personal computer users. makes it specific to a particular business keyboard problem byadding a rate, trade price supplier code and any keyboard. are the items placed on the data file. Theother required information on that item. * Full-size professional keys data file is, of course, our stock list ofThe records are numbered 1, 2, 3 and so * Qwerty offset layout componentprices,andlabourand on; each number represents a different * Fitted in minutes ancillary charges. The system could beitem of stock-the highest record number * Existing keyboard remains fully -func- expanded by modifying the programmes is thus equal to the number of stock lines. tional to use otherfiles,e.g., customer and A constraint on the maximum number s.a.e. for price and info to: supplier, each file containing a listofof records is imposed by the capacity of names and addresses of our customersthe discs in our system. Thus, if each BOX No. 270 and suppliers, an addition which wouldrecord is 128 bytes long, we can store a PRACTICAL COMPUTING save us entering this data each time. maximum of 562 records on a 5in. disc Having gone so far we could expand the and 1,953 on an 8in. disc, assuming both system still further to store records of all are single -density and single -sided. If this transactions which would enable the data-proves to be a constraint we can add more base to be used for a general ledger sys- disc drives or insert and remove discs tem.Similarly,componentquantities manually, though this is a solution which could be stored in the stock file, which is not recommended. 4 MAG TAPE DECKS would enable the data to be used in a stock control program. We shall, howeverIdentical With controller and over 400 reels in this article confine ourselves to the use If our programs are to be able to read oftape. of a single simple stock file. and write meaningful data to and from the Hardware data file, each record must have an iden- ICL 1971 20 KC/S 556 bpi. All the programs in this article weretical construction. This means that we ICL maintained still working written on a Cromemco Z2 -D system but must decide exactly what data is required could be modified without a great deal of and which bytes within the record they OFFERS OVER £400 effort to run on any other version of occupy. Each record in the stock file in 128 (cost E26,000) extended disc Basic. The hardware usedbytes long,far more thanisactually was the Z2 -D with two 5in. disc drivesrequired. It does allow, however, for the Phone: and 32K of memory, in which was run- inclusion of further data at a later date. The data in each record is arranged as follows: M.J. Richardson or J. S. Hoy ning the standard Cromemco disc Basic. 01-387 1288 This system was interfaced to a Teletype Byte0-30Description 31-40Retail Price 43, which performed the dual function of 41-50VAT Rate or Evenings Hatfield 67133 or 51-60Trade Price console and printer. 61-70Supplier Code. Epsom 27409 The software could be altered easily to accept a standard VDU console with As you can see, the 128 bytes is not all separate printer; in the case of a Cromem- used; neither is our data as compact as it co system this would require the addition could be. The user is free, however, to of a serial I/O board (TU-ART) with the alter this to suit his own needs. The data fileisgivena name andiscalled You can advertise your shops, products printer connected to port 50. and servicesinour Shop Window In Cromemco Basic we can output to a "STOCK" in the programs. One other columns for only E6 per single column printer at this port by making the follow-data file is required in this system, known centimetre (minimum Scm). For details, ing insertions and modifications, in thisas "POINTER". The primary function of contact: case to print As. this file is to contain the highest record number so far entered. OUT $50S, 08 Tom Moloney, Practical Computing, OPEN/2/"$T5" This is required when entering a new 2 Duncan Terrace, London, N.I. PRINT/2/AS Tel: 01-278 9517 CLOSE/2/ (continued on next page)

PRACTICAL COMPUTING December 1978 71 (continued from previous page) 195 INPUT "TRADE PRICE 200 INPUT "VAT RATE % record or listing existing records, since it 201 INPUT "SUPPLIER CODE -,s 204 INPUT "IS THIS CORRECT? Y OR N ",G$ allows the computer to recognise the end 206 IF G5="N"THEN 150 210 LET 135=STR$(8) of the current "STOCK" file.Other 215 LET 5$ = STR$ (S) records within "POINTER" show the cur- 220 LET V$=STR$ (V) 225 LET C$=STR$(C) rent order, invoice and quotation num- 230 A$(31,40) = 8$ 235 A$(51,60) = C$ SMALL-MINDED bers. Each record within this file contains 240 A$(41,50)=V$ a single item of numerical data and each 245 A$(61,70) = S$ 310 OPEN/I,128/"B:STOCK" record is 10 bytes long. Note that programs 320 FOR X= I TO A -I PEOPLE 330 GET/1,X/B$(-1) are stored on disc A and data on disc - 340 IF B$(0,4)<=A$(0,4)THEN 370 drivers B, C and D. 350 PUT/ I, X/A5(-1) 360 A$=135 programmers and 370 NEXT X would-be programmers 380 PUT/ I ,A/A$(-1) Programs 390 CLOSE/I/ 400 INPUT "MORE? Y OP. N ",G$ with or without To perform the functions of printing 410 IF G$="Y"THEN 10 and calculatinginvoices,ordersand 420 RUN "PICK" two years' experience 430 END quotations, a set of seven programs are >> used. Of these, three perform the actual (probably with BASIC printing and calculations, three perform Line 110-140 reads the highest record and/or COBOL) various database update and examination number from the file. POINTER stores it functions, and thelast program ties as variable A and increments the contents to work for a small but together all the previous six. of the file by 1. ambitious (and expanding) This program is known as a menu - Lines150-201prompt theuserto software and systems house. picking program, since it allows the per- input the relevant data on the new item of Good money. Lots of mini son using the computer to select a particu-stock. The function of lines 210-245 is to and micro projects-and the lar function and run the program to per- convert the numeric data into string for- chance to play with the latest form it. Thus, after finishing a function,mat and insert it in the correct positions in micro systems: we review them the menu -pickingprogramisalways the 128 -byte string A$. regularly for Practical loaded automatically and the user asked Two important functions are performed Computing. which function he wishes to do next. by lines 310-390. It stores A$, which is the The menu -picking program thus coulddata on the new item, on the disc and also AST Ltd be regarded as a form of automatic index. sorts it, so that the description of the item Staple Inn Buildings North The reason we need this program lies in is in alphabetical order with respect to the High Holborn the fact that all our programs are stored other records on the file. London WC I V 7PZ on one disc drive and only one of them is The remaining lines of the program ask 01-242 4127 loaded at any one time into the computer the user if he wishes to insert another memory. record on to the file; if so, we branch to the The menu program thus saves us frombeginning of theprogram;otherwise immummummouninouriihaving to load manually programs from PICK is loaded from disc.

disc into the computer. The following are 10 DIM A$(128) listings of the first four programs-the 20 DIM X$(30)

25 : : remaining three will be published next 30 (a "ITEM NO DESCRIPTION

PROGRAMMER PRICE R PRICE P VAT % SUPPLIER" month-together with a brief explanation ISO OPEN/I,10/"B:POINTER" of each. We start with PICK our menu - 160 GET/1,2,I/A

170 CLOSE/I/ picking program. Note that in the program 190 OPEN/I,128/"B:STOCK" We are opening anew listing the PRINT statement is abbreviat- 200 FOR Q=1 TO, A -I 210 GET/ I ,Q/A$(- ) microcomputer retail corn- ed to @. 230 P$A$(31,40) 235 C5=A$(51,60)

panyinthe Berkshire/ 20 A"QUOTATION, INVOICE AND ORDER 240 V$,,,A5(41,50) 245 S5=A$(61,70) PROGRAM. FUNCTION SELECT." 250 P =VAL (PS) 30 A : : Surrey borders area. 40 Si "I PRINT QUOTATION." 255 C =VAL(C5) 260 V= VAL(V5) 455 "2 PRINT ORDER." 265 S =VAL(S$) 50 la "3 PRINT INVOICE." 270 X$=A5(0,30) 60 Si "4 PRINT TOTAL STOCK LIST." 70 (a "S INPUT DATA ON NEW STOCK ITEM." 280 (ii,Q ;TAB(10);MTAB(4 I );P;TAB(52);C;TAB(63); Werequirean experienced 80 (a "6 EXAMINE AND UPDATE STOCK DATA." V;TAB(74);S 00 A :(a, 290 A programmer todevelop 10 INPUT "OPERATION? 300 NEXT Q 20 IF A>6 THEN 100 310 CLOSE/I/ software and to help with 30 ON A GOTO 140,150,160,170,180,190 350 (a?'(it:5( 11 360 RUN "PICK" 40 RUN "QUOTATION" 50 RUN "ORDER" 370 END customer applications. 60 RUN "INVOICE" >>

70 RUN "LIST"

80 RUN "NEW" List produces a complete printed list of

90 RUN "UPDATE" Equity share possibilities 200 END all the data on the stock file under the headings laid out in the print statement on for the right applicant. 11 line 30. Lines 150-170 read the highest NEW is probably the most important of

the seven programs, since itis used to record number from POINTER and store

create the database used by the other pro-it as variable A. A is, in fact, the number

of the next record to be entered by NEW; grams.

Reply in confidence to: thus the highest existing record number is 10 DIM A$)128)

20 DIM 85(128) A-1.

10 OPEN/1,50/"B:POINTER" Line 190 opens the file STOCK on drive 20 GET/ 1,2, I/A BOX 269, 30 PUT/1,2,I/A+ I B and line 200 sets up a FOR -NEXT 40 CLOSE/I/

50 INPUT "DESCRIPTION ",A$ loop, to read all the records on that file

60 LLEN(A$) Practical Computing from record 1 to record A-1. 70 IF L(=29 THEN 190

*** DESCRIPTION TOO LONG ****" Lines 200-280 get record number Q 80 A" 85 GOTO 150 giummommummummil 90 INPUT "PRICE RETAIL (POUNDS) (continued on next page)

PRACTICAL COMPUTING December 1978 Computabits

(continued from previous page) number and the number of units of that from the file as A. This string is then split item. into subrecords, to obtain the stored data The item number is the same as the record which is printed -out in column form by number and is obtained from the complete line 280. This loop continues until all list of stock lines generated by LIST. records have been printed. The program The program then asks the user to make then loads PICK. sure that there is a new sheet of paper in the printer before it prints the quotation. 0 DIM A$(135) 2 DIM B$(128) The section of the program which prints 5 DIM X$(100) the actual quotation lies between lines 380 10 INPUT "NAME" ",A$(1,25) 30 INPUT "ADDRESS" ",A$(26,50) and 686. Lines 380,390 print a heading for 40 INPUT " -",A$(51,75) 50 INPUT " -" A$(76 100) the quotation eight lines down from the 60 INPUT " -",A$(101,125) top of the sheet. 240 INPUT "DATE? (EG 12.8.78) ",A$(126,135) PRACTICAL 252 INPUT "IS THIS CORRECT? Y OR N ",G$ Lines 395-500 then print underneath the 254 IF G$="N"THEN 110 274 INPUT "NUMBER OF DIFFERENT ITEMS IN heading on the left-hand side the name COMPUTING QUOTATION? "T and address of the person to whom it is 280 "INPUT THE ITEM NUMBER FOLLOWED BY THE QUANTITY IN THE FORM -1,2" being sent, and the data. The current is looking for more 300 FOR A= I TO T 310 (Ii A; : INPUT B(A),C(A) quotation number is obtained in lines 320 IF B(A)=0 THEN 340 510-540 from a record in POINTER and input. We need: 330 NEXT A 340 INPUT "IS THIS CORRECT? Y OR N ",G$ this is printed on the quotation in line 505. 350 IF G$-"N" THEN 260 The column headings of the quotation 360 INPUT "MOVE PAPER TO TOP OF FORM THEN TYPE /G/",G$ are printed in lines 556-560. The purpose 370 IF G$="G" THEN 380 t. STAFF WRITERS 375 GOTO 360 of the instructions in lines 582-586 and 380 (a-`, : :(a, :(a' :ai : u,: the subroutine called by them in lines keenness and 390 (a)" PRACTICAL COMPUTING, 2 DUNCAN TERRACE, LONDON N1.01-278 9517," 1500-2020 allows long costings with up to enthusiasm more 395 Ca :(a,"TO:": 400 (a, A$(1,25) 56 items to be laid in a neat page format 410 (0,TAB(9);A$(26,50) with 14 items per page. The first item important than specific 420 (4;TAB(9);A$(51,75) 430 ra TAB(9);A$(76,100) number is stored in B(1) and the quantity knowledge, though 440 (a TAB(9 ;A$(101,125) 500 TAB(9);A$(126, I 35) of that item in C(1); the next item is 510 OPEN/1,10/"B:POINTER" stored in B(2) and so on. some BASIC might be 520 GET/ I, I,I /W 530 PUT/I,I,I/W+I useful 540 CLOSE/I/ Loop for values 550 (a; :(a; :(a; QUOTATION NUMBER ";W In line 580 we set up a loop for values of 555 (a): : (a, 556ca " A between 1 and T where T is the num- 560 (a "QUANTITY DESCRIPTION UNIT PRICE VAT TOTAL PRICE" ber of items in the quotation, this number * OCCASIONAL 565ca, : having been entered in line 274. We are 568 U=0 : Y=0 FREELANCE 570 OPEN/ I,128/"B:STOCK" thus able toread therecords whose 580 FOR A=1 TO T 582 IF A=14 THEN GOSUB 1500 numbers are stored in B(A) in line 590; CONTRIBUTIONS 584 IF A=28 THEN GOSUB 1600 the string representation of the numeric 586 IF A=42 THEN GOSUB 1700 590 GET/I,B(A)/B$(-I) variables is then converted back to num- ideas, games, jokes, 600 P$=(31,40) 610 V$=B$(41,50) eric form and used in various calculations. poems, reviews, 620 P=VAL(P$) Each calculated entry is then printed in 630 V=VAL(V$) fiction - we'll 632 S=-INTQP*C(A))*100)/100 the correct format by line 640; having 634 0=INT(((S/100)*V)*100)/100 636 S-S+0 printed all T entries the total value of the consider anything 638 X$=B$(0,29) costingis printed -out in lines 661-670. 640 (a TAB(3);C(A);TAB(10);X$;TAB(40);P;TAB(50); O;TAB(60);S The purpose of lines 682-686 is to allow 642 Y=Y+0 : U=U 1-5 650 NEXT A the user to advance the paper in the 660 CLOSE/1/ printer to the end of the current sheet 1- COMIC STRIP 661 :51 662(i,TAB(40);" before doing another quotation, or exiting CARTOONISTS 664 TAB(40);"TOTAL VAT ";Y to PICK. 665 (a, 666 (iiTAB(50);"TOTAL ";U Next month I will conclude this article try your hand with a 670 Cr : :(a :(a(: with the listings of the remaining three 680 (a, : : : :a : pen and a running joke 682 INPUT" ",G$ programs, together with some sample runs 684 IF G$="G"THEN 690 686 GOTO 682 from all seven programs. I will also show 690 INPUT"MORE? Y/N",X$ 700 IF X$="Y"THEN 110 how this suite of programs is used, and give 740 RUN "PICK" some further ideas on how itcan be * BASIC PROGRAMS 750 END 500 N =2 expanded and modified. 510 GOTO 2000 we pay a flat £25 for 600 N =3 610 GOTO 2000 anything we publish. It 700 N =4 Handy device 710 GOTO 2000 becomes, of course 2000 (a): 5l : : FOR the keen type who likes to build from (r -v :(a) : (,, : 2010 @"PAGE ";N scratch thereisa handy device from our copyright 2020 RETURN )) Comart of St Neots. The company has designed and is manufacturing a chassis and power supply unit, the microBox, Input Section which can accommodate up to six 5100 Don't delay - write to This is the first of the output programs. printed circuit cards. The box costs £70 Lines 110 to 350 comprise the data inputand £195 with the power supply. Dennis Jarrett, 2 Duncan section. The program thus requests us to It is available by direct order through Terrace, London N1 8BJ. or input the recipient's name, address andthe U.K.-wide Comart network. telephone 01-278 9517 the date. We are also asked to input the For information: Comart, PO Box 2, number of items in the quotation for each StNeots,Huntingdon, Cambs PE19 different item; we then input the item 4NY. Tel: 0480 215005

PRACTICAL COMPUTING December 1978 73 Glosservion A PRACTICAL GLOSSARY Continuing the terminological gamut from D to E

Disc simplify classification of consumer Edit microwhichcan turnout I items, it appears typically as the wanna hold your hand in the style of a of An instruction or group of in- Adisc is disc usually bar code-the row of little black Stockhausen. metal, coatedwitha material structions (or a button) causing lines on your tins of rhubarb (or data to be inserted, deleted, or re- onwhichdata canbe recor- whatever). ded ontracks. The tracks are located. Editingis,of course, aElectro-sensitive concentric rather than the vital feature of word processing spiral of an LP. Read/write heads EAROM equipment-it is about the onlyprinters canposition themselves quickly Electrically -Alterable Read -Only feature on some. Low-cost, non -impact printers over the required data without Memory. It is effectively a synonym An editor in this case, is not an tend to use electro-sensitive havingto get throughallthe for EPROM and you can probably individual with ever -poisedred mechanisms and can be considered preceding storage area; that's why forget it-RAM, ROM and PROM pen but a program for editing as a speedy alternative to thermal disc storage is described as direct - are the significant types of mem- data. printers. Thermal printers build- access(qv)orrandom access, ory and we will be reaching them up a character by scorching a dot though itisnot really random. later. on tospecially -coated paper; Discsarefixedor removable. EDP electro-sensitive printers do the Fixeddiscs havepermanently - Electronic Data Processing is what same but with electricity rather inserted read/write heads, so they EBCDIC the Americans call dp or plain old thanheat.Since singeing takes are very fast at reading or writing Extended Binary Coded Decimal data processing. They're correct,some time, the electrostatic alter- data.Obviouslythedisccan't Interchange Code. One of the two of course. Electronic data process- native is usually faster-the clever be used to back-up the system via principalcharactercodes,the ing is not the only way to process SCI rotary printer is rated at 2,200 a dump (qv), or for file storageother being ASCII-as you will data. EDP is what computers are characters per second. The fastest but it can be used as an extension know if you read the first install- for.They process-sort, list, thermalprinter we've seen is of main memory. Fixed discs arement of the glossary. EBCDIC is modify, re-arrange-data elec- Olivetti's at 80cps-Dataproducts expensive andrare on smalleranother helpful IBM contribution tronically. The result is, hopefully, is now selling this mechanism. systems,except when usedin to standardisation. information. The Centronics Micro -I is combination with a cartridge disc. The EBCDIC code allows for anotherofthenew breed of Removable or exchangeable discs many more control characters and EDS electro-sensitiveprinters,a de- velopmentbySharpinJapan can be used for back-up and you special graphics symbols including, Exchangeable Disc Store. Thisis can keep files on them for use asthe highly -useful 'hook', 'fork' and basically ICL terminology but it is which prints at 240cps. The problem with these super- andwhenrequired.Access is 'chair', than does ASCII. a neat abbreviation to cover re- slower than on fixed disc but much Most micros usually stay with movablediscs-cartridge discs fast printers-end-user prices are faster than tape. In the removable ASCII. We won't be dogmatic and disc packs. creeping below £800 now-is that category you get: aboutitbecause some systems The usage derived from ICL you don't get a very white paper Floppy discs. Everybody's favourite might have to communicate with normally puts a figure after thefrom them. because you get cheap and reason- an IBM mainframe, though you abbreviation, denoting the capa- able fast direct access. Small and might still be able to use ASCII city of the disc drive. So an EDS 5 Electrostatic printer large size, single -and -double den-code. is a 5 megabyte unit, probably a Electrostaticprintersarenon - sity; plenty of variety there. These character codes become cartridgediscat that capacity; important when you're attaching impact, so you don't get copies but Cartridge discs. The next step up. EDS 30 is a 30MB drive and pro- they are also quiet and fast be- Usually 5 to 20 megabytes stored terminals. That is why ASCII is so bably a pack. in what looks like a large plastic popular-plugging-in terminals is cause they don't involve many plate, two inches thick and in-simplified when you can be certain moving parts. You need special serted into the front of the drivethat the list and the peripheral EDSAC paper with a di -electric coating, will assign the same meanings to The Electronic Delay Storage though. To cut short a longish -some go into the top. Faster story,thetechnique than floppies, of course. the same bit patterns. Connecting Automatic Computer wasthe involves an IBM terminal which generates first of the computers as we know charging the paper in a dot pat- disc packs. For the big boys only; tern-characters and shapes are usually 20MB up (as fast as 300M). EBCDIC code is almost impossible. and love them. It was constructed in the mathematics department of built up in a matrix, as with impact A stack of discs, normally six or matrix printers-and then passing 11 for protection in a plastic hood Cambridge University and its first ECL real task was to calculate a table of the paper through a toner solu- is thecheapest way to store tion, which causes black particles plenty of data. Emitter -Coupled Logic, a fast logic prime numbers in 1949. EDSAC's circuit usedin the fastest com- other main claim to fame is that it to adhere to the charged dots. Datamodules. Thelatest IBM Hey presto-black dots on white goodie; very expensive but veryputers. Also known as MECL- shows you what happens when you Monolithic ECL. Now forget it. don't try to force your acronyms paper. clever way to store about 3175 Electrostatic devices are usually MB ina removable sealedunit to make wordslike BUCKET, with its own built-in read/writeECMA BITWIDDLE, andFAME. Herefairly expensive and are promoted endeth the history lesson. as printer/plotters, with resolu- heads. It sounds like a skin complaint but tions of 400 or more dots per it stands for the European Compu- inch; output speeds for text can Drive terManufacturers'Association. Elapsed time be more than2,000linesper Device whichtransports some Althoughitspecifies Europe, This usually means the time taken minute. recording medium, usually discs. included in the membership are to carry -out a particular job-it branches of the large American might be called 'clock time' by corporations. The clans gather and somepeople.Processingtime Empty medium Dump establish standards which subse- ('run time' or 'mill time') is very Hold on to you're hats, it's joke Transfer the contents of mainquently arerendered obsolete. different.Youcan be onthe time again. Empty medium con- memory on to backing storage,The best such joke was ECMAcomputer for several hours buttrastswithvirgin medium and typically to give you a agonising over a standard for 80 - the processor will have been ac- neither has anything to do with security copy. column punched cards; when the tive for a few seconds. redundant nubile spiritualists. in -fighting had produced a result, Elapsed time is defined formally Virgin medium is completely un- Duplex IBM announced the totally differ- as the time between entering thetouched, like a coil of paper tape. ent96 -columncardandvery data and initial instructions and Empty medium is ready -to -record System which permitstrans- quickly followed with the floppy data-paper tape punched with mission in both directions extracting the required finalin- disc, which effectively outmoded formation. feed holes, perhaps. You'll never simultaneously. cards altogether. Well, perhaps hear either term but thefirst that's a matter of opinion; let us person to work them both into EAN say the floppy disc contributed to Electronic composer the same sentence during a nor- An uncharacteristically short the use of a new type of comput-A style typewriter machine which malconversationreceivesthe acronym, EAN stands for Euro- ing which has meant the decline of simplifies type -setting and upsets Practical Computer award for pean Article Number. Designed to the 80 -column card. trade unionists. Alternatively, a effluence beyond the call of duty.

74 PRACTICAL COMPUTING December 1978 THE SORCERER HAS ARRIVED

Introducing the personal computer you've waited for. The Exidy Sorcerer. I didn't buy my personal computer I wanted Graphics, and the Sorcerer tional 6 -slot S-100 expansion unit lets untilI found the one that had all the is super. Its 256 character set - more my system grow. features I was looking for. than any other personal computer I wanted a computer that's easy enough The Exidy Sorcerer does everything I includes 128 graphic symbols thatI can for children to use.I just connect my wanted to do and a few things Inever define. Sorcerer to a video display and a dreamed of. I wanted high resolution video. cassette tape recorder, and ifI have any It isn't magic. Exidy started with the With 122,880 points in a 512 x 240 questions the easy -to -understand Op- best features of other computers, added format,I get the most detailed illustra- eration and BASIC Programming some tricks of their own, and put it all tions. manuals have the answers. together with more flexibility than ever before available. Presto! My reasons for I wanted to display more information. I wanted to buy from an experienced waiting just disappeared. The Sorcerer displays 1920 characters Manufacturer.In five years Exidy has become the third largest producer of I wanted pre -packed programs. in 30 lines of 64 characters - equal to Software on inexpensive cassette tapes a double-spaced typed page. microprocessor -based video arcade games. for the Sorcerer is available from Exidy I wanted a full, professional keyboard. and many other software makers. The Sorcerer's 79 -key data processing I wanted to spend less than £1,000. keyboard provides designated graphics, (This is where COMP. does a little I wanted user programmability magic). My Sorcerer cost me £950!. The Sorcerer's unique plug-in ROM the complete ASCII character set in PAC" Cartridges contain programming upper and lower case, and a 16 -key Now, what are you waiting for? languages such as Standard (Altair 8k.) numeric pad. Call COMP. on 01-441 2922 or write to BASIC, Assembler and Editor (soI can I wanted memory. The 12k of ROM COMPUTER develop system software), operating holds a Power -On Monitor and Stand- systems such as DOS (soI can also use ard BASIC; 32k of RAM is supplied COMPCOMPONENTS FORTRAN and COBOL) and applic- on board. 14 Station Road, ations packages such as Word Processor. I wanted expandability. Serial and New Barnet, Herts. EN5 1OW. *Altair is a trademark of Pertec Computer Corp. parallel I/Os are built in, and the op- (Price shown ex. VAT) DEALER ENQUIRIES INVITED, A LIMITED NUMBER OF DEALERSHIPS STILL AVAILABLE.

Circle No. 309 75 We're gettingITT to give you a better

We've opened a Sales and Customer Service Centre in London. And our new factory is fully operational. Southwest Technical Products provide a range of superb computer systems with technical backing second to none.

Systems Training To suit all types of user - OEM, process Inexpensive courses (at Dover Street): control, data handling, small business BASIC - programming for the systems, and all accounting functions. businessman; microcomputers in EDUCATION; WORD PROCESSING Software made easy; SOFTWARE Low cost packages for word DEVELOPMENT- make your processing, selective mailing, microprocessor work. progress control and invoicing. Our Software Development Unit available Maintenance to prepare programmes to customer Comprehensive national service by specification. Computer Field Maintenance Ltd.

Sales Office: 38 Dover Street, London W1. Tel: 01-491 7507 Telex: 268913. Factory: 12 Tresham Road, Orton Southgate, Peterborough. Tel: 0733-234433 Telex: 32600.

the symbol of reliability

Circle No. 310