Well, after finally making some (painful) progress on Orwell it is time to do another review on one of my stack of Usborne books. This book includes some actual Basic programs to try and Orwell should be up to the task now.
- Title: Usborne Guide to Understanding the Micro
- Subtitle: How it works and what it can do
- Author: Judy Tatchell and Bill Bennett
- Editor: Lisa Watts
- Pages: 48
- Published: 1982
- ISBN 10: 0860206378
- ISBN 13: 978-0860206378
This book is another of the earlier Usborne books. I remember I must have owned this one or else borrowed it a lot from the library as I can distinctly remember much of it. It’s one of the ones with the hand drawn cartoon robots to explain everything. This actual copy seems brand new. In fact it is tricky getting the pages sitting flat enough to photograph. The spine hasn’t been bent at all.
According to the first page this book is for anyone who wants to know about microcomputers. It explains how to use a micro, how to program one then how they work. It talks about how micros can be linked to other computers to bring all sorts of information into your home. It discusses things you can add to your micro then finally it has a handy, up to date, buyers guide.
First we meet the micro.
This gives a handy guide for setting up the machine. It shows the leads required and how you connect it to a tellie for output. I guess the ZAP isn’t meant to mean from the (UK) mains plug! Apparently all the important parts of the micro should be kept inside the keyboard. Seems I am doing that bit wrong at the moment (but am working on it).
Doesn’t look like the one in the book?
Next we jump straight into programming. That’s interesting since I think the first thing almost everyone did after setting up their new micro was use it to play games!
We get to see the robots here. They are often used in the Usborne computer books. In this case it is illustrating how you tell a computer what to do. Actually in this specific case it shows how you have to be very precise about telling a computer what to do. That list of specs in box 1 however is still a better specification than a lot I have seen!
On the facing page we have some weird, two headed robot/computer/vacuum cleaner type thing showing the different types of memory in a computer, RAM and ROM. The memory size sphere reminds me a lot of the Zeroids from the Terrahawks!
Next we look at the keyboard more closely including instructions on how to use the shift key! We then look at where to get programs for micros. According to this page listings in magazines are often not well tested and may contain bugs. Also on this page it mentions Viewdata or Prestel terminals. Viewdata was a kind of forerunner to the WWW. It was a way of displaying pages of information brought down by a modem. The pages were very similar to Teletext pages (where the data was broadcast with the TV signals).
When first building Orwell I actually bought a Viewdata terminal with a view to using it’s keyboard. When I picked it up however I found it was new and completely unused. It didn’t even have a mains plug wired to it yet. I fired it up and it actually works perfectly so I can’t bring myself to destroy it. Of course these days there is nothing for me to connect to with it which is sad but apparently I can use it to create my very own Viewdata pages if I so desire!
Although, somewhat amazingly, Viewdata is still apparently used in the UK by travel agents. I even found an online course where, for a mere 199 UK pounds, you can do a 6 month course on how to use it!
After that shocking revelation we finally get to the good stuff. Writing our own programs!
There are two programs on these pages. I will enter in both and see if I can get them to run on Orwell. Finally his purpose is revealed! The first program is the sort of thing used by the NSA. A program used to keep spies from infiltrating a secret society (what about sys-admins though?). Below is the actual code:
10 PRINT "TELL ME THE PASSWORD, CHIEF." 20 INPUT P$ 30 CLS 40 PRINT "HALT! WHAT IS THE PASSWORD?" 50 PRINT "YOU CAN HAVE TWO TRIES." 60 FOR A = 1 TO 2 70 INPUT A$ 80 IF A$=P$ THEN A=2:GOTO 130 90 PRINT "WRONG." 100 NEXT A 110 PRINT "OUT! YOU MUST BE A SPY!" 120 END 130 PRINT "ENTER, FRIEND." 140 END
Ah, now immediately I see a problem. The CLS command isn’t supported by Orwell. In fact I have no clear screen command. Technically I can do it though. By sending the appropriate escape codes to the Batsocks video generator I can do all sorts of cool terminal emulation things. But I have no way of entering and sending those codes yet. I need to add that command to Basic (which I imagine will take some working out). But lets continue on with line 30 removed for now. For these reviews I will list the programs as they appear in the books.
To load this code into Orwell I simple store it as a text file then enter load mode on the machine (by typing LOAD). It will then accept input over the serial line. I can then use Realterm (terminal emulator software) to send it to Orwell. I use Realterm as I can specify the speed I send the characters. By that I mean the rate they are sent not the actual serial speed (which is 19200 baud). If you read my debugging stories you’ll see why that’s necessary.
OK, I entered the code and loaded it into Orwell.
Then I tried running it. I had completely forgotten that Basic programs are interpreted. That means they get executed a line at a time and the machine works out what to do on each line. This means despite knowing I don’t support the CLS command the program can still be run. It runs happily until it gets to line 30 when the interpreter spits out an error. In this case an SN ERROR or syntax error. Orwell doesn’t understand that command (yet).
I removed that line of code and tried again.
Success! It actually works (apart from the clear screen). My first program entered from an 80s Usborne book on my hand made 80s computer! Onwards and upwards.
The second program is called SPLASH GAME.
10 PRINT "SPLASH GAME" 20 PRINT 30 PRINT "THE STEERING ON THE" 40 PRINT "GOKART HAS FAILED AND" 50 PRINT "YOU ARE HEADING FOR THE" 60 PRINT "DUCKPOND. YOU MUST" 70 PRINT "PRESS THE RIGHT LETTER" 80 PRINT "TO WORK THE BRAKES." 90 PRINT "YOU HAVE 5 CHANCES." 100 LET C$=CHR$(64+INT(RND(1)*26+1)) 110 FOR G = 1 TO 5 120 INPUT G$ 130 IF G$=C$ THEN G=5:GOTO 190 140 IF G$<C$ THEN PRINT "AFTER"; 150 IF G$>C$ THEN PRINT "BEFORE"; 160 PRINT G$ 170 NEXT G 180 PRINT "SPLAAAAAAASH" 190 PRINT "YOU HAVE GOT WET." 200 END 210 PRINT "SCREEEEEEEECH..." 220 PRINT "YOU STOPPED IN TIME." 230 END
Interesting line 100 gives Orwell some trouble. Not the actual code itself, that’s perfectly valid Orwell Basic, but the speed the line is sent. Or rather the speed the following line is sent.
The way Microsoft Basic works is it reads characters into an input buffer until it receives a CR (carriage return). It then processes the entire line. A line like line 100 above takes Basic a little while to process. If there isn’t enough time to process the line characters from the next line can be missed. So unless I made the delays between lines long enough I was missing characters and getting errors. In the end I used 30mS between characters and 30mS between lines. That means a small program like that above takes 24 seconds to load! I really am living like in the 80s!
Anyway, lets see if it runs now.
Well that works. Although there are a couple of bugs in this code! One is obvious if you read the listing carefully. The other, minor one, is there needs to be a space after the “BEFORE” and “AFTER” text. The semicolon after the PRINT means the next PRINT will be on the same line so a space is needed. The second error is the GOTO line number if you choose the right letter. If you choose the right thing it says you got wet. The line number should be 210 and not 190.
Now the next page shows what I just did. Typing in listings and loading. There is also a section on bugs in programs. They should have done that page first! We do however have a third program to enter – Crocodiles.
10 PRINT "HOW MANY CROCODILES IN THE RIVER"? 20 PRINT "YOU HAVE FIVE GUESSES." 30 LET A=6 40 FOR N=1 TO 5 50 INPUT G 60 IF G=A THEN N=5:GOTO 120 70 PRINT "WRONG" 80 NEXT N 90 PRINT "SNAP! YOU HAVE BEEN EATEN UP!" 100 END 110 PRINT "RIGHT. NOW PADDLE AWAY FAST!" 120 END
Obviously a simple little program. Amazingly with the same bug as the previous one! The wrong GOTO line number. Ironic on a page about finding bugs in programs. Especially given that’s one of the lines shown with a bug in it on the drawing and the listing is the ‘correct’ version. Perhaps it was a trick question? It’s not a bug, it’s a feature!
Next the book talks about saving programs. It shows cassette recorders and floppy disks but they really are floppies, 5 1/4s by the looks of it. I still have some somewhere actually. With old Doom levels I created on them!
The next page is about graphics. Although there is another error! The page title is wrong, it should say “Micro Pictures”. This page mentions things such as graphics tablets and light pens. A light pen is not something I ever owned but they always fascinated me. Of course that’s something from the era of CRT screens.
The next page is actually about micro sound. There is a little information here about making music and playing sounds. Also a little discussion on computers talking and recognising speech. Apparently only a computer with a huge amount of memory can store enough information to recognise speech.
Next the book talks about what’s inside the keyboard. The picture seems to be the insides of a Sinclair ZX81. It also mentions more powerful computers such as mainframes and minicomputers. Of course we learned about those in the Usborne Guide to Computers book.
The book then talks about what’s inside the chip. It shows how chips are made from silicon (it’s wafer thin) and some other used of microprocessors. It then goes on to describe counting in binary and how simple logic gates work. It always struck me as a very organic looking diagram for the logic flow.
From there we get a very brief look at how memory inside the computer works and such things as PEEK and POKE. The level of information is interesting as I am sure I didn’t get most of this stuff as a kid. It really just introduces the concepts but you’d need to study more to really grasp it all. Perhaps the later books will explain!
Next we get a little history of the micro starting with valve based machines such as ENIAC then onto transistors and finally microchips.
The next page is interesting as it talks about “Computer chains”. Networking is what we’d call it now. Of course all of this is pre World Wide Web. The Internet itself seems to have been created about the time this book was published but it would not have been widely know about then I imagine. Nor would people imagine what it would become.
I like the comment about doing shopping by computer and how in the future you probably will. The future is now! The page also mentioned eMail although it doesn’t call it that.
The next page talks about micros controlling things. Apparently I can control a model railway with one (if I can get that “Computer model controllers” book that’s missing from my collection) as well as controlling robots. It makes me sad though to see this page talking about how the Space Shuttle uses a micro computer similar to a home computer. The shuttle era has now passed of course.
After a page talking about things to add to your computer (disk drives, printers, joysticks and paddles and so forth) we get to the good bit. A buyers guide of some of the main home computers ‘currently’ available. They are listed in order of price and are as follows below. Each has some specs and some comments along side.
- ZX81 (Sinclair)
- ZX Spectrum (Sinclair)
- PC1500 (Sharp)
- VIC 20 (Commodore)
- TI-99/4 (Texas Instruments)
- Dragon (Dragon Data)
- Atari 400 (Atari)
- TRS-80 Colour Computer (Tandy or Radio Shack in the U.S.A.)
- Atom (acorn)
- BBC Micro (Acorn)
- PET (Commodore)
- Apple II Plus (Apple)
After a short glossary the book ends.
All in all a good little book. It packs a lot in although it doesn’t get into much depth. It’s quite amusing that 2 of the 3 program listings in the book have bugs in them. Especially the one on the page about debugging! Hopefully the books of actual programs will be better.
And I found I need to work on some extra Orwell commands such as CLS. This will probably become necessary in the later books as the programs get more complicated (and less buggy I hope).