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
Architecture overview
UPSD3212A, UPSD3212C, UPSD3212CV
2.10
Note:
Logical instructions
Table 5 lists logical instructions for UPSD321xx devices. The instructions that perform
Boolean operations (AND, OR, Exclusive OR, NOT) on bytes perform the operation on a bit-
by-bit basis. That is, if the Accumulator contains 00110101B and byte contains 01010011B,
then:
ANL A, <byte>
will leave the Accumulator holding 00010001B.
The addressing modes that can be used to access the <byte> operand are listed in Table 5.
The ANL A, <byte> instruction may take any of the forms:
ANL A,7FH(direct addressing)
ANL A, @R1 (indirect addressing)
ANL A,R6 (register addressing)
ANL A,#53H (immediate constant)
Boolean operations can be performed on any byte in the internal Data Memory space
without going through the Accumulator. The XRL <byte>, #data instruction, for example,
offers a quick and easy way to invert port bits, as in:
XRL P1, #0FFH.
If the operation is in response to an interrupt, not using the Accumulator saves the time and
effort to push it onto the stack in the service routine.
The Rotate instructions (RL A, RLC A, etc.) shift the Accumulator 1 bit to the left or right. For
a left rotation, the MSB rolls into the LSB position. For a right rotation, the LSB rolls into the
MSB position.
The SWAP A instruction interchanges the high and low nibbles within the Accumulator. This
is a useful operation in BCD manipulations. For example, if the Accumulator contains a
binary number which is known to be less than 100, it can be quickly converted to BCD by
the following code:
MOVE B,#10
DIV AB
SWAP A
ADD A,B
Dividing the number by 10 leaves the tens digit in the low nibble of the Accumulator, and the
ones digit in the B register. The SWAP and ADD instructions move the tens digit to the high
nibble of the Accumulator, and the ones digit to the low nibble.
Table 5. Logical instructions
Mnemonic
Operation
ANL A,<byte>
ANL <byte>,A
ANL <byte>,#data
ORL A,<byte>
A = A .AND. <byte>
A = <byte> .AND. A
A = <byte> .AND. #data
A = A .OR. <byte>
Addressing modes
Dir.
Ind.
Reg.
Imm.
X
X
X
X
X
X
X
X
X
X
24/181

Share Link: 

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