- -. , - . , , , . , . , , . ret , , .. ret <>. , .

. ( ), , , .

1. z=x+y c=a+b; f=d+e.

; z=x+y c=a+b; f=d+e

IDEAL

P586

MODEL FLAT

EXTRN ExitProcess:proc

DATASEG

a DD 5

b DD 3

c DD ?

d DD 4

e DD -5

f DD ?

CODESEG

begin:

push [a] ; a, b

push [b]

lea eax, c ; & c

push eax ;

call summa ;

push [d] ; d, e

push [e]

lea eax, [f] ; & f

push eax

call summa ;

call ExitProcess

proc summa

0

EBP

push ebp

4

EIP

mov ebp, esp

8

&c

Push eax ebx

12

B

mov eax, [ebp+16] ; a

16

A

Add eax, [ebp+12] ; a+b

mov ebx, [ebp+8] ; &c

mov [ebx], eax ; c=a+b

Pop ebx eax ebp

Ret 12

Endp summa

End begin

( ). c = a + b. , , . . , , , ! !



    





Forekc.ru
, , , , , , , , , ,