Chris Styles / Mbed 2 deprecated c_and_asm

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "mbed.h"
00002 
00003 extern "C" int add_asm(int a, int b);
00004 extern "C" int add_c(int c, int d);
00005 
00006 int main() {
00007     printf("Assembler: %d + %d = %d\n", 2, 3, add_asm(2,3));
00008     printf("C        : %d + %d = %d\n", 8, 7, add_c(8,7));
00009 }