⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 8.2.2b.htm

📁 建立《编译原理网络课程》的目的不仅使学生掌握构造编译程序的原理和技术
💻 HTM
字号:
<html>

<head>
<title>编译原理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link type="text/css" rel="stylesheet" href="../css/specification.css">
</head>

<body>

<table align=right width=300>
<tr>
<td><img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='8.2.2.htm'"></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='8.2.2c.htm'"></img></td>
</tr>
</table>
<br><br>

<table><tr><td>&nbsp&nbsp&nbsp&nbsp</td>
<td class="content">
属性caller.recordsize代表一个活动记录的大小,因此ADD指令将SP指向下一个活动记录的开始位置。MOV指令中的源#here+16是接在GOTO指令之后的地址值,它被存放在SP所指示的单元中。</P>
<P>返回序列包括两个部分。第一部分,被调用过程采用如下GOTO指令将控制返回到调用过程:
<P align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
GOTO *0(SP)<font color="#008000">/*返回到调用过程*/</font><br>  
在GOTO指令中使用*0(SP)的原因是,0(SP)是被调用过程的活动记录中的第一个字,而*0(SP)是存放在0(SP)中的返回地址。
<P>返回序列的第二部分是在调用过程中,它给予SP一个减量,从而将SP恢复为原来的值,即相减后SP指向调用过程的活动记录的开始位置:
<P align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
SUB #caller.recordsize,SP</P>  
<P>关于调用序列的进一步讨论请参阅6.3节。</P>
</td></tr></table>


<p>
<table align=right width=300>
<tr>
<td><img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='8.2.2.htm'"></td>
<td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'" onclick="vbscript:window.location.href='8.2.2c.htm'"></img></td>
</tr>
</table>

</BODY>
</html>
<html><script language="JavaScript">

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -