huifly520 发表于 2009-3-30 12:32

谁能帮我把这段C代码翻译成汇编,使用指令越少越好。

由于汇编不熟,敬请汇编达人帮忙,翻译成汇编目的是减少指令运行时间<br />这个程序应用在8位单片机上<br />CCAP3H和CCAP3L是个8位的寄存器<br />RecCounter&nbsp;,RecCounterPre&nbsp;,DataInterval&nbsp;是16位的unsigned&nbsp;int<br />RecCounter&nbsp;=&nbsp;CCAP3H;<br />RecCounter&nbsp;=&nbsp;(RecCounter&lt&lt8)+CCAP3L;<br />DataInterval&nbsp;=&nbsp;RecCounter&nbsp;-&nbsp;RecCounterPre;<br />RecCounterPre&nbsp;=&nbsp;RecCounter;<br /><br />谢谢!
页: [1]
查看完整版本: 谁能帮我把这段C代码翻译成汇编,使用指令越少越好。