Programming the 65816

Programming the 65816

Programming the 65816 Including the 6502, 65C02 and 65802 Distributed and published under COPYRIGHT LICENSE AND PUBLISHING AGREEMENT with Authors David Eyes and Ron Lichty EFFECTIVE APRIL 28, 1992 Copyright © 2007 by The Western Design Center, Inc. 2166 E. Brown Rd. Mesa, AZ 85213 480-962-4545 (p) 480-835-6442 (f) www.westerndesigncenter.com The Western Design Center Table of Contents 1) Chapter One .......................................................................................................... 12 Basic Assembly Language Programming Concepts..................................................................................12 Binary Numbers.................................................................................................................................................... 12 Grouping Bits into Bytes....................................................................................................................................... 13 Hexadecimal Representation of Binary................................................................................................................ 14 The ACSII Character Set ..................................................................................................................................... 15 Boolean Logic........................................................................................................................................................ 16 Logical And........................................................................................................................................................ 16 Logical Or .......................................................................................................................................................... 17 Logical Exclusive Or........................................................................................................................................... 17 Logical Complement........................................................................................................................................... 17 Signed Numbers .................................................................................................................................................... 18 Storing Numbers in Decimal Form....................................................................................................................... 19 Computer Arithmetic............................................................................................................................................ 20 Microprocessor Programming.............................................................................................................................. 20 Machine Language.............................................................................................................................................. 20 Assembly Language............................................................................................................................................ 22 Writing in Assembly Language ............................................................................................................................ 22 Basic Programming Concepts............................................................................................................................... 23 Selection Between Paths...................................................................................................................................... 24 Looping .............................................................................................................................................................. 24 Subroutines......................................................................................................................................................... 24 2) Chapter Two.......................................................................................................... 26 Architecture of the 6502 ............................................................................................................................26 Microprocessor Architecture................................................................................................................................ 26 The 6502 Registers ................................................................................................................................................ 26 The Accumulator ................................................................................................................................................ 27 The X and Y Index Registers............................................................................................................................... 29 The Status Register ............................................................................................................................................. 29 Abbrev................................................................................................................................................................ 30 Name.................................................................................................................................................................. 31 The Stack Pointer................................................................................................................................................ 31 The Program Counter.......................................................................................................................................... 33 Addressing Modes................................................................................................................................................. 33 Instructions ........................................................................................................................................................... 35 The 6502 System Design........................................................................................................................................ 38 Pipelining ........................................................................................................................................................... 38 Memory Order of Multiple-Byte Values .............................................................................................................. 39 Memory-Mapped Input/Output............................................................................................................................ 39 Interrupts ............................................................................................................................................................ 39 NMOS Process ...................................................................................................................................................... 40 Bugs and Quirks ................................................................................................................................................... 40 3) Chapter Three ....................................................................................................... 41 Architecture of the 65C02 .........................................................................................................................41 The 65C02 Architecture........................................................................................................................................ 41 Addressing Modes................................................................................................................................................. 41 Instructions ........................................................................................................................................................... 42 CMOS Process ...................................................................................................................................................... 42 Bugs and Quirks ................................................................................................................................................... 42 4) Chapter Four......................................................................................................... 44 Sixteen-Bit Architecture The 65816 and the 65802...................................................................................44 2 The Western Design Center Power-On Status: 6502 Emulation Mode..................................................................................................45 The Full-Featured 65x Processor: The 65816 in Native Mode ................................................................45 The Program Bank Register ................................................................................................................................. 47 The Data Bank Register........................................................................................................................................ 48 The Direct Page Register ...................................................................................................................................... 48 The Stack Pointer.................................................................................................................................................. 48 Accumulator and Index Registers ........................................................................................................................ 48 Switching Registers

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    469 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us