TSC80251 TEMIC [TEMIC Semiconductors], TSC80251 Datasheet - Page 111

no-image

TSC80251

Manufacturer Part Number
TSC80251
Description
Manufacturer
TEMIC [TEMIC Semiconductors]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
TSC80251G1D-16CB
Manufacturer:
TEXAS
Quantity:
769
Part Number:
TSC80251G1D-16CB
Manufacturer:
TEMIC
Quantity:
20 000
Part Number:
TSC80251G1D-16CB-E
Manufacturer:
TEMIC
Quantity:
20 000
Part Number:
TSC80251G1D-16I
Quantity:
16
Part Number:
TSC80251G1D-24CB
Manufacturer:
TEMIC
Quantity:
999
Part Number:
TSC80251G2D-16CB
Manufacturer:
TEMIC
Quantity:
1 715
Part Number:
TSC80251G2D-16CB
Manufacturer:
TEMIC
Quantity:
3 244
Part Number:
TSC80251G2D-16CB
Manufacturer:
ATMEL
Quantity:
3 442
Part Number:
TSC80251G2D-16CB
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
TSC80251G2D-16CBR
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
TSC80251G2D-24CB
Manufacturer:
ATMEL
Quantity:
3 443
Part Number:
TSC80251G2D-24CB
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
TSC80251G2D-24CB
Manufacturer:
TEMIC
Quantity:
20 000
TSC80251
DA A
Function:
Decimal–adjust accumulator for addition
Description:
Adjusts the 8–bit value in the accumulator that resulted from the earlier addition of two variables (each in packed–BCD
format), producing two 4–bit digits. Any ADD or ADDC instruction may have been used to perform the addition.
If accumulator bits 3:0 are greater than nine (XXXX1010-XXXX1111), or if the AC flag is set, six is added to the
accumulator, producing the proper BCD digit in the low nibble. This internal addition sets the CY flag if a carry out
of the lowest 4 bits propagated through all higher bits, but it does not clear the CY flag otherwise.
If the CY flag is now set or if the upper four bits now exceed nine (1010XXXX-1111XXXX), these four bits are
incremented by six, producing the proper BCD digit in the high nibble. Again, this sets the CY flag if there was a carry
out of the upper four bits, but does not clear the carry. The CY flag thus indicates if the sum of the original two BCD
variables is greater than 100, allowing multiple–precision decimal addition. The OV flag is not affected.
All of this occurs during one instruction cycle. Essentially, this instruction performs the decimal conversion by adding
00h, 06h, 60h or 66h to the accumulator, depending on initial accumulator and PSW conditions.
Note :
DA A cannot simply convert a Hexadecimal number in the accumulator to BCD notation, nor does DA A apply to decimal subtraction.
Example :
The accumulator contains 56h (01010110B), which represents the packed BCD digits of the decimal number 56.
Register 3 contains 67h (01100111B), which represents the packed BCD digits of the decimal number 67. The CY flag
is set. After executing the instruction sequence ADDC A,R3.
DA A the accumulator contains 0BEh (10111110B) and the CY and AC flags are clear. The Decimal Adjust instruction
then alters the accumulator to the value 24h (00100100B), indicating the packed BCD digits of the decimal number
24, the lower two digits of the decimal sum of 56, 67, and the carry–in. The CY flag is set by the Decimal Adjust
instruction, indicating that a decimal overflow occurred. The true sum of 56, 67 and 1 is 124. BCD variables can be
incremented or decremented by adding 01h or 99h. If the accumulator contains 30h (representing the digits of 30
decimal), then the instruction sequence:
leaves the CY flag set and 29h in the accumulator, since 30 + 99 = 129. The low byte of the sum can be interpreted
to mean 30 - 1 = 29.
[Encoding]
5.66
FLAGS :
1101
ADD A, #99h.
DA A
CY
0100
AC
_
OV
_
N
3
Rev. C – May 7, 1999
Z
3

Related parts for TSC80251