<?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: how to declare a global variable in assembly code with 56f8367 in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-declare-a-global-variable-in-assembly-code-with-56f8367/m-p/218447#M9153</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;This discussion was moved to a better location. &lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Aug 2010 03:00:30 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2010-08-20T03:00:30Z</dc:date>
    <item>
      <title>how to declare a global variable in assembly code with 56f8367</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-declare-a-global-variable-in-assembly-code-with-56f8367/m-p/218445#M9151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;I am using EVM8367 now, can somebody tell me how to declare a global variable in assembly code with&amp;nbsp; 56f8367 and this variable can also be used in C ? thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Aug 2010 20:42:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-declare-a-global-variable-in-assembly-code-with-56f8367/m-p/218445#M9151</guid>
      <dc:creator>Gaoya</dc:creator>
      <dc:date>2010-08-16T20:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to declare a global variable in assembly code with 56f8367</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-declare-a-global-variable-in-assembly-code-with-56f8367/m-p/218446#M9152</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;Assembler directives that can be used to create global variables are described in the 56800x_Assembler.pdf manual.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance you can define a buffer as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;    org x:
    GLOBAL F_S_BUF
F_S_BUF DS 12 ; 12-byte buffer&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The GLOBAL directive instruct the assembler that the symbol needs to be visible from outside of the assembler module where it is declared. The F prefix is added in front of each global symbol by the compiler and is needed here as&amp;nbsp;you intend to access the variable from ANSI C.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ANSI C declaration and access can be done as follows:&lt;/P&gt;&lt;PRE&gt;extern char _S_BUF[12];

int main(void) {
   _S_BUF[1] = 1;
   /* Your code here */
}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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>Tue, 17 Aug 2010 16:51:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-declare-a-global-variable-in-assembly-code-with-56f8367/m-p/218446#M9152</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2010-08-17T16:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to declare a global variable in assembly code with 56f8367</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-declare-a-global-variable-in-assembly-code-with-56f8367/m-p/218447#M9153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;This discussion was moved to a better location. &lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Aug 2010 03:00:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/how-to-declare-a-global-variable-in-assembly-code-with-56f8367/m-p/218447#M9153</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2010-08-20T03:00:30Z</dc:date>
    </item>
  </channel>
</rss>

