w m
BBC micro, Electron and Atom magazine
SCHOOLS: computers and IT PRINTERS: picture dumps BBC: drawing procedures INTERRUPTS: system control GRAPHIC: CAD displays ATOM: cash forum
is<^ .^: # THE GAP
An example of superior technology, total reliability and outstanding performance, combine to produce the LVL 200K dual disk drive.
A truly professional unit designed to fill the gap between the Acorn lOOK and 800K disk drives.
Also available in a lOOK single drive format. Compatible with the BBC single drive unit Powered from your BBC model B computer Disks are interchangeable with those No chance of data corruption from on-board formatted on the BBC lOOK Drive power supply. Operates either from the BBC DOS (available with the unit) or from our optional Z80 To Leasalink Viewdata Lid Scierititm House, Btidfie Street, Sandiacre, Ni)ltiii[;liani NGIO 5BA card Please send nit CP/M _ 200K Dual Disk Drivels) £389.00 (inc VAT) Supphed complete with all necessary lOOK Single Disk Drive(s) £265,00 (inc VAT) connecting leads, utility disk and full Operating Syslem(s) @ EU0.25 (itic VAT) Current F'rice Li^t Only' I I FREE operating manual.
I enclose a Cheque For^ £ Please Debi! My Access/ Bare laycard/Antex
No . . . , J I 1 1 1 i_
Narne Address: r\7i
Scientific Pom Code. Day tirne Tel No: House, Bridge Street. Sandiacre, Nottingham
"Please enclose s.a.e. Allow 28 days for delivery. NGIO 5BA. Tel: 0602 394000 THE SPECIALISTS
OFFICIAL ACORN DEALER
M:iHiM[H:liIHi]iMUm: SOFTWARE
MOD A E260.00 + VAT WIDE RANGE OF EDUCATIONAL AND BUSINESS MOD B £346.96 + VAT ENTERTAINMENT SOFTWARE FROM THE LEADING SOFTWARE HOUSES
>lCORNSeFT SOFTWAF BBC UPGRADES £45 + VAT BBS DISK INTERFACE KIT £95 + VAT 2nd PROCESSOR (6502) + 64K RAM £170.00 + VAT 2nd PROCESSOR (Z80) + 64K RAM £170.00 + VAT A + F SINGLE DRIVES; 1 0OK E190 200K £255 400K £345 DUAL DRIVE: 200K £360 400K £480 800K £610 DISC CABLE: SINGLE £8 DUAL £12 BOOKS TORCH ZBO DISK PACK Call in for latest prices CASSETTE RECORDERS, PRINTER CABLES, LEADS, DISCS, STATIONERY, CASSETTES, RIBBONS, DUST DOT MATRIX PRINTER COVERS
EPSON MX80 FT III DRAGON COMPATIBLE EPSONMXIOOFTIIt E395.00 "^ dragon 32 EPSON FX80 FT £395.00 ONLY £195.00 CP — 80TYPE1UNLYE299.00 SEIKOSHAGP100A £180.00 Friction + Tractor SEIKOSHAGP250X £240.00 STAR DP510 — 80 COLUMN ORIC-1 ONLY £325.00 48K £1 55.00 INC Friction + Tractor ONLY VAT COMMODORE 64 iMWiiJIIIJJIJ:IL'm THE PERSONAL COMPUTER FOR ONLY £290.00 + VAT ^SiiyEf^-REEO QUALITY DAISY SERVICES WHEEL PRINTER/ TYPEWRITER SERVICE CONTRACTS TO EDUCATION FOR ONLY AUTHORITIES AT DISCOUNT £399.00 + VAT INC RS232 INTERFACE WITH 2K BUFFER RENTALS MAIL ORDER AND RETAIL SHOP, TRADE AND MiK'lliiliK' EXPORT ENQUIRIES WELCOME. GOVERNMENT AND EDUCATIONAL ESTABLISHMENTS OFFICIAL 4" MICROVITEC 1 431 1 COLOUR MONITOR RGB INPUT ORDERS ACCEPTED Price Including Connecting Lead £249.95 PLEASE ADD 15% VAT + £7 CARRIAGE 2 ZENITH 1 " GREEN MONITOR Excellent Res £80.00 CALL FOR FURTHER DETAILS ON ELECTRON CALL IN FOR FURTHER DETAILS TWILLSTAR COMPUTERS LTD. 17 REGINA ROAD, SOUTHALL, MIDDX. TEL: 574 5271 (24 hours) OPEN 10am-8pm SIX DAYS A WEEK
ACORN USER JUNE READER SERVICE CONTENTS ACORN USER
JUNE 1983 NUMBER ELEVEN Special offer .<
to readers Interrupts What they are and how to handle binders them, by Tony Shaw and on John Ferguson
r.L News that affects YOU Beeb Forum Voice processor release, Three pages of the best ideas Granada TV micro show, around from Ian Birnbaum and Beeb terror show, micro floppy readers
.1 ."•",
THESE quality binders have News feature been specially commissioned Not 100 yards from Big Ben, Schools: 8 page pull-out is in for readers from a major British history the making Information technology: what it manufacturer. They are available means for computing in primary exclusively through Acorn User schools by Tricia Strong and at an introductory price of £3.95 .t.!.. Paul McGee which includes postage and £1100 competition packing. So, keep a year's worth of Two-part quiz begins with BBC *»•• • your favourite magazine in micro, disc drive and printer as first prize •J i prime condition, send for one Atom Forum of these maroon, simulated leather binders. Acorn User is Barry Pickles offers cash • • • printed in gold on the front and for readers' wrinkles, and with few of his own spine of each. Techniques kicks off a Make your cheque payable to Stan Froco kicks off a new series Addison-Wesley Publishers with sorting Ltd, and send it to BKT (Subscriptions), Douglas Road, .: ,—. Tonbridge, KentTN9 2TS. « i « Interfacing » Include your name and Paul Beverley tests out address or use the form on Hints and tips the AU interface box page 92. Allow four weeks for Would you believe a 50p network? delivery. With overseas orders, Read Joe Telford's ideas add £2 for Europe (total £5.95) and £5 for the rest of the world (total £8.95, airmail). Also turn to page 92 for details Reviews of other reader services - Graphics View or Wordwise? subscriptions, back issues, Drawing techniques and CAD by Two wordprocessors run photocopies and reprints. Jim McGregor and Alan Watt Paul Beverley's gauntlet
How to submit articles: You are welcome lo send articles io the Editor ot Subscription Information: Send Acorn l/ser for publication. Acorn L/sercannotundertaketo return them unless a your cheque or postal order made stamped addressed envelope is enclosed. Articles should be typed or computer pavable to Addison- Wesley Publishers written with double line spacing. Black and white photographs or trans- Ltd lo: Acorn User, BKT (Subscription parencies are also appreciated. It submitting programs a cassette ordisc is vital. Services) Ltd, Douglas Road, Tonbridge, Payment is £50 per page or pro rata. Please indicate if you have submitted your Kent TN9 2TS. England, Tel.(G732) article elsewhere. Send articles, reviews and information to: The Editor, Acorn 351216 Telex: 95573 User, 53 Bedford Square, London WC1 B 3DZ.
ACORN USER JUNE 2
JUNE content; NOTICEBOARD
Micro books offer ***** *•** to subscribers
i i Acorn User has arranged a special Reviews £1 discount with Addison-Westey Publishers on the following books. Three superb graphics packages Details of this offer (which applies under Mike Milne's scrutiny, to subscribers only) are contained from £10 to £35 in an insert to this Issue. D The BBC micro book
• f * Basic, sound and graphics • * • * *•« *•» Jim McGregor and Alan Watt Printers Normally £7.95 Write your own graphics clumps Subscriber price £6.95 with George Hill's guidance D Assembly language program- Cover illustration ming on the BBC micro • * * by Stuart Hughes John Fergusonand AnthonyShaw « Normally £7.95 Subscriber price £6.95 Readers' letters Editor Tony Ouinn D Games BBC computers play
Sound, radar, bugs. . . it's all here. Editorial Assistant Tim Hartnell,S M Gee and Mike James Plus new personal ad service- Free! Kitty Milne Normally £6.95 Managing Editor Subscriber price £5.95 Jane Fransella *H D Creating adventure programs u.. Production Peter Ansell on your BBC micro Reader services Tina Teare Ian Watt The value-for-money add-ons Marketing Manager Normally £6,95 Paul Thompson Subscriber price £5.95 to get the best from your mag Promotion Manager
* 1 Pat Bitton
i Publisher Stanley Malcolm Authors please note Dealer list Designers and Typesetters We've been inundated with articles GMGraphics, Harrow Hill for publicallon - many ot an ex- Whether you live in Devon, Munich Graphic Designer tremely high standard. Ittakestime or Wellington, we can tell you Phil Kanssen to read them, try listings out and where to go Printed in Great Britain edit them - which is the only way by t.T.Heron & Co. Ltd to maintain standards. Also please Advertising Agents remember that magazines work Coming soon in Acorn User: Marketplace Computer Ltd at least two months in advance. Electron: yet more exclusive 20 Orange Street So please bear with us if you London WC2H 7ED the scoops on way 01-930 1612 hear nothing for weeks (although all submissions are acknowledged). Teletext: the adaptor under Distributed to the News Trade scrutiny by Magnum Distribution Ltd. Thanks for your patience and 72-8 Fleet Street, apologies foranyfrustration caused.
Printers: colour graphics dumps London EC4Y 1 HY Tel: 01-583 0961 ^nH Interfacing: add a second Telex: 893340 Magnum G- keyboard Published by Free personal ads Atom: sound revisited Addison-Wesley Publishers Ltd. 53 Bedford Square, STARTING from the next issue, we Reviews: EPROM programmer, London WC1 B 3DZ plan to run a free personal ad service. utility ROMs, games Telephone: 01-631 1636 It's individuals only, Telex: 881 1948 for no companies Birthday: Acorn User is ISSN: 20M 7002 7 please. See the form on page 89 if one-year old in July! ©Addison-Wesley you've got anything to unload. First Publishers Ltd 1983 come, first served, so get a move on!
Annual subscription rates All rights reserved. No part of this publication may be reproduced without UK £15 prior written permission of the publisher. The publisher cannot accept any Europe £18 responsibility for claims or errors in articles, programs or advertisements Middle East £20 published. The opinions expressed on the pages of this magazine are The Americas and Africa £22 those of the authors and do not necessarily represent those of the of tt}e World Rest £24 publisher, Acorn Computers Ltd, or Acornsoft Ltd. Acorn, Acornsoft, and
Ttiese prices are irictusive of post and \ the Acorn symbol are the registered trademarks of Acorn Computers Ltd packing (air mail overseas) for 1 ssues and Acornsoft Ltd,
ACORN USER JUNE Technomatic Official BBC Dealer 01-4521500 01-4509764 01-4506597 Telex: 922800
BBC DISC SYSTEM BBC Disc Interface inc. 1 .2 operating System £95 Installation £20 Model B £399 BBC Sifigle Drive (100K) I price includes VAT. Can extra £81 £230 + £6 Carr. BBC Dual Drive (800K) Complete Upgrade Kit £50 £6 Carr. Installation £15 £699 + Individual Components also available. BOOKS tNoVAT- apftp/Book) All mating connectors with Basic Programming on BBC £5.95 cables in stock. 30 HR Basic (NEC) £5.95 'VIEW BBC Word Processor ROM Let your BBC teach you to Program £6.95 BBC Micro Revealed £7.95 Teletext Adaptor Assy. Lang. Program on BBC £8.95 Program the 6502 £10.75 6502 Games £10.75 Wide Range of Business, Education & Fun Software in stock 6502 Software Design £10.50 BBC Micro An Expert Guide £6.95 SEND or PHONE FOR OUR BBC LEAFLET BBC Computers Play £6.95 PRINTERS LaA.^ iMECPC8023BEC BBC • 80 Cols. 100 CPS • Proportional Spacing • Hi-Res & Block Graphics SYSTEM • • «^e^ Bi-directional Logic Seeking Forward & Reverse Line Feed • International & Greek Alphabet • Auto underline PACKAGE^T^^fl!^ • Super & Sub Scripts • 2K Built-in buffe comprises of a BBC Model B £345 + £8 Carr. This package and EPSON RX80 & FX80 NEW computer fitted with disc interface dual drive, PC 8023 • RX80100CPS80Col. Tractor Feed — -r t'T W.P. ROM 800K NEC • FX80 160 CPS 80 Col. F&T Feed. Full specifications on request. Printer and 12" Green Screen Monitor. RX80E298 FX80£430 MXlOO F/T3£425 Carr. /Printer £8 The system is supplied complete with all SEIKOSHA GP100A £180 + £6 Carr. manuals, connecting leads and software SEIKOSHA GP250 £235 + £8 Cam for stock control, invoice and statements Parallel Printer Lead £13.50 2000 sheets 9 y2" x 11" Fanfold and mailing lists. of £139. Paper £13.50 -I- £3 p&p Serial Interfaces in stock. Package Price £1,500 a saving
BBC COMPATIBLE 5%" DISC DRIVES DISKETTES in packs of 10
These are TEAC mechanism fully compatible with BBC. They are Single Sided 40 tracks £15 Single Sided 80 tracks £24 supplied with independent power supply and housed in BBC Double Sided 80 tracks £32 p&pt:2/pack matching cabinet. Lockable Box 30/40 discs £21 SINGLE DRIVES: 100KE190 200KE255 400KE345 60/70 discs £32 DUALDRIVE: 200KE360 400KE480 800KE610 Library Case £2 Drive Head Cleaning Kit £15
Carr, C6/singie drive ca/Duai rJnve. Disc Cable: Single £8 Dual £12 Disk operating manual & fornnatting diskette £17.50 BBC Compatible Cassette Recorder £26 + £1.50 p&p MONITORS Cassette Leads Microvitec 1431 14" RGB 12" Hi Res Green Monitor 7 pin DIN - 3 jacks £3.50 £249 + £8 Carr. £99 + £6 Carr. 7 pin DIN - 3 pin DIN + jack £3.50 Microvitec 2031 20" RGB Also available Sanyo & Kaga RGB Computer Grade Cassette C12
£319 + £10 Carr. Monitors 50p each or 1 for £4.50
Please send SAE for our detailed price list of electronic and computer components We carry a wide range of connectors and assemblies, Microprocessors, RAMs, EPROMs, Crystals, etc. Price Lists, Leaflets available on request. Large stocks enable same day despatch on most orders. Special pricing for dealers purchasing in quantity. Please check for delivery details.
PLEASE ADD 40p p&p & 15% VAT Technomatic Ltd (Export: no VAT, p&p at CosI) MAIL ORDERS TO: 17 BURNLEY ROAD, LONDON NWIO lED Orders from Government Depts.,& Colleges etc. welcome. SHOPS AT: 17 BURNLEY ROAD, LONDON NWIO Detailed Price List on requesl. (Tel: 01-452 1500, 01-450 6597. Telex: 922800) 305 EDGWARE ROAD, LONDON W2 Slock itemsarenormally by return of post.
ACORN USER JUNE NEWS
Summer micro show on Granada CHIP-IN is a TV series on at the gap between the User groups and com- micros to be shown on hardened user and the puter clubs in the North- Granada this summer. person who is totally west have been approached The programme will run mystified. and one idea is to have two for six weeks while the early 'The series will not cover families taking part in each
evening local news show programming, or lift the lid,' episode.
Granada Reports is off the said Connors, but will If you have any ideas for air. Peter Connors who is concentrate on 'reviewing the series, write to: Chip-In, working on the pilot show software, add-ons and ap- Granada TV, Quay St, described Chip-In as 'aimed plications'. Manchester M60 9EA.
AU author wins ACORN User author Peter Voice processor Voke (see May's issue} won the race to solve Acornsoft's Castle of Riddles adventure game. to plug Beeb liole Details of the competition were released on the same THE long-awaited speech from Basic or assembly day to prevent anyone synthesis chip - which uses language. They take the form: gaining an unfair advantage. the voice of Kenneth Kendall Peter worked on the SOUND -1, number,0,0 - should be available at program over the weekend or and dealers this month. managed to get his SOUND-1 , ASC"char",0,0 Acorn's Speech Processor correct entry in at 8.31 am was due to be launched by In the first 'number' is a on the Monday. case Kendall. . . chip's voice last Christmas, but has been designated value which calls His prize, presented by on early BBC machines held up so the cartridge a particular word, while in Acornsoft's David Johnson- which has now been ROM system could be fitted the second case 'character' Davis, included a choice of covered over). at the same time. is an ASCII code. E1500-worth of hardware Acorn plans to release a The system will initially With assembly language, and software. vocabulary extension and be limited to a vocabulary of OSWORD and OSBYTE can games in cartridge form 164 words, or part-words, be used. The first has the later in the year. Amazed reader but this can be extended by same effect as the Basic Mr Tugwell was amazed to cartridge ROMs or from sound command, while the n Acornsoft's View word be a runner-up in our 'Grin' RAM (see last October's second reads the speech processing chip should now competition in May. He rang Acorn User for details). processor direct. be at dealers (see page 73 in to say how delighted he Former-BBC newsreader A new-found *FX call for comparative review with was that 'ordinary people' Kenneth Kendall provided controls the speech pro- Computer Concept's Word- could win. knows, Who he the voice recordings which cessor. It consists of wise). It costs E70 (including may even win the competition were digitised to provide *FX209,0 to turn it off, and VAT. fitting and 1.2 ROM). starting in this issue. vocabulary for the synthesis *FX209,80 to turn it on. View can be used with
chip. Hence Acorn claims it When the two voice chips most printers automatically, Dumping service is the first English-speaking are fitted (C55 inc VAT and but cassettes are to be (rather than American) voice 1.2 ROM if needed), dealers made available which will
BEEBPRINT is offering a synthesiser. enable the ROM cartridge allow it to use the special printer service for anyone Voice commands are socket. This is located on facilities of each printer wanting a hard copy of their issued using the sound the left of the keyboard (the (italics, bold, double-height programs from cassette. A statement (on channel *- 1), mysterious hole or 'ash tray' characters etc). sample price is El.95 for &20 blocks. Beebprint, 19 Orchard Way, Hurstpierpoint, West Sussex BN6 9UB. August first showing for Electron
THE Electron - Acorn's subscribers will receive a Logo club new hobby micro - will be El voucher against the E2 LOGO users can now join launched in August and entrance fee (children half theif own club (Blug) which will coincide with the price) in the August issue. lACORN plans to produce a quarterly Acorn User Exhibition. Acorn, Leasalink View- newsletter and an annual So it will be the first data and Microage have USER journal. A conference is chance to get your hands already booked major being set up for the on one. as well as using stands at the Exhibition. beginning of September. the new BBC add-ons. Bulk discounts on tick- EXHIBITION Details from Ram Valley London's Cunard Inter- ets are available to BBC MICRO -ATOM ELECTRON (secretary), British Logo national Hotel will host schools for the Exhibition. User Group, c/o Shell- the event on August 15- Details from Acorn User Cunard Hotel London W6 Centre for Mathematics, 28. Acorn User is sponsor- Exhibition, 20 Orange St, 25 -28 August University of Nottingham. ing the Exhibition, and London WC2H 7ED.
ACORN USER JUNE 9
MAIL ORDER AND RETAIL SHOP. TRADE/FXPORT INQUIRIES WELCOME GOVERN WATFORD ELECTRONICS MENT AND EDUCATIONAL ESTABLISHMENTS OFFICIAL ORDERS ACCEPTED. CARRIAGE unless staled otherwise, please add 50p to all Cash orders DEPT ACORN, CARDIFF ROAD, WATFORD, Herts, England UK customers please add 15% VAT to the total cost incl. Car. SHOP HOURS: VAT: S.OOam to 6.00pm Monday- to Saturday ACCESS ORDERS: Simply phone: Tel (0923) 40588. Telex: 8956095 Watford Watford 109231 502M.
36" BBC MICROCOMPUTER NECPC8023BE-C Printer PRINTER LEAD Readv made £11 Model A £299 Model B £399 TOO CPS, Bi-directional, logic seeking, 80 MISCELLANEOUS CONNECTORS ' inc/. VATfcarrC?) columns, 7 9 Dot matrix, superscript and P/ugs Sockets subscript, hi-res block graphics, underlining. RGB (6 pin DIN) 30p ^p to UPGRADE KITS. Upgrade your Model A Tractor/ Friction feed, reverse linefeed, 2K RS423 (5 pin Domino) 30p 40p save Mod. B with our Upgrade Kits and Buffer, proportional spacing. £320 (£7 carr) Cassette 17 pin DIN) 25p 65p yourself £ s s s EC0NET(5pinDIN) 15p 25p Paddles (15 pin 'D') £1.10 £2.15 • BBC1 16KMemorvl8«4816AP-3 lOOnSI E18.00 EPSON Printers FX80 Plug 6 pin 75p - • BBC2 Printer User I/O Port E6.98 DISC Power 10" Tractor/ Friction feed, 160 CPS, 1 1 .' • BBC3 Disk Interlace Kit E75,00 matrix, 137 columns max.. Bidirectional, • BBC4 Analogue I/O Kil E6.40 READY-MADE LEADS for BBC Logic seeking, proportional spacing. Hi-res bit • BBC5 Serial I/O Kit £6.70 CASSETTE LEADS: 7 pin DIN Plug • Kit E6.10 image, Italics & Elite Char, Subscript & Super- BBC6 Expansion Bus to5pinDINPIug + IJack Plug f2,00 • Printer Cable Ready made 36" £11.95 script. £395 (£7 carr) to3pinDINPlug -i- IJack Plug £2.00 • Complete Upgrade Kit Mod. A to Mod, B £43.00 MX100FT/3 to7 pin DIN Plug £2,50 to3 Jack Plugs £2.00 15" Carriage, 136 columns, plus all the facili- ties of MX80FT/3 Onlv£425 (£7 carr) 6 pin DIN to 6 pin DIN Plug (RGB) £2.50
DISC DRIVES BBC Compatible LISTING PAPER Official JOYSTICKS £11.50/pr 8^" or 9^" Fanfold paper plain or ruled
1 sheets} £7 ( 1 carr) ( 000 50p LIGHT PEN " All parts available for the Acorn User's 1 5 fanfold paper 1 1 000 sheets) £9 ( 1 50p carr) "SHINE A LIGHT" Light Pen article for £8.50 Teleprinter Roll (econo paper) £3 ( 1 50p carr) ^^"""^ MONITORS GEMINI'S BUSINESS SOFTWARE MICROVITEC 1431. Written by professional Chartered Accoun- 14" Colour Monitor. tants and coded by competent Programmers. used in RGB Input, (as Ideal for small & medium size companies. Now BBC programmes). stock. US50A - TEAC Uncased, Single sided, available from FREE Interface Lead, • PACKAGE £82 40 track, 5i", lOOK £125 CASH BOOK ACCOUNTS (carrf7) CSBOA-'TEAC Cased with own Power Supply. £249 • BEEBCALC. SPREADSHEET ANALYSIS S/S 40 track, 5J", 100K £180 SANYO 3125 14" Colour. RGB & V.H. Sync. £17 with own PSU, CD50A- TEAC Twin Cased Attractive screened metal Cabinet. Value for • INVOICES & STATEMENTS £17 Single sided, 40 track, bl". 200K £350 money. £199 (carr £7) • COMMERCIALACCOUNTS £17 CSBOE-TEAC Single case with own PSU, • MAILING LIST £17 Single Sided, 80 track, bl~. 200K £250 Interface lead for Sanyo £8 • DATABASE £17 CD50E- 'TEAC Twin cased with own PSU, ZENITH 12" Green Monitor. £17 Double sided, 80 track, 5J".400K E475 • STOCK CONTROL Hi-resoluiion E75(carr£7) CD50F- TEAC Twin cased with own PSU, Doublesided, 80 track, 51", BOOK £599 Mitsubishi Slim Line - Uncased, Double density. BBC FORTH on Cassette Acorn ATOM Double track, 51", One Megabytes, track density Follows FORTH-79 standard and has fig- only £220 UTILITY ROM 96TPI , track to track access lime 3mSec FORTH facilities- Provides 260 FORTH Single Mitsubishi Slimline cased with own words — infinitely extensible— Full screen WEROM is Watford Electronic's own most PSU DSDD. 1 Megabytes (400K with BBC) £275 Twin Mitsubishi Slimline cased with own PSU. editor — Allows full use of MOS- Permits use sophisticated but easy to use 4K ROM based DSDD 2 Megabytes I800K with BCC) 1535 of all graphic modes, even 0-2 (just)- Easy on BASIC extension for Acorn ATOM, Plugs Single Drive Cable tor BBC Micro £8 recurtion — Runs faster than BBC BASIC straight into the utility socket in an ATOM with Twin Drive Cable lor BBC Micro £12 Only £13 floating point. The special features are: Verbatim Diskenes, S/sided £20 10 BJ". FREE 70 page manual & a Summary card. High Speed Tape Interface -Memory Dump, D/Sided £30 10 Verbatim Diskettes. b\", Modify Machine code breakpoints- BASIC BBC FORTH TOOLKIT Error Trapping-READ, DATA and RES- TORE-Full BASIC Keyboard Scanner (BBC Adds following facilities to FORTH. 6502 like)-FULL Disassembler-AUTO Line Assembler, providing machtne-code within GP100A Numbering -PLUS: CHAIN, Cursor Move- BBC PRINTER FORTH — Turtle graphics enables easy to use ment, Loop Aborting — Easily Extendible colour graphics— Decompiler routines ena- further. Supplied complete with instruc- bles versatile examination of your compiled tions. £9.95 FORTH programs -Full double number set — An example FORTH program & graphics demonstration— other useful routines — 64 NEW . . . NEW . . . NEW page Manual. Only £10 3 New Adventure games. May be the best yet written. We strongly recommend Ihem, All have Trac- CASSETTE RECORDER & ACC. over 200 individual locations and packed with Feed. 80 puzzles. A game can take easily months to finish. compression techniques can Tins, 30 Top quality Slim-line, portable Cassette Recor- Only sophisticated squeeze so much in. irmal & derfor Computer use. Mains/ Battery operated double width with counter. £28 ADVENTURE QUEST (32K) £8.60 £8.60 Characters. Dot resgraphics. Parallel Interface C12 Computer Grade Cassettes in library COLOSSAL ADVENTURE (32K) Standard. Our price includes FREE 500 cases 40p DUNGEON ADVENTURE (32K) £8.60 SHEETS of PAPER. Only£175(£7carr) RIBBON CABLE LEADS 36" long • SPECIAL OFFER • (Female Plug at one end, other end free) 2764 EPROM 1 + 425p 25 + 395p • SEIKOSHAGP25aXlO"TractorFeed. SK9 Printer Cable (26 way Female) C2.75 EPROM COPYING SERVICE 80 col. 50 CPS, normal & double width & SK10 I/O cable (20 way Female) £2.00 Now available while-u-wait height characters, RS232 & Centronics SKI 11MHz Bus Cable (34 way Fem) £3.20 Interfaces standard. £235 (£7 carr) SK 12 Tube Cable (40 way Female) £3.70 £2 per chip
ACORN USER JUNE BBC GAMES SOFTWARE BeebPen WHERE? £6.95 (BUG-BYTE) (BBC Wordprocessor in 4K ROM) Do you know 'WHERE?' you are? This well written has been SPACE PIRATES £ 6.95 BeebPen written completely in machine program, using high resolution graphics offers limed SPACE WARP £ 7,80 code for the BBC Micro to facilitate maximum speed tests on the geography of Great Britain. GOLF £ 4.75 and number of functions. It is without doubl one of DRAGON QUEST £10,00 the best thing to happen to BBC Micro since its (32K1 £7.00 FRUIT MACHINE £ 4,75 launch. BeebPen has been designed to be as simple WORLD GEOGRAPHY CITY DEFENCE £ 5,75 to use as possible while still retaining the maximum Beautifully drawn Hi-Res colour map of the world illustrates and aids MULTI-FILE £ 8.75 power and versatility. It has numerous functions this graded series of tests on BACKGAMON £ 6.95 including right justification, block operations, text capital cities and populations of the world. compression, full cursor control with on screen editing and a full set of printer options. WRITING £4.80 BeebPen ROM plugs-into one of ihe ROM sockets, Full screen demonstration no track cutting required. of correct formation of (COMPUTER CONCEPT) Special Introductory Offer; £32 lower case alphabetic characters. Several choice of ASTEROID BELT £ 7.80 sequence, (5 7yrsl, CHARACTERS £ 5.80 HITCHHICKER £ 5.95 NEW . . . NEW. . . NEW 13 SOCKET BOARD £8.00 SNAKE £ 7,80 ROM PROGRAMMING MADE EASY Qq^ WATFORD'S own 13 ROM Sockets Board for BBC - SPACE HAWKS £ 7,80 A new concept for schools A set of workcards to Micro. It simply plugs into one of the four sockets introduce programming to primary school pupils. An currently available on the BBC Micro to give a full 16 invaluable asset to Teachers and Parents alike. The ROM Socket capability (in which all ROMs may be language has been carefully chosen to provide a resident at once). The circuit has been designed to balance between 'Computer Technology' and (MICRO POWERI allow the use of RAM in this area loo. standard language. Bulky and often despised text ADVENTURE £ 6.95 Introductory Offer for the first 250 Boards: books have been replaced by the set of Workcards, ALIEN DESTROYER £ 6,95 KIT Only £19,95 Each card can be handled easily at the Computer ASTRO NAVIGATOR £ 4.95 BUILT & TESTED Only £24,95 Keyboard. Also included are a SUPPORT PRO CHESS £ 6.95 GRAM specially produced to reinforce Ihe work COWBOY SHOOTOUT £ 5.95 covered by the cards and a CHECK LIST for children CAT & MOUSE £ 4.95 and teachers to monitor progress. A must for ELDORADO GOLD £ 5,95 APPLICATIONS primary schools undertaking computer learning. FOOTER f 5,95 CONSTELLATION (32K) £6.50 GOMOKU £ 4.95 The great Bear! The Southern CrossI The Horned GALACTIC INTRUDER £ 6.95 Goat! See the night sky gloriously depicted in hi- res SOON AVAILABLE: Computer Concept's ROM LASER COMMAND £ 6.95 graphics. Constellation has been adapted and based programs; MARTIANS £ 5,95 enhanced from our successful ATOM program, MAZE INVADERS £ 4.95 BEEB-CALC Very fast & simple to use powerful spread-sheet program, MUNCHYMAN £ 5,95 DISASSEMBLER (16K/32K) £6.95 £34 MASTERMIND f 4.95 Relocatable disassembler program. Lists object code DEBUGGING PROGRAM Allows examination & REVERSI £ 4,95 and Assembler mnemonics from and to any alteration of Memory, Registers, setting of break STARTREK £ 4,95 specified addresses. The listing can be stopped and points and even single stepping through machine SWOOP £ 6.95 restarted. Page mode option and output to a printer code programs.
SEEK £ 5,95 are available. ASCII symbols may be output if ROM based £^^ TIMETREK £ 6.95 required. The Assembler code may be stored and CASSETTE based £10 ZOMBIES £ 4,95 modified and the program re-assembled. DISC DOCTOR Contains useful disc utility FILER £8.95 programs. £19
A powerful file handling program for BBC. FILER PRINTER TOOLKIT ROM Includes routines for hires allows the user to build up, manipulate, store and screen dumps for EPSON £r NEC printera. FORTH ROM for BBC retrieve data on the BBC. A very powerful package Works in any graphic mode. Has 'spooling' indeed. capability which enables data such as a program This superb compiling language now available in listing to be automatically spooled from your disc to ROM. Simply plugs into one of the ROM Socket LOGO II £9.95 The printer while using your BBC Micro for running £35 This language is very popular in American schools as other programs. £19 Full FORTH Manual E6.75 it is an ideal educational program. It can graphically demonstrate the ideas of defined procedures, sub routines, loops and even recursive programming. Gives excellent introduction to LOGO language for young and old alike.
NEW. . . NEW. . . NEW. . . BOOKS (No VAT on Books) SIMONSOFT DISASSEMBLER WORDWISE 30 Programs-BBC Micro £ 4.95 The most powerful, (lexible and easy to use Special offer only £35.00 30 Hour BASIC (BBC Micro) £ 6.00 available for Ihe Micro. Disassembiet currenllv BBC Without doubt the most sophisticated piece of 6502 Application Book £10.25 for both B. • Suitable Mod. A & Software yet written for BBC Micro, Wordwise 6502 Assembly Lang, Programming £12.50 • 5 modes of operation from Memory dump to full contains all the usual word processing features. The 6502 Assembly Lang, Subroutines £11.80 disassembly, automatic more complex facilities such as search and replace 6502 Software Design £10.50 • Ability to identify any location in memory with a or file handling commands are menu driven so that ACORN ATOM Magic Book £ 5.50 label. even a beginner can understand how to operate Advanced 6502 Interfacing £10,95 • Operating System Entry Points & Indirection them. Assembly Lang, Programming for BBC Vectors are already labelled when the Wordwise will work with whatever filing system is £ 8.95 Disassembler is loaded. currently implemented. Supplied with full instruc- BASIC Programming of BBC Micro £ 5.95 • Ability to define a 'map' of iipto 72 separate tions and manual. BBC Micro Revealed £ 7.95 areas of machine-code. BBC Micro Instant Machine Code • Output may be directed to the screen or a printer, including Software Cassette £34,00 • Areas of code can be disassembled and the EDUCATION Software Creative Graphics on BBC Micro £ 7,50 output saved on tape or disc in BASIC *EXEC BRITISH GEOGRAPHY £6.95 Discover FORTH-Osborne £1 1 ,25 format for later incorporation into user pro- Easy Prog, for BBC Micro £ 6,50 Teaches a child the locations of Cities and Ports grams. Further Prog, for £ using directional Keys. BBC Micro 6.90 • Machine-code programs may be loaded and FORTH Programmitig (Sams) £12.50 disassembled regardless of their actual run-time CAROUSEL £4.35 Getting Acquainted/Acorn ATOM £ 7.95 location. Aimed at junior school age. Sequences of colours Graphs and Charts on BBC Micro £ 7.50 • The current set of labels, map and associated and sounds teaches a child to concentrate. Intro to Micro Beginners Book {3 Ed) data may be saved at any lime on tape or disc. INTRO TO ARITHMETIC £10.45 £ 9.90 This data can be reloaded at a later date and the Let your BBC teach to program £ 6 .75 4 programs -Additions, Subtractions. Multiplica- vou disassembly continued. Micros in the Classroom £ 4,90 tions & Divisions. Help stage, moving graphics and • Full Error checking and reporting is carried out at Practical Prog, for BBC £ 5.95 colours. & ATOM each step. Programming the 6502 £10.75 Worksheet produced at the end of program. (5-7yrs is • The disassembler operated by typed com- Mastering VISICALC (Sybexl £1 1 .95 old! mands or the user definable user keys. Structured Prog, with BBC BASIC £ 9.5Q • Full instructions are supplied in the form of a JUNIOR MATHS PACK (32K) £6.95 The BBC Micro An expert Guide £ 7.90
'HELP' program. Makes learning fun for 5 - 1 1 year olds. This package • AVAILABLE on CASSETTE or DISC consists of 3 programs (menu driven) that increase Price: CASSETTE £6,95 in difficulty as your child becomes competent. A DISC S/D £9.95 very good supplement to standard educational WATFORD ELECTRONICS DISC D/D£9,95 methods. Tel: 0923-40588; Tlx 8956095
ACORN USER JUNE NEWS
Ups and downs Vision systems adapted to run on model B
for computers DIGITHURST has released {£295 plus VAT) provides images such as maps for an interface to link a model cable connections to both display on a monitor or TV. in Australia B to a home video recorder the video recorder and the This was featured in the and transfer pre-recorded BBC user port. Software recent BBC TV series THE Australian distributor images into the micro. allows the user to analyse Making (he Most of the of the BBC micro, Barson MicroEye can digitise captured images, which can Micro and has now been Computers, recently an- pictures with a resolution of then be dumped onto disc adapted to run on a model 8. nounced a price reduction. 256 X 256. although with the or a printer. Further information from This coincided with the BBC model 8 only 128 x Digithurst also produce Digithurst, Leaden Hill, opening in Sydney of the 128 pixels are used. Microsight, a £500 camera Orwell, Royston, Herts. Tel: first Australian Personal The interface package system, which can digitise (0223) 208926. Computer Show {IWarch 10 - 12) and with a 10 per cent devaluation of the Australian dollar. The model B, which Big success at sea for previously retailed in Aus- tralia for SI 860, will now sell for about $1 650 (£950 able-bodied Beeb micro at the post-devaluation MODELLING the behaviour limits are then used in the rate of exchange). of hovercraft is one of the US and Britain to improve Whilst the price of the latest applications for the their design. computer fell, Acornsoft BBC micro. Vosper commissioned the and BBCSoft products In the heavy swell of the tests, which are being made increased in price as a Solent off Southampton, a by Gifford Technology of result of the devaluation, small fast boat transports Southampton. and the average program buoys with wave and wind The Beeb is run on now costs $33 (£19). probes attached. These are batteries while at sea, and There have been persist- dunked into the choppier dumps its initial results on ent rumours that local patches of water and tape. These are then manufacture of the BBC connected to the Beeb analysed, displayed and micro in Australia is which lives in a waterproof printed out later. planned, which would case on deck. Gifford are pleased with presumably lead to a Movement of the buoys is the results, especially as the further price reduction in detected and measured by programs are in Basic. what is becoming a Buoys dumped in swell the micro. The results can fiercely-contested market. Beeb in sealed box then be taken back to the A number of local com- lab and compared to the panies are understood to way model hovercraft behave be interested, but as yet in similar conditions. no likely manufacturer has The model hovercraft are been named. tested in the same water, Penetration of the Aus- which must be as choppy as tralian market has been possible - hence the fast rather slow to date: the boat moving around to find inevitable supply pro- the best sites. Once the blem, which has now been behaviour and conditions overcome, and the relatively have been compared, the high purchase price having stability limits of hovercraft been the two principal can be determined. These .-ii causes. The majority of machines sold have gone to schools, with relatively few being Microfloppy made in Hungary Disc cliip warning purchased by individuals. However, the price re- A MICROFLOPPY disc sys- disc has an 80k capacity ACORN has warned that duction and a recent tem is being adapted for the and comes in 45-track form. only one version of the advertising campaign BBC micro. Kenda claims the number of disc filing system has should lead to an increase The Bats MCD1 micro- files per disc is virtually officially been released. in interest. floppy comes from Hungary unlimited and that deleted A spokesman said ver- In addition, the first and is based around a 72mm files can be recovered. sions other than DFS 0.9 series of The Computer (3") disc which is sealed in a The MCD1 drive is 85mm cannot be guaranteed
Programme is scheduled cassette. wide, 1 15mm deep, and compatible with other to be shown during Cumana has developed 41 mm high. Each disc- ROMs when upgrades are schools' broadcasts, com- an interface, while Kenda cassette is expected to sell made. The same goes for mencing in June (see April has written a filing system. A for £4. Econet (NFS 3.34). Acorn User). single drive should cost Bats-NCI who import the You can check which Steve MacLeod about £150 (plus VAT). drives are at 53 Ballards version you have by typing Australia Each single-sided mini- Lane, London N3. •HELP.
ACORN USER JUNE NEWS
Thatcher stands firm on cash limit for computers in schools
PREMIER Margaret Thatcher on with. has stood firm against Proposals for more money parliamentary pressure to were put to her in the earmark more cash for Commons by senior Tory classroom computers. backbencher Sir Paul Bryan
The Prime Minister says who thinks it is time the the E40 million due to be government began looking spent between now and at further ways of boosting Mtcrosight camera transfers a map onto a monitor 1986 is enough to be going computer literacy in schools. Sir Paul told Acorn User
he believes it is important to Demon terror build on the obvious classroom enthusiasm for is putty in computers - where more than four-fifths of the micros Beeb's hands supplied under the govern- pound-for-pound NO, this toothy beauty is ment's not an escaped Acorn scheme are BBC micros. programmer, but a Cham- He made a similar point ber of Horrors monster to Mrs Thatcher when he being controlled by a BBC told her during Prime micro. Minister's question time that existing government The Beeb is used to the two synchronise the 10-foot schemes were proving "a demon's movements to a phenomenal success.' soundtrack of grunts, 'Has the time not now growls and roars. come to expand those Once sound and move- schemes on a dramatic ment have been matched scale he suggested. up the programmed se- The government has quence is recorded onto announced a E200 million the sound tape. This can boost for information tech- then be played back and nology. the program operates Industry Secretary Patrick valves and pistons on the Jenkin said the five-year demon to make him move. scheme would ensure the
It can also control lighting competitiveness of Britains on the figure. IT industry, The demon is made of IT and micros in primary plastic and rubber over a education - page 45. steel skeleton, complete with moving limbs, heads, eyes and jaw. Musical launch N.J. Farmer of Leicester did the programming and forQuicksilva you can see these rugged QUICKSILVA has launched features in action at The three pieces of software for Terror Castle on Great the BBC micro.
Yarmouth's Marine Parade. A smash with monsters. . . micro's in control Their pride and joy is Muproc - a music synthesiser
for models A and B. It runs Courses and software aids available to teachers on both operating systems. THE MUSE summer course MUSE, Freepost, Bronisgrove, Place, London WC1. At E15 it's dearer than will take place at Nottingham Worcs 861 7BR. Software on maths, usual, but worth looking out University on July 25-27. And the National Union of physics and biology is for. Lectures are planned to Teachers is running comput- available from Garland Com- Two games make up the - cover all aspects of educa- ing courses at its training puting. Many of the programs trio Protector (E7.95) and tional computing at all centre. Stoke Rochford Hall. simulate practical techniques. 7^?e Wizard {E6.95). Both levels, with several addressed A 13-station BBC Econet Garland are at 35 Dean Hill, make good use of colour specifically to the BBC system is in operation and Plymouth. and graphics; Protector has machine. topics covered include Workcards for primary pulsing (not flashing) char- Topics include: program- primary, secondary and schools to introduce pro- acters, and Wizard has flying ming, Logo, networks, inter- special education. gramming on the BBC micro killer ducks! facing, music, software, Contact Penny Muir, have been released by Both need 32k and organisation, telesoftware - Education Department, NUT, Educal, 28 Ingersoll Rod, Protector only works with to name some. Details from Hamilton House, Mabledon Shepherds Bush, London. joysticks.
ACORN USER JUNE NEWS FEATURE
Beeb micro with Election fever
Martin Laug'ieid
700 bytes and each disc by Bill Penfold holds the profile of around IN A Westminster office 60 - 70 candidates. within 100 yards of Big Ben A pupil at Dr Challoners a BBC micro has been Grammar, Amersham, Dan quietly compiling the mem- has two up-graded model As bership of the next House of at home and is part of his Commons. school's computer group. Before a single vote has Recently he was one of a been cast in the next three-pupil, one-teacher team General Election, the com- from the group which puter holds potted biog- walked off with the El. 000 raphies on just about every first prize in a computing competition run by the one of the future MPs . . . and their chief rivals for the University of Kent and seats. sponsored by Barclays Bank. In a matter of days after The money has gone the Election results are towards upgrading the known the Beeb will be school's own BBC computer ready to begin printing out system. the text of the new edition Now Andy Roth and of a reference book which Parliamentary Profiles are has established itself as an banking on the Beeb essential guide tor politicians speeding the new MPs' of all parties - and Chart into the printers even commentators on the wacky before all the election world of Westminster. posters have been pulled For the next version of down. The MPs' Chart by political For regular readers of the journalist Andrew Roth will Chart, a long-time favourite be ready for publication well has been the section of ahead of its usual schedule pithy comments on the traits and political outlooks of thanks to the BBC B , . , and a 17-year-old schoolboy. various parliamentarians. Over the last few months After the last general Andy and his colleague Judy election for instance Mrs Tench have been completing Thatcher's thumb-nail profile hundreds of snappy descrip- Andy, Dan and Judy. . . with Beeb, Epson and discs was 'Iron Nancy incarnate; tions on each of the hard-working, high standards.' But where there is a requirements included being parliamentary runners. For Michael Foot, who at the computer programmer there able to extract particular Not just the constituency time was deputy Labour is usually a way, and the categories. choices of the Tory. Labour leader, the traits tag was way was provided by Judy's For instance he might and Alliance parties but also 'Pubiically angry; privately 17-year-old son Dan Tench. need to know which politicians hoping to carry gentle; mannered orator.' Dan is part of that rising Conservative backbenchers the colours for the Scottish David Steel's description generation of schoolboy were concerned with ac- Nationalists, Plaid Cymru was given as 'Dark; boyish; computer console stars countancy and had in- and the ever confusing energetic; even-tempered; whose micro mastery is terests in agriculture. Or a spectrum of Ulstermen. charm.' already sending shivers Labour MP concerned with A massive job - but one As Roy Jenkins had not clearly suiting the Beeb. returned to Westminster 'Dan is part of that However, before it could when the last edition was begin Andy discovered they rising generation of published, let's look at what would have to write their schoolboy micro stars' it says about Dr David own special program, as Owen, who is described as none of the commercially- down the backs of ageing education and the pharma- 'Celtic-handsome; v. bright; available packages could veteran programmers now ceutical industry. able; impatient; arrogant.' handle the tiling requirements. deep into their 20s. Soon, thanks to the Beeb Across the road from the
Even Acorn's own disc Though it was obviously and two months' work by House of Commons today filing system was too limited possible to adapt existing Dan, Parliamentary Profiles the new descriptions of our for the journalistic needs of software, Dan saw his job as - the name of Andy's political leaders - plus the - - the job as it holds too few starting from scratch. The company will have the rest of our next parliament files per disc. It was a case program needed to be facts flashing on to the are now waiting on the Beeb of tailoring something for capable of searching by office monitor, and being files to be printed out. the peculiar parliamentary either a candidate's name or dumped to an Epson printer Wonder what those files requirements. his constituency, and Andy's Each MP takes about hold?
10 ACORN USER JUNE w:!Ji:^:€ci:?i\j: SY5TEAA,THAT'S SO EASY J:7Tii n" aiiLi}s PLKf RLDCmSER SVSTEJTl® The PL Digilisfr Syslem enables you lo reproduce complex piciure^ and diagrams, or produce original designs, quickly, easily and accuraldy.
The package consists of ihe 'Graphics Digiiiser' incorporating a tracing pad (mapped qui by rcciangiilar grid)256miTi \ 205mm and Ihc'Coniroi Program" (Tape or Disc), This includes such features as automatic parallel, vertical, horizonial or diagonal lines, construction of boxes and eitclcsfrom two probe positicms.
freehanddraw. fill and outline, move and scale, imtnediaic edit and Ihe abililyio save compiled screens as files or reproduce by line printer
^.
/ RS.IX»jLAMOR£ LTD. \ U.K. Distributor Scientific House, Bridge St..
Sandiacre. Notts. Telephone: (0602) 394000.
Everything for the Acorn and BBC microcomputer user. ACORN USER EXHIBITION "="'™'^"'* Cunard International Hotel 25-28 August 1983
The Acorn User Exhibition at the Admission charges: Adults £2 per Cunard, Hammersmith will house the ticket, Children £1 per ticket. argest display of Acorn products ever We have arranged for nearly every assembled under one roof. It will be four exhibitor to redeem the cost of your ticket days of non-stop entertainment and when you buy something from their stand. education for parents and children alike. Group rates: 10% discount for parties The new Electron, the second of 10 or more. processors for the BBC micro, the BBC Buses: Frequent services from central Buggy, all the new software and hardware London. will be on show. There'll be competitions, Tubes: Hammersmith Broadway- prizes, Acorn experts to answer your Metropolitan, District and Piccadilly lines. technical questions, demonstrations and Car Parking: Several car parks in the lots and lots of bargains. immediate area. if you are an Acorn owner, or just For details of exhibition stands and thinking about being one, you can't afford advance ticket sales contact Computer
to miss it. Marketplace Ltd, 20 Orange Street, ,v^ Opening hours: August 25th-27th, London WC2H 7ED. Tel: 01-930 1612. a;.^,10am-7 pm; August 28th, lOam-4 pm.
ADVANCE BOOKING COUPON Miss the queue-buyvourtickets in advance. Computer Marketplace Ltd, 20 Orange Street. London WC2H 7ED. Please send Adult tickets at £2 Childrens tickets at £1
enclose a cheque/ postal order value £ payable to Computer Marketplace Ltd.
ACORN USER JUNE 11 COMPETITION
Acorn system: BBC micro with single disc drive
ink- jet printer plus soTtware
THIS month's puzzle is a bit different any hawk versus hawk contests is from the usual. It's based on the work The competition (-l00+50}/2 =-25. of the geneticist J, Maynard Smith To underline the concept of the comes in two parts and it is developed in a brilliant book. ESS let us look at one possibility. The Selfish Gene*. By all means buy - you are You might imagine that because a - will win hawk- or borrow it if you can but it won't recommended to hawk always any help you win the competition as the dove contest, only hawks will author has significantly adjusted his enter both parts. prevail genetically and therefore conclusions since he first wrote the This month we your computer population consists book. introduce you to our entirely of hawks. As we have |ust Imagine a closed world consisting seen, the average score per contest of a single species where each hawk-dove micro- in this society is -25. Now out of the individual looks the same but world and ask you genetic pool a mutant dove arises. behaves in one of two pre- to determine a The dove does not win a single programmed ways when encounter- contest. Indeed it spend most of its ing another individual. The hawk character mix which life running away from the hawks. behaves aggressively and will will set up a stable Nevertheless, its average score is savagely attack any individual who society. 0, which is a lot better than what offers resistance. A dove on the the hawks are achieving and dove other hand puts up a dignified Next month, the genes will therefore start flooding display of ruffled feathers but will model society gets into the pool. run away when seriously menaced. more complicated Again, you might imagine that a Thus in any hawk-dove confron- society composed entirely of doves tation the dove will flee and the with more characters was a good recipe for success; no hawk wins the contest. When two and you will have to battles, no -100 points for death or hawks meet they tight to the death. injury, in short a paradise apart When two doves meet there is an write a computer from a certain amount of wasted immensely protracted display of program (on cassette) time. feathers before one gets bored or to simulate the The reason why it doesn't work is hungry and backs off. Since our that the first hawk to appear on the model is based on the Darwinian hawk-dove society scene will do spectacularly well. concept of natural selection, the Since there are no other hawks to winners of the contests contribute fight the hawk will win every contest more to the genetic pool than the points for a win, minus 100 points for an average score of +50 and, losers. for death or injury, points for a the genetic pool will begin to adjust
The purpose of our model, loss and minus 1 points for accordingly. however, is not to consider natural wasting lime in a lengthy This notion of the deviant selection, but fvlaynard Smith's confrontation when important things individual undermining the collective concept of the evolutionarily stable like breeding and feeding are strategy of the group to his own strategy (ESS). In essence this can being neglected. advantage is sometimes called be defined as 'the only strategy that Thus when a dove meets a hawk 'treachery from within' and it is at
. . It . once evolved cannot be the dove runs away and scores the heart of the concept of ESS. bettered by any deviant individual'. while the hawk scores +50. When also has a direct counterpart in the
It is important to realise that this dove meets dove, both score -10 real world. built-in resistance to individual for wasting time and the winner Quite often a group of people - enterprise is the paramount scores -1-50. All things being equal, for example, OPEC (Organisation of objective of our model. a dove's chances of winning these Petroleum Exporting Countries) - To do this on the computer we encounters are one in two and his will band together and agree to fix have to allocate an arbitrary system score per contest will be the the price of a commodity to the of points to all contests, which in average of -1 and +40 which long-term benefit of its members. our case is as follows: plus 50 equals 15. The average score in For a time all may work well.
12 ACORN USER JUNE COMPETITION
Simon Dally launches you into a Next month: Analyse our full-
Hawk-Dove microworld in the first blown model and produce a com-
part of our major quiz. Ihe (ult puter program (on cossette) to
blown idea will be a mammoth simulate it, complete with graphics.
task, so we suggest you start Entries will be assessed on how
thinking and get some practice. well the program works, structure
This month: Solve our simple com- and presentation (among otfier puter model ond you coutd win the things, so we don't limit your
first prize of £30 of software, or a imoginotion). you must give me answers with
runner's-up award of a copy of The Remember: Whether you enter this yiHir program next month to qualify
Selfish Gene. month's simple competition or not, for tl^ big £1100 prize.
Sooner or later, however, treachery Genetic Opponent on what sort of population you start from within will lead one member of type Hawk Dove Bully out with, you may see some wild the cartel to start undercutting his Hawk -25 +50 4-50 oscillation in the composition of the fellow members for his own short- Dove +15 population at the beginning. But term benefit and a price-cutting war Bully +50 +25 sooner or later, as in real life, things is sparked off. In the case of OPEC should settle down. Figure 1 . How the types fare it needs only a nodding Of course, the model is very acquaintance with recent news- real world, an individual species crude, taking no account of things papers to observe this process in would not be composed of three or like sex, youth or old age. action. more types: each individual would Nevertheless it's fun and useful to Since, as we have seen, an all- be composed o! a mixture of set up these strategies and see dove population and an all-hawk strategies. Thus you might find that what happens. Next month we'll population are both unstable your in a more sophisticated version of give you a more complicated task is to establish where, if our model an individual would model and introduce some new anywhere, between these two react like a hawk four times out of characters into this one. extremes an equilibrium is estab- five, a bully one in 10 limes and a *The Selfish Gene by Richard lished. dove one in 1 times. For our Dawkins, Oxford University Press, Try to determine what ratio (eg purposes, however, we are taking £8.50, We are indebted to Dr four hawks per three doves) is best. the species as consisting of three Dawkins for his help in setting up
When you've done that you're ready different types. Figure 1 shows what the model. to introduce a new strategic they score against one another. Once you have worked out a character into your modei. One way to organise your model stable hawk-dove-bully mix, send The bully is indistinguishable is to set up a league whereby all your answer on a postcard please from a hawk and a dove. A bully characters 'confront' other characters. to June Competition, Acorn User, rushes round pretending to be a When you've done that you should 53 Bedford Square, London WC1 to hawk until someone fights back, at set up the next generation, basing arrive not later than Monday July 4. which point he runs away. Thus a the mixture on the performance of Please say which machine you bully will win a confrontation with a the previous generation. Depending have (if any). dove but lose to a hawk. When a bully meets another bully one of Three winners in February quiz them takes fright more quickly than the other and backs off - so a bully FEBRUARY'S competition featuring Total = 983 miles. has a one in two chance of winning the travelling salesman problem (Carlisle and Edinburgh can be these confrontations - for an produced nearly a hundred entries, visited in reverse order.) average of +25. score only about one-third of them b) Twelve-city route, London, It is that a society apparent correct. The mileage table was Ipswich, Leeds, Edinburgh, Carlisle, bullies composed entirely of is not drawn from a battered copy of the Liverpool, Manchester, Birmingham, an - again, a mutant will ESS hawk Michelin Guide to Britain and Coventry, Bristol, Oxford, Brighton, create treachery from within. So Ireland (1981 edition) which con- London. Total ^ 1 1 53 miles. your task is to determine which mix tained some bizarre anomalies. For c) Longest route. There are at least of characters will create the most example, according to the table, four equally long routes, one of stable society. London to Birmingham is 121 miles. which is London, Carlisle, Brighton, In setting up your model it is But if you go via Coventry it's only Liverpool, Ipswich, Birmingham, important to realise before your 1 1 7 miles! Michelin in their wisdom Leeds, Bristol, Coventry, Edinburgh, start fighting computer characters presumably take things like by- Oxford. Manchester, London. Total
it is for group that impossible any passes into account. Answers were = 2790 miles. to be entirely eliminated: however as follows ( routes can be followed The winners were: James Boulder poorly one type may be faring, its in reverse order): (aged 10) of St Roberts Primary genes are still lurking there waiting a) Seven-city problem. London, Schools, Harrogate; John Wright of fore if the to come to the Brighton, Bhslol, Carlisle. Edinburgh, Ipswich, and Malcolm Newton of opportunity arises. Indeed, in the Birmingham. Coventry, London. Mickleover. Derby.
ACORN USER JUNE 13 TECHNIQUES
In the first of a series on classic
techniques in computing, ^ Stan Froco looks at sorting <
ONE of (he commonest problems items (where it is invariably the best 10,000 numbers 1,248.53 sees. facing the computer programmer is technique because of its simplicity), 173,878 exchanges ttiat of sorting data into order. and fhe other is for sorting large Methods used by beginners are numbers of items, which are To be fair, the data given is the often horrendously inefficient, and already nearly in order. Donald worst possible for the bubble sort, yet many fast techniques are no Shell used these virtues when he and on average it would take about more complex. devised his Shell sort in the early half the time with random numbers. A method widely used is the 1960s. However, one of the criteria of a bubble sort. In program 1, 100 Shell's technique is to break the good sorting routine is that it numbers held in the array a% (line items to be sorted into small sets should have no bad cases, and in 30) are sorted using this technique. and bubble sort these (which is this respect Shell sort again wins. The array is initially set up with the efficient). These small sets are then These sorts can be easily - numbers to 99 in descending merged into large sets, which will modified to handle other data they order, ie thus be roughly in order, and could use a string array of names, bubble sorted again (also efficient). and the comparison could be for a%(1) = 99 These larger sets are then merged alphabetic order. A word of warning a%(2) = 98 into still larger sets (still efficient) though. If you have data with two or and so on, until a few targe sets are more fields, such as a person's a%{100) =0 merged into one roughly ordered name and his age, and you sort the set, which can again be efficiently names into alphabetic order, and The program then sorts them into sorted into order. then sort the ages into numeric ascending order. The reason (or order, and expect the names of all choosing this set, rather than Program 2 shows a Shell sort for people of the same age to be in random numbers, is that it is a 100 integers. The size of the sets is order, do not use Shell sort. If items severe test of a sorting routine controlled by n%. Each time round are identical (Ie same age, but since the numbers have to be the REPEAT-UNTIL loop (line 200) different name) they may be completely reversed in order. the numbers are broken into n% swapped in the second sort as the The bubble sort works by taking different sets. In this case the first names are ignored. For sorting on each element in turn (the FOR loop time round there are 33 sets, each multiple fields other techniques (of in line 160) and 'bubbling' it up by with three or four items. The outer which bubble sort is one) should swapping it with the element before loop (line 220) takes each of these be used. (lines 250 to 270) until the element sets in turn and sorts them. The first If you wish to know more about before is smaller than the one * (such set consists of items 1, n% + 1, 2 these and other techniques under consideration. There is no as how to sort really large amounts 1 . . . n% + , the second of items 2, need to compare it with elements * of data) the best book is Data n% + 2, 2 n% + 2 . . . up to the before this since they have all been last set which comprises n%, 2 * Structures and Algorithms by Aho, sorted and are thus even smaller. * Hopcroft and Ullman, published by n%, 3 n% . . . The code from lines After each element has been 230 to 360 is virtually that of the Addison Wesley. This is sadly not a bubbled into place the array is in bubble sort, but incrementing and book for the total novice, and the order. rather decrementing by n% instead of 1. examples are given in Pascal Bubble sorting is unfortunately The outer REPEAT-UNTIL loop (line than Basic, However, there is as yet not very good for sorting large 200) is used to decrease the nothing for real beginners on the numbers of items (ie more than number of sets each time round. market, and il you have grasped about 20). Whilst the given program Notice how the number of sets is the fundamentals of programming, sorts 100 numbers in 24.65 not divided down evenly, a you should learn a lot from this seconds, performing 4950 exchanges constant (2 here) is added in. This book. For reference you could look in the process, it takes 2852 helps the sets mix, which improves at volume 3 of The Art of Computer seconds and 499,500 exchanges to sorting. Programming by D.E. Knuth, again sort 1000 numbers. To sort 10,000 Despite being only nine lines published by Addison Wesley, But numbers would take about 80 longer than the bubble sort, this unless you are a mathematician I hours and 50 million exchanges. To program is far more efficient. The would not recommend it. sort the 400 million items that once comparable times are: existed on Rolls Royce's parts list • Hash tables and recursion will would be impossible. 100 numbers 3.04 sees. 316 be covered in future articles. Are There are two cases though exchanges there and other techniques you where bubble sorting is efficient. 1 ,000 numbers 46.76 sees, 4,366 would like covered? Write in and One is sorting small numbers of exchanges tell us. page 16 u ACORN USER JUNE The accessories you need at prices you can afford
The monitor that makes sense for all the family The NORMENDE 14" colour monitor combines true RGB performance with U.H.F. T.V. value. Fully BBC compatible, this dual purpose design compares favourably with most quality, stand-alone RGB monitors while offering far greater value to the whole family.
A quality RGB monitor/T.V. at a truly realistic price.
only £249.00 inc VAT (includes BBC to RGB cable)
for Securicor delivery Also available with REMOTE CONTROL e299.00 inc VAT For mail order please add E7.00
Say goodbye to untidy wiring At last a quality joystick for use with The REMEDIAN TIDYBASE comes complete with your BBC (model B only) three built-in fully-fused power outlets. Forms a Now, Microstyle offer you the chance to strong, safe plinth for your monitor, disk drive etc. use joysticks where joysticks have never Single cable to mains outlet. been used before! Operating directly Designed and built to schools specification in metal with through the existing user-ports on your safety edges (no sharp corners), durable finish. BBC model B microcomputer and all Acornsoft and £29.95 inc VAT available for use with other keyboard controlled games for mail order please add most - joysticks include £2.50 post and even Planetoids these "driver program packaging a machine-code on tape, which converts keyboard commands to remote control operation for maximum enjoyment. PLEASE NOTE- Planetoids aid certain other games may still require tfie use ot some heytioara commands SPECTRAVISION QUICKSHOT deluxe joysticks, (bbc compatible). For mail order please add 75p post and packaging £24.95 inc VAT
ORDER FORM please hemembertoaddappropriateamount for postage and packaging ALLOW MINIMUM 21 DAYS FOR DELIVERY. Please send me (quantity) Item(s)
(made out to MICROSTYLE), Total price including postage and packaging £ Payment may be made by cheque Postal Order or Access/Barclaycard.
If paying by Access or Barclaycard please enter card number here Access Barclaycard Name... Please tick appropriate box.
Address Daytime ptione no
Contact us now for your B.B.C Microcomputer available ex-stock at £399.00 We also stock a wide selection of ottier systems COMMODORE, SPECTRUM, ZX81, and COLOUR GENIE fnicraStuli
All prices advertised include VAT PEOPLE Please Note: V^hile Micioslyle will endevour lo maintain sufficient stocks of THE HOME COMPUTER items currently or previously advertised we regret Itial all items are offered for sale subject lo awailability from manufacturers. and The Bath Computer Centre The Newbury Computer Centre 29 Belvedere, Lansdown Road, Bath. 47 Cheap Street, Newbury. Telephone; Bath (0225) 334659 Telephone: Nev/bury (0635) 41929
ACORN USER JUNE J5 —
TECHNIQUES AJSoxnnrABE for BBC
^^'\ The Record Changer' 32K £19.95 Cats. £24.95 DIk for indexlr>g. nnembershlp lists, directories, inven- tories. bLXJgetIng, etc.. etc
10 RRM Bubble sort 100 integers dont buy a dcrtabote In the dark — check the spec! 30 DIM aZdOO) 40 @% = 4 * Visible File — Scroll tfie 50 around file UP/DOWN/ SIDEWAYS by function keys 60 REM Initialise in reverse order * RiLL SCR^N UPDATE — Use cursor to overtype 80 FOR i2 = 1 TO LOO character INSERT/DELETE within field; ERASE rest of 90 a%(iX) = 100 - iX field; TAB fronn field to field, etc. 100 NEXT iX 110 * Sort — on character and nunneric fields 120 REM Now sort them 130 * Search — tor o match on field contest 140 startZ = TIME * Select — select records satisfying conditions on 150 one or more fields: or manuolly 160 FOH ]% = 2 TO 100 170 FOR kX = j% TO 2 STEP -1 * Total — total nunneric fields of SELECTED records 180 190 * Arithmetic — combine one or more fields of your REM If bubbled high enough jump out 200 SELECTED records with any arithmetic expression 210 IF put ttie result in aXikX) >= aUkX - 1) THEN GOTO 290 any numeric field 220 230 * Print — print your SELECTED records v^ith pagi- REM Else exchange and proceed 240 nation 250 iZ = a%(.kX) * Up to a 1000 records, (typically 330 at length 40) 260 a%(kZ) = aXikX - 1) 270 aXikX - I) = tX * Up to 20 fields, number of decimal places can be 280 NEXT kX specified tor numeric fields 290 NEXT ]% 300 * Utility — to ADD/CHANGE/DELETE fields REM 310 Take the time and print out the results 330 tiiiie% = TIME - startX 340 The WordsmHh* 32K tor Centronk» 737/739
350 FOR iX = ! TO 100 £19.95 Cots. £24.95 Disc. 360 PRINT a2(i2) For 370 NEXT iX Reports, Essays, Thesis, ete., etc. 380 390 @X = S90A Forget control codes — let 'Wordsmttti' realise 400 PRINT ' "Time taken: " " your printer's potentkil ; ti.eZ / 100 ; seconds- • Full Screen text editor with wordsplll Program 1. Bubble sort • Unlimited document size • Page numbering, headirigs, footings, margins, 10 REM Shell sort 100 integers indentation • Full Support for proportional, mor>o. condensed, "lines 20 to 150 as program 1** elongated and underlined printing • Right justification nrialntalned even when mixing 150 REM This is the outer Shell loop proporttonal, cortdensed. elongated on same llr>e ISO nX = lUO 190 200 REPEAT 210 nt = {nX + 2) DIV 3 Simple Word Processor 32K 220 FOR mX = n2 + 1 TO nX * 2 £9.95 Cass. £14.95 Disc. 230 FOR = j% m% TO 100 STEP n% Simple to use; allows you to set margins, justify text, 240 FOR k% = j% TO m% STEP -nZ insert 25 and delete lines of text, set page length or 260 REM torce a poge, variable TAB, Multiple copies Save If bubbled high enough jump out 270 text on cassette or disc. View text formatted before 280 IF aXikX) >= aX(kX - n%) THEN printing Wortts with any printer 290 GOTO 360 Options Timetable 32K 300 REM Else exchange and proceed 310 £14.95 Coss. £19.95 Disc. 320 tX = aX(kX) A must tor every secondary sct>ool. This programnne 330 aXikX) = aXikX - nX) helps with tt>e timetabling of pupils 3rd year optton 340 aZCkX - = x\X) tX choices. Try the effect of any char>ges to your 350 NEXT k% Options Timetabte let tr>e 360 NEXT j% and micro do all the 370 NEXT mX donkey wort<. Has been In use tor the last three years 380 UNTIL nX = 1 In a 6 torm entry comprehensive using a CBM 3032 390 now runs even faster on ttie BBC fvlodei B. 400 REM Take the time and print out the results Not only ttie cheapest, but ttie best 420 time^ = TIME - starts Switchabte 14" RGB fVlonltor/Coiour TV 430 £250 inc. VAT and cable. £8.00 carr. 440 FOR i% = 1 TO 100 450 PRINT aX(i%) Royalties tor quality software 460 NEXT it All prices VAT Inclusive 470 480 n = S,90A 490 PRINT ' -Time " taken: ; ti.eX " / 100 ; seconds'" AJ Vision Service Ltd 61 JeddoRoad Program 2. Shell sort London W12 9ED
76 ACORN USER JUNE Software News
BBC SOFTWARE from the professionals MOLIMERX EXPANDS INTO THE BBC!
B»»h[|l - June 1983
TODAY a spokesman for Moiinierx programs are going to be translated, the the BBC machine.
l.lci,. ihe TRS-80 Gcnif Sotlware House features unique to the BBC will be Over the years, Molimerx have built up of Bi'xhill. annouiK'Ott Ihat llicy arc utilised to the maximuni. Specifically a catalogue of some 170 pages. The
fiHcrinn Ihc BBC Software market. Molimerx say thai translations will not procedure is that an addition conlaining Uiiiil now. Molimcrx have been supply- iust be a code adaptation, bui will also new software is published every H weeks
iiij5 software for all of ihe Tandy incorporate BBC features. They gave as or so. The existing index is discarded machines plus all of the Genie micro- an example the recently completed and Ihe new addition contains a new
(.ompulcrs, some do/cii machines in all. translation of Shuttle. This is a simu- up-dated index. The catalogue is As ihey have been doing thi.s lor some lation of ihe Columbia space shutile. In punched for a ring binder: hence,
S years, they have accumulated a vast ihc TRS-HO version it is displayed in customers always have a current and up number nt programs — in ihe range of straight text. The BBC version, however, lo dale catalogue. Molimerx say that 4(K1-5(H) in number. Molimerx will be contains a coloured graphic represent- this same procedure will be used for the translating all of iheir besi existing aiion of the ship. new BBC software catalogue. programs together with publishing new The spokesman said that the main Owners of BBC machines, therefore. programs specifically written fur the thrust will be towards new programs should write to Molimcrx for a copy of BBC They are hoping, therefore, to be and Molimerx are actively soliciting new Ihcir current catalogue. For at least a releasing around six new programs per software from both their existing stable while, there will be no charge. month for some time to come. of 120 authors and are also searching for Customers should send an A4 si/e
Their spokesman said today thai where new qualified auihtvrs, experienced on stamped addressed envelope for 1 7p.
TEL: 10424] 220391/223636 MOLIMERXLTD TELEX 86736 SOTEXG A J HARDING (MOLIMERX)
1 BUCKHURST ROAD, TOWN HALL SQUARE, BEXHILL-ON-SEA, EAST SUSSEX.
ACORN USER JUNE 17 HINTS TIPS & ^2^
Joe Telford sets up a graphics procedure library and develops a 50p network
Continuing our examination of library routines, we turn to three shapes for constructing complex graphics on the BBC micro - PICK A SHAPE rectangles, triangles and circles/ ellipses.
Program 1 might appear trivial, but ly it is useful if a large number of triangles need drawing. Suitable calling lines might be: [r*cos(x-»-p),r*&iN(><.p)3 r*cobC><) 100 MODE 2 J 110 PROC__.tri(l 00,1 00,200,1 00. 150,300,1)
The first three pairs of numbers are co-ordinates of the vertices. The r* 9IN (x) last number should be to rkbihl(x:^p)
produce a line drawing, or 1 for a filled triangle.
Program 2 uses program 1 as
the procedure 'tri' to produce a r*(_^iN(>^^a»tp)]
pattern. Figure 1 gives simple /tfcffes - . r Uibf-ance, of this. Line 50 several variations on ^
vertex parameters, plus a final to fiU an^/e^ in recf/ane, produce a line drawing. Figure 2 shows how the contents of line 50 of can be related to the vertices a Figure 2. Locating vertices for program 2 regular (equilateral) triangle. This only works when the screen origin
is moved by a VDU29 command so the triangle can be drawn around it '^46i3 DEFPR0C_cri(Ki,yi,K2.y2.K3,y3;ri (line 30). Try running program 2 ^465 MOVE >a,yi without line 30 to see the effect. "^70 f" I F = £1 R ft H . D W 2 y 2 EL. M 'J E x 2 > y 2 Rectangles are probably the ^475 IFF=Pi 0RfHy:x3.y3:DRftWKi,yi most common shape, so it is well "- ELSE . - c- ; ^ L T 3 5 K 3 ~i;*^.Cx \j v . y worth while having a library routine 94SEI EMDPROC Program 1. Procedure for handling to handle them. Look at program 3, triangles. Note, this must be called up which may be called by a simple ^__ ^^^ from a program (see text) three line program: 5 PEfl PATTERNS 10 M0DE2 IS M0DE4 20 PROC rect(300,200,600,400,0} ^' - .-" S = -508; = '2) ; = 30 END 2 1 2 P 2 ^ F I ^ 3© vDU29, 64e;512^ This will draw the outline of a 40 FOR X=g TO P STEP P/30 rectangle on the screen. Control i ( H '^ 5B P R C _ t r r C S X . * S I N X ^ over the rectangle produced is by r^COS(X + P^ .r-iiSlHiX^P- .r^C05O-^2^^^i= the parameters passed to the ! '^SIN X + Z^'eP'i , 0:- routine. Examine line 9400. The 6 NEXT parameters are x,y,l,w, and f. Here, x 7S END and y are the coordinates of the bottom left-hand corner of the Program 2. Triangle patterns
rectangle, I is the length across the screen, and w is the width up the ^ "> 9 4 D E r P R C _ r e c t- K , v , 1 , w - f screen. The final variable, f, may be 941S MOUEM,y:Df?(:^y>. + i,y 1 or to produce an outline or 2iZi 94 IF^=0 DRhw:-=:+1 . y + w filled rectangle - the opposite of ELSEPL0TS5 , h , y + v 9433 IF^-=0 DR^HWK: y-*-w the triangle routine. Less calculation ELSEPL0TS5 ^ m-H , y + w 9440 fiOyEx,y4.w: = is needed as only one corner's IFr DRhW^.v ELSEMOUEx.y coordinates are required. The 9453 ENDFROC disadvantage is that the rectangle Programs. Rectangle drawing routine can only be aligned along the page 23 18 ACORN USER JUNE HINTS & TIPS
Figure 1 . Variations on program 2
ACORN USER JUNE 19 3
Two of the all-time Arcade greats BOMBER SCRAMBLE
For over two vears our best selling TRS-80 Arcade game was Mike Chalk's acclaimed Bomber Scramble. Now there's a new generation Scramble, in the colours, sound and high resolution graphics of the BBC Micro.
This new one has so much it's unbelievable! Two types of fighters —with their own unpredictable movements. Ack-ack—which no other BBC game. Acorn's included, can offer—with random detonations. Intelligent rockets—which are released as you come on target. Blimbs —another Kansas 'original' to make the game harder.
The game starts fairly easy, then gets harder and harder, with of course the ground and 'top' moving all the time— and completely random, with no two games ever the same. As the game progresses so more and more is 'thrown' at you.
Keyboard or joystick operation giving infinite control of the bomber, the bombs and firing. Top score table and extra 'lives'.
There is no other Arcade game to touch it! £9.50 Vat and post paid
COSMIC FIGHTER As Kansas reigned supreme with its TRS-80 Arcade games in Britain, Big Five Software were our counterpart in the States, with their "flagship' being the famous Cosmic Fighter, This fast-action multi-screen game has been brought to the BBC Micro by Kansas programmer Wal Mansell. •^ ^ «y iBt ^^ Four entirely different 'screens' with four different types of Alien, each with its own brand of attack, and all of them relentlessley homing down on your base. Four games in one in fact!
Move your base to fire whilst dodging their bombs, but as soon as you wipe out one lot, another type appears— and all of them hell-bent on your destruction!
Then comes your Mother Ship, so home onto her to re-fuel, but get it exactly right... Then it all starts again—with a difference— you have to hit each Alien twice to destruct! .4k. Colour, sound, keyboard or joystick control, with of course the usual Kansas top score table. An all-time great. £9.50 Vat and post paid
SNAKE Soothes X4-eS4t^ s^=c» * You have control in all directions of the Snake to devour the mushrooms. It's a real snake, not just a line, pulsating along and -a, o growing longer and longer as each jnushroom is devoured. • -•» =iN 4i Just like the arcade game, you can actually increase speed to try and clear a screen in less than a minute to earn yourself a bonus. But don't devour the toadstools! 1™ : ^ Then it gets harder. And harder. And harder. For as each screen is « t . * cleared the next one becomes more difficult. Not only does the i [CO.* speed automatically increase but you get a split screen. And if you f manage that, a totally unheard of, double split screen! 4h Colour, sound, keyboard or joystick operation and of course the Kansas top score table. £8.50 Vat and post paid * -^ '^ ^ s 1 ••> <^ ^^ SPACE CAB Slow the pace right down now, to a thinking mans" game. Ferry passengers over the random mountain, choosing the number, the amount of fuel and liquid oxygen to get you there and back. It's totally logical—the more passengers you carry the more fuel and for you have to earn oxygen you' I I need. There's a purpose too, enough to pay off the mortgage on the craft or it's re-posessed! Not too easy to play as control must be spot-on or you can run out of fuel, starve the passengers of oxygen or crash!
Infinite control of thrust and braking in all directions allowing you to ascertain the best velocity both in accent and deceleration. VERT SPEEDS FUEL i08 Very realistic sound effects. Colour and totals. hORZ SPEED O)0i5^EC82 ^^^^^^^^^^^^^^^^^^^^^^^£^^/a^n^os^ai^^ PROGRAMS ARE CASSETTE BASED AND RUN ON ALL 32K SYSTEMS Make the most of your micro DATA FILE
The all-srnging, all-dancing Data File, built on five years experience vet purooselv created specifically for the BBC Micro. Experience has taught us that not only do any two people never needthe same in a data file, but even one person wants it to be capable of many things. We think that the Kansas Data File fulfills this need, and will be recognised as the standard. appeal must be its sheer versatility l^"^^"*^"! You can define not only the (enqth ot anv field, but Ifie actual nurnber of fields-iip to 20! So you can ,make it an ordinar? name and adcirf^^^ file, or anything extraordinary that you might wish. And all permanently saved to tape... The number of files available depends entirely on the length of the file. Up to 1 947 with a single field. Here are the facilities of Data File: Create File Define any number of fields up to 20. Define Status Not found in normal data files, this is useful for length of each field up to 255 characters. Name each field it tells you the file name, when u|xlated, files used, and as required. Computer automatically uses maximum memory. most important how many files free. Insert Simply type in pressing Return for next field. Print A most important facility, allows the printing of Search Data File has a most unique Search facility, for the files, as required. it will search any defined field throughout the whole Delete Delates unwanted files, and at the same time file, but not only this, it can be asked to search for the the remaining records will be closed up. item at the start ot the field or in fact anywhere in that field, making it a very powerful facility indeed. Save Allows you to save the entire file to cassette. This can be loaded at the start when Data File is run. Edit Couldn't be simpler—just use the cursor keys. To facilitate the ease of operation, all the above functions Jump A very handy feature, allowing you to jump to any are on the red function keys, so needing just a single particular file you require. key stroke to bring into operation. Sort Not just the normal first field sort, but one which £12.50 Vat and post paid allows you to define the sort field. PERSONAL ACCOUNTS Another exclusive Kansas program, designed for the micro user to keep an accurate check on all accounts.
This program is not limited to personal cash accounts, but Facility is also provided for alteration of any entry, with can also be used in conjuction with a cheque account or automatic update of the current balance. The balance itself even to keeping a credit card account in order. In fact there can be altered, which is useful when using as a credit is little limit to its use, where the transaction of money is card account, as a monthly payment is made. concerned. There is a clever little routine which allows you to estimate As It creates its own files to tape, it can be used for a the effect any particular payment may have on your account, multitude of purposes, each having its own file and thus so you can see if you can really afford it or not! being loaded to handle transactions. A status section lets you see the current balance, file name, It can hold 500 transaction entries! when updated, transactions on file and spare entries. Personal is A great asset of the program is that it can be customised Accounts very friendly in use, with messages by altering any of the 32 items, with in fact 10 already should you do something wrong, such as using the same set aside for this purpose, with the others too being transaction number twice. simple to change. Files can be saved to cassette, and you have the choice of either loading in a saved file or creating Each entry has its own number, together with amount, date a new one, when the program is run. and Item, with all details and current balance shown after each entry. This makes it very straightforward to add Use is made of colour, with the obvious showing of either payments or deposits to the file. deposits or payments. There is also a list facility, even allowing the scrolling through the entire file. £12.50 Vat and post paid
When you buy from Kansas you are buying from the
longest established software publishers in the country
The only company that can give a lifetime guarantee
and assured same-day first class post service
VfSA ^nsas Recognised Brand Leader in microcomputer software ^ ^^ Kansas CityCitv Systems,S Unit 3, SuHon Springs Wood, Chesterfield, S44 5XF. Tel. 0246 850357 HOME & BUSINESS TECHNOUDGY
O
Probably the widest selection^—-'of software available by mail order. S;itiKiirf, Hl-.vcI. Piiuyor All lilt liip manufatiurers ini-kniiiit: Atiirn Siifl. I.IK [Sinclair), Supciiiii BLig HyiL-, I'r.iyidm Poait, ^ AUNEW \ in Stock All / (as long as you're quick) BBC I I COtC-UTraS^ / V MICRO BBC MICHOCO-^mEf^H„*^lfr^S^^
JHE
Wostft^n^g^l^ new
• •• •••• fi^^ornuser jtBEEBus^, .: TEAC ) Acorn user & BEEB
^^•25 each, orders
;°;^o^niore ' ^^22^[C0py.
Make your fa^^^^^^^^*^ (^^^^^^^^^
I-yi^v^ iv^i'* j-^^- Utilities Plus vlanuaKl Disc - 40 Track and ^^so£nronfp^^^%orris. 8 Track) £ 17.25
PROTECTIVE COVERS AND JOYSTICKS AND SOFTWARE HAflDWARE
CARRYING CASES BBC Joysticks - pair 13.00 Sound Pick-off Module (Simple to Polyester Cotton Cover 3.97 BEEBSTICK - Fully proportional for fit) 6.95 in Soft PVC Cover 4.45 Computer Aided Design. . . . 29.75 Loudspeaker cabinet plus cable Hard Carrying Case for Computer, JOYSTICKS GfLWHICS - Draw for atttve pick-off 27.00 Amplifier for Cables, Cass/Disc Drive. . . . 55.20 and Save your own Line Loudspeaker plus Soft Carrying Case for Computer, Diagrams 5.75 above pick-off (Blaster) 37.50
- . . 1 input for BBC Cables, Cass'Disc Drive. . 23.00 JOYSTICK PACK Contains BIG EARS Speech "2AF' and "ETCH A Computer 56.00 SKETCH" 5.75 CHATTERBOX Gives your BBC GRAPHSTICK - Computer Aided Computer unlimited ELTEC COMPUTERS Design for any joystick 5.75 vocabulary 56,00 217 Manningham Lane, BRADFORD BD8 7HH All above prices include VAT & Carriage. ^^^ Tel: (0274) 722512 For full price lists or further details of any products send s.a.e
P.CORH USER JUNE . 53*, 71 j1' 1 1
HINTS & TIPS
^page 19 vertical and horizontal axes. This is Program 4 is an example of how acceptable for most diagrams, but the Yecf routine can be used to readers who need a tilted rectangle build a more complex shape. should put an extra coordinate in Because each school will want to 100MODE2 the triangle routine. Also no!ice the progress along its own lines of 110PEM do sKy routine will produce squares, interest, program 4 is not 120(iCOL0, 6 I 3ePR0C_rect '0,^1 1280, 1 simply by setting I and w to the interactive, and does not attempt to 624 , l^BREM do gross same value. Let's look at three dictate a 'best' approach, The 'best' I50GCOL0 Z simple applications of the 'reef approach is the one which works in 160P ROC .recti 0,0. iZ80,4 00. l) l'^0REM point routine; in education, to demon- your school. won 180GCOL0, strate movement, and for business l<'0PROC_r!?cti;200. 209. 700.400 use. 200PEM Odd bncKs We can also use the rectangle :i0FORY = 20a TO 600 5TEP*,e 220FORX=200 TO 900 STEP3^ Teaching children routine to generate the illusion of 230GCOL0. movement. Look at program 5, 24 0PROC_rect (X, Y, 32,2 4,0) about which should be understandable 250NE^T, shapes 260FORY=224 TO 576 5TEP4S without much explanation. Line 1 1 270FORX»216 TO 884 5TEP32 PRIMARY children's concept of looks strange but in fact is doing 280PROC_rect 340GCOL0 , from simple ones (which the next cause the micro to wait until the 350PROC_cloto (2) MEP Microprimer pack will beginning of the next screen frame. 360PEM downstoirs windows examine). However, the 'reef routine This results in smoother movement 370GCOL0,2 33aPR0C_doto (2) may help teachers to - use the with less flickering remove them 390REM upstoirs windows computer with work of their own, to see how necessary they are! 40eGCOL0, 6 4iQPR0C_dato 12) 420REM Window fromes 430GCOL0. 10 REM Goggle box "-(-BPROC^doto (16) 20 450ENO 46BDEFPR0C_dato(ni 3S ON EPROR GOTO 390 470LOCfiL ly. MODE 2 480FOR IX- 1 TO n 59 490REflD OX.bX.cX.dX.eX 6S REM Draw lots "' 500PPOC_rect(ax.h;;,cX,d'^,eX) 'J 1 c 1 .; Q •' 1 o u e d 510NEXT 76 PEM Boye3 ins: one another. ee 520ENDPROC 530REM door FORX?: = doto TO 512 STEP S 540PflTfl50e. ise GCOL0, 200. 103,200, (X%,/S)M0Di5 +1 55S REM doorfrorae doto 110 PROC.rect fx;; + 560DflTfi500.20S. l2S./'S (5i2-x':>*2, c5i2->:;- 100.200,0 120 ) *2, 570DflTfi580. NEXT 300, , n 8 . 1 130 5S0REM downstair window d.itn 59gDflTfi275.230, I've REM Now Est 150, 130,1 all boyes to block 600D«Tfi4-5.25S,I50,150, 150 610REM UPSt^iir Window dot-, 140 ; = FOR y g TO 15 62eDftTfl700.450. 100,100. 170 .'DUi9. K\ 0.0:0; 430DflTA30a,430, 100. igg, 640REM 130 N E '< T Windowfrome dnto 190 t30D«Tfl2-5,250.?5.75.0 REPEAT 660DeiTfl350,250,75.73,0 670DflTfl273,323,73.73,0 210 REM LOOP through the colours 68aDftTfl350, 325,75.75,0 220 : 690OflTft675,230,75.75.0 230 F0Rx::;=i5 700OflTfl750.230,75,73.0 TO 1 5TEP-1 7I0DflTft673.325.75,73,0 2 "t * F >; 1 9 ^20DOT«75e.323.75.75,0 730DflTfi700,450,30,50,0 REM TurniTig then on sequent 740DflTq73e.450,50,50,0 i ai ij 750DfiTfl750,300.50.50.0 760DflTft700,300,30,30,0 t'DU19,x:;, l,e,-0 770DflTfl300, 430,50.56,0 time=TIME 7S0DflTfl300,500,30,50.0 REPEAT UNTIL TIME) time 790DfiTO350, 500, 50,50,0 *Fy 19 890OftTfl330,450.50,50.0 Program REM and then ofF 4. House-building program! VDUl? .:: . X 3 , ; f NEXT REM Use ESC to e '-^ i t UNTIL FALSE 390 M0DE7:REP0RT: END Program 5. Moving graphics ACORN USER JUNE 23 * 7 HINTS & TIPS Figure 3. Screen form design SURHRME Designing forms FOREHRME THE third area which may usefully exploit the 'reef procedure is in TITLE SEX « designing fornns for data input RDR 1 There are two separate parts to input via the screen as a form. The RDR 2 easy part is design, the more difficult part is using that form RDR 3 during input. Program 6 uses the CODE PHONE 'reef procedure to produce a screen form (figure 3). The program uses mode 4 and creates the form MODE*; from rectangles, each 64 units high Program 6. Screen form design 20 by 32 times the number of 30 PROC_ screen form characters which are intended to fit i^Q END into each entry box. The labels for 50 DEFPR0C_5creenrorm each box plus the number of 60 PROC.rectt0,9i6.11*(32,width,e^ characters allowed (dots) are 70 PR0C_r»ctfii«32, 946. 21^32. widfh.B^ inserted at the correct positions by 80 PRINTTfiBd.l) 5 "SURNfiHE " PRINT TAB statements. Readers 90 PRINTTAB(12, 1) ;' might like to experiment to produce 100 PR0C.recto,882> 11*32, Width 'f^'i their own form input programs, 110 PROC-rect (iHf32, 882. 21*32, Width. 0) based on this example and using a 120 PRINTTftBCl,3) ; TORENftME - general prupose input routine, 130 PRINTTAB(12.3) ' ; © " ' " ' I'^e PROC.rect (0,818, 1 1 »32 , wi d th [ 130 PR0C_rect(li*32,81S, 10*32, Width,©) The third of our graphics routines 160 PRINTTAB (1,5); "TITLE draws and fills circles or ellipses 170 PRINTTPB(12, • 5) ; (program 7). The procedure 180 PROC.rect (21*32. SIS, 1 i *32 . w i d th , , requires five parameters, x,y.r1 ,r2 190 PROC.rect (30*32, 818, 2*32, widtb,0) and f. The first two are coordinates 200 PRINTTflB(22.5) =-5EX "=108(31,5);- of the centre of the circle. If r1 ^ r2, 210 PROC.rect (0, 75'i, 7*32, Width, 0) the shape is a circle of radius r1 . If 220 PROC-rsct (7*32, 754, 25*32. wadth,B> r1 and r2 are different, an ellipse is 230 PRINTTftB(l,7) ; -fiDR I'sTfiBrS,^); produced. The large value between r1 and r2 decides the major axis of 2^0 PROC_rect(0,690, 7*32, width, 0) the ellipse, with r1 controlling the 250 PROC.rect (7*32, 690, 25*32, width,0-. horizontal axis and r2 the vertical, 260 FRINTTflB(l,9) ; "ADR 2-:TAB(8.9)i The last parameter is our usual f which may take the values 1 for 270 PROC_rect (0,626.7*32, Width. 0) filling the shape or for an outline 280 PROCrect (7*32. 626,25*32, Width, 0-, drawing. Try using the routine with 290 PRINTTflB(l,ll) " ;"flDR 3 ; TftB ( 8 . 1 1 - ; program 8 which has a CB radio flavour. 300 PROC_rect (0.562, 7*32, Width, 0) 310 PROCrect (7*32, 562, 7*32, Width, 0) 320 PRINTTABd, 13) ; "CODE ' TAB (8, 13) ;"...... Program 330 PR0C_rect(UM32, 562, 11*32, w.dth.B. 8. Using 'crclp' routin* 3h0 PROC.rect (25*32, 562, 7*32, w,dth.,^l 350 PRINTTAB(15,13) 10 H0DE2: v=600 ; PHONE " ; T A " 20 b C L e . 1 9 B ( 2 6 , 1 3 ; ; 2 360 ENDPROC " 30 CLG ^a FOR X= 256 TO 763 STEP 512 30 GCOL0, 95013 OCfl^?iOC_^v-ci^ (H,y. ri,r 2.r-^ 60 PPOC.crciP (V, 931-0 LOCAL z,y.y.,yv V. 200 . 1^0. 1 '320 70 GCOL0,4 MOME^. + r-i , y. M0'v'EH4.pi. y 90 PROC_CrClp(Y + -, 9330 FOR2=0TO 70,V-l0,eg.g0. ^ 6.^5TEF.2 90 GCOL0,0 :< X r .; - :' ; + 1 * c C S :: : = r * f z 2 S I J 100 9350 IFFOi DRAW-v,^+y- PROC_crclprx+70,Y-10.30.30,li eL^E 110 NEXT PLOT35,.T,,,.y-;:Pi_oTS5,XV,y-y^ 120 END '360 IFr=i fiNo z>3.2 z=6.4 ^370 N T E X : E N D P P C Program 7. Circle/ellipse routine page 53 > 24 ACORN USER JUNE . Cumana drives BBC Mkrobest! CUMANA DRIVES + OWN POWER SUPPLY = BIG PLUS FOR BBC MICRO USERS . . . JUST FOR STARTERS ;:S"«siv3S^ V2^^oIi The 'ice on the cake' is that, because the Cumana Drive has its own power supply, it can be used witti many other Micros when connected via the appropriate cable, Cumana supply a Drive connecting cable which has a standard 34 way edge connector plus 34 way BBC connector in the same cable length. This allows the Cumana Drive to be connected to numerous makes of micro without the need to change connecting cable. And the Japanese manufactured disk drives are quiet and utterly dependable. CS50A Single sided 40 track TEAC drive in a cabinet with own power supply 1 0OK El 99 CD50A 2 single sided 40 track TEAC drives in a cabinet with own power supply 200K £369 CS50E Single sided 80 Track TEAC Drive with cabinet and own power supply 200K £265 CD50E 2 single sided 80 Track TEAC Drives in cabinet with own power supply 400K £495 CS50F Double sided 80 Track TEAC Drive with cabinet and own power supply 400K £345 CD50F 2 double sided 80 Track TEAC Drives with cabinet and own power supply 800K £619 2 drive Cable for BBC Micro £15 2 drive Cable for BBC Micro plus TRS80, Video, Genie etc. £18 UPGRADE KITS A^ £90 Cumana Ltd IS^^S^^"-^ Unit 1 , The Pines Trading Estate. Broad Street, GUILDFORD, Surrey. GU3 3BH. Tel: (0483) 5031 21 ^s::^ff^s-°^^^' Telex: 859380 CUMANA. ACORN USER JUNE 25 >-calc A ROM based spread sheet program, like Wordwise this firmware is very fast and simple to use — yet is a powerful spread sheet analysis program, considerably \ better than the original 'calc' program — full floating point maths Works in 80 or 40 column screen modes, variable column widths Works with either cassette or disk This ROM coupled with Wordwise can turn your micro into an ideal small business machine. E34.00 + VAT Debugging Program 2 machine code programs — one in ROM, one on tape. Essential for the machine code programmer. An ideal compliment to the assembler built into the BBC machine. Contains a full machine code monitor allowing examination and alteration of memory, registers, setting of break points and even single stepping through machine code programs. |ROM based E 1 9.00 + VAT cassette £10.00 + VAT ^^^ DoCtOr A ROM containing useful disk utility programs Enables the recovery of any data off the disk including deleted files etc The full disk editor allows the alteration of any bytes directly on the disk (or in memory), or the loading and saving of any track or sector on the disk. Automatic transfer of programs from tape to disk and visa versa I ncludes a whole host of other useful utilities — string search, function key editing, the ability to format 35, 40 & 80 track disks VAT £ 19 00 + Printer tool kit RON This includes routines for high resolution screen dumps for both the EPSON and NEC printers Will work in any graphics mode with automatic grey shading of all screen colours The most useful feature of this program is its 'spooling' capability, this enables data such as a program listings or high res screen dumps to be automatically spooled from your disk to the printer while using your BBC machine for running other programs £19.00 + VAT Quantity discounts, starting at five oft Viordwise < Wordwise The word processor for the BBC machine. THE WORD PROCESSOR FOR THE BBC MICRO This ROM based word processor has received superb reviews. A powerful and flexible system— its greatest strength being that it is fast simple and very easy to use. No other existing word processor (even ROM based, costing twice as much) can compare with the flexibility of this system. Supplied with full spiral bound manual and cassette containing an example document and free typing tutor program. £39.00 +£1.50 P&P + VAT Now available from stock Quantity discounts, starting at five off. all ROM based software requires new series 1 Operating Systems We are now in the position to supply 1 .2 ROM s for C5 00 + VAT when you t)uy any ot the above software, !'! CASH OR ROYALTIES .-.^ I fy lu' j", n'.j'-;sli"q fpi^nnputer .-.' If-'' irio! |usl games] tor Ihe tiBL Micm l"ie DPttfi inc r ii-Kam will sK ,onceptsJif ; ihe more wf dbv 1 ACS IBjXAAayside, Chipperfield, ,\A/D4 SJJ. t:elCa9S773 6S7S7 26 ACORN USER JUNE GRAPHICS INTERACTIVE GRAPHICS AKD CAD Jim McGregor and Alan Watt analyse the GCOL statement, _ and show how procedures I he GCOL statement controls ttie based around it can provide might be transfer characteristic, way new values are loaded into the frequency response and so on. The screen memory. Either a new value interactive graphics- line computer program's view of the (or colour) specified for a particular problem is numerical or formula drawing, picking and dragging, pixel is loaded directly into the based, while the engineer's view appropriate position in the screen menu selection and rotation remains pictorial - a tremendous memory, or a logical operation is advantage in most design problems. performed between the new value We now look at the front end of and the current value (figure 1). The such CAD programs: first by type of logical operation is looking at how we can sketch line specified by the first parameter in drawings on the screen, and the GCOL statement. second at how we can pick and Using the GCOL facilities we can drag predefined sub-pictures across implement two classic graphical the screen, input techniques - 'rubber banding' and 'picking and dragging'. Both use the keyboard, but clearly the liubberband line drawing is used principles are the same for either a to build up a sketch or line drawing keyboard or a more convenient on the screen, using line segments device such as a lightpen. Both New VM-OH, whose length and direction are interaction techniques can be used controlled from the keyboard. Figure 1 . GCOL parameters select in picture construction and this operation to be performed between Program 1 starts off by drawing an forms a part of most CAD value in screen memory and new arbitrary line from (0,0) to (640,512). value (computer aided design} systems By using keys R, L, U, and D (right, which enable designers to work in left, up and down) as direction two-dimensional pictures. This RZ indictors we can move the end means for example that an 1 1 point of the line anywhere 1 1 we want electhcal engineer can work with Key F can be used to 'fix' the end 1 I - 1 1 circuit diagrams and an architect point of the line. In the program 'xs' 1 with elevations or other projections 1 and *ys' always represent the start 1 1 of buildings, rather than just position of the line currently being 2. trical Figure Elec diagram 'y' numbers. drawn and 'x' and represent the CAD techniques are an extensive position of the end of the line being topic, and we shall only concern with alterations to the diagram. moved. The program consists of a ourselves with picture or line- In the same way, an architect REPEAT loop that processes drawing generation, although it is may sketch in elevations of a house commands until the O (quit) is not out of place to examine briefly and ask for costing, insulation or pressed. how such techniques fit in. A CAD sunlight calculations. PROCprocesscommand first program that accepts a picture as Returning to the case of an checks for a valid key. It 'F' has input has to deduce certain electronic circuit diagram, this been pressed, the line being information from it. An electrical would be built up using picking operated on is fixed and the engineer may draw a circuit and dragging. In this technique a coordir^ates are set for a new line. diagram as input. A simple but user is presented with a menu of Otherwise PROCdrawordelete is somewhat unrealistic example objects from which he can pick a used to delete the current line in serves to illustrate the point; say he particular object and 'drag' it preparation for redrawing it in a inputs a series parallel resistor anywhere on the screen. Other new position. One of the configuration (figure 2). From this operations that might be available coordinates x, y is updated if one of the CAD program will have to on objects are magnification and the movement keys (L, R, U, D) has deduce that a resistor connected in rotation. Again in the case of an been pressed. PROCprocess- series with two resistors in parallel electrical circuit diagram, as well as command terminates by drawing a has a total resistance (RT): the picture-drawing modules there line to the position now specified will be procedures to keep track of by the xy coordinates. A drawing RT- R1 + R2*R3/(R2 + R3) the spatial relationships between sequence is shown in figure 3. It can then evaluate numerical components. The CAD program The critical statement in the calculations and output information can then build up a formula program is GCOL 3, 1 [exclusive graphically or otherwise. The CAD reflecting some required attribute OR). This means lines can be program will also be able to cope or behaviour of the circuit. This moved over existing lines without ACORN USER JUNE 27 GRAPHICS 10 MODE 4 20 xs = : ys = 30 = X 640 : y = 512 40 GCOL 3, 1 50 PROCdrawordelete 60 REPEAT 70 commands = GET$ 80 PROCprocesscommand 90 UNTIL command$ = "Q" 100 MODE 7 : END Start arbitrary line drawn from 110 DEF reOCprocesscommand (O, 0) to (640, 512) 120 IF INSTR("FLRUD",coninand$) = THEN ENDPROC 130 IF coramand$ = "F" THEN PROCfix ELSE PROCdrawordelete 140 IF '"""" commands = "L" THEN X 150 IF commands = 'R" THEN X 160 IF = commands U" THEN y 170 IF = commands 'D"„ THEN y 180 PROCdrawordelete 190 ENDmOC 200 DEF reOCdrawordelete 210 MOVE xs. ys : DRAW x, 220 ENDPROC Line can be moved anywhere 230 DEF PROCfix from {640, 512) 240 REM Permanent draw to fill in gaps where 250 REM moving line crosses existing lines. 260 GCOL 0,1 : PROCdrawordelete 270 GCOL 3,1 280 = xs X : ys = y 290 X = 640 : y = 512 300 ENDPROC Program 1. Rubberband program without extensions 15 llneoff = FALSE 16 hcursor Key F depressed. First line fixed. = FALSE : vcursor = FALSE Arbitrary line drawn to (640.51 2) 17 printraeasure = FALSE 120 IF INSTRC'FLRUDOHVM", commands) = THEN ENDPROC 171 IF commands = "0" THEN llneoff = NOT(Uneoff) 175 IF commands = "H" THEN hcursor = NOTrhcursor) 176 IF commands = "V THEN vcursor = NOT(vcursor) 177 IF commands = "M" THEN printmeasure = NOT( printmeasure) 178 IF printraeasure THEN PROCmeasure ELSE PRINT TAB(3,3);" 200 DEF HlOCdrawordelete 204 PROCcheckcursors 205 IF llneoff THEN ENDPROC This line can be moved and key F 210 MOVE depressed again xs, ys : DRAW x, y 220 ENDraOC 310 DEF PROCcheckcursors 320 ^^'^ "°^ ^-500, JI,.'i''"''^°'* y: DRAW x+1000, y MOVE X, y 330 IF vcursor THEN MOVE x. y-500: DRAW x, y+lOOO" MOVE X, y 340 ENDPROC 350 DEF PROCmeasure 360 PRINT TABC3,3), ABSCxs-x) 370 ENDmOC Thus any shape can be built up Extensions to program 1 Figure 3. Drawing sequence using first version of program 1 28 ACORN USER JUNE GRAPHICS First Draw Second Draw old plotting new old plotting new 1 1 1 1 1 1 1 1 Figure 4. Lines can safely move over existing ones using GCOL 3 Table 1 . Cumulative effects of draw with GCOL 3 permanently wiping part of them example, to construct two isolated out, as would be the case rectangles we would use a otherwise. Normally, to delete an sequence similar to that shown in object we would replot the object in figure 5. the background colour but this would wipe out intersecting parts of existing lines. Using the above I here are two useful elaborations method, an existing line disappears to make to the rubberband line only momentarily while the current drawing program. First, we can include horizontal and vertical moving line passes over it (figure a line Draw the first rectangle 4). Thus line segment 2 can be cursor line to enable us to up different parts of drawing. This swept over existing line segment 1 a simply another two selections without rubbing it out. This can be adds explained by reference to table 1. to PROCprocesscommand. These You can see from the bottom row of would be: the table that plotting a 1 on top of 175 IF commands = "H" a 1 in the first draw results in a zero THEN hcursor = NOT(hcursor) that is restored to a 1 by the 176 IF commands = "V" second draw. The top row of the THEN vcursor = NOT(vcursor) table gives the effect of a normal draw and erase function. The This means the H and V key Draw a line to the start second draw thus erases or functions are push on/push off of the second undraws, at the same time restoring keys as we used above to switch a any holes in existing lines made by line off. PROCdrawordelete can the first draw. (See if you can work now be further elaborated to check out why the behaviour is unaltered if cursors have to be drawn lines if GCOL 3 is replaced by GCOL 4.) (program 1, 200-340). As it stands the program is Figure 6 shows the cursor being slightly impractical - figures are used in the course of a constructed without the 'pen being construction. lifted off the paper'. That Is to say Another useful aid is a length device. for Switch off this line (press O) after a line is fixed it Is assumed measuring Consider another line is required. This may example measuring the current x not be the case and the easiest projection of the line. This could be way to incorporate line off/line on is accomplished by: to have another key controlling this 177 IF commands = "M" option: / THEN printmeasure = NOT (printmeasure) 171 IF commands = "0" THEN 1 78 IF printmeasure THEN lineoff = NOT(llneoff} PROCmeasure ELSE PRINT This IF statement sets up a push TAB(3,3);" " Fix the invisible line and press O on/push off key - a mechanism we r shall use again. If the variable 350 DEF PROCmeasure 'lineoff is originally set to false then 360 PRINTTAB(3, 3), pressing the appropriate key wilt ABS(xs-x) set it to true. PROCdrawordelete 370 ENDPROC can then be: Note the string on line 120 must 200 DEF PROCdrawordelete now be changed to 'FLRUDOHVM' 205 IF lineoff THEN ENDPROC and that as the program stands the cursors must be switched off before Draw the new rectangle 210 MOVE xs, ys : DRAW x, y fixing. If the measure option is 220 ENDPROC switched on then PROCmeasure is Figure 5. Drawing sequence using which prevents the drawing action obeyed and prints, using TAB, the improved structure if the line is switched off. Now, for current x projection of a line. In ACORN USER JUNE 29 THE PROGRAMTHATS LEAPS AHEADOFALLTHEREST. Progmms fcx^thepeopleT RAM ELECTRONICS (FLEET) SEE IT NOW AT YOUR NEAREST SOFTWARE FOR ALL DEALER! THE MOST FANTASTIC 106 Fleet RoaO, Fleet COMPUTER PLUS GAMES WORKSHOP Hants GU 13 8PA Unit 37 RDS ELECTRICAL LTD ACTION GAME FOR AB&CCOMPUTEHS Wattord.HerlsWOl 2LH Birmingham Shopping Centre 157-161 Kingston Road 11 BrockstoneRoafl COMPUTERS FOR ALL Birmingliam B2 Ponsmoulh, Hants P02 7EF Si Ausiell GHAVESEND HOME COMPUTERS RITCHIE ELECTRONIC | MICRO! Cornwall PL25 3DW Romford, Essex RM1 IDA 39 The Terrace 31 Nonti Parade THE BBC ANGLIA COMPUTER CENTRE COMPUTERIST GravBsend, Kent Bradford, West Vorkshire Bast Benedicis Street KANDYS STORKROSE LTD ^Drwich,ND^tDlkNfl2 4AB Weslclitl-onSea. Essex 40 High Streel 44SlirotDn Street A&D COMPUTERS COMP- LEASE Hunlmgrton London NWl FAST ARCADE PLAY! 143A Fore Street CamDridgeshirePEieeAO SUPERIOR SYSTEMS LTD E BRIDLINGTON COMP CENTRE Essex cot 2T0 MICHOWARE Sutton , Surrey INCREDIBLY ADDICTIVE! 46 Market Place, Old Town ESSEX COMPUTER CENTRE LTD 'i Si Peters Lane TECHNOMATICLTD Bridlington V016 4QL Leicester 17 Burnley Road JWBAGNALLLTD MODEL PLUS London NWIO 18 Salter Street FALSOR COMPUTERS 55AWesl Streel, Boston TOMORROWS WORLD AVAILABLE NOW StallordST16 2JU Lincolnshire PE12 80N Esplanade. Lerwick BINDERMAN LTD NORTHERN COMPUTERS Shetland Isles AT YOUR SOFTWARE 12C Manor Road FAREHAM COMPUTER CENTRE Chuichfieid RQad THE VIDEO PALACE LondonNtBSSA 56Higti Streel, Fareham Fiodsham, Cheshire 62 Kensington HJgfiSt FOR ALL DEALER CARLTON COMPUTERS LTD Hants P016 7BG OFF RECORDS London W8 4 Swanstons Road GALAXY VIDEO LTD Computer House WATFORD ELECTRONICS Great Varmoulti 60 High Street 66 Baltersea Rise 33/35 Cardiff Road NortolliNR30 3fJQ Claptiam Junction , London Watford, Herts WD 18E0 CASTLEHURSTLTO GAMER RMK ELECTRONICS LTD YORKSHIRE MICROCOMPUTERS 1291 High Road Hirion House, Stalion Road 28 RamshUl Road, Scarborough 0Niy£8.95 London Hid BnghtanBNI 4A0 f^ew Milton, Hants BH23 6HZ North Yorkshire von 2QF 30 ACORN USER JUNE > ) GRAPHICS Figure 6. Figure 7. Figure 8. figure 7 the hangers on the suspension bridge were accurately 10 MODE 20 PROCrirawmfnii positioned using this. 30 GCOL 3 , 1 40 PROCplck 50 RRPEAT 60 X = 500: V = 500 PROCdrawordelete(selectionS) W.e have already mentioned 70 RKPEAT picking and dragging so lei's jump SO commands = GET$ 90 PROCproo esse ornna nd ( coranan straight into it. In program 2 we d$ 100 UNTIL f^ommand$ = "F" have set up a menu of objects in no TOOCplok the right-hand side of the screen. 120 UNTIL .selections = "Q" 130 END An object is selected by typing 1 , 2 140 or 3. In practice, if we were using DBF PROCflrawraenu 150 MOVE 900, 0: DRAW this technique frequently, an object 900, 1000 160 PROCdrawr«aistor( 1000. 600) would be selected from the menu 170 PROCdrawoa pac 1 tor ( 1 000 , 400 180 PROCdrawdiode( 1000, 200) by pointing a lightpen at it. When ; 190 HIINT ; TAB(60, 12) "l" ;TAB(60, 18) -a" ; "3' :TA8(60. 24 ) an object is selected it is dragged 200 CjWUrTtL'L' into position and fixed as before. 210 DEF PROCplck Instead of dragging a line we are 220 PRINT TAB(0,0): "Pick. (1/2/3)"; now dragging a complete object. 230 selections = GET$ 240 PRINT TAB(0,0); " "- The program to drag an object is 250 ENDPROC * identical to the rubberband 260 DEF FROCprocesscommanrl(cS) program (which drags the end of a 270 IF INSTH("FLRUD", c$) = THEN ENDPROC line) except every occurrence of 280 IF c$ = "F" THEN PROCflx: ENDPROC: ELSE PROCdrawordelete is replaced by raOCdrawordelete(selectlon$) 290 IF c$ = "L" THEN X = X - 5 PROCdrawordelete(selection$). This 300 IF c$ = "R" THEN x = ;( + 5 procedure selects one out of the 310 IF c$ = "U" THEN y = y + 5 320 IF c$ = "D" THEN = - three drawing procedures (resistor, y y 5 330 HlOCdrawordelete{ selections) capacitor, diode) and the selected 340 ENDPROC object is drawn at a position under 350 DEF PROCfix control of the directional keys. 360 GCOL 0, 1 : PROCdrawordelete(selectionS) 370 Figure 8 shows the screen during GCOL 3, 1 380 ENDPROC execution of the program. 390 DEF PROCdrawordeletefsS) 400 IF s$ "1" = THEN PROCdrawresistor(x y) 410 IF s$ "2" = THEN FROCdrawcapacttor(x y) iaither common facilities in 420 IF "3" s$ = THEN PROCdrawdiodefx. V) picking and dragging programs are 430 ENDPROC 440 DEF m0Cdrawrealstor(x, magnification and rotation. For y) 450 MOVE x.y: PLOT 1, 30, example, the dragging 460 PLOT 1. 10: above 0, PLOT . 1 60 , 470 program, another key option could PLOT 1, 0,-20: PLOT 1,-60, 480 PLOT 1, 0, 10: PLOT 0, 60, be M for magnify and T (turn) for 490 PLOT 1, 30, rotation. The structural alterations 500 ENDPROC 510 DEF PROCdrawcapacltorfs, now required in the program are y) 520 MOVE X, y: PLOT 1, 30, significant. In particular have to we 530 PLOT 0. 0,-30: F1.0T 1. 0, 60 540 PLOT change the way in which we store 0, 20. 0: PLOT 1, 0.-60 530 PLOT 0, 0. 30: PLOT 1, 30, shape information. Currently this 560 ENDPROC information is embedded in the 570 DEF FROCdrawdiodeCx, y) drawing procedures as parameters 580 MOVE X, y: PLOT 1, 30, 590 PLCrr 0, 0,-25 PLOT 1. 0, 50 of the PLOT 1 statement. The most 600 PLOT 1.25.-25 PLOT 1,-25,-25 convenient scheme is to store the 610 PLOT 0.25. 25 PLOT 1, 30, current displacement coordinate 620 ENDPROC values for an object in an array. These displacements will of course Program 2. Picking and dragging change as a function of the angle of rotation. Initially we could set up ACORN USER JUNE 31 GRAPHICS an array for a square, for example, as: squarex(1) 100 squarey(l) 440 DEF PROCdrawsquare(x, 100 y) (2) (2) 450 MOVE X, y (3) -100 (3) 460 FOR i = 1 TO 3 470 To draw the square in any PLOT 1, x(i), y(l) (dragged) position from x,y we need 480 NEXT i PROCdrawsquare (program 3). This 490 DRAW X, y is the same scheme as we have in 500 ENDPROC the component drawing procedures (above) except that we are now storing the displacements in an Program 3. Example procedure array. Now, pressing T would make the L obiect rotate by a predetermined angular increment of, say, 10 510 DEF PROCrotate degrees by altering the relative 520 sintheta = SIN(RAD(10)) displacements. To do this we 530 Gostheta = C0S(RAD(10)) simply use a standard two- 540 FOR i = 1 TO 3 dimensional rotation transform. The 550 = X X(i) : y = y(i) procedure that services the rotation 560 x(i) = x*costheta + command is PROCrotate (program y*sintheta 570 y(i) = 4). Each time the key is depressed -x*sintheta+ y*costheta 580 NEXT new displacements are calculated i 590 from the previous one. Note the ENDPROC figure is stationary while it is being rotated, it cannot be rotated using Program 4. Rotation procedui this structure and dragged at the same time. At Microage you can now get the very best mkCRDRGE value in microcomputer printers. We've selected ELECTRDniCS only the best printers available so you can choose confidently, knowing you're getting the best value for money. The Amazing Seikosha APlOO Big brother to the AP80 the APlOO is a Accessories wider more sophisticated version of the AP80 Seikosha GP-80 Ink Ribbon £4,75 {75p p+p) with a full graphics capability and the ability Seikosha GP-lOO Ink Ribbon £5,75 (75p p+p) to take standard width computer stationery, Dust and sound Cover £3.95 (75p p+p) the APlOO is an ideal choice for anyone with a microcomputer. Its features include: Please Rush me details of all Printers, 80 cols 30 cps • Dot Matrix Unihammer The Incredible Seikosha AP80 action • 116 ASCII standard characters The AP80 is probably the world's • Full graphics capability* Up to 10" paper LOWEST COST, compact 80-cotumn graphic Double width • Upper and lower case • Name. dot-matrix printer available. width printing • Centronics interface: It can produce single and double width Address. characters and has the ability to produce any pattern through its dot-matrix capability The AP80's robust construction and its unique "unihammer" make it an extremely cost effective and efficient printer Its features include The computer I shall be using it with is: 80 Cols 30 cps • Dot Matrix Unihammer action •96 ASCII standard characters • Up 8" to paper width • Upper and lower case AU6 • Double width printing • Standard interface: Centronics Official Orders Accepted DEALER ENQUIRIES WELCOM miCRDftGE ELECTRDniCS 01-959 7119 135 HALE LANE EDGWARE MIDDLESEX HA89QP TELOl 959 7119 TELEX 881 3241 CALL Open Mon-Sat 9.15 ani-6.00pm.Thurs 9.15am- l.OOpm. 32 ACORN USER JUNE GARLAND CODflPUTING LEARNING SCIENCE WITH THE BBC MICROCOMPUTER UP TO 30% We are specialists in the development of top-quality software produced by professional teachers. With ROYALTIES an unrivalled reputation in the field of Biology education, we are pleased to add the first Physics programs to our growing list of software for schools paid for high quality original software and colleges. BIOLOGY BBC, SPECTRUM, DRAGON 32, Action of the Heart £11.00 Female Reproductive Cycle £12.00 PET RML380Z Blood Circulation Maze £9.00 Dieting £9.00 Games and Educational programs Kidney Structure and Function £12.00 Human Blood Groups £15.00 Inheritance (four programs) £30.00 Genetic Code/ Mutation £15.00 DNA Structure and Replication £15.00 Mitosis £9.00 WANTED URGENTLY Seed Germination £16.00 Water Relations of Plant Cells £15.00 Glycolysis/TCA Cycle £15.50 Littoral Zonation £16.50 Gore Point (Ecology) £16.50 ik PHYSICS Circuits-Switches £11.00 ."00 Circuits-Diodes El 1 All prices inclusive of VA T. Please send for full details. SILVERLIND LTD GARLAND COMPUTING 156 Newton Road, Burton-on-Trenl 35 Dean Hill, Plymouth PL9 9AF, Devon Staffs DE15 OTR the educational specialists BBC Spectrum HQ/COm GiANT ADVENTURE GAMES GARLAND COMPUTING 1) COLOSSAL ADVENTURE; The classic mainframe game "Adventurfi'' £ill wiih I he Griginal lit'i^surHS S creatures + 70 extra rooms, Learning Maths with the BBC Microcomputer 2) ADVENTURE QUEST: Through torest, desert, mounlains, caves, water, hre, moorland and swamp on an epic quest vs Tyranny. As specialists in the development of top-quality software 3) DUNGEON ADVENTURE: The vast dungeons of the Demon Lord have produced by professional teachers, weare pleased to announce survived His fall Can you get to their treasures firsf a collection of programs for junior level maths (age 9-12). Every Level 9 adventure has over 200 individually described locations and i5 Animations and simple games help children learn the principles packed With puzzles - a game can easily take months to complete. Only sophisticated compression techniques can squeeze so much in' Each game of mathematics. needs 32K and costs £9 90 JM1 ANGLES— five programs showing how angles are BBC FORTH, FORTH TOOLKIT formed and named. JM2 DIRECTED NUMBERS -three programs to help "rq FORTH ' runs on 1 6K or 32K BBC Level 9 Computing are pleased to children understand positive and negative numbers. micros and costs £ 1 5 It announce a new toolkit for * 'T FORTH" on 32K BBC micros. follows the FORTH-79 STANDARD q JM3 FRACTIONS— four programs to help with fractions. and has fig- FORTH facilities; It costs only £10 and adds the follow- - * provides 260 FORTH words; ing facilities to FORTH. JM4 CO-ORDINATES AND LINES five programs * is infinitely extensible; * a 6502 assembler, providing introduce the concept of co-ordinates and equations of lines. * has a full-screen editor; machine-code v^ithin FORTH; JM5 SYMMETRY— five programs which develop concepts * allows full use of the M.O S, • turtle graphics, giving you * permits use of all graphic modes, easy-to-use colour graphics: of axis and order of symmetry. even 0-2 Ijusl'). decompiler routines, allowing the JM6 MOTION GEOMETRY -three programs which * provides recursion easily: versatile examination of your introduce geometry- reflectbns, rotations, transla- * runs faster than BBC BASIC; compiled FORTH Programs. motion * needs no added hardware; * the full double-number set, tions and enlargements. * includes a 70 page technical * an example FORTH program: and Each cassette -£7.00 (inc VAT and P&P). Set of six manual and a summary card; demonstrations of graphics; * has hundreds of users * other useful routines. cassettes (or40-column disk)— £30.00 (inc.) g%f\ ff0%0V% Astco'ds m/c,g £7,90 %1# VWIll Garaay Invaders m/cg £5,90 Extension Basic , £15/£30ROM Missile Defence ,. m/c,g£7.90 GARLAND COMPUTING Adds 30 new keywords to BASIC Super Gulp eb.g £4,90 Compression Assembler 2 . £12 S-games cassette itiIsc £5,90 35 DEAN HILL Small Source + high speed (full range in CATALOGUE) PLYMOUTH PL9 9AF, DEVON ALL PRICES INCLUDE P & P AND VAT. All programs are in slock and will be sent within 2 days of receipt Please send order or SAE for catalogue, describing your micro, to: LEVEL 9 COMPUTING the educational specialists 1 OepI A . 229 Hughenden Road, Higti Wycombe, Bucks. HP 3 SPG ACORN USER JUNE 33 INTERRUPTS HOW TO HANDLE INTERRUPTS Interrupts allow external devices While the program is running, type such as alarms, temperature John Ferguson and LIST and press Return, The sensors, timers etc, to demand characters will not appear on the immediate attention from the Tony Shaw explain screen and you might think it has computers microprocessor. They not received your command - but it force it to abandon its current task has! The characters have been and initiate a completely separate what interrupts are captured and stored in an input program call an interrupt routine. buffer using an interrupt routine. The concept ol an interrupt is and how they work, Once the program above finishes similar in some respects to a the command LIST will appear and subroutine call. In both cases be performed. program flow is diverted to a with examples Finally, the analogue to digital separate program (a subroutine or converter (ADC) uses the system an inlerrupt routine) which is then from one of its internal timers, VIA to pass its 'end of conversion' executed before control returns to updating the real time clock. signal to the microprocessor's IRQ the main program, However, there The 6850 ACIA serial interface inpuL New samples are taken are some important differences. chip can be programmed to approximately every 10 milliseconds Subroutines are called at specific generate IRQ interrupts whenever a with an interrupt routine updating a positions in the main program serial character is received at the table of results for each of the four using a JSR (Jump !o SubRoutine, RS423 port. input channels. see January issue) instruction, in Whenever a key is pressed a Because the machine is contrast an interrupt routine can signal initiates an interrupt using continually generating interrupts, occur at any time, initiated by an the system VIA. The interrupt great care is needed with any external device sending a signal to routine decodes which key has routine where execution time is one of the microprocessor's been pressed, evaluates its ASCII important, ie any 'real time' interrupt pins. code, and places it in the input programming. For example, a The 6502 microprocessor in the buffer. common method for producing a BBC micro has two input pins to The simple routine below time delay is to use a simple detect interrupts; illustrates how the operating system program loop. If interrupts occur NMI (Non Maskable Interrupt). is still active capturing depressed during the loop the overall This input is 'edge sensitive', and keys even when running a Basic execution time is increased by only initiates an interrupt routine program; including the interrupt routine. it when detects a high to low 10 FOR N = TO 30000 ; NEXT Although the machine operating transition. ID HEM USING INTERRUPTS IRQ (Interrupt ReQuest). A TO INITIATE ZO REM A PERIODIC "EVENT" level sensitive input, active at 30 REM (FOR OP. SYSTEMS>=1 .0) 40 REM USE KEY 9 TO START logic zero. 5Q •KEY9-CALLSDa65 |M" As the name implies, the non 60 0SASCI=!FFE3 ?0 OSW0HO:ftf FF1 maskable interrupt has a higher SO 0S8YTE^aFFf4 90 priority than IRQ. Further important EVNTV=B0220:REM EVENT INTERRUPT VECTORS TOO iressage=8DD01 differences between these two will 110 REM SET UP TIME CONSTANT FOR INTERRUPT 1 20 constant -ines53ge»50 discussed later. be 130 constant ! -SFFfFFDFF:?{constant'-6)=SFF 140 REW INSERT MESSAGE (UP TO 49 CHARACTERS) 1 SO Sfl,essage="TIME TO TAKE THE DOG A WALK" I he operating system of the BBC 160 FOR PASS=0 TO 3 STEP 3 micro makes extensive use of 170 PX = fne5saget1 00 180 COPT PASS Interrupts {figure 1), Both the floppy 190 .START LDA KEVENT MOD 256 \POINT TO EVENT disc system and the Econet 200 STA EVNTV \HANDHNG ROUTINE £10 LDA «£VENT OIV 256 network use non maskable 220 STA EVNTV+1 230 LDA interrupts. Software to IfU-.Lax #5 \SAM£ AS tF)(14,5 handle these 240 JSfi OSBYTE \ENABLES TIMER EVENT 250 interrupts is provided in special -SETUP LOA #4 \SELECr TIMER 260 LDX ROM chips Issued with each #constant «0& 256 \P01NT TO TIME CONSTANT 2 70 LOY ((constant DIV 256 system. The User Guide suggests 280 JSR OSWORD \STAHT TIMER 290 RTS NMIs should be avoided by the 300 .EVENT PHA:T){A;PHA:TYA:PHA:PHP \SAVE REGISTERS 310 user and left only for the machine's •'^'' '^^SS \OISPLAY MESSAGE 320 JSR SETUP \RESTART TIMER use. Interrupt request (IRQ) is also 330 PLA:rAy:PLA:TAX:PLA:PLP \HESTORE REGISTERS 3A0 used by the operating system with RTS 350 -MESS LDA #7:JSR OSASCI \BLEEP the microprocessor receiving inter- 360 LDX #0 370 .AGAIN rupt signals generated by two on LDA message, X \geT CHARACTER 380 JSR OSASCI \OUTPUT - 390 board chips the 6522 VIA ^"^^ \NEXT CHARACTER 400 '^"'^ *K0° \WAS IT A C-RETURN (versatile interface adaptor) and 4 10 BNE AGAIN \jf NOT BACK FOR MORE 6850 ACIA. 420 "^^ \MeSSAGE COMPLETE 430 The system 6522 VIA (&FE40- 440 NEXT PASS Program 1. Using the interval timer to 450 &FE4F) provides periodic interrupts E"*^ initiate an 'event' 34 ACORN USER JUNE INTERRUPTS system makes extensive use of IRQ interrupts, the user can easily add Tube IMHz bus interrupt handling routines. In theory, this should be possible with IRQ IRQ riNMI any of the machine operating systems, but it has not been A to D documented for release 0.1. The Clock Keyboard converter remainder of this article deals only with the interrupt handling facilities offered from release 1 .0 onwards. Also, page D locations are used by the disc operating system and the User System Floppy Econet BRK handling routine should be ACIA VIA VIA disk network placed elsewhere if your machine has discs. The contents of &202 and &203" should be altered to point to the new home of the BRK IRQ t NMI handling routine. i 6502 Microprocessor Xo simplify interrupt handling the BBC micro's operating system contains some ready made Figure 1 . Interrupt schematic of the BBC mrcro interrupt software that can be used to handle interrupts generated as the result of an 'event' within the Disable Enable Event machine. A typical event would be buffer a pressed key, or completion of a *FX13,0 *FX14,0 Output empty task by the ADC. The complete list *FX13,1 *FX14,1 Input buffer full of events is: input buffer empty; *FX13,2 *FX14,2 Character entering input buffer input buffer full; depressed key on *FX13,3 *FX14.3 ADC conversion complete keyboard; start of TV field pulse; *FX13,4 *FX14,4 Start of vertical sync. 'timeout' condition on interval timer; *FX13,5 *FX14,5 Interval timer crossing zero escape condition detected. *FX13,6 *FX14,6 Escape pressed The user may decide to detect a particular event or ignore it. Figure 2 gives the list of *FX14 commands Figure 2. * FX commands used to enable and disable events used to enable events and the corresponding *FX1 3 commands that disable events. (See Acorn = OF FUNCTION User, May issue.) A SUMMARY When an event is detected the Read a line from the current input stream to memory operating system can be diverted 1 Read the elapsed time clock to the user's own event handling 2 Write the elapsedtime clock routine. Two vectors, EVNTV and 3 Read internal timer EVNTV+1 (&0220 and &0221}, are 4 Write internal timer 5 Read a byte in the input/output processor memory used to point to the start of the 6 Write a byte in the input/output processor memory handling routine, (This routine event 7 Generate a sound must terminate with an RTS 8 Define an envelope for use with the sound instruction to return control to the statement main program.) The User Guide 9 Read pixel colour at screen position X,Y Read dot pattern of a specific displayable suggests the routine should last no A character longer than one millisecond and B Read the palette value for a given logical should preserve the processor colour registers. Note: All OSWORD calls use a parameter block somewhere in Program 1 shows an example memory. On entry X(LSB) and Y(MSB) are used as pointers to timer initiate using the interval to an the START of the block. event every five seconds. The timer is configured using an OSWORD Example = 3 means 'read interval timer'. call with the accumulator equal to 4 A The interval timer is incremented every 1/100 of a second. (figure 3). The X and Y registers are The time interval is stored in 5 bytes pointed to by X and Y. set up to act as pointers to the A = 4 means 'write interval timer'. starting location of a five-byte time On entry X and Y point to the 5 locations containing the constant that is loaded into the new time constant. timer. The timer increments by one Figure 3. System OSWORD call summary every 1 /1 00th of a second and initiates an event when it reaches ACORN USER JUNE 35 . " . THE BEST BBC MICRO SOFTWARE ^ SPt' PRODUCED BY AN INDEPENDENT SOFTWARE HOUSE BBC — TOP QUALITY MACHINE-CODE PROGRAi o oo o[;:oooooo OO Q OO O O O) O ODGOOQ OO O O O p. 'O OODO oooo o: .O O . .O OO UNNER (32K NDROPOUT(32K) £7.95Cassette Incredible arcade type game featuring Not just another version of Frogger . . The only full feature machine-code Based upon the areadegsineafZyGON, -"""^"1 mushrooms, snails, flies, spiders and this is the proper high-quality version of the arcade game available but our version improves upon the the centipedes of course. Excellent that you've been waiting for. Graphi- .,. B.B.C. micro. Features include: original arcade game itself. You have to of their graphics and sound. 6 skill levels, hi- cally brilliant, with gaping-mouthed scrolling screen, radar ifiWiSVlf check- shoot the aliens out "boxes" score, rankings, bonuses, and increase- crocodiles, diving turtles, and frogs point flags, fuel gaugMBTOWMimens, before the "boxes" fill up. Once full, the aliens fly down relentlessly, ex- ing difficulty as the spiders become that flex their legs as they jump along. 6 skill levels, rank^gik tRBttasing oloding ground. more active and the ef mush- Increasing difficulty, hi-score, respon- as they hit the Mmbar difficulty, and si i Mllll HJJII Suitable for use with keyboard or rooms increases. sive controls, sound effects, flies and Suitable for utt WKSt IwyteBrd or joysticks. "Visually this game compares well with bonus frogs. joysticks. "Do not be fooled by their placid the arcade version, being colourful ••• NEW RELEASE ••• ••• NEW RELEASE appearance - these moths are out to and clear. — get more than the clothes in your . . YOUR COMPUTER wardrobe" . . . YOUR COMPUTER iSSS"'^,* 7<^x^M«»«>n.^H(>«>« M ^ #^ M -i. >^< 7^ >sc >i< >vc ><^ fi-«^ M ib i 5 Cassette FRUIT MACHINE (32K] £7.95 Cassette Arcade-style game based upon features Fast action version of the popular arcade Superb version of the old clas^ artSde PrebtfilV ma but MUt macWM from DEFENDER and SCRAMBLE. 5 game. 4 types of Galaxian (in 3 initial ^ame, including a few extras. 48 march- plementation on the mar* types of menacing alien fire at you and screen formations) swoop down indi- ing invaders drop bombs that erode program has it all . . . HOLD -"'' may attempt to ram you. Separate attack •"•*''~'ly or in groups of two or three. your defences, and two types of space- spinning reel" " 6 GAMBLE, phases, fuel dumps, repeati — Vels, high score, rankings, ip fly over releasing large bombs that and sound effects, m cannon, asteroids, smart bou bases and increasing dr netrate through your defences. In- lines. This is THE __. . Bpprs, ranUngt, % dcitt taratit 4Breasing difficulty, ht^ ae&ta, WfiBnOt program to buy. graphics and sound. ^te graphics aravui^ 'A ttwtmSfMj iW|HMjMlipiil||>liiilli|l. WMV ffttfe imagination yoat worth the moiaar... 7urful graphics, responsive controls and the convince yourself you a. _ »' . . . HOME caPwPW""*" )UR COMPUTER ... YOUR COMPUTER nPAl PRQ tFAl FRS DEALERS rr. DEALERS . DEALERS All our programs are available at all good dealers including:- ,. ELTEC COMPUTERS, 217, Manningham Lana,Bl»cttar«t. . MICROSTYLE, 47 Cheap Street, Newbu BUCON LIMITED, 18 Mansel Street, SwanSGS. SIR COMPUTERS LTD,, 91 Whitechurch WEST COAST PERSONAL COMPUTEHa 4? (Me Street. Ayr. ELECTRONEQUIP, 36-38 West Steet, Fareharti, Hants. BYTEWARE LIMITED, Unit 25, lliii I. iilllll fliUllli. ^ewcastte. MICRO MANAGEMENT, 32 Princes Street, Ipswich. " MYCROSTYLE, 29 Belvedere, Ur imiMMWlt ' * f 3D COMPUTERS, 230 Tolworth Rise SoutluTaluvol^; OVERSEAS. , mBMimSR 3D OTHER DEALERS IN THE U.K. AND OYALTIES FOR HIGH QU DISC SOFTWARE AVAILABLE NOW SUPERIOR SOFTWARE All our programs are ready for despatch on 5!^" discs at £11.95 each. Dept. AU3 , WE GUARANTEE THAT,; (1)AII our software runs correctly on all current operating systems and BASIC ROMs. 69 Leeds Road, Bramhope, Leeds. (2) All our software is available before we advertise. (3) AJI our software is despatched within 48 hours by first class post. Tel. 0532-842714 (4) In the unlikely event that any of our software fails to load, return your cassette or disc to us and we will immediately send a replacement. INTERRUPTS 10 RIEM CHf^NGINC IRQ1. UECTDRS routine makes use of A, X or Y then :'0 RFM (OP. syste:m >=i.o) these registers should be saved at the start of the interrupt routine and 40 DSAECI^&KFEa restored at the end. 45 RF-^M INSiERl INTERRUPT ROUTINE 60 R;i-,^vOi;i01 During the interrupt routine the I 70L flag is set preventing interrupts on JOO.RUPT PHA XSAVE ACCUMULftTOR the IRQ input. 11" UlA *&4K.JSR OSASCI \PR1HT "A" When an IRQ interrupt is 5° I'L NRESTORE ACCUMULATOR J f received the activity followed by the '"^ri \Rt:TURN FROM INU.RRUPT J^^-l processor is similar to that for NMI. REM ];^0 CHANCE IRtJl UECTORS TO POINT ID ABOVE ROUTINE As with NMI, an IRQ interrupt waits until the processor has finished its ^BO.GO 1..DA *RIJPT MOLi 256:STA IRQIU ^0 current instruction. The processor LDA *RUPT [IIU 256:STA IROiy-J-l l^f^ \HACK then checks the interrupt flag in the :ij^.| TO BASIC processor status register and if the ??0 CALL GO flag is set ignores the interrupt and Program 2. Disabling IRQ interrupts during a timing loop continues with the main program. If flag is clear lir.i REM DiSRBLING the the microprocessor IHQ IN i EFvh'i Ip fS 20 OSRSCI^ii^FF&J sets the flag to prevent fuilher IRQ Sei 0SRDCH=i!.FFE6l interrupts and then proceeds to store the porogram counter and the ^MrS-^, '-'^-.^ ^DISABLE IRQ INTERRUPTS processor status register on the stack. Vector locations &FFFE and 39 jSR OSRscx sOhFU S;-RF(-N &FFFF are then used to point to the 1 mo first instruction in the interrupt lie CRLL £iTRR-[ l£:i^ END n handling routine. As before this Program 3. Disabling interrupts disables the keyboard instruction is usually an indirect jump through two RAM locations. zero. Line 130 sets up the time written to capture and store data Again, an RTI instruction is used to constant to &FFFFFFFDFF in from the ADC at say 10 minute return the microprocessor to its memory locations starting at intervals. At the same time a original program and restore the address 'constant'. Ttie machine student could use the machine, processor status register. code program begins by setting up completely unaware the micro was Two instructions give the the event vectors to point to the performing a second job. Provided event handling routine event, and any programs used did not then proceeds to enable interrupts overwrite the event handling routine IRQ or BRK instruction from the interval timer using the or the captured data, a short machine code equivalent ot program run at the end of the day *FX14,5. would display the captured data. The event handling routine begins by saving the processor's O'n receiving a high to low registers and displays the message: transition on the NMI input the No / it a BRK \ -TIME TO TAKE THE DOG a WALK'. processor completes its current \ instruction? y Before returning control, the routine instruction before carrying out the initialises the interval timer for a following sequence of events. new event, ensuring events The program counter followed by Yes ' ' continue to occur at regular the processor status register is intervals. The routine ends by pushed onto the stack. The Indirect jump Indirect jump restoring the processor's registers. microprocessor then goes to through BRKV through IRQ1V (&0202) to BRK After assembly, the program can memory locations &FFFA and (&0204) handling routine be executed by pressing function &FFFB to find the ADL and the key 9. Now, any activity, the ADH of the first instruction in the Points by default machine is performing will be. interrupt routine. With most systems interrupted at five second intervals this is an indirect jump through two with the reminder to take the dog a RAM locations that can be altered Check out source walk. Even typing NEW and to point anywhere in the memory ot interrupt, and service entering another program will not map. On completing the interrupt stop the repeated interruption. routine, control is returned to the Pressing Break however will original program using an RTI disable the timer event and restore instruction. RTI restores the If not found indirect jump normality. program counter and processor through IRQ2V (&0206) The example may seem trivial, status values which were placed on to user routine but this relatively simple technique the stack at the time of interrupt. will enable the BBC micro to The program counter and perform several different tasks processor status are the only Figure 4. Operating system apparently simultaneously. For registers saved automatically on IRQ/BRK handling example, an event routine could be entering the interrupt routine. If the ACORN USER JUNE 37 BBC C.J.E. Specialists rrikcracDnipuiers VAT Included where applicable Quality Disk Drives - Single drive 40 track single sided 1 1 00k £210.00 Dual drive 40 track single sided 2 -- 100k £350.00 Dual drive 40 track double sided 2 - 200k £546.25 Dual drive 80 track double sided 2 - 400k £799.25 All drives are cased with own PSU for reliability, and include connecting cables and utilities disk. Delivery £4.00 Software for the BBC Micro MISSILE CONTROL the first implementation on ttie BBC Micro of the popular arcade game. I32K) £9.00 MAZE MAN an authentic version of the popular arcade game, (32K) £6.00 BALLOONS a highly original game that soon becomes compulsive playing. (32K) £6.00 DISSASSEMBLER the memofy dump routine includes a scrolling back in memory facility. (IGK) £5.00 MISSILE CONTROL. MAZE MAN and BALLOONS use the Keyboard or Joysticks for control 30 + Programs for the BBC Microcomputer This Book contains program listings, with explanations and tips on using the BBC Micro GAMES UTILITIES GRAPHICS and MUSIC Most programs will run on Model's A and B Edited by C. J. Evans, various Authors. A pair of cassettes with all the programs is available. BOOK £5.00 BOOK and CASSETTE SET £9.00 LEADS The BBC Micro comes without a cassette lead 7Pin Din lo 2 i 3.5mm and 1 x 2.5mm minijacks £4.00 7Pin Din to5Pin Din and 2.5mm minijack £4,00 7Pin Din to7Pin Din £4,00 7Pin Din PLUGS Two for £0,65 6Pin Din PLUGS (for RGB socket) Two for £0,65 5Pin Din PLUGS (360' for RS232) Two for £0,65 RS423 TO RS423 (BBC Micro to BBC Micro) Two metre cable E4.00 Four metre cable £5.00 TELEVISION/MONITOR LEADS full range available Phono plug to Co ax with high quality cable 3 Metres £3,00 BNC Plug to 8NC Plug £3.10 8NC Plug to Phone plug (i.e. BBC Micro to Rediffusion TVRM) £2.20 RGB 6PIN DIN to 6PIN DIN 1 metre £4.00 2 metre £5.00 PRINTER CABLES BBC to 36 way Centronics Type connector £17.50 BBC to 25 way D Type (For use with RS232) £ 9.50 BBC to 40 way edge connector (Centronics 739) £20.00 TORCH to 36 way Centronics Type connector £20.00 Blank C30 Computer Cassettes Ten for £4.50 1 5 Way D Type Plug with Cover £2,75 avtnldble from stock for Computet graphics design pads 100 sheets £4,00 Now the BBC Model 'B' with DFS di-sk interface, tlie BBC Upgrade Kits very latest half-height disk drives from RAM UPGRADE (lOOns) £23.00 KIT A Printer and I/O Port £ 9.50 TYA(1 world leaders in high performance KIT B Analogue Port £ 8.00 5 ; lEich floppy disk drive technology. KIT C Serial I/O and RGB £10.00 KIT D Expansion Bus/Tube £ 8.00 Full Upgrade kit £60.00 Note; Our low^ prices include cables ior All components full specification direct connection to the Model 'B' but STAR DP8480 PRINTER From £250.00 Inc VAT please add VAT. Post and packaging is FREE. 80 CPS : 80/96/132 COLS BIDIRECTIONAL LOGIC SEEKING Only 49mm high including feet. TRACTOR WITH FRICTION FEED Dealers and Educational Outstanding reliability. CENTRONICS £217.39 + £32,61 VAT - £250.00 i Establishments RS232 £235.00 t £35,25VAT - £270.25 Twrelve month warranty. High Res Graphics option to allow BBC Screen dumps £15.00/£20.00 Ttilephoii'i- oiil''r-i w(-]'"."im') wiili Bri-'-|..iycejrd..Ai:T;t^!;s (24HR SECURICOR DELIVERY FOR PRINTERS £8,00) Contact us for details of generous discounts. VAT Included where applicable Send SAE for full Price List of our large range of accessories. 2a Green Street Sandbach POSTAGE Add per order or as stated C.J.E. 50p Cheshire Depl (AUl, 25 HfNRY AVE, flUSTINGTOh CWll 9AX MMK s W.SItSSEX.VV.&U^i^itX. UNBN1G 2PA (D9062) 6647 I MAIL ORDER MICROS IMkcrEicanipuiers Ttelephone 0782 811711 38 ACORN USER JUNE INTERRUPTS programmer control over IRQ 10 REM CHRNrjING IRQl VEHTHR:-; interrupts: SEI {set interrupt 20 REM <0P. SYSTEM >=i.e> disable); CLI (clear interrupt 30 iRQ:L'v'=ri,0sei4 40 0SRSCI-^:FRt3 disable). The first is used to set the 45 REt'l INSERT INTERRLIPr ROUTINE interrupt flag in the processor 50 p:-:»Sj0D0i status register thereby disabling 70C IRQ interrupts. CLI clears the lee.RUPT PHR -.SRVE RCCUriULRTOR 110 i*a<41 ^ JSR OSRSCI vPRINT "R" disable flag, enabling I RQ interrupts. 120 PLR .RESTORE RCCUMULRTnR Program 2 shows how both 130 RTI \RETURH FROM INTERRUPT instructions can be used to protect 1403 160 REM CHRNGE IRQl vectors to point TO RBOVE ROUTINE a routine where the execution time i70C are worth important. Two points l&0.Gn LDR *fRUPT mod 256 -STR IRQIV attention. Setting the interrupt 1^0 LDR #RUPT DIV 256. STR IRQlV+5. 200 give f;:ts \BRCK TO BRSIC disable flag will only 2103 protection from IRQ interrupts, not 220 CRLL GO from NMI. Furthermore, disabling Program 4. Changing IRQl vectors - take care! interrupts within the BBC micro will 10 REM result in problems with some of its ENABLING INTERRUPTS FROM CBl OF USER yiA 20 REM USING IRQ2 yECTQRS TO normal housekeeping duties {for POINT TO INTERRUPT ROUTINE 30 REM (OP. SYSTEM ;=!. 0) example, the real time clock will 40 IRQ2V-&0206 lose time). Program 3 shows a 50 0SfiSCI-&FFE3 60 REM FIRST INSERT INTERRUPT second problem that will arise if ROUTINE "RUPT" 70 P7.=tomi interrupts are disabled when the 80C 'get a key' routine OSRDCH is 90.RUK' PHA \SAye ACCUMULATOR 100 used. The program is the typewriter LDA *&4i:.JSR OSASCI \PRINT "A" no LDA example given earlier with the -^'^E^-> \CLEAR INTERRUPT FLAG 120 PLA \RESTDRE ACCUMULATOR addition of an SEI instruction. 130 RTI \RETURN FROM INTERRUPT However, the program 'hangs' in M03 U.O REM OSRDCH, waiting for the key which ENABLE INTERRUPTS DN C&l OF USER VIA lAO REM AND POINT interrupts TO INTERRUPT ROUTINE is never detected since 170L are disabled. 1 BO . GO LIlA tOlBTA &FE6C \SE1 UP PCR TO DETECT H-L TRANS. 190 LDA *iiP:STA &FE6E \D1SAHLE ALL BUT CBI ?00 LDA *&90:STA S,FE6t \ENABLE CBl INTERRUPTS Unce an IRQ interrupt is received, ?iO\CHANGE IRQ2 VECTORS 10 POINT TO ABOVE ROUTINE ^'^'0 LHA 4RUPT the operating system follows the MOD 256 : ST A IRCJ2V 230 LDA *RUPT KIKI 256: SI A IRQl'U+l routine shown in figure 4. The \BACK TO BASIC routine first checks the processor's ?50T 760 CALL (50 status register to see if the interrupt 270 END was caused by a BRK instruction {a Program 5. Using software interrupt described later). CBI on the user VIA to initiate an interrupt If not, vectors point at the 10 REM ENRBLING INTERRUPTS FROM CBI OF USER VIR >; USING OSBVTE machine's own routine to handle 20 REM IRQ2 VECTHRc POINT TO INTERRUI ROUTINE interrupt signals from devices such 30 REM ';0P. S'VSTEM = 1.0 40 IRQ2V=S,0'£gi6 or the real time clock. as the ADC 50 OSRSCI*a.FFEr-i The machine's interrupt handler 60 QSBVTE=&FFF4 70 REM then interrogates each of these FIRST INSERT INTERRUPT ROUTINE "RUPT" 80 P.'';=&i0D01 devices to determine which has to 90C If source of the be serviced. the 100. RUPT PHR ^T.XP^PHfl^TVR^ PHR •SRVE REGISTERS 110 #s^41 interrupt is not found the handier LtJR JSR nSRSCI ^PRINT "R" 120 LDR #&96 vRERD PORT E assumes it came from a new 130 LDX #i6a-JSR OSBVTE RNC' CLERR INTERRUPT source, eg the VIA or the iMHz 140 FLRG PLRaRY:pLR!TRX'PLR RESTORE REGISTEfJS 1 50 bus, and progresses using an RTI -RETURN FROM INTERRUPT 160J indirect jump through locations 170 REM EHRBLE INTERRUPTS DN CBi np USER VIR &0206 and &0207 {IRQ2V) to a ley REM RNU POINT TO INTERRUPT ROUTINE user supplied routine. 200. GO LDR #ii.57iLDH Hi6C It may sound complicated, but -SELECT PCR ON USER VIR 210 LDV #3 ' JSR OSBVTE help. ^SET UP TO DETECT H-L TRRNS. the following examples should 220 LDR #li,97 LDJ-; WiSE SELECT lER ON USER VIR 4 begins by mserting a 230 LDV Program *P^6P^JSR OSBVTE ^DISRBLE RLE BUT CBI INTERRUPTS 240 LDR short interrupt routine to place the m-37 LbX #3..SE ^SELECT lER OHUSER VIR 250 LDV #i:90^JSR OSBfTE .„ .^,_ . Only ENRBLE CBI,^ . INTERRUPTSiM,c:,..n,u character 'A' on the screen. 260 LHRNGE iRQ2 VECTORS TO POINT TO RBOVE ROUTINE" is preserved since 270 the accumulator LDR **RUPT MOD 256 'STR IRQ2V ' 230 this is the only register used by the LDR *;RUPT DIV 256 ^ STR IRG2V+1 290 ^~^-- --.BC-iCK TO BRSin routine. The second part of the 3003 program then sets up the IRQl 318 CRLL iO 320 vectors to point at interrupt routine END Program 6. As program 5. but using OSBYTE 'RUPT. page 62 ACORN USER JUNE 39 BLACKJACK, TEXTPRO, DISASSEMBLER 002 GALAXIAN 003 APOLLO 004 1 tape containing 3 programs representing Arcade quality game using machine code, viwid Lunar Lander with a difference! 4 stage game incredibie value for money. Mode 1 colour, Moving Slars, HiScore, Bonus comprising Orbil, Long Range, Mid Range, BLACKJACK is like the arcade game, but uses Ship, Flagships, Swooping Aliens and Exciting Detailed Landings, Limited Fuel. Hall of Fame, much better graphics - so real you could pick Sound Effects. Sound, Moon Walk etc. them off the screen! Runs on a model B for C6.95 inc. Runs on a model B for £6.95 inc. TEXTPRO is a simple word processor, offering text scrolling, cassette routines, line editing, t:. I 2 &0 380 justification, insertion and deletion, variable line width and page length, data verification, line centralizing and printer commands including page scrolling, large print and variable spacing. Full AND instructions and function key labels supplied. DISASSEMBLER lists object code and Assembler mnemonics. Includes a pause function, printer option, page mode and only occupies 4.5K of RAM. Full instructions and function key lables supplied. NOW Runs on a model B for E6.95 inc. '< 005 GUNSMOKE is the latest release from SOFTWARE INVASION. It's completely different from any - game you've played before. Superb realistic sound effects - high speed animation - nail biting action fantastic highly detailed graphics, mixing colours to produce brown, grey and olive In addition to the normal shades. You play the part of a Wild West Gunslinger, dodging bullets and trying to to shoot bandits as they appear in doors, windows, alleys and on the roof. There's sixteen different bandits who need no provocation to fill you full of lead. If you manage to kill them all, it's not over, day turns to night and the nightmare begins again. 50 Elborough St., Southfields, If you're quick on the draw, this game's for you! GUNSMOKE runs on a BBC Micro model B and costs just £7.95 inclusive. London SW18 5DN. 40 ACORN USER JUNE BEEB FORUM MULTIPLE STATEMENT LISTING OPTION IN interpretative languages such as IAN BIRNBAUM sets out to improve Basic there is continual conflict, Program £20 legibility your programming techniques on the between program efficiency and earns BBC micro. legibility. The existence of the £20 He will answer reader's questions LISTO command in BBC Basic is in this column and develop their evidence of the designers' wish to ideas - as well as giving some of his reduce this conflict. However, a own. But the real aim is for readers major cause of illegibility is the to provide the questions and the use through the first piece of code. It answers. of multiple statements on a line can turn the listing option on by separated by colons, which LISTO CALL&D2F. At least E5 will be paid for any tip published, with E10 for those which does nothing to tackle. CALL &D24 and CALL &D2F are merit a one-star award and £20 for Listing 1 checks the output potential causes of disaster since reaf humdingers! stream for colons and precedes any finger trouble in typing could The idea must be original and be each by a carriage return, line feed cause a system crash. For this described clearly and fully. It should and five spaces. Colons which reason lines 320 and 330 assign not have been published before. appear in REMs and text strings function keys fO and f1 to perform Your contribution should be typed will be affected also. However, the calls (fO turns the listing option or printed, with any substantial listings on cassette, colons tend not to be used in such on: f1 turns it off). but only included to a point. circumstances and the inconveni- Finally, the listing option make Send your hints or questions to ence is usually minima!. deschbed above can be used in BBC Forum. Acorn User, 53 Bedford When run, the program loads conjunction with LISTO. However, Square, London WC1 B 3DZ. Please three machine code routines into when using edit and copy keys it is include a self-addressed envelope if memory page D (which is reserved recommended to all listing disable your contribution is to be returned. for user routines in non-disc options. We cannot answer letters machines). individually, but a cross-section of - The first routine loads lines 60 NB, If you have discs, or any common and interesting points will 190 into memory DOO - D23. It other upgrade which accesses be covered. checks for a colon and outputs the page D, use &C00 onwards extra characters and colon if instead of &D00. Change 270 to SCREENS TAPE detected. If one is not detected it #&C instead of #&0. Change ON simply outputs the character. The line 30 to &C00 instead of &D00. MR H. Edwards of Oxney has scheme is similar to that on page Also change lines 320 and 330. written to ask how to save the 457 of the User Guide. This excellent idea could be screen contents on tape. This is Lines 200 - 240 form the second slightly improved if text following easy, as long as the screen has not routine in D24 - D2E. This restores an ELSE was also separated out. been allowed to scroll since the the vector WRCHV to its original However, this Is not easy. Again, last clear-screen. Use *SAVE to value and provides a means of LISTO will not indent the save from HlfvlEM to the top of turning the listing option off using portions of text separated out RAM (&7FFF in a model Bl. CALL&D24. between colons, but modifying However, if the screen has scrolled, The third routine (250 - 290 in this is even harder. Readers with HIMEM will not correspond to the D2F - D39) IS for changing WRCHV these or other modifications are top left pixel. For this reason always so the output stream passes invited to write in. clear the screen before using *LOAD to get back the display. C OPT PASS PASSWORD LEGIBILITY 200 LDA • START CMP #58 210 STA MR E, Robertson of Edinburgh has BM SI 220 LDA #y^ written to say there is a problem LDA #10 230 JSR A^ STA V^l with the March password program. 240 RTS I^A If the program is listed on a printer, #13 250 LDA JSR A^ #0 the 'invisible' three lines appear. 260 STA V^ LDA #32 This does not detract from 270 LDA #£D J3R A^ 280 Benjamin Finn's idea, but can JSR A% STA VJ^I 290 HTS anyone improve on it? As well as JSR Ajg 300 J correcting the printer display, JSR A^ 310 HIXT JSR A^ readers might like to think of ways 320*KXY CALL^D2F LDA IM of making it difficult to erase the #58 330*Kir 1 SI CALLi:D24 iM JMP A^ 3^0 STOP three extra lines. Write in with your "-'Sting 1. Multiple suggestions - the best will be state ment listing option published. page 43 ACORN USER JUNE 41 ^-^^ ^^^ » The London ACORN-BBC Centre to Schools and Colleges Atom: Suppliers Full hardware and software support. Maintenance Contractors Tapes: BBC: New Showroom: Model A £299 Top Tape; see adverts in Radio Times. OFF Records would expect you to buy Model B £399 OFF Records beats all published prices. best value- Spend some time in the Memory up-grades £21 .99 Stationery: relaxed atmosphere of our new Repair service and component supply. Moore Paragon main agents. Large showroom to find out exactly what you selection of continuous stationery, Printers: are getting for your money. SeikoshalOO £215 forms and labels. OFFware: Epson MX80FT/3 £385 Books: CHARAID for the design of a block of 4 SCM Daisywheel £485 Browse through the Computer Book characters in any graphics mode Department for educational, scientific Cassettes: including mode-7. Outputs VDU23 and business applications. Matched Cassette Recorders £26 commands, teletext commands and Monitors: printer commands to screen or printer 12" Green Screen COMPUTER HOUSE together with actual design. Substantial (Hitachi/Phoenix) £110 58 BatterseaRise software with more than 20 well- 12" Colour (Kaga) £255 documented commands, Indispensible Clapham Junction 14" Colour (BMC/Cable) £255 for graphics work. London Discs: SW11 1HH £7,50 p.p. & VAT incl. TEAC40-track £199 Telephone 01-223 7730 ATlLITYcontains seven essential Shugart twin 40-track £299 routines for the disc based Atom: TORCH dual disc drive with Z80 L^'.. 1' III.. .1.1 'COPY, 'COPYT, 'COPYD, 'RENAME. a Minglci Frum HH(L|J(,I-'I" J.Jn..L 1..1 processor, 64K RAM, CP/M and BH aioharti JuMcEim am W/JI,33.'fi,t9.fi»,71, 1/(1, 315> •PURGE, -BACKUP. 'AUTORUN Tiihe Clapha", Cf-nrntFTt FREE software £780 £25p-p. aVATincI, SI JOHNS HILL LAVEflDER HILt Eprom programmer: Vacancy: Specially designed for BBC. Programs IM'I-' lUiCMHltS... OFF Records are looking for a bright 12 different Eproms including 27128. .1-1 spark with good knowledge of both I ncludes screen software £95 (A3. SOUTH CIRCULAR) BATTEHSEA HISE, 3W11 software and hardware. Initially a invited) (dealer enquiries TBI m-n3-7'3a Saturday job with a view to full-time Add 1 5% VAT to all prices. Carrtageextra. employment. BBC OWNERS Why not consider the HOBBIT FLOPPY TAPE SYSTEM for your computer? The HOBBIT gives you all the facilities you would expect from a floppy disc at a fraction of the price. "The HOBBIT takes the drudgery out of using cassettes and with its excellent performance outshines any cassette recorder I have seen." Personal Computer News. Brief Specifications i^ Read/Write speed of 750 BYTES per second i^ Capacity: 1 0IK BYTES per CASSETTE i^ Average access time 22 seconds i:^ Up to 138 FILES per CASSETTE i^ Completely automatic -no buttons to press i^ Fully built, boxed and tested. Just plug in and go -i^ System can support TWO DRIVES Available from stock PRICE £135.00 plus VAT Also available for NASCOM computers PRICE £120.00 plus VAT £3 p&p. Access and Barclaycard accepted For more details contact: Ihon CamputEr Products KILN LAKE, LAUGHARNE, CARMARTHEN, DYFED, SA33 4QE. Tel: Laugharne (099 421) 515 42 ACORN USER JUNE BEEB FORUM This must continue until a suitable Quick location is found. retrieval tip from disc using ^ When reading from Ihe file a hash routine from similar procedure must be adopted, Hugh Simpson-Wells advancing the pointer until the correct record is found. Average access time is very short for a file OPENIN is particularly useful tor and 1 2480 depending on the first which is not too full. writing to files in Basic version 1 on two characters of Z$ which might I put forward the hash function disk. This means, for instance, you be a surname. Assume a file has as an example of the use of can output just one record to a file been opened called NAMES using: OPENIN to output to a fife on disk, without having to rewrite the whole which is apparently not documented. file to X=OPENIN "NAMES" disk using OPENOUT, saving I am sure readers will come up with time and memory. more interesting uses. Now put PTR#X-HASH and check Here is an example of a hash what is there using INPUT#X. If it is function which could be used to If you intend to append to your available we could write to it using generate addresses on disk to file later, it is essentia! to create PRINT#X, (variable), if that's what store for example, names and dummy records, which can be we want otherwise, we must add addresses, and retrieve them overwritten. If this is not done, 120 to our old HASH (since record quickly: space will be lost if other files or length is 1 and set the pointer: 20) programs HASH = 120*((ASC(Z$)-&40)M + are saved afterwards. HASH=HASH+120:PTR#X= Also, when you try to INT((ASC(MID (Z$,2,1))-&40)/6)) append HASH MOD 12480 the 'can't extend' error will crop This generates an address between (this makes the file 'circular') up (disc manual p67).