<?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: need help with Z_RAM allocation error in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133401#M3387</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;rhinoceroshead wrote:&lt;P&gt;How big of a deal is it really to be using that first page of RAM anyway? I've never worried about the speed boost that gives.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;You probably don't notice this when you write in C, but some instructions only work in page zero, and others don't have the extended addressing mode available.&lt;BR /&gt;&lt;BR /&gt;The BCLR, BSET, BRCLR and BRSET only work with page-zero. So you need to put bit-flags in page zero.&lt;BR /&gt;&lt;BR /&gt;The MOV, CLR, INC, DEC, COM, NEG, TST, ASL, ASR, LSL, LSR, ROL, ROR, LDHX, STHX, CPHX, CBEQ and DBNZ instructions can directly access page zero, but can only access other addresses indirectly, either relative to the H:X registers or relative to the stack-pointer.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 30 Apr 2006 06:06:23 GMT</pubDate>
    <dc:creator>rocco</dc:creator>
    <dc:date>2006-04-30T06:06:23Z</dc:date>
    <item>
      <title>need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133386#M3372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;DIV&gt;Assembly code with&amp;nbsp;codewarrier and a 9S08GB60 processor. Have Z_RAM allocated in .prm file at 0x0080 to 0x00ff.&amp;nbsp; I have defined enough variables&amp;nbsp;to use memory &amp;nbsp;0x0080 through 0x00f4.&amp;nbsp; I get a link error L1102: Out of allocation space in segment Z_RAM at address 0xf5.&amp;nbsp; What am I missing.&amp;nbsp; This same allocation method works for me on 9S08QG8 chip with the same CW but with much lower zero page RAM allocation.&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Apr 2006 03:09:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133386#M3372</guid>
      <dc:creator>jtjans</dc:creator>
      <dc:date>2006-04-22T03:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133387#M3373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;Hi Jt,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;I dunno what you know and what you don't so I'll say it all. Don't be offended if it looks trivial to you !&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;Z_RAM is used to allocate in the Page Zero of the MCU. It actually means that the MCU can access this area of memory using addressing in the DIRECT PAGE.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;This region cannot move and is bound to finish at 0xFF because it needs to be below 256. The lower boundary will change depending on the registers of the MCU you are using&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;The advantage of this Direct Page is execution speed. If you look for Assembly instructions using the Direct Addressing, you will see they all take less cycles to execute than if you were trying to access a variable in higher RAM or data in Flash.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;To conclude, the programmer will put the most often accessed variable in Z_RAM. However if the Z_RAM is not big enough for all of them, no worries as they will fit in the Higher RAM.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;For your particular application, you might have loop indexes in a for loop or other temporary variables you didn't take into account ?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;Cheers,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Comic Sans MS"&gt;Alban.&lt;/FONT&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Apr 2006 22:41:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133387#M3373</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2006-04-22T22:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133388#M3374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;This message is generated when the area Z_RAM is full.&lt;/P&gt;&lt;P&gt;Where did you place the stack? You can also look at the .map file generated by the linker. You will see a list of the object which have not been allocated because&amp;nbsp;missing memory.&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Apr 2006 22:14:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133388#M3374</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-04-23T22:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133389#M3375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Yo,&lt;BR /&gt;&lt;BR /&gt;Yep, I agree with CC, by default the Stack is usually put in the first page coz of the faster execution it gives.&lt;BR /&gt;&lt;BR /&gt;So, for your project, depending on how the stack is declared in the PRM file (by its size or by its start address) you can change the value for it to work.&lt;BR /&gt;&lt;BR /&gt;STILL be careful you have a stack big enough... Stack Overflow is quite difficult to debug, I know by experience that it's one of the last thing you think about looking when everything goes wrong.&lt;BR /&gt;&lt;BR /&gt;So CC, you reading all the boards for Warriors. You are courageous !&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Alban.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2006 15:24:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133389#M3375</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2006-04-24T15:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133390#M3376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;OK Alban, I am going to question your comments on two points.&lt;/P&gt;&lt;P&gt;1. I thought CW's default action was to move the stack to the top of RAM.&lt;/P&gt;&lt;P&gt;2. Does having the stack in page zero make for faster execution. Most stack manipulation is done automatically, like return addresses being pushed on. Perhaps some direct stack data manipultion may be able to be executed faster in page zero but this would be at the loss of space for other data that could be kept there and definately manipulated faster.&lt;/P&gt;&lt;P&gt;BR Peg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2006 15:44:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133390#M3376</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2006-04-24T15:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133391#M3377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks for the Challenge Peg,&lt;BR /&gt;&lt;BR /&gt;I am guilty of talking without checking... &lt;BR /&gt;However, I think that you can specify the memory model when you create a project with the wizard and the "tiny" would put things in first page.&lt;BR /&gt;&lt;BR /&gt;I also checked in the CPU datasheet and PUSH POP are inherent and therefore don't care about where the stack is for the usual interrupt and context manipulation.&lt;BR /&gt;&lt;BR /&gt;Fully agree that the first page is better used for often accessed variables. &lt;BR /&gt;&lt;BR /&gt;Thank you for correcting me.&lt;BR /&gt;Alban. {useless b4 his coffee?!}&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Apr 2006 16:23:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133391#M3377</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2006-04-24T16:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133392#M3378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I thought that by default, only the stack size (0x50 bytes) is declared in the .prm and then the stack&amp;nbsp;chunk immediately follows the last global variable declaration - at least when programming in C, which is all I have ever done on the HC08.&amp;nbsp; I usually bump the stack size up to at least 0x0100 bytes&amp;nbsp;immediately after starting a project just to avoid pulling out hair trying to track down bugs that aren't there.&amp;nbsp; It seems like codewarrior should automatically start it at the end of the RAM and let the stack size default all the way to the end of the global variables, but that's just me.&lt;/DIV&gt;&lt;P&gt;Message Edited by rhinoceroshead on &lt;SPAN class="date_text"&gt;04-24-2006&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;12:30 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Apr 2006 00:29:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133392#M3378</guid>
      <dc:creator>rhinoceroshead</dc:creator>
      <dc:date>2006-04-25T00:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133393#M3379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;CW puts the stack in Z-RAM to make the code compatible with the older 6805 code.&amp;nbsp; Not very usefull because not much else was kept compatible.&amp;nbsp; I know about moving the stack out of the zero page, which I have done.&amp;nbsp; Still get the out of allocation space message.&amp;nbsp; If I just forget about declaring Z-RAM and make all of my RAM the default ram, all of my variables fit into the zero page and I don't get the error message.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;JJ&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Apr 2006 22:16:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133393#M3379</guid>
      <dc:creator>jtjans</dc:creator>
      <dc:date>2006-04-26T22:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133394#M3380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi JJ,&lt;/P&gt;&lt;P&gt;The _device_ defaults to a stack pointer of $FF for backward compatability&amp;nbsp; not CW.&lt;/P&gt;&lt;P&gt;The compatability issue is very good IMHO.&lt;/P&gt;&lt;P&gt;My experience is that CW moves the stack pointer to the top of RAM by default and then alocates the RAM from here down to the highest other allocation to the stack.&lt;/P&gt;&lt;P&gt;Did you not glean any info from perusing your .map file as suggested by CC.&lt;/P&gt;&lt;P&gt;BR Peg&lt;/P&gt;&lt;P&gt;Message Edited by peg on &lt;SPAN class="date_text"&gt;04-27-2006&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;09:49 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2006 06:48:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133394#M3380</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2006-04-27T06:48:52Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133395#M3381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi Peg,&lt;/P&gt;&lt;P&gt;Do you usually use absolute assembly?&amp;nbsp; I just tried creating a few test projects and if you do relocatable assembly or C, then the .prm file generated by CW always contains a line that says, "STACKSIZE 0x50".&amp;nbsp; The size varies depending on the device, but the line&amp;nbsp;is always&amp;nbsp;there on my version.&amp;nbsp; Then when you simulate, the&amp;nbsp;stack pointer&amp;nbsp;defaults to 0xFF on reset like you said, but the start-up routine (either compiled code, or default relocatable assembly code)&amp;nbsp;initializes the stack pointer to 0x50 bytes&amp;nbsp;higher than the address of the last global variable.&amp;nbsp; I tried putting&amp;nbsp;"asm&amp;nbsp;LDHX #$00FF; asm TXS;" at the beginning of main(), but then that instruction makes the simulator complain that the device is accessing unallocated memory.&amp;nbsp; It might work on the actual device in user mode. &amp;nbsp;I've never tried that.&lt;/P&gt;&lt;P&gt;Do you do this stuff for a living or a hobby?&amp;nbsp; You answer almost every post here and you are very knowledgable.&amp;nbsp; Freescale should be paying you.&amp;nbsp; :smileyhappy:&lt;/P&gt;&lt;P&gt;Message Edited by rhinoceroshead on &lt;SPAN class="date_text"&gt;04-27-2006&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;11:34 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Apr 2006 23:30:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133395#M3381</guid>
      <dc:creator>rhinoceroshead</dc:creator>
      <dc:date>2006-04-27T23:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133396#M3382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi rhinoceroshead,&lt;/P&gt;&lt;P&gt;I now totally agree with what you said in your last post.&lt;/P&gt;&lt;P&gt;I am _sure_ I have seen this "top of ram stack move" but now when I do a more thorough check the action is how you describe.&lt;/P&gt;&lt;P&gt;Perhaps, like you, I wanted to believe this was what it would do???&lt;/P&gt;&lt;P&gt;I usually write in assembler using P&amp;amp;E tools.&lt;/P&gt;&lt;P&gt;I do this for a living, and a hobby I guess.&lt;/P&gt;&lt;P&gt;Freescale have my address for the cheques. &lt;IMG alt=":smileyvery-happy:" class="emoticon emoticon-smileyvery-happy" id="smileyvery-happy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-very-happy.gif" title="Smiley Very Happy" /&gt;&lt;/P&gt;&lt;P&gt;I have only recently started using CW because of the examples and SMAC for Zigbee stuff.&lt;/P&gt;&lt;P&gt;Regards Peg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Message Edited by peg on &lt;SPAN class="date_text"&gt;04-28-2006&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;08:22 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2006 05:19:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133396#M3382</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2006-04-28T05:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133397#M3383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Zigbee, huh?&amp;nbsp; I bought a couple of those DLP-RF2-Z boards from DLP design, but I've been too busy to play with them so far.&amp;nbsp; I thought it would be fun to build a little remote-controlled robot for my house that I could command from the Internet through a Java applet, and have it send live images back to the browser.&amp;nbsp; I guess&amp;nbsp;it would be sort&amp;nbsp;of like those Mars rovers, but *slightly* less cool since it would&amp;nbsp;only be&amp;nbsp;exploring my house.&amp;nbsp; At this point in my life, this stuff is mostly just a hobby for me.&amp;nbsp; I'm just fascinated by these little things though.&amp;nbsp; They're simple enough for one person to see a project all the way through in not too much time, but sophisticated enough to do just about anything you can imagine (within reason).&lt;/P&gt;&lt;P&gt;I'd better say something on topic so Alban doesn't have to slap my hand...&lt;/P&gt;&lt;P&gt;How big of a deal is it really to be using that first page of RAM anyway?&amp;nbsp; I've never worried about the speed boost that gives.&amp;nbsp; I'm also usually using C, which doesn't necessarily compile into the most efficient code anyway, and I've never had a problem.&amp;nbsp; If you really are pushing the performance limitations of the device, wouldn't you just use a faster chip?&amp;nbsp; I could maybe understand reaching the limit&amp;nbsp;if you were running a fast control algorithm or doing some DSP, but the AD converter on this chip isn't all that fast and this isn't the best choice for DSP either.&amp;nbsp; Has anyone ever had an application that absolutely had to use the direct page addressing mode?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2006 13:16:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133397#M3383</guid>
      <dc:creator>rhinoceroshead</dc:creator>
      <dc:date>2006-04-28T13:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133398#M3384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;tsss... As if I wouldn't myself write something out of subject &lt;IMG alt=":smileyvery-happy:" class="emoticon emoticon-smileyvery-happy" id="smileyvery-happy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-very-happy.gif" title="Smiley Very Happy" /&gt; I'm non violent and maybe even flexible. &lt;IMG alt=":smileysurprised:" class="emoticon emoticon-smileysurprised" id="smileysurprised" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-surprised.gif" title="Smiley Surprised" /&gt;&lt;/P&gt;&lt;P&gt;In large productions like automotive, the price of each MCU is important. Therefore they will try and stretch the part to its maximum.&lt;BR /&gt;I'm thinking that having an Operating System on a HC08 with little RAM could already be a challenge. But I see some Contributors already tackled that, &lt;FONT color="#FF9900"&gt;&lt;STRONG&gt;well done !!!&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;So I forward to the Admins of the board that we need &lt;STRONG&gt;a big fat cheque for Peg&lt;/STRONG&gt; !&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Alban. {Peace &amp;amp; Love}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2006 18:12:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133398#M3384</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2006-04-28T18:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133399#M3385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Alban and Peg,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Based on your spelling of the word 'cheque', and the time of day&amp;nbsp;that you make posts, I would guess that you&amp;nbsp;reside in Australia or perhaps New Zealand.&amp;nbsp; Am I right?&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Apr 2006 22:20:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133399#M3385</guid>
      <dc:creator>rhinoceroshead</dc:creator>
      <dc:date>2006-04-28T22:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133400#M3386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;You're half right, click on the username/author for this info.&lt;/P&gt;&lt;P&gt;Perhaps you could setup your own!&lt;/P&gt;&lt;P&gt;Peg&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Apr 2006 07:19:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133400#M3386</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2006-04-29T07:19:19Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133401#M3387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;rhinoceroshead wrote:&lt;P&gt;How big of a deal is it really to be using that first page of RAM anyway? I've never worried about the speed boost that gives.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;You probably don't notice this when you write in C, but some instructions only work in page zero, and others don't have the extended addressing mode available.&lt;BR /&gt;&lt;BR /&gt;The BCLR, BSET, BRCLR and BRSET only work with page-zero. So you need to put bit-flags in page zero.&lt;BR /&gt;&lt;BR /&gt;The MOV, CLR, INC, DEC, COM, NEG, TST, ASL, ASR, LSL, LSR, ROL, ROR, LDHX, STHX, CPHX, CBEQ and DBNZ instructions can directly access page zero, but can only access other addresses indirectly, either relative to the H:X registers or relative to the stack-pointer.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Apr 2006 06:06:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133401#M3387</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2006-04-30T06:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133402#M3388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Oh really?&amp;nbsp; I wasn't aware of that.&amp;nbsp; I've done a lot of assembly on the HC12s, but never bothered to learn the instruction set on the HC08.&amp;nbsp; The HC12s don't even have RAM in the zero page unless you move it there.&amp;nbsp; On those chips the direct address mode saves CPU cycles, but doesn't have any limitations in which instructions you can use.&amp;nbsp; Interesting.&amp;nbsp; I guess now I'll have to start declaring variables with the 'near' keyword.&amp;nbsp; But most of what I do is not that time-critical.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Apr 2006 08:23:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133402#M3388</guid>
      <dc:creator>rhinoceroshead</dc:creator>
      <dc:date>2006-04-30T08:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: need help with Z_RAM allocation error</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133403#M3389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Are you making sure that after you have declared your variables in Zeropage that you follow it with a&lt;/P&gt;&lt;P&gt;#pragma DATA_SEG DEFAULT&lt;/P&gt;&lt;P&gt;I was bit by that not too long ago.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;frogman_sr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2006 06:42:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/need-help-with-Z-RAM-allocation-error/m-p/133403#M3389</guid>
      <dc:creator>frogman_sr</dc:creator>
      <dc:date>2006-05-12T06:42:33Z</dc:date>
    </item>
  </channel>
</rss>

