Skip to content

Instantly share code, notes, and snippets.

@giuscri
Created March 16, 2015 20:55
Show Gist options
  • Save giuscri/93eb561fbef39241ae1e to your computer and use it in GitHub Desktop.
Save giuscri/93eb561fbef39241ae1e to your computer and use it in GitHub Desktop.
// Compile the whole stuff via
// nasm -f elf ada_sum.asm
// gcc -c ada.c
// gcc -o ada ada.o ada_sum.o
#include <stdio.h>
int ada_sum (int a, int b) __attribute__ ((cdecl));
int main () {
printf("%d plus %d is %d\n", 42, 24, ada_sum(42, 24));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment