as/casl2libを復旧
authorj8takagi <j8takagi@nifty.com>
Thu, 1 Nov 2012 15:21:20 +0000 (00:21 +0900)
committerj8takagi <j8takagi@nifty.com>
Thu, 1 Nov 2012 15:21:20 +0000 (00:21 +0900)
25 files changed:
doc/casl2lib [deleted symlink]
doc/casl2lib/Define.mk [new symlink]
doc/casl2lib/Makefile [new symlink]
doc/casl2lib/Test.mk [new symlink]
doc/casl2lib/abs/0.txt [new file with mode: 0644]
doc/casl2lib/abs/Makefile [new file with mode: 0644]
doc/casl2lib/abs/call_abs.casl [new file with mode: 0644]
doc/casl2lib/abs/cmd [new file with mode: 0755]
doc/casl2lib/addl32/0.txt [new file with mode: 0644]
doc/casl2lib/addl32/Makefile [new file with mode: 0644]
doc/casl2lib/addl32/call_addl32.casl [new file with mode: 0644]
doc/casl2lib/addl32/cmd [new file with mode: 0755]
doc/casl2lib/diva/0.txt [new file with mode: 0644]
doc/casl2lib/diva/Makefile [new file with mode: 0644]
doc/casl2lib/diva/call_diva.casl [new file with mode: 0644]
doc/casl2lib/diva/cmd [new file with mode: 0755]
doc/casl2lib/divl/0.txt [new file with mode: 0644]
doc/casl2lib/divl/Makefile [new file with mode: 0644]
doc/casl2lib/divl/call_divl.casl [new file with mode: 0644]
doc/casl2lib/divl/cmd [new file with mode: 0755]
doc/casl2lib/inl/0.txt [new file with mode: 0644]
doc/casl2lib/inl/Makefile [new file with mode: 0644]
doc/casl2lib/inl/call_inl.casl [new file with mode: 0644]
doc/casl2lib/inl/cmd [new file with mode: 0755]
doc/casl2lib/inl/in.txt [new file with mode: 0644]

