6502 Micro-Processor and Machine Code

The centre of all the activity, the 6502 CPU (Central Processor Unit) runs at 1 Mhz. This might appear rather sluggish by todays standards, but do not underestimate the power of the 6502.

In order to understand the CPU, one must delve into machine code a little.

Machine code, versus BASIC (Beginners All Symbolic Instruction Code) is what the CPU understands. BASIC is just a high levels language, the guts of BASIC are written in machine code.

Machine code and BASIC do have simalarities. They both use a sequence of instructions to get a specific task completed, they both use variables of sorts. They both manipulate data to their own ends.

Enough of the simalarities, Machine code is frightening to begin with!

For about 12 years, i kept well away from machine code, sticking to good old BASIC. Although i missed the speed that machine code offered, i could emulate most games using BASIC code.

But inevitably, i found many scenarios when machine code would have really been useful, Scrolling the screen, Animating sprites, Moving Sprites smoothly, creating multi channel sound tracks.


The 6502 comprises of 3 main registers. They are called X, Y and A.

This Site is under construction, please be patient....