EasyManua.ls Logo

Intel MCS 51 - Page 72

Intel MCS 51
334 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
i~. MCS@-51PROGRAMMER’SGUIDE AND INSTRUCTIONSET
DEC direct
Bytes:
Cycles:
Encoding:
Operation:
DEC @Ri
Bytes:
Cycles:
Encoding:
Operation:
DIV AB
2
1
0001 0101
I
directaddress
DEC
(direct)- (direct) 1
1
1
10001 I Ollil
DEC
(w)) -((N)) I
Function:
Divide
Description:
DIV AB divideathe unsignedeight-bitintegerin the Accumulatorby the unsignedeight-bit
integer in register B. The Accumulatorreceivesthe integerpart of the quotient;register B
receivesthe integerremainder.The carry snd OVtlagswillbe cleared.
Exception: ifB had originallycontainedOOH,the valuesreturned in the Accumulatorand B-
register willbe undefinedand the overflowflag willbe set. The carry tlag is cleared in any
case.
Example: The Accumulatorcontains251(OFBHor 11111011B)andBcontains 18(12Hor OOO1OO1OB).
The instruction,
DIV AB
willleave 13in the Accumulator(ODHor OOOO11O1B)and the value 17(lIH or OOO1OOO1B)
in B, since251 = (13X 18) + 17.Carry and OVwillboth be cleared.
Bytes: 1
Cycles: 4
Enooding:
I
1000 0100
Operation:
DIV
(A)15.8
~)74 - (A)/@t)
2-42

Table of Contents

Related product manuals