Classic Game Programming On The NES - Chapter 3 - Starting 6502 assembler
This chapter covers
- Memory and registers
- Moving things around
This will not be a full tutorial on 6502 Assembler as that would require a whole book, but it should give you a start so you can follow on with the rest of this book. The 6502 microprocessor was very popular and used for many home computer systems and consoles starting from the late 1970s. Its main appeal at the time was its simplicity and its ability to execute each instruction very quickly. It has a very small set of instructions and is the forefather to current generation reduced instruction set (RISC) processors that you would find in the mobile phones we all love to use today.
As the NES console has a 6502 processor with limited memory and registers, it can be difficult for higher-level languages (like C and Basic) to produce assembly code that runs fast enough to be useful for game development. Games require precise timing to ensure objects are drawn to the screen on time and that music and sound effects are played without slowing down. For our first chapter on 6502 Assembler, we will look at how the processor stores and processes information, with examples for each instruction and the different memory modes that can be used.
layout: page title: “Classic Games Programming for the NES - Chapter 3 - Starting 6502 assembler” permalink: /ProgrammingGamesForTheNES/CGPNES-CH03