📄 chapter9.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0036)http://www.xtrj.org/smr/chapter9.htm -->
<HTML xmlns:o = "urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD><!-- http://www.xtrj.org/smr/chapter9.htm -->
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<META content=Word.Document name=ProgId>
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<META content="Microsoft Word 10" name=Originator><LINK
href="http://www.xtrj.org/smr/mipsas_files/filelist.xml" rel=File-List><!--[if gte mso 9]><xml>
<o:DocumentProperties>
<o:Template>Normal</o:Template>
<o:Revision>2</o:Revision>
<o:TotalTime>5</o:TotalTime>
<o:Created>2003-10-21T22:12:00Z</o:Created>
<o:LastSaved>2003-10-21T22:12:00Z</o:LastSaved>
<o:Pages>1</o:Pages>
<o:Words>2119</o:Words>
<o:Characters>12082</o:Characters>
<o:Lines>100</o:Lines>
<o:Paragraphs>28</o:Paragraphs>
<o:CharactersWithSpaces>14173</o:CharactersWithSpaces>
<o:Version>10.2625</o:Version>
</o:DocumentProperties>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:GrammarState>Clean</w:GrammarState>
<w:PunctuationKerning/>
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery>
<w:DisplayVerticalDrawingGridEvery>2</w:DisplayVerticalDrawingGridEvery>
<w:Compatibility>
<w:SpaceForUL/>
<w:BalanceSingleByteDoubleByteWidth/>
<w:DoNotLeaveBackslashAlone/>
<w:ULTrailSpace/>
<w:DoNotExpandShiftReturn/>
<w:AdjustLineHeightInTable/>
<w:UseFELayout/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<STYLE>@font-face {
font-family: Wingdings;
}
@font-face {
font-family: SimSun;
}
@font-face {
font-family: PMingLiU;
}
@font-face {
font-family: SimHei;
}
@font-face {
font-family: @SimSun;
}
@font-face {
font-family: @PMingLiU;
}
@font-face {
font-family: @SimHei;
}
@page {mso-page-border-surround-header: no; mso-page-border-surround-footer: no; }
@page Section1 {size: 595.3pt 841.9pt; margin: 1.0in 1.25in 1.0in 1.25in; mso-header-margin: 42.55pt; mso-footer-margin: 49.6pt; mso-paper-source: 0; layout-grid: 15.6pt; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-fareast-language: ZH-TW; mso-fareast-font-family: PMingLiU; mso-style-parent: ""; mso-pagination: none; mso-font-kerning: 1.0pt
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-fareast-language: ZH-TW; mso-fareast-font-family: PMingLiU; mso-style-parent: ""; mso-pagination: none; mso-font-kerning: 1.0pt
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; mso-fareast-language: ZH-TW; mso-fareast-font-family: PMingLiU; mso-style-parent: ""; mso-pagination: none; mso-font-kerning: 1.0pt
}
H1 {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 22pt; MARGIN: 17pt 0in 16.5pt; LINE-HEIGHT: 240%; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify; mso-fareast-font-family: SimSun; mso-pagination: lines-together; mso-font-kerning: 22.0pt; mso-style-next: Normal; mso-outline-level: 1
}
H2 {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 16pt; MARGIN: 13pt 0in; LINE-HEIGHT: 173%; FONT-FAMILY: Arial; TEXT-ALIGN: justify; mso-fareast-font-family: SimHei; mso-pagination: lines-together; mso-font-kerning: 1.0pt; mso-style-next: Normal; mso-outline-level: 2; mso-bidi-font-family: "Times New Roman"
}
H3 {
TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 16pt; MARGIN: 13pt 0in; LINE-HEIGHT: 173%; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify; mso-fareast-font-family: SimSun; mso-pagination: lines-together; mso-font-kerning: 1.0pt; mso-style-next: Normal; mso-outline-level: 3
}
SPAN.GramE {
mso-style-name: ""; mso-gram-e: yes
}
DIV.Section1 {
page: Section1
}
OL {
MARGIN-BOTTOM: 0in
}
UL {
MARGIN-BOTTOM: 0in
}
</STYLE>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]--></HEAD>
<BODY lang=EN-US style="TEXT-JUSTIFY-TRIM: punctuation; tab-interval: 24.0pt">
<DIV class=Section1 style="LAYOUT-GRID: 15.6pt none">
<H1><SPAN style="mso-tab-count: 1"> </SPAN>Assembler
language programming</H1>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><SPAN lang=ZH-CN
style="FONT-FAMILY: SimSun; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-language: ZH-CN">这一章将告诉你如何阅读并编写</SPAN><SPAN
style="mso-fareast-language: ZH-CN; mso-fareast-font-family: SimSun">MIPS</SPAN><SPAN
lang=ZH-CN
style="FONT-FAMILY: SimSun; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-language: ZH-CN">体系下的汇编代码。</SPAN><SPAN
style="mso-fareast-language: ZH-CN; mso-fareast-font-family: SimSun">MIPS</SPAN><SPAN
lang=ZH-CN
style="FONT-FAMILY: SimSun; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-language: ZH-CN">汇编代码看上去与实际的代码差异很大,这主要是因为以下原因</SPAN><SPAN
style="mso-fareast-language: ZH-CN; mso-fareast-font-family: SimSun">:</SPAN></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><SPAN
style="mso-fareast-language: ZH-CN; mso-fareast-font-family: SimSun">1,</SPAN><SPAN
style="mso-fareast-language: ZH-CN"><SPAN
style="mso-tab-count: 1"> </SPAN></SPAN><SPAN
style="mso-fareast-language: ZH-CN; mso-fareast-font-family: SimSun">MIPS</SPAN><SPAN
lang=ZH-CN
style="FONT-FAMILY: SimSun; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-language: ZH-CN">汇编编译器</SPAN><SPAN
style="mso-fareast-language: ZH-CN; mso-fareast-font-family: SimSun">(assembler)</SPAN><SPAN
lang=ZH-CN
style="FONT-FAMILY: SimSun; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-language: ZH-CN">提供了大量的已经预定义的宏指令</SPAN><SPAN
style="mso-fareast-language: ZH-CN; mso-fareast-font-family: SimSun">(extra
macro-instruction)</SPAN><SPAN lang=ZH-CN
style="FONT-FAMILY: SimSun; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-language: ZH-CN">。所以编译器的指令集</SPAN><SPAN
style="mso-fareast-language: ZH-CN; mso-fareast-font-family: SimSun">(instruction
set)</SPAN><SPAN lang=ZH-CN
style="FONT-FAMILY: SimSun; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-language: ZH-CN">要比</SPAN><SPAN
style="mso-fareast-language: ZH-CN; mso-fareast-font-family: SimSun">CPU</SPAN><SPAN
lang=ZH-CN
style="FONT-FAMILY: SimSun; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-language: ZH-CN">实际提供的指令集大的多。</SPAN></P>
<P class=MsoNormal style="TEXT-INDENT: 21pt"><SPAN
style="mso-fareast-language: ZH-CN; mso-fareast-font-family: SimSun">2</SPAN><SPAN
lang=ZH-CN
style="FONT-FAMILY: SimSun; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-language: ZH-CN">,在</SPAN><SPAN
style="mso-fareast-language: ZH-CN; mso-fareast-font-family: SimSun">MIPS</SPAN><SPAN
lang=ZH-CN
style="FONT-FAMILY: SimSun; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-fareast-language: ZH-CN">汇编代码中有许多伪操作符,放在代码开始和结束的地方,用来预定义常用数据,控制指令排列顺序,以及控制对代码的优化。通常它们被称为
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -