2-19
MSM66573 Family User's Manual
Chapter 2 CPU Architecture
2
Bit 13: Half carry flag (HC)
The half carry flag is set to "1" if a carry or borrow from bit 3 occurs as a result of executing
an arithmetic or comparison instruction (either a byte and word instruction). Otherwise,
it is reset to "0".
Bit 12: Data descriptor (DD)
This flag indicates the attributes of data stored in ACC.
When DD is "1", the 16 bits of data in ACC are determined to be valid.
When DD is "0", the lower 8 bits of data in ACC are determined to be valid.
Instructions that reference DD when performing arithmetic or data transfer instructions with
ACC are executed as follows.
When DD is "1", the arithmetic or transfer operation is performed in word units.
When DD is "0", the arithmetic or transfer operation is performed in byte units.
DD is set to "1" or reset to "0" when a data transfer instruction to ACC is executed and when
dedicated set and reset instructions are executed.
DD is set to "1" when executing a word-type load instruction to ACC and when executing
a SDD instruction.
DD is reset to "0" when executing a byte-type load instruction to ACC and when
executing a RDD instruction.
If DD is modified (set or reset) while executing a load instruction to ACC or a dedicated set
or reset instruction, and if the next instruction references DD, the modified DD will be
referenced.
Since DD is assigned to PSW, DD can be overwritten by instructions other than those
mentioned above. In this case, if the next instruction references DD, it will reference the
state of DD prior to modification. If DD is to be used in this manner, insert a NOP instruction
after the instruction that directly modifies the state of DD.
Bit 11: Sign flag (S)
The sign flag is set to "1" if the MSB of the result of executing an arithmetic or logic
instruction is "1". If the MSB of the result is "0", the sign flag is reset to "0".
Bit 10: User flag 2 (F2)
Bit 6: User flag 1 (F1)
Bit 3: User flag 0 (F0)
These flags can be set to "1" or reset to "0" by instructions.
Bit 9: Overflow flag (OV)
The overflow flag is set to "1" if the result of executing an arithmetic instruction exceeds
a range expressed in 2’s compliment format (–128 to +127 for byte operations and
–32,768 to +32,767 for word operations).
Otherwise the overflow flag is reset to "0".