The Western Design Center, Inc.8 CaveatsTable 8-1 CaveatsW65C816S <strong>Data</strong> <strong>Sheet</strong>Compatibility Issue NMOS 6502 W65C02 W65C02S W65C816SAlways page 1 8 bitsAlways Page 1, 8 Always Page 1, 8 Always page 1, 8S (Stack)when(E=1), 16 bitsbitsbitsbitswhen E=0X (X Index Reg)Y (Y Index Reg)Always Page 0Always less than256 ie 8 BitsAlways Page 0Always less than256 ie 8 BitsAlways Page 0Always less than256 ie 8 BitsAlways Page 0Always less than256 ie 8 BitsA (Accumulator) 8 bits 8 bits 8 bits(Flag Reg)TimingA.ABS,X,ASL,LSR,ROLwith no Page CrossingB. Jump IndirectOperand =XXFFC. Branch Across PageD. Decimal ModeBRK VectorInterrupt or BreakBank AddressMemory Lock (ML)Indexed Across PageBoundary (d),y a,xa,yRDY Pulled duringWrite CycleN, V and Z flags invalidin decimal mode.D=unknown after reset.D not modified afterinterrupt7 cycles5 cycles and invalidpage crossing4 cyclesNo add. cyclesFFFE,F BRK bit=0 onstack if IRQ, NMIN,V and Z flags valid indecimal mode. D=0after reset/interrupt6 cycles6 cycles4 cyclesAdd 1 cycleFFFE,F BRK bit=0 onstack if IRQ, NMIAlways Page 0Always less than256 ie 8 BitsAlways Page 0Always less than256 ie 8 BitsN,V and Z flags valid indecimal mode. D=0after reset /interrupt6 cycles6 cycles4 cyclesAdd 1 CycleFFFE,F BRK bit=0 onstack if IRQ, NMINot available Not available Not availableNot availableExtra read ofinvalid addressMLB=0 duringModify and WritecyclesExtra read of lastinstruction fetchMB=0 duringModify and WritecyclesExtra read of lastinstruction fetchIndexed page zeroalways in page 0(E=1), Cross page(E=0)Indexed page zeroalways in page 0(E=1), Cross page(E=0)8 bits (M=1), 16 bits(M=0)N,V and Z flags valid indecimal mode. D=0 afterreset/interrupt7 cycles5 cycles4 cyclesNo add. cycles00FFFE,F(E=1) BRK bit=0on stack if IRQ- NMIB,ABORTB000FFE6,7 (E=0), X=X onstack alwaysPBR not pushed (E=1)RTI, PBR, not pulled(E-1) PRB pushed (E=0)RTI, PBR pulled (E=0)MLB=0 during ReadModify and WritecyclesExtra read of invalidaddressIgnored Processor stops Processor stops Processor StopsThe Western Design Center W65C816S 56
The Western Design Center, Inc.W65C816S <strong>Data</strong> <strong>Sheet</strong>8.1 Stack AddressingWhen in the Native mode, the Stack may use memory locations 000000 to 00FFFFF. The effective address ofStack, Stack Relative, and Stack Relative Indirect Indexed addressing modes will always be within this range.In the Emulation mode, the Stack address range is 000100 to 0001FF. The following OpCodes and addressingmodes will increment or decrement beyond this range when accessing two or three bytes: JSL, JSR (a,x), PEA,PEI, PER, PHD, PLD, RTL8.2 Direct Addressing8.2.1 The Direct Addressing modes are often used to access memory registers and pointers. The effectiveaddress generated by Direct; Direct,X and Direct,Y addressing modes will always be in the Native mode range000000 to 00FFFF. When in the Emulation mode, the direct addressing range is 000000 to 0000FF, except for[Direct] and [Direct],Y addressing modes and the PEI instruction which will increment from 0000FE or0000FF into the Stack area.8.2.2 When in the Emulation mode and DH is not equal to zero, the direct addressing range is 00DH00 to00DHFF, except for [Direct] and [Direct],Y addressing modes and the PEI instruction which will incrementfrom 00DHFE or 00DHFF into the next higher page.8.2.3 When in the Emulation mode and DL in not equal to zero, the direct addressing range is 000000 to00FFFF.8.3 Absolute Indexed AddressingThe Absolute Indexed addressing modes are used to address data outside the direct addressing range. TheW65C02S addressing range is 0000 to FFFF. Indexing from page FFXX may result in a 00YY data fetch whenusing the W65C02S. In contrast, indexing from page ZZFFXX may result in ZZ+1,00YY when using theW65C816S.8.4 ABORTB Input8.4.1 ABORTB should be held low for a period not to exceed one cycle. Also, if ABORTB is held lowduring the Abort Interrupt sequence, the Abort Interrupt will be aborted. It is not recommended to abort theAbort Interrupt. The ABORTB internal latch is cleared during the second cycle of the Abort Interrupt.Asserting the ABORTB input after the following instruction cycles will cause registers to be modified:8.4.1.1 Read-Modify-Write: Processor status modified if ABORTB is asserted after a modify cycle.8.4.1.2 RTI: Processor status modified if ABORTB is asserted after cycle 3.8.4.1.3 IRQB, NMIB, ABORTB BRK, COP: When ABORTB is asserted after cycle 2, PBR andDBR will become 00 (Emulation mode) or PBR will become 00 (Native mode).8.4.2 The ABORT Interrupt has been designed for virtual memory systems. For this reason, asynchronousABORTB's may cause undesirable results due to the above conditions8.5 VDA and VPA Valid Memory Address Output SignalsWhen VDA or VPA are high and during all write cycles, the Address Bus is always valid. VDA and VPAshould be used to qualify all memory cycles. Note that when VDA and VPA are both low, invalid addressesmay be generated. The Page and Bank addresses could also be invalid. This will be due to low byte additiononly. The cycle when only low byte addition occurs is an optional cycle for instructions which read memorywhen the Index Register consists of 8 bits. This optional cycle becomes a standard cycle for the Storeinstruction, all instructions using the 16-bit Index Register mode, and the Read-Modify-Write instruction whenusing 8- or 16-bit Index Register modes.The Western Design Center W65C816S 57
- Page 1 and 2:
The Western Design Center, Inc.Upda
- Page 3 and 4:
The Western Design Center, Inc.W65C
- Page 5 and 6: The Western Design Center, Inc.W65C
- Page 7 and 8: The Western Design Center, Inc.1 IN
- Page 9 and 10: The Western Design Center, Inc.W65C
- Page 11 and 12: The Western Design Center, Inc.W65C
- Page 13 and 14: The Western Design Center, Inc.3 PI
- Page 15 and 16: The Western Design Center, Inc.W65C
- Page 17 and 18: The Western Design Center, Inc.W65C
- Page 19 and 20: The Western Design Center, Inc.3.13
- Page 21 and 22: The Western Design Center, Inc.W65C
- Page 23 and 24: The Western Design Center, Inc.W65C
- Page 25 and 26: The Western Design Center, Inc.W65C
- Page 27 and 28: The Western Design Center, Inc.W65C
- Page 29 and 30: The Western Design Center, Inc.5.2
- Page 31 and 32: The Western Design Center, Inc.W65C
- Page 33 and 34: The Western Design Center, Inc.W65C
- Page 35 and 36: The Western Design Center, Inc.Tabl
- Page 37 and 38: iThe Western Design Center, Inc.W65
- Page 39 and 40: iThe Western Design Center, Inc.W65
- Page 41 and 42: The Western Design Center, Inc.W65C
- Page 43 and 44: The Western Design Center, Inc.Tabl
- Page 45 and 46: The Western Design Center, Inc.Tabl
- Page 47 and 48: The Western Design Center, Inc.20.
- Page 49 and 50: The Western Design Center, Inc.W65C
- Page 51 and 52: The Western Design Center, Inc.W65C
- Page 53 and 54: The Western Design Center, Inc.W65C
- Page 55: The Western Design Center, Inc.W65C
- Page 59 and 60: The Western Design Center, Inc.W65C
- Page 61 and 62: The Western Design Center, Inc.W65C