コマンドテスト用アセンブラファイル追加、修正
authorj8takagi <j8takagi@nifty.com>
Mon, 8 Feb 2010 19:35:47 +0000 (04:35 +0900)
committerj8takagi <j8takagi@nifty.com>
Mon, 8 Feb 2010 19:35:47 +0000 (04:35 +0900)
49 files changed:
as/cmd/ADDA/adda0.casl [moved from as/cmd/ADDA/adda0_0.casl with 72% similarity]
as/cmd/ADDA/adda0_ov0.casl
as/cmd/ADDA/adda0_ov1.casl
as/cmd/ADDA/adda0_s0.casl
as/cmd/ADDA/adda0_s1.casl
as/cmd/ADDA/adda0_z.casl [new file with mode: 0644]
as/cmd/ADDA/adda1.casl [new file with mode: 0644]
as/cmd/ADDA/adda1_ov0.casl
as/cmd/ADDA/adda1_ov1.casl
as/cmd/ADDA/adda1_s0.casl
as/cmd/ADDA/adda1_s1.casl
as/cmd/ADDA/adda1_z.casl [new file with mode: 0644]
as/cmd/ADDA/adda2.casl [moved from as/cmd/ADDA/adda1_0.casl with 90% similarity]
as/cmd/ADDA/adda2_ov0.casl [new file with mode: 0644]
as/cmd/ADDA/adda2_ov1.casl [new file with mode: 0644]
as/cmd/ADDA/adda2_s0.casl [new file with mode: 0644]
as/cmd/ADDA/adda2_s1.casl [new file with mode: 0644]
as/cmd/ADDA/adda2_z.casl [new file with mode: 0644]
as/cmd/ADDL/addl0.casl
as/cmd/ADDL/addl0_ov0.casl
as/cmd/ADDL/addl0_ov1.casl
as/cmd/ADDL/addl0_s0.casl
as/cmd/ADDL/addl0_s1.casl [new file with mode: 0644]
as/cmd/ADDL/addl0_z.casl [new file with mode: 0644]
as/cmd/ADDL/addl1.casl
as/cmd/ADDL/addl1_ov0.casl
as/cmd/ADDL/addl1_ov1.casl
as/cmd/ADDL/addl1_s0.casl
as/cmd/ADDL/addl1_s1.casl [new file with mode: 0644]
as/cmd/ADDL/addl1_z.casl [new file with mode: 0644]
as/cmd/AND/and0.casl
as/cmd/AND/and0_s.casl
as/cmd/AND/and0_z.casl
as/cmd/AND/and1.casl
as/cmd/AND/and1_s.casl
as/cmd/AND/and1_z.casl
as/cmd/CALL/call0.casl
as/cmd/CALL/call1.casl
as/cmd/CALL/call2.casl [deleted file]
as/cmd/CPA/cpa0_0.casl [new file with mode: 0644]
as/cmd/CPA/cpa0_1.casl [new file with mode: 0644]
as/cmd/CPA/cpa0_2.casl [new file with mode: 0644]
as/cmd/CPA/cpa0_3.casl [new file with mode: 0644]
as/cmd/CPA/cpa1_0.casl [moved from as/cmd/CPA/cpa1.casl with 78% similarity]
as/cmd/CPA/cpa1_1.casl [new file with mode: 0644]
as/cmd/CPA/cpa1_2.casl [new file with mode: 0644]
as/cmd/CPA/cpa1_3.casl [new file with mode: 0644]
as/cmd/literal_semi.casl [new file with mode: 0644]
as/err/opd_x_err.casl [new file with mode: 0644]

similarity index 72%
rename from as/cmd/ADDA/adda0_0.casl
rename to as/cmd/ADDA/adda0.casl
index ec6f2f8..7c951b1 100644 (file)
@@ -1,5 +1,6 @@
+;;; ADDA r,adr
 MAIN    START
-BEGIN   LAD     GR1,A
+BEGIN   L     GR1,A
         ADDA    GR1,B
         RET
 A       DC      3
