Classic Computer Magazine Archive ANTIC VOL. 1, NO. 6 / FEBRUARY 1983

Looking at Books

Atari's Mother Tongue

by Daniel Grau

It seems not so long ago that I was programming my microcomputer by keying-in lists of hexadecimal numbers, and I was fortunate. Altair and Imsai owners had to enter their bootstrap programs by toggling an array of 24 switches for each byte of data. At that time I was the proud owner of a MOS Technology KIM microcomputer with a 6502 microprocessor and, yes, one whole kilobyte of memory.

Nowadays there are tools, like the wonderful Assembler Editor cartridge by Atari, for those who want to speak to the machine in its mother tongue. The 6502 machine language is one of the most elegant and efficient of all microcomputer languages, and it's my pleasure to share some information to help you learn to use this language.

The Atari Assembler Editor Manual assumes that the reader is already familiar with Assembly Language, and suggests, as suitable study texts, Lance Leventhal's 6502 Assembly Language Programming and Programming the 6502 by Rodnay Zaks. In Appendix B, the 6502 Programming Manual is added to the list. I will summarily review these and other well-known books.

6502 Assembly Language Programming and its companion, Assembly Language Subroutines, by Lance Leventhal (Osborne-McGraw Hill) are outstanding books. Both have extensive and very clear explanations of programming, 6502 architecture and Assembler instruction sets. The former also explains Assemblers, input / output operations, peripheral chips and 6502 interrupts. However, they are not easy reading for rank beginners.

Programming the 6502, by Rodnay Zaks (Sybex), deserves a note of caution. The first edition was full of errors. The editors put out a revised second edition, and later a third. Edition three still contains confused notions and some errors. The writer might be proficient with the 8080-or perhaps even the 6800-but not with the 6502. For instance, one program assumes that "load accumulator" (LDA) does not set the zero flag, which is true for the 8080. Another place, bit 7 is tested by loading the accumulator and then using the bit test instruction (BIT). This is needed in the 6800, but not in the 6502. These examples are not isolated, I can quote them by the fistful.

The SY6500/MCS6500 Microcomputer Family Programming Manual by SYNERTEK (3050 Coronado Drive, Santa Clara, CA 94086) is a reprint of the original manual by MOS Technology, the inventors of the 6502 chip. A pocketbook version can be had from Rockwell International Corp. (P.O. Box 3669, Anaheim, CA 92803).

This is the mother manual. Large chunks of its tables, addressing modes descriptions, lists of mnemonics and execution times, etc., can now be found in other texts. Since the beginner's first task is to learn the instruction set and the way the 6502 works, and considering that this book set the rules, it is a must for the library of any 6502 programmer. It is clearly written, well explained and not expensive. Still, it is not sufficient as a learning text for the rank beginner.

6502 Software Design, by Leo J. Scanlon (Sams & Co., Inc. ) is one of the best choices for learning Assembly Language. While some program examples are oriented specifically to the Rockwell AIM singleboard computer, this in no way detracts from the perfect understanding of the programming algorithms and processes. If you buy only one book, let it be this one.

The ATARI Assembler, by Don and Kurt Inman, is very difficult to recommend. Did either of them ever program in 6502 Assembler? If so, why endow the 6502 with a 16-bit stack pointer? (Fig. 1-5). On pages 7 and 87 they again assert that "the stack pointer and program counter are large enough to hold a full length address (0 to 65535)." In spite of this, this book has the virtue of familiarizing the reader with the ATARI Assembler cartridge, and does so somewhat better than the Atari Assembler Editor Manual itself. However, do not expect to learn to program in Assembly Language from this book alone. You will need previous knowledge of the way the 6502 and its instruction set work.

Beyond Games: Systems Software for your 6502 Personal Computer, by Ken Skier is, without doubt, very interesting. After 13 chapters of tutorial information (also with some trivial errors), we are treated to program listings of working monitors, disassemblers and text editors for the OSI, the Apple and the ATARI computers. These programs could be employed in lieu of the Atari Assembler cartridge to learn how to program in machine language, and do not use any subroutine of the ATARI Operating System. The author has programmed his own set, since, as he says, the ATARI's power "breeds complexity".

This brings us to the most pressing problem the aspiring ATARI Assembler Language programmer will have: how to integrate machine language programs into the ATARI system. The hardware and Operating System manuals give scant information on the way the various subroutines work. The program listings, which cost another twenty dollars, do not even contain the disk operating system, or the printer output routines. It is also fairly difficult to transfer the assembled machine language programs in memory into BASIC program, which is where many of us will want to put them.

We still need a book which describes all the routines, memory addresses, logic diagrams, chip signals, and many more things hidden in the innards of the ATARI. Let us hope that someone eventually will write it; and, until then, let's also hope that the wait is short.