Document my meta-programming a bit
[ScratchNES.git] / src / CPU / README.md
1 # CPU Architecture
2
3 The CPU code was automatically generated from the scripts in this directory and the 6502 instruction set reference hosted by e-tradition.
4
5 # Instruction set
6
7 Each possible instruction is stored in a file in instructions/. The first line of the file is a comma-separated list of options. The rest of the file is tosh source code for that instruction in the general case.
8
9 ## Options
10
11 * R
12 Dereference the address into OP.
13
14 * RW
15 Load the address into OP before the code runs. After the code runs, copy it back.
16
17 * IMPLIED
18 Don't do anything. I needed to save a line, k?
19
20 * RAW
21 Load the effective address into OP, but do not dereference it.
22
23 * N, Z
24 Automatically update the respective flag in the typical way.
This page took 0.060384 seconds and 4 git commands to generate.