index d0f5163..ad85f71 100644 (file)
@@ -1,3 +1,4 @@
+;;; ADDA r,adr 正数でオーバーフロー
 MAIN    START
         LD      GR1,A
         ADDA    GR1,B
index b3a940e..d20f312 100644 (file)
@@ -1,3 +1,4 @@
+;;; ADDA r,adr 負数でオーバーフロー
 MAIN    START
         LD      GR1,A
         ADDA    GR1,B
index 3770d34..b4d33f9 100644 (file)
@@ -1,3 +1,4 @@
+;;; ADDA r,adr 演算結果が負数(r > adr)
 MAIN    START
         LD      GR1,A
         ADDA    GR1,B
index 3b8fd4d..bef7e13 100644 (file)
@@ -1,3 +1,4 @@
+;;; ADDA r,adr 演算結果が負数(r < adr)
 MAIN    START
         LD      GR1,A
         ADDA    GR1,B
diff --git a/as/cmd/ADDA/adda0_z.casl b/as/cmd/ADDA/adda0_z.casl
new file mode 100644 (file)
index 0000000..cee1302
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDA r,adr 演算結果が零
+MAIN    START
+        LD      GR1,A
+        ADDA    GR1,B
+        RET
+A       DC      -10
+        DC      10
+        END
diff --git a/as/cmd/ADDA/adda1.casl b/as/cmd/ADDA/adda1.casl
new file mode 100644 (file)
index 0000000..023afe6
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDA r,adr,x
+MAIN    START
+BEGIN   LD      GR1,A
+        LAD     GR2,1
+        ADDA    GR1,A,GR2
+        RET
+A       DC      3
+        DC      1
+        END
index 1a38af5..9c40503 100644 (file)
@@ -1,8 +1,9 @@
+;;; ADDA r,adr,x 負数でオーバーフロー
 MAIN    START
         LD      GR1,A
-        LD      GR2,B
-        ADDA    GR1,GR2
+        LAD     GR2,1
+        ADDA    GR1,A,GR2
         RET
-A       DC      32767
-B       DC      10
+A       DC      #8001           ; -32767
+        DC      #FFF6           ; -10
         END
index 326a3d1..9c40503 100644 (file)
@@ -1,8 +1,9 @@
+;;; ADDA r,adr,x 負数でオーバーフロー
 MAIN    START
         LD      GR1,A
-        LD      GR2,B
-        ADDA    GR1,GR2
+        LAD     GR2,1
+        ADDA    GR1,A,GR2
         RET
-A       DC      -32767
-B       DC      -10
+A       DC      #8001           ; -32767
+        DC      #FFF6           ; -10
         END
index 054f189..0c482b5 100644 (file)
@@ -1,8 +1,9 @@
+;;; ADDA r,adr,x 演算結果が負数(r > adr)
 MAIN    START
         LD      GR1,A
-        LD      GR2,B
-        ADDA    GR1,GR2
+        LAD     GR2,1
+        ADDA    GR1,A,GR2
         RET
 A       DC      10
-B       DC      #FFEC           ; -20
+        DC      #FFEC           ; -20
         END
index 9f28bc1..4fe0c37 100644 (file)
@@ -1,8 +1,9 @@
+;;; ADDA r,adr,x 演算結果が負数(r < adr)
 MAIN    START
         LD      GR1,A
-        LD      GR2,B
-        ADDA    GR1,GR2
+        LAD     GR2,1
+        ADDA    GR1,A,GR2
         RET
 A       DC      -10
-B       DC      20
+        DC      20
         END
diff --git a/as/cmd/ADDA/adda1_z.casl b/as/cmd/ADDA/adda1_z.casl
new file mode 100644 (file)
index 0000000..1003ab5
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDA r1,adr,x 演算結果が零
+MAIN    START
+        LD      GR1,A
+        LAD     GR2,1
+        ADDA    GR1,A,GR2
+        RET
+A       DC      -10
+        DC      10
+        END
similarity index 90%
rename from as/cmd/ADDA/adda1_0.casl
rename to as/cmd/ADDA/adda2.casl
index 6c69581..eee6ad5 100644 (file)
@@ -1,3 +1,4 @@
+;;; ADDA r1,r2
 MAIN    START
 BEGIN   LD      GR1,A
         LD      GR2,B
