January 7, 2022 W65C02S 8bit Microprocessor WDC reserves the right to make changes at any time without notice in order to improve design and supply the best possible product. Information contained herein is provided gratuitously and without liability, to any user. Reasonable efforts have been made to verify the accuracy of the information but no guarantee whatsoever is given as to the accuracy or as to its applicability to particular uses. In every instance, it must be the responsibility of the user to determine the suitability of the products for each application. WDC products are not authorized for use as critical components in life support devices or systems. Nothing contained herein shall be construed as a recommendation to use any product in violation of existing patents or other rights of third parties. The sale of any WDC product is subject to all WDC Terms and Conditions of Sales and Sales Policies, copies of which are available upon request. Copyright 1981-2022 by The Western Design Center, Inc. All rights reserved, including the right of reproduction, in whole, or in part, in any form. www.WDC65xx.com Page 1 TABLE OF CONTENTS 1 INTRODUCTION ....................................................................................................... 5 1.1 FEATURES OF THE W65C02S ........................................................................................................... 5 2 FUNCTIONAL DESCRIPTION ................................................................................. 6 2.1 INSTRUCTION REGISTER (IR) AND DECODE ........................................................................................ 6 2.2 TIMING CONTROL UNIT (TCU) ........................................................................................................... 6 2.3 ARITHMETIC AND LOGIC UNIT (ALU) ................................................................................................. 6 2.4 ACCUMULATOR REGISTER (A) ........................................................................................................... 6 2.5 INDEX REGISTERS (X AND Y) ............................................................................................................. 6 2.6 PROCESSOR STATUS REGISTER (P) .................................................................................................. 6 2.7 PROGRAM COUNTER REGISTER (PC) ................................................................................................ 7 2.8 STACK POINTER REGISTER (S) .......................................................................................................... 7 3 PIN FUNCTION DESCRIPTION ............................................................................... 9 3.1 ADDRESS BUS (A0-A15) .................................................................................................................. 9 3.2 BUS ENABLE (BE) ............................................................................................................................ 9 3.3 DATA BUS (D0-D7) .......................................................................................................................... 9 3.4 INTERRUPT REQUEST (IRQB) ............................................................................................................ 9 3.5 MEMORY LOCK (MLB) ...................................................................................................................... 9 3.6 NON-MASKABLE INTERRUPT (NMIB) ................................................................................................. 9 3.7 NO CONNECT (NC) ........................................................................................................................... 9 3.8 PHASE 2 IN (PHI2), PHASE 2 OUT (PHI2O) AND PHASE 1 OUT (PHI1O) .......................................... 10 3.9 READ/WRITE (RWB) ...................................................................................................................... 10 3.10 READY (RDY) ................................................................................................................................ 10 3.11 RESET (RESB) .............................................................................................................................. 10 3.12 SET OVERFLOW (SOB) ................................................................................................................... 11 3.13 SYNCHRONIZE WITH OPCODE FETCH (SYNC) ................................................................................ 11 3.14 POWER (VDD) AND GROUND (VSS) ................................................................................................ 11 3.15 VECTOR PULL (VPB) ...................................................................................................................... 11 4 ADDRESSING MODES .......................................................................................... 15 4.1 ABSOLUTE A ................................................................................................................................... 15 4.2 ABSOLUTE INDEXED INDIRECT (A,X) ................................................................................................. 15 4.3 ABSOLUTE INDEXED WITH X A,X ...................................................................................................... 15 4.4 ABSOLUTE INDEXED WITH Y A, Y...................................................................................................... 16 4.5 ABSOLUTE INDIRECT (A) ................................................................................................................. 16 4.6 ACCUMULATOR A ........................................................................................................................... 16 4.7 IMMEDIATE ADDRESSING .............................................................................................................. 16 4.8 IMPLIED I ........................................................................................................................................ 17 4.9 PROGRAM COUNTER RELATIVE R .................................................................................................... 17 4.10 STACK S ......................................................................................................................................... 17 4.11 ZERO PAGE ZP ............................................................................................................................... 17 4.12 ZERO PAGE INDEXED INDIRECT (ZP,X) ............................................................................................. 18 4.13 ZERO PAGE INDEXED WITH X ZP,X ................................................................................................... 18 4.14 ZERO PAGE INDEXED WITH Y ZP, Y .................................................................................................. 18 4.15 ZERO PAGE INDIRECT (ZP) .............................................................................................................. 18 4.16 ZERO PAGE INDIRECT INDEXED WITH Y (ZP), Y ................................................................................. 19 5 OPERATION TABLES ............................................................................................ 21 www.WDC65xx.com Page 2