Decimal mode makes 6502 arithmetic treat each byte as two decimal digits: one in each four-bit nibble. CLD clears the decimal flag for ordinary arithmetic, while SED enables decimal arithmetic. section 5.12
The NES version of the 6502 does not support decimal operations, so NES startup code disables decimal mode before continuing with initialization. section 5.12
cld #1 ldx #$FF txs #2
Place CLD near the beginning of reset initialization, before normal arithmetic is used. section 5.12
