We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

Eyes & Lichty: Difference between revisions

From SnesLab
Jump to: navigation, search
(added quick links to PDF)
(→‎Eratta: PLA typo)
 
(19 intermediate revisions by the same user not shown)
Line 1: Line 1:
"'''Eyes & Lichty'''" is scene slang for the excellent manual "Programming the 65816 Including the 6502, 65C02, and 65802" by David Eyes & Ron Lichty.  It may be the best unofficial textbook on SNES programming, due in no small part to the fact that the [[Ricoh 5A22]] is based on the 65c816 and the [[SPC700]] is based on the 6502.
"'''Eyes & Lichty'''" is scene slang for the excellent manual "Programming the 65816 Including the 6502, 65C02, and 65802" by David Eyes & Ron Lichty.  It may be the best unofficial textbook on SNES programming, due in no small part to the fact that the [[Ricoh 5A22]] is based on the 65c816 and the [[SPC700]] is based on the 6502.
=== Addressing Mode ===
Eyes & Lichty divides the 65c816's various addressing modes into two groups: simple and complex.  Simple addressing modes are explained first and require the processor to do little effective address calculation.  They are:
==== Simple Addressing Modes ====
* [[Immediate]]
* [[Absolute]]
* Direct Page
* [[Accumulator Addressing|Accumulator]]
* [[Implied]]
* [[Stack Addressing|Stack]]
* [[Direct Page Indirect]]
* [[Absolute Long]]
* [[Direct Page Indirect Long]]
* [[Block Move Addressing|Block Move]]
see page 108
==== Complex Addressing Modes ====
* Absolute Indexed with X
* Absolute Indexed with Y
* Direct Page Indexed with X
* Direct Page Indexed with Y
* Direct Page Indirect Indexed with Y
* Direct Page Indexed Indirect with X
* Absolute Indexed Indirect
* Direct Page
* Absolute Long Indexed With X
* Direct Page Indirect Long Indexed with Y
* Stack Relative
* Stack Relative Indirect Indexed with Y
see page 197


=== Eratta ===
=== Eratta ===
* page 497 recommends making sure the carry flag is already set, or to set it with [[SEC]] prior to doing a [[SBC]] to "avoid subtracting the carry flag" but it should say "to avoid subtracting one"
* page 510 on [[TCD]] and page 512 on [[TDC]] mentions the [[direct page register]], but this is missing from the index
* In the tables that show which MPU supports which instructions, an "X" denotes yes and a " " denotes no.  Many readers would find a check mark less confusing.
* In the tables that show which MPU supports which instructions, an "X" denotes yes and a " " denotes no.  Many readers would find a check mark less confusing.
* The Rockwell 65c02 does not have a direct page, but the four Rockwell instructions are listed as having [[Direct Page Addressing]] anyway "for consistency."
* The 65c02 datasheet does mention [[WAI]] is supported
* The [[addressing mode]] for [[WDM]] is missing, but the datasheet says it is [[Implied]]
* Assemblers are described as requiring the [[signature byte]] for [[COP]], but on the next page it says the signature byte is optional
* The page on [[PLA]] has a typo that says the 65x pull instructions "set" the zero and negative flags; it should say "affect."


