Contents | < Browse | Browse >
NAME
NBCD -- Negate binary coded decimal with extend
SYNOPSIS
NBCD <ea>
Size = (Byte)
FUNCTION
The specified BCD number and the extend bit are subtracted
from zero. Therefore, if the extend bit is set a nines
complement is performed, else a tens complement is performed.
The result is placed back in the specified <ea>.
It can be useful to set the zero flag before performing
this operation so that multi precision operations can
be correctly tested for zero.
FORMAT
-----------------------------------------------------------------
|15 |14 |13 |12 |11 |10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
|---|---|---|---|---|---|---|---|---|---|-----------|-----------|
| 0 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | MODE | REGISTER |
----------------------------------------=========================
<ea>
RESULT
X - Set the same as the carry bit.
N - Undefined.
Z - Cleared it the result is non-zero, unchanged otherwise.
V - Undefined.
C - Set if a borrow was generated, cleared otherwise.
SEE ALSO
NEG NEGX