CLD

A 6502 instruction that clears the D (decimal mode) flag. Use this before an ADC or SBC to get binary arithmetic.

Function: 0 => D

Updates flags: . . . . D . . .

Opcode number: impl $D8

This instruction works whether or not the particular 6502 model actually implements decimal mode ADC and SBC. (For instance, the 2A03 lacks it.) Because the setting of the D flag is unknown on reset, make sure to include a CLD near the beginning of your boot code.