Hi Axel,
The compiler only produces multiple instructions for this when
optimisation is off. If you use -O2 for the optimisation level, it
produces a single instruction. Other than the timing being slower, using
several instructions instead of one has no effect on the behaviour of
the hardware.
Steve
[email protected] wrote:
I want to set or clear similar bits of the SFR. If I use the [&= ~]
command, the compiler is generate and.b but not bic.b code. I hope the
internal hardware of the MSP430 is not modified similar bits of the SFR, if
the and.b command is executed.
axel
Chris Liechti <[email protected]>@lists.sourceforge.net am 15.06.2005
02:39:06
Bitte antworten an [email protected]
Gesendet von: [email protected]
An: [email protected]
Kopie:
Thema: Re: [Mspgcc-users] Modify SFR with SFR_CMD
[email protected] wrote:
I want to change the SFR bits with the SFR_CMD. But the compile reported
many error. What is wrong in my source code?
...
SFR_CMD(bis.b, IE1, WDTIE);
why do you want to use SFR_CMD? the compiler generates the instruction
you want with "IE1 &= ~WDTIE;"
chris