This could be done in this way:


#include    <io.h>    /* IE1 and WDTIE are defined in here */

__asm__ __volatile__ ("bic.b    %1, %0" : "=m" (IE1) : "i" (WDTIE) : );



This approach gives you assembly-level access to C defines.

Also, check out the helpful inline assembly documentation at the mspgcc website:
http://mspgcc.sourceforge.net/doc_appendixD.html

---
Jacob Welch
Firmware Development Engineer
Salient Systems, Inc.


Dmitry wrote:

You have to define ports in _assembly_ file like
Wsomething=0xSomething.

But it seems to me, htat you're trying to pass demorgans.
Is it really necessary? Gimme an example, where imline assembly will be necessary (along with equivalent C code)

~d

On Tuesday 18 February 2003 10:14, Oleg Skydan wrote:
Hi, All,

Is there any trick to write somthing like next:

asm volatile(" bic.b #WDTIE,&IE1"::);

E.g. how can I use macros in inline assembly in a flexible way?

Thanks,
Oleg.



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users





Reply via email to