diff --git a/as/cmd/ADDA/adda2_ov0.casl b/as/cmd/ADDA/adda2_ov0.casl
new file mode 100644 (file)
index 0000000..afbd655
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDA r1,r2 正数でオーバーフロー
+MAIN    START
+        LD      GR1,A
+        LD      GR2,B
+        ADDA    GR1,GR2
+        RET
+A       DC      32767
+B       DC      10
+        END
diff --git a/as/cmd/ADDA/adda2_ov1.casl b/as/cmd/ADDA/adda2_ov1.casl
new file mode 100644 (file)
index 0000000..c26cf69
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDA r1,r2 負数でオーバーフロー
+MAIN    START
+        LD      GR1,A
+        LD      GR2,B
+        ADDA    GR1,GR2
+        RET
+A       DC      -32767
+B       DC      -10
+        END
diff --git a/as/cmd/ADDA/adda2_s0.casl b/as/cmd/ADDA/adda2_s0.casl
new file mode 100644 (file)
index 0000000..57b8579
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDA r1,r2 演算結果が負数(r1 > r2)
+MAIN    START
+        LD      GR1,A
+        LD      GR2,B
+        ADDA    GR1,GR2
+        RET
+A       DC      10
+B       DC      #FFEC           ; -20
+        END
diff --git a/as/cmd/ADDA/adda2_s1.casl b/as/cmd/ADDA/adda2_s1.casl
new file mode 100644 (file)
index 0000000..4a86734
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDA r1,r2 演算結果が負数(r1 < r2)
+MAIN    START
+        LD      GR1,A
+        LD      GR2,B
+        ADDA    GR1,GR2
+        RET
+A       DC      -10
+B       DC      20
+        END
diff --git a/as/cmd/ADDA/adda2_z.casl b/as/cmd/ADDA/adda2_z.casl
new file mode 100644 (file)
index 0000000..2e879b8
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDA r1,r2 演算結果が零
+MAIN    START
+        LD      GR1,A
+        LD      GR2,B
+        ADDA    GR1,GR2
+        RET
+A       DC      -10
+B       DC      10
+        END
index 5e2924c..2128758 100644 (file)
@@ -1,3 +1,4 @@
+;;; ADDL r,addr[,x]
 MAIN    START
 BEGIN   LAD     GR1,A
         ADDL    GR1,B
index 2c48a47..e8d10a0 100644 (file)
@@ -1,3 +1,4 @@
+;;; ADDL r,addr[,x] 正数でオーバーフロー発生
 MAIN    START
         LD      GR1,A
         ADDL    GR1,B
index 4ef996f..c99962c 100644 (file)
@@ -1,3 +1,4 @@
+;;; ADDL r,addr[,x] 負数でオーバーフロー発生
 MAIN    START
         LD      GR1,A
         ADDL    GR1,B
index 215236d..85b25ce 100644 (file)
@@ -1,7 +1,8 @@
+;;; ADDL r,addr[,x] 演算結果の符号が負(r > adr)
 MAIN    START
         LD      GR1,A
         ADDL    GR1,B
         RET
 A       DC      10
-B       DC      #FFEC           ; 65516
+B       DC      #FFEC        ; -20
         END
diff --git a/as/cmd/ADDL/addl0_s1.casl b/as/cmd/ADDL/addl0_s1.casl
new file mode 100644 (file)
index 0000000..59c29f5
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDL r,addr[,x] 演算結果の符号が負(r < adr)
+MAIN    START
+        LD      GR1,A
+        ADDL    GR1,B
+        RET
+A       DC      #FFEC        ; -20
+B       DC      10
+        END
diff --git a/as/cmd/ADDL/addl0_z.casl b/as/cmd/ADDL/addl0_z.casl
new file mode 100644 (file)
index 0000000..d082259
--- /dev/null
@@ -0,0 +1,8 @@
+;;; ADDL r,addr[,x] 演算結果が零
+MAIN    START
+        LD      GR1,A
+        ADDL    GR1,B
+        RET
+A       DC      10
+B       DC      #FFF6        ; -10
+        END
index 6c69581..aff696b 100644 (file)
@@ -1,3 +1,4 @@
+;;; ADDL r1,r2
 MAIN    START
 BEGIN   LD      GR1,A
         LD      GR2,B
