<!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>test/system/casl2_opt/opt_sL/0.txt</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/2933.html'>test</a>/<a href='../files/2935.html'>system</a>/<a href='../files/3112.html'>casl2_opt</a>/<a href='../files/3117.html'>opt_sL</a>/0.txt</h2> <em class='comment'>/* [<][>][^][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> <a id='L2' name='L2'></a>Assemble ../../../../as/sample/sum_10.casl (0) <a id='L3' name='L3'></a>../../../../as/sample/sum_10.casl: 1:;;; sum_10.casl <a id='L4' name='L4'></a>../../../../as/sample/sum_10.casl: 2:;;; 1から10までの整数をすべて加算した値をメモリーに格納する <a id='L5' name='L5'></a>../../../../as/sample/sum_10.casl: 3:MAIN START <a id='L6' name='L6'></a>../../../../as/sample/sum_10.casl: 4: PUSH 0,GR1 <a id='L7' name='L7'></a>../../../../as/sample/sum_10.casl: 5: PUSH 0,GR2 <a id='L8' name='L8'></a>../../../../as/sample/sum_10.casl: 6: XOR GR2,GR2 ; GR2を初期化 <a id='L9' name='L9'></a>../../../../as/sample/sum_10.casl: 7: LD GR1,FST ; GR1に初項をメモリーから転送 <a id='L10' name='L10'></a>../../../../as/sample/sum_10.casl: 8:LOOP ADDL GR2,GR1 ; ループ先頭。GR2 <- GR2 + GR1 <a id='L11' name='L11'></a>../../../../as/sample/sum_10.casl: 9: ADDL GR1,STEP ; GR1 <- GR1 + 公差 <a id='L12' name='L12'></a>../../../../as/sample/sum_10.casl: 10: CPL GR1,LST ; GR1が末項より大きい場合は終了 <a id='L13' name='L13'></a>../../../../as/sample/sum_10.casl: 11: JPL FIN ; ↓ <a id='L14' name='L14'></a>../../../../as/sample/sum_10.casl: 12: JUMP LOOP ; ループ終端 <a id='L15' name='L15'></a>../../../../as/sample/sum_10.casl: 13:FIN ST GR2,RST ; GR2の結果をメモリーに転送 <a id='L16' name='L16'></a>../../../../as/sample/sum_10.casl: 14: POP GR2 <a id='L17' name='L17'></a>../../../../as/sample/sum_10.casl: 15: POP GR1 <a id='L18' name='L18'></a>../../../../as/sample/sum_10.casl: 16: RET <a id='L19' name='L19'></a>../../../../as/sample/sum_10.casl: 17:FST DC 1 ; 初項 <a id='L20' name='L20'></a>../../../../as/sample/sum_10.casl: 18:LST DC 10 ; 末項 <a id='L21' name='L21'></a>../../../../as/sample/sum_10.casl: 19:STEP DC 1 ; 公差 <a id='L22' name='L22'></a>../../../../as/sample/sum_10.casl: 20:RST DS 1 ; 結果 <a id='L23' name='L23'></a>../../../../as/sample/sum_10.casl: 21: END <a id='L24' name='L24'></a> <a id='L25' name='L25'></a>Label:::: <a id='L26' name='L26'></a>MAIN ---> #0000 <a id='L27' name='L27'></a>MAIN.LOOP ---> #0007 <a id='L28' name='L28'></a>MAIN.FIN ---> #0010 <a id='L29' name='L29'></a>MAIN.FST ---> #0015 <a id='L30' name='L30'></a>MAIN.LST ---> #0016 <a id='L31' name='L31'></a>MAIN.STEP ---> #0017 <a id='L32' name='L32'></a>MAIN.RST ---> #0018 </pre> <hr /> <a id='BOTTOM' name='BOTTOM'></a> <em class='comment'>/* [<][>][^][v]<a href='#TOP'>[top]</a>[bottom]<a href='../mains.html'>[index]</a><a href='../help.html'>[help]</a> */</em> </body> </html>