System Specification for C65 | Fred Bowen | March 1, 1991 |

**Add memory to accumulator with carry ADC**

A=A+M+C

Addressing Mode | Abbrev. | Opcode |
---|---|---|

immediate | `IMM ` | `69` |

base page | `BP ` | `65` |

base page indexed X | `BP,X ` | `75` |

absolute | `ABS ` | `6D` |

absolute indexed X | `ABS,X ` | `7D` |

absolute indexed Y | `ABS,Y ` | `79` |

base page indexed indirect X | `(BP,X) ` | `61` |

base page indirect indexed Y | `(BP),Y ` | `71` |

base page indirect indexed Z | `(BP),Z ` | `72` |

Bytes | Cycles | Mode |
---|---|---|

2 | 2 | immediate |

2 | 3 | base page non-indexed, or indexed X or Y |

3 | 4 | absolute non-indexed, or indexed X or Y |

2 | 5 | base page indexed indirect X, or indirect indexed Y or Z |

The ADC instructions add data fetched from memory and carry to the contents of the accumulator. The results of the add are then stored in the accumulator. If the "D" or Decimal Mode flag, in the processor status register, then a Binary Coded Decimal (BCD) add is performed.

The "N" or Negative flag will be set if the sum is negative, otherwise it is cleared. The "V" or Overflow flag will be set if the sign of the sum is different from the sign of both addends, indicating a signed overflow. Otherwise, it is cleared. The "Z" or Zero flag is set if the sum (stored into the accumulator) is zero, otherwise, it is cleared. The "C" or carry is set if the sum of the unsigned addends exceeds 255 (binary mode) or 99 (decimal mode).

Flags N V E B D I Z C N V - - - - Z C

This page has been created by Sami Rautiainen. | |

Read the small print. | Last updated November 29, 2002. |