Specifications
151
3706C–MICRO–2/11
AT89LP3240/6440
22.1.9 MAC AB
Function: Multiply and Accumulate
Description: MAC AB multiplies the signed 16-bit integers in the register pairs {AX, A} and {BX, B} and adds the 32-bit product
to the 40-bit M register. The low-order bytes of the 16-bit operands are stored in A and B, and the high-order
bytes in AX and BX respectively. The four operand registers are unaffected by the operation. If the addition of the
product to the accumu
lated sum in M results in a two's complement overflow, the overflow flag is set; otherwise it
is not cleared. The carry flag is set if the result is negative and cleared if positive.
Example: Originally the Accumulator holds the value 80 (50H). Register B holds the value 160 (0A0H). The instruction,
MAC AB
will give the product 12, 800 (3200H), so B is changed to 32H (00110010B) and the Accumulator is cleared. The
overflow fla
g is set, carry is cleared.
Bytes: 2
Cycles: 9
Encoding: A5 10100100
Operation: MAC
(M
39-0
) ← (M) + { (AX), (A) } X { (BX), (B) }
22.1.10 MOV /DPTR, #data16
Function: Load Alternate Data Pointer with a 16-bit constant
Description: MOV /DPTR, #data16 loads the unselected Data Pointer with the 16-bit constant indicated. The third byte is the
high-order byte, while the fourth byte holds the lower-order byte. No flags are affected.
Example: When DPS = 0, the instruction sequence,
MOV DPTR, # 1234H
MOV /DPTR, # 5678H
loads the value 1234H into the first Data Pointer: DPH0 holds 12H a
nd DPL0 holds 34H; and loads the value
5678H into the second Data Pointer: DPH1 hold 56H and DPL1 holds 78H.
Bytes: 2
Cycles: 3
Encoding: A5 90 immed. data 15-8 immed. data 7-0
Operation: MOV
IF (DPS) = 0
THEN
(DP1H) ← #data
15-8
(DP1L) ← #data
7-0
ELSE
(DP0H) ← #data
15-8
(DP0L) ← #data
7-0