<?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のトピックZero Page RAM Allocation</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Zero-Page-RAM-Allocation/m-p/205336#M17152</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using an HCS08QB4 and hitting memory problems. All variables are going into 0x100 - 0x15F which is where the stack also resides. Zero page RAM from 0x60 - 0xFF is not being used. How do I get variables to be allocated to zero page?&lt;/P&gt;&lt;P&gt;I have tried various combinations of #pragma segment and int near x, but I can't get it to work. e.g. Link error L1907. Can somebody please supply a simple example as I need this 160 bytes of RAM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 05 Aug 2009 21:07:24 GMT</pubDate>
    <dc:creator>DRichards</dc:creator>
    <dc:date>2009-08-05T21:07:24Z</dc:date>
    <item>
      <title>Zero Page RAM Allocation</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Zero-Page-RAM-Allocation/m-p/205336#M17152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using an HCS08QB4 and hitting memory problems. All variables are going into 0x100 - 0x15F which is where the stack also resides. Zero page RAM from 0x60 - 0xFF is not being used. How do I get variables to be allocated to zero page?&lt;/P&gt;&lt;P&gt;I have tried various combinations of #pragma segment and int near x, but I can't get it to work. e.g. Link error L1907. Can somebody please supply a simple example as I need this 160 bytes of RAM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2009 21:07:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Zero-Page-RAM-Allocation/m-p/205336#M17152</guid>
      <dc:creator>DRichards</dc:creator>
      <dc:date>2009-08-05T21:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Zero Page RAM Allocation</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Zero-Page-RAM-Allocation/m-p/205337#M17153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do a search on the string "zero page" in the search box at the bottom left of this web page. This subject has come up a number of times in these forums, you should find out what you need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;---Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2009 21:52:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Zero-Page-RAM-Allocation/m-p/205337#M17153</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2009-08-05T21:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Zero Page RAM Allocation</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Zero-Page-RAM-Allocation/m-p/205338#M17154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check the prm file, sounds like the zero page segment name is not listed after INTO for the DEFAULT_RAM clause.&lt;/P&gt;&lt;P&gt;Segment names can be listed multiple times, so place all zero page variables into the zero page first and then list the same segment name as destination for DEFAULT_RAM too.&lt;/P&gt;&lt;P&gt;That should make those 160 bytes available for use easily, but it will be using the more expensive EXT extended addressing modes.&lt;/P&gt;&lt;P&gt;So in order to place variables explictely into the zero page use a&amp;nbsp;&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG __SHORT_SEG MY_ZEROPAGE&lt;/P&gt;&lt;P&gt;search in the forums for "#pragma DATA_SEG __SHORT_SEG"&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;message.id=11614&amp;amp;query.id=122530#M11614" target="_self"&gt;http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;message.id=11614&amp;amp;query.id=122530#M11614&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pragma section is for the coldfire compiler, not for the S08, you should get a warning when using it. Using near changes the way the compiler accesses variables, it does not change the place/section it gets allocated into.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Aug 2009 21:53:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Zero-Page-RAM-Allocation/m-p/205338#M17154</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2009-08-05T21:53:13Z</dc:date>
    </item>
  </channel>
</rss>

