<?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>CodeWarrior for MCU中的主题 Re: RAM or ROM where is a #define stored?</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151844#M3702</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Just for completeness,&lt;BR /&gt;use&lt;BR /&gt;&lt;BR /&gt;#pragma DATA_SEG __SHORT_SEG MY_ZEROPAGE&lt;BR /&gt;&lt;BR /&gt;With "just" "#pragma DATA_SEG MY_ZEROPAGE" the compiler will place the variables at the expected addresses, but he wont take advantage of the more efficient zero page access. The __SHORT_SEG is especially for this purpose.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Oct 2007 22:56:00 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2007-10-08T22:56:00Z</dc:date>
    <item>
      <title>RAM or ROM where is a #define stored?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151833#M3691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello everybody,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've got a question on the constants I use in my C-program. I'm using a lot of constants in my program like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;#define CONST_VAR&amp;nbsp; value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;where value are signed/unsigned integers or floating points like pi.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is where are these constants stored in the memory of my HCS08DZ60 microcontroller, and how many bytes do they occupy? Are they stored in the same region as global variables, i.e. in the STACK? Wich region of the memory does the stack belong to? In the prm-file of my project I can modify its size, but I still don't know where all these variables/constants are stored (Z_RAM, RAM, ROM1, ROM) in the memory.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could someone tell me the place and size of storage for the constants in the following lines:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//global variable&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UINT32 my32BitVariable;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;UINT8&amp;nbsp; my8BitVariable;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;//definitions&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define MY_CONST_1&amp;nbsp;&amp;nbsp; 130&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define MY_CONST_2 &amp;nbsp; -13&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define MY_CONST_3 &amp;nbsp; 0.884637&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;#define MY_CONST_4 &amp;nbsp; 600&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem I have to deal with, is that some variables simply do not work correctly. And I think this is because they are stoerd in a memory region that is to small for all of the variables/constants&amp;nbsp; declared.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Johannes&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 13:38:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151833#M3691</guid>
      <dc:creator>ohanica</dc:creator>
      <dc:date>2007-10-02T13:38:09Z</dc:date>
    </item>
    <item>
      <title>add: RAM or ROM where is a #define stored?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151834#M3692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;an additional question:&lt;BR /&gt;what happens if I declare (global) variables as static?&lt;BR /&gt;&lt;BR /&gt;(//global)&lt;BR /&gt;static UIN8 aStatic8BitVar;&lt;BR /&gt;&lt;BR /&gt;where is this Variable stored?&lt;BR /&gt;&lt;BR /&gt;greetx,&lt;BR /&gt;Johannes&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 14:21:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151834#M3692</guid>
      <dc:creator>ohanica</dc:creator>
      <dc:date>2007-10-02T14:21:08Z</dc:date>
    </item>
    <item>
      <title>Re: RAM or ROM where is a #define stored?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151835#M3693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;in C a #define is nothing else than a textual replacement.&lt;BR /&gt;Therefore a #define ONE 1&lt;BR /&gt;is nothing else as if you would write 1 at all the places you typed in ONE in your source code.&lt;BR /&gt;&lt;BR /&gt;Therefore your question is basically where are all the numbers stored. Well, it depends on how you use the numbers. Most tipically they are causing specific code to be generated and therefore end up in the flash.&lt;BR /&gt;&lt;BR /&gt;I would recomment to read a good C book, i think it will explain a lot of the strange things in the C language you have to learn, then a lot of the things will become clear.&lt;BR /&gt;&lt;BR /&gt;About your actual problem, note that all computations in C are done with int unless some argument has already a larger type (check a good C book for the details...). For the HC08, an int has 16 bits.&lt;BR /&gt;Therefore "30000+30000+30000" wont get 90000, but instead "90000&amp;amp;65535" (=90000-65535, whatever that is :smileyhappy:.&lt;BR /&gt;&lt;BR /&gt;If you need 32 bit calculation, use a L suffix ("30000L+30000L+30000L"), this will generate more code of course. If you want unsigned arithmetic, use a U suffix ("30000U+30000U").&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 14:32:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151835#M3693</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-10-02T14:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: RAM or ROM where is a #define stored?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151836#M3694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;oh, oh, oh... I remeber some C lessons. As you wrote down what a #define makes, I remebered it was only a replacement of text. I hae to admit it was a bad question.&lt;BR /&gt;&lt;BR /&gt;In the meanwhile I found information on where global and local variables are stroed to and whats up with static local or static global variables...&lt;BR /&gt;&lt;BR /&gt;In the DIRECT PAGE there are stored variables like the port I/O registers and so on... AND there is some place for global variables in the DIRECT PAGE page too (info from: &lt;A href="http://www.freescale.com/files/microcontrollers/doc/app_note/AN2093.pdf)" target="test_blank"&gt;http://www.freescale.com/files/microcontrollers/doc/app_note/AN2093.pdf)&lt;/A&gt;. But how can I see how much space there is left in the DIRECT PAGE &amp;nbsp; for (my) global variables, and how can I assert&amp;nbsp; a global variable to DIRECT PAGE? How many Bytes/Variables can I assert to the DIRECT PAGE.&lt;BR /&gt;&lt;BR /&gt;What is the HIGH PAGE for? is it useful to place variables in this memory area? what is the difference between HIGH PAGE memory and RAM?&lt;BR /&gt;&lt;BR /&gt;best,&lt;BR /&gt;Johannes&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Oct 2007 20:50:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151836#M3694</guid>
      <dc:creator>ohanica</dc:creator>
      <dc:date>2007-10-02T20:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: RAM or ROM where is a #define stored?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151837#M3695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Direct page only applies to some microcontrollers, it is very much cpu-dependant. How large this area is would also be cpu-dependant, but it is typically the first 256 bytes.&lt;BR /&gt;&lt;BR /&gt;To see how much space certain things take up, look at the .map file generated by the linker. It should be located in the bin directory of your project, and may also be included in it from the IDE.&lt;BR /&gt;&lt;BR /&gt;To assign variables to a certain memory location in CW, you use #pragma DATA_SEG (global variables), #pragma CONST_SEG (global constants), #pragma CODE_SEG (code), and so on. See the manual for details.&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;Global variables, and those with the keyword static before them (both global and local statics) are stored in a certain part of the RAM that has a deterministic size at compile time (static memory allocation). The rest of the variables are stored in segments that have a variable size, either the stack (automatic memory allocation) or the heap (dynamic memory allocation).&lt;BR /&gt;&lt;BR /&gt;ANSI C states that they must be initialized by the system before the execution of main(). This will happen even if the programmer didn't initialize them to a value explicitly, if he didn't, they will be set to zero. This is the only kind of variables you can count on having the value zero before you set them to anything, though good programming practice requires that you assign them a value still, and not rely on the fact that they are zero.&lt;BR /&gt;&lt;BR /&gt;All of this make things tricky in NVM-based systems. CW has solved this by executing code from a file called "start08.c" or similar - this is a necessary evil to conform with ANSI C (which was designed for RAM-based systems). In a safety critical system, you will not run this initializing code, but rather set your static variables to a value in runtime, just before they are used, to prevent the RAM cells from being corrupted: there could in theory be years of execution in between the start of the program and the usage of a static variable.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Oct 2007 13:49:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151837#M3695</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2007-10-03T13:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: RAM or ROM where is a #define stored?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151838#M3696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Lundin,&lt;BR /&gt;&lt;BR /&gt;thanks for the explanations.&lt;BR /&gt;&lt;BR /&gt;What is the difference between Z_RAM and RAM segment? Why is the RAM split into this two segments? Does it make sense to place frequently used globals into Z_RAM?&lt;BR /&gt;&lt;BR /&gt;many thanks,&lt;BR /&gt;Johannes&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 14:28:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151838#M3696</guid>
      <dc:creator>ohanica</dc:creator>
      <dc:date>2007-10-08T14:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: RAM or ROM where is a #define stored?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151839#M3697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Yes this is the idea.&lt;/DIV&gt;&lt;DIV&gt;ZRAM is located on the direct memory area. Placing frequently used variables in&amp;nbsp;that memory area should optimize both code size and execution time.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The .map file generated by the linker tells you how many times each variable is referenced within the application.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This is indicated in the "OBJECT-ALLOCATION SECTION" in the column "Ref.".&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>Mon, 08 Oct 2007 16:17:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151839#M3697</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-10-08T16:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: RAM or ROM where is a #define stored?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151840#M3698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Hello!&lt;BR /&gt;&lt;BR /&gt;this is my prm-file&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;/* This is a linker parameter file for the mc9s08dz60 */NAMES END /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your own files too. */SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */    ROM                      =  READ_ONLY    0x1900 TO 0xFFAD;    Z_RAM                    =  READ_WRITE   0x0080 TO 0x00FF;    RAM                      =  READ_WRITE   0x0100 TO 0x107F;    ROM1                     =  READ_ONLY    0x1080 TO 0x13FF;    EEPROM                   =  NO_INIT      0x1400 TO 0x17FF;ENDPLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */    DEFAULT_RAM                         INTO  RAM;    DEFAULT_ROM, ROM_VAR, STRINGS       INTO  ROM; /* ROM1 In case you want to use ROM1 as well, be sure the option -OnB=b is passed to the compiler. */    _DATA_ZEROPAGE, MY_ZEROPAGE         INTO  Z_RAM;ENDSTACKSIZE 0xF0  /* by default it's been 0x50 */VECTOR 0 _Startup  /* Reset vector: this is the default entry point for an application. */&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;If I want to place MyVar (44bytes) to Z_RAM, is it correct to do it as follows? This is what I understand from the CW-help.&lt;BR /&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;...#pragma CODE_SEG Z_RAM///MyVariable, holding frequently used information (placed in direct memory area (Z_RAM))MyVariable_Type  myVar; #pragma CODE_SEG DEFAULT               ///Global time1 variable (inc = 100ms)UINT32    gTime1;....
