2008-05-03 06:55:33 asm code in c function - dummy
Hadi Boulfelfel (FRANCE)
Message: 55413
Hi,
sorry may be a stupid question and this is not the place to ask it, but I don't know how to do that.
i want to know how to incorporate asm code in c function and use the content of the c variables in the asm code, like assigning the c int var to R0 register and is this accepted by the bfin-uclinux-gcc compiler:
int var;
asm( " R0 = var;") ; // i know that is false
so can you tell how to do it please!
thank you,
TranslateQuoteReplyEditDelete
2008-05-03 07:10:48 Re: asm code in c function - dummy
Mike Frysinger (UNITED STATES)
Message: 55415
you use inline assembly and pass things as input operands ... please refer to the documentation:
http://docs.blackfin.uclinux.org/doku.php?id=using_in-line_assembly_calling_external_assembly_from_c
QuoteReplyEditDelete
2008-05-03 12:26:05 Re: asm code in c function - dummy
Hadi Boulfelfel (FRANCE)
Message: 55425
thank you Mike, it's useful.