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

📄 asm.html

📁 熟悉非常简单CPU模拟器 1、将所给模拟器的源程序编译成执行程序。 2、运行并观察非常简单CPU模拟器
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<H3><a name="comments"></a>Comments</H3>
<P>Comments are useful for documenting the source program. The assembler recognizes 
  the semicolon (<CODE>;</CODE>) as a comment delimiter character. Any character 
  or sequence of characters preceded by a semicolon is considered a comment. Comments 
  can occupy an entire line, or can be placed at the end of a source statement.</P>
<P><I>Examples:</I></P>
<CODE> 
<BLOCKQUOTE>; This comment occupies an entire line</BLOCKQUOTE>
<BLOCKQUOTE>LDAC 1000 ; This is a trailing comment</BLOCKQUOTE>
</CODE> 
<p>&nbsp;</p>
<H3><a name="numconst"></a>Numeric Constants</H3>
<P>Numeric constants can be used in source statements. If there is no postfix, 
  the assembler assumes the number is decimal.</P>
<TABLE CELLSPACING=0 BORDER=0 CELLPADDING=7>
  <TR> 
    <TD VALIGN="TOP"> <P><I>number</I></P></TD>
    <TD VALIGN="TOP"> <P>can be one of the following:</P>
      <UL>
        <LI><I>bin_num</I><CODE>B</CODE></LI>
        <LI><I>dec_num</I> (or <I>dec_num</I><CODE>D</CODE>)</LI>
        <LI><I>oct_num</I><CODE>O</CODE> (or <I>oct_num</I><CODE>Q</CODE>)</LI>
        <LI><I>hex_num</I><CODE>H</CODE></LI>
      </UL>
      <P>Lowercase equivalences are allowed: <CODE>b</CODE>, <CODE>d</CODE>, <CODE>o</CODE>, 
        <CODE>q</CODE>, <CODE>h</CODE></P></TD>
  </TR>
  <TR> 
    <TD VALIGN="TOP"> <P><I>bin_num</I></P></TD>
    <TD VALIGN="TOP"> <P>is a binary number consisting of the digits '<CODE>0</CODE>'-'<CODE>1</CODE>' 
        and ending with a '<CODE>B</CODE>' or '<CODE>b</CODE>'.</P>
      <P><I>Examples:</I></P>
      <BLOCKQUOTE><CODE>11000101B</CODE></BLOCKQUOTE>
      <BLOCKQUOTE><CODE>1011B</CODE></BLOCKQUOTE>
      <BLOCKQUOTE><CODE>1110110b</CODE></BLOCKQUOTE></TD>
  </TR>
  <TR> 
    <TD VALIGN="TOP"> <P><I>dec_num</I></P></TD>
    <TD VALIGN="TOP"> <P>is a decimal number consisting of the digits '<CODE>0</CODE>'-'<CODE>9</CODE>', 
        optionally followed by '<CODE>D</CODE>' or '<CODE>d</CODE>'.</P>
      <P><I>Examples:</I></P>
      <BLOCKQUOTE><CODE>364</CODE></BLOCKQUOTE>
      <BLOCKQUOTE><CODE>7534D</CODE></BLOCKQUOTE>
      <BLOCKQUOTE><CODE>435d</CODE></BLOCKQUOTE></TD>
  </TR>
  <TR> 
    <TD VALIGN="TOP"> <P><I>oct_num</I></P></TD>
    <TD VALIGN="TOP"> <P>is an octal number consisting of the digits '<CODE>0</CODE>'-'<CODE>7</CODE>' 
        and ending with an '<CODE>O</CODE>', '<CODE>o</CODE>', '<CODE>Q</CODE>' 
        or '<CODE>q</CODE>'.</P>
      <P><I>Examples:</I></P>
      <BLOCKQUOTE><CODE>77O</CODE></BLOCKQUOTE>
      <BLOCKQUOTE><CODE>542o</CODE></BLOCKQUOTE>
      <BLOCKQUOTE><CODE>2324q</CODE></BLOCKQUOTE>
      <BLOCKQUOTE><CODE>34241Q</CODE></BLOCKQUOTE></TD>
  </TR>
  <TR> 
    <TD VALIGN="TOP"> <P><I>hex_num</I></P></TD>
    <TD VALIGN="TOP"> <P>is a hexadecimal number consisting of '<CODE>0</CODE>'-'<CODE>9</CODE>' 
        and '<CODE>a</CODE>'-'<CODE>f</CODE>' or '<CODE>A</CODE>'-'<CODE>F</CODE>' 
        ending with a '<CODE>H</CODE>', or '<CODE>h</CODE>'.</P>
      <P><I>Examples:</I></P>
      <BLOCKQUOTE><CODE>84H</CODE></BLOCKQUOTE>
      <BLOCKQUOTE><CODE>ABDEh</CODE></BLOCKQUOTE>
      <BLOCKQUOTE><CODE>f12aH</CODE></BLOCKQUOTE></TD>
  </TR>
