EasyManua.ls Logo

Intel MCS 51

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~. M=”-51 programmers GUIDEAND INSTRUCTION SET
LCALL addr16
Function:
Description:
Example:
Bytes:
Cycles:
Encoding:
Operation:
UMP addr16
Longcall
LCALLcallsa subroutineIooatedat the indicatedaddress.The instructionadds three to the
programcounter to generate the addressof the next instruction and then pushesthe Id-bit
result ontothe stack (lowbyte first), incrementingthe Stack Pointerby two. The high-order
andlow-orderbytesofthe PCare thenloaded,respectively,withthe secondandthird bytesof
the LCALLinstruction.Programexeoutionrxmtinueswith the instructionat this address.The
subroutinemaythereforebeginanywhereinthe full 64K-byteprogrammemoryaddressspace.
No ilags are affeeted.
Initiallythe StackPointerequals07H.The label“SUBRTN”is assignedto programmemory
location 1234H.After exeoutingthe instruction,
LCALL SUBRTN
at location0123H,the StackPointerwillcontain09H, internal IL4MIccations08Hand 09H
willcontain26Hand OIH,and the PC willcontain 1234H.
3
2
0001 0010
I addr’’-add’ I EEEiEl
LCALL
(PC) + (PC) + 3
(SP)+ (SP) + 1
((sP)) - (PC74)
(SP)- (SP) + 1
((sP)) - (PC15.8)
(PC)~ addr15~
Function:
Description:
Example:
Cycles:
Enooding:
operation:
Long Jump
LJMPcausesan unconditionalbranchto the indiestedaddress,byloadingthe high-orderand
low-orderbytes of the PC (respectively)with the second and third instruction bytes. The
destinationmay thereforebe anywherein the full 64K program memoryaddress sparx. No
flagsare affected.
Thelabel“JMPADR” is assignedto the instructionat programmemorylocation1234H.The
instruction
LJMP JMPADR
at location0123Hwillload the programcounterwith 1234H.
2-51

Table of Contents

Related product manuals