From: j8takagi Date: Wed, 4 Jul 2018 16:07:46 +0000 (+0900) Subject: sampleのsum_10.o.caslをsum_10.caslにあわせる X-Git-Tag: v0.5p1~11 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ef0d85d295e17cf2697276cfa4953f23987ab91c;p=YACASL2.git sampleのsum_10.o.caslをsum_10.caslにあわせる --- diff --git a/as/sample/sum_10.o.casl b/as/sample/sum_10.o.casl index f3726d6..69e0fc0 100644 --- a/as/sample/sum_10.o.casl +++ b/as/sample/sum_10.o.casl @@ -1,19 +1,19 @@ -MAIN START - PUSH #0000,GR1 ; #0000: #7001 #0000 - PUSH #0000,GR2 ; #0002: #7002 #0000 - XOR GR2,GR2 ; #0004: #3622 - LD GR1,#0015 ; #0005: #1010 #0015 - ADDL GR2,GR1 ; #0007: #2621 - ADDL GR1,#0017 ; #0008: #2210 #0017 - CPL GR1,#0016 ; #000A: #4110 #0016 - JPL #0010 ; #000C: #6500 #0010 - JUMP #0007 ; #000E: #6400 #0007 - ST GR2,#0018 ; #0010: #1120 #0018 - POP GR2 ; #0012: #7120 - POP GR1 ; #0013: #7110 - RET ; #0014: #8100 - DC 1 ; #0015: #0001 :: 1 = #0001 = 0000000000000001 - DC 10 ; #0016: #000A :: 10 = #000A = 0000000000001010 = '\n' - DC 1 ; #0017: #0001 :: 1 = #0001 = 0000000000000001 - NOP ; #0018: #0000 - END +MAIN START + PUSH #0000,GR1 ; #0000: #7001 #0000 + PUSH #0000,GR2 ; #0002: #7002 #0000 + XOR GR2,GR2 ; #0004: #3622 + LD GR1,#0015 ; #0005: #1010 #0015 + ADDL GR2,GR1 ; #0007: #2621 + ADDL GR1,#0017 ; #0008: #2210 #0017 + CPL GR1,#0016 ; #000A: #4110 #0016 + JPL #0010 ; #000C: #6500 #0010 + JUMP #0007 ; #000E: #6400 #0007 + ST GR2,#0018 ; #0010: #1120 #0018 + POP GR2 ; #0012: #7120 + POP GR1 ; #0013: #7110 + RET ; #0014: #8100 + DC 1 ; #0015: #0001 :: 1 = #0001 = 0000000000000001 + DC 10 ; #0016: #000A :: 10 = #000A = 0000000000001010 = '\n' + DC 1 ; #0017: #0001 :: 1 = #0001 = 0000000000000001 + NOP ; #0018: #0000 + END diff --git a/test/system/casl2rev/sum_10/0.txt b/test/system/casl2rev/sum_10/0.txt index 4b20b83..69e0fc0 100644 --- a/test/system/casl2rev/sum_10/0.txt +++ b/test/system/casl2rev/sum_10/0.txt @@ -1,15 +1,19 @@ -MAIN START - PUSH #0000,GR1 ; #0000: #7001 #0000 - LAD GR0,#0000 ; #0002: #1200 #0000 - LD GR1,#0011 ; #0004: #1010 #0011 - ADDL GR0,GR1 ; #0006: #2601 - ADDL GR1,#0013 ; #0007: #2210 #0013 - CPL GR1,#0012 ; #0009: #4110 #0012 - JPL #000F ; #000B: #6500 #000F - JUMP #0006 ; #000D: #6400 #0006 - POP GR1 ; #000F: #7110 - RET ; #0010: #8100 - DC 1 ; #0011: #0001 :: 1 = #0001 = 0000000000000001 - DC 10 ; #0012: #000A :: 10 = #000A = 0000000000001010 = '\n' - DC 1 ; #0013: #0001 :: 1 = #0001 = 0000000000000001 - END +MAIN START + PUSH #0000,GR1 ; #0000: #7001 #0000 + PUSH #0000,GR2 ; #0002: #7002 #0000 + XOR GR2,GR2 ; #0004: #3622 + LD GR1,#0015 ; #0005: #1010 #0015 + ADDL GR2,GR1 ; #0007: #2621 + ADDL GR1,#0017 ; #0008: #2210 #0017 + CPL GR1,#0016 ; #000A: #4110 #0016 + JPL #0010 ; #000C: #6500 #0010 + JUMP #0007 ; #000E: #6400 #0007 + ST GR2,#0018 ; #0010: #1120 #0018 + POP GR2 ; #0012: #7120 + POP GR1 ; #0013: #7110 + RET ; #0014: #8100 + DC 1 ; #0015: #0001 :: 1 = #0001 = 0000000000000001 + DC 10 ; #0016: #000A :: 10 = #000A = 0000000000001010 = '\n' + DC 1 ; #0017: #0001 :: 1 = #0001 = 0000000000000001 + NOP ; #0018: #0000 + END