i~.
M~eI-51 programmers GUIDE AND INSTRUCTION SET
POP direot
mrsctiom
Example:
Bytea:
Cycla$s
Encoding:
Operation:
PUSH direct
Popfrom stack.
The contentsof the internal RAM locationaddressedby the Stack Pointer is read, and the
Stack Pointer is decrementedby one. The valueread is then transferred to the directly ad-
dressedbyte indicated.No flagsare affected.
The Stack Pointer originally contains the value 32H, and internal RAM locations 30H
through32Hcontainthe values20H, 23H,and OIH,respectively.The instructionsequen~
POP DPH
POP DPL
willleavethe StsckPointer equalto the value30Hand the Data Pointersetto 0123H.At this
pointthe instruction,
POP SP
willleavethe Stick Pointer set to 20H. Note that in this special case the StackPointer was
*remented to 2FH beforebeingloadedwiththe valuepopped
(20H).
2
2
I
1101 0000
directaddress
POP
(direct)+ ((sP))
(SP)4-(SP) – 1
Function:
Description:
Bytes:
Cycletx
Enooding:
Operation:
push ontostack
TheStackPointeris incrementedbyone.Thecontentsofthe indicatedvariableis then copied
into the internalRAM locationaddressedbythe StackPointer.Otherwisenoflagsare affect-
ed.
On entaing an interrupt routinethe StackPointercontains09H.The Data Pointer holds the
valueO123H.The instructionsequence,
PUSH DPL
PUSH DPH
willleavethe StackPointer set to OBHand store 23H and OIH in internal FL4Mlocations
OAHand OBH,respectively.
2
2
1100
0000
I
directaddreaa
PUSH
(SP)+ (SP) + 1
((SP))- (direct)
2-04