A&B Computing
1st July 1984
Author: Peter Mujtaba
Publisher: BBCSoft/BBC Publications
Machine: BBC Model B
Published in A&B Computing 1.08
There are a number of books currently on the market designed to teach people how to program their computer in machine code. Users of the BBC Microcomputer have a large advantage by having an assembler built into their Operating System. This book, subtitled "6502 Assembly Language on the British Broadcasting Corporation Microcomputer", is the first of such books to be published by the BBC.
Its stated aim is to help people who already have a good grasp of BASIC to move onto assembly language programming. It approaches the subject slowly, gently easing the novice into the world of hex, the stack, and registers. The book is organised into ten chapters, which chooses to call units. The reader is introduced to number representations, addition and subtraction, and jumps, loops and branches, through to the more complex issues of addressing modes, multiplication and division, and lists and tables. The final group of units cover the stack, CALL, USR and masking, and the BBC Operating System calls, and a unit entitled 'tough stuff', which covers 16 bit manipulations and sorting a basic array. The tenth unit is a round-up and deals with placing programs and data in memory, programming errors and style, and saving of machine code. Three appendices cover the BBC Microcomputer character set, the 6502 instruction set, and a few titles for further reading.
The success of the book has to be judged against its stated intentions. It is aimed at people who have a good grasp of BASIC; it offers a problem solving approach to assembly language, not a plod through the instruction set; and it is aimed specifically at the BBC microcomputer not generally at 6502 systems.
That the reader needs to have a good grasp of BASIC is not obvious. Basic terms are used often without reference or explanation, but those that have particular use with assembler, like the use of the DIM statement to reserve memory, are highlighted. In these cases they are literally highlighted by using green text instead of black. Only in the latter part of the book would a learner at BASIC begin to struggle, but this is more a mark of the gentle approach than an attempt to cater for the novice.
The book certainly is not a plod through the instruction set. In fact there are too many commands not used in this book for my liking. In the listing of the instruction set in appendix 2, thirteen commands out of a total of 56 are marked as not being included in the book. These include use of the decimal mode and interrupts.
This last point is of relevance when assessed against the final statement of intent, that this is specifically a book for the BBC microcomputer. For the book to dedicate a mere nineteen pages to Operating System calls is a pity. One is continually told by Acorn to use all of the proper routes through the system instead of cutting corners that might prevent the correct operation of programs with later Operating Systems. I would have liked to see much more subject matter in this very important area.
In total, the book gives an excellent introduction into the world of assembly language programming. Its most obvious target will be those people who are complete learners. Anyone who has already got to grips with another assembly language might find the gentle approach a little laboured and drawn out. My biggest disappointment was to see no information on graphics. One of the most common reasons for turning to assembly language is to speed up games. This invariably involves the display and movement of graphical forms. This is not mentioned anywhere in this book.
Accompanying the book is a cassette which contains all the programs listed in the text. One of the best ways to learn assembly language is to get on a keyboard and type some in. To simply download from cassette is a shortcut that I would not recommend, and at the exorbitant price of over £11, represents a significant saving by just buying the book. This I can recommend.