</TABLE>
<H3><a name="asmdir" id="asmdir"></a>Assembler Directives</H3>
<P>The assembly process can be controlled by assembler directives. The assembler 
  interprets the assembler directives instead of translating them into machine 
  instructions. The assembler supports the following directives:</P>
<TABLE BORDER CELLSPACING=1 CELLPADDING=7>
  <TR> 
    <TD VALIGN="MIDDLE" BGCOLOR="#c0c0c0"> <P><B>Directive</B></P></TD>
    <TD VALIGN="MIDDLE" BGCOLOR="#c0c0c0"> <P><B>Description</B></P></TD>
  </TR>
  <TR> 
    <TD VALIGN="TOP"> <P><CODE>ORG&nbsp;&lt;address&gt;</CODE></P></TD>
    <TD VALIGN="TOP"> <P>Assemble the subsequent source statements starting at 
        the specified address, <CODE>&lt;address&gt;</CODE>.</P>
      <P><I>Examples:</I></P>
      <BLOCKQUOTE><CODE>ORG 1123H ; Start assembling at address 4387</CODE></BLOCKQUOTE>
      <BLOCKQUOTE><CODE>ORG 567o ; Start assembling at address 375</CODE></BLOCKQUOTE></TD>
  </TR>
  <TR> 
    <TD VALIGN="TOP"> <P><CODE>DB&nbsp;&lt;number&gt;</CODE></P></TD>
    <TD VALIGN="TOP"> <P>Store the specified 1-byte constant <CODE>&lt;number&gt;</CODE> 
        in memory.</P>
      <P><I>Examples:</I></P>
      <BLOCKQUOTE><CODE>DB 11 ; Store the 8-bit constant 11 in memory</CODE></BLOCKQUOTE>
      <BLOCKQUOTE><CODE>DB 333o ; Store the 8-bit constant 219 in memory</CODE></BLOCKQUOTE></TD>
  </TR>
  <TR> 
    <TD VALIGN="TOP"> <P><CODE>DW&nbsp;&lt;number&gt;</CODE> </TD>
    <TD VALIGN="TOP"> <P>Store the specified 2-byte constant <CODE>&lt;number&gt;</CODE> 
        in memory. The assembler initializes the memory with the least significant 
        byte first.</P>
      <P><I>Examples:</I></P>
      <BLOCKQUOTE><CODE>DW 23785 ; Store the 16-bit constant 23785 in memory</CODE></BLOCKQUOTE>
      <BLOCKQUOTE><CODE>DW af43h ; Store the 16-bit constant 44867 in memory</CODE></BLOCKQUOTE></TD>
  </TR>
</TABLE>
<h3><a name="labels"></a>Assembler Labels</h3>
<p>The assembler also supports jump to lables of the form label_name: (notice 
  the : after the label name). The labels are not case censetive.</p>
<p>Example:</p>
<p>JMP MyLabel</p>
<p>....</p>
<p>MyLabel: ....</p>
<H3><A NAME="asmprog">Assembling a Program</A></H3>
<OL>
  <LI>At the main window, enter the assembly program in the text box.</LI>
  <LI>Enter the starting memory location where the program will be stored in the 
    <B>Memory Location</B> text field.</LI>
  <LI>Click the <B>Assemble</B> button. A dialog box will open displaying the 
    results of the assembly process.</LI>
</OL>
<HR WIDTH="75%">
<H3><A NAME="viewres">Viewing the Last Assembly Results</A></H3>
<P>At the main window, click on the <B>View Results</B> button. A dialog box will 
  open displaying the last assembly results.</P>

   <p>&nbsp;</p>
</body>
</html>

⌨️ 快捷键说明

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