Basics
This is a series of articles related to the 6502 Assembly language programming on the Commodore C64. The intention is to learn this while having fun. We will achieve this objective by writing simple games.
Machine Language
So, what is machine code and how it is written?
Here is a simple 6502 program
A2 01
8E 84 03
A9 02
6D 84 03
8D 85 03
60
As you can see it has no meaning to the human being. Well let me rephrase that. It has no meaning to most human beings, but I am sure that there are some 6502 Gurus out there that will be able to translate that. [@Bill I’m looking at you ]
The above is the extreme and we will never write such a program thankfully.
It is what the computer understands. Of course, they will be translated into binary (Not Hex) or better +5V and 0 but that is to deep down the line.
The 6510 CPU Registers
In the previous article it was shown that the CPU is using its own Registers which are just memory locations within the CPU, and these permit the CPU to perform its functions.
The 6510 processor has 3 Registers. These are called the A register which is short for the Accumulator, the X register and the Y register. There is also the Status Register (SR) and the Program Counter (PC) plus the Stack Pointer (SP).
(Article by Phaze101)