Importing Assembler code into a C application

Here you find an example of implementing assembler code into a C application that you can build with your Visual C++ compiler... When you put 'Inline Assembler' in the magic google box you get more information about this topic. I have only tested this on Visual Studio 2005, not on GCC or other compilers, you can best check your compiler for how to implement assembler code into your C program.

Have fun...


#include <stdio.h>
main() {
    int arg1=3;
     int arg2=4;
     int Result;
MOV arg1,202
MOV arg2,125
MOV EAX,arg1
MOV EBX,arg2
MOV Result,EAX

18:42 Gepost door Mobile blogger in Algemeen | Permalink | Commentaren (0) | Tags: assembler, ansi, c, inline, gcc, visual studio 2005, download, example |  Facebook |

De commentaren zijn gesloten.