Commodore User
1st August 1984
Author: David Bolton
Publisher: Granada
Machine: Commodore 64
Published in Commodore User #11
Introducing Commodore 64 Machine Code
Introducing Commodore 64 Machine Code is a welcome change from most C64 books from a very prolific author who has written many similar books for other computers. There must be a lot of people out in C64-land who have mastered Basic, graphics, sprites and sounds and want to move on. Well, this could be the follow-on book for you.
First, a proviso - I think that this must be the author's first venture into 6502/6510 programming as he has missed a few telling points along the way. For a start, the processor in the C64 is a 6510, not a 6502 (the difference is the addition of an I/O port).
That wasn't too bad: but saying that integer arithmetic is faster to use on the C64 than real is badly wrong. The C64 converts integers to real, does the arithmetic and converts the answers back to integer.
There is yet worse to come. Some of the programs listed lower the top of memory to protect machine code... but they fail to do a CLR, so machine code would get corrupted after some string operations.
Last but not least, a major blunder: the 6510 treats the carry flag the opposite way round to the Z80 in subtraction. You set the carry flag, not clear it, before a subtraction: Ian Sinclair has got it the wrong way round. This is a mistake that will not only cause bugs, but which will be very difficult to spot!
Despite these errors the book is well written - a bit more verbouse than some, but the explanations are quite detailed. And I'm pleased to see he's made extensive use of Inside The Commodore 64 and the Mikro assembler cartridge, both favourites of mine.
My hope is that a revised second edition will come out very quickly. If this is the case then I would be glad to recommend this for the budding machine code programmer. As it stands though, there are these annoying mistakes: so caveat emptor!
Scores
Commodore 64 VersionOverall | 44% |