Wednesday, March 2, 2016

8051 POP Instruction

POP from Stack

InstructionPOP direct
FunctionPop from stack
Bytes2
Cycles1
Encoding1 1 0 1 0 0 0 0 A7...A0
Operation(direct) = (SP)
SP = SP - 1
DescriptionThe contents of the internal RAM location addressed by the Stack Pointer is read, and the Stack Pointer is decremented by one. The value read is then transferred to the directly addressed byte indicated. No flags are affected.
Flags AffectedC AC F0 RS1 RS0 OV P
ExampleThe Stack Pointer originally contains the value 32H, and internal RAM locations 30H through 32H contain the values 20H, 23H, and 01H, respectively. The following instruction sequence,
POP DPH
POP DPL
leaves the Stack Pointer equal to the value 30H and sets the Data Pointer to 0123H. At this point, the following instruction,
POP SP
leaves the Stack Pointer set to 20H. In this special case, the Stack Pointer was decremented to 2FH before being loaded with the value popped (20H).
POP 34h
Bytes: Number of bytes required to encode the instruction.
Cycles: Number of instruction cycles required to execute the instruction. Note that there are 12 oscillator cycles to one instruction cycle on a standard 8051.
Encoding: Lists the byte encoding for the instruction.
Operation: Lists, step-by-step, the operations performed by the instruction.
Flags Affected: are highlighted in Bold



Related topics:
8051 Data Transfer Instructions   |   8051 MOV Instruction   |   8051 MOVC Instruction   |   8051 MOVX Instruction   |   8051 PUSH Instruction   |   8051 XCH Instruction   |   8051 XCHD Instruction

List of topics: 8051

No comments:

Post a Comment