English
Language : 

HT47C20L Datasheet, PDF (42/55 Pages) Holtek Semiconductor Inc – 8-Bit Microcontroller
CPLA [m]
Description
Operation
Affected flag(s)
DAA [m]
Description
Operation
Affected flag(s)
DEC [m]
Description
Operation
Affected flag(s)
HT47C20L
Complement data memory-place result in accumulator
Each bit of the specified data memory is logically complemented (1 s
complement). Bits which previously contained a one are changed to zero
and vice-versa. The complemented result is stored in the accumulator
and the contents of the data memory remains unchanged.
ACC ¬ [m]
TC2 TC1 TO PD OV Z AC C
¾ ¾¾¾¾ Ö ¾¾
Decimal-Adjust accumulator for addition
The accumulator value is adjusted to the BCD (Binary Code Decimal)
code. The accumulator is divided into two nibbles. Each nibble is ad-
justed to the BCD code and an internal carry (AC1) will be done if the low
nibble of the accumulator is greater than 9. The BCD adjustment is done
by adding 6 to the original value if the original value is greater than 9 or
a carry (AC or C) is set; otherwise the original value remains unchanged.
The result is stored in the data memory and only the carry flag (C) may
be affected.
If (ACC.3~ACC.0) >9 or AC=1
then ([m].3~[m].0) ¬ (ACC.3~ACC.0)+6, AC1=AC
else ([m].3~[m].0) ¬ (ACC.3~ACC.0), AC1=0
If (ACC.7~ACC.4)+AC1 >9 or C=1
then ([m].7~[m].4) ¬ (ACC.7~ACC.4)+6+AC1, C=1
else ([m].7~[m].4) ¬ (ACC.7~ACC.4)+AC1, C=C
TC2 TC1 TO PD OV Z AC C
¾ ¾¾¾¾¾¾ Ö
Decrement data memory
Data in the specified data memory is decremented by one.
[m] ¬ [m]-1
TC2 TC1 TO PD OV Z AC C
¾ ¾¾¾¾ Ö ¾¾
42
January 18, 2000