X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?p=YACASL2.git;a=blobdiff_plain;f=test%2Fsystem%2Fcasl2_opt%2Fopt_slaOn%2F0.txt;h=b58aeff3a209b6987d4563ed355da6bc3dd9a51e;hp=a8afb2e2fb8408c8fa7b13eb0978d42a40767c80;hb=ce897094478335caf357601548af1b06cbad1188;hpb=d5687e0f30e8402985d569a595cc0bdadc89f725 diff --git a/test/system/casl2_opt/opt_slaOn/0.txt b/test/system/casl2_opt/opt_slaOn/0.txt index a8afb2e..b58aeff 100644 --- a/test/system/casl2_opt/opt_slaOn/0.txt +++ b/test/system/casl2_opt/opt_slaOn/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 @@ -99,3 +78,8 @@ Assemble ../../../../as/sample/sum_10.casl (1) ../../../../as/sample/sum_10.casl: 20:RST DS 1 ; 結果 #0018 #0000 ../../../../as/sample/sum_10.casl: 21: END +0000000 7001 0000 7002 0000 3622 1010 0015 2621 +0000020 2210 0017 4110 0016 6500 0010 6400 0007 +0000040 1120 0018 7120 7110 8100 0001 000a 0001 +0000060 0000 +0000062