35.3.7.8. UNCONDITIONAL JUMPS AND CALLS ON X86
(Call Procedure) ==================
CALL rel16 E8 cw
CALL r/m16 FF /2
CALL ptr16:16 9A cd FAR
CALL m16:16 FF /3 FAR
CALL rel32 E8 cd
CALL r/m32 FF /2
CALL ptr16:32 9A cp FAR
CALL m16:32 FF /3 FAR
NEAR:
PUSH IP
if (rel)
IP <- IP + sign_extend(rel)
else
IP <- src
Note: Far additionally push CS, then load CS.
(Jump) =============================
JMP rel8 EB cb
JMP rel16 E9 cw
JMP r/m16 FF /4
JMP ptr16:16 EA cd FAR
JMP m16:16 FF /5 FAR
JMP rel32 E9 cd
JMP r/m32 FF /4
JMP ptr16:32 EA cp FAR
JMP m16:32 FF /5 FAR
NEAR:
if (rel)
IP <- IP + sign_extend(rel)
else
IP <- src
(Return) =============================
RET C3
RET CB FAR
RET imm16 C2 iw
RET imm16 CA iw FAR
POP IP
SP <- SP + imm16 // if imm16 present
Note: FAR also load CS
(Make Stack Frame for Procedure Parameters) =======
ENTER imm16,imm8 C8 iw ib
Note: we not interestion of level of ENTER <> 0
PUSH (E)BP | repeat imm8 times
MOV E(BP),SP | (INCORRECT)
SUB E(SP),imm16
(High Level Procedure Exit) =============
LEAVE C9
(E)SP <- (E)BP
POP (E)BP
Index Prev Next