root/doc_inner/gnu_global/S/2622.html

/* [<][>][^][v][top][bottom][index][help] */
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>as/app/test/count1/count1.casl</title>
<meta name='robots' content='noindex,nofollow' />
<meta name='generator' content='GLOBAL-6.6.5' />
<meta http-equiv='Content-Style-Type' content='text/css' />
<link rel='stylesheet' type='text/css' href='../style.css' />
</head>
<body>
<a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/2861.html'>as</a>/<a href='../files/2862.html'>app</a>/<a href='../files/2866.html'>test</a>/<a href='../files/2867.html'>count1</a>/count1.casl</h2>
<em class='comment'>/* [&lt;][&gt;][^][v][top]<a href='#BOTTOM'>[bottom]</a><a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em>
<hr />
<pre>
<a id='L1' name='L1'></a>   1 ;; count1.casl(「アセンブラ言語の仕様」プログラム例)を呼び出し、出力結果を表示
<a id='L2' name='L2'></a>   2 ;; 使い方: casl2 count1_call.casl count1.casl outa.casl
<a id='L3' name='L3'></a>   3 MAIN    START
<a id='L4' name='L4'></a>   4         LAD     GR2,0
<a id='L5' name='L5'></a>   5 LOOP    CPA     GR2,MAX         ; ループ開始。GR2がMAXの値になったらループ脱出
<a id='L6' name='L6'></a>   6         JZE     FIN             ; ↓
<a id='L7' name='L7'></a>   7         LD      GR1,GR2         ; GR1にVALの値をロード
<a id='L8' name='L8'></a>   8         CALL    COUNT1          ; COUNT1を呼び出す。出力はGR0に格納
<a id='L9' name='L9'></a>   9         LD      GR1,GR0         ; GR1にGR0の値をコピー
<a id='L10' name='L10'></a>  10         CALL    OUTA            ; OUTAを呼び出す
<a id='L11' name='L11'></a>  11         LAD     GR2,1,GR2       ; GR2 &lt;= GR2 + 1
<a id='L12' name='L12'></a>  12         JUMP    LOOP            ; ループ終端
<a id='L13' name='L13'></a>  13 FIN     RET
<a id='L14' name='L14'></a>  14 MAX     DC      256
<a id='L15' name='L15'></a>  15         END
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* [&lt;][&gt;][^][v]<a href='#TOP'>[top]</a>[bottom]<a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em>
</body>
</html>

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