<?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 Fixup overflow in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Fixup-overflow/m-p/178179#M12629</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using MC9S08LG32 controller and developing software using CW 10.2 Special Edition: Code Warrior for Micro-controllers 10.2 (Eclipse, Windows hosted). I am using small memory model (where by default far locations are used)&lt;/P&gt;&lt;P&gt;I am getting Fix-up Overflow in one of my interrupt service routine.&lt;/P&gt;&lt;P&gt;In that routine is a variable say &lt;STRONG&gt;count&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;When I explicitly specify this variable as near I get the fix-up overflow error. As soon I remove this near specifier the error is solved. Can some-one tell me what exactly is happening.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jul 2012 16:23:34 GMT</pubDate>
    <dc:creator>sandeepnaik</dc:creator>
    <dc:date>2012-07-06T16:23:34Z</dc:date>
    <item>
      <title>Fixup overflow</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Fixup-overflow/m-p/178179#M12629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using MC9S08LG32 controller and developing software using CW 10.2 Special Edition: Code Warrior for Micro-controllers 10.2 (Eclipse, Windows hosted). I am using small memory model (where by default far locations are used)&lt;/P&gt;&lt;P&gt;I am getting Fix-up Overflow in one of my interrupt service routine.&lt;/P&gt;&lt;P&gt;In that routine is a variable say &lt;STRONG&gt;count&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;When I explicitly specify this variable as near I get the fix-up overflow error. As soon I remove this near specifier the error is solved. Can some-one tell me what exactly is happening.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 16:23:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Fixup-overflow/m-p/178179#M12629</guid>
      <dc:creator>sandeepnaik</dc:creator>
      <dc:date>2012-07-06T16:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Fixup overflow</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Fixup-overflow/m-p/178180#M12630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; When you define a variable inside of a function, the variable is allocated on the stack.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The near qualifier only applies to variables allocated between 0x00 and 0xFF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; As your stack is not allocated there, you should not define your local variable a near.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 18:13:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Fixup-overflow/m-p/178180#M12630</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2012-07-06T18:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: Fixup overflow</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Fixup-overflow/m-p/178181#M12631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If your requirement is that the &lt;FONT face="courier new,courier"&gt;count&lt;/FONT&gt; variable retain its value between function calls, the &lt;FONT face="courier new,courier"&gt;static&lt;/FONT&gt; modifier should be used.&amp;nbsp; The variable will then be placed in RAM, rather than the stack.&amp;nbsp; Unlike global variables, the variable will only be visible from within the function in which&amp;nbsp;it is defined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 19:53:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Fixup-overflow/m-p/178181#M12631</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2012-07-06T19:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Fixup overflow</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Fixup-overflow/m-p/178182#M12632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you define a variable inside of a function, the variable is allocated on the stack.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The near qualifier only applies to variables allocated between 0x00 and 0xFF.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; As your stack is not allocated there, you should not define your local variable a near.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sir,&lt;/P&gt;&lt;P&gt;The variable &lt;STRONG&gt;count&lt;/STRONG&gt; I declared is a global variable and is not allocated space in the routine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jul 2012 12:31:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Fixup-overflow/m-p/178182#M12632</guid>
      <dc:creator>sandeepnaik</dc:creator>
      <dc:date>2012-07-07T12:31:24Z</dc:date>
    </item>
  </channel>
</rss>

