@instruction<EOL><INDENT>def INC(cpu, dest):<DEDENT>
arg0 = dest.read()<EOL>res = dest.write(arg0 + <NUM_LIT:1>)<EOL>res &= (<NUM_LIT:1> << dest.size) - <NUM_LIT:1><EOL>SIGN_MASK = <NUM_LIT:1> << (dest.size - <NUM_LIT:1>)<EOL>cpu.AF = ((arg0 ^ <NUM_LIT:1>) ^ res) & <NUM_LIT> != <NUM_LIT:0><EOL>cpu.ZF = res == <NUM_LIT:0><EOL>cpu.SF = (res & SIGN_MASK) != <NUM_LIT:0><EOL>cpu.OF = res == SIGN_MASK<EOL>cpu.PF = cpu._calculate_parity_flag(res)<EOL>
Increments by 1.

Adds 1 to the destination operand, while preserving the state of the
CF flag. The destination operand can be a register or a memory location.
This instruction allows a loop counter to be updated without disturbing
the CF flag. (Use a ADD instruction with an immediate operand of 1 to
perform an increment operation that does updates the CF flag.)::

        DEST  =  DEST +1;

:param cpu: current CPU.
:param dest: destination operand.