EasyManua.ls Logo

Intel MCS 51 - Page 71

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...
in~.
MCS”-51 PROGRAMMER’SGUIDEAND INSTRUCTION SET
DEC byte
Function: Decrement
Description:
The
variableindicatedis decrementedby 1.An originalvalueofOOHwillunderilowto OFFH.
No flags are affected. Four operandaddressingmodes are allowed:accumulator,register,
&r@ or register-indirect.
Note: When this instruction is usedto modifyan output port, the value usedas the original
port data willbe read from the outputdata latch, not the input pins.
Exampte:
Register Ocontains7FH (0111111IB). Internal RAM locations7EH and 7FH contain OOH
and 40H, respectively.The instructionsequence
DEC @RO
DEC RO
DEC @RO
willleaveregisterOset to 7EH and internalRAM locations7EHand 7FH set to OFFHand
3FI-I.
DEC A
Bytes: 1
Cyclx 1
Encoding: 0001 0100
Operation:
DEC
(A) - (A) 1
DEC Rn
Bytes: 1
cycles: 1
Encoding: 0001
lrrr
Operation:
DEC
(Rn) + @l) 1
241

Table of Contents

Related product manuals