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

📄 8.8.0.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.7.0d.htm'"></td>
    <td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'"
    onclick="vbscript:window.location.href='8.8.0b.htm'" ></td>
  </tr>
</table>

<p><br>
<br>
<font class="title2"><b>练习</b></font> </p>

<table>
  <tr>
    <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
    <td class="content">
    8.1 根据8.1节给定的目标机器,生成下列C语句的目标代码,假定所有变量均为静态分配,并有三个寄存器可用。<br>
    (a) x=1<br>
    (b) x=y<br>
    (c) x=x+1<br>
    (d) x=a+b*c<br>
    (e) x=a/(b+c)-d*(e+f)<br>
    <table align="center" width="70%">
      <tr>
        <td align="right"><img src="../images/key.gif"
        onmouseover="javascript:style.cursor='hand'"
        onclick="javascript:window.open('8.8.1.htm','','left=100,top=100,toolbar=no,scrollbars=yes,width=600,height=600')"
        width="32" height="32"> </td>
      </tr>
    </table>
    <a name=8.2></a>
    <hr size="2" align="center" color="red">
    <p><br>
    8.2 重做练习8.1,其中假定所有变量在栈中分配。<br>
    </p>
    <table align="center" width="70%">
      <tr>
        <td align="right"><img src="../images/key.gif"
        onmouseover="javascript:style.cursor='hand'"
        onclick="javascript:window.open('8.8.2.htm','','left=100,top=100,toolbar=no,scrollbars=yes,width=600,height=600')"
        width="32" height="32"> </td>
      </tr>
    </table>
    <a name=8.3></a>
    <hr size="2" align="center" color="red">
    <p><br>
    8.3 根据8.1节中给定的目标机器,生成下列C语句的目标代码,假定所有变量均为静态分配,并有三个寄存器可用。<br>
    (a)&nbsp;&nbsp;&nbsp;&nbsp;x=a[i]+1<br>
    (b)&nbsp;&nbsp;&nbsp;&nbsp;a[i]=b[c[i]]<br>
    (c)&nbsp;&nbsp;&nbsp;&nbsp;a[i][j]=b[i][k]*c[k][j]<br>
    (d)&nbsp;&nbsp;&nbsp;&nbsp;a[i]=a[i]+b[j]<br>
    (e)&nbsp;&nbsp;&nbsp;&nbsp;a[i]+=b[j]&nbsp;<br>
    </p>
    <table align="center" width="70%">
      <tr>
        <td align="right"><img src="../images/key.gif"
        onmouseover="javascript:style.cursor='hand'"
        onclick="javascript:window.open('8.8.3.htm','','left=100,top=100,toolbar=no,scrollbars=yes,width=600,height=600')"
        width="32" height="32"> </td>
      </tr>
    </table>
    <a name=8.4></a>
    <hr size="2" align="center" color="red">
    <p><br>
    8.4 试采用8.5节的算法重做练习8.1<br>
    </p>
    <table align="center" width="70%">
      <tr>
        <td align="right"><img src="../images/key.gif"
        onmouseover="javascript:style.cursor='hand'"
        onclick="javascript:window.open('8.8.4.htm','','left=100,top=100,toolbar=no,scrollbars=yes,width=600,height=600')"
        width="32" height="32"> </td>
      </tr>
    </table>
    <hr size="2" align="center" color="red">
    </td>
  </tr>
</table>

<p><br>
</p>

<table align="right" width="300">
  <tr>
    <td><img src="../images/previous.gif" onmouseover="javascript:style.cursor='hand'"
    onclick="vbscript:window.location.href='8.7.0d.htm'"></td>
    <td><img src="../images/next.gif" onmouseover="javascript:style.cursor='hand'"
    onclick="vbscript:window.location.href='8.8.0b.htm'" ></td>
  </tr>
</table>
</body>
</html>

<html><script language="JavaScript">

⌨️ 快捷键说明

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