If you want to use Assembler inside C code I would suggest to use "asm volatile" like this. I use a bit asm code in sparrow3d to fill a big memory chunk with the same int using stmia on arm devices. The first parameter is the string containing your asm code. The second parameter are output variables, which are mapped to registers and the third parameter input variables, which are used to init registers. The last parameter tells gcc, which registers you will touch in your code (so which should not be used anymore). The output and input registers are accesable via %0, %1, %2 usw. Read more here.