Personal Computer News


The C64 - A Logical Machine Code Route

 
Published in Personal Computer News #079

The C64 - A Logical Machine Code Route

Q. I own a Commodore 64 and would like to get involved in machine code programming. I would be grateful if you could recommend a good "idiot's guide".

M. Raud
Rayleigh, Essex

A. The short answer is no, 'cos machine code isn't for idiots. But neither is it restricted to hyper-intelligent lager drinkers. Making the switch from Basic to assembler can be a shock but being a C64 owner you're better placed than most because if you currently program in Basic, the chances are you're using close-to-machine-code anyway because all the PEEKs and POKEs required for sprites and sound are machine code in another form.

If you want to do it (it is worth the effort) you need at least two books. The first is Programming the 6502 by Rodney Zaks. It looks daunting but really is essential because you should start, not by programming your C64, but by programming its processor, the 6510 (same as a 6502).

Once you know the instruction set and the different addressing modes, get hold of one of the multitude of titles dedicated to Commodore 64 machine code.

The choice is up to you but look out for Mastering Machine Code on your Commodore 64, by Mark Greenshields (published by Interface) and Machine Code Graphics & Sound, by Peter Falconer (Melbourne House).

Be patient and work on it. Eventually you'll wonder how you managed without it - and your friends will hold you in high esteem.

M. Rand