<?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>Classic/Legacy CodeWarriorのトピックRe: How to get a CPU register value in a c file?</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-get-a-CPU-register-value-in-a-c-file/m-p/128453#M297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;You have to use inline assembly to retrieve value from a register in a C variable.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The assembler instructions then depends on the CPU you are targeting.&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, 28 Aug 2006 17:09:48 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2006-08-28T17:09:48Z</dc:date>
    <item>
      <title>How to get a CPU register value in a c file?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-get-a-CPU-register-value-in-a-c-file/m-p/128452#M296</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;I want to get the SP and IX value in a c file, how to do it?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 08:39:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-get-a-CPU-register-value-in-a-c-file/m-p/128452#M296</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2006-08-28T08:39:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a CPU register value in a c file?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-get-a-CPU-register-value-in-a-c-file/m-p/128453#M297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;You have to use inline assembly to retrieve value from a register in a C variable.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The assembler instructions then depends on the CPU you are targeting.&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, 28 Aug 2006 17:09:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-get-a-CPU-register-value-in-a-c-file/m-p/128453#M297</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-08-28T17:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a CPU register value in a c file?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-get-a-CPU-register-value-in-a-c-file/m-p/128454#M298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Well, it shouldn't be impossible to get the SP through ANSI C:&lt;BR /&gt;&lt;BR /&gt;unsigned char* stackPtr;&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;volatile unsigned char foo;&lt;BR /&gt;stackPtr = &amp;amp;foo + sizeof(foo);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;But I would still recommend inline asm in this case. And to get index registers etc, you must use it.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2006 17:24:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-get-a-CPU-register-value-in-a-c-file/m-p/128454#M298</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2006-08-28T17:24:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a CPU register value in a c file?</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-get-a-CPU-register-value-in-a-c-file/m-p/128455#M299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Lower 16-bits of the SP you can get by the following code.&lt;BR /&gt;&lt;BR /&gt;volatile unsigned int StackPtr;&lt;BR /&gt;&lt;BR /&gt;asm(move.w SP,StackPtr);&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2006 13:33:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/How-to-get-a-CPU-register-value-in-a-c-file/m-p/128455#M299</guid>
      <dc:creator>marvin</dc:creator>
      <dc:date>2006-08-30T13:33:33Z</dc:date>
    </item>
  </channel>
</rss>

