Wednesday, March 2, 2016

8051 PUSH Instruction

Push onto Stack

InstructionPUSH direct
FunctionPush onto Stack
Bytes2
Cycles1
Encoding1 0 0 0 0 0 0 0 A7...A0
OperationSP = SP + 1
(SP) = (direct)
DescriptionThe Stack Pointer is incremented by one. The contents of the indicated variable is then copied into the internal RAM location addressed by the Stack Pointer. Otherwise no flags are affected.
Flags AffectedC AC F0 RS1 RS0 OV P
ExampleOn entering an interrupt routine, the Stack Pointer contains 09H. The Data Pointer holds the value 0123H. The following instruction sequence,
PUSH DPL
PUSH DPH
leaves the Stack Pointer set to 0BH and stores 23H and 01H in internal RAM locations 0AH and 0BH, respectively.
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 POP Instruction   |   8051 XCH Instruction   |   8051 XCHD Instruction

List of topics: 8051

No comments:

Post a Comment