INCLUDE Irvine32.inc 00000000 .code 00000000 main PROC 00000000 B3 0A mov bl, 10 00000002 B1 14 mov cl, 20 00000004 B2 1E mov dl, 30 00000006 E8 0000000F call SumOf 0000000B 0F B6 C3 movzx eax, bl 0000000E E8 00000000 E call WriteDec exit 0000001A main ENDP 0000001A SumOf PROC 0000001A 02 D9 add bl, cl 0000001C 02 DA add bl, dl 0000001E C3 ret 0000001F SumOf ENDP END main |
CALL
Instruction
EIP
.CALL SumOf
instruction executes, the address following the call (0000000B) is pushed on the runtime stack and the address of SumOf
(0000001A) is loaded into EIP
.
Irvine32
library, you should always push 32-bit values; otherwise, the Win32 Console
functions used by this library will not work correctly.
RET
Instruction
EIP
. All the instructions in SumOf
execute up to its RET
instruction. When the RET
instruction executes, the value (0000000B) in the stack pointed by ESP
is popped into EIP
.