&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;The result in the .map file is not changing compared to the situation when the two #pragma- lines are not used: In the object-allocation section the Variable myVar is allocated at the address 100(hex), which is outside the first 256 bytes, i.e. outside the zeropage.&lt;BR /&gt;&lt;BR /&gt;How do I get this variable into Z-RAM (somewhere below the address 100(hex))?&lt;BR /&gt;&lt;/DIV&gt;&lt;BR /&gt;best,&lt;BR /&gt;Johannes P.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:55:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151840#M3698</guid>
      <dc:creator>ohanica</dc:creator>
      <dc:date>2020-10-29T08:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: RAM or ROM where is a #define stored?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151841#M3699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Use&lt;BR /&gt;&lt;BR /&gt;#pragma DATA_SEG MY_ZEROPAGE&lt;BR /&gt;&lt;BR /&gt;for RAM variables. #pragma CODE_SEG only applies to program code.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 20:02:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151841#M3699</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2007-10-08T20:02:25Z</dc:date>
    </item>
    <item>
      <title>Re: RAM or ROM where is a #define stored?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151842#M3700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Check your reference manual or on line help system.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In order to define a user defined segment for a variable you need to write:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#pragma DATA_SEG MyData&lt;BR /&gt;///MyVariable, holding frequently used information (placed in direct memory area (Z_RAM))&lt;BR /&gt;MyVariable_Type&amp;nbsp; myVar;&lt;BR /&gt;#pragma DATA_SEG DEFAULT&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;If you wish to place the variable on the direct page you need to write:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;#pragma DATA_SEG __SHORT_SEG MY_ZEROPAGE&lt;BR /&gt;///MyVariable, holding frequently used information (placed in direct memory area (Z_RAM))&lt;BR /&gt;MyVariable_Type&amp;nbsp; myVar;&lt;BR /&gt;#pragma DATA_SEG DEFAULT&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Then you need to&amp;nbsp;make sure the defined sections are placed accordingly in your .prm file&amp;nbsp;&amp;nbsp;For example:&lt;/DIV&gt;&lt;DIV&gt;PLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEFAULT_RAM&amp;nbsp;, MyData&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO&amp;nbsp; RAM;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEFAULT_ROM, ROM_VAR, STRINGS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO&amp;nbsp; ROM;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _DATA_ZEROPAGE, MY_ZEROPAGE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO&amp;nbsp; Z_RAM;&lt;BR /&gt;END&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Check the Compiler_HC08.pdf file for more information on segmentation.&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 20:04:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151842#M3700</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-10-08T20:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: RAM or ROM where is a #define stored?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151843#M3701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks guys, this was really helpful!&lt;BR /&gt;&lt;BR /&gt;The variable is now placed at the adress 80(hex).&lt;BR /&gt;&lt;BR /&gt;best,&lt;BR /&gt;Johannes P.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 20:49:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151843#M3701</guid>
      <dc:creator>ohanica</dc:creator>
      <dc:date>2007-10-08T20:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: RAM or ROM where is a #define stored?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151844#M3702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Just for completeness,&lt;BR /&gt;use&lt;BR /&gt;&lt;BR /&gt;#pragma DATA_SEG __SHORT_SEG MY_ZEROPAGE&lt;BR /&gt;&lt;BR /&gt;With "just" "#pragma DATA_SEG MY_ZEROPAGE" the compiler will place the variables at the expected addresses, but he wont take advantage of the more efficient zero page access. The __SHORT_SEG is especially for this purpose.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 22:56:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/RAM-or-ROM-where-is-a-define-stored/m-p/151844#M3702</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-10-08T22:56:00Z</dc:date>
    </item>
  </channel>
</rss>

