Chris Styles
/
c_and_asm
Example of how to link C and Assembler functions and files
main.cpp
- Committer:
- chris
- Date:
- 2010-05-07
- Revision:
- 0:faafbceeeede
File content as of revision 0:faafbceeeede:
#include "mbed.h" extern "C" int add_asm(int a, int b); extern "C" int add_c(int c, int d); int main() { printf("Assembler: %d + %d = %d\n", 2, 3, add_asm(2,3)); printf("C : %d + %d = %d\n", 8, 7, add_c(8,7)); }