diff --git a/doc/casl2lib b/doc/casl2lib
deleted file mode 120000 (symlink)
index d8f5166..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../as/casl2lib/
\ No newline at end of file
diff --git a/doc/casl2lib/Define.mk b/doc/casl2lib/Define.mk
new file mode 120000 (symlink)
index 0000000..551896d
--- /dev/null
@@ -0,0 +1 @@
+../../test/template/Define.mk
\ No newline at end of file
diff --git a/doc/casl2lib/Makefile b/doc/casl2lib/Makefile
new file mode 120000 (symlink)
index 0000000..c2ca8ea
--- /dev/null
@@ -0,0 +1 @@
+../../test/template/Group.mk
\ No newline at end of file
diff --git a/doc/casl2lib/Test.mk b/doc/casl2lib/Test.mk
new file mode 120000 (symlink)
index 0000000..41e1cd8
--- /dev/null
@@ -0,0 +1 @@
+../../test/template/Test.mk
\ No newline at end of file
diff --git a/doc/casl2lib/abs/0.txt b/doc/casl2lib/abs/0.txt
new file mode 100644 (file)
index 0000000..d00491f
--- /dev/null
@@ -0,0 +1 @@
+1
diff --git a/doc/casl2lib/abs/Makefile b/doc/casl2lib/abs/Makefile
new file mode 100644 (file)
index 0000000..b6dac59
--- /dev/null
@@ -0,0 +1,2 @@
+include ../Define.mk
+include ../Test.mk
diff --git a/doc/casl2lib/abs/call_abs.casl b/doc/casl2lib/abs/call_abs.casl
new file mode 100644 (file)
index 0000000..251ee3d
--- /dev/null
@@ -0,0 +1,8 @@
+;;; CASL2LIB > ABSを呼び出し、-1の絶対値を表示
+MAIN    START
+        LD      GR1,A
+        CALL    ABS
+        CALL    OUTA
+        RET
+A       DC      -1
+        END
diff --git a/doc/casl2lib/abs/cmd b/doc/casl2lib/abs/cmd
new file mode 100755 (executable)
index 0000000..700039d
--- /dev/null
@@ -0,0 +1,3 @@
+PATH=../../..:$PATH
+CASL2LIBDIR=../../../as/casl2lib
+casl2 call_abs.casl $CASL2LIBDIR/abs.casl $CASL2LIBDIR/outa.casl $CASL2LIBDIR/divl.casl $CASL2LIBDIR/rev.casl
diff --git a/doc/casl2lib/addl32/0.txt b/doc/casl2lib/addl32/0.txt
new file mode 100644 (file)
index 0000000..97b23a9
--- /dev/null
@@ -0,0 +1,15 @@
+MAIN    START
+        LAD     GR1,A
+        LAD     GR2,B
+        CALL    ADDL32
+        LD      GR2,GR0
+        LD      GR1,1,GR2
+        CALL    OUTL
+        LD      GR1,0,GR2
+        CALL    OUTL
+        RET
+A       DC      6,10
+B       DC      2,65530
+        END
+4
+9
diff --git a/doc/casl2lib/addl32/Makefile b/doc/casl2lib/addl32/Makefile
new file mode 100644 (file)
index 0000000..b6dac59
--- /dev/null
@@ -0,0 +1,2 @@
+include ../Define.mk
+include ../Test.mk
diff --git a/doc/casl2lib/addl32/call_addl32.casl b/doc/casl2lib/addl32/call_addl32.casl
new file mode 100644 (file)
index 0000000..6072b8b
--- /dev/null
@@ -0,0 +1,13 @@
+MAIN    START
+        LAD     GR1,A
+        LAD     GR2,B
+        CALL    ADDL32
+        LD      GR2,GR0
+        LD      GR1,1,GR2
+        CALL    OUTL
+        LD      GR1,0,GR2
+        CALL    OUTL
+        RET
+A       DC      6,10
+B       DC      2,65530
+        END
diff --git a/doc/casl2lib/addl32/cmd b/doc/casl2lib/addl32/cmd
new file mode 100755 (executable)
index 0000000..d6e4227
--- /dev/null
@@ -0,0 +1,3 @@
+PATH=../../..:$PATH
+CASL2LIBDIR=../../../as/casl2lib
+cat call_addl32.casl && casl2 call_addl32.casl $CASL2LIBDIR/addl32.casl $CASL2LIBDIR/divl.casl $CASL2LIBDIR/rev.casl $CASL2LIBDIR/outl.casl
diff --git a/doc/casl2lib/diva/0.txt b/doc/casl2lib/diva/0.txt
new file mode 100644 (file)
index 0000000..bab389d
--- /dev/null
@@ -0,0 +1,2 @@
+-128
+-127
diff --git a/doc/casl2lib/diva/Makefile b/doc/casl2lib/diva/Makefile
new file mode 100644 (file)
index 0000000..b6dac59
--- /dev/null
@@ -0,0 +1,2 @@
+include ../Define.mk
+include ../Test.mk
diff --git a/doc/casl2lib/diva/call_diva.casl b/doc/casl2lib/diva/call_diva.casl
new file mode 100644 (file)
index 0000000..13acb85
--- /dev/null
@@ -0,0 +1,18 @@
+;; CASL2LIB > DIVAを呼び出し、-32767 / 255 の商と剰余を表示
+MAIN    START
+BEGIN   LD      GR1,A
+        LD      GR2,B
+        CALL    DIVA
+        JOV     ERR
+        LD      GR1,GR0
+        CALL    OUTA
+        LD      GR1,GR3
+        CALL    OUTA
+        JUMP    FIN
+ERR     OUT     EMSG,ELEN
+FIN     RET
+A       DC      -32767
+B       DC      255
+EMSG    DC      'error'
+ELEN    DC      5
+        END
diff --git a/doc/casl2lib/diva/cmd b/doc/casl2lib/diva/cmd
new file mode 100755 (executable)
index 0000000..c758964
--- /dev/null
@@ -0,0 +1,3 @@
+PATH=../../..:$PATH
+CASL2LIBDIR=../../../as/casl2lib
+casl2 call_diva.casl $CASL2LIBDIR/diva.casl $CASL2LIBDIR/divl.casl $CASL2LIBDIR/outa.casl $CASL2LIBDIR/abs.casl $CASL2LIBDIR/rev.casl
diff --git a/doc/casl2lib/divl/0.txt b/doc/casl2lib/divl/0.txt
new file mode 100644 (file)
index 0000000..130f552
--- /dev/null
@@ -0,0 +1,2 @@
+256
+254
diff --git a/doc/casl2lib/divl/Makefile b/doc/casl2lib/divl/Makefile
new file mode 100644 (file)
index 0000000..b6dac59
--- /dev/null
@@ -0,0 +1,2 @@
+include ../Define.mk
+include ../Test.mk
diff --git a/doc/casl2lib/divl/call_divl.casl b/doc/casl2lib/divl/call_divl.casl
new file mode 100644 (file)
index 0000000..2347a43
--- /dev/null
@@ -0,0 +1,18 @@
+;; CASL2LIB > DIVLを呼び出し、65534 / 255 の商と剰余を表示
+MAIN    START
+BEGIN   LD      GR1,A
+        LD      GR2,B
+        CALL    DIVL
+        JOV     ERR
+        LD      GR1,GR0
+        CALL    OUTL
+        LD      GR1,GR3
+        CALL    OUTL
+        JUMP    FIN        
+ERR     OUT     EMSG,ELEN
+FIN     RET
+A       DC      65534
+B       DC      255
+EMSG    DC      'error'
+ELEN   DC      5
+        END
diff --git a/doc/casl2lib/divl/cmd b/doc/casl2lib/divl/cmd
new file mode 100755 (executable)
index 0000000..9936525
--- /dev/null
@@ -0,0 +1,3 @@
+PATH=../../..:$PATH
+CASL2LIBDIR=../../../as/casl2lib
+casl2 call_divl.casl $CASL2LIBDIR/divl.casl $CASL2LIBDIR/outl.casl $CASL2LIBDIR/rev.casl
diff --git a/doc/casl2lib/inl/0.txt b/doc/casl2lib/inl/0.txt
new file mode 100644 (file)
index 0000000..0a54b97
--- /dev/null
@@ -0,0 +1,14 @@
+0
+1
+2
+10
+12
+32767
+32768
+65535
+Over 65535
+Over 65535
+Not integer
+Not integer
+12345
+Str too long. Stop
diff --git a/doc/casl2lib/inl/Makefile b/doc/casl2lib/inl/Makefile
new file mode 100644 (file)
index 0000000..b6dac59
--- /dev/null
@@ -0,0 +1,2 @@
+include ../Define.mk
+include ../Test.mk
diff --git a/doc/casl2lib/inl/call_inl.casl b/doc/casl2lib/inl/call_inl.casl
new file mode 100644 (file)
index 0000000..b16d692
--- /dev/null
@@ -0,0 +1,26 @@
+;;; casl2 -M1024 call_inl.casl $CASL2LIB/inl.casl $CASL2LIB/str2l.casl  $CASL2LIB/mull.casl \
+;;; $CASL2LIB/outl.casl $CASL2LIB/divl.casl $CASL2LIB/rev.casl
+MAIN    START
+LOOP    CALL    INL             ; GR1に数値、GR0に文字列の長さ
+        JOV     OV
+        AND     GR0,GR0
+        JZE     FIN
+        CPL     GR0,=#FFFF
+        JZE     NAN
+        CALL    OUTL
+        JUMP    LOOP
+OV      CPL     GR0,=#FFFF
+        JZE     LENOV
+        OUT     OVMSG,MLEN1
+        JUMP    LOOP
+NAN     OUT     NANMSG,MLEN2
+        JUMP    LOOP
+LENOV   OUT     LENOVMSG,MLEN3
+FIN     RET
+OVMSG   DC      'Over 65535'
+MLEN1   DC      10
+NANMSG  DC      'Not integer'
+MLEN2   DC      11
+LENOVMSG DC     'Str too long. Stop'
+MLEN3   DC      18
+        END
diff --git a/doc/casl2lib/inl/cmd b/doc/casl2lib/inl/cmd
new file mode 100755 (executable)
index 0000000..b17a5b0
--- /dev/null
@@ -0,0 +1,3 @@
+PATH=../../..:$PATH
+CASL2LIBDIR=../../../as/casl2lib
+casl2 -M 720 call_inl.casl $CASL2LIBDIR/inl.casl $CASL2LIBDIR/outl.casl $CASL2LIBDIR/str2l.casl $CASL2LIBDIR/divl.casl $CASL2LIBDIR/rev.casl $CASL2LIBDIR/mull.casl <in.txt
diff --git a/doc/casl2lib/inl/in.txt b/doc/casl2lib/inl/in.txt
new file mode 100644 (file)
index 0000000..b6b862a
--- /dev/null
@@ -0,0 +1,15 @@
+0
+1
+2
+10
+12
+32767
+32768
+65535
+65536
+90000
+-1
+NOTNU
+12345
+100000
+1234