Ex6502.CPU.Executor.INC (ex6502 v0.1.0) View Source

Add 1 to the memory location

Operation

M + 1 -> M

Table

INC | Increment Memory by One
================================================

M + 1 -> M                       N V - B D I Z C
                                 + - - - - - + -

addressing       assembler    opc  bytes  cycles
------------------------------------------------
accumulator      INC           1A    1     2
absolute         INC $nnnn     EE    3     6
absolute,X       INC $nnnn,X   FE    3     7
zeropage         INC $nn       E6    2     5
zeropage,X       INC $nn,X     F6    2     6

Flags

  • Negative: 1 if bit 7 of result is 1; 0 otherwise
  • Zero: 1 if result is zero; 0 otherwise

Link to this section Summary

Link to this section Functions