CLD
Jump to navigation
Jump to search
Clear Decimal Flag | ||||||
|
CLD (Clear Decimal Flag) clears the Decimal Flag in the Processor Status Register by setting the 3rd bit 0. To set the decimal flag, use SED. Even though the NES doesn't use decimal mode, the opcodes to clear and set the flag do work, so if you need to store a bit, this acts as a free space.
Operation
This pseudo C code shows how the CLD opcode functions when it is executed.
SET_DECIMAL((0)); // Set the 3rd bit of the processor status to 0.
Addressing Modes
Addressing Mode | Assembly Language Form | Opcode | # Bytes | # Cycles |
---|---|---|---|---|
Implied | CLD | D8 | 1 | 2 |