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 t ...

Jay's ASM Tutorial


This is a tutorial on 65816 ASM used in the SNES, made easy for dumb people to understand (sorta). In case you are wondering, I don't program in this language, so it is possible that I will write something incorrectly in this tutorial. If so, you can e-mail me at tennj@yahoo.com, ...

ASM Tutorial Part 1

So... you want to make a block that freezes Mario only when he's small? Or perhaps make a block that kills him if he has zero coins because you've played through SMW and well, there are no more gimmicks? Well... with ASM, you can easily create these type of blocks - ASM basically lets you do custom ...

Instruction Wrapping

Program Counter Increment
  • Always wraps within the bank, at any point in the opcode.
Absolute -- a
  • Word reads in native mode will carry into the next bank.
Absolute Indexed X -- a,X
  • Adding X may carry into the next bank.
  • Word reads in native mode ...

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 ...


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.


  • S ...

ASM Tutorial Part 2

Are you familiar with all the previous lessons yet? If so, that's great.. with all of that knowledge, you can do a lot of cool stuff - but you can always get better at ASM and make awesome stuff by learning more. So here's Part 2 of the tutorial, which for now only explains a bit of intermediate stu ...


This is a document intended to describe various aspects of SNES timing. It will probably not be useful unless you already know a good bit about the SNES.

BTW, special credit to byuu for the critical observation that the SNES returns to a known timing position on reset. Thus, a deterministic ROM ( ...



PHP is a mnemonic for an instruction that pushes the lowest 8 bits of the of the [[P register]] to the [[stack]]. An immediate consequence of this is that there is no specific instruction for pushing the [[emulation]] (9th) bit of [[P]]. [[XCE]] is the only instruction capable ...


DMA, or "direct memory access" is found in a number of computer systems, not just the Super Nintendo. It's basically a way for a peripheral or coprocessor to read data directly from memory, instead of requiring the main CPU to do a number of reads and writes. This is typically faster, if o ...

ASM Hacking for Dummies

[[!include asm_hacking_sidebar]]

Introduction ### {: #introduction}

This document was written for the aspiring ROM hacker with little to no experience in 65c816 programming. The basics have been thoroughly covered and I believe this should prove a significant aid to anyone interested in 65c8 ...

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 i ...


Address Bus B Registers

TODO: note on fast access time

Register Address Name Style Access Timing
Screen Display ...