Classic Computer Magazine Archive COMPUTE! ISSUE 25 / JUNE 1982 / PAGE 108

Book Review:
Beyond Games: Systems Software For Your 6502 Personal Computer

Jim Butterfield

This book covers 6502 machine language essentials for four machines: Apple, Atari, Ohio Scientific and PET. It does this by building a monitor, piece by piece; differences between machines are accomodated by a "system data block" which covers such things as the length of a screen line, input/output routines, etc.

The Approach

The author spends four chapters outlining the characteristics of the 6502 in a fairly easy and pictorial manner; it's not a rigorous treatment, but users will find it non-intimidating. In chapter five he begins writing some "useful" subroutines, making allowances for the differences between the various machines.

Starting at chapter six, we have an objective: let's write a "visible monitor" which will do many of the things a monitor system does: displaying registers and memory and allowing changes. The monitor builds on the subroutines previously established.

The initial monitor looks rather like that of the KIM; it allows only one memory location to be displayed or changed, plus various registers. Subsequent chapters add features to the monitor, giving such facilities as hexadecimal dumps, disassemblies, other utilities and a simple text editor.

Appendices give the various program modules in Assembler Code, Hexadecimal dump format, and BASIC DATA statements (for POKEing). Oddly, the "system data block" is not supplied in hexadecimal.

The Monitor

Readers should accept the "visible monitor" as an exercise, not as a powerful working tool that they will depend upon in the future. Some essential features are missing, especially interfaces to external code: breakpoints and GO. The monitor takes up a lot of room – 4K of memory – in view of what you get. Most machines will have good monitors already in place.

But the monitor itself isn't the object of the game. Getting there is most of the fun, or at least the education, and users should seek to do more than just type in coding lines: they should try to understand the objectives and methodology.

Some routines are written, but not used immediately. At the end of chapter 7, there are two exercises to try to overcome this problem; it would have been useful to have many more of these to aid checkout of the various modules. If the user is going to write a routine, he's better off if he can put it to use right away.

There are some operational features of the visible monitor that could be streamlined. The prompt which asks the user to supply an address should flip him into the address mode to guard against errors, for example. Some of the missing features might be considered "student exercises"; the reader should be able to improve on things he doesn't like.

The monitor doesn't deal with input/output other than the keyboard and screen. The logic makes room for a printer, but the coding to make the connection isn't in place. Activities are confined to the screen.

Perhaps the book's title is misleading in at least this sense. A prospective buyer would be likely to think: "Beyond Games? Must be business applications." If so, he might be disappointed to find a book that is concerned with inner space – memory manipulation and hexadecimal notation rather than business-oriented techniques.

The Material

The book's approach to learning coding is very matter-of-fact. Theory is not stressed and the material is presented pleasantly in a conversational manner.

There are a few errors; generally, they are minor in nature. In a discussion of indexing, page 21, it is stated that "...the 6502 will operate on some address higher (...or equal to the base address...) in memory." That's not always true for zero page indexing.

The author has quite a bit of trouble with the Compare instruction and the associated flags. Page 23 incorrectly shows the condition of the N flag after a compare (it might be easier to mark this flag "not relevant"), and a footnote on the same page states: If you wish to test the status of the Carry flag after a Compare, you must set it before the compare. Wrong. The sample coding carries through the error in part: page 55 gives the sequence CMP #$0A; BMI ... which is bad logic (it should be BCC) but does work in this case since the range of numbers in A is limited. Elsewhere, this type of sequence is given correctly – address 13DA has satisfactory code – did the author learn as he wrote the book?

The output of the disassembler is not satisfying. Indirect indexed addressing should show the addresses in zero page mode. The use of the dollar sign to signify hexadecimal is not consistent within the disassembly. Unidentified op codes are translated as BAD, which I tend to read as Binary Add; and one byte is almost inexplicably translated to TEX.

The hex dumps are hard to read. I had repeated problems distinguishing the digit 8 from 9 or B. The dump labeled D3 has an incorrect byte at $13D2; at least, it's incorrect until you plug in the exercise given much later in D11.

The book is nicely written and the program listings well commented. The visible monitor itself is probably not a useful end product, but the learning process along the way can be very valuable.

Perhaps the single most useful part of the book is the way that it compares the various 6502 machines. Several appendices compare the character sets, screen mapping, and simple input/output characteristics of the various machines. Even if a reader knows machine language, he may find value here. The broader characteristics of the machine (other I/O such as disk and printer) is not dealt with in any depth.

I hate the title: it's not relevant. "Beyond BASIC" might have made more sense, since the objective is to teach machine language techniques. After all, games – very good games – can be written in machine language; and monitors can be written in BASIC.

In many ways, it's a pleasing book. It's one of the few that attempts to teach you 6502 machine language with reference to the actual machine in which the language will reside.

Beyond Games: Systems Software for Your 6502 Personal Computer
by Ken Skier
BYTE/McGraw Hill
70 Main Street, Peterborough, NH 03458
432 pages. $14.95