顺便留个作业
call $+5
pop ebx
sub ebx,$-1
这个 对吗? 自己想想啦
扩展阅读 Intel(R) 64 and IA-32 Architectures Software Developer’s Manual 有兴趣找来看看 看看call的机器码
CALL—Call Procedure
Opcode
Instruction
64-Bit
Compat/
Description
Mode
Leg Mode
E8 cw
CALL rel16
N.S.
Valid
Call near, relative, displacement
relative to next instruction.
E8 cd
CALL rel32
Valid
Valid
Call near, relative, displacement
relative to next instruction. 32-bit
displacement sign extended to 64-bits
in 64-bit mode.
FF /2
CALL r/m16
N.E.
Valid
Call near, absolute indirect, address
given in r/m16.
FF /2
CALL r/m32
N.E.
Valid
Call near, absolute indirect, address
given in r/m32.
FF /2
CALL r/m64
Valid
N.E.
Call near, absolute indirect, address
given in r/m64.
9A cd
CALL
Invalid
Valid
Call far, absolute, address given in
ptr16:16
operand.
9A cp
CALL
Invalid
Valid
Call far, absolute, address given in
ptr16:32
operand.
FF /3
CALL m16:16
Valid
Valid
Call far, absolute indirect address given
in m16:16.
In 32-bit mode: if selector points to a
gate, then RIP = 32-bit zero extended
displacement taken from gate; else RIP
= zero extended 16-bit offset from far
pointer referenced in the instruction.
FF /3
CALL m16:32
Valid
Valid
In 64-bit mode: If selector points to a
gate, then RIP = 64-bit displacement
taken from gate; else RIP = zero
extended 32-bit offset from far
pointer referenced in the instruction.
REX.W + FF /3
CALL m16:64
Valid
N.E.
In 64-bit mode: If selector points to a
gate, then RIP = 64-bit displacement
taken from gate; else RIP = 64-bit
offset from far pointer referenced in
the instruction.
呵呵 解答完毕