=== Quick Links ===
=== Quick Links ===
Line 12: Line 53:
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n19 Introduction]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n19 Introduction]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n21 How to Use this Book]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n21 How to Use this Book]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n27 Part I Basics]
====[https://archive.org/details/0893037893ProgrammingThe65816/page/n27 Part I Basics]====
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n29 Basic Assembly Language Programming Concepts]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n29 Basic Assembly Language Programming Concepts]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n49 Part II Architecture]
====[https://archive.org/details/0893037893ProgrammingThe65816/page/n49 Part II Architecture]====
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n51 Architecture of the 6502]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n51 Architecture of the 6502]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n71 Architecture of the 65C02]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n71 Architecture of the 65C02]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n75 Sixteen-Bit Architecture: The 65816 and the 65802]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n75 Sixteen-Bit Architecture: The 65816 and the 65802]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n99 Part III Tutorial]
====[https://archive.org/details/0893037893ProgrammingThe65816/page/n99 Part III Tutorial]====
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n101 SEP, REP, and Other Details]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n101 SEP, REP, and Other Details]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n109 First Examples: Moving Data]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n109 First Examples: Moving Data]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n133 The Simple Addressing Modes]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n133 The Simple Addressing Modes]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n165 The Flow of Control]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n165 The Flow of Control]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n181 Built-IN Arithmetic Functions]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n181 Built-In Arithmetic Functions]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n205 Logic and Bit Manipulation Operations]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n205 Logic and Bit Manipulation Operations]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n223 The Complex Addressing Modes]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n223 The Complex Addressing Modes]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n251 The Basic Building Block: The Subroutine]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n251 The Basic Building Block: The Subroutine]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n275 Interrupts and System Control Instructions]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n275 Interrupts and System Control Instructions]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n291 Part IV Applications]
=====[https://archive.org/details/0893037893ProgrammingThe65816/page/n291 Part IV Applications]=====
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n293 Selected Code Samples]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n293 Selected Code Samples]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n325 DEBUG16 - A 65816 Programming Tool]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n325 DEBUG16 - A 65816 Programming Tool]
Line 35: Line 76:
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n399 The Addressing Modes]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n399 The Addressing Modes]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n447 The Instruction Sets]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n447 The Instruction Sets]
<div style="column-count:10">
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n449 ADC]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n449 ADC]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n451 AND]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n451 AND]
Line 125: Line 167:
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n550 XBA]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n550 XBA]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n551 XCE]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n551 XCE]
</div>
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n553 Instruction Lists]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n553 Instruction Lists]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n567 Appendices]
*[https://archive.org/details/0893037893ProgrammingThe65816/page/n567 Appendices]
Line 143: Line 186:
[[Category:ASM]]
[[Category:ASM]]
[[Category:Books]]
[[Category:Books]]
[[Category:Scene Slang]]

Latest revision as of 06:12, 19 December 2023

"Eyes & Lichty" is scene slang for the excellent manual "Programming the 65816 Including the 6502, 65C02, and 65802" by David Eyes & Ron Lichty. It may be the best unofficial textbook on SNES programming, due in no small part to the fact that the Ricoh 5A22 is based on the 65c816 and the SPC700 is based on the 6502.

Addressing Mode

Eyes & Lichty divides the 65c816's various addressing modes into two groups: simple and complex. Simple addressing modes are explained first and require the processor to do little effective address calculation. They are:

Simple Addressing Modes

see page 108

Complex Addressing Modes

  • Absolute Indexed with X
  • Absolute Indexed with Y
  • Direct Page Indexed with X
  • Direct Page Indexed with Y
  • Direct Page Indirect Indexed with Y
  • Direct Page Indexed Indirect with X
  • Absolute Indexed Indirect
  • Direct Page
  • Absolute Long Indexed With X
  • Direct Page Indirect Long Indexed with Y
  • Stack Relative
  • Stack Relative Indirect Indexed with Y

see page 197

Eratta

  • page 497 recommends making sure the carry flag is already set, or to set it with SEC prior to doing a SBC to "avoid subtracting the carry flag" but it should say "to avoid subtracting one"
  • page 510 on TCD and page 512 on TDC mentions the direct page register, but this is missing from the index
  • In the tables that show which MPU supports which instructions, an "X" denotes yes and a " " denotes no. Many readers would find a check mark less confusing.
  • The Rockwell 65c02 does not have a direct page, but the four Rockwell instructions are listed as having Direct Page Addressing anyway "for consistency."
  • The 65c02 datasheet does mention WAI is supported
  • The addressing mode for WDM is missing, but the datasheet says it is Implied
  • Assemblers are described as requiring the signature byte for COP, but on the next page it says the signature byte is optional
  • The page on PLA has a typo that says the 65x pull instructions "set" the zero and negative flags; it should say "affect."

Quick Links

Part I Basics

Part II Architecture

Part III Tutorial

Part IV Applications