index 1a38af5..ca3fc2e 100644 (file)
@@ -1,3 +1,4 @@
+;;; ADDL r1,r2 正数でオーバーフロー発生
 MAIN    START
         LD      GR1,A
         LD      GR2,B
index 326a3d1..104b431 100644 (file)
@@ -1,3 +1,4 @@
+;;; ADDL r1,r2 負数でオーバーフロー発生
 MAIN    START
         LD      GR1,A
         LD      GR2,B
index 34da997..1db3977 100644 (file)
@@ -1,8 +1,9 @@
+;;; ADDL r1,r2 演算結果の符号が負(r1 > r2)
 MAIN    START
         LD      GR1,A
         LD      GR2,B
         ADDL    GR1,GR2
         RET
 A       DC      10
-B       DC      #FFEC           ; 65516
+B       DC      #FFEC       ; -20
         END
diff --git a/as/cmd/ADDL/addl1_s1.casl b/as/cmd/ADDL/addl1_s1.casl
new file mode 100644 (file)
index 0000000..2fde062
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDL r1,r2 演算結果の符号が負(r1 < r2)
+MAIN    START
+        LD      GR1,A
+        LD      GR2,B
+        ADDL    GR1,GR2
+        RET
+A       DC      #FFEC       ; -20
+B       DC      10
+        END
diff --git a/as/cmd/ADDL/addl1_z.casl b/as/cmd/ADDL/addl1_z.casl
new file mode 100644 (file)
index 0000000..52b9e2d
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDL r1,r2 演算結果が零
+MAIN    START
+        LD      GR1,A
+        LD      GR2,B
+        ADDL    GR1,GR2
+        RET
+A       DC      10
+B       DC      #FFF6        ; -10
+        END
index c6169ec..1fe63d1 100644 (file)
@@ -1,3 +1,4 @@
+;;; AND r,adr[,x]
 MAIN    START
         LD      GR1,A
         AND     GR1,B
index bfbd457..448c768 100644 (file)
@@ -1,3 +1,4 @@
+;;; AND r,adr[,x] 演算結果の符号が負
 MAIN    START
         LD      GR1,A
         AND     GR1,B
index 64270ec..0ac684e 100644 (file)
@@ -1,3 +1,4 @@
+;;; AND r,adr[,x] 演算結果が零
 MAIN    START
         LD      GR1,A
         AND     GR1,B
index d41a1d8..91ea8cf 100644 (file)
@@ -1,3 +1,4 @@
+;;; AND r1,r2
 MAIN    START
         LD      GR1,A
         LD      GR2,B
index ad41d24..c7f520c 100644 (file)
@@ -1,3 +1,4 @@
+;;; AND r1,r2 演算結果の符号が負
 MAIN    START
         LD      GR1,A
         LD      GR2,B
index 1135b54..a91dbdf 100644 (file)
@@ -1,3 +1,4 @@
+;;; AND r1,r2 演算結果が零
 MAIN    START
         LD      GR1,A
         LD      GR2,B
index d6a6a40..ec37f34 100644 (file)
@@ -1,4 +1,5 @@
-MAIN    START
+;;; CALL ほかのプログラムの入口名を指定
+        MAIN    START
         LAD     GR1,29
         CALL    COPY
         RET
index bc420fb..70f8ae0 100644 (file)
@@ -1,3 +1,4 @@
+;;; CALL 同じプログラムの中にあるラベルを指定
 MAIN    START   BEGIN
 BEGIN   LAD     GR1,29
         CALL    COPY
