CLD clears the 6502 decimal-mode flag. On the NES, whose 6502 does not support decimal mode, this ensures normal arithmetic operations are used during startup. section 5.12
Disable decimal mode during reset
Place CLD before configuring the stack and continuing NES initialization: cld #1 ldx #$FF txs #2 The following instructions prepare the stack pointer after decimal mode has been disabled. section 5.12
