EasyManua.ls Logo

Intel 8253 - Page 489

Intel 8253
773 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
4/17/98 6-89 Addressing Modes and Data Types
The following table shows the possible actions that may occur during the DA instruction, related
to the input conditions.
: The largest digit that could result from adding two BCD digits that caused the AC flag to
be set is 3. This is with an ADDC instruction where 9 + 9 + 1 (the carry flag) = 13 hex.
** : The largest digit that could result in the upper nibble of a value by adding two BCD bytes,
with no carry from the bottom nibble (the AC flag = 0) is 2. For instance, 98 hex + 97 hex = 12F
hex.
*** : The largest digit that could result in the upper nibble of a value by adding two BCD bytes,
with a carry from the bottom nibble (the AC flag = 1) is 3. For instance, 99 hex + 99 hex = 132 hex.
Table 6.6
Low nibble
(bits 3-0)
AC
Carry to
high
nibble
High
nibble
(bits 7-4)
Initial
C flag
Number
added to
value
Resulting
C flag
0 - 9 0 0 0 - 9 0 00 0
A - F 0 1 0 - 8 0 06 0
0 - 3 * 1 0 0 - 9 0 06 0
0 - 9 0 0 A - F 0 60 1
A - F 0 1 9 - F 0 66 1
0 - 3 * 1 0 A - F 0 66 1
0 - 9 0 0 0 - 2 ** 1 60 1
A - F 0 1 0 - 2 ** 1 66 1
0 - 3 * 1 0 0 - 3 *** 1 66 1

Table of Contents