Created
October 4, 2014 19:08
-
-
Save c0d3inj3cT/fc5e61467dc4a65d2eb1 to your computer and use it in GitHub Desktop.
An example program to understand the Calling Convention used for 64-bit Binaries.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int sum(int, int, int, int); | |
int main(int argc, char **argv) | |
{ | |
int result = 0; | |
result = sum(1,2,3,4); | |
printf("The sum is: %d\n", result); | |
return 0; | |
} | |
int sum(int a, int b, int c, int d) | |
{ | |
int e = 0; | |
e = a + b + c + d; | |
return e; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment