DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

UPSD3212A(2009) Просмотр технического описания (PDF) - STMicroelectronics

Номер в каталоге
Компоненты Описание
производитель
UPSD3212A Datasheet PDF : 181 Pages
First Prev 21 22 23 24 25 26 27 28 29 30 Next Last
UPSD3212A, UPSD3212C, UPSD3212CV
Architecture overview
2.9
Note:
Note:
Arithmetic instructions
The arithmetic instructions is listed in Table 4. The table indicates the addressing modes
that can be used with each instruction to access the <byte> operand. For example, the ADD
A, <byte> instruction can be written as:
ADD a, 7FH (direct addressing)
ADD A, @R0 (indirect addressing)
ADD a, R7 (register addressing)
ADD A, #127 (immediate constant)
Any byte in the internal Data Memory space can be incremented without going through the
Accumulator.
One of the INC instructions operates on the 16-bit Data Pointer. The Data Pointer is used to
generate 16-bit addresses for external memory, so being able to increment it in one 16-bit
operation is a useful feature.
The MUL AB instruction multiplies the Accumulator by the data in the B register and puts the
16-bit product into the concatenated B and Accumulator registers.
The DIV AB instruction divides the Accumulator by the data in the B register and leaves the
8-bit quotient in the Accumulator, and the 8-bit remainder in the B register.
In shift operations, dividing a number by 2n shifts its “n” bits to the right. Using DIV AB to
perform the division completes the shift in 4?s and leaves the B register holding the bits that
were shifted out. The DAA instruction is for BCD arithmetic operations. In BCD arithmetic,
ADD and ADDC instructions should always be followed by a DAA operation, to ensure that
the result is also in BCD.
DAA will not convert a binary number to BCD. The DAA operation produces a meaningful
result only as the second step in the addition of two BCD bytes.
Table 4. Arithmetic instructions
Mnemonic
Operation
ADD A,<byte>
ADDC A,<byte>
SUBB A,<byte>
INC
INC <byte>
INC DPTR
DEC
DEC <byte>
MUL AB
DIV AB
DA A
A = A + <byte>
A = A + <byte> + C
A = A – <byte> – C
A=A+1
<byte> = <byte> + 1
DPTR = DPTR + 1
A=A–1
<byte> = <byte> – 1
B:A = B x A
A = Int[ A / B ]
B = Mod[ A / B ]
Decimal Adjust
Addressing modes
Dir.
Ind.
Reg.
Imm.
X
X
X
X
X
X
X
X
X
X
X
X
Accumulator only
X
X
X
Data Pointer only
Accumulator only
X
X
X
Accumulator and B only
Accumulator and B only
Accumulator only
23/181

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]