The Western Design Center, Inc.W65C816S <strong>Data</strong> <strong>Sheet</strong>Program Counter Relative -rThe Program Counter Relative (r) addressing is referred to as Relative Addressing and is used only with theBranch instructions. If the condition being tested is met, the second byte of the instruction is added to the ProgramCounter, which has been updated to point to the OpCode of the next instruction. The offset is a signed 8-bitquantity in the range from -128 to 127. The Program Bank Register is not affected.Stack-sStack (s) addressing refers to all instructions that push or pull data from the stack, such as Push, Pull, Jump toSubroutine, Return from Subroutine, Interrupts, and Return from Interrupt. The bank address is always 0.Interrupt Vectors are always fetched from Bank 0.Stack Relative -d,sWith Stack Relative (d,s) addressing the low-order 16 bits of the effective address is formed from the sum of thesecond byte of the instruction and the stack pointer. The high-order 8 bits of the effective address are always zero.The relative offset is an unsigned 8-bit quantity in the range of 0 to 255.Instruction: OpCode offsetStack Pointerthen: + offsetOperand Address: 00 effective addressStack Relative Indirect Indexed-(d,s),yWith Stack Relative Indirect Indexed ((d,s),y) addressing the second byte of the instruction is added to the StackPointer to form a pointer to the low-order 16-bit base address in Bank 0. The <strong>Data</strong> Bank Register contains thehigh-order 8 bits of the base address. The effective address is the sum of the 24-bit base address and the Y IndexRegister.Instruction: OpCode offsetStack Pointeroffset00 S + offsetthen + DBRbase address+ Y RegOperand Address:effective addressThe Western Design Center W65C816S 26
The Western Design Center, Inc.W65C816S <strong>Data</strong> <strong>Sheet</strong>Table 4-1 Addressing Mode SummaryAddress Mode Instruction Times in Memory Cycle Memory Utilization in Number ofProgram Sequence BytesOriginal 8-bitNMOS6502New W65C816S Original 8-bitNMOS6502NewW65C816SAbsolute 4 (5) 4 (3,5) 3 3Absolute Indexed Indirect (Jump) - 6 - 3Absolute Indirect (Jump) 5 5 3 3Absolute Long - 5 (3) - 4Absolute Long, X - 5 (3) - 4Absolute, X 4 (1,5) 4 (1,3,5) 3 3Absolute, Y 4 (1) 4 (1,3) 3 3Accumulator 2 2 1 1Block Move (xyc) - 7 - 3Direct 3 (5) 3 (3,4,5) 2 2Direct Indexed Indirect (d,x) 6 6 (3,4) 2 2Direct Indirect - 5 (3,4) - 2Direct Indirect Indexed (d),y 5 (1) 5 (1,3,4) 2 2Direct Indirect Indexed Long [d],y - 6 (3,4) - 2Direct Indirect Long - 6 (3,4) - 2Direct, X 4 (5) 4 (3,4,5) 2 2Direct, Y 4 4 (3,4) 2 2Immediate 2 2 (3) 2 2 (3)Implied 2 2 1 1Relative 2 (1,2) 2 (2) 2 2Relative Long - 3 (2) - 3Stack 3-7 3-8 1-3 1-4Stack Relative - 4 (3) - 2Stack Relative Indirect Indexed - 7 (3) - 2Notes (these are indicated in parentheses):1. Page boundary, add 1 cycle if page boundary is crossed when forming address.2. Branch taken, add 1 cycle if branch is taken.3. M = 0 or X = 0, 16 bit operation, add 1 cycle, add 1 byte for immediate.4. Direct register low (DL) not equal zero, add 1 cycle.5. Read-Modify-Write, add 2 cycles for M = 1, add 3 cycles for M = 0.The Western Design Center W65C816S 27
- 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: 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 and 56: The Western Design Center, Inc.W65C
- Page 57 and 58: 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