Commodore User


Programming The Commodore 64

Categories: Review: Book
Author: David Bolton
Publisher: Level Limited
Machine: Commodore 64

 
Published in Commodore User #21

Programming The Commodore 64

Four years ago, I bought my first computer - a Pet. Obsolete now, but then it was the best thing since sliced bread. Being inquisitive about how it worked I looked around and eventually came across an excellent book by Rae West that became the reference guide for me. It was called "Programming The Pet".

The author has now brought out revised versions of that book for the Vic-20 and now for the Commodore 64.

Not so long ago a figure of 10% was estimated as the percentage of computer buyers who learn to program their machines. It is these programmers that the book is aimed at, especially those who have learnt Basic.

But this is not the book to buy if you are a complete beginner, there are better books to go to. Anyone else right up to whizz-kid machine coder should certainly find a place for it, not on the bookshelves either, but right next to the computer.

The book looks at all aspects of the C64 and some of these features need some machine-code to show them off. For example: multiple sprites, programming function keys or graphics and text displays.

Until it is brought in as a separate topic, any machine code programs are given as lists of data. To overcome the problem of mistyping lines, a special loader has been included, which patches itself into Basic. When a line is typed in, a checksum value is calculated and shown on the screen and this should correspond with the value givenin the listing at the end of each line. A rather unique system and I think it's a very good idea.

Through 17 chapters the author moves methodicaly from advanced Basic through to machine language and then goes through graphics, sprites, sounds and peripherals like tape, disk, joysticks and paddles.

While the book is generally superb I found the chapter on system variables and ROM calls excellent. This lists the entire ROM routine by routine giving the purpose of the routine, what locations are used and how it works.

There are many example programs in Basic and machine-code and these include such gems as a three-part music player, various disk utilities, sprite editors and many more. High resolution graphics need machine-code to do them justice and the book provides these.

This is a big book, very well laid out with plenty of diagrams and explanations. Some of these can be quite detailed, for instance a look at all the waveforms in the SID chip and how these are generated, and a concise introduction to music theory.

I think the only thing I can fault this book on is its price. However, if you are keen on getting the best out of your C64 and will only ever buy one book, make it this one. You won't be disappointed.

David Bolton