diff --git a/as/cmd/CALL/call2.casl b/as/cmd/CALL/call2.casl
deleted file mode 100644 (file)
index afa5fdd..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-MAIN    START   BEGIN
-BEGIN   LD      GR1,=29
-        CALL    INCR
-        ST      GR1,A
-        RET
-A       DS      1
-        END
-INCR    START
-        ADDA      GR1,=1
-        RET
-FIN     END
diff --git a/as/cmd/CPA/cpa0_0.casl b/as/cmd/CPA/cpa0_0.casl
new file mode 100644 (file)
index 0000000..9ce1eb9
--- /dev/null
@@ -0,0 +1,7 @@
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        CPA     GR1,B
+        RET
+A       DC      #5000
+B       DC      #7000
+        END
diff --git a/as/cmd/CPA/cpa0_1.casl b/as/cmd/CPA/cpa0_1.casl
new file mode 100644 (file)
index 0000000..ef5ec06
--- /dev/null
@@ -0,0 +1,7 @@
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        CPA     GR1,B
+        RET
+A       DC      #5000
+B       DC      #3000
+        END
diff --git a/as/cmd/CPA/cpa0_2.casl b/as/cmd/CPA/cpa0_2.casl
new file mode 100644 (file)
index 0000000..adca4a5
--- /dev/null
@@ -0,0 +1,7 @@
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        CPA     GR1,B
+        RET
+A       DC      #5000
+B       DC      #5000
+        END
diff --git a/as/cmd/CPA/cpa0_3.casl b/as/cmd/CPA/cpa0_3.casl
new file mode 100644 (file)
index 0000000..1c24511
--- /dev/null
@@ -0,0 +1,7 @@
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        CPA     GR1,B
+        RET
+A       DC      #5000
+B       DC      #8000
+        END
similarity index 78%
rename from as/cmd/CPA/cpa1.casl
rename to as/cmd/CPA/cpa1_0.casl
index a5ca590..551c76a 100644 (file)
@@ -1,6 +1,6 @@
 MAIN    START   BEGIN
 BEGIN   LAD     GR1,#5000
-        LAD     GR2,#F000
+        LAD     GR2,#7000
         CPA     GR2,GR1
         RET
         END
diff --git a/as/cmd/CPA/cpa1_1.casl b/as/cmd/CPA/cpa1_1.casl
new file mode 100644 (file)
index 0000000..45c7ae9
--- /dev/null
@@ -0,0 +1,6 @@
+MAIN    START   BEGIN
+BEGIN   LAD     GR1,#5000
+        LAD     GR2,#3000
+        CPA     GR2,GR1
+        RET
+        END
diff --git a/as/cmd/CPA/cpa1_2.casl b/as/cmd/CPA/cpa1_2.casl
new file mode 100644 (file)
index 0000000..2eb7c86
--- /dev/null
@@ -0,0 +1,6 @@
+MAIN    START   BEGIN
+BEGIN   LAD     GR1,#5000
+        LAD     GR2,#5000
+        CPA     GR1,GR2
+        RET
+        END
diff --git a/as/cmd/CPA/cpa1_3.casl b/as/cmd/CPA/cpa1_3.casl
new file mode 100644 (file)
index 0000000..99af974
--- /dev/null
@@ -0,0 +1,8 @@
+MAIN    START   BEGIN
+BEGIN   LD      GR1,A
+        LD      GR2,B
+        CPA     GR1,GR2
+        RET
+A       DC      #5000
+B       DC      #8000
+        END
diff --git a/as/cmd/literal_semi.casl b/as/cmd/literal_semi.casl
new file mode 100644 (file)
index 0000000..a3cc7ea
--- /dev/null
@@ -0,0 +1,4 @@
+MAIN    START
+        LAD     GR1,=';'        ; 「;」の処理が正常にできるか
+FIN     RET
+        END
diff --git a/as/err/opd_x_err.casl b/as/err/opd_x_err.casl
new file mode 100644 (file)
index 0000000..ee98241
--- /dev/null
@@ -0,0 +1,9 @@
+;;; ADDA r,adr,x 演算結果が負数(r < adr)
+MAIN    START
+        LD      GR1,A
+        LAD     GR2,1
+        ADDA    GR1,A,1
+        RET
+A       DC      -10
+        DC      20
+        END