Changes

MOS 6502

92 bytes added, 01:08, 5 September 2024
/* Decimal Mode */
== Decimal Mode ==
 
BCD operations are limited to addition and subtraction using the ADC and SBC instructions.
On NMOS, when Decimal Mode is on, the ADC and SBC instructions update NF, VF and ZF based on the binary result before the decimal correction is applied. Only CF is updated correctly. On CMOS, all the flags are updated correctly, at the cost of 1 additional cycle.
13,173
edits