ADC adds a source value and the current carry flag to the accumulator register, storing the result back in A. Use CLC first when carry must not contribute. section 4.1.1
ADC reads its operand through several addressing forms:
- Direct values, such as ADC #$05. section 4.1.1
- Absolute or zero-page memory addresses, such as ADC $0300 or ADC $06. section 4.1.1
- Indexed and indirect addresses using X or Y registers. section 4.1.1
Adding a direct value
CLC LDA #$01 ADC #$05 The accumulator becomes $06. Assemble and run the commands in the Online Assembler Simulator, then verify the result in the Debug window. section 4.1.1
Listing 4.2 Adding a direct value
clc #1 lda #$01 adc #$05
Shows the minimal sequence for clearing carry, loading A, and adding an immediate value. section 4.1.1
