<?xml version="1.0" encoding="GB2312"?>  
<rss version="2.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/" 
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" 
xmlns:admin="http://webns.net/mvcb/" 
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> 
  
<channel> 
<title><![CDATA[Make everyday colorful！]]></title> 
<link>http://chongsoft.bokee.com/index.html</link> 
<description><![CDATA[学而下者谓之器，学而上者谓之道 ]]></description> 
<dc:language>zh-cn</dc:language> 
<dc:creator>email</dc:creator> 
<dc:date>2009-01-16T12:30:50Z</dc:date> 
<admin:generatorAgent rdf:resource="http://blog.bokee.com.com" /> 

<item> 
<title><![CDATA[ARM Linux中断向量表搬移设计过程 ]]></title> 
<link>http://chongsoft.bokee.com/6872424.html</link> 
<description><![CDATA[<h3 style="MARGIN: 13pt 0cm; TEXT-ALIGN: center" align="center"><font size="5"><span lang="EN-US"><font face="Times New Roman">ARM Linux</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">中断向量表搬移设计过程</span></font></h3><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: right" align="right"><b style="mso-bidi-font-weight: normal"><span lang="EN-US"><font face="Times New Roman" size="3">Copyright </font></span></b><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">&amp;copy; <span style="mso-spacerun: yes">&amp;nbsp;</span></span><b style="mso-bidi-font-weight: normal"><span lang="EN-US"><font size="3"><font face="Times New Roman">by Chongsoft, 2009-3-8<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: right" align="right"><b style="mso-bidi-font-weight: normal"><span lang="EN-US"><font size="3"><font face="Times New Roman">ccerty_cn@yahoo.com.cn<p /></font></font></span></b></p><h3 style="MARGIN: 13pt 0cm"><font size="5"><span lang="EN-US"><font face="Times New Roman">Preface </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">引言</span></font></h3><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">我在这里用一些篇幅来描述一下</span><span lang="EN-US"><font face="Times New Roman">arm</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">体系结构下</span><span lang="EN-US"><font face="Times New Roman">Linux</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">中怎样来初始化中断向量表的，因为这个方法很具有通用性，我把它叫做代码大挪移。您说搬代码谁不会阿，不就是拷贝吗，的确如此，但是拷贝也有技巧。拷贝很简单啦，其实就是</span><span lang="EN-US"><font face="Times New Roman">memcpy,</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">这不用提，我在这里想说的是，你怎么把你的代码设计成能随便拷贝的，换句专业的术语，叫与位置无关的代码，拷到哪都能用。我以前也用过类似的方法作启动，今天拿来说说。</span></font></p><h3 style="MARGIN: 13pt 0cm"><font size="5"><span lang="EN-US"><font face="Times New Roman">Scenario 1<span style="mso-spacerun: yes">&amp;nbsp; </span></font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">第一场景</span><span lang="EN-US"><font face="Times New Roman"> copy</font></span></font></h3><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">我们先看实际复制动作。代码的位置在</span><span lang="EN-US"><font face="Times New Roman">arch/arm/traps.c</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">中，</span><span lang="EN-US"><font face="Times New Roman">kernel version: 2.6.27</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">。</span><font face="Times New Roman"> </font><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">这个是初始化部分的代码，</span><span lang="EN-US"><font face="Times New Roman">setup_arch()-&amp;gt;early_trap_init(). </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">熟悉初始化部分的朋友们可能见到过这段代码。</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font face="Times New Roman" size="3">void __init early_trap_init(void)</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font face="Times New Roman" size="3">{</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>unsigned long vectors = CONFIG_VECTORS_BASE;<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>extern char __stubs_start[], __stubs_end[];<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>extern char __vectors_start[], __vectors_end[];<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>extern char __kuser_helper_start[], __kuser_helper_end[];</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>int kuser_sz = __kuser_helper_end - __kuser_helper_start;</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>/*</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span><span style="mso-spacerun: yes">&amp;nbsp;</span>* Copy the vectors, stubs and kuser helpers (in entry-armv.S)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span><span style="mso-spacerun: yes">&amp;nbsp;</span>* into the vector page, mapped at 0xffff0000, and ensure these</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span><span style="mso-spacerun: yes">&amp;nbsp;</span>* are visible to the instruction stream.</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lag="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span><span style="mso-spacerun: yes">&amp;nbsp;</span>*/</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>memcpy((void *)vectors, __vectors_start, __vectors_end - __vectors_start);<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>memcpy((void *)vectors + 0x200, __stubs_start, __stubs_end - __stubs_start);<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>memcpy((void *)vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz);</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>…</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font face="Times New Roman" size="3">}</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">实际</span><span lang="EN-US"><font face="Times New Roman">copy</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">动作一目了然，就是两个</span><span lang="EN-US"><font face="Times New Roman">memcpy</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">（第三个实际上是拷贝一些别的东西，原理是一样的，这里不提了）</span><span lang="EN-US"><font face="Times New Roman">. Copy</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">的源是</span><span lang="EN-US"><font face="Times New Roman">vectors,</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">这个值是</span><span lang="EN-US" style="COLOR: red"><font face="Times New Roman">CONFIG_VECTORS_BASE</font></span><span style="COLOR: red; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">，</span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">一般来讲，是</span><span lang="EN-US"><font face="Times New Roman">0xffff0000,</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">当然你可以根据硬件的设定自己配制这个值。把什么东西往那</span><span lang="EN-US"><font face="Times New Roman">copy</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">呢</span><span lang="EN-US"><font face="Times New Roman">?</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">第一部分是从</span><span lang="EN-US" style="COLOR: red"><font face="Times New Roman">__vectors_start</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">到</span><span lang="EN-US" style="COLOR: red"><font face="Times New Roman">__vectors_end</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">之间的代码，第二部分是从</span><span lang="EN-US" style="COLOR: red"><font face="Times New Roman">__stubs_start</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">到</span><span lang="EN-US" style="COLOR: red"><font face="Times New Roman">__stubs_end</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">之间的代码，而第二部分是</span><span lang="EN-US"><font face="Times New Roman">copy</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">到</span><span lang="EN-US"><font face="Times New Roman">vectors + 0x200</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">起始的位置。也就是说，两部分之间的距离是</span><span lang="EN-US"><font face="Times New Roman">0x200,</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">即</span><span lang="EN-US"><font face="Times New Roman">512</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">个字节。</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">我们来看</span><span lang="EN-US" style="COLOR: red"><font face="Times New Roman">__vectors_start</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">，</span><span lang="EN-US" style="COLOR: red"><font face="Times New Roman">__vectors_end</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">，</span><span lang="EN-US" style="COLOR: red"><font face="Times New Roman">__stubs_start</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">，</span><span lang="EN-US" style="COLOR: red"><font face="Times New Roman">__stubs_end</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">到底是什么东西，只要知道它们在哪里定义的，就知道怎么回事了。</span></font></p><h3 style="MARGIN: 13pt 0cm"><font size="5"><span lang="EN-US"><font face="Times New Roman">Scenario 2<span style="mso-spacerun: yes">&amp;nbsp; </span></font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">第二场景</span><font face="Times New Roman"> </font><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">主角闪亮登场</span></font></h3><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">它们埋伏在</span><span lang="EN-US"><font face="Times New Roman">arch/arm/kernel/entry-armv.S</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">中，这个文件是</span><span lang="EN-US"><font face="Times New Roman">arm</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">中各个模式的入口代码，熟悉</span><span lang="EN-US"><font face="Times New Roman">arm</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">的朋友们知道</span><span lng="EN-US"><font face="Times New Roman">arm</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">有几种模式，不知道的自己查查，不说了。我们取一个片断，和我们的阐述相关的部分。为了让大家看得更清楚，我删掉了部分代码和注释，把主干凸显出来。有兴趣的朋友可以查看源代码，研究全部，里面还是比较有内涵的。</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.globl<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__stubs_start<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman">__stubs_start:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font face="Times New Roman" size="3">/*</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;</span>* Interrupt dispatcher</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;</span>*/</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_stub<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>irq, IRQ_MODE, 4</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">// </font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">请注意这里：</span><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">vector_stub</font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">是一个宏，展开后是一块代码，下面是个跳转表，我们将代码结</span><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">// </font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">构展开，大致是这样的结构</span><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">: (</font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">后面的</span><span lang="EN-US"><font face="Times New Roman">vector_stub<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>dabt, ABT_MODE, 8</font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">等展开过程全一样，在此略过不提</span><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">)<p /></font></span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">// -------------------------------- begin </font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">展开</span><span lang="EN-US" style="COLOR: blue"><p /></span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">.align<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>5<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">vector_irq:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span><span style="COLOR: blue">sub<span style="mso-tab-count: 1">&amp;nbsp; </span>lr, lr, 4<p /></span></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span><p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@ Save r0, lr_&amp;lt;exception&amp;gt; (parent PC) and spsr_&amp;lt;exception&amp;gt;<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@ (parent CPSR)<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>stmia<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>sp, {r0, lr}<span style="mso-tab-count: 2">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@ save r0, lr<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>mrs<span style="mso-tab-count: 1">&amp;nbsp; </span>lr, spsr<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>str<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp; </span>lr, [sp, #8]<span style="mso-tab-count: 2">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@ save spsr<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span><p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@ Prepare for SVC32 mode.<span style="mso-spacerun: yes">&amp;nbsp; </span>IRQs remain disabled.<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font sie="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>mrs<span style="mso-tab-count: 1">&amp;nbsp; </span>r0, cpsr<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>eor<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp; </span>r0, r0, IRQ_MODE ^ SVC_MODE)<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>msr<span style="mso-tab-count: 1">&amp;nbsp; </span>spsr_cxsf, r0<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span><p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@ the branch table must immediately follow this code<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>and<span style="mso-tab-count: 1">&amp;nbsp; </span>lr, lr, #0x0f<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>mov<span style="mso-tab-count: 1"> </span>r0, sp<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>ldr<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp; </span>lr, [pc, lr, lsl #2]<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>movs<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>pc, lr<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@ branch to handler in SVC mode<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span><span style="COLOR: blue">// -------------------------------- end </span></font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">展开</span><span lang="EN-US" style="COLOR: blue"><p /></span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__irq_usr<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>0<span style="mso-spacerun: yes">&amp;nbsp; </span>(USR_26 / USR_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__irq_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>1<span style="mso-spacerun: yes">&amp;nbsp; </span>(FIQ_26 / FIQ_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__irq_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>2<span style="mso-spacerun: yes">&amp;nbsp; </span>(IRQ_26 / IRQ_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__irq_svc<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>3<span style="mso-spacerun: yes">&amp;nbsp; </span>(SVC_26 / SVC_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><span style="mso-tab-count: 1"><font face="Times New Roman">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">。。。</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span lang="EN-US"><font face="Times New Roman" size="3">.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__irq_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>f</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font face="Times New Roman" size="3">/*</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;</span>* Data abort dispatcher</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-sacerun: yes">&amp;nbsp;</span>* Enter in ABT mode, spsr = USR CPSR, lr = USR PC</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;</span>*/</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_stub<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>dabt, ABT_MODE, 8</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__dabt_usr<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>0<span style="mso-spacerun: yes">&amp;nbsp; </span>(USR_26 / USR_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__dabt_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>1<span style="mso-spacerun: yes">&amp;nbsp; </span>(FIQ_26 / FIQ_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__dabt_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>2<span style="mso-spacerun: yes">&amp;nbsp; </span>(IRQ_26 / IRQ_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__dabt_svc<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>3<span style="mso-spacerun: yes">&amp;nbsp; </span>(SVC_26 / SVC_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><span style="mso-spacerun: yes"><font face="Times New Roman">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">。。。</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__dabt_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>f</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font face="Times New Roman" size="3">/*</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;</span>* Prefetch abort dispatcher</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;</span>* Enter in ABT mode, spsr = USR CPSR, lr = USR PC</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;</span>*/</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_stub<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>pabt, ABT_MODE, 4</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__pabt_usr<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>0 (USR_26 / USR_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__pabt_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>1 (FIQ_26 / FIQ_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__pabt_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>2 (IRQ_26 / IRQ_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__pabt_svc<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>3 (SVC_2 / SVC_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman""><font size="3">。。。</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__pabt_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>f</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font face="Times New Roman" size="3">/*</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;</span>* Undef instr entry dispatcher</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;</span>* Enter in UND mode, spsr = SVC/USR CPSR, lr = SVC/USR PC</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;</span>*/</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_stub<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>und, UND_MODE</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__und_usr<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>0 (USR_26 / USR_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__und_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>1 (FIQ_26 / FIQ_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__und_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>2 (IRQ_26 / IRQ_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__und_svc<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>3 (SVC_26 / SVC_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US"><span style="mso-spacerun: yes"><font face="Times New Roman">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">。。。</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__und_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>f</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.align<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>5</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font face="Times New Roman" size="3">vector_fiq:</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>disable_fiq</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>subs<span style="mso-tab-count: 1"> </span>pc, lr, #4</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font face="Times New Roman" size="3">vector_addrexcptn:</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_addrexcptn</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font face="Times New Roman" size="3">/*</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;</span>* We group all the following data together to optimise</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;</span>* for CPUs with separate I &amp;amp; D caches.</fnt></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;</span>*/</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.align<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>5</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font face="Times New Roman" size="3">.LCvswi:</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.word<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_swi</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.globl<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__stubs_end<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman">__stubs_end:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.equ<span style="mso-tab-count: 1"> </span>stubs_offset, __vectors_start + 0x200 - __stubs_start</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.globl<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__vectors_start<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman">__vectors_start:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>swi<span style="mso-tab-count: 1">&amp;nbsp; </span>SYS_ERROR0</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_und + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>ldr<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp; </span>pc, .LCvswi + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_pabt + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_dabt + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_addrexcptn + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_irq + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_fiq + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.globl<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__vectors_end<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman">__vectors_end:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman""><font size="3">为了让大家看得更清，我把代码的结构再次简化成这样：</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.globl<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__stubs_start<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman">__stubs_start:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">.align<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>5<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">vector_irq:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font sie="3"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">[code part]<span style="mso-spacerun: yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>// </font></span></b><b style="mso-bidi-font-weight: normal"><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">展开代码</span><span lang="EN-US" style="COLOR: blue"><p /></span></b></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">[jump table part]<span style="mso-spacerun: yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>// </font></span></b><b style="mso-bidi-font-weight: normal"><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">地址跳转表</span><span lang="EN-US" style="COLOR: blue"><p /></span></b></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman""><font size="3">。。。</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">.align<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>5<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">vector_dabt:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">[code part]<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">[jump table part]<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><font size="3"><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">。。。</span><span lang="EN-US" style="COLOR: blue"><p /></span></font></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">.align<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>5<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">vector_ pabt:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">[code part]<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">[jump table part]<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">。。。</span><span lang="EN-US" style="COLOR: blue"><p /></span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">.align<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>5<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">vector_und:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">[code part]<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">[jump table part]<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">。。。</span><span lang="EN-US" style="COLOR: blue"><p /></span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">.align<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>5<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">vector_fiq:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><font size="3"><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">。。。</span><span lang="EN-US" style="COLOR: blue"><p /></span></font></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.globl<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__stubs_end<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman">__stubs_end:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.globl<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__vectors_start<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman">__vectors_start:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbp;&amp;nbsp;&amp;nbsp; </span>swi<span style="mso-tab-count: 1">&amp;nbsp; </span>SYS_ERROR0</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_und + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>ldr<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp; </span>pc, .LCvswi + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_pabt + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_dabt + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_addrexcptn + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_irq + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_fiq + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.globl<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__vectors_end<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman">__vectors_end:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">在这里我不花过多的篇幅去解释代码的意思，这不是本文的目的，只要你把结构看清，就达到目的了。但我会花点时间研究一下展开代码部分（蓝色）的特征</span><span lang="EN-US"><font face="Times New Roman">,</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">这部分代码是与位置无关的代码，我们稍微研究一下，它为什么会这么写。</span><span lang="EN-US" style="COLOR: blue"><p /></span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">.align<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>5<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">vector_irq:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">[code part]<span style="mso-spacerun: yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>// </font></span></b><b style="mso-bidi-font-weight: normal"><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">展开代码</span><span lang="EN-US" style="COLOR: blue"><p /></span></b></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">[jump table part]<span style="mso-spacerun: yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>// </font></span></b><b style="mso-bidi-font-weight: normal"><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">地址跳转表</span><span lang="EN-US" style="COLOR: blue"><p /></span></b></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman""><font size="3">。。。</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman""><font size="3">首先这部分代码大致都是一样的结构，前面是一些代码，后面跟着一个跳转表。跳转表里面定义了一些地址。我们截取这部分看</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman""><font size="3">。。。</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">@ the branch table must immediately follow this code<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">@<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: -21pt; mso-char-indent-count: -2.0"><font size="3"><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">and<span style="mso-tab-count: 1">&amp;nbsp; </span>lr, lr, #0x0f<span style="mso-spacerun: yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>(1)<span style="mso-spacerun: yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>// lr</font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">中当前存储了上一个状态寄存器的值，对后几位做与，</span><span lang="EN-US" style="COLOR: blue"><p /></span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 147pt; mso-char-indent-count: 14.0"><font size="3"><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">// </font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Rman"">就是取在中断前处在用户态还是核心态，这个值用作跳</span><span lang="EN-US" style="COLOR: blue"><p /></span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 147pt; mso-char-indent-count: 14.0"><font size="3"><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">// </font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">转表的索引</span><span lang="EN-US" style="COLOR: blue"><p /></span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">mov<span style="mso-tab-count: 1"> </span>r0, sp<span style="mso-spacerun: yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>(2) <span style="mso-spacerun: yes">&amp;nbsp;</span>// </font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">用做他用，</span><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">sp</font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">值当第一个参数传给后面函数</span><span lang="EN-US" style="COLOR: blue"><p /></span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">ldr<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp; </span>lr, [pc, lr, lsl #2]<span style="mso-spacerun: yes">&amp;nbsp;&amp;nbsp; </span>(3)<span style="mso-spacerun: yes">&amp;nbsp; </span>// pc</font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">是当前执行指令地址加</span><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">8</font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">，即跳转表的基地址，</span><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">lr</font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">是索引</span><span lang="EN-US" style="COLOR: blue"><p /></span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><font size="3"><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman"><span style="mso-spacerun: yes">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>// </font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">很好的技巧，取</span><span lang="EN-US" style="COLOR: blue"><font face="Times New Roman">pc</font></span><span style="COLOR: blue; FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">找当前地址什么时候都没错</span><span lang="EN-US" style="COLOR: blue"><p /></span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">movs<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>pc, lr<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@ branch to handler in SVC mode<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><font size="3"><font face="Times New Roman">[jump table]<p /></font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__irq_usr<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>0<span style="mso-spacerun: yes">&amp;nbsp; </span>(USR_26 / USR_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__irq_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>1<span style="mso-spacerun: yes">&amp;nbsp; </span>(FIQ_26 / FIQ_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__irq_invalid<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>2<span style="mso-spacerun: yes">&amp;nbsp; </span>(IRQ_26 / IRQ_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.long<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__irq_svc<span style="mso-tab-count: 3">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>@<span style="mso-spacerun: yes">&amp;nbsp; </span>3<span style="mso-spacerun: yes">&amp;nbsp; </span>(SVC_26 / SVC_32)</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="COLOR: blue"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span><span lang="EN-US" style="COLOR: blue"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">真正的跳转在最后一句完成，大家都看得很清楚。跳到哪里去了，如果中断以前是</span><span lang="EN-US"><font face="Times New Roman">svc</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">模式，就会跳到</span><span lang="EN-US"><font face="Times New Roman">__irq_svc</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">。我们发现这里不会直接用</span><span lang="EN-US"><font face="Times New Roman">b(bl,bx</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-amily: "Times New Roman"">等</span><span lang="EN-US"><font face="Times New Roman">)</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">个，</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42.1pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 42.1pt"><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><span style="mso-list: Ignore"><font size="3">ü</font><span style="FONT: 7pt "Times New Roman"">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span></span></span><font size="3"><b style="mso-bidi-font-weight: normal"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">一是</span><span lang="EN-US"><font face="Times New Roman">b</font></span></b><b style="mso-bidi-font-weight: normal"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">跳转后面是个偏移，而这个偏移是有限制的，不能太大</span><span lang="EN-US"><p /></span></b></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 42.1pt; TEXT-INDENT: -21pt; LINE-HEIGHT: 150%; mso-list: l0 level1 lfo1; tab-stops: list 42.1pt"><span lang="EN-US" style="FONT-FAMILY: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings"><span style="mso-list: Ignore"><font size="3">ü</font><span style="FONT: 7pt "Times New Roman"">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span></span></span><font size="3"><b style="mso-bidi-font-weight: normal"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">二是</span><span lang="EN-US"><font face="Times New Roman">b</font></span></b><b style="mso-bidi-font-weight: normal"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">跳转后面的偏移你不知道在代码拷贝后还是不是那个样子，因为我们要搬移代码，所以如果你不能确定搬移后的偏移不变，那你就用绝对地址，而上面的代码前三句就是算出绝对地址来，然后用绝对地址赋值给</span><span lang="EN-US"><font face="Times New Roman">pc</font></span></b><b style="mso-bidi-font-weight: normal"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">直接完成跳转。</span><span lang="EN-US"><p /></span></b></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">这些都是一些技巧，总之你要注意的是写位置无关的代码时涉及到跳转部分，用</span><span lang="EN-US"><font face="Times New Roman">b</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">跳转还是直接赋成绝对地址（通过跳转表实现），如果你不能保证搬移后的偏移一致，写这部分就要注意了，要用一些技巧的。</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">大家可以去用</span><span lang="EN-US"><font face="Times New Roman">gcc </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">的</span><span lang="EN-US"><font face="Times New Roman">-fPIC</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">和</span><span lang="EN-US"><font face="Times New Roman">-S</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">选项汇编一个小的函数看看，</span><span lang="EN-US"><font face="Times New Roman">fPIC</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">就是与位置无关选项，相信编译过动态库的人都熟悉，看看它是怎么做的。你会发现异曲同工。</span></font></p><h3 style="MARGIN: 13pt 0cm"><font size="5"><span lang="EN-US"><font face="Times New Roman">Scenario 3<span style="mso-spacerun: yes">&amp;nbsp; </span></font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">第三场景</span><font face="Times New Roman"> </font><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">大搬移</span></font></h3><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">我用一个章节来介绍大搬移的过程，以及一些在搬移中</span><span lang="EN-US"><font face="Times New Roman">Linux</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">出现的问题及解决方案。我把整个的搬移过程做成一张图里，然后讨论了一些技术细节。我们看到这是一个巨大无比的图，我们这章节的所阐述的内容都在图里。</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"><stroke joinstyle="miter" /><formulas><f eqn="if lineDrawn pixelLineWidth 0" /><f eqn="sum @0 1 0" /><f eqn="sum 0 0 @1" /><f eqn="prod @2 1 2" /><f eqn="prod @3 21600 pixelWidth" /><f eqn="prod @3 21600 pixelHeight" /><f eqn="sum @0 0 1" /><f eqn="prod @6 1 2" /><f eqn="prod @7 21600 pixelWidth" /><f eqn="sum @8 21600 0" /><f eqn="prod @7 21600 pixelHeight" /><f eqn="sum @10 21600 0" /></formulas><path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" /><lock v:ext="edit" aspectratio="t" /></shapetype></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;<img alt=" 大搬移" src="http://chongsoft.bokee.com/inc/movement.gif" onload="javascript: img_auto_size(this,450,true);" align="baseline" /></font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman""></span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">我们将搬移前的代码组织称为</span><span lang="EN-US"><font face="Times New Roman">Code/Load </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">视图，因为这是代码中的（或</span><span lang="EN-US"><font face="Times New Roman">image</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">中的）组织情况，把搬移后的代码组织称为</span><span lang="EN-US"><font face="Times New Roman">Exec</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">视图，反映的是代码执行时代码在内存中的情况。我刚才讲过了第一场景的情况，忘了的回到第一场景中去看，两个</span><span lang="EN-US"><font face="Times New Roman">memcpy</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">的执行过程在图中也有表示，就是蓝色和红色的带箭头的虚线这就是代码从</span><span lang="EN-US"><font face="Times New Roman">code view</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">到</span><span lang="EN-US"><font face="Times New Roman">exec view</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">的拷贝过程，一目了然，不用多说。</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">现在出现了一个问题，就是我们发现在</span><span lang="EN-US"><font face="Times New Roman">__vector_start</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">和</span><span lang="EN-US"><font face="Times New Roman">__vector_end</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">之间的代码有点怪异，我们再次摘到这里来看：</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; mso-char-indent-count: 2.0"><span lang="EN-US"><font face="Times New Roman" size="3">.equ<span style="mso-tab-count: 1"> </span>stubs_offset, __vectors_start + 0x200 - __stubs_start</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.globl<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__vectors_start<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman">__vectors_start:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>swi<span style="mso-tab-count: 1">&amp;nbsp; </span>SYS_ERROR0</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_und + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>ldr<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp; </span>pc, .LCvswi + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_pabt + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_dabt + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_addrexcptn + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_irq + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_fiq + stubs_offset</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.globl<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>__vectors_end<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><font size="3"><font face="Times New Roman">__vectors_end:<p /></font></font></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></b></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">在第二个场景中我们说过，这叫做位置无关的代码，因为要拷贝到别的地方。而且里面都是跳转指令。我们发现了除了第三个行代码用了绝对地址进行了跳转，其它都是用的</span><span lang="EN-US"><font face="Times New Roman">b</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">跳转。举个例子，</span><span lang="EN-US"><font face="Times New Roman">b<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_dabt + stubs_offset</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">，</span><span lang="EN-US"><font face="Times New Roman">(vector_dabt</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">在</span><span lang="EN-US"><font face="Times New Roman">__stubs_start</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">和</span><span lang="EN-US"><font face="Times New Roman">__stubs_end</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">之间</span><span lang="EN-US"><font face="Times New Roman">)</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">，如果你用</span><span lang="EN-US"><font face="Times New Roman">b vector_dabt, </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">这肯定是有问题的，因为</span><span lang="EN-US"><font face="Times New Roman">copy</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">之后</span><span lang="EN-US"><font face="Times New Roman">exec view</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roan"; mso-hansi-font-family: "Times New Roman"">的组织（</span><span lang="EN-US"><font face="Times New Roman">map</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">）是不一样的，所以</span><span lang="EN-US"><font face="Times New Roman">b</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">后这个偏移就不对了。这里面，我们就要对这个偏移进行一次调整。</span><span lang="EN-US"><font face="Times New Roman">Stubs_offset</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">就是这个调整值，是可以计算出来的，具体的计算过程在图中讲得比较清楚，这里不提了。大家可以在图中看到详细的推导过程。</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">其实尽管</span><span lang="EN-US"><font face="Times New Roman">ldr<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp; </span>pc, .LCvswi + stubs_offset</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">这条指令用的是绝对地址跳转，用得跳转表的方法，但找地址的过程也用到了这个技术。我们看到</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.align<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>5</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><span lang="EN-US"><font face="Times New Roman" size="3">.LCvswi:</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><span lang="EN-US"><font size="3"><font face="Times New Roman"><span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>.word<span style="mso-tab-count: 1">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span>vector_swi</font></font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span lang="EN-US"><font face="Times New Roman">.LCvswi</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">这个位置存储的是一个地址，就是要跳到这个地方。</span><span lang="EN-US"><font face="Times New Roman">.align 5</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">的意思是</span><span lang="EN-US"><font face="Times New Roman">32</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">字节对齐，这个是保证</span><span lang="EN-US"><font face="Times New Roman">cache line</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">对齐的，不提了。在</span><span lang="EN-US"><font face="Times New Roman">exec view</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">中找这个地址，就得加上个</span><span lang="EN-US"><font face="Times New Roman">offset.</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">原理是一样的，因为</span><span lang="EN-US"><font face="Times New Roman">.LCvswi</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">在</span><span lang="EN-US"><font face="Times New Roman">__stubs_start</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">和</span><span lang="EN-US"><font face="Times New Roman">__stubs_end</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">之间，这个区域被搬移了，不能直接用这个标签地址了，</span><span lang="EN-US"><font face="Times New Roman">vector_swi</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">没有被搬移，所以可以直接用。</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0"><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">总结一下。我觉得我要讲的东西虽然是</span><span lang="EN-US"><font face="Times New Roman">Linux</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">中的技术细节，描述的确是代码搬移过程原理和注意事项。其实更重要的是，我们如何把这一个过程倒过来，即在涉及到代码搬移的场合中如何进行设计，如何运用这些技术实现这一设计过程。你可以遵循这样的指导步骤：</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-list: l1 level1 lfo2; tab-stops: list 18.0pt"><span lang="EN-US" style="mso-fareast-font-family: "Times New Roman""><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">1．</font><span style="FONT: 7pt "Times New Roman"">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span></font></span></span><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">画出那个大图来，按自己的要求确定</span><span lang="EN-US"><font face="Times New Roman">Code view</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">和</span><span lang="EN-US"><font face="Times New Roman">Exec view, </font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">设计搬移区段和设计搬移的位置</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-list: l1 level1 lfo2; tab-stops: list 18.0pt"><span lang="EN-US" style="mso-fareast-font-family: "Times New Roman""><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">2．</font><span style="FONT: 7pt "Times New Roman"">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span></font></span></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman""><font size="3">写出要搬移的代码，运用位置无关的技术（上面提到的）进行编码和检验</font></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 18pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 150%; mso-char-indent-count: 2.0; mso-list: l1 level1 lfo2; tab-stops: list 18.0pt"><span lang="EN-US" style="mso-fareast-font-family: "Times New Roman""><span style="mso-list: Ignore"><font face="Times New Roman"><font size="3">3．</font><span style="FONT: 7pt "Times New Roman"">&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; </span></font></span></span><font size="3"><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">用类似</span><span lang="EN-US"><font face="Times New Roman">memcpy</font></span><span style="FONT-FAMILY: 宋体; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">的代码进行搬移</span></font></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21.1pt; mso-char-indentcount: 2.0"><b style="mso-bidi-font-weight: normal"><span lang="EN-US" style="COLOR: red"><p><font face="Times New Roman" size="3">&amp;nbsp;</font></p></span></b></p>]]></description> 
<guid isPermaLink="false">6872424@http://chongsoft.bokee.com/</guid> 
<dc:subject>Linux kernel</dc:subject> 
<dc:date>2009-03-08T17:21:22Z</dc:date> 
</item> 
<item> 
<title><![CDATA[S3C2440 中断系统 （转）]]></title> 
<link>http://chongsoft.bokee.com/6856264.html</link> 
<description><![CDATA[<h2 class="date-header" /><div class="post uncustomized-post-template"><div class="post-header-line-1"></div><div class="post-body"><p>原理：<br />CPU在正常執行工作時，由CPU內部或外部產生例外的request，要求 CPU suspend working job，做些必要的處理，以滿足各種預料外的狀況。<br /><br />種類：<br />有兩種 硬體中斷 and 軟體中斷<br />硬體中斷：<br />硬體 能夠利用CPU的 interrupt request signal 來通知CPU中斷<br />軟體中斷：<br />CPU自己發出<br /><br />處理interrupt原則<br />1.當下 CPU狀態記錄下來<br />2.跳到中斷處理程式做中斷處理<br /><br /><br />S3C2440 user manual第十四章有提及 interrupt controller<br />1.提供60個 interrupt sources, including DMA controller, UART, IIC, USB host and device, RTC(INT_TICK:RTC Time tick interrupt)[INT_RTC:RTC alarm interrupt].<br />2.interrupt request分兩種 FIQ(fast interrupt request) and IRQ(normal interrupt request)<br />3.CPU會根據硬體優先權 把結果寫到 interrupt pending register (紀錄哪個中斷產生)<br />，S3C2440A有兩個 interrupt pending registers: source pending register (SRCPND) and interrupt pending register(INTPND) 負責紀錄哪個中斷需要產生<br />如果要中斷來源要產生中斷，相對應SRCPND = 1 and INTPND = 1<br />4. interrupt mask register 負責作遮罩 讓某個中斷disable<br /><br /><br />INTERRUPT PRIORITY GENERATRING BLOCK<br />有32個 interrupt requests<br />先由6個 arbiter(仲裁者)x<br />決定誰的中斷可以採納 轉成 req0~5<br />最後交給第7個中斷來決定<br /><br />arbiter<br />每個仲裁者 有one bit arbiter mode control(ARB_MODE) and two bits of selection control signals(ARB_SEL)<br />ARB_MODE 則負責啟動or 關閉 the function - 調整優先權<br />ARB_SEL 調整 interrupt 優先權順序<br /><br /><br />INTERRUPT CONTROLLER SPECIAL REGISTERS<br />1. source pending register (SRCPND)：所有 interrupt request from the interrupt sources 被登記到 source pending register<br />SRCPND 位置在 0x4A000000 R/W<br />0 = The interrupt has not been requested<br />這樣來說 哪個interrupt source要產生interrupt 先在此註冊(registe)<br />ex. 啟動RTC tick interrupt<br />設定此register為(0x1&amp;lt;&amp;lt;8)<br /><br />2. interrupt mode register: 紀錄 interrupt request mode: FIQ and IRQ<br />0 = IRQ mode<br />1 = FIQ mode<br />順帶一提<br />只有一個interrupt能夠被設定為FIQ mode in the interrupt controller<br />(our system doesn't use this much)<br /><br />3. interrupt mask register(INTMSK): 負責作遮罩<br />0 = interrupt service is available<br />1= interrupt service is masked<br />[so HWIntItem has function Enable() and Disable()<br />void Enable(){INTMSK &amp;amp;= ~(0x1&amp;lt;&amp;lt;8)}<br />In RTC init will call CHWIntItem::Enable to unmask RTC tick]<br /><br />4. priority register ::負責控制arbiter 跟上述 interrupt priority generating block and interrupt priority有關<br />[Register, Address, R/W, Description, Reset Value]<br />[PRIORITY,0x4A00000C, R/W, IRQ priority register, 0x7F]<br />擁有21bit<br />0~6 bit 分別控制 arbiter 0~6 是否要調整priority<br />0 = priority does not rotate<br />1 = priority rotate enable<br /><br />7~20 bit 分別去調整priority優先順序<br />可參考14-5<br />7-8 bit 負責作arbiter 0 priority調整<br />00 = REQ 1-2-3-4<br />01 = REQ 2-3-4-1<br />10 = REQ 3-4-1-2<br />11 = REQ 4-1-2-3<br />arbiter0 有四個 interrupt request<br />REQ1/EINT0<br />REQ2/EINT1<br />REQ3/EINT2<br />REQ4/EINT3<br />default value is 00<br />[our system does not use this register for some purpose]<br /><br />5. interrupt pending register(INTPND)<br />bit in the pending register shows whether the corresponding interrupt request has the highest priority.<br />Only one bit can be set to 1. in INTPNDD.<br />Manual 中有提到 in 14-144<br />&amp;quot;Like the SRCPND register, this register has to be cleared in the interrupt service routine after clearing the SRCPND register.&amp;quot;<br />clearpending function can set 1 and 5<br /><br /><br />continue<br />INTERRUPT OFFSET (INTOFFSET)<br />(not used in system)<br />The value in the INTOFFSET show which interrupt request of IRQ mode is in the INTPND register.<br />This bit can be cleared automatically by clearing SRCPND and INTPND.<br /><br />SUB SOURCE PENDING(SUBSRCPND) REGISTER<br />indicate the interrupt request status.<br />1 = the interrupt source has asserted the interrupt request<br /><br />INTERRUPT SUBMASK(INTSUBMSK) REGISTER<br />Determine which interrupt source is masked. The masked interrupt source will not be serviced.<br />1 = interrupt service is masked.<br />The function is the same with INTMSK. the difference is interrupt source.<br />ex. INTMSK第九個bit 負責 INT_WDT_AC97<br />INTSUBMSK 第13個bit 負責INT_WDT<br />第14個bit 負責INT_AC97<br /><br /><br />Reference:<br />http://www.eforth.com.tw/Csoc/eSOCFM/esoc_dol/AN/AN0001.pdf<br />S3C2440 user manual</p><div style="CLEAR: both"></div></div></div>]]></description> 
<guid isPermaLink="false">6856264@http://chongsoft.bokee.com/</guid> 
<dc:subject>默认栏目</dc:subject> 
<dc:date>2009-01-16T12:30:46Z</dc:date> 
</item> 
<item> 
<title><![CDATA[setsockopt使用 (转)]]></title> 
<link>http://chongsoft.bokee.com/6832863.html</link> 
<description><![CDATA[<table cellspacing="1" cellpadding="0" width="100%" align="center" border="0"><tbody><tr></tr><tr><td class="post_hd"><h3>Linux系统调用--getsockopt/setsockopt函数详解</h3><span>2007-09-07 23:33</span></td></tr><tr><td><div class="content"><p>【 getsockopt/setsockopt系统调用】&amp;nbsp;&amp;nbsp; <br />&amp;nbsp;&amp;nbsp;&amp;nbsp; <br />功能描述： <br />获取或者设置与某个套接字关联的选 项。选项可能存在于多层协议中，它们总会出现在最上面的套接字层。当操作套接字选项时，选项位于的层和选项的名称必须给出。为了操作套接字层的选项，应该 将层的值指定为SOL_SOCKET。为了操作其它层的选项，控制选项的合适协议号必须给出。例如，为了表示一个选项由TCP协议解析，层应该设定为协议 号TCP。</p><p><br />用法： <br />#include &amp;lt;sys/types.h&amp;gt;<br />#include &amp;lt;sys/socket.h&amp;gt;</p><p>int getsockopt(int sock, int level, int optname, void *optval, socklen_t *optlen);</p><p>int setsockopt(int sock, int level, int optname, const void *optval, socklen_t optlen);</p><p>参数：&amp;nbsp;&amp;nbsp; <br />sock：将要被设置或者获取选项的套接字。<br />level：选项所在的协议层。<br />optname：需要访问的选项名。<br />optval：对于getsockopt()，指向返回选项值的缓冲。对于setsockopt()，指向包含新选项值的缓冲。<br />optlen：对于getsockopt()，作为入口参数时，选项值的最大长度。作为出口参数时，选项值的实际长度。对于setsockopt()，现选项的长度。<br /><br />&amp;nbsp;&amp;nbsp;&amp;nbsp; <br />返回说明：&amp;nbsp;&amp;nbsp; <br />成功执行时，返回0。失败返回-1，errno被设为以下的某个值&amp;nbsp;&amp;nbsp; <br />EBADF：sock不是有效的文件描述词<br />EFAULT：optval指向的内存并非有效的进程空间<br />EINVAL：在调用setsockopt()时，optlen无效<br />ENOPROTOOPT：指定的协议层不能识别选项<br />ENOTSOCK：sock描述的不是套接字</p><p>http://club.cn.yahoo.com/bbs/threadview/1200062866_62__pn1.html</p></div><div class="post_func"></div></td></tr></tbody></table><p>--------------------------<br />开发网络程序使用setsockopt的一些好并且需要常注意的地方:<br /><a name="entrymore"></a><br /><span style="COLOR: rgb(255,0,0)">1.</span> 如果在已经处于 ESTABLISHED状态下的socket(一般由端口号和标志符区分）调用<br />closesocket（一般不会立即关闭而经历TIME_WAIT的过程）后想继续重用该socket：<br />BOOL bReuseaddr=TRUE;<br />setsockopt(s,SOL_SOCKET ,SO_REUSEADDR,(const char*)&amp;amp;bReuseaddr,sizeof(BOOL));<br /><br /><span style="COLOR: rgb(255,0,0)">2. </span>如果要已经处于连接状态的soket在调用closesocket后强制关闭，不经历<br />TIME_WAIT的过程：<br />BOOL&amp;nbsp;&amp;nbsp; bDontLinger = FALSE; <br />setsockopt(s,SOL_SOCKET,SO_DONTLINGER,(const char*)&amp;amp;bDontLinger,sizeof(BOOL));<br /><br /><span style="COLOR: rgb(255,0,0)">3.</span>在send(),recv()过程中有时由于网络状况等原因，发不能预期进行,而设置收发时限：<br />int nNetTimeout=1000;//1秒<br />//发送时限<br />setsockopt(socket，SOL_S0CKET,SO_SNDTIMEO，(char *)&amp;amp;nNetTimeout,sizeof(int));<br />//接收时限<br />setsockopt(socket，SOL_S0CKET,SO_RCVTIMEO，(char *)&amp;amp;nNetTimeout,sizeof(int));<br /><br /><span style="COLOR: rgb(178,34,34)">4.</span>在send()的时候，返回的是实际发送出去的字节(同步)或发送到socket缓冲区的字节<br />(异步);系统默认的状态发送和接收一次为8688字节(约为8.5K)；在实际的过程中发送数据<br />和接收数据量比较大，可以设置socket缓冲区，而避免了send(),recv()不断的循环收发：<br />// 接收缓冲区<br />int nRecvBuf=32*1024;//设置为32K<br />setsockopt(s,SOL_SOCKET,SO_RCVBUF,(const char*)&amp;amp;nRecvBuf,sizeof(int));<br />//发送缓冲区<br />int nSendBuf=32*1024;//设置为32K<br />setsockopt(s,SOL_SOCKET,SO_SNDBUF,(const char*)&amp;amp;nSendBuf,sizeof(int));<br /><br /><span style="COLOR: rgb(255,0,0)">5. </span>如果在发送数据的时，希望不经历由系统缓冲区到socket缓冲区的拷贝而影响<br />程序的性能：<br />int nZero=0;<br />setsockopt(socket，SOL_S0CKET,SO_SNDBUF，(char *)&amp;amp;nZero,sizeof(nZero));<br /><br /><span style="COLOR: rgb(255,0,0)">6.</span>同上在recv()完成上述功能(默认情况是将socket缓冲区的内容拷贝到系统缓冲区)：<br />int nZero=0;<br />setsockopt(socket，SOL_S0CKET,SO_RCVBUF，(char *)&amp;amp;nZero,sizeof(int));<br /><br /><span style="COLOR: rgb(255,0,0)">7.</span>一般在发送<a class="mykeyword" title="http://www.server-development.cn/go.php/tags/udp/" href="http://www.server-development.cn/go.php/tags/udp/" target="_blank">UDP</a>数据报的时候，希望该socket发送的数据具有广播特性：<br />BOOL&amp;nbsp;&amp;nbsp; bBroadcast=TRUE; <br />setsockopt(s,SOL_SOCKET,SO_BROADCAST,(const char*)&amp;amp;bBroadcast,sizeof(BOOL));<br /><br /><span style="COLOR: rgb(255,0,0)">8.</span>在client连接<a class="mykeyword" title="http://www.server-development.cn/go.php/tags/服务器/" href="http://www.server-development.cn/go.php/tags/%E6%9C%8D%E5%8A%A1%E5%99%A8/" target="_blank">服务器</a>过程中，如果处于非阻塞模式下的socket在connect()的过程中可<br />以设置connect()延时,直到accpet()被呼叫(本函数设置只有在非阻塞的过程中有显著的<br />作用，在阻塞的函数调用中作用不大)<br />BOOL bConditionalAccept=TRUE;<br />setsockopt(s,SOL_SOCKET,SO_CONDITIONAL_ACCEPT,(const char*)&amp;amp;bConditionalAccept,sizeof(BOOL));<br /><br /><span style="COLOR: rgb(255,0,0)">9.</span>如果在发送数据的过程中(send()没有完成，还有数据没发送)而调用了closesocket(),以前我们<br />一般采取的措施是&amp;quot;从容关闭&amp;quot;shutdown(s,SD_BOTH),但是数据是肯定丢失了，如何设置让程序满足具体<br />应用的要求(即让没发完的数据发送出去后在关闭socket)？<br />struct linger {<br />&amp;nbsp;&amp;nbsp; u_short&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; l_onoff;<br />&amp;nbsp;&amp;nbsp; u_short&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; l_linger;<br />};<br />linger m_sLinger;<br />m_sLinger.l_onoff=1;//(在closesocket()调用,但是还有数据没发送完毕的时候容许逗留)<br />// 如果m_sLinger.l_onoff=0;则功能和2.)作用相同;<br />m_sLinger.l_linger=5;//(容许逗留的时间为5秒)<br />setsockopt(s,SOL_SOCKET,SO_LINGER,(const char*)&amp;amp;m_sLinger,sizeof(linger));<br />Note:1.在设置了逗留延时，用于一个非阻塞的socket是作用不大的，最好不用;<br />&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2.如果想要程序不经历SO_LINGER需要设置SO_DONTLINGER，或者设置l_onoff=0；<br /><br /><span style="COLOR: rgb(255,0,0)">10.</span>还一个用的比较少的是在SDI或者是Dialog的程序中，可以记录socket的调试信息：<br />(前不久做过这个函数的测试，调式信息可以保存，包括socket建立时候的参数,采用的<br />具体协议，以及出错的代码都可以记录下来）<br />BOOL bDebug=TRUE;<br />setsockopt(s,SOL_SOCKET,SO_DEBUG,(const char*)&amp;amp;bDebug,sizeof(BOOL));</p><p>zhaizi<br />http://www.libing.net.cn/post/setsockopt.php</p>]]></description> 
<guid isPermaLink="false">6832863@http://chongsoft.bokee.com/</guid> 
<dc:subject>Linux kernel</dc:subject> 
<dc:date>2008-11-09T15:06:01Z</dc:date> 
</item> 
<item> 
<title><![CDATA[Anti-strace 技术 strace及相关内核的实现细节（转）]]></title> 
<link>http://chongsoft.bokee.com/6832564.html</link> 
<description><![CDATA[<p>--[ 内容<br />&amp;nbsp; &amp;nbsp; 0 - 前言<br />&amp;nbsp; &amp;nbsp; 1 - strace的原理<br />&amp;nbsp; &amp;nbsp; 2 - strace死循环的分析<br />&amp;nbsp; &amp;nbsp; 3 - anti-strace<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;3.1 方法一<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;3.2 方法二<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;3.3 方法三<br />&amp;nbsp; &amp;nbsp; 4 - anti anti-strace<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;4.1 int3的情况<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;4.2 kill的情况<br />&amp;nbsp; &amp;nbsp; 5 - 参考<br />&amp;nbsp; &amp;nbsp; 6 - strace.4.5.8.patch<br />--[ 0 - 前言<br />前面在介绍Burneye加密文档的时候,碰到了两个问题,一个是GDB中无法配置断点,另一个<br />问题是strace时死循环。GDB的问题已找到，无法配置断点是GDB的一个Bug，具体的结<br />论见[1].至于strace的问题，一直没有解决，假如真能写出一个让strace死循环的程式，<br />也算是一种anti-strace的技术。但是一直没有将死循环的现象用程式重现。<br />后来经Grip2的指点，发现了问题的原因，经过对内核和strace源代码的研究，写了一个<br />防止strace死循环的patch,之后更进一步的patch，使得strace更加健壮，能够跟踪anti-<br />strace程式的系统调用。<br />在这里感谢Grip2的帮助和测试程式。<br />本文的环境是Redhat Fedora Core 2, Linux 2.6.5/2.6.8.1, <br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;gcc 3.3.1, strace 4.5.8<br />--[ 1 - strace的原理<br />要想了解strace的原理，首先得谈谈ptrace。<br />ptrace是操作系统为了调试为用户程式提供的系统接口。先来看看ptrace的用法：[2]<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; long&amp;nbsp;&amp;nbsp;ptrace(enum __ptrace_request request, pid_t pid, void *addr, void<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; *data)<br />strace需要使用的__ptrace_request主要有以下几个：<br />被调试的进程)<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; PTRACE_TRACEME 自己主动提供被跟踪的请求,当被跟踪的进程收到信号时,会先被<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; 父进程截获.同样，execve时也是如此.<br />监控进程strace)<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; PTRACE_GETREGS 获得被跟踪进程的寄存器状况,周详的结构请参见asm/user.h的<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; user_regs_struct<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; PTRACE_PEEKDATA 获得系统堆栈中的参数<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; PTRACE_SYSCALL 这是最重要的，每次本跟踪的进程在系统调用时，ptrace会返回<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; 两次，一次是系统调用之前，会调用PTRACE_PEEKDATA获得参数<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; 值，另一次是系统调用之后，会调用PTRACE_GETREGS获得返回值<br />ENTRY(system_call)<br />...<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # system call tracing in operation<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; jnz syscall_trace_entry<br />...<br />syscall_trace_entry:<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; movl $-ENOSYS,EAX(%esp)<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; movl %esp, %eax<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xorl %edx,%edx<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; call do_syscall_trace&amp;nbsp; &amp;nbsp; do_sigaction()<br />2298&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if (signal_pending(current)) {<br />2299&amp;nbsp; &amp;nbsp;&amp;nbsp; &am;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;/*<br />2300&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;* If there might be a fatal signal pending on multiple<br />2301&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;* threads, make sure we take it before changing the action.<br />2302&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;*/<br />2303&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;spin_unlock_irq(¤t-&amp;gt;sighand-&amp;gt;siglock);<br />2304&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;return -ERESTARTNOINTR;<br />2305&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}<br />也就是说当程式执行sys_signal时，假如有信号还未处理，就直接返回-ERESTARTNOINTR<br />接下来当系统调用返回时，会依次调用<br />resume_userspace-&amp;gt;work_pending-&amp;gt;work_notify_sig-&amp;gt;do_notify_resume-&amp;gt;do_sign<br />al<br />590&amp;nbsp;&amp;nbsp;no_signal:<br />591&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;/* Did we come from a system call? */<br />592&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if (regs-&amp;gt;orig_eax &amp;gt;= 0) {<br />593&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;/* Restart the system call - no handlers present */<br />594&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;if (regs-&amp;gt;eax == -ERESTARTNOHAND ||<br />595&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;regs-&amp;gt;eax == -ERESTARTSYS ||<br />596&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;regs-&amp;gt;eax == -ERESTARTNOINTR) {<br />597&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; regs-&amp;gt;eax = regs-&amp;gt;orig_eax;<br />598&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; regs-&amp;gt;eip -= 2;<br />599&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;}<br />600&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;if (regs-&amp;gt;eax == -ERESTART_RESTARTBLOCK){<br />601&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; regs-&amp;gt;eax = __NR_restart_syscall;<br />602&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; regs-&amp;gt;eip -= 2;<br />603&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;}<br />604&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;}<br />605&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;return 0;<br />606 }<br />此时,&amp;nbsp;&amp;nbsp;regs-&amp;gt;eip -= 2;正好代表int $0x80 (0xcd 0x80)两个字节，可见，内核重启<br />系统调用。<br />那么，究竟什么时候signal_pending(current)为真呢？经过GDB调试，发现strace在处理<br />sys_signal系统调用时，syscall.c:trace_syscall会调用signal的sys_signal函数<br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;sys_res = (*sysent[tcp-&amp;gt;scno].sys_func)(tcp)<br />signal.c::sys_signal()<br />...<br />#ifndef USE_PROCFS<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (tcp-&amp;gt;u_arg[0] == SIGTRAP) {<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tcp-&amp;gt;flags |= TCB_SIGTRAPPED;<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; kill(tcp-&amp;gt;pid, SIGSTOP);<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }<br />#endif /* !USE_PROCFS */<br />死循环的问题就在这个kill(tcp-&amp;gt;pid, SIGSTOP)上，当程式被处于跟踪的时刻，向已<br />停止的进程发送SIGSTOP本来是没有必要的，不知道strace的作者为什么还要单独来上这<br />么一句？Linux 2.4和2.6内核又出现了差异，在2.6内核的do_sigaction判断了是否有信<br />号pending，而2.4却没有，因此在2.4的机器上，运行strace不会出现死循环的情况，在<br />2.6上，我们只须将改行注释掉即可。<br />我们能够认为这是strace和2.6内核不兼容的一个Bug!<br />注意：假如您在程式里用的是C库的signal，实际上使用的是sys_rt_sigaction而不是<br />sys_signal，而strace在处理sys_rt_sigaction时，并没有kill(tcp-&amp;gt;pid, SIGSTOP);<br />也许strace的作者认为用C写的程式不会用到sys_signal?<br />接下来让我们试一试新的strace来跟踪burneye加密的程式<br />#./strace /tmp/ls.new (ls.new是burneye加密的程式)<br />execve(&amp;quot;/tmp/ls.new&amp;quot;, [&amp;quot;/tmp/ls.new&amp;quot;], [/* 20 vars */]) = 0<br />signal(SIGTRAP, 0x5371991)&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;= 0 (SIG_DFL)<br />--- SIGSEGV (Segmentation fault) @ 0 (0) ---<br />+++ killed by SIGSEGV ++<br />OK,不死循环了,但是我们现在还无法继续跟踪,因为burneye加密的时候使用了某些anti-<br />strace的技术。<br />--[ 3 - anti-strace的原理<br />了解了strace的工作原理，就能够有针对的使用anti-strace的技术<br />--[ 3.1 方法一<br />利用上边介绍的strace和2.6内核的不兼容，造成死循环.对上边打过patch的strace不适用<br />测试程式(Grip2提供)<br />#include <br />#include <br />#include <br />#include <br />#include <br />#include <br />#include <br />void sig_handler(int sig)<br />{<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;signal trap＼n&amp;quot;);<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;<br />}<br />static inline int my_signal(int num, void *func)<br />{<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int ret;<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; <br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __asm__ __volatile__ ( &amp;quot;int $0x80&amp;quot;<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :&amp;quot;=a&amp;quot;(ret)<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; :&amp;quot;0&amp;quot; (48), &amp;quot;b&amp;quot; ((long)num), <br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;quot;c&amp;quot; ((int)func));<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return ret;<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; <br />}&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; <br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; <br />int main(int argc, char *argv[])<br />{<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; my_signal(SIGTRAP, sig_handler);<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;<br />}<br />注意一定不能使用C库的signal，原因在前边已提过<br />--[ 3.2 方法二<br />自己发送int3<br />这种方法是Silvio Cesare在[3]中介绍的方法，由程式己执行int3，这样会产生一个<br />陷阱，内核会向程式发送一个SIGTRAP信号，由于程式被跟踪，因此信号由strace截获，<br />根据strace的源代码，if (ptrace(PTRACE_SYSCALL, pid, (char *) 1, 0) <br />#include <br />#include <br />#include <br />#include <br />#include <br />#include <br />static int not_trace<br />void sig_handler(int sig)<br />{<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; not_trace++;<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return;<br />}<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; <br />int main(int argc, char *argv[])<br />{<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; signal(SIGTRAP, sig_handler);<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; __asm__ __volatile__ ( &amp;quot;int3&amp;quot; );<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!not_trace){<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; printf(&amp;quot;TRACING...＼n&amp;quot;);<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; exit(-1);<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return 0;<br />}<br />--[ 3.3 方法三<br />程式使用kill向自己发送SIGTRAP，跟方法二类似，这里就不赘述了<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; kill(getpid(), SIGTRAP);<br />--[ 4 - anti anti-strace<br />现在我们来进一步完善strace，让他也能对付方法二和方法三，其实问题的关键就是看<br />strace在ptrace退出之后，下次使用ptrace能不能将SIGTRAP信号返回给被跟踪程式。<br />根据ptrace的手册页对PTRACE_CONT和PTRACE_SYSCALL的描述<br />PTRACE_CONT ... If data is non-zero and not SIGSTOP, it is interpreted as a <br />&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; signal to be delivered to the child ...<br />PTRACE_SYSCALL ... Restarts the stopped child as for PTRACE_CONT <br />看来我们只须在下一次调用ptrace时指定返回的信号是SIGTRAP即可，但是不能胡乱发送，<br />只有在发现int3和kill(pid, SIGTRAP)的情况下才适用。<br />--[ 4.1 int3的情况<br />首先,我们需要判断int3的情况，因此，需要在strace.c::trace()最后添加以下几行<br />tracing:<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(ptrace(PTRACE_GETREGS, pid, NULL, (int)&amp;reg;s) scno != __NR_sigreturn &amp;amp;&amp;amp; tcp-&amp;gt;scno != __NR_rt_sigreturn)<br />--[ 4.2 kill的情况<br />kill情况比较简单，只须在sys_kill调用的第二次ptrace返回时，将返回值设定为SIGTRAP<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(tcp-&amp;gt;scno == __NR_kill){<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(!(tcp-&amp;gt;flags &amp;amp; TCB_INSYSCALL)){<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tprintf(&amp;quot;＼n!! Self SIGTRAP !!＼n&amp;quot;);<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(ptrace(PTRACE_SYSCALL,<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pid,<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (char *)1,<br />&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; SIGTRAP) <br /></p><p>附录:</p><p>strace使用及举例</p><p>（一）　strace 命令<br />　　 <br />　<br />　　strace: option requires an argument -- e<br />　　usage: strace [-dffhiqrtttTvVxx] [-a column] [-e expr] ... [-o file]<br />　　 [-p pid] ... [-s strsize] [-u username] [-E var=val] ...<br />　　 [command [arg ...]]<br />　　 or: strace -c [-e expr] ... [-O overhead] [-S sortby] [-E var=val] ...<br />　　 [command [arg ...]]<br />　　-c -- count time, calls, and errors for each syscall and report summary<br />　　-f -- follow forks, -ff -- with output into separate files<br />　　-F -- attempt to follow vforks, -h -- print help message<br />　　-i -- print instruction pointer at time of syscall<br />　　-q -- suppress messages about attaching, detaching, etc.<br />　　-r -- print relative timestamp, -t -- absolute timestamp, -tt -- with usecs<br />　　-T -- print time spent in each syscall, -V -- print version<br />　　-v -- verbose mode: print unabbreviated argv, stat, termio[s], etc. args<br />　　-x -- print non-ascii strings in hex, -xx -- print all strings in hex<br />　　-a column -- alignment COLUMN for printing syscall results (default 40)<br />　　-e expr -- a qualifying expression: option=[!]all or option=[!]val1[,val2]...<br />　　 options: trace, abbrev, verbose, raw, signal, read, or write<br />　　-o file -- send trace output to FILE instead of stderr<br />　　-O overhead -- set overhead for tracing syscalls to OVERHEAD usecs<br />　　-p pid -- trace process with process id PID, may be repeated<br />　　-s strsize -- limit length of print strings to STRSIZE chars (default 32)<br />　　-S sortby -- sort syscall counts by: time, calls, name, nothing (default time)<br />　　-u username -- run command as username handling setuid and/or setgid<br />　　-E var=val -- put var=val in the environment for command<br />　　-E var -- remove var from the environment for command<br />　　<br />　　<br />　　strace - 跟踪系统调用和信号<br />　　 <br />　　usage: strace [-dffhiqrtttTvVxx] [-a column] [-e expr] [-o file]<br />　　[-p pid] [-s strsize] [-u username] [command [arg]]<br />　　strace -c [-e expr] [-O overhead] [-S sortby] [command [arg]]<br />　　<br />　　-a column<br />　　 指定显示返回值的列位置，默认是40(从0开始计数)，就是说&amp;quot;=&amp;quot;出现在40列的位<br />　　 置。<br />　　 <br />　　-c 产生类似下面的统计信息<br />　　 <br />　　 strace -c -p 14653 (Ctrl-C)<br />　　 % time seconds usecs/call calls errors syscall<br />　　 ------ ----------- ----------- --------- --------- ----------------<br />　　 53.99 0.012987 3247 4 2 wait4<br />　　 42.16 0.010140 2028 5 read<br />　　 1.78 0.000429 61 7 write<br />　　 0.76 0.000184 10 18 ioctl<br />　　 0.50 0.000121 2 52 rt_sigprocmask<br />　　 0.48 0.000115 58 2 fork<br />　　 0.18 0.000043 2 18 rt_sigaction<br />　　 0.06 0.000014 14 1 1 stat<br />　　 0.03 0.000008 4 2 sigreturn<br />　　 0.02 0.000006 2 3 time<br />　　 0.02 0.000006 3 2 1 setpgid<br />　　 ------ ----------- ----------- --------- --------- ----------------<br />　　 100.00 0.024053 114 4 total<br />　　 <br />　　 -d 输出一些strace自身的调试信息到标准输出<br />　　 <br />　　 strace -c -p 14653 -d (Ctrl-C)<br />　　 [wait(0x137f) = 14653]<br />　　 pid 14653 stopped, [SIGSTOP]<br />　　 [wait(0x57f) = 14653]<br />　　 pid 14653 stopped, [SIGTRAP]<br />　　 cleanup: looking at pid 14653<br />　　 % time seconds usecs/call calls errors syscall<br />　　 ------ ----------- ----------- --------- --------- ----------------<br />　　 ------ ----------- ----------- --------- --------- ----------------<br />　　 100.00 0.000000 0 total<br />　　 <br />　　 -e expr <br />　　 A qualifying expression which modifies which events to trace or how to trace<br />　　 them. The format of the expression is:<br />　　 <br />　　 [qualifier=][!]value1[,value2]...<br />　　 <br />　　 这里qualifier可以是trace、abbrev、verbose、raw、signal、read或者write。<br />　　 value是qualifier相关的符号或数值。缺省qualifier是trace。!表示取反。<br />　　 -eopen等价于-e trace=open，表示只跟踪open系统调用。-etrace=!open意思是<br />　　 跟踪除open系统调用之外的其他所有系统调用。此外value还可以取值all和none。<br />　　 <br />　　 某些shell用!表示重复历史指令，此时可能需要引号、转义符号(\)的帮助。<br />　　 <br >　　 -e trace=set<br />　　 只跟踪指定的系统调用列表。决定跟踪哪些系统调用时，-c选项很有用。<br />　　 trace=open,close,read,write意即只跟踪这四种系统调用，缺省是trace=all<br />　　 <br />　　 -e trace=file<br />　　 跟踪以指定文件名做参数的所有系统调用。<br />　　 <br />　　 -e trace=process<br />　　 Trace all system calls which involve process management. This is <br />　　 useful for watching the fork, wait, and exec steps of a process.<br />　　 <br />　　 -e trace=network<br />　　 跟踪所有和网络相关的系统调用<br />　　 <br />　　 -e trace=signal<br />　　 Trace all signal related system calls.<br />　　 <br />　　 -e trace=ipc<br />　　 Trace all IPC related system calls.<br />　　 <br />　　 -e abbrev=set<br />　　 Abbreviate the output from printing each member of large structures.<br />　　 缺省是abbrev=all，-v选项等价于abbrev=none<br />　　 <br />　　 -e verbose=set<br />　　 Dereference structures for the specified set of system calls. <br />　　 The default is verbose=all.<br />　　 <br />　　 -e raw=set <br />　　 Print raw, undecoded arguments for the specifed set of system calls. <br />　　 This option has the effect of causing all arguments to be printed in <br />　　 hexadecimal. This is mostly useful if you don&amp;quot;t trust the decoding or <br />　　 you need to know the actual numeric value of an argument.<br />　　 <br />　　 -e signal=set<br />　　 只跟踪指定的信号列表，缺省是signal=all。signal=!SIGIO (or signal=!io) <br />　　 导致 SIGIO 信号不被跟踪<br />　　 <br />　　 -e read=set <br />　　 Perform a full hexadecimal and ASCII dump of all the data read from <br />　　 file descriptors listed in the specified set. For example, to see all<br />　　 input activity on file descriptors 3 and 5 use -e read=3,5. Note that <br />　　 this is independent from the normal tracing of the read(2) system call<br />　　 which is controlled by the option -e trace=read.<br />　　 <br />　　 -e write=set<br />　　 Perform a full hexadecimal and ASCII dump of all the data written to <br />　　 file descriptors listed in the specified set. For example, to see all <br />　　 output activity on file descriptors 3 and 5 use -e write=3,5. Note <br />　　 that this is independent from the normal tracing of the write(2) <br />　　 system call which is controlled by the option -e trace=write.<br />　　 <br />　　 -f <br />　　 follow forks，跟随子进程？<br />　　 <br />　　 Trace child processes as they are created by currently traced <br />　　 processes as a result of the fork(2) system call. The new process <br />　　 is attached to as soon as its pid is known (through the return value <br />　　 of fork(2) in the parent process). This means that such children may <br />　　 run uncontrolled for a while (especially in the case of a vfork(2)), <br />　　 until the parent is scheduled again to complete its (v)fork(2) <br />　　 call. If the parent process decides to wait(2) for a child that is <br />　　 currently being traced, it is suspended until an appropriate child <br />　　 process either terminates or incurs a signal that would cause it to <br />　　 terminate (as determined from the child&amp;quot;s current signal disposition).<br />　　 <br />　　 意思应该是说跟踪某个进程时，如果发生fork()调用，则选择跟踪子进程<br />　　 可以参考gdb的set follow-fork-mode设置<br />　　 <br />　　 -F <br />　　 attempt to follow vforks<br />　　 (On SunOS 4.x, this is accomplished with some dynamic linking trickery.<br />　　 On Linux, it requires some kernel functionality not yet in the <br />　　 standard kernel.) Otherwise, vforks will not be followed even if -f <br />　　 has been given.<br />　　 <br />　　 类似-f选项<br />　　 <br />　　 -ff <br />　　 如果-o file选项有效指定，则跟踪过程中新产生的其他相关进程的信息分别写<br />　　 入file.pid，这里pid是各个进程号。<br />　　 <br />　　 -h <br />　　 显示帮助信息<br />　　 <br />　　 -i <br />　　 显示发生系统调用时的IP寄存器值<br />　　 strace -p 14653 -i<br />　　 <br />　　 -o filename<br />　　 指定保存strace输出信息的文件，默认使用标准错误输出stderr<br />　　 <br />　　 Use filename.pid if -ff is used. If the argument begins with `|&amp;quot; or <br />　　 with `!&amp;quot; then the rest of the argument is treated as a command and all<br />　　 output is piped to it. This is convenient for piping the debugging <br />　　 output to a program without affecting the redirections of executed <br />　　 programs.<br />　　 <br />　　 -O overhead <br />　　 Set the overhead for tracing system calls to overhead microseconds.<br />　　 This is useful for overriding the default heuristic for guessing how <br />　　 much time is spent in mere measuring when timing system calls using <br />　　 the -c option. The acuracy of the heuristic can be gauged by timing <br />　　 a given program run without tracing (using time(1)) and comparing <br />　　 the accumulated system call time to the total produced using -c.<br />　　 <br />　　 好象是用于确定哪些系统调用耗时多<br />　　 <br />　　 -p pid<br />　　 <br />　　 指定待跟踪的进程号，可以用Ctrl-C终止这种跟踪而被跟踪进程继续运行。可以<br />　　 指定多达32个-p参数同时进行跟踪。<br />　　 <br />　　 比如 strace -ff -o output -p 14653 -p 14117<br />　　 <br />　　 -q<br />　　 Suppress messages about attaching, detaching etc. This happens <br />　　 automatically when output is redirected to a file and the command is <br />　　 run directly instead of attaching.<br />　　 <br />　　 -r <br />　　 Print a relative timestamp upon entry to each system call. This <br />　　 records the time difference between the beginning of successive <br />　　 system calls.<br />　　 <br />　　 strace -p 14653 -i -r<br />　　 <br />　　 -s strsize<br />　　 指定字符串最大显示长度，默认32。但文件名总是显示完整。<br />　　 -S sortby<br />　　 Sort the output of the histogram printed by the -c option by the <br />　　 specified critereon. Legal values are time, calls, name, and nothing<br />　　 (default time).<br />　　 <br />　　 -t <br />　　 与-r选项类似，只不过-r采用相对时间戳，-t采用绝对时间戳(当前时钟)<br />　　 <br />　　 -tt <br />　　 与-t类似，绝对时间戳中包含微秒<br />　　 <br />　　 -ttt <br />　　 If given thrice, the time printed will include the microseconds and <br />　　 the leading portion will be printed as the number of seconds since <br />　　 the epoch.<br />　　 <br />　　 -T <br />　　 这个选项显示单个系统调用耗时<br />　　 <br />　　 -u username <br />　　 用指定用户的UID、GID以及辅助组身份运行待跟踪程序<br />　　 <br />　　 -v <br />　　 冗余显示模式<br />　　 Print unabbreviated versions of environment, stat, termios, etc. calls.<br />　　 These structures are very common in calls and so the default behavior <br />　　 displays a reasonable subset of structure members. Use this option to <br />　　 get all of the gory details.<br />　　 <br />　　 -V <br />　　 显示strace版本信息<br />　　 <br />　　 -x 以16进制字符串格式显示非ascii码，比如&amp;quot;\x08&amp;quot;，默认采用8进制，比如&amp;quot;\10&amp;quot;<br />　　 <br />　　 -xx 以16进制字符串格式显示所有字节<unfinished ...="" /><br /><br />＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝<br /><br />（二）应用<br /></unfinished />strace 命令是一种强大的工具，它能够显示所有由用户空间程序发出的系统调用。<br />　　strace 显示这些调用的参数并返回符号形式的值。strace 从内核接收信息，而且不需要以任何特殊的方式来构建内核。<br />　　下面记录几个常用 option . <br />　　1 -f -F选项告诉strace同时跟踪fork和vfork出来的进程<br />　　2 -o xxx.txt 输出到某个文件。<br />　　3 -e execve 只记录 execve 这类系统调用 <br />　　-------------------------------------------------------------------------------------------------------------------------<br />　　进程无法启动，软件运行速度突然变慢，程序的&amp;quot;SegmentFault&amp;quot;等等都是让每个Unix系统用户头痛的问题，<br />　　本文通过三个实际案例演示如何使用truss、strace和ltrace这三个常用的调试工具来快速诊断软件的&amp;quot;疑难杂症&amp;quot;。 <br />　　<br />　　<br />　　truss和strace用来跟踪一个进程的系统调用或信号产生的情况，而 ltrace用来跟踪进程调用库函数的情况。truss是早期为System V R4开发的调试程序，包括Aix、reeBSD在内的大部分Unix系统都自带了这个工具；<br />　　而strace最初是为SunOS系统编写的，ltrace最早出现在GNU/DebianLinux中。<br />　　这两个工具现在也已被移植到了大部分Unix系统中，大多数Linux发行版都自带了strace和ltrace，而FreeBSD也可通过Ports安装它们。<br />　　<br />　　你不仅可以从命令行调试一个新开始的程序，也可以把truss、strace或ltrace绑定到一个已有的PID上来调试一个正在运行的程序。三个调试工具的基本使用方法大体相同，下面仅介绍三者共有，而且是最常用的三个命令行参数：<br />　　<br />　　-f ：除了跟踪当前进程外，还跟踪其子进程。<br />　　-o file ：将输出信息写到文件file中，而不是显示到标准错误输出（stderr）。<br />　　-p pid ：绑定到一个由pid对应的正在运行的进程。此参数常用来调试后台进程。<br />　　<br />　　 使用上述三个参数基本上就可以完成大多数调试任务了，下面举几个命令行例子：<br />　　truss -o ls.truss ls -al： 跟踪ls -al的运行，将输出信息写到文件/tmp/ls.truss中。<br />　　strace -f -o vim.strace vim： 跟踪vim及其子进程的运行，将输出信息写到文件vim.strace。<br />　　ltrace -p 234： 跟踪一个pid为234的已经在运行的进程。<br />　　<br />　　 三个调试工具的输出结果格式也很相似，以strace为例：<br />　　<br />　　brk(0) = 0x8062aa8<br />　　brk(0x8063000) = 0x8063000<br />　　mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 3, 0x92f) = 0x40016000<br />　　<br />　　每一行都是一条系统调用，等号左边是系统调用的函数名及其参数，右边是该调用的返回值。 truss、strace和ltrace的工作原理大同小异，都是使用ptrace系统调用跟踪调试运行中的进程，详细原理不在本文讨论范围内，有兴趣可以参考它们的源代码。 <br />　　举两个实例演示如何利用这三个调试工具诊断软件的&amp;quot;疑难杂症&amp;quot;：<br />　　<br />　　案例一：运行clint出现Segment Fault错误<br />　　<br />　　操作系统：FreeBSD-5.2.1-release<br />　　clint是一个C++静态源代码分析工具，通过Ports安装好之后，运行：<br />　　<br />　　# clint foo.cpp<br />　　Segmentation fault (core dumped)<br />　　 在Unix系统中遇见&amp;quot;Segmentation Fault&amp;quot;就像在MS Windows中弹出&amp;quot;非法操作&amp;quot;对话框一样令人讨厌。OK，我们用truss给clint&amp;quot;把把脉&amp;quot;：<br />　　<br />　　# truss -f -o clint.truss clint<br />　　Segmentation fault (core dumped)<br />　　# tail clint.truss<br />　　 739: read(0x6,0x806f000,0x1000) = 4096 (0x1000)<br />　　 739: fstat(6,0xbfbfe4d0) = 0 (0x0)<br />　　 739: fcntl(0x6,0x3,0x0) = 4 (0x4)<br />　　 739: fcntl(0x6,0x4,0x0) = 0 (0x0)<br />　　 739: close(6) = 0 (0x0)<br />　　 739: stat(&amp;quot;/root/.clint/plugins&amp;quot;,0xbfbfe680) ERR#2 'No such file or directory'<br />　　SIGNAL 11<br />　　SIGNAL 11<br />　　Process stopped because of: 16<br />　　process exit, rval = 139<br />　　我们用truss跟踪clint的系统调用执行情况，并把结果输出到文件clint.truss，然后用tail查看最后几行。<br />　　注意看clint执行的最后一条系统调用（倒数第五行）：stat(&amp;quot;/root/.clint/plugins&amp;quot;,0xbfbfe680) ERR#2 'No such file or directory'，问题就出在这里：clint找不到目录&amp;quot;/root/.clint/plugins&amp;quot;，从而引发了段错误。怎样解决？很简单： mkdir -p /root/.clint/plugins，不过这次运行clint还是会&amp;quot;Segmentation Fault&amp;quot;9。继续用truss跟踪，发现clint还需要这个目录&amp;quot;/root/.clint/plugins/python&amp;quot;，建好这个目录后 clint终于能够正常运行了。 <br />　　<br />　　案例二：vim启动速度明显变慢<br />　　<br />　　操作系统：FreeBSD-5.2.1-release<br />　　vim版本为6.2.154，从命令行运行vim后，要等待近半分钟才能进入编辑界面，而且没有任何错误输出。仔细检查了.vimrc和所有的vim脚本都没有错误配置，在网上也找不到类似问题的解决办法，难不成要hacking source code？没有必要，用truss就能找到问题所在：<br />　　<br />　　# truss -f -D -o vim.truss vim<br />　　<br />　　这里-D参数的作用是：在每行输出前加上相对时间戳，即每执行一条系统调用所耗费的时间。我们只要关注哪些系统调用耗费的时间比较长就可以了，用less仔细查看输出文件vim.truss，很快就找到了疑点：<br />　　<br />　　735: 0.000021511 socket(0x2,0x1,0x0) = 4 (0x4)<br />　　735: 0.000014248 setsockopt(0x4,0x6,0x1,0xbfbfe3c8,0x4) = 0 (0x0)<br />　　735: 0.000013688 setsockopt(0x4,0xffff,0x8,0xbfbfe2ec,0x4) = 0 (0x0)<br />　　735: 0.000203657 connect(0x4,{ AF_INET 10.57.18.27:6000 },16) ERR#61 'Connection refused'<br />　　735: 0.000017042 close(4) = 0 (0x0)<br />　　735: 1.009366553 nanosleep(0xbfbfe468,0xbfbfe460) = 0 (0x0)<br />　　735: 0.000019556 socket(0x2,0x1,0x0) = 4 (0x4)<br />　　735: 0.000013409 setsockopt(0x4,0x6,0x1,0xbfbfe3c8,0x4) = 0 (0x0)<br />　　735: 0.000013130 setsockopt(0x4,0xffff,0x8,0xbfbfe2ec,0x4) = 0 (0x0)<br />　　735: 0.000272102 connect(0x4,{ AF_INET 10.57.18.27:6000 },16) ERR#61 'Connection refused'<br />　　735: 0.000015924 close(4) = 0 (0x0)<br />　　735: 1.009338338 nanosleep(0xbfbfe468,0xbfbfe460) = 0 (0x0)<br />　　<br />　　vim试图连接10.57.18.27这台主机的6000端口（第四行的connect（）），连接失败后，睡眠一秒钟继续重试（第6行的 nanosleep（））。以上片断循环出现了十几次，每次都要耗费一秒多钟的时间，这就是vim明显变慢的原因。可是，你肯定会纳闷：&amp;quot;vim怎么会无缘无故连接其它计算机的6000端口呢？&amp;quot;。问得好，那么请你回想一下6000是什么服务的端口？没错，就是X Server。看来vim是要把输出定向到一个远程X Server，那么Shell中肯定定义了DISPLAY变量，查看.cshrc，果然有这么一行：setenv DISPLAY ${REMOTEHOST}:0，把它注释掉，再重新登录，问题就解决了。<br />　　<br />　　<br />　　案例三：用调试工具掌握软件的工作原理<br />　　<br />　　操作系统：Red Hat Linux 9.0<br />　　用调试工具实时跟踪软件的运行情况不仅是诊断软件&amp;quot;疑难杂症&amp;quot;的有效的手段，也可帮助我们理清软件的&amp;quot;脉络&amp;quot;，即快速掌握软件的运行流程和工作原理，不失为一种学习源代码的辅助方法。下面这个案例展现了如何使用strace通过跟踪别的软件来&amp;quot;触发灵感&amp;quot;，从而解决软件开发中的难题的。<br />　　大家都知道，在进程内打开一个文件，都有唯一一个文件描述符（fd：file descriptor）与这个文件对应。而本人在开发一个软件过程中遇到这样一个问题：<br />　　已知一个fd，如何获取这个fd所对应文件的完整路径？不管是Linux、FreeBSD或是其它Unix系统都没有提供这样的API，怎么办呢？我们换个角度思考：Unix下有没有什么软件可以获取进程打开了哪些文件？如果你经验足够丰富，很容易想到lsof，使用它既可以知道进程打开了哪些文件，也可以了解一个文件被哪个进程打开。好，我们用一个小程序来试验一下lsof，看它是如何获取进程打开了哪些文件。lsof： 显示进程打开的文件。<br />　　<br />　　/* testlsof.c */<br />　　#include #include #include #include #include <br />　　int main(void)<br />　　{<br />　　 open(&amp;quot;/tmp/foo&amp;quot;, O_CREAT|O_RDONLY); /* 打开文件/tmp/foo */<br />　　 sleep(1200); /* 睡眠1200秒，以便进行后续操作 */<br />　　 return 0;<br />　　}<br />　　<br />　　将testlsof放入后台运行，其pid为3125。命令lsof -p 3125查看进程3125打开了哪些文件，我们用strace跟踪lsof的运行，输出结果保存在lsof.strace中：<br />　　<br />　　# gcc testlsof.c -o testlsof<br />　　# ./testlsof &amp;amp;<br />　　[1] 3125<br />　　# strace -o lsof.strace lsof -p 3125<br />　　<br />　　我们以&amp;quot;/tmp/foo&amp;quot;为关键字搜索输出文件lsof.strace，结果只有一条：<br />　　<br />　　<br />　　# grep '/tmp/foo' lsof.strace<br />　　readlink(&amp;quot;/proc/3125/fd/3&amp;quot;, &amp;quot;/tmp/foo&amp;quot;, 4096) = 8<br />　　<br />　　原来lsof巧妙的利用了/proc/nnnn/fd/目录（nnnn为pid）：Linux内核会为每一个进程在/proc/建立一个以其pid为名的目录用来保存进程的相关信息，而其子目录fd保存的是该进程打开的所有文件的fd。目标离我们很近了。好，我们到/proc/3125/fd/看个究竟：<br />　　<br />　　# cd /proc/3125/fd/<br />　　# ls -l<br />　　total 0<br />　　lrwx------ 1 root root 64 Nov 5 09:50 0 -&amp;gt; /dev/pts/0<br />　　lrwx------ 1 root root 64 Nov 5 09:50 1 -&amp;gt; /dev/pts/0<br />　　lrwx------ 1 root root 64 Nov 5 09:50 2 -&amp;gt; /dev/pts/0<br />　　lr-x------ 1 root root 64 Nov 5 09:50 3 -&amp;gt; /tmp/foo<br />　　# readlink /proc/3125/fd/3<br />　　/tmp/foo<br />　　<br />　　答案已经很明显了：/proc/nnnn/fd/目录下的每一个fd文件都是符号链接，而此链接就指向被该进程打开的一个文件。我们只要用readlink()系统调用就可以获取某个fd对应的文件了，代码如下：<br />　　<br />　　<br />　　#include #include #include #include #include #include <br />　　int get_pathname_from_fd(int fd, char pathname[], int n)<br />　　{<br />　　 char buf[1024];<br />　　 pid_t pid;<br />　　 bzero(buf, 1024);<br />　　 pid = getpid();<br />　　 snprintf(buf, 1024, &amp;quot;/proc/%i/fd/%i&amp;uot;, pid, fd);<br />　　 return readlink(buf, pathname, n);<br />　　}<br />　　int main(void)<br />　　{<br />　　 int fd;<br />　　 char pathname[4096];<br />　　 bzero(pathname, 4096);<br />　　 fd = open(&amp;quot;/tmp/foo&amp;quot;, O_CREAT|O_RDONLY);<br />　　 get_pathname_from_fd(fd, pathname, 4096);<br />　　 printf(&amp;quot;fd=%d; pathname=%sn&amp;quot;, fd, pathname);<br />　　 return 0;<br />　　}<br />　　<br />　　出于安全方面的考虑，在FreeBSD 5 之后系统默认已经不再自动装载proc文件系统，因此，要想使用truss或strace跟踪程序，你必须手工装载proc文件系统：mount -t procfs proc /proc；或者在/etc/fstab中加上一行：<br />　　<br />　　proc /proc procfs rw 0 0<br /></p><p />]]></description> 
<guid isPermaLink="false">6832564@http://chongsoft.bokee.com/</guid> 
<dc:subject>Linux kernel</dc:subject> 
<dc:date>2008-11-08T08:48:00Z</dc:date> 
</item> 
<item> 
<title><![CDATA[楼市该不该救]]></title> 
<link>http://chongsoft.bokee.com/6821757.html</link> 
<description><![CDATA[希望政府能关注实体经济,因为金融危机对实体经济的打击非常大.如果在国外,银行都倒闭了,或者出现巨额亏损,哪有什么能力去贷款? 即使有人想投资,供给非常有限,所以需求就会被极大的抑制.这必然会使资金的使用价格提高,反过来会抑制需求.等经济下行了,投资需求就非常小了.在国内,如何引进外资呢? 楼市股市外资肯定会大量的撤出,因为他们都担心而且也需要资金.所以深圳的楼市先降了,北京好一点点,但是因为国内以往紧缩的货币政策,外资的撤退使得开发商不能回笼资金.只好降价.如果楼市暴跌的话,资产的财富价格就会大规模的缩水,人们的经济预期就会更加悲观.谁会花钱买奢侈品呢? 谈何刺激内需呢? 还有,如果楼市暴跌的话, 开发商破产, 坏账会增大, 优质个人客户都成了次级客户, 那时资不抵债, 引发新的一轮的金融危机.对人们的心理预期也是个巨大的打击。谈GDP的增长, 意义不大. 我现在怀疑房地产行业的统计数据,很多人说影响不大, 看和谁比. 和老美比是不大,但是对国内来说也是导致经济下行的一个重要因素.因为房地产曾经是个暴利的行业,如今都关门破产了,对GDP只有负的贡献了,对国家财政收入也是个打击.所以应该救一救. ]]></description> 
<guid isPermaLink="false">6821757@http://chongsoft.bokee.com/</guid> 
<dc:subject>经济金融</dc:subject> 
<dc:date>2008-10-18T18:49:47Z</dc:date> 
</item> 
<item> 
<title><![CDATA[中国货币供给理论 M0-M2]]></title> 
<link>http://chongsoft.bokee.com/6820033.html</link> 
<description><![CDATA[<p><font face="楷体_GB2312"><strong><font size="2">M0、M1、M2是货币供应量的范畴。人们一般根据流动性的大小，将货币供应量划分不同的层次加以测量、分析和调控。实践中，各国对M。、M1、M2的定义不尽相同，但都是根据流动性的大小来划分的，M。的流动性最强，M1次之，M2的流动性最差。 <br />我国现阶段也是将货币供应量划分为三个层次，其含义分别是： <br />M0：流通中现金，即在银行体系以外流通的现金； <br />M1：狭义货币供应量，即M。＋企事业单位活期存款； <br />M2：广义货币供应量，即M1＋企事业单位定期存款＋居民储蓄存款。 <br />在这三个层次中，M0与消费变动密切相关，是最活跃的货币； <br />M1反映居民和企业资金松紧变化，是经济周期波动的先行指标，流动性仅次于M0； <br />M2流动性偏弱，但反映的是社会总需求的变化和未来通货膨胀的压力状况，通常所说的货币供应量，主要指M2。</font></strong></font></p><p><font face="楷体_GB2312"><strong><font size="2"></font></strong></font></p><p><font face="楷体_GB2312"><strong><font size="2">看一个例子</ca /></font></strong></font></p><p><font face="楷体_GB2312">中国人民银行昨天公布的数据显示，2008年9月末，广义货币供应量(M2)余额为45.29万亿元，同比增长15.29%，比上月末低0.71个百分点。这是自今年6月份开始M2数据连续第四个月出现放缓，M2增速也创下2005年6月份以来的最低值。狭义货币供应量(M1)的降幅更大。截至9月末，M1余额为15.57万亿元，同比增长9.43%，比上月末低2.05个百分点。</font></p><p>　　市场人士认为，上述数据显示经济存在进一步下滑的压力，下一步宏观政策预计将继续放松，除了继续降息降准备金率外，财税部门可能出台减税政策。</p><p>　　⊙本报记者 但有为</p><p>　　<span id="stock_sh601166"><a class="keyword" href="http://finance.sina.com.cn/realstock/company/sh601166/nc.shtml" target="_blank">兴业银行</a></span><span id="quote_sh601166"></span>资金运营中心首席经济学家鲁政委认为，尽管从7月底开始，央行从紧力度在减弱，但M2增速还是在下降，这说明国内经济活跃程度在下降。</p><p>　　<span id="stock_sh600030"><a class="keyword" href="http://finance.sina.com.cn/realstock/company/sh600030/nc.shtml" target="_blank">中信证券</a></span><span id="quote_sh600030"></span>首席宏观分析师诸建芳则认为，M2偏低，但是更加突出的是M1非常低。这说明经济活动正在收缩。原因可能主要有两个：一是担心经济下滑导致银行惜贷；二是企业对实体经济比较悲观，信贷需求放缓。</p><p>　　而根据国家统计局10日公布的数据，三季度全国企业家信心指数大幅回落，其中房地产业的企业家信心指数跌幅最深。</p><p>　　虽然9月当月人民币贷款增加3745亿元，同比多增910亿元。但诸建芳认为，去年央行对信贷实行严格的规模控制，年底控制的力度甚至更大，导致去年同期贷款基数很小，所以今年9月份新增贷款达到3745亿元也并不算多。</p><p>　　谈及下一步的宏观政策走向，市场人士普遍认为，政策将进一步放松。</p><p>　　近日召开的央行货币政策委员会会议指出，当前要根据国内外形势变化采取灵活审慎的宏观政策，适时适度把握调控的方向、力度和节奏，进一步加强货币政策与财政、产业、外贸、金融监管等政策的协调配合，加快经济结构调整和增长方式转变，着力扩大内需，促进国际收支趋于基本平衡。</p><p>　　鲁政委认为，要防止经济继续下行，货币政策应进一步放松。他预计今年央行至少会再降一次息，存款准备金率会下调2-3次。此外，央行将会解冻一部分定向央票。他同时认为，由于目前对通胀压力不必担心，上述政策有实施的空间。</p><p>　　根据目前多家机构发布的预测数据，市场普遍认为9月份CPI仍会进一步下降，同比增幅在4.5%-4.9%之间。</p><p>　　光大证券首席宏观分析师潘向东认为，由于通胀压力在年底会继续减小，在货币政策方面，首先应该实施的是降息。存款准备金率也应该下调。在财政政策方面，他认为应该减税。</p><p>　　本月8日，央行决定下调一年期人民币存贷款基准利率各0.27个百分点，同时10月15日起下调存款类金融机构人民币存款准备金率0.5个百分点。此前，央行已于9月15日下调人民币贷款基准利率，及部分中小金融机构的人民币存款准备金率。</p><!-- news_keyword_pub,stock,sh601166&amp;sh600030 -->]]></description> 
<guid isPermaLink="false">6820033@http://chongsoft.bokee.com/</guid> 
<dc:subject>经济金融</dc:subject> 
<dc:date>2008-10-15T10:58:50Z</dc:date> 
</item> 
<item> 
<title><![CDATA[学而时习之 -- 硬盘那点事儿 (转载)]]></title> 
<link>http://chongsoft.bokee.com/6801621.html</link> 
<description><![CDATA[<p class="MsoNormal" style="MARGIN: 0cm 0cm 12pt; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">在</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="110" unitname="米" /><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">110</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">米</span></chmetcnv /><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">栏的比赛中，一直以来都是飞人鲍威尔的天下。鲍威尔的</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="100" unitname="米" /><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">100</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">米</span></chmetcnv /><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">的最好成绩达到了</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">9</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">秒</span><pan lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">74</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">，这也让他在</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="110" unitname="米" /><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">110</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">米</span></chmetcnv /><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">栏比赛中占尽先机。自从刘翔横空出世，鲍威尔就再也无缘</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="110" unitname="米" /><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">110</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">米</span></chmetcnv /><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">栏的金牌了，金牌都被刘翔收入囊中。可刘翔的</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="100" unitname="米" /><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">100</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">米</span></chmetcnv /><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">最好成绩才</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">10</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">秒</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">3</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">，但为啥又能在</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="110" unitname="米" /><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">110</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">米</span></chmetcnv /><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">栏中战胜鲍威尔呢？原来，</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="110" unitname="米" /><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">110</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">米</span></chmetcnv /><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">栏拼的不仅仅是奔跑的速度，还有跨栏的技巧。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"></span></p><p /><p class="MsoNormal" style="MARGIN: 0cm 0cm 7.5pt; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">&amp;nbsp;</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">同样，在硬盘的读写效率方面比拼的不仅仅是看谁转的快，还有寻道时间，还有内置缓存。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"></span></p><p /><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">为了理解硬盘的工作原理，我们先来打开硬盘看看：</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"></span></p><p /><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%; TEXT-ALIGN: center; mso-pagination: widow-orphan" align="center"><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600" /><stroke joinstyle="miter" /><formulas /><f eqn="if lineDrawn pixelLineWidth 0" /><f eqn="sum @0 1 0" /><f eqn="sum 0 0 @1" /><f eqn="prod @2 1 2" /><f eqn="prod @3 21600 pixelWidth" /><f eqn="prod @3 21600 pixelHeight" /><f eqn="sum @0 0 1" /><f eqn="prod @6 1 2" /><f eqn="prod @7 21600 pixelWidth" /><f eqn="sum @8 21600 0" /><f eqn="prod @7 21600 pixelHeight" /><f eqn="sum @10 21600 0" /></formulas /><path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f" /><lock aspectratio="t" v:ext="edit" /></shapetype /></span></p><p /><p class="MsoNormal" style="MARGIN: 0cm 0cm 12pt; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><img alt=" hard disk1" src="http://chongsoft.bokee.com/inc/HD001.jpg" onload="function anonymous()
{
function anonymous()
{
 img_auto_size(this,450,true);
}
}" align="baseline" /><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">那光洁如银镜的圆盘叫磁碟，它的表面就是存放数据的地方。那细如米粒的尖端上就装着读写数据的部件，叫磁头。一个磁碟的两面都可以记录数据，因此磁碟的正反面都会有一个读写磁头。而一个硬盘内可以安装多个磁碟，也就有多个磁头，磁碟和磁头都是好几层的。看看下面的解剖图就明白了：</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"></span></p><p /><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%; TEXT-ALIGN: center; mso-pagination: widow-orphan" align="center"><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-fontfamily: 宋体; mso-font-kerning: 0pt"></span></p><p /><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><img alt=" hard disk2" src="http://chongsoft.bokee.com/inc/HD002.jpg" onload="function anonymous()
{
function anonymous()
{
 img_auto_size(this,450,true);
}
}" align="baseline" /><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">我们再来看看硬盘是如何读写数据的。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">在还未给硬盘通电前，磁头总体靠在一个安全的飞机场。这个飞机场要么在磁碟的最内侧，要么在磁碟的最外侧。飞机场部分的表面是不存放数据的，仅用于磁头的起飞和着陆。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">磁碟的大部分区域是用来记录数据的，这些区域由一圈一圈的磁道组成，每个磁道又被划分成若干扇区。而磁碟的层叠看起来就像一个圆柱，那些磁道就形成以一层包裹一层的柱面结构，就像大树的年轮一样。而硬盘管理存储空间的方式都是先按柱面来存，再把磁道换到下一个柱面，并非按一个个磁碟来走的。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">早期的硬盘采用</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">CHS</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">坐标体系规划硬盘存储空间，内侧磁道和外侧磁道的扇区数都相同。即使外侧磁道比内侧磁道要长得多，但容量只能与内侧磁道相同。硬盘总存储容量实际受内侧磁道的记录密度所限制，这显然是一种浪费。当磁道密度达到第一次极限时，人类发明了</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">LBA</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">的坐标映射，允许外侧磁道划分出更多的扇区，大幅度提升了硬盘容量。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">同样，当</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">LBA</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">模式的硬盘容量又抵达距离的极限时，人类又发明了垂直记录技术，这又将大幅提升硬盘容量。所谓垂直记录技术就是把本来在磁碟表面平放的磁记录单元，改成竖着放。就像一个接一个平躺着的人会占据很长的距离，但这些人站起来就可以靠拢，从而缩小占据的距离。因此，垂直记录技术就可以在同样长度的磁道上放置更多的磁记录单元，从而提升硬盘容量。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">当硬盘加电时，磁碟便开始加速转动。磁头是按精巧的好空气动力学原理设计出来的战斗机，当它在磁头的表面滑行到一定的速度时就会飞起来，从而浮在磁碟的表面。相信没有哪种飞机能像硬盘磁头那样，以零点几微米的超低空状态保持高速飞行。这样的超低空可以保证磁头能有效地分辨细小的磁记录单元的信号变化。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">硬盘最怕什么？震动！在硬盘高速运转时，震动可能导致超低空飞行的磁头碰到磁碟表面，从而划伤磁碟，产生坏道。因此，硬盘运行时绝对禁止震动。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">硬盘的转速和磁碟记录密度与磁头读写的速度都成近似的正比关系。转速越快，磁头读取数据就越快；而记录密度越高，相同时间下磁头读取的数据就越多。因此，人们总喜欢购买转速高的硬盘或容量大的硬盘。但除了转速和记录密度之外，其他方面的因素对硬盘的读写效率更加总要。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">当硬盘接到读写命令时，磁头首先需要移动到要读写数据的磁道上，这个过程称为寻道。寻道需要时间的，这取决于磁头当前磁道与目标磁道的距离。如果距离远，移动磁头的时间就长，寻道就慢；如果距离很近，移动磁头的时间就短，寻道就快。平均寻道时间是影响硬盘读写效率的最重要指标。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">磁头找到需要读取的磁道后，要读取的数据块可能还没有转过来，这也需要等待。平均等待读取数据块的时间称为平均潜伏时间，一般是磁碟旋转周期的一半。由于现在的硬盘转速都很快，因此这个等待时间比起平均寻道时间来说要小得多。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">整体读写效率是由硬盘的平均访问时间来衡量的，它是指从硬盘收到访问命令，到完成所有操作并返回最终结果所花费的时间。平均访问时间基本就等于平均寻道时间与平均潜伏时间之和。因为这两个时间指标都与硬盘的机械结构有关，其他电信号切换和指令时间比起机械上所花的时间来说基本可以忽略不计。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">由此可见，影响硬盘读写效率的主要是平均寻道时间。如果一个文件在硬盘中扇区太分散，东一块西一段的，那么读取这个文件时，磁头就会嚓嚓嚓地乱跳。由于把大多数的时间都花在寻找不连续的磁道上，读取文件的效率也就大大降低了。同样，当们的硬盘由于文件的平凡更迭，会自然形成许多不连续的文件和磁盘碎片。这时，系统的运行效率也就大大降低，根源也是寻道时间太多。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">为了对硬盘运行原理有一个感性的认识，我们来看看一段录像：(Sorry, Blog is not supportted)</span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 150%; TEXT-ALIGN: left; mso-pagination: widow-orphan" align="left"><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"></span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">录像中，</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">Copy &amp;amp; Paste </span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">这种交替跨磁道的读写导致了磁头的剧烈振动，这不仅仅会导致读写效率的下降，还会制造噪音，并加速硬盘的损耗。而类似</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">Format</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">那种连续操作时，速度非常快，磁头也运行得很平稳和安静。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">现代的硬盘都有内置缓存，这些缓存可提供一项重要的功能：</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">“</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">预取</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">”</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">。预读就是在硬盘读取完指定扇</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> </span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">区的数据之后、接到系统的下一条指令之前，磁头接着读取相邻的若干扇区的数据并存入缓存中。如果系统接下来所需的数据正好就是相邻扇区的数据，那么便可以</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"> </span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">直接从缓存中读取而不用磁头再寻址，从而极大提高数据访问速度。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">如果，我们定期对硬盘进行碎片整理，尽量保持文件的连续和有序，将对硬盘带来巨大好处。硬盘在读取这些连续数据时，磁头很少剧烈震动，磁盘运行很安静。因为连续有序的数据文件可以极大减少寻道时间，既能提高读取数据的速度，又可减少硬盘损耗，延长使用寿命。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">此外，磁盘内置缓存的预读能力正好符合连续数据的读取。从寻道时间和缓存命中率两项指标来看，连续有序的数据可以极大提升电脑系统的运行效率。在实际生活中，一般的文件都会占用成千上万个扇区的空间，根据缓存</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">“</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">预取</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">”</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">的原理，如果硬盘中的文件完全没有磁盘碎片的话，那么</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">“</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">预取</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">”</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">的命中率就可以达到几乎</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">100%</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">，但因为有磁盘碎片，通常</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">“</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">预取</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">”</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">的命中率只在</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">50%</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">左右。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-famil: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">同样，在数据库应用系统中，我们也应该尽量保持数据存储的连续和有序。尽管数据库会有自己存放数据的格式，操作系统也存在自己的缓存机制。但这些上层的顺序结构和缓存机制，也会多多少少体现在硬盘的磁道和扇区的相邻性上。因为这些结构和机制也是基于硬盘的顺序结构和缓存机制来设计的。因此，在数据库的数据存储中尽量保证其物理连续性，将有助于提高数据库的查询效率。这也是为什么聚集索引要比其他索引快的原因，也是为什么精心设计的主键可以让索引的</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">B</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">树在硬盘上更连续的原因。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">如果您读过薛定谔的那本著名的《生命是什么》，您将会明白生命的物理学意义就是让宇宙变得有序。让世界更有序是生命的天性，有智慧的程序员会让这种天性融入自己的程序中的。</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">预祝刘翔在</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">2008</span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">奥运会上跑得更加有序！</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><br /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">原创：李战</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">(leadzen) <chsdate w:st="on" isrocdate="False" islunardate="False" day="25" month="6" year="2008" />2008-6-25</chsdate /><br /></span><span style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体; mso-ascii-font-family: Verdana; mso-hansi-font-family: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt">原文：</span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%; FONT-FAMILY: Verdana; mso-bidi-font-family: 宋体; mso-font-kerning: 0pt"><a href="http://www.cnblogs.com/leadzen/archive/2008/06/25/1229413.html">http://www.cnblogs.com/leadzen/archive/<chsdate w:st="on" isrocdate="False" islunardate="False" day="25" month="6" year="2008" />2008/06/25</chsdate />/1229413.html</a></span><span lang="EN-US" style="FONT-SIZE: 9pt; LINE-HEIGHT: 150%"></span></p><p />]]></description> 
<guid isPermaLink="false">6801621@http://chongsoft.bokee.com/</guid> 
<dc:subject>科普认知</dc:subject> 
<dc:date>2008-09-15T12:44:29Z</dc:date> 
</item> 
<item> 
<title><![CDATA[关于手机时钟的文章]]></title> 
<link>http://chongsoft.bokee.com/6798325.html</link> 
<description><![CDATA[<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 18pt; mso-char-indent-count: 2.0"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">手机中的时钟大致分为逻辑电路主时钟和实时时钟两大类。逻辑电路的主时钟通常有</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">、</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="26" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">26M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">、和</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="19.5" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">19.5M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">等；实时时钟一般为</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">。无论是逻辑电路的主时钟还是实时时钟，均是手机正常工作的必要条件，由于手机各厂家设计思路和电路结构不同，主时钟和实时时钟电路若不正常时，反映出的故障现象也不尽相同。</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <span lang="EN-US"><p /></span></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10pt"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"><p>&amp;nbsp;</p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10pt"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">一、时钟频率的产生</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br style="mso-special-character: line-break" /><br style="mso-special-character: line-break" /><p /></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10pt"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">1</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">、</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> </span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">逻辑电路主时钟的产生</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br /></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">大多数</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">GSM</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">手机的主时钟是</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">（</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">CDMA</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">为</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="19.68" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">19.68M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">，小灵通</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="19.2" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">19.2M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-famly: Arial; mso-bidi-font-family: Arial">）；摩托罗拉手机多采用</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="26" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">26M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">，三星手机</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">A</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">系列手机多采用</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="19.5" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">19.5M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">，经分频后获得</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">供逻辑电路。</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">作为逻辑电路的主时钟（好比人按照北京时间安排作息），逻辑电路按时序进行有规律的工作。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br /></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">手机中</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">的频率是否准确，决定于</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">AFC</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">电压，</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">AFC</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">电压的产生，是基站根据手机传送的频率信息与网络系统高精度、高稳定的频率鉴相后，把信息传给手机，由</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">CPU</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">处理后产生直流电压，去控制</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">的振荡频率，使手机中</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">与基站保持严格同步。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br /><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m">13M</chmetcnv></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">产生电路分为纯石英晶振和</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">组件两种。石英晶体是与其他电路共同组成振荡产生</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">；</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">组件电路只要加电即可产生</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">频率。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br /></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">在手机电路中，无论纯石英晶体或</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">组件电路，均需要电源正常工作输出供电，</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">电路才能产生</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">输出。</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <span lang="EN-US"><p /></span></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"><p>&amp;nbsp;</p></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">2</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">、</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> </span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">实时时钟频率的产生</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <span lang="EN-US"><p /></span></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">手机中的实时时钟频率基本上都是</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">，是由</span><span lan="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">晶体配合其他电路产生。为了维持手机中时间的连续性，</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> 32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">不能间断工作，关机或去下电池后，由备用电池供电工作（有的手机去下电池一段时间后，开机需再调整时间，是机内没有备用电池或备用电池需要更换）。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br style="mso-special-character: line-break" /><br style="mso-special-character: line-break" /><p /></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">二、时钟频率的作用</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br />1</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">、逻辑电路主时钟的作用</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br /><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m">13M</chmetcnv></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">作为逻辑电路的主时钟，是逻辑电路工作的必要条件。开机时需要有足够的幅度（</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">9—<chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="15" unitname="m">15M</chmetcnv></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">范围内均可开机）。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br /></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">开机后，</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">作为射频电路的基准频率时钟，完成射频系统共用收发本振频率合成、</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">PLL</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">锁相以及倍频作为基准副载波用于</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">I/Q</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">调制解调。因此，信号对</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">的频率要求精度较高（应在</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="12.9999" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">12.9999M</span></chmetcnv><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">—<chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m">13.0000M</chmetcnv></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">之间，</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">±</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">误差不超过</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">150Hz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">），只有</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">基准频率精确，才能保证收发本振的频率准确，使手机与基站保持正常的通讯，完成基本的收发功能。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br style="mso-special-character: line-break" /><br style="mso-special-character: line-break" /><p /></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10pt"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">2</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">、实时时钟电路的作用</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br style="mso-special-character: line-break" /><br style="mso-special-character: line-break" /><p /></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10pt"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">实时时钟的作用一般有两个，一是保持手机中时间的准确性，二是在待机状态下，作为逻辑电路的主时钟（目的是为了节电，待机时</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">间隔工作的周期延长，基本处于休眠，逻辑电路主要由</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">作为主时钟）。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br /><br /></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">由于各厂家设计思路不同，</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">的具体作用也有所不同，如摩托罗拉手机中</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">损坏，直接影响开机；诺基亚、三星、松下、西门子等手机中</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">不正常影响开机和信号。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br /><br /></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">三、时钟电路的故障</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br /><br />1</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">、逻辑电路主时钟故障</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br /></span><spn style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">众所周知，</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">出现停振或振荡幅度过小，逻辑电路不工作造成不开机，大部分手机</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">不正常的故障现象是开机电流很小（一般在</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">10mA</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">左右）。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br style="mso-special-character: line-break" /><br style="mso-special-character: line-break" /><p /></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10pt"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">逻辑电路正常工作的经典电流是</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">50mA</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">左右，当开机电流小于</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">50mA</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">时，重点检查逻辑电路正常工作的所必要条件电路，如电源、</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">、复位、软件电路等。若开机后</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">停振，会造成手机自动关机。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br style="mso-special-character: line-break" /><br style="mso-special-character: line-break" /><p /></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10pt"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">如果</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">出现频偏较小，使收发本振和混频后的中频以及调制解调出的</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">I/Q</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">基带信号均产生偏离，形成信号时有时无；若</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">偏离较大，造成无信号；如</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">偏离太远，还会出现死机、定屏、开机困难、自动关机等故障。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br style="mso-special-character: line-break" /><br style="mso-special-character: line-break" /><p /></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10pt"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">检修</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">是否正常，可用示波器或频率计测量，正常时示波器可测量到密集正弦波形成的亮带，调低示波器的频率可见到规律的正弦波；频率计可直接读到</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">的具体频率数值（若停振什么也测不到）。一般情况下，</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">停振或频偏，只要供电正常，多为晶振问题，更换即可。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br style="mso-special-character: line-break" /><br style="mso-special-character: line-break" /><p /></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10pt"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">2</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">、实时时钟故障</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br style="mso-special-character: line-break" /><br style="mso-special-character: line-break" /><p /></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10pt"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">不正常时，由于机型不同反映出的故障现象也不同，开机电流比</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">主时钟不正常稍大（一般在</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">20mA</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">左右）。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br /></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">如摩托罗拉手机中的</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family:Arial; mso-bidi-font-family: Arial">与电源块构成振荡，是作为逻辑电路工作的一个前提条件，如果</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">不工作，逻辑电路就不能工作出现不开机；诺基亚手机中的</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">作为逻辑电路</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">CPU</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">数据传输的时钟，损坏后不开机，拆下后可以开机但无时间显示，若性能不良会引起信号时有时无（信号条逐渐消失）；松下、西门子部分手机</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">损坏可以开机，但无时间显示或时间不准；三星部分手机</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">损坏不开机，拆下可以开机但无时间显示或开机后灯灭关机；还有部分手机如夏新</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">A8</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">，</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">作为</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">CPU</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">的启动时钟，若损坏同样造成不开机。</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial"> <br style="mso-special-character: line-break" /><br style="mso-special-character: line-break" /><p /></span></p><p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 10pt"><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">测量</span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">32.768KHz</span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">的方法与</span><chmetcnv w:st="on" tcsc="0" numbertype="1" negative="False" hasspace="False" sourcevalue="13" unitname="m"><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: Arial">13M</span></chmetcnv><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: Arial; mso-hansi-font-family: Arial; mso-bidi-font-family: Arial">相同，也是用示波器和频率计测亮带和读数，如不起振，通常是备用电池短路或晶体损坏引起，更换即可。</span></p>]]></description> 
<guid isPermaLink="false">6798325@http://chongsoft.bokee.com/</guid> 
<dc:subject>默认栏目</dc:subject> 
<dc:date>2008-09-10T11:55:11Z</dc:date> 
</item> 
<item> 
<title><![CDATA[Device driver bus 三者关系 (非常恰当 转载) ]]></title> 
<link>http://chongsoft.bokee.com/6777195.html</link> 
<description><![CDATA[<p>&amp;nbsp; 对Linux驱动理解的深化，我们不得不去探究一下bus,device,driver之间的关系，看看表面背后那只无形的手，今天不想多谈bus,我今天重点谈一下device与driver的关系，因为他们俩的关系很暧昧。很值得探究。为什么这样说呢？如果把device比作人的身躯，那么driver就是人的灵魂，如果把device比作男人，那么driver就是女人，如果身躯离开了灵魂，那它只是一堆烂肉，如果男人离开了女人，那他也将一事无成，因为女人是男人背后最大的驱动力（driver），如果device是西门庆，那driver就是潘金莲。<br />　　那device与driver是如何产生暧昧关系的？这个问题才是我们最关心的，要解答这个问题，那就要问bus了，因为她是媒婆，是牵线人，bus把 device介绍给了driver，device与driver眉来眼去，最终确定了这种暧昧关系，bus是如何牵的线呢？这个今天我们就不去多加追究，对媒婆没有太多兴趣，据可靠情报透露，bus是通过家传的配对大法（match）使device与driver联系了起来，当然我们也会想到一句话：红颜祸水。的确不错，driver抛（probe)的媚眼也是关键。<br />　　好了，说了很多，是不是有点晕，最后整理一下device与driver产生暧昧关系的过程，首先由媒婆牵线（match)，后来driver抛个媚眼 (probe)，device便拜倒在了driver的石榴裙下，彼此产生了暧昧关系，最后谁也离不开了谁，彼此缺少了对方，就像鱼儿离开了水！<br /></p>]]></description> 
<guid isPermaLink="false">6777195@http://chongsoft.bokee.com/</guid> 
<dc:subject>Linux kernel</dc:subject> 
<dc:date>2008-08-07T22:54:07Z</dc:date> 
</item> 
<item> 
<title><![CDATA[BCD编码方式 （转）]]></title> 
<link>http://chongsoft.bokee.com/6775579.html</link> 
<description><![CDATA[<p>BCD编码方式</p><p><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><font size="3">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span><font size="3">在数字系统中，各种数据要转换为二进制代码才能进行处理，而人们习惯于使用十进制数，所以在数字系统的输入输出中仍采用十进制数，这样就产生了用四位二进制数表示一位十进制数的方法，这种用于表示十进制数的二进制代码称为二－十进制代码（Binary Coded Decimal），简称为BCD码。它具有二进制数的形式以满足数字系统的要求，又具有十进制的特点（只有十种有效状态）。在某些情况下，计算机也可以对这种形式的数直接进行运算。<br /></font><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><font size="3">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span><font size="3">4位二进制码共有16种组合，可从中任取10种组合来表示0～9这10个数。根据不同的选取方法，可以编制出很多种BCD码，如8421码，5421码，2421码，5211码和余3码。下表列出了这几种BCD码，其中的8421 BCD码最为常用。<br /></font><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><font size="3">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span><font size="3">常见的BCD码表示有以下几种。<br /></font><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><font size="3">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span><font size="3">8421BCD编码<br /></font><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><font size="3">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span><font size="3">这是一种使用最广的BCD码，是一种有权码，其各位的权分别是（从最有效高位开始到最低有效位）8,4,2,1。<br /></font><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><font size="3">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span><font size="3">例　写出十进数563.97D对应的8421BCD码。<br />　　　　563.97D=0101 0110 0011 . 1001 01118421BCD<br /></font><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><font size="3">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span><font size="3">例　写出8421BCD码1101001.010118421BCD对应的十进制数。<br />　　　　1101001.010118421BCD＝0110 1001 . 0101 10008421BCD=69.58D<br /></font><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><font size="3">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span><font size="3">在使用8421BCD码时一定要注意其有效的编码仅十个，即：0000～1001。四位二进制数的其余六个编码1010,1011,1100,1101,1110,1111不是有效编码。<br /></font><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><font size="3">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span><font size="3">2421BCD编码<br /></font><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><font size="3">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span><font size="3">2421BCD码也是一种有权码，其从高位到低位的权分别为2,4,2,1，其也可以用四位二进制数来表示一位十进制数。其编码规则如下表。<br /></font><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><font size="3">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span><font size="3">余3码<br /></font><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><font size="3">&amp;nbsp;&amp;nbsp;&amp;nbsp; </font></span><font size="3">余3码也是一种BCD码，但它是无权码，但由于每一个码对应的8421BCD码之间相差3,故称为余3码，其一般使用较少，故正须一般性了解，具体的编码如下表。<br /></font><p class="MsoNormal"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">表 常用<span lang="EN-US">BCD编码表</span></span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p><div align="center"><table style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; WIDTH: 74.36%; BORDER-BOTTOM: medium none" cellspacing="0" cellpadding="0" width="74%" border="1"><tbody><tr><td style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none"><div align="center"><table style="BORDER-RIGHT: rgb(204,204,204) 0.75pt outset; BORDER-TOP: rgb(204,204,204) 0.75pt outset; BORDER-LEFT: rgb(204,204,204) 0.75pt outset; WIDTH: 307.6pt; BORDER-BOTTOM: rgb(204,204,204) 0.75pt outset" cellspacing="0" cellpadding="0" width="410" border="0"><tbody><tr><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 67.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="90"><p class="MsoNormal"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><stroke joinstyle="miter" /><formulas><f eqn="if lineDrawn pixelLineWidth 0" /><f eqn="sum @0 1 0" /><f eqn="sum 0 0 @1" /><f eqn="prod @2 1 2" /><f eqn="prod @3 21600 pixelWidth" /><f eqn="prod @3 21600 pixelHeight" /><f eqn="sum @0 0 1" /><f eqn="prod @6 1 2" /><f eqn="prod @7 21600 pixelWidth" /><f eqn="sum @8 21600 0" /><f eqn="prod @7 21600 pixelHeight" /><f eqn="sum @10 21600 0" /></formulas><path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f" /><lock aspectratio="t" v:ext="edit" /></shapetype><shape id="_x0000_i1025" style="WIDTH: 63.75pt; HEIGHT: 32.25pt" alt="" type="#_x0000_t75"><imagedata o:href="http://www.dqpi.net/xdjyzx01/homepage/jpkc/fgj/dgdzjs/resource/knowledge/zsd11/images/z0401.gif" src="file:///C:/DOCUME~1/USF/LOCALS~1/Temp/msoclip1/02/clip_image001.gif" /></shape></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">8421码</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">5421码</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="66"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">2421码</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 50.6pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">5211码</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">余<span lang="EN-US">3码</span></span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td></tr><tr><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 67.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="90"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0000</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0000</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="66"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0000</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 50.6pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0000</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0000</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td></tr><tr><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 67.25pt; PADDING-TOP: 0cm; ORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="90"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0001</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0001</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="66"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0001</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 50.6pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0001</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0100</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td></tr><tr><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 67.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="90"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">2</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0010</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0010</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="66"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0010</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 50.6pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0100</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0101</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td></tr><tr><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 67.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="90"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">3</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0011</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0011</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="66"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0011</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 50.6pt; PADDING-TOP: 0c; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0101</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0110</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td></tr><tr><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 67.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="90"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">4</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0100</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0100</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="66"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0100</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 50.6pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0111</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0111</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td></tr><tr><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 67.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="90"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">5</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0101</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1000</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="66"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0101</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 50.6pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1000</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1000</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td></tr><tr><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 67.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="90"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">6</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0110</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDIG-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1001</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="66"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0110</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 50.6pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1001</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1001</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td></tr><tr><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 67.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="90"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">7</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0111</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1010</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="66"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">0111</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 50.6pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1100</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1010</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td></tr><tr><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 67.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="90"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">8</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1000</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1011</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="66"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1110</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 50.6pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1101</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1011</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td></tr><tr><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH 67.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="90"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">9</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1001</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1100</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="66"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1111</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 50.6pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1111</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">1100</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td></tr><tr><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 67.25pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="90"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">权</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.9pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">8421</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">5421</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 49.85pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="66"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">2421</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 50.6pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="67"><p class="MsoNormal" style="TEXT-ALIGN: center" align="center"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体">5211</span><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td><td style="BORDER-RIGHT: rgb(204,204,204) 0.75pt inset; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(204,204,204) 0.75pt inset; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: rgb(204,204,204) 0.75pt inset; WIDTH: 45pt; PADDING-TOP: 0cm; BORDER-BOTTOM: rgb(204,204,204) 0.75pt inset" width="60"><p class="MsoNormal"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span>&amp;nbsp;</p></td></tr></tbody></table></div><p class="MsoNormal"><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><p /></span></p></td></tr></tbody></table></div><span lang="EN-US" style="FONT-SIZE: 12pt; FONT-FAMILY: 宋体"><font size="3">非压缩式和压缩式BCD码<br />&amp;nbsp;&amp;nbsp;&amp;nbsp; BCD又分为两种，非压缩式和压缩式两种。<br />&amp;nbsp;&amp;nbsp;&amp;nbsp; 前面这种81存成 “08,01” 是非压缩式，而压缩式会存成 “81h” (直接以十六进制储存)。非压缩的BCD码只有低四位有效，而压缩的BCD码则将高四位也用上了，就是说一个字节有两个BCD码。BCD是用0和1表示十进制，如0000表示0，0001表示1，0010表示2。而压缩的BCD是用00表示0，01表示1，10表示2，110表示3等。<br />&amp;nbsp;&amp;nbsp;&amp;nbsp; 例：<br />&amp;nbsp;&amp;nbsp;&amp;nbsp; 1234表示成非压缩的BCD码是00000001000000100000001100000100，也就是0x01020304；而压缩BCD码则表示成0001001000110100，也就是0x1234。<br />&amp;nbsp;&amp;nbsp;&amp;nbsp; 但压缩的BCD并不固定，可看情况而定，所要的就是用最少的位数表示尽可能多的数。</font><br /></span></p>]]></description> 
<guid isPermaLink="false">6775579@http://chongsoft.bokee.com/</guid> 
<dc:subject>默认栏目</dc:subject> 
<dc:date>2008-08-05T17:00:19Z</dc:date> 
</item> 

</channel> 
</rss> 
