Commodore User


Machine Language For The Commodore 64 And Other Commodore Computers

Author: David Bolton
Publisher: Prentice-Hall
Machine: Commodore 64

 
Published in Commodore User #18

Machine Language For The Commodore 64 And Other Commodore Computers

Jim Butterfield has written many utility programs and magazine articles (some in Commodore User) and is recognised as probably the expert on Commodore computers.

Machine Language For The Commodore 64 And Other Commodore Computers starts by assuming that the reader knows nothing about the computer hardware and explains the concepts of a data bus, binary and hexadecimal arithmetic and looks at the registers in the 6502 chip. These are explained with clear diagrams and short sections of three or four paragraphs.

The next three chapters expand upon the initial encounter with machine code into the areas of I/O, status flags and arithmetic. Particular use is made of the 'kernal' subroutines in all Commodore computers to simplify programming tasks.

Chapter five explains the ins and outs of addressing modes. This is one of the best descriptioons I have seen anywhere. Apart from explaining how the modes work he also gives the why, as in why the indexed. Indirect is hardly ever used or why indirect jumps are so useful with ROM routines.

The book becomes progressively detailed, in particular the sections on linking Basic with machine code. This looks at where to locate the code, interacting with Basic variables and the potential hazards of mixed Basic and machine-code programs. Then you're led into the real dirt of stacks, interrupts, peripheral chips and system wedges. As usual, these are very well explained.

Finally, chapter eight discusses program timing, redirecting I/O and a summary of where you have got to. At this point we are not even halfway into the book. Pages 147 to 326 are appendices A to J covering among other things machine code instruction listings, memory maps and ROM addresses, a listing of Supermon and reprints of technical data on I/O chips.

As you may gather, I think that this is one of the best books on introducing machine code. It is a great shame that it fades out in the middle. The appendices appear to have been added as padding, useful though they are, and I feel that the book would have been considerably improved by the addition of a "real" program and description.

Verdict: Extremely well written and a good introduction but somewhat lacking in content. It could equally have been titled "Machine Language For The Vic-20 And Other Commodore Computers".

David Bolton