<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: BRCLR AND BRSET OPCODE BUG PROBLEM ADDING ASM LINES INTO C CODING in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/BRCLR-AND-BRSET-OPCODE-BUG-PROBLEM-ADDING-ASM-LINES-INTO-C/m-p/129936#M2241</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;Well just take a look at the preprocessor output for file main.c and you should figure out what is going on &lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;First in function lee_tarjeta remove the semi column after BRCLR&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BRCLR;&amp;nbsp; DATA_0,PORTA,DESC_PAR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BRCLR;&amp;nbsp; DATA_1,PORTA,DESC_PAR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Then remove the semi column at the end of the defines:&lt;/DIV&gt;&lt;DIV&gt;#define DATA_0 0x03;&lt;BR /&gt;#define DATA_1 0x02;&lt;BR /&gt;#define PORTA&amp;nbsp; PTA;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;Compiler should then understand the BRCLR.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Sep 2006 17:19:11 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2006-09-12T17:19:11Z</dc:date>
    <item>
      <title>BRCLR AND BRSET OPCODE BUG PROBLEM ADDING ASM LINES INTO C CODING</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/BRCLR-AND-BRSET-OPCODE-BUG-PROBLEM-ADDING-ASM-LINES-INTO-C/m-p/129934#M2239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi all !.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I`m trying to add ASM inlines into C coding using CODEWARRIOR 5.0 and just when I am going to compile it some errors&amp;nbsp;that not even exist on Compiler error list appear&amp;nbsp;and it`s driving me very crazyyy!!!..&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Apparently this occurs when using a BRCLR AND BRSET opcodes.I was searching on the net for help and some documents explain that these kind of bugs were detected in CODEWARRIOR 4.0 al least.If I`m not mistaken these would happen because OCDEWARRIOR issues two ASM compilers separatelly and depends on what kind of statement you are using.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please someone who can tell what am I doing wrong.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I here attached the code.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks you very much.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Ganimides&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2006 01:37:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/BRCLR-AND-BRSET-OPCODE-BUG-PROBLEM-ADDING-ASM-LINES-INTO-C/m-p/129934#M2239</guid>
      <dc:creator>ganimides</dc:creator>
      <dc:date>2006-09-12T01:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: BRCLR AND BRSET OPCODE BUG PROBLEM ADDING ASM LINES INTO C CODING</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/BRCLR-AND-BRSET-OPCODE-BUG-PROBLEM-ADDING-ASM-LINES-INTO-C/m-p/129935#M2240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi, Ganimides:&lt;BR /&gt;&lt;BR /&gt;What is the error message?&lt;BR /&gt;&lt;BR /&gt;In which file does the error occur?&lt;BR /&gt;&lt;BR /&gt;In one of your files, I found the following two lines:&lt;PRE&gt;
            BRCLR;   DATA_0,PORTA,DESC_PAR
            BRCLR;   DATA_1,PORTA,DESC_PAR                   
&lt;/PRE&gt;These will certainly cause some kind of error, as it involves opcodes with no operands. It appears the operands have been commented out, even though BRCLR requires three.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2006 04:10:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/BRCLR-AND-BRSET-OPCODE-BUG-PROBLEM-ADDING-ASM-LINES-INTO-C/m-p/129935#M2240</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2006-09-12T04:10:39Z</dc:date>
    </item>
    <item>
      <title>Re: BRCLR AND BRSET OPCODE BUG PROBLEM ADDING ASM LINES INTO C CODING</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/BRCLR-AND-BRSET-OPCODE-BUG-PROBLEM-ADDING-ASM-LINES-INTO-C/m-p/129936#M2241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;Well just take a look at the preprocessor output for file main.c and you should figure out what is going on &lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;First in function lee_tarjeta remove the semi column after BRCLR&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BRCLR;&amp;nbsp; DATA_0,PORTA,DESC_PAR&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BRCLR;&amp;nbsp; DATA_1,PORTA,DESC_PAR&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;Then remove the semi column at the end of the defines:&lt;/DIV&gt;&lt;DIV&gt;#define DATA_0 0x03;&lt;BR /&gt;#define DATA_1 0x02;&lt;BR /&gt;#define PORTA&amp;nbsp; PTA;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;Compiler should then understand the BRCLR.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2006 17:19:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/BRCLR-AND-BRSET-OPCODE-BUG-PROBLEM-ADDING-ASM-LINES-INTO-C/m-p/129936#M2241</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-09-12T17:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: BRCLR AND BRSET OPCODE BUG PROBLEM ADDING ASM LINES INTO C CODING</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/BRCLR-AND-BRSET-OPCODE-BUG-PROBLEM-ADDING-ASM-LINES-INTO-C/m-p/129937#M2242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Dear Rocco,thank you for responding.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I put this semi colons becasue of I get tired to test it with no succesfull.&lt;/DIV&gt;&lt;DIV&gt;The error ocurrs when the compiler watch over the BRCLR and BRSET opcodes and it remains&amp;nbsp;looping on.this place.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please I just need if you take a look the entire code and tell me what am I doing wrong.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Best regards&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Ganimides&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Sep 2006 22:38:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/BRCLR-AND-BRSET-OPCODE-BUG-PROBLEM-ADDING-ASM-LINES-INTO-C/m-p/129937#M2242</guid>
      <dc:creator>ganimides</dc:creator>
      <dc:date>2006-09-12T22:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: BRCLR AND BRSET OPCODE BUG PROBLEM ADDING ASM LINES INTO C CODING</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/BRCLR-AND-BRSET-OPCODE-BUG-PROBLEM-ADDING-ASM-LINES-INTO-C/m-p/129938#M2243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi, Ganimides:&lt;BR /&gt;&lt;BR /&gt;There is not much I can tell from just looking at the code.&lt;BR /&gt;&lt;BR /&gt;What is the error message you receive?&lt;BR /&gt;&lt;BR /&gt;At what lines do they occur?&lt;BR /&gt;&lt;BR /&gt;Besides the operands being commented out, which would certainly cause errors, I noticed another syntax problem. In some lines, you have&lt;PRE&gt;        BRCLR   #DATA_0,PORTA,FC_D0_A&lt;/PRE&gt;with a "#" before the bit number in the operand field, and in other lines you have&lt;PRE&gt;        BRCLR   DATA_0,PORTA,WAIT3&lt;/PRE&gt;without a "#". I believe the correct syntax would not have a "#" in the operand field.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2006 13:10:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/BRCLR-AND-BRSET-OPCODE-BUG-PROBLEM-ADDING-ASM-LINES-INTO-C/m-p/129938#M2243</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2006-09-13T13:10:57Z</dc:date>
    </item>
  </channel>
</rss>

