Most programmers begin by learning a high level language such as BASIC and then immediately apply it to the task of writing programs. This seems to be a natural extension of the way they learned the language in the first place: by way of examples but examples are nearly always short and there is a world of difference between a short example and a long applications program! The difficulty is that there really are new problems to be solved in tackling a large program that were not present in the short examples. A short example of even as many as fifty lines can be 'held in the head', whereas a program that is likely to do anything useful will be composed of so many lines that this is impossible. The result is that large programs present a level of difficulty that is quite unnecessary.
There is more to programming than knowing the elements that make up a computer language. In fact, this is only the first stage on the road to becoming an advanced programmer. Learning how to apply a computer language to real problems is mostly a matter of solving the problem of writing larger programs and being aware of what your objectives are, Using the ideas presented in this book you will find not only is it possible to write large programs quickly but they are also more rewarding than any short examples. The time saved by writing large programs in an organised fashion can also be spent in dealing with details such as getting rid of bugs and making programs 'friendly'. In this sense advanced programming should be a rewarding experience for all concerned including the user!
To get the most from this book it is assumed that you have reached the stage of being able to write short programs in BBC BASIC and generally know your way around the machine. Some chapters also assume that you know something about 6502 assembler, although if this is not the case you can skip the relevant sections and come back to them at a later date. The reason for using 6502 assembler is simply that the mixing of BBC BASIC and assembler is essential to the production of efficient programs. Although most of the programming methods described can be applied either to BASIC or to assembler (or any other computer language!) without any difficulty, we have included many specific examples of 'structured assembler' and have even devoted a whole chapter to it!
The examples that are used in this book are of course larger than you would expect to find in other computer books and they are useful programs in their own right. They include a disk sector editor, a spelling checker, an execution tracer, a background clock and a disassembler. If you intend writing applications programs as large and as complex as these then you cannot afford to ignore the ideas contained within this book they make programming easier, more satisfying and more enjoyable.
Mike James and S. M. Gee