From db3ae897455a5ac9a8875d9eac605e84e8e35d41 Mon Sep 17 00:00:00 2001 From: Alex Weisberger Date: Tue, 7 Oct 2014 23:51:30 -0400 Subject: [PATCH] add org files --- notes/6502Arch.org | 74 ++++++++++++++++++++++++++++++++++++++++++++++ notes/Notes.org | 29 ++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 notes/6502Arch.org create mode 100644 notes/Notes.org diff --git a/notes/6502Arch.org b/notes/6502Arch.org new file mode 100644 index 0000000..1fb048e --- /dev/null +++ b/notes/6502Arch.org @@ -0,0 +1,74 @@ +* Addressing modes + +has a 16-byte address bus. + + +** Absolute + +- Full memory location specified, i.e. $c000 +- 65536 bytes of addressable memory (2^16 duyyy) + + +** Zero-page + +- 1 byte adress, i.e. $c0, 256 bytes adressable +- faster, takes less program space + + +** Zero-page, X + +- Relative adressing _within_ the zero page. +- Adds the value in reg. x with a 1-byte adress +- i.e. STA $a0, X +- Address wraps around if the addition is larger than 1 byte + + +** Zero-page, Y + +- equiv to zero-page, X but can only be used with LDX and STX + + + + + +** Immediate + +- i.e. #$c0 +- loads immedate number into register + + +** Relative + +- i.e. $c0, or label + + +** Implicit + +- when operation doesn't deal with memory + + +** Indirect + +- Uses absolute address to get another address +- first address is LSB of address, following byte is MSB + + +** Indexed Indirect + +- i.e. LDA ($c0, X) +- Take a zero page adress and add the value in reg. x to it, look up 2 byte address + + + +** Indirect Indexed + +- zero page address dereferenced then Y is added to it + +* Stack + +- lives in memory between $0100 and $01ff + +* Jumping + +- JSR/RTS: Jump to subroutine and return from subroutine + diff --git a/notes/Notes.org b/notes/Notes.org new file mode 100644 index 0000000..120894c --- /dev/null +++ b/notes/Notes.org @@ -0,0 +1,29 @@ +* Information + +** 6502.org + +http://6502.org/ + + +** Easy 6502 tutorial + +http://skilldrick.github.io/easy6502/ + + +** Opcodes + +http://6502.org/tutorials/6502opcodes.html + +* Tools + +** Web Compiler + +http://www.6502asm.com/ + +* Work + +** aweisberger + +*** TODO Add Controller + +Must fetch program instruction from memory, decode and execute it.