X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=test%2Fsystem%2Fcasl2_opt%2Fopt_slA%2F0.txt;h=8b77aeafe9beee68dc862940ac47d786fcfa16df;hp=a8afb2e2fb8408c8fa7b13eb0978d42a40767c80;hb=ce897094478335caf357601548af1b06cbad1188;hpb=d049a7198982beff6dbbe9eaf5c5c7cebbdc7237 diff --git a/test/system/casl2_opt/opt_slA/0.txt b/test/system/casl2_opt/opt_slA/0.txt index a8afb2e..8b77aea 100644 --- a/test/system/casl2_opt/opt_slA/0.txt +++ b/test/system/casl2_opt/opt_slA/0.txt @@ -1,24 +1,3 @@ -;;; sum_10.casl -;;; 1から10までの整数をすべて加算した値をメモリーに格納する -MAIN START - PUSH 0,GR1 - PUSH 0,GR2 - XOR GR2,GR2 ; GR2を初期化 - LD GR1,FST ; GR1に初項をメモリーから転送 -LOOP ADDL GR2,GR1 ; ループ先頭。GR2 <- GR2 + GR1 - ADDL GR1,STEP ; GR1 <- GR1 + 公差 - CPL GR1,LST ; GR1が末項より大きい場合は終了 - JPL FIN ; ↓ - JUMP LOOP ; ループ終端 -FIN ST GR2,RST ; GR2の結果をメモリーに転送 - POP GR2 - POP GR1 - RET -FST DC 1 ; 初項 -LST DC 10 ; 末項 -STEP DC 1 ; 公差 -RST DS 1 ; 結果 - END Assemble ../../../../as/sample/sum_10.casl (0) ../../../../as/sample/sum_10.casl: 1:;;; sum_10.casl