Assembly language --call instruction

     The call instruction is often used in conjunction with the ret instruction, so the CPU executes the call instruction to perform two steps:

          Push the current IP or CS and IP onto the stack;

          Transfer (jmp).

    The call instruction cannot realize the short transfer. In addition, the method of the call instruction to realize the transfer is the same as the jmp instruction.

    call label (near transfer)

        When the CPU executes the call instruction of this format, it is equivalent to push IP jmp near ptr label

        call far ptr label (transfer between segments)

        When the CPU executes the call instruction of this format, it is equivalent to: push CS, push IP jmp far ptr label

    call 16-bit register

        When the CPU executes the call instruction of this format, it is equivalent to: push IP jmp 16-bit register

        call word ptr memory unit address

        When the CPU executes the call instruction of this format, it is equivalent to: push IP jmp word ptr memory unit address

 

Reference: <<Assembly Language>> Wang Shuang

Guess you like

Origin blog.csdn.net/ma2595162349/article/details/108543475