Instruction set

From C64-Wiki
Jump to navigationJump to search

An instruction set is the complete set of operations that a processor is designed to perform. Each instruction carries out a specific low‑level action such as loading or storing data, performing arithmetic or logic, or changing the flow of execution.

Every processor (or processor family) has its own instruction set, because the available operations reflect the hardware’s internal design. The Commodore 64’s 6510 CPU uses the 6502 instruction set, which includes familiar operations such as LDA (load accumulator), STA (store accumulator), ADC (add with carry) and JMP (jump to a new address).

Assembly language is simply a readable way of writing these machine‑level instructions. When programming the C64 at the lowest level, you are working directly with the 6510’s instruction set—manipulating registers, memory locations, and control flow exactly as the processor understands them.

Note that although the 6502/6510 instruction set is well documented, the processor also responds to a number of undocumented instructions. These often behave consistently enough to be usable, but they were never officially supported and may not be safe to rely on in all situations.