Question: What is Memory Addressing and Function Calls?section . text global _ start ; Function 1 : DemoFastCall DemoFastCall: ; EAX = ( EAX + EBX
What is Memory Addressing and Function Calls?section text
global start
; Function : DemoFastCall
DemoFastCall:
; EAX EAX EBXECX EDX
add eax, ebx
add ecx, edx
sub eax, ecx
ret
; Function : DemoCdecl
DemoCdecl:
; A A BC D E
push eax
push ebx
push ecx
push edx
push esi ; E is stored in ESI
pop eax ; ESI EAX
add eax, ebx
add ecx, edx
sub eax, ecx
imul eax, esi
add esp, ; Clean up the stack
ret
; Function : DemoStdCall
DemoStdCall:
; A A BC D E
push eax
push ebx
push ecx
push edx
push esi ; E is stored in ESI
pop eax ; ESI EAX
add eax, ebx
add ecx, edx
sub eax, ecx
imul eax, esi
ret
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
