<?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 cause function having only its address??? in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-cause-function-having-only-its-address/m-p/207457#M8483</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello Lundin.&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Lundin wrote: C++ will not allow you to convert the address of a non-static member function of a class to a function pointer. For such cases you have to use non-standard extensions to the language, such as inline assembler.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;Completely with you it agree, I on tried to use the assembler, but at me that it has not turned out...... Has not refused if somebody has helped me in the decision of the given problem....&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Dec 2008 23:17:34 GMT</pubDate>
    <dc:creator>admin</dc:creator>
    <dc:date>2008-12-11T23:17:34Z</dc:date>
    <item>
      <title>How to cause function having only its address???</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-cause-function-having-only-its-address/m-p/207453#M8479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings, prompt as it is possible to solve a following problem: it is necessary to cause function, but there is only its address. I write in C++ on CW4.7 for S12XDP. Thought it will be possible to use Assembler inserts, but at me nothing has left.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Dec 2008 15:26:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-cause-function-having-only-its-address/m-p/207453#M8479</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2008-12-05T15:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to cause function having only its address???</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-cause-function-having-only-its-address/m-p/207454#M8480</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;Not sure I understand the question here.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Are you looking for a way to call a function which reside at a specified address from a ANSI C function?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If this is what you are looking for you can use a constant function pointer to call the function.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Something as follows:&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; void (*const fktPtr)(void) = (void(*)(void))0x1234;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; void main(void) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fktPtr();&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This will call function located at address 0x1234.&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>Fri, 05 Dec 2008 19:00:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-cause-function-having-only-its-address/m-p/207454#M8480</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2008-12-05T19:00:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to cause function having only its address???</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-cause-function-having-only-its-address/m-p/207455#M8481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks for the help, I also had it in view of. I believed that for nonstatic function such design will not work. Thanks :smileywink:&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 14:19:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-cause-function-having-only-its-address/m-p/207455#M8481</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2008-12-11T14:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to cause function having only its address???</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-cause-function-having-only-its-address/m-p/207456#M8482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;C++ will not allow you to convert the address of a non-static member function of a class to a function pointer. For such cases you have to use non-standard extensions to the language, such as inline assembler.&lt;BR /&gt;&lt;BR /&gt;This is one of the reasons why C++ is less suitable than C for embedded systems.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 22:28:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-cause-function-having-only-its-address/m-p/207456#M8482</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2008-12-11T22:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to cause function having only its address???</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-cause-function-having-only-its-address/m-p/207457#M8483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello Lundin.&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Lundin wrote: C++ will not allow you to convert the address of a non-static member function of a class to a function pointer. For such cases you have to use non-standard extensions to the language, such as inline assembler.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;Completely with you it agree, I on tried to use the assembler, but at me that it has not turned out...... Has not refused if somebody has helped me in the decision of the given problem....&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Dec 2008 23:17:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/How-to-cause-function-having-only-its-address/m-p/207457#M8483</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2008-12-11T23:17:34Z</dc:date>
    </item>
  </channel>
</rss>

