############################################################################## ISSUE No.13. SEPTEMBER.1985. ############################################################################## CHAIRMAN : Paul Grade, 6,Navarino Road, Worthing, Sussex. Phone:0903-207585 SOFTWARE EDITOR: Neil Scrimgeour, 125, Occupation Road, Corby, Northants. EDITOR :Tim Lomas. 211a,Amesbury Avenue,London SW2. Telephone 01-674-0327. ##############################################################################
Well, not only do we now have a new Editor, we also have a new photocopier, so there's a good chance that not only wil1 the content of Update be better, it may even be readable too!
At the time of writing this I still don't know if we'll have a stand at the November show. I have written, and telephoned, Computer Marketplace, but it seems that they ae taking a long time to make up their collective mind!....Hopefully I'll be able to tell you more in the next issue.
Instead of the usual list of complaints I have two requests for you this month. [1]. If any of you have any program tapes or discs (originals, of course) that you no longer need, and which you would care to contribute for use as competition prizes, they would certainly be very welcome. [2]. As you know, we try to arrange repairs to hardware on a "cost + postage" basis, but even this can be expensive if we have to buy new components, so if you have any "dead" computers, printers, drives, etc which are beyond economic repair the Group would like to purchase them for spares, (so long as the price is low enough!!). Don't forget, YOU may need a cheap repair sometime too, so why not help us to help you?!.
One final point. The Dragon is being strangled by the current Eurohard
marketing policy and pricing. It needs a lower price to be competitive again,
more retail outlets, more advertising, and the continued supply of 32's as well
as 64's. PLEASE MAKE SURE EUROHARD KNOW THIS!. Write to them, and to Compusense,
Dragon User, ALL the computer magazines!...If you don't make a noise no one will
hear you, so let them know what YOU want.
Eurohard's address is:-Eurohard
SA.Ctra. Sevilla-Gijon,Km.202, Casar de Caceres, Caceras, Spain.
Right, Editorial time again. Firstly I hope you've all written nasty letters to EUROHARD as Paul told you to in issue 10 ??? no, I thought not. Well get it done now, we still havn't heard a word from them. Just because we beat up their armada is no reason for them to sulk, so write, point out to them that we are the original and biggest Dragon market, or tell them that they are ignorant *!?!* for not talking to us.(address above).
Secondly, about articles etc. I've got quite a nice pile in front of me at the moment (thank you). The only problem is that most of them seem to be epistles of great length which makes formatting the newsletter a bit of a headache (yes Paul you told me so) so what I would like now in addition to the stuff that is already coming through is a few shorts to fill up the pages, remember, if your bit is short and concise, it's much easier for me to fit it in and so it stands a better chance of getting in.
Lastly, the feedback on issue 12 was that it was too game orientated, so now you've got more 'serious' stuff. Any better ??
PART TWO - SOFTWARE
No matter what knobs, bells and whistles your modem may have, it's a worthless piece of junk without the proper software to make use of its facilities. Terminal programs as they are called, fall into two categories; 'dumb ' and 'smart'. A terminal, by the way, means an input and output device which in this case means your Dragon. Terminals themself can be dumb or smart and an explanation follows.
A duumb terminal just sends and receives data and has no facilities for the storage or editing of messages. Dumb terminal programs are simple and easy to write, all that's needed is a routine to convert and send out via the RS232 interface anything which is typed on the keyboard, and another to convert the data that comes in and display it on the screen. In most cases, these programs are written in Basic as was the program which came with my interface kit. Unfortunatly if you get 'the bug' and access boards on a regular basis (and have shares in B.T. !!), this type of program soon becomes inadequate. Some form of screen formatting and data buffer is needed as most boards work to a 40 column screen format. This enables you to store the data in your computer and view it 'off line' later on so that you can read it later and save your phone bill.
The main difference between smart and dumb terminal software is that the former allows you to prepare and edit messages 'off line' for later transmission, plus a few other extras. This software is obviously more complex and is usually written in machine code. Other facilities add the 'boots and braces' and here are some of the more common examples:-
Up and downloading - This allows the transfer of programs from terminal to
terminal
Echo incoming data to printer - A very useful facility to keep a
hard copy of messages and instructions, but if it only prints 'on-line' then
this makes calls longer. It should be able to print from the data buffer
Control of RS232 setting - Software control of these settings is often very
useful. Some systems use seven bit words even parity and others use eight bit
words and no parity. If softwware can control these then a lot of fiddling is
aleviated. For your information the most common format is eight bits, no parity
and one stop bit, so this is the one to try when accessing a board for the first
time.
Auto log-on - Many boards support this feature. If the software can
handle this, it save you having to type your name and password every time you
call, the machine does it for you.
Auto dial - More and more Modems feature
this facility, and often the manufacturer provides the sofware to drive it. This
is a useful facility because at busy times the board is often engaged and this
means a lot of re-dialling. The sofware can often detect the engaged tone and
will try again until you're through. Also often used numbers can form part of a
menu and be selected as required.
Translation tables - Although the ASCII
set is supposed to be standard, some micros use different control codes for
different purposes. These translation tables detect control codes not compatible
to your system and translate them accordingly.
Without doubt the more complex the modem, the more complex the sofware you require. Most manufactures of modems can supply or have access to sofware for the maior makes of computer on the market, but unfortunatly the Dragon is not one of them. To my knowledge, Cotswold Computers are the only company supplying terminal sofware for the Dragon. Their program (for th 32) gives a 40 column scree,upper and lower case, sofware control of word lengths, a 12k text buffer and printer option. There are no Auto dial, Auto log-on or text preparation facilities, nor upload or download, but at 8.00 it is excellent value for money. Once you have accessed the boards perhaps you could leave a message to obtain some good terminal software.
In response to my plea in issue 11 I got replies from 4 members, 2 of whom write to me on a regular basis. Therefore, I dedicate this column to Pauline Hampson, David Bateman, Alan cook annd last but not least Geoff Wilkes. They said that swapping progs was a good idea and Alan went futher to say that we should have a library' of progs that people could rent out. This idea would play havoc wdith copyright laws etc. so I'm shying away from it. The progs that are on offer are, Into the Labyrinth by Abacus, (Geoff Wilkes) and Ghost town and Golden Voyage by Adventure International (Pauline Hampson). Pauline in particular would like any other of AI's stuff except nos. 3&4. Alan Cook has lots to swap of all kinds of games but he didn't specify. Their addresses are Pauline Hampson, 10 Cherry Lane, Lawton Heath, Alsager, Stoke O.T., Geoff Wilkes, 1 Forest Drive,Broughton, nr. Chester. Alan Cook 227 Mearns Rd. Newton Mearns, Glasgow. G77 5LY. yes Alan, I did get the code right for once !! Alan also suggested that we open this up to all kinds of software which seems a good idea, so if anyone is interested let me know, assuming of course that anyone apart from the four above reads this column. (I do Neil, honest T.L.)
As I was responsible for the review of JSW (Software Projects still havn't sent the blackmail money) I think i'd better do an update. It has been brought to my attention that there are a few bugs in the game.The most serious is that you can collect more than 99 objects which should be the most that you can get. If you collect more than 99 you won't be able to finish the game, so you have been warned. Another bug is that you can't go left along the drive from the mega tree. Contrary to belief there isn't a bug regarding the rescue of Esmarelda. Apparently the problem is that some of you are going too far left according to Roy Coates. My map apparently had a mistake in it although I havn't had a chance to find out yet, but be assured there IS a room left of the nomen luni room. Anyway, if there is a botch up in my map then it will make life interesting for you won't it ?
Some of you may have noticed a Master Adventures club has been set up with a hefty subsciption of 10 quid. I decided to join in the interest of the ASCI column. Having had 3 issues now I feel I must comment on it. Personally I think that it isn't worth the money as the content is not much above the one you're holding in your hand right now and the presentation is very staid whereas Dragon Update has a more homely feel to it. Dragon content isn't bad considering that the mag has to cater for all micros and they have just completed an in depth look at El Diablero. What happens next is another matter, I suppose it's not fair for me to comment as it's not real1y my kind of mag but if anyone wants to join solely for the Dragon info then I can pass on any relavent stuff. Ir could be useful if you are interested in adventures in general and they will even publish your own progs if they are good enough. On a marking system i'd give it 6 out of 10.
Again some of you might have noticed that AI were selling 2 progs for the price of 1 over the summer period and you were a fool if you didn't take up that offer, I mean 7.95 for 2 Scott Adams games, what more could you ask? So I sent off my hard earned cash and duly received nos. 3&4, Voodoo Castle and Secret Mission. As Scott's games are a little unusual it would be wise to get an easy adventure if you're buying 2. Voodoo Castle is easyish so I plunged into that first. In fact it was written by his wife and some have said it is more suitable for female adventurers. I would tend to agree with that as you have to do some dusting etc (and no I'm NOT a chauvenist!). Having a womans brain is helpful, maybe that's why I find it a little taxing at times. There aren't a lot of locations to visit but there are plenty of objects to carry and lots of problems to sort out. The style of the program is different from that Dragon users are accustomed to, but if you were put off by the Hulk as I was Then don't be with the rest of the series. I managed to plough through Voodoo at a nice pace and found it very enjoyable. If anyone wants more info on Scotts range, the ill fated Micro Adventurer did 3 articles covering the whole series up to Claymore castle and as long as you've got the said mags you shouldn't have too much trouble solving the mysteries. My only gripe is that if you want a help sheet you have to pay 2.99 for one which covers all the adventures. Not really fair if you've only got one game. If the offer is still available when you read this then 7.95 for 2 is a very good offer.
Across:- 1)Run 3)Paper 8)Upase 9)RMS 10)Cert 13)On 14)Viking 15)Go 16)RLI 18)Nto 19)Rai 20)Dragon 21)Else 23)MS 25)Total 28)Machine code 30)Len 31)Net 32)RTS 33)Gosub
Down:- 2)Numeral 4)ASCII 5)Peek 6)Dragon users 7)Programmer 11)Ring 12)TNT 14)Video 17)Listing 19)RE 22)Plot 24)SA 26)Tens 27)Ace 29)Cls
The winner of crossword no.3 is J.E.Slade of Thanet
The prize for this
months crossword will be a copy of Channel 8's Golden Baton
Across- 3)Martian spaceship perhaps 6)File endimg 9)S.E. Asian lizard l0)Not away 11)Addup 14)Frighten 16)Random 17)The 6809 is one 18)Haphazard 20)Television 21)Famous Miner 23k5down)Property game 25)Tear 26)Initate 27)Ready pronpt 28)Abold exploit
Down- 1)Larger 2)Filled with lead and gunpowder 3)Caveman 4)304.8 millimeters 5)see 22 across 7)Metal bearing rock 8)Accelerator 12)Black gold13)Part of a circle 15)Emit a clear resonant sound 19)Meter for reading current,voltage and resistance 22)Lean to one side 24)Refreshing drink 27)Express an alternative
Bob Hall proposed a solution to allow Dragon 32's upgraded to 64k to boot OS9 by disabling interrupts and re-entering the bootstrap routine a little further in. What appears to be happening is this. One of the first things the OS9 bootstrap seems to do is 'accidently' set an interrupt which the system is unable to service because it hasn't loaded enough of the operating system, hence the system hangs.
Here is a hardware modification 'nicked' from the Dragon 64 to overcome the problem. This modification has the effect of disabling the interrupts until just after the problem part of the OS9 bootstrap is executed.
Disconnect pins 22 and 24 of IC 26 (6821 PIA) from +5v, this is a bit tricky because this connection is under th IC, I did it by carefully cutting the legs of the IC as close to the PCB as possible and gentle bending the legs out to ensure disconnection (I think you should be able to get away with only disconnecting one leg but as the D64 drawing showed both I did both).
Install a 74LS04 or 4069, I had already mounted a 74ls04 piggy back style on an existing 14 pin IC for an inverse video modification, so I used that.
Connect pin 1 of the 74LS04 to address line A2, I picked this up at IC15 (74LS783) pin 18
Connect pin 2 of the 74LS04 to pins 22 and 24 of IC26 (or if you only disconnected one pin, connect pin 2 of the 74LS04 to that pin only) OS9 should now boot properly.
For those of you with D64 drawings, you will notice that this modification is done to both of the 6821 PIA's, DON'T be tempted to do this, on the D32 it has the effect of disabling the keyboard.
If you are adventurous and cheeky enough to borrow someones D64, copy the operating system proms and try to install them in your upgraded D32 (as I did), besides rerouting some address lines and adding a few other connections, the above modification is a neccesity as the D64 operating system seems to suffer from exactly the same problem as OS9
Incidently, I used Fujitsu MB8264-20 memory chips for my upgrade and they work a treat...............Alan Butler
USING 'C' WITH THE HI-RES DISPLAY
One failing of the OS-9 'C' package is the inabi1ity to use the 51x24 display while compiling programs from source. I found this drawback to be particularly annoying considering the obvious power of the overall package and I decided to make a determined attempt to overcome the problem. I can now report that it's possible to use 'C' with the hi-res display, by a simp1e modification to the operating system as supplied. Before I go into the details of how this is done. I'll make some comments on the compiler itself.
THE COMPILER
Of all the sofware available for OS-9, 'C' is by far the most powerful and impressive. I've found it very difficult to compare OS9 'C' to it's competitors, because what makes one language better than another is the use to which it is going to be put. If for example, the user just wants a very fast problem solving language which compiles fast then they would be happy with one of the inferior subsets of the language. On the other hand, purists who wish to learn (or USE) the language as per the Kernighan & Ritchie implementation in a Unix like enviroment will have have a formidable task finding anything which betters this implementation. If that's your criteria then OS9 'C' compares withthe very best 8-bit and the better 16-bit versions (OS9 'C' is very fast but will be beaten by most 16-bit versions). The 6809 was built to handle high level languages, the fact that the Z80 was not is shown by the table below which compares OS9 'C' with the best CP/M version.
OS9 Whitesmiths Processor 6809E Z80B Clock(Mz) 1 4 Run time (s) 2.2 2.6 ERASTOTHENES BENCHMARK Compile time(s) 240 310 Program length(k) 4.1 12
The Erastothenes benchmark is the time taken to generate the firt 1029 primes. Cutting a few corners and using a faster algorithm OS9 'C' can get this down to 1.07 secs, in comparison Basic09 takes 36 secs, if you think thats slow try it in basic (listing at the end)
The actual package consists of six different program modules:-
1) "c.prep" macro processor
2) 'c.pass1' 1st pass compile, this module
imposes the greatest memory demand on OS9
3) 'c.pass2' 2nd pass compile,
produces produces an assembly listing of the file (file suffixed A)
4)
'c.opt' the aptly named optional optimiser, this optional stage removes
inefficient code from stage 3
5) 'c.asm' produces relocatable object code
(file suffixed R)
6) 'c.link' links code together to produce (hopefully)
something which runs, will generate a true OS9 memory module in the CMDS
directory.
The user has the option of either using each program on its own or using the principal command line 'cc1'. This futher program makes things easier for the user by supervising all 6 stages without any futher attention. 'cc1' does this by generating a procedure file (c.com) which executes commands according to the parameters given on the command line. In this way, the user has almost total control over the 6 stages without even being aware of their existance.
THE 51 X 24 DISPLAY
While Dragon Data are to be praised for bringing such
powerful sofware as this into the country, they should also be given the 'dodo'
award for failing to test their products. The following is a suggested list of
operatios to be carried out by purchasers of this package. WARNING---ALWAYS WORK
ON A BACKUP COPY, NEVER THE ORIGINAL
1) Add 'echo' to the CMDS directory, programs such as Stylo or Edit may also
be added at this stage, although this can be done at any time. 2) The next step
involves generating a customised boot. The pipe capabilities of OS9 are to be
sacrificed in order to give extra memory to run the 'c.pass1' program. This
sounds alarming but the 2 commands 'save' and 'os9gen' nake the process fairly
straightforward. On page 6-1 of the Users Guide is a list of modules which make
up the operating system. Save the listed modules with the exception of all pipe
modules (pipeman,piper and pipe), but include the SHELL module viz.[save
/D0/newwboot IOMAN RBF SCF KBDVIO PRINTER DDISK D0 D1 TERM P CLOCK SYSGO SHELL]
3) Format a disk in drive #1 and use OS9GEN to put the new bootfile on this
disc, ie. [os9gen/d1] then enter [/d0/newboot]
4) This disk can now be used
to boot up every time you're going to work with 'C'. Don't forget that once
you've freshly booted with this disc, it's possibIe to copy the new system
configuration to any other system disc with 'cobbler' (which only works in 32x16
mode). You should still keep a sytem disc complete with pipes for future use
(with some of your completed C programs perhaps ?). I find the most convenient
method is to use a double sider with the customised boot (together with a
suitable startup into go51 etc.) on one side and the 'C' system on the other.
5) Using stylo examine the 'stdio.h' text file in the DEFS directory and
remove all redundant text such as comments etc. (take care). This file is
commonly read into memory by the 'c.pass1' compiler. 6) Using Stylo add the
message "4 --- Insufficient disc space(CMDS)" to the 'errmsg' file in the 'sys'
directory.
RUNNING THE COMPILER
Aside from the above, the shell has a very
clever means of giving up more memory. If 'EX' is prefixed to the command line
viz [ex cc1 program.c] then the shell will sacrifice itself in order to give up
more memory to the program it's calling. This would normally be diasterous since
on completion of the task the user would loose all control over the operating
system. Fortunately, OS9 has a clever program 'sysgo' which detects such an
error and reincarnates the shell. There is one minor irritation to this method,
since the shell is a reincarnation, it has no knowledge of it's previous
existance (according to popular Buddhist theory anyway) and it's necessary to
tell the new shell which directory you're using after each compilation i.e. 'chd
/d1/c'
PROGRAMMING CONSIDERATIONS
If a large source program is being
compiled there is still the possibility that the dreaded 'out of memory' error
may be encountered. If this happens, take a note of the statement line at which
it occurs and split the file into two or more parts (the break should be made
between two complete functions). The first part should now be compiled using the
'-R' option, which will compiIe as far as the relocatable code then stop. Before
the second part is compiled, it's necessary to examine the listing for any
variables which were declared in the first part .These should be declared again
but this time as 'extern'. Complex data structures should also be included as
well as any files required by library functions (such as 'stdio.h'). When you
compile this second source file, you should also include the first, not
forgetting the '.R' suffix. Assuming no errors, the compiler will generate a
single executable from two or more sections. Alteratively, you could put both
source files on the 'cc1' command line and the compiler would compile one after
the other, finally linking the two into a single program module at the end.
There are many books available on 'C' and one I can recommend is 'Understanding C' published by Sybex. Personal Computer World has printed a five month series of articles from Jan to May 85 which I can also recommend (try a good reference library with a photocopier) Whichever book you choose, make sure it contains at least one chapter on using C with UNIX. Some books cover the problems and limitations of using C with CP/M in extensive detail, all of which is of little concern or interest to the OS9 user.
Remember, if anyone wants to discuss any OS9 matters, give me a ring on 0202-7522599
1 'ERASTOTHENES BENCHMARK (FAST VERSION) 10 PRINT "S" 20 D=2 30 DIM P(8191) 40 N=D*D:IF N>8191 THEN 70 50 P(N)=1:N=N+D:IF N<8191 THEN 50 60 D=D+1:IF P(D) THEN 60 ELSE 40 70 PRINT"E"
This is a very useful program for those of you who, like me, use DragonDOS and spend most of their keyboard time trying to catch up with the office work, and who spend hours trying to remember who it was that they should have phoned or written to!.
The title is self explanatory......the program enables you to set up a "desk diary" type file which covers daily entries for a one year period. Having created a file for the year you can then input entries for any particular day and month at will, and these can be viewed either by making use of the "View Specified Date" (V) facility or by using "Browse" which enables you to input the start month and then view each day's entry by keying the up and down arrows to move foreward and backwards respectively. At any point the entry can be dumped to printer by keying "P", and return to menu is accomplished by keying "M".
There is a very good (random access) search facility which enables you to locate any particular string.......for example a name or a town etc, merely by keying "S" and typing in the string to be searched for. When found, the entry for that date is displayed on screen and can be dumped to printer if required. Other facilities provided are dumping the entire diary file to printer, and for dumping any particular month. Keying "D" will call up a secondary menu which gives you access to six standard DragonDOS commands without exiting the program; these include Directory, Kill, Format, etc, and of course you can return to main menu from this simply by typing "M".
It is a very neat program, well written and thought out, and useful to anyone who uses their Dragon for anything other than casting spells and zapping aliens.
While entry length is limited to one screen for each date, in the interest of speed, this should be adequate for normal "personal" use, and although OS9 enthusiasts will probably complain about such points as the use of the Dragon's standard 32 column display, etc, the program has the great advantage of being quick and simple to operate, and relatively "Idiot-proof".
Verdict:- A good program.....simple to operate and with no obvious "bugs". The price is reasonable too: 10.00 inc. or 7.50 to User Group Members.
The program can be obtained from Ian Elkington, 11, Wharfedale Gardens, Baildon, Shipley, West Yorks.BD17-6TN.... P.Grade.
Gary Coxhead has sent a list of Bulletin Boards to go with the series of articles which we are presently running, as there are approx. 100 of then i shall be printing a few each issue.
NAME BAUD TELEPHONE HOURS COMMENTS ABERDEEN ITEC 1200/75 0224 641585 24 NOT ACCESSED ACORN SERVICE 1200/75 0223 243642 24 NOT ACCESSED BABBS-BATH 300 0225 23276 WD2100-2400 NOT ACCESSED BABBS1-FELIXSTOWE 300 0394 276306 24 NOT ACCESSED BASUG-BASILDON 300 0268 778956 24 APPLE USERS BASILDON ITEC 300 0268 25122 24 FAIR SYSTEM BASILDON ITEC 1200/75 0268 22177 24 VIEWDATA
It has come to our attention that a new state of the art technological device, is almost ready for production.
This device, which can be used not only with most home micros but a host of other devices is revolutionary in concept, in that it requires NO power source at all, and is based on a carbon/graphite technology rather than the more common but outmoded silica/quartz of current devices.
The device, (as yet unnamed, but provisionally refered to as HB4) permits the user to instantly execute concepts in both graphic and text modes, with no restrictions on resolution at all. It can handle both numeric and alpha numeric functions, and perhaps most revolutionary of all requires no VDU display other than the plain surface of almost any opaque material.
We understand that several variants are planned which will allow the operator to work in an almost unlimited range of colours, and like the prototype, all of these will be designed for digital control.
No literature is as yet available, but we put our review unit through exaustive tests and we feel that no difficulty should be experienced even by the most inexperienced operator.
As usual, persistant piracy has resulted in 'lookalike' copies reaching the shops before the original could be released, and while we cannot condone piracy in any form, anyone interested can purchase one of several 'lookalikes' from such firms as F.W. Woolworth, W.H.Smith, etc. where they are being sold under the name 'PENCIL'
Reading this carefully should demonstrate just how badly this group requires material............R.Suppards
This program will cange the colour combination of m/c hi-res games. For example, it can change a game originally in black and white to run in the green, blue, red and yellow mode.
Enter the listing below and save the program. To use the facility, run the program entering the required details. Then enter 'EXEC 512' to load the game. When the program has finished loading, the program will take less than one second to convert the game and the 'OK' will appear enabling you to save or EXEC the game.
The program will work on most M/C programs except auto-runs.
10 DATA 189,160,146,134,0,16,190,1,231,158,126,230,164,193,198,39,12,193,134 ,39,8,49,33,16,172,132,38,239,57,230,33,193,0,38,242,167,33,32,238 20 FOR A=512 TO 550:READ P:Q=Q+P:POKE A,P:NEXT 30 IF Q<>4503 THEN PRINT "DATA ERROR":SOUND 100,3:END 40 CLS:PRINT:PRINT"WHAT IS THE ORIGINAL COLOUR OF THE GAME ?":PRINT:GOSUB80 :POKE&H220,B 50 CLS:PRINT:PRINT"WHAT DO YOU WANT THE NEW COLOUR TO BE ?":GOSUB80 :POKE&H204,B 60 CLS:PRINT"TYPE 'EXEC 512' [ENTER] TO LOAD THE GAME" 70 END 80 PRINT "1-BLACK & WHITE":PRINT "2-BLACK & GREEN":PRINT "3-YELLOW, BLUE, RED & GREEN":PRINT "4-BUFF, MAGENTA, ORANGE & CYAN" 90 PRINT:INPUT"ENTER 1,2,3 OR 4";A 100 IF A<1 OR A>4 THEN 90 110 IF A=1 THEN B=&HF8 120 IF A=2 THEN B=&HF0 130 IF A=3 THEN B=&HE0 140 IF A=4 THEN B=&HE8 150 RETURN
STOP PRESS!....Computer Marketplace have gone bust!....but the Show WILL be on, under new management. (More details in next issue).
In this session I will introduce the program we are going to knock into shape, and go into more detail on the use of logical variables. The program is the old favorite of 'guess the animal'. This is a conversion from an ORIC program. The ORIC version was hardly used because of the cumbersome way data was stored on tape. However this was all changed with the advent of the Dragon disk. The only problem was trying to figure out how the ORIC version worked, after much frustration, the rehashed spaghetti version worked, all that is left is to structure it.
Stage one is to remove all GOTO's, we can see that there are several types of
GOTO in this program. These are:-
1) Simple repitition as in lines 90 &
100
2) Simple jump to finishing line 999
3) Compound backward jump to
line 120 in lines 150,230,380 & 680
The simple iumps to line 999 may be
left unchanged on condition that line 999 is explicitly declared in a REM
statement. However in this program all of the THEN 999's and GOTO 999's can be
replaced by the contents of line 999, ie. GOSUB1000:END.
The most difficult type of GOTO is the compound one in (3) above. As you can
see, this consists of backward jumps scattered throughout the program. I shall
leave you to think about this one until next time. If you care to drop me a line
with suggestions for solutions, my address is:-
Bob Smith
Mjolanveien 88
N-8600 Mo i Rana
Norway
No prizes, just the satisfaction of registering the solution of a problem,
and isn.'t that what makes a programmer tick ? As a pointer, here is the
solution to the much simpler problem in lines 90 & 100. Replace lines 90
& 100 with:-
90 I=0:FORY=1TO2:FREAD"ANMLDATA";A$(I):I=I+1:IF
EOF("ANMLDATA")=0 THEN Y=1:NEXT Y:ELSE Y=2:NEXT Y
Next time we'll look at the program sans GOTO's and study the logic and structure in a bit more detail, with the aid of action diagrams.
Due to lack of space, the second part of this article on logical variables has had to be held back to the next issue ....TL
2 CLEAR15000:CLS 8 NR=1 10 PRINT:PRINT @14,"ANIMAL" 30 PRINT:PRINT:PRINT 40 PRINT" PLAY GUESS THE ANIMAL" 50 PRINT" THINK OF AN ANIMAL AND THE" 60 PRINT" COMPUTER WILL TRY TO GUESS IT" 70 DIMA$(200) 80 I=0 85 'FOR I=0 TO 3:READ A$(I):NEXT I:GOSUB1000:END 90 FREAD"ANMLDATA";A$(I):I=I+1 100 IF EOF("ANMLDATA")=0 THEN 90 110 N=VAL(A$(0)) 120 CREATE"ANMLDATA" 130 'MAIN CONTROL SECTION 140 IF AN$="LIST" THEN 600 150 IF LEFT$(AN$,1)<>"Y" AND LEFT$(AN$,1)<y"N" THEN 120 152 IF LEFT$(AN$,1)="N" THEN GOTO999 160 K=1 170 GOSUB380 180 IF LEN(A$(K))=0 THEN 999 190 IF LEFT$(A$(K),2)="&Q" THEN 170 200 PRINT"IS IT A ";RIGHT$(A$(K),LEN(A$(K))-2); 210 INPUTA$ 220 AN$=LEFT$(AN$,1) 230 IF AN$="Y" THEN PRINT"WHY NOT TRY ANOTHER ANIMAL ?":GOTO120 240 INPUT "THE ANIMAL YOU WERE THINKING OF WAS A ";V$ 250 PRINT" PLEASE TYPE IN A QUESTION" 255 PRINT" THAT WOULD DISTINGUISH A" 260 PRINTV$;" FROM A ";RIGHT$(A$(K),LEN(A$(K))-2) 270 INPUTX$ 280 PRINT"FOR A ";V$;" THE ANSWER WOULD BE ? "; 290 INPUT AN$ 300 AN$=LEFT$(AN$,1):IF AN$<y"Y" OR AN$<y"N" THEN 280 310 IF AN$="Y" THEN B$="N" 320 IF AN$="N" THEN B$="Y" 330 Z1=VAL(A$(0)) 340 A$(0)=STR$(Z1+2) 350 A$(Z1)=A$(K) 360 A$(Z1+1)="&A"+V$ 370 A$(K)="&Q"+X$+"&"+AN$+STR$(Z1+1) 372 A$(K)=A$(K)+"&"+B$+STR$(Z1)+"&" 380 GOTO120 390 '****PRINTS QUESTIONS**** 400 Q$=A$(K) 410 FORZ=3 TO LEN(Q$) 415 IF MID$(Q$,Z,1)<y"&" THEN PRINTMID$(Q$,Z,1);:NEXTZ 420 INPUTC$ 430 C$=LEFT$(C$,1) 440 IF C$<>"Y" AND C$<y"N" THEN 410 450 T$="&"+C$ 455 FORX=3 TO LEN(Q$)-1 460 IF MID$(Q$,X'2)=T$ THEN 480 470 NEXT X 475 GOTO999 480 FOR Y=X+1 TO LEN(Q$) 490 IF MID$(Q$,Y,1)="&" THEN 510 500 NEXT Y 505 GOTO999 510 M1$=MID$(Q$,X+1,Y-X-2) 512 K=VAL(M1$) 520 RETURN 530 DATA "00004","&QDOES IT SWIM&Y2&N3&","&ACOD","&A SPARROW" 590 '******PRINTS ANIMAL LIST****** 600 PRINT @482,"ANIMALS I ALREADY KNOW ARE:" 605 X=0 610 FOR I=0TO200 620 IF LEFT$(A$(I),Z,1)<>"&A" THEN 650 630 FORZ=3 TO LEN(A$(I)) 640 IF MID$(A$(I),Z,1)<>"&" THEN PRINTMID$(A$(I),Z,1);:NEXTZ 642 PRINT" "; 645 X=X+1:IF X>4 THEN X=0:PRINT 650 NEXT I 660 PRINT 670 PRINT 680 GOTO120 999 GOSUB1000:END 1000 FORJ=0TO200 1010 IF LEN(A$(J))<=0 THEN 1040 1020 FWRITE"ANMLDATA";A$(J) 1030 NEXTJ 1040 RETURN 60000 '****CATALOGUE**** 60010 'VARIABLES:- 60020 'A$(0-200): QUESTION AND ANSWER DATABASE 60030 'AN$ CURRENT ANSWER 60040 'B$ OPPOSITE ANSWER TO AN$ 60050 'C$ SECONDARY CURRENT ANSWER 60060 'I FOR...NEXT COUNTER 60070 'K DATABASE COUNTER 60080 'M1$ EXTRACTED RECORD NUMBER 60090 'N REDUNDANT PRINT 60100 'Q$ CURRENT DATABASE RECORD 60110 'T$ NEW 'ANIMAL' RECORD 60120 'V$ NEW ANIMAL NAME 60130 'X$ NEW DISTINGUISHING QUESTION 60140 'Y 2ND FOR..NEXT COUNTER 60150 'Z 3RD FOR..NEXT COUNTER 60160 'Z1 VALUE OF A$(0)
Next month the return of the Redundant Information Dept., when I have time to sort it all out, meantime thanks to those concernred for this collection.
State of the art - Autoruns and uses a joystick
Massive reductions -
we've been left with a load of naff progs
This weeks special offer - Worst
of the above
State of the art(2) - 3 mins to load the autorun and screen,
30secs for the screen
State of the art(3) - spent 4 months on the
protection, 2 weeks on the prog
All orders despatched within 24 hours - 24
hours of our choosing
Each item individually tested - It's the right colour
Probably the most useful utility ever - you can use it for ... er .. er
well, it's very fast
Exiting new software firm & club - Hello sucker
We have received a letter from the Welsh tourist board offering the chance of a weekend in mid wales at a hotel to meet other owners, see the new hardware and hear talks from the trade. This will run from Fri eve to Sun lunchtime (25-27 oct 85) at a cost of 35.00 each at a 2 star hotel, anyone interested contact the Tourist Board on 0654-35360
Right, now for a moan. It has come to my notice that certain members have in the past been known to solicit material of various kinds (ie. free progs) from firms purporting to be acting on behalf of the Group. PACK IT IN !!! Some people spend a lot of time running this Group, writing, photocopying and putting the newsletter into envelopes etc. etc. for no reward apart from seeing the Group flouurish. What we DON'T need is this type of hassle which discredits the Group in the eyes of the companies, how do you expect Paul to get discounts, special offers etc. if the firms concerned find that members have been conning them ??
All this type of activity will do is distance us from the industry and this we cannot afford so DON'T discredit the name of the group for your own purposes O.K.
Sorry about that it's just something that gets up my nose, anyway, I'm sure you will all be pleased to hear that my 64 has got better and is now back in use again, no ?? well suit yourselves.
In answer to our esteemed chairmans bit at the end of the last newsletter, form 1995623877(a) has been superceded by form 83642827(g)(1) under an order in council of 32nd novober 2286 and 666(b) and 1966253 have been replaced by 7687/43/WE3, I'm surprised that you didn't know !!! (in other words I've gone out and bought a bottle of scotch instead)...Tim Lomas..London..September 1985
TOUCHMASTER SPECIALS:-
Dynacalc..............25.00 Cash / VAT............20.00 Basic 09..............20.00 Stock Recording.......25.00 RMS...................25.00 Pascal................30.00 Edit / Assembler......30.00 C Compiler............30.00 Stylograph (+Spellcheck / Mailmerge)..................35.00
5.25" DISCS.
SS/DD.................14.50 per box.
DS/DD.................15.50 per box.
All top quality 40 track discs at
roughly 30% less than the usual price.
All prices PLUS 15% vat, but
inclusive of postage.
We've a new batch of tractor feed self adhesive
labels.....4"xI.5", at the old price of 3.00 per 500 or 5.75 per 1000 inclusive.
Orders for discs and labels to Paul Grade, cheques made payable to the
Group.
DUCKWORTH COMPUTING.
Duckworths are offering members a 50%
discount on the following books:-
Pocket Handbook for the Dragon..usual
price 2.95....our price 1.50.
Exploring Adventures on the Dragon:-usually
6.95....our price 3.50.
Dragon Programs, by Nick Hampshire:-usually
6.95....our price 3.50.
There is also a cassette of Adventures on the Dragon
usual price 7.95, but only 4.00 to you.
All orders to Paul Grade, cheques
made payable to the Group.
DISC DRIVES: Twin Dargon Data disc drive, cable and DOS
cartridge....perfect condition.....175.00
Also available a selection of OS9
software...price negotiable. Telephone 0272-426392.
DRAGONDOS.
Peter Williams of Computil is offering to reblow your
Dragon DOS chip to include the correction patches published in Dragon User for
only 3.50 inclusive.
Send your chip and a cheque to: Computil, 22, Grove
Park, Burbage, Hinckley, Leics.
WANTED.
Maarten van Wamelen, 3,Lijnmetstraat, Oedelem 8330,
Belgium. would like a manual for Salamander DRS....even a copy would do.
Gerald Hale (Telephone:Coolham 653) wants a secondhand Shinwa CP80 or
Mannesmann 80 printer.
Edward Lark (Telephone:05086-2573) wants all
backdate copies of Dragon User except No's 2 and 3, and All "Update's" prior to
Issue 10.
32 to 64K UPGRADE INSTRUCTIONS.
Bob Hall has now written a
comprehensive twelve page manual on converting your 32 to 64, and copies are
available to members at 2.00 each. If you think you are capable of attempting
the job, and can follow instructions, then the additional memory is yours for
less than Compusense would give you if you traded your 32 in against a 64!.
Orders to Paul Grade. Cheques payable to the Group.
32 and 64 CIRCUIT SHEETS.
We can now supply photocopies of these
for 1.00 each. The 32 sheets are applicable to the series 2 board ONLY....NO
other variants are available.
MODEMS.
Answercall Mini-Modem (MM100 UK) with all leads and
software....35.00 (new price 75.00 for the modem alone!).
BT modem (Dial
telephone with built in 300/300 modem)...30.00. with leads and software.
1200/75 Prism Acoustic modem with all leads etc.....15.00.
Cotswold 232
Interface for your 32....20.00.
Telephone 01-821-1710. after 5 p.m.
PRINTERS.
Barry Johnson. Flat 2, 4,Carisbrook Road,
St.Leonards-on-Sea, Sussex. wants to sell a Tandy LP7 printer....Price 100.00
o.n.o.
J.D.Bateman, Orchard House, Cleator Moor, Cumbria. still has a CGP115
four colour printer / plotter for sale, complete with spare pens, paper, leads
and software for 75.00 inclusive. This HAS to be a bargain for anyone wanting a
printer.
KET and BACKTRACK.
We still have a few discount price KET and
BACKTRACK tapes.....KET is 8.50 and BACKTRACK 5.50.....but we've only a few left
now.
As several of you have reminded me, the Group has been running for just over a year now, and it is time for those of you who joined at the begining to renew their membership.
In recognition of the fact that if you hadn't had enough faith and interest in the Dragon to join a Group that for all practical purposes had a membership that could be counted on one hand, the Group as it is today could never have happened, I have decided that the very least the Group can do in return is give you a small "bonus", and so I am dating ALL those who joined us during the first three months as having joined on November 1st.1984.
I'm sorry that I can't offer anything more, but as I'm sure you will understand, Group funds just don't run to grand gestures!.
Membership fees for UK Members are unchanged (increased paper costs have made it impossible to reduce them).....but at least we haven't had any increase, unlilke some publications I could mention!.
There is only one major change.....Membership charges for members outside the UK will have to be increased to 9.00 per year to cover the cost ao airmailing Update. I regret that this is necessary, but we now have so many members outside UK that the only alternative would be to increase ALL subscriptions, which would hardly be fair.