Learning 65816 Assembly

I trust that you have learned some other kind of assembly language. If you have not, I'm afraid that learning 65816 as your first assembly language may be extremely hard. However, I won't stop you from trying. You will need other 65816 documents, because I do not teach much in this tutorial. These tutorials are for teaching you how to use [65816](/65816-refe ...

65816 Reference

Internal Registers

Mnemonic Friendly Name Description
A Accumulator The accumulator. This is the math register. It stores one of two operands or the result of most arithmetic and logical operations.
X, Y Index The index registers. These can be used to reference memory, to pass data to memory, or as counters for lo ...

Setting Up a Programming Environment

Before you dive into writing Super Nintendo programs, you need the necessary utilities and other things that will simplify your journey of learning how to program this beast.


  1. One great assortment of files was gathered by Qwertie, it contains documents on the cpu, graphics, etc: snesbase.7z
  2. Yoshi's docs - Oh wait, that's in the zip above. :) (i ...

Old BBS Messages

Old BBS Messages

Old BBS messages can be fun and interesting, so here are some I've come across.

Job Postings

Seeking Awesome Programmer

Catapult Entertainment, Inc. is looking for a top-notch, real-time,
low-level programmer to join a world-class software team creating the first
real-time nationwide video game network. Seeking a motivated,
self-directed, product-focused,  ...

SPC700 Reference


System Overview


8-bit SPC700, runs at ~1Mhz ...with the effective speed being half (each instruction takes a minimum of 2 cycles)


64KB (NOT 32KB), shared with everything.


4 8-bit I/O ports to transfer data to/from the SNES.


8x channels of ADPCM compressed sample goodness. The DSP also has special ha ...


A SNES 65816 Cross Assembler for the IBM PC

Version 1


SNASM is a 65816 Cross Assembler which produces SNES code in Super Magicom format.

SNASM is a fast 2 pass assembler, supporting source and binary include files, generation of listing files and labels files, generation of executable or object files and support for all 65816 instructions and addressing modes.

C ...

General Advice

The most important thing to know about 65816 optimizations is to not try to emulate other CPU architectures. A lot of games (games with a lot of slowdown) have this programming style where the programmer pretends that a couple memory locations are 68000 registers or high-level local variables, and the accumulator is only there as an operand buffer. Please avoid this style of programming. It is ...


xkas (acronym for: cross-knight assembler) is a cross-assembler for the WDC G65816 processor, specifically tailored for use with SFC/SNES programming and translations but also supports GBA Thumb CPU (ARM7TDMI Thumb). The documentation below is for the most recent version of xkas.


  • Supports All 256 Opcodes
  • Supports Labels / Sublabels / +/- Labels
  • Supports Math
  • Supports ASC ...

Basic ca65 Usage for SNES Programming

Basic ca65 Usage for SNES Programming

First Example

The first example is a minimal example of setting up the ROM header, vectors, etc.


ca65 ca65.s
ld65 -C lorom128.cfg -o ca65.smc ca65.o


# ca65 linker config for 128K SMC

# Physical areas of memory
# Names need not match, but it makes it easier to remember if they do ...