<?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>8-bit MicrocontrollersのトピックRe: Error Message : Complex Relocatable Expression</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Error-Message-Complex-Relocatable-Expression/m-p/158029#M9247</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Confused:&lt;BR /&gt;&amp;gt;I am not intending to add RXBUF to RXBYTECNT.&lt;BR /&gt;But in the original post:&lt;BR /&gt;&lt;PRE&gt;&amp;gt;           bset   RXBITCNT,RXBUF+RXBYTECNT

Looks to me as if you would add them.

Anyway a "Complex Relocatable Expression" is anything which is not "Relocatable Expression"
(or a constant expression), so basically if the assembler takes both RXBUF &amp;amp; RXBYTECNT to be relocatable,
then the sum of the two is causing the "Complex Relocatable Expression".
To resolve it, one of the two should be a constant, say an EQU or SET defined before that
bset.
Basically the assembler does not support to emit the sum of two relocatable objects as fixups.

Daniel
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 09:02:57 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2020-10-29T09:02:57Z</dc:date>
    <item>
      <title>Error Message : Complex Relocatable Expression</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Error-Message-Complex-Relocatable-Expression/m-p/158026#M9244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi, I encountered the above mentioned error message in my ISR routine ;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bset&amp;nbsp;&amp;nbsp; RXBITCNT,RXBUF+RXBYTECNT&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;RXBYTECNT is a counter counting the pointer for RXBUF.&lt;/DIV&gt;&lt;DIV&gt;RXBITCNT is a counter counting the bit.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;any methods&amp;nbsp;to resolve this?&lt;/DIV&gt;&lt;DIV&gt;Thanks.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:02:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Error-Message-Complex-Relocatable-Expression/m-p/158026#M9244</guid>
      <dc:creator>mylim</dc:creator>
      <dc:date>2020-10-29T09:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message : Complex Relocatable Expression</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Error-Message-Complex-Relocatable-Expression/m-p/158027#M9245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Bit instructions for the HC(S)08 use a fixed number between 0 and 7 for the bit.&amp;nbsp; This is an immediate value, not a variable that contains the number.&amp;nbsp; In your case, RXBITCNT should be EQUed to the specific bit number.&amp;nbsp; To do what you want, you'll need to write a small routine that will move a bit to correct position (based on RXBITCNT) within the byte, and using LDA / OR (for BSET) or AND (with inverted mask for BCLR) / STA instructions, update the destination variable (RXBUF+RXBYTECNT) which again must specify an address directly (not as pointer, as I suspect you're trying to do by adding RXBUF + RXBYTECNT).&lt;BR /&gt;&lt;BR /&gt;Also, some assemblers expect expressions to be inside brackets or similar decorations.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2007 21:07:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Error-Message-Complex-Relocatable-Expression/m-p/158027#M9245</guid>
      <dc:creator>tonyp</dc:creator>
      <dc:date>2007-10-24T21:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message : Complex Relocatable Expression</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Error-Message-Complex-Relocatable-Expression/m-p/158028#M9246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Tony,&lt;/DIV&gt;&lt;DIV&gt;Thanks.&lt;/DIV&gt;&lt;DIV&gt;I am not intending to add RXBUF to RXBYTECNT.&lt;/DIV&gt;&lt;DIV&gt;I am aware of the method you were suggesting.&lt;/DIV&gt;&lt;DIV&gt;I tried this stupid method of mine because i thought the method u suggest will take a bit long.&lt;/DIV&gt;&lt;DIV&gt;Seems like that's the only way?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2007 21:36:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Error-Message-Complex-Relocatable-Expression/m-p/158028#M9246</guid>
      <dc:creator>mylim</dc:creator>
      <dc:date>2007-10-24T21:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Error Message : Complex Relocatable Expression</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Error-Message-Complex-Relocatable-Expression/m-p/158029#M9247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Confused:&lt;BR /&gt;&amp;gt;I am not intending to add RXBUF to RXBYTECNT.&lt;BR /&gt;But in the original post:&lt;BR /&gt;&lt;PRE&gt;&amp;gt;           bset   RXBITCNT,RXBUF+RXBYTECNT

Looks to me as if you would add them.

Anyway a "Complex Relocatable Expression" is anything which is not "Relocatable Expression"
(or a constant expression), so basically if the assembler takes both RXBUF &amp;amp; RXBYTECNT to be relocatable,
then the sum of the two is causing the "Complex Relocatable Expression".
To resolve it, one of the two should be a constant, say an EQU or SET defined before that
bset.
Basically the assembler does not support to emit the sum of two relocatable objects as fixups.

Daniel
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:02:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Error-Message-Complex-Relocatable-Expression/m-p/158029#M9247</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2020-10-29T09:02:57Z</dc:date>
    </item>
  </channel>
</rss>

