<?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>8-bit MicrocontrollersのトピックRe: Clock Cycles for Branch Instructions</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Clock-Cycles-for-Branch-Instructions/m-p/139695#M5424</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The disassembled sample&amp;nbsp;is fairly cryptic, I suspect not being correctly formatted with too many line feeds.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;No istruction in this sample is longer than 4 cycles (CPX opr16a)&lt;/DIV&gt;&lt;DIV&gt;L9D &amp;nbsp;and&amp;nbsp; L4A are alternate labels for &amp;nbsp;testCh21:&amp;nbsp; and&amp;nbsp; testCh22&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It seems to me that [5] is the alternate clock counting to reach the label when the branch is not performed and the intermediate instruction (ORA #opr8i) is done.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Dec 2006 17:10:21 GMT</pubDate>
    <dc:creator>Encoder</dc:creator>
    <dc:date>2006-12-13T17:10:21Z</dc:date>
    <item>
      <title>Clock Cycles for Branch Instructions</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Clock-Cycles-for-Branch-Instructions/m-p/139691#M5420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I'm porting my mind from the world of PIC chips to HCS08.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In the PIC world, a conditional branch instruction takes so many clock cycles to perform, plus a few (2, I think) additional cycles if the branch is taken.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I don't see the same documented in the HCS08 instruction set. Does a conditional branch instruction take the same number of cycles whether or not the branch is taken?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Nevo&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 13:12:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Clock-Cycles-for-Branch-Instructions/m-p/139691#M5420</guid>
      <dc:creator>Nevo</dc:creator>
      <dc:date>2006-12-12T13:12:11Z</dc:date>
    </item>
    <item>
      <title>Re: Clock Cycles for Branch Instructions</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Clock-Cycles-for-Branch-Instructions/m-p/139692#M5421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Nevo,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Yes,&amp;nbsp;three bus cycles whether or not the branch is taken.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 20:57:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Clock-Cycles-for-Branch-Instructions/m-p/139692#M5421</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2006-12-12T20:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Clock Cycles for Branch Instructions</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Clock-Cycles-for-Branch-Instructions/m-p/139693#M5422</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 would advise the S08 CPU Reference Manual which details every intruction available and their access.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Page 145 will interest you.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BLOCKQUOTE dir="ltr" style="MARGIN-RIGHT: 0px"&gt;&lt;DIV&gt;&lt;A href="http://www.freescale.com/files/microcontrollers/doc/ref_manual/HCS08RMV1.pdf?fsrch=1" rel="nofollow" target="_blank"&gt;&lt;FONT color="#2D8AA7"&gt;&lt;STRONG&gt;HCS08RMV1&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/A&gt;&lt;STRONG&gt;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;HCS08 Family Reference Manual&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;DIV dir="ltr"&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV dir="ltr"&gt;&lt;SPAN&gt;Alban.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Dec 2006 21:56:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Clock-Cycles-for-Branch-Instructions/m-p/139693#M5422</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2006-12-12T21:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: Clock Cycles for Branch Instructions</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Clock-Cycles-for-Branch-Instructions/m-p/139694#M5423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thank you, gentlemen!&amp;nbsp; (Alban, I was indeed reading that reference.)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So in a CodeWarrior disassembly, I see this (I wrote the code in assembler):&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;829:      CPX m_ChannelDimValue:20;  0096 c30014   [4]             CPX   m_ChannelDimValue:20  830:      BNE testCh21;  0099 2602     [3]             BNE   L9D ;abs = 009d  831:      ORA #16;  009b aa10     [2]             ORA   #16  009d          [5]     L9D:      832:    testCh21:  833:      CPX m_ChannelDimValue:21;  009d c30015   [4]             CPX   m_ChannelDimValue:21  834:      BNE testCh22;  00a0 2602     [3]             BNE   LA4 ;abs = 00a4  835:      ORA #32;  00a2 aa20     [2]             ORA   #32  00a4          [5]     LA4:      836:    testCh22:&lt;/PRE&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;What is the [5] on the lines with the L9D: and LA4: labels?&amp;nbsp; I'm trying to figure out what instruction there takes 5 clock cycles.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2006 05:47:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Clock-Cycles-for-Branch-Instructions/m-p/139694#M5423</guid>
      <dc:creator>Nevo</dc:creator>
      <dc:date>2006-12-13T05:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Clock Cycles for Branch Instructions</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Clock-Cycles-for-Branch-Instructions/m-p/139695#M5424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The disassembled sample&amp;nbsp;is fairly cryptic, I suspect not being correctly formatted with too many line feeds.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;No istruction in this sample is longer than 4 cycles (CPX opr16a)&lt;/DIV&gt;&lt;DIV&gt;L9D &amp;nbsp;and&amp;nbsp; L4A are alternate labels for &amp;nbsp;testCh21:&amp;nbsp; and&amp;nbsp; testCh22&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It seems to me that [5] is the alternate clock counting to reach the label when the branch is not performed and the intermediate instruction (ORA #opr8i) is done.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Dec 2006 17:10:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Clock-Cycles-for-Branch-Instructions/m-p/139695#M5424</guid>
      <dc:creator>Encoder</dc:creator>
      <dc:date>2006-12-13T17:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Clock Cycles for Branch Instructions</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Clock-Cycles-for-Branch-Instructions/m-p/139696#M5425</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks, Encoder.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It was a good hypothesis.&amp;nbsp; I tested it by adding NOPs to my code but the pesky [5] by the label remains.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I see, however, that there's a separate forum for CodeWarrior issues, so I'm going to drop this thread and start a new thread in the CodeWarrior forum.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2006 07:31:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Clock-Cycles-for-Branch-Instructions/m-p/139696#M5425</guid>
      <dc:creator>Nevo</dc:creator>
      <dc:date>2006-12-14T07:31:06Z</dc:date>
    </item>
  </channel>
</rss>

