Personal Computer News


Beyond Basic

Author: Simon Williams
Publisher: BBCSoft/BBC Publications
Machine: BBC Model B

 
Published in Personal Computer News #039

Beyond Basic

The daunting complexities of an assembler routine to someone used to a tolerant language like Basic can be very off-putting. One approach to teaching machine code is to combine a self assessment textbook with programs ready to load into the computer. This is what Richard Freeman has done for the BBC micro in Beyond Basic.

It starts with an outline of aims, a brief description of assembly language and reasons for its use. A series of self assessment questions and assignments are intended to test the knowledge acquired from each part of the text. The questions all have solutions at the end of each chapter, and in themselves provide a good deal of useful information. Green text highlights new or important information.

The early units are fairly predictable. It is difficult to devise new ways of explaining binary and hexadecimal or the structure of registers and memory locations. The statements LDA and STA are the first to be introduced and the author takes this opportunity to explain the procedures necessary to include an assembler routine within a Basic program.

The uses of labels and single-byte addition and subtraction are covered in Unit 2 and with Unit 3 describes the processor status register with its various flags, and outlines conditional and unconditional branches, subroutines and the use of the X and Y.

Unit 4 gets into the nitty-gritty of addressing modes, each of which is covered with examples of applications. This is true throughout the book; the reader is left feeling that the exercises do have practical application.

Multiplication and division are dealt with in Unit 5 and a discussion of lists and tables is well set out in Unit 6. The author begins here to use built-in operating system routines offered by the BBC Micro. Unit 7 describes use of the stack, one of the best explanations in the book, and masking, a complicated subject not completely demystified here.

Unit 8 is devoted to operating system calls, which is an area other assembler texts have fallen down on in the past.

Unit 9 covers 16 bit multiplication and division and sorting of strings, again illustrated by practical programs. Unit 10 rounds off the course with sections on common errors and programming style and appendices cover the BBC Micro/ASCII character set and the 6502 instruction set.

The cassette to go with Beyond Basic includes all example programs listed in the book. However, none of the programs are particularly long and none should be beyond even the one-fingered typist.

I rate the book very highly. It is exhaustive, not exhausting, and covers most of the subject exactly and clearly.

Simon Williams