Hallo !

I would have expected that < &=~> will compile to an assembler: command
and not to an ?

is a read modify write command. It does influence the CC- register.
(possible pending Interrupts could be cleared ...)

only affects specified bits. It does not influence the CC-regsiter.

Or am I wrong?

Thanxs for reading
Michael


#include
#include <.msp430timera.h>

#include
#include
#include
#include
#include
- - - - -
command line used :
msp430-gcc %1.cpp -mmcu=msp430x123 -Os -g -o %1.elf

Os used:
Windows XP
- - - - -

;//****************************************************************************
;//* IDisableTimerEvents
;//****************************************************************************
void IDisableTimerEvents(void)
{
TimerEventCntrSema +=1 ;
//gcc error ??
CCTL2 &= ~CCIE ;// bic.w #CCIE,&CCTL2
timera.cctl2.ccie=0;
__asm__ __volatile__("bic.w #-17,&0x166");

timera.cctl2.scs=0;

_NOP();
_EINT();
}// DisableTimerEvents


PRODUCES FOLLOWING:
;//****************************************************************************
;//* IDisableTimerEvents
;//****************************************************************************
void IDisableTimerEvents(void)
{
TimerEventCntrSema +=1 ;
e0de: d2 53 00 02 inc.b &0x0200 ;
//gcc error ??
CCTL2 &= ~CCIE ;// bic.w #CCIE,&CCTL2
e0e2: b2 f0 ef ff and #-17, &0x0166 ;#0xffef
e0e6: 66 01
timera.cctl2.ccie=0;
e0e8: f2 f0 ef ff and.b #-17, &0x0166 ;#0xffef
e0ec: 66 01
__asm__ __volatile__("bic.w #-17,&0x166");
e0ee: b2 c0 ef ff bic #-17, &0x0166 ;#0xffef
e0f2: 66 01

timera.cctl2.scs=0;
e0f4: f2 c2 67 01 bic.b #8, &0x0167 ;r2 As==11

_NOP();
e0f8: 03 43 nop
_EINT();
e0fa: 32 d2 eint
}// DisableTimerEvents
e0fc: 30 41 ret

0000e0fe <_Z16CreateTimerEventPFvvEjj>:

--

Reply via email to