root/doc/manual_html/Register-and-memory.html

/* [<][>][^][v][top][bottom][index][help] */
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Copyright (C) 2010-2023 j8takagi -->
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Register and memory (YACASL2 - CASL II 処理システム)</title>

<meta name="description" content="Register and memory (YACASL2 - CASL II 処理システム)">
<meta name="keywords" content="Register and memory (YACASL2 - CASL II 処理システム)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html" rel="start" title="Top">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Sample-usage.html" rel="up" title="Sample usage">
<link href="Register-specify.html" rel="next" title="Register specify">
<link href="Assemble-result.html" rel="prev" title="Assemble result">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
<link rel="stylesheet" type="text/css" href="style.css">


</head>

<body lang="ja_JP">
<span id="Register-and-memory"></span><div class="header">
<p>
Next: <a href="Only-assemble.html" accesskey="n" rel="next">Only assemble</a>, Previous: <a href="Assemble-result.html" accesskey="p" rel="prev">Assemble result</a>, Up: <a href="Sample-usage.html" accesskey="u" rel="up">Sample usage</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<hr>
<span id="Shi-Xing-Shi-norezisutatomemoriwoBiao-Shi"></span><h3 class="section">2.3 実行時のレジスタとメモリを表示</h3>

<p>YACASL2では実行中のCPUのレジスタとメモリの内容をそれぞれ、<samp>-t</samp>と<samp>-d</samp>を指定することで表示できます。
</p>
<p>また、<samp>-M</samp>で、仮想マシンCOMET II のメモリ容量を語(16 ビット)単位で指定できます。
小さいプログラムを実行するときは、メモリ容量を小さくすれば結果が見やすくなります。
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="Register-specify.html" accesskey="1">Register specify</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">特定のレジスタを表示
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="End-value.html" accesskey="2">End value</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="Step-count.html" accesskey="3">Step count</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">プログラムのステップ数を表示
</td></tr>
</table>

<p><samp>addl.casl</samp>では、次のようにCPUのレジスタとメモリの内容を表示できます。
</p>
<div class="example">
<pre class="example">$ <kbd>casl2 -t -d -M16 addl.casl | less</kbd>

Assemble addl.casl (0)

Assemble addl.casl (1)

Executing machine codes
#0000: Register::::
#0000: GR0:      0 = #0000 = 0000000000000000
#0000: GR1:      0 = #0000 = 0000000000000000
#0000: GR2:      0 = #0000 = 0000000000000000
#0000: GR3:      0 = #0000 = 0000000000000000
#0000: GR4:      0 = #0000 = 0000000000000000
#0000: GR5:      0 = #0000 = 0000000000000000
#0000: GR6:      0 = #0000 = 0000000000000000
#0000: GR7:      0 = #0000 = 0000000000000000
#0000: SP:      16 = #0010 = 0000000000010000
#0000: PR:       0 = #0000 = 0000000000000000
#0000: FR (OF SF ZF): 000
#0000: Memory::::
#0000: adr : 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A 000B 000C 000D 000E 000F
       -------------------------------------------------------------------------------------
#0000: 0000: 1010 0007 2210 0008 1110 0009 8100 0003 0002 0000 0000 0000 0000 0000 0000 0000

#0002: Register::::
#0002: GR0:      0 = #0000 = 0000000000000000
#0002: GR1:      3 = #0003 = 0000000000000011
#0002: GR2:      0 = #0000 = 0000000000000000
#0002: GR3:      0 = #0000 = 0000000000000000
#0002: GR4:      0 = #0000 = 0000000000000000
#0002: GR5:      0 = #0000 = 0000000000000000
#0002: GR6:      0 = #0000 = 0000000000000000
#0002: GR7:      0 = #0000 = 0000000000000000
#0002: SP:      16 = #0010 = 0000000000010000
#0002: PR:       2 = #0002 = 0000000000000010
#0002: FR (OF SF ZF): 000
#0002: Memory::::
#0002: adr : 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A 000B 000C 000D 000E 000F
       -------------------------------------------------------------------------------------
#0002: 0000: 1010 0007 2210 0008 1110 0009 8100 0003 0002 0000 0000 0000 0000 0000 0000 0000

#0004: Register::::
#0004: GR0:      0 = #0000 = 0000000000000000
#0004: GR1:      5 = #0005 = 0000000000000101
#0004: GR2:      0 = #0000 = 0000000000000000
#0004: GR3:      0 = #0000 = 0000000000000000
#0004: GR4:      0 = #0000 = 0000000000000000
#0004: GR5:      0 = #0000 = 0000000000000000
#0004: GR6:      0 = #0000 = 0000000000000000
#0004: GR7:      0 = #0000 = 0000000000000000
#0004: SP:      16 = #0010 = 0000000000010000
#0004: PR:       4 = #0004 = 0000000000000100
#0004: FR (OF SF ZF): 000
#0004: Memory::::
#0004: adr : 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A 000B 000C 000D 000E 000F
       -------------------------------------------------------------------------------------
#0004: 0000: 1010 0007 2210 0008 1110 0009 8100 0003 0002 0000 0000 0000 0000 0000 0000 0000

#0006: Register::::
#0006: GR0:      0 = #0000 = 0000000000000000
#0006: GR1:      5 = #0005 = 0000000000000101
#0006: GR2:      0 = #0000 = 0000000000000000
#0006: GR3:      0 = #0000 = 0000000000000000
#0006: GR4:      0 = #0000 = 0000000000000000
#0006: GR5:      0 = #0000 = 0000000000000000
#0006: GR6:      0 = #0000 = 0000000000000000
#0006: GR7:      0 = #0000 = 0000000000000000
#0006: SP:      16 = #0010 = 0000000000010000
#0006: PR:       6 = #0006 = 0000000000000110
#0006: FR (OF SF ZF): 000
#0006: Memory::::
#0006: adr : 0000 0001 0002 0003 0004 0005 0006 0007 0008 0009 000A 000B 000C 000D 000E 000F
       -------------------------------------------------------------------------------------
#0006: 0000: 1010 0007 2210 0008 1110 0009 8100 0003 0002 0005 0000 0000 0000 0000 0000 0000
</pre></div>

<hr>
<div class="header">
<p>
Next: <a href="Only-assemble.html" accesskey="n" rel="next">Only assemble</a>, Previous: <a href="Assemble-result.html" accesskey="p" rel="prev">Assemble result</a>, Up: <a href="Sample-usage.html" accesskey="u" rel="up">Sample usage</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>



</body>
</html>

/* [<][>][^][v][top][bottom][index][help] */