Electron User


Electron Assembly Language

Author: Graham Parr
Publisher: Shiva
Machine: Acorn Electron

 
Published in Electron User 2.01

Have you ever fancied learning machine code, but been repelled by the treatment it gets in the otherwise excellent Acorn Electron User Guide? Have you browsed through the books on assembler but found them too much like textbooks?

Well, if these early attempts haven't encouraged you, I'd advise you to have a look at Bruce Smith's Electron Assembly Language. It's just what you need to learn how to tap the inner power of your micro, showing you how to use the Electron's assembler to produce machine code programs.

Well written and thoroughly explained, by the time you've worked through its 200 pages, the book will have turned you from a boring old BASIC programmer into an exciting, knowledgeable machine code programmer.

If you've ever tried explaining machine code to someone, you'll realise how hard it is. The author - and me, from now on - treats the subject from three approaches. The first is that of the 6502 chip itself and the instructions needed to get it to perform its electronic wizardry. Along with this are examples of how to make use of these instructions in programs with many useful examples. The final theme is one of the assembler and operating system routines and how we can use them in our own programs.

The three separate themes are treated in 23 short but detailed chapters. These ring the changes, a cahpter on the assembler being followed by one of the status register of the 6502, and another on addressing modes.

There's always just enough on a subject to give you a feeling of learning something in depth, but never enough for boredom or despair to set in. The example programs are excellent and well annotated. Particularly nice is the habit of showing the assembly listings the program is supposed to generate. Useful when you fall into error!

Another appealing feature of the book is that the diagrams aren't just there for decoration, they're really useful. They actually aid and add to the explanations, helping make the most abtruse points clear.

One thing that did worry me was that the book starts on a fairly mathematical note.

It didn't take me long to realise that these chapters quietly introduced some ideas that would be important later on, such as bits being set or cleared and the concepts of overflow and carry. So don't be too put off by these chapters, they're very useful. If you really dislike them, you can always skip them and come back later if you need to.

It's an excellent book, certainly the best introduction to machine code for the Electron I've yet seen.

However I must point out one tiny flaw that might otherwise have you worried. The book is a conversion of one for the BBC Micro and a very good one it is indeed.

Unfortunately, chapter six seems to feel that the Electron has a Mode 7. It doesn't, and instead of the expected A of Program 1 you get something resembling a colon on its side.

But even with this embarrassing error it's still a very, very good piece of work, likely to become the standard introduction to Electron assembly language programming. Advised reading.

Graham Parr