root/doc_inner/gnu_global/S/2430.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/misc/hanoi.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/2910.html'>misc</a>/hanoi.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 ; ハノイの塔を解くプログラム
<a id='L2' name='L2'></a>   2 MAIN    START
<a id='L3' name='L3'></a>   3         LD      GR0,N
<a id='L4' name='L4'></a>   4         LD      GR1,A
<a id='L5' name='L5'></a>   5         LD      GR2,B
<a id='L6' name='L6'></a>   6         LD      GR3,C
<a id='L7' name='L7'></a>   7         CALL    HANOI
<a id='L8' name='L8'></a>   8         RET
<a id='L9' name='L9'></a>   9 HANOI   CPA     GR0,=1
<a id='L10' name='L10'></a>  10         JZE     DISP
<a id='L11' name='L11'></a>  11         SUBA    GR0,=1
<a id='L12' name='L12'></a>  12         PUSH    0,GR2
<a id='L13' name='L13'></a>  13         PUSH    0,GR3
<a id='L14' name='L14'></a>  14         POP     GR2
<a id='L15' name='L15'></a>  15         POP     GR3
<a id='L16' name='L16'></a>  16         CALL    HANOI
<a id='L17' name='L17'></a>  17         PUSH    0,GR2
<a id='L18' name='L18'></a>  18         PUSH    0,GR3
<a id='L19' name='L19'></a>  19         POP     GR2
<a id='L20' name='L20'></a>  20         POP     GR3
<a id='L21' name='L21'></a>  21         CALL    DISP
<a id='L22' name='L22'></a>  22         PUSH    0,GR1
<a id='L23' name='L23'></a>  23         PUSH    0,GR2
<a id='L24' name='L24'></a>  24         POP     GR1
<a id='L25' name='L25'></a>  25         POP     GR2
<a id='L26' name='L26'></a>  26         CALL    HANOI
<a id='L27' name='L27'></a>  27         PUSH    0,GR1
<a id='L28' name='L28'></a>  28         PUSH    0,GR2
<a id='L29' name='L29'></a>  29         POP     GR1
<a id='L30' name='L30'></a>  30         POP     GR2
<a id='L31' name='L31'></a>  31         ADDA    GR0,=1
<a id='L32' name='L32'></a>  32         RET
<a id='L33' name='L33'></a>  33 DISP    ST      GR1,MSG1
<a id='L34' name='L34'></a>  34         ST      GR3,MSG2
<a id='L35' name='L35'></a>  35         OUT     MSG,LNG
<a id='L36' name='L36'></a>  36         RET
<a id='L37' name='L37'></a>  37 N       DC      3               ; 輪の総数
<a id='L38' name='L38'></a>  38 LNG     DC      11              ; メッセージの長さ
<a id='L39' name='L39'></a>  39 A       DC      'A'
<a id='L40' name='L40'></a>  40 B       DC      'B'
<a id='L41' name='L41'></a>  41 C       DC      'C'
<a id='L42' name='L42'></a>  42 MSG     DC      'from '
<a id='L43' name='L43'></a>  43 MSG1    DS      1
<a id='L44' name='L44'></a>  44         DC      ' to '
<a id='L45' name='L45'></a>  45 MSG2    DS      1
<a id='L46' name='L46'></a>  46         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] */