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

HMS9XC8032 Просмотр технического описания (PDF) - Hynix Semiconductor

Номер в каталоге
Компоненты Описание
производитель
HMS9XC8032 Datasheet PDF : 157 Pages
First Prev 11 12 13 14 15 16 17 18 19 20 Next Last
HMS91C8032/97C8032
Oddly enough, DIV AB finds less use in arithmetic "divide" rou-
tines than in radix conversions and programmable shift opera-
tions. An example of the use of DIV AB in a radix conversion will
be given later. In shift operations, dividing a number by 2n shifts
its n bits to the right. Using DIV AB to perform the division com-
pletes the shift in 4µs and leaves the B register holding the bits
that were shifted out. The DA A instruction is for BCD arithmetic
operations. In BCD arithmetic, ADD and ADDC instructions
should always be followed by a DA A operation, to ensure that
the result is also in BCD. Note that DA A will not convert a bina-
ry number to BCD. The DA A operation produces a meaningful
result only as the second step in the addition of two BCD bytes.
3.4 Logical Instructions
Table 3-2 shows list of HMS9XC8032 logical instructions. The
instructions that perform Boolean operations (AND, OR, Exclu-
sive OR, NOT) on bytes perform the operation on a bit-by-bit ba-
sis. 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> op-
erand are listed in Table 3-2.
The ANL A, <byte> instruction may take any of the forms:
ANL
ANL
ANL
ANL
A,7FH(direct addressing)
A, @R1 (indirect addressing)
A,R6 (register addressing)
A,#53H (immediate constant)
Note that Boolean operations can be performed on any byte in the
internal Data Memory space without going through the Accumu-
lator. 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 Accu-
mulator 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 Accumula-
tor 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 ma-
nipulations. For example, if the Accumulator contains a binary
number which is known to be less than 100, it can be quickly con-
verted to BCD by the following code:
MNEMONIC
ANL A,<byte>
ANL <byte>,A
ANL <byte>,#data
ORL A,<byte>
ORL <byte>,A
ORL <byte>,#data
XRL A,<byte>
XRL <byte>,A
XRL <byte>,#data
CRL A
CPL A
RL A
RLC A
RR A
RRC A
SWAP A
OPERATION
A = A .AND. <byte>
<byte> = <byte> .AND. A
<byte> = <byte> .AND. #data
A = A .OR. <byte>
<byte> = <byte> .OR. A
<byte> = <byte> .OR. #data
A = A .XOR. <byte>
<byte> = <byte> .XOR. A
<byte> = <byte> .XOR. #data
A = 00H
A = .NOT. A
Rotate ACC Left 1 bit
Rotate Left through Carry
Rotate ACC Right 1 bit
Rotate Right through Carry
Swap Nibbles in A
ADDRESSING MODES
Dir
Ind
Reg
Imm
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
X
Accumulator only
Accumulator only
Accumulator only
Accumulator only
Accumulator only
Accumulator only
Accumulator only
Table 3-2 HMS9XC8032 Logical Instructions
10
NOV., 2001 Ver 1.02

Share Link: 

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