EasyManua.ls Logo

Intel MCS 51 - Page 90

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~e MCS”-51 PROGRAMMER’SGUIDE AND INSTRUCTION SET
MUL AB
Deeoriptiors:
Example
Bytes:
Cycles:
Encoding:
Operation:
NOP
Multiply
MUL AB multipliesthe unsignedeight-bit integersitsthe Accumulatorand registerB. The
Iow-orderbyteofthe sixteen-bitproduct is left in the Accumulator,and the high-orderbytein
B. If the product is greater than 255(OPPH)the ovcrtlowflag is set; otherwiseit is cleared.
The carry fiagis alwayscleared.
Originallythe Accumulatorholdsthe value80(50H).RegisterB holdsthe value160(OAOH).
The instruction,
MuLAB
willgivethe product 12,S00(3200H),soB is changedto 32H(OO11OO1OB)andtheAccumula-
tor is cleared.The overflowflagis set, carry is cleared.
1
4
I 101 OIO1OOI
MUL
(A)74 + (A) X (B)
(B)15-8
Function:
Description:
Example:
Bytes
Cycles:
Encoding:
Operation:
No Operation
Executioncontinuesat the followinginstruction.Other than the PC, no registersor flagsare
affected.
It is desiredto producea low-goingouQut pulseonbit 7of Port 2 lastingexactly5cycles.A
simpleSETB/CLRsequencewouldgeneratea one-cyclepulse,so four additionalcyclesmust
be inserted. This may be done (ssauming no interrupts are enabled) with the instruction
SeqUenee,
CLR P2.7
NOP
NOP
NOP
NOP
SETB P2.7
1
1
000010000
NOP
(PC)+ (-PC)+ 1
2-00

Table of Contents

Related product manuals