وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

وو

وحید آنلاین . آرشیو وبلاگ وحیدمی دات آی آر . شرکت بیان. vahidmy.blog.ir

PUSH

PUSH 

Usage:  PUSH    src                                    Modifies flags: None

Decrements ESP by the size of the operand (two or four, byte values are sign extended) and transfers the source value to the stack top.

Push Data on Stack


PUSH reg16                    ; o16 50+r             [8086]

PUSH reg32                    ; o32 50+r             [386]


PUSH r/m16                    ; o16 FF /6            [8086]

PUSH r/m32                    ; o32 FF /6            [386]


PUSH CS                       ; 0E                   [8086]

PUSH DS                       ; 1E                   [8086]

PUSH ES                       ; 06                   [8086]

PUSH SS                       ; 16                   [8086]

PUSH FS                       ; 0F A0                [386]

PUSH GS                       ; 0F A8                [386]


PUSH imm8                     ; 6A ib                [186]

PUSH imm16                    ; o16 68 iw            [186]

PUSH imm32                    ; o32 68 id            [386]


PUSH decrements the stack pointer (ESP) by 2 or 4, and then stores the given value at ESP.


The above opcode listings give two forms for general-purpose push instructions: for example, PUSH BX has the two forms  and FF F3. RosAsm will always generate the shorter form when given PUSH BX.


Unlike the undocumented and barely supported POP CS, PUSH CS  is a perfectly valid and sensible instruction, supported on all processors.


The instruction PUSH SP may be used to distinguish an 8086 from later processors: on an 8086, the value of SP stored is the value it has  the push instruction, whereas on later processors it is the value  the push instruction.


Example:

mov eax 15

push eax

pop ebx ; ebx = 15