Push onto Stack
Instruction | PUSH direct |
---|---|
Function | Push onto Stack |
Bytes | 2 |
Cycles | 1 |
Encoding | 1 0 0 0 0 0 0 0 A7...A0 |
Operation | SP = SP + 1 (SP) = (direct) |
Description | The 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 Affected | C AC F0 RS1 RS0 OV P |
Example | On 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