<?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>S12 / MagniV MicrocontrollersのトピックRe: Basic question on pointers....</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Basic-question-on-pointers/m-p/316406#M10359</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not quite true! y and test are of type unsigned int (16 bits) while the argument to the tester-routine is a pointer to an unsigned char. The compiler will probably give you a warning, but will compile and the program will run. Since the Freescale-controllers are big-endian, the tester-routine will write the number 36 to the most significant byte of the test-integer, giving a result of 0x2400 = 9216.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Sten&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jun 2014 05:06:11 GMT</pubDate>
    <dc:creator>StenS</dc:creator>
    <dc:date>2014-06-17T05:06:11Z</dc:date>
    <item>
      <title>Basic question on pointers....</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Basic-question-on-pointers/m-p/316404#M10357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Consider the following example&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void tester(unsigned char *);&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void main()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;unsigned int test,y;&lt;/P&gt;&lt;P&gt;tester(&amp;amp;test);&lt;/P&gt;&lt;P&gt;y=test&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void tester( unsigned char *x)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;*x=36;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What will be the value&amp;nbsp; of y now?&lt;/P&gt;&lt;P&gt;whether address&amp;nbsp; of test&amp;nbsp; will be removed from the subroutine void tester once its exits!!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please clarify!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 04:20:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Basic-question-on-pointers/m-p/316404#M10357</guid>
      <dc:creator>FIDDO</dc:creator>
      <dc:date>2014-06-10T04:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Basic question on pointers....</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Basic-question-on-pointers/m-p/316405#M10358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Value of y will be 36.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the address of variable test is taken as the value x is pointing to. so the address of variable will hold value 36. &lt;/P&gt;&lt;P&gt;as y is assigned to test, y becomes 36.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-AH&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jun 2014 20:31:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Basic-question-on-pointers/m-p/316405#M10358</guid>
      <dc:creator>ah</dc:creator>
      <dc:date>2014-06-12T20:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: Basic question on pointers....</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Basic-question-on-pointers/m-p/316406#M10359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not quite true! y and test are of type unsigned int (16 bits) while the argument to the tester-routine is a pointer to an unsigned char. The compiler will probably give you a warning, but will compile and the program will run. Since the Freescale-controllers are big-endian, the tester-routine will write the number 36 to the most significant byte of the test-integer, giving a result of 0x2400 = 9216.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/Sten&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jun 2014 05:06:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Basic-question-on-pointers/m-p/316406#M10359</guid>
      <dc:creator>StenS</dc:creator>
      <dc:date>2014-06-17T05:06:11Z</dc:date>
    </item>
  </channel>
</rss>

