PBM作成アセンブルプログラムを修正
authorj8takagi <j8takagi@nifty.com>
Fri, 13 Jun 2014 02:24:52 +0000 (11:24 +0900)
committerj8takagi <j8takagi@nifty.com>
Fri, 13 Jun 2014 02:24:52 +0000 (11:24 +0900)
as/app/pbm/call_outpbm.casl [deleted file]
as/app/pbm/five.casl [deleted file]
as/app/pbm/five.svg [new file with mode: 0644]
as/app/pbm/five_ccw90_pbm.casl [new file with mode: 0644]
as/app/pbm/five_cw90_pbm.casl [moved from as/app/pbm/call_rotate.casl with 51% similarity]
as/app/pbm/five_nn_part_pbm.casl [moved from as/app/pbm/call_rotate3.casl with 52% similarity]
as/app/pbm/five_pbm.casl [moved from as/app/pbm/call_pbm16.casl with 69% similarity]
as/app/pbm/rotate_ccw90.casl [moved from as/app/pbm/rotate2.casl with 96% similarity]
as/app/pbm/rotate_cw90.casl [moved from as/app/pbm/rotate.casl with 100% similarity]
as/app/pbm/rotate_nn_part.casl [moved from as/app/pbm/rotate3.casl with 99% similarity]
as/casl2lib/pbm16.casl [moved from as/app/pbm/pbm16.casl with 92% similarity]

diff --git a/as/app/pbm/call_outpbm.casl b/as/app/pbm/call_outpbm.casl
deleted file mode 100644 (file)
index 35d3d0e..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-MAIN    START
-        LAD     GR2,16
-        LAD     GR3,16
-        CALL    OUTPBM
-        END
diff --git a/as/app/pbm/five.casl b/as/app/pbm/five.casl
deleted file mode 100644 (file)
index 74d9d0e..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-;;; casl2 outl_call.casl outl.casl
-MAIN    START
-        LAD     GR2,0
-LOOP    LD      GR1,VAL,GR2
-        CALL    OUTB
-        LAD     GR2,1,GR2
-        CPA     GR2,HEIGHT
-        JZE     FIN
-        JUMP    LOOP
-FIN     RET
-VAL     DC      #FFFC
-        DC      #FFFC
-        DC      #FFFC
-        DC      #0700
-        DC      #0700
-        DC      #0700
-        DC      #FFFC
-        DC      #FFFC
-        DC      #FFFC
-        DC      #071C
-        DC      #071C
-        DC      #071C
-        DC      #FFFF
-        DC      #FFFF
-        DC      #FFFF
-        DC      #0000
-HEIGHT  DC      16
-        END
diff --git a/as/app/pbm/five.svg b/as/app/pbm/five.svg
new file mode 100644 (file)
index 0000000..de0a9ba
--- /dev/null
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="utf-8"?>
+<svg  xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1024" height="1024">
+  <g transform="scale(4)" stroke-width="0.125" stroke="gray">
+  <rect x="0" y="0" width="1" height="1" fill="black" />
+  <rect x="1" y="0" width="1" height="1" fill="black" />
+  <rect x="2" y="0" width="1" height="1" fill="black" />
+  <rect x="3" y="0" width="1" height="1" fill="black" />
+  <rect x="4" y="0" width="1" height="1" fill="black" />
+  <rect x="5" y="0" width="1" height="1" fill="black" />
+  <rect x="6" y="0" width="1" height="1" fill="black" />
+  <rect x="7" y="0" width="1" height="1" fill="black" />
+  <rect x="8" y="0" width="1" height="1" fill="black" />
+  <rect x="9" y="0" width="1" height="1" fill="black" />
+  <rect x="10" y="0" width="1" height="1" fill="black" />
+  <rect x="11" y="0" width="1" height="1" fill="black" />
+  <rect x="12" y="0" width="1" height="1" fill="black" />
+  <rect x="13" y="0" width="1" height="1" fill="black" />
+  <rect x="14" y="0" width="1" height="1" fill="none" />
+  <rect x="15" y="0" width="1" height="1" fill="none" />
+  <rect x="0" y="1" width="1" height="1" fill="black" />
+  <rect x="1" y="1" width="1" height="1" fill="black" />
+  <rect x="2" y="1" width="1" height="1" fill="black" />
+  <rect x="3" y="1" width="1" height="1" fill="black" />
+  <rect x="4" y="1" width="1" height="1" fill="black" />
+  <rect x="5" y="1" width="1" height="1" fill="black" />
+  <rect x="6" y="1" width="1" height="1" fill="black" />
+  <rect x="7" y="1" width="1" height="1" fill="black" />
+  <rect x="8" y="1" width="1" height="1" fill="black" />
+  <rect x="9" y="1" width="1" height="1" fill="black" />
+  <rect x="10" y="1" width="1" height="1" fill="black" />
+  <rect x="11" y="1" width="1" height="1" fill="black" />
+  <rect x="12" y="1" width="1" height="1" fill="black" />
+  <rect x="13" y="1" width="1" height="1" fill="black" />
+  <rect x="14" y="1" width="1" height="1" fill="none" />
+  <rect x="15" y="1" width="1" height="1" fill="none" />
+  <rect x="0" y="2" width="1" height="1" fill="black" />
+  <rect x="1" y="2" width="1" height="1" fill="black" />
+  <rect x="2" y="2" width="1" height="1" fill="black" />
+  <rect x="3" y="2" width="1" height="1" fill="black" />
+  <rect x="4" y="2" width="1" height="1" fill="black" />
+  <rect x="5" y="2" width="1" height="1" fill="black" />
+  <rect x="6" y="2" width="1" height="1" fill="black" />
+  <rect x="7" y="2" width="1" height="1" fill="black" />
+  <rect x="8" y="2" width="1" height="1" fill="black" />
+  <rect x="9" y="2" width="1" height="1" fill="black" />
+  <rect x="10" y="2" width="1" height="1" fill="black" />
+  <rect x="11" y="2" width="1" height="1" fill="black" />
+  <rect x="12" y="2" width="1" height="1" fill="black" />
+  <rect x="13" y="2" width="1" height="1" fill="black" />
+  <rect x="14" y="2" width="1" height="1" fill="none" />
+  <rect x="15" y="2" width="1" height="1" fill="none" />
+  <rect x="0" y="3" width="1" height="1" fill="none" />
+  <rect x="1" y="3" width="1" height="1" fill="none" />
+  <rect x="2" y="3" width="1" height="1" fill="none" />
+  <rect x="3" y="3" width="1" height="1" fill="none" />
+  <rect x="4" y="3" width="1" height="1" fill="none" />
+  <rect x="5" y="3" width="1" height="1" fill="black" />
+  <rect x="6" y="3" width="1" height="1" fill="black" />
+  <rect x="7" y="3" width="1" height="1" fill="black" />
+  <rect x="8" y="3" width="1" height="1" fill="none" />
+  <rect x="9" y="3" width="1" height="1" fill="none" />
+  <rect x="10" y="3" width="1" height="1" fill="none" />
+  <rect x="11" y="3" width="1" height="1" fill="none" />
+  <rect x="12" y="3" width="1" height="1" fill="none" />
+  <rect x="13" y="3" width="1" height="1" fill="none" />
+  <rect x="14" y="3" width="1" height="1" fill="none" />
+  <rect x="15" y="3" width="1" height="1" fill="none" />
+  <rect x="0" y="4" width="1" height="1" fill="none" />
+  <rect x="1" y="4" width="1" height="1" fill="none" />
+  <rect x="2" y="4" width="1" height="1" fill="none" />
+  <rect x="3" y="4" width="1" height="1" fill="none" />
+  <rect x="4" y="4" width="1" height="1" fill="none" />
+  <rect x="5" y="4" width="1" height="1" fill="black" />
+  <rect x="6" y="4" width="1" height="1" fill="black" />
+  <rect x="7" y="4" width="1" height="1" fill="black" />
+  <rect x="8" y="4" width="1" height="1" fill="none" />
+  <rect x="9" y="4" width="1" height="1" fill="none" />
+  <rect x="10" y="4" width="1" height="1" fill="none" />
+  <rect x="11" y="4" width="1" height="1" fill="none" />
+  <rect x="12" y="4" width="1" height="1" fill="none" />
+  <rect x="13" y="4" width="1" height="1" fill="none" />
+  <rect x="14" y="4" width="1" height="1" fill="none" />
+  <rect x="15" y="4" width="1" height="1" fill="none" />
+  <rect x="0" y="5" width="1" height="1" fill="none" />
+  <rect x="1" y="5" width="1" height="1" fill="none" />
+  <rect x="2" y="5" width="1" height="1" fill="none" />
+  <rect x="3" y="5" width="1" height="1" fill="none" />
+  <rect x="4" y="5" width="1" height="1" fill="none" />
+  <rect x="5" y="5" width="1" height="1" fill="black" />
+  <rect x="6" y="5" width="1" height="1" fill="black" />
+  <rect x="7" y="5" width="1" height="1" fill="black" />
+  <rect x="8" y="5" width="1" height="1" fill="none" />
+  <rect x="9" y="5" width="1" height="1" fill="none" />
+  <rect x="10" y="5" width="1" height="1" fill="none" />
+  <rect x="11" y="5" width="1" height="1" fill="none" />
+  <rect x="12" y="5" width="1" height="1" fill="none" />
+  <rect x="13" y="5" width="1" height="1" fill="none" />
+  <rect x="14" y="5" width="1" height="1" fill="none" />
+  <rect x="15" y="5" width="1" height="1" fill="none" />
+  <rect x="0" y="6" width="1" height="1" fill="black" />
+  <rect x="1" y="6" width="1" height="1" fill="black" />
+  <rect x="2" y="6" width="1" height="1" fill="black" />
+  <rect x="3" y="6" width="1" height="1" fill="black" />
+  <rect x="4" y="6" width="1" height="1" fill="black" />
+  <rect x="5" y="6" width="1" height="1" fill="black" />
+  <rect x="6" y="6" width="1" height="1" fill="black" />
+  <rect x="7" y="6" width="1" height="1" fill="black" />
+  <rect x="8" y="6" width="1" height="1" fill="black" />
+  <rect x="9" y="6" width="1" height="1" fill="black" />
+  <rect x="10" y="6" width="1" height="1" fill="black" />
+  <rect x="11" y="6" width="1" height="1" fill="black" />
+  <rect x="12" y="6" width="1" height="1" fill="black" />
+  <rect x="13" y="6" width="1" height="1" fill="black" />
+  <rect x="14" y="6" width="1" height="1" fill="none" />
+  <rect x="15" y="6" width="1" height="1" fill="none" />
+  <rect x="0" y="7" width="1" height="1" fill="black" />
+  <rect x="1" y="7" width="1" height="1" fill="black" />
+  <rect x="2" y="7" width="1" height="1" fill="black" />
+  <rect x="3" y="7" width="1" height="1" fill="black" />
+  <rect x="4" y="7" width="1" height="1" fill="black" />
+  <rect x="5" y="7" width="1" height="1" fill="black" />
+  <rect x="6" y="7" width="1" height="1" fill="black" />
+  <rect x="7" y="7" width="1" height="1" fill="black" />
+  <rect x="8" y="7" width="1" height="1" fill="black" />
+  <rect x="9" y="7" width="1" height="1" fill="black" />
+  <rect x="10" y="7" width="1" height="1" fill="black" />
+  <rect x="11" y="7" width="1" height="1" fill="black" />
+  <rect x="12" y="7" width="1" height="1" fill="black" />
+  <rect x="13" y="7" width="1" height="1" fill="black" />
+  <rect x="14" y="7" width="1" height="1" fill="none" />
+  <rect x="15" y="7" width="1" height="1" fill="none" />
+  <rect x="0" y="8" width="1" height="1" fill="black" />
+  <rect x="1" y="8" width="1" height="1" fill="black" />
+  <rect x="2" y="8" width="1" height="1" fill="black" />
+  <rect x="3" y="8" width="1" height="1" fill="black" />
+  <rect x="4" y="8" width="1" height="1" fill="black" />
+  <rect x="5" y="8" width="1" height="1" fill="black" />
+  <rect x="6" y="8" width="1" height="1" fill="black" />
+  <rect x="7" y="8" width="1" height="1" fill="black" />
+  <rect x="8" y="8" width="1" height="1" fill="black" />
+  <rect x="9" y="8" width="1" height="1" fill="black" />
+  <rect x="10" y="8" width="1" height="1" fill="black" />
+  <rect x="11" y="8" width="1" height="1" fill="black" />
+  <rect x="12" y="8" width="1" height="1" fill="black" />
+  <rect x="13" y="8" width="1" height="1" fill="black" />
+  <rect x="14" y="8" width="1" height="1" fill="none" />
+  <rect x="15" y="8" width="1" height="1" fill="none" />
+  <rect x="0" y="9" width="1" height="1" fill="none" />
+  <rect x="1" y="9" width="1" height="1" fill="none" />
+  <rect x="2" y="9" width="1" height="1" fill="none" />
+  <rect x="3" y="9" width="1" height="1" fill="none" />
+  <rect x="4" y="9" width="1" height="1" fill="none" />
+  <rect x="5" y="9" width="1" height="1" fill="black" />
+  <rect x="6" y="9" width="1" height="1" fill="black" />
+  <rect x="7" y="9" width="1" height="1" fill="black" />
+  <rect x="8" y="9" width="1" height="1" fill="none" />
+  <rect x="9" y="9" width="1" height="1" fill="none" />
+  <rect x="10" y="9" width="1" height="1" fill="none" />
+  <rect x="11" y="9" width="1" height="1" fill="black" />
+  <rect x="12" y="9" width="1" height="1" fill="black" />
+  <rect x="13" y="9" width="1" height="1" fill="black" />
+  <rect x="14" y="9" width="1" height="1" fill="none" />
+  <rect x="15" y="9" width="1" height="1" fill="none" />
+  <rect x="0" y="10" width="1" height="1" fill="none" />
+  <rect x="1" y="10" width="1" height="1" fill="none" />
+  <rect x="2" y="10" width="1" height="1" fill="none" />
+  <rect x="3" y="10" width="1" height="1" fill="none" />
+  <rect x="4" y="10" width="1" height="1" fill="none" />
+  <rect x="5" y="10" width="1" height="1" fill="black" />
+  <rect x="6" y="10" width="1" height="1" fill="black" />
+  <rect x="7" y="10" width="1" height="1" fill="black" />
+  <rect x="8" y="10" width="1" height="1" fill="none" />
+  <rect x="9" y="10" width="1" height="1" fill="none" />
+  <rect x="10" y="10" width="1" height="1" fill="none" />
+  <rect x="11" y="10" width="1" height="1" fill="black" />
+  <rect x="12" y="10" width="1" height="1" fill="black" />
+  <rect x="13" y="10" width="1" height="1" fill="black" />
+  <rect x="14" y="10" width="1" height="1" fill="none" />
+  <rect x="15" y="10" width="1" height="1" fill="none" />
+  <rect x="0" y="11" width="1" height="1" fill="none" />
+  <rect x="1" y="11" width="1" height="1" fill="none" />
+  <rect x="2" y="11" width="1" height="1" fill="none" />
+  <rect x="3" y="11" width="1" height="1" fill="none" />
+  <rect x="4" y="11" width="1" height="1" fill="none" />
+  <rect x="5" y="11" width="1" height="1" fill="black" />
+  <rect x="6" y="11" width="1" height="1" fill="black" />
+  <rect x="7" y="11" width="1" height="1" fill="black" />
+  <rect x="8" y="11" width="1" height="1" fill="none" />
+  <rect x="9" y="11" width="1" height="1" fill="none" />
+  <rect x="10" y="11" width="1" height="1" fill="none" />
+  <rect x="11" y="11" width="1" height="1" fill="black" />
+  <rect x="12" y="11" width="1" height="1" fill="black" />
+  <rect x="13" y="11" width="1" height="1" fill="black" />
+  <rect x="14" y="11" width="1" height="1" fill="none" />
+  <rect x="15" y="11" width="1" height="1" fill="none" />
+  <rect x="0" y="12" width="1" height="1" fill="black" />
+  <rect x="1" y="12" width="1" height="1" fill="black" />
+  <rect x="2" y="12" width="1" height="1" fill="black" />
+  <rect x="3" y="12" width="1" height="1" fill="black" />
+  <rect x="4" y="12" width="1" height="1" fill="black" />
+  <rect x="5" y="12" width="1" height="1" fill="black" />
+  <rect x="6" y="12" width="1" height="1" fill="black" />
+  <rect x="7" y="12" width="1" height="1" fill="black" />
+  <rect x="8" y="12" width="1" height="1" fill="black" />
+  <rect x="9" y="12" width="1" height="1" fill="black" />
+  <rect x="10" y="12" width="1" height="1" fill="black" />
+  <rect x="11" y="12" width="1" height="1" fill="black" />
+  <rect x="12" y="12" width="1" height="1" fill="black" />
+  <rect x="13" y="12" width="1" height="1" fill="black" />
+  <rect x="14" y="12" width="1" height="1" fill="black" />
+  <rect x="15" y="12" width="1" height="1" fill="black" />
+  <rect x="0" y="13" width="1" height="1" fill="black" />
+  <rect x="1" y="13" width="1" height="1" fill="black" />
+  <rect x="2" y="13" width="1" height="1" fill="black" />
+  <rect x="3" y="13" width="1" height="1" fill="black" />
+  <rect x="4" y="13" width="1" height="1" fill="black" />
+  <rect x="5" y="13" width="1" height="1" fill="black" />
+  <rect x="6" y="13" width="1" height="1" fill="black" />
+  <rect x="7" y="13" width="1" height="1" fill="black" />
+  <rect x="8" y="13" width="1" height="1" fill="black" />
+  <rect x="9" y="13" width="1" height="1" fill="black" />
+  <rect x="10" y="13" width="1" height="1" fill="black" />
+  <rect x="11" y="13" width="1" height="1" fill="black" />
+  <rect x="12" y="13" width="1" height="1" fill="black" />
+  <rect x="13" y="13" width="1" height="1" fill="black" />
+  <rect x="14" y="13" width="1" height="1" fill="black" />
+  <rect x="15" y="13" width="1" height="1" fill="black" />
+  <rect x="0" y="14" width="1" height="1" fill="black" />
+  <rect x="1" y="14" width="1" height="1" fill="black" />
+  <rect x="2" y="14" width="1" height="1" fill="black" />
+  <rect x="3" y="14" width="1" height="1" fill="black" />
+  <rect x="4" y="14" width="1" height="1" fill="black" />
+  <rect x="5" y="14" width="1" height="1" fill="black" />
+  <rect x="6" y="14" width="1" height="1" fill="black" />
+  <rect x="7" y="14" width="1" height="1" fill="black" />
+  <rect x="8" y="14" width="1" height="1" fill="black" />
+  <rect x="9" y="14" width="1" height="1" fill="black" />
+  <rect x="10" y="14" width="1" height="1" fill="black" />
+  <rect x="11" y="14" width="1" height="1" fill="black" />
+  <rect x="12" y="14" width="1" height="1" fill="black" />
+  <rect x="13" y="14" width="1" height="1" fill="black" />
+  <rect x="14" y="14" width="1" height="1" fill="black" />
+  <rect x="15" y="14" width="1" height="1" fill="black" />
+  <rect x="0" y="15" width="1" height="1" fill="none" />
+  <rect x="1" y="15" width="1" height="1" fill="none" />
+  <rect x="2" y="15" width="1" height="1" fill="none" />
+  <rect x="3" y="15" width="1" height="1" fill="none" />
+  <rect x="4" y="15" width="1" height="1" fill="none" />
+  <rect x="5" y="15" width="1" height="1" fill="none" />
+  <rect x="6" y="15" width="1" height="1" fill="none" />
+  <rect x="7" y="15" width="1" height="1" fill="none" />
+  <rect x="8" y="15" width="1" height="1" fill="none" />
+  <rect x="9" y="15" width="1" height="1" fill="none" />
+  <rect x="10" y="15" width="1" height="1" fill="none" />
+  <rect x="11" y="15" width="1" height="1" fill="none" />
+  <rect x="12" y="15" width="1" height="1" fill="none" />
+  <rect x="13" y="15" width="1" height="1" fill="none" />
+  <rect x="14" y="15" width="1" height="1" fill="none" />
+  <rect x="15" y="15" width="1" height="1" fill="none" />
+  </g>
+</svg>
diff --git a/as/app/pbm/five_ccw90_pbm.casl b/as/app/pbm/five_ccw90_pbm.casl
new file mode 100644 (file)
index 0000000..c64d341
--- /dev/null
@@ -0,0 +1,30 @@
+;;; 「五」を表す画像を反時計方向へ90度回転させた結果をPBMファイルとして出力する
+;;; 呼び出し方:
+;;;   casl2 -M 1024 five_ccw90_pbm.casl $CASL2LIB/pbm16.casl $CASL2LIB/outb_w.casl $CASL2LIB/divl.casl $CASL2LIB/rev.casl rotate_ccw90.casl >five_ccw90.pbm
+MAIN    START
+        RPUSH
+        LAD     GR1,GRAPH
+        LAD     GR2,RES
+        CALL    ROTATE
+        LAD     GR1,RES
+        CALL    PBM16
+        RPOP
+FIN     RET
+GRAPH   DC      #FFFC
+        DC      #FFFC
+        DC      #FFFC
+        DC      #0700
+        DC      #0700
+        DC      #0700
+        DC      #FFFC
+        DC      #FFFC
+        DC      #FFFC
+        DC      #071C
+        DC      #071C
+        DC      #071C
+        DC      #FFFF
+        DC      #FFFF
+        DC      #FFFF
+        DC      #0000
+RES     DS      16
+        END
similarity index 51%
rename from as/app/pbm/call_rotate.casl
rename to as/app/pbm/five_cw90_pbm.casl
index 322fd31..39d0e85 100644 (file)
@@ -1,17 +1,16 @@
-;;; casl2 call_rotate.casl ../../casl2lib/outb_w.casl ../../casl2lib/divl.casl ../../casl2lib/rev.casl rotate.casl | cat 16_16.pbm - >five_rot.pbm
+;;; 「五」を表す画像を時計方向へ90度回転させた結果をPBMファイルとして出力する
+;;; 呼び出し方:
+;;;   casl2 -M 1024 five_cw90_pbm.casl $CASL2LIB/pbm16.casl $CASL2LIB/outb_w.casl $CASL2LIB/divl.casl $CASL2LIB/rev.casl rotate_cw90.casl >five_cw90.pbm
 MAIN    START
-        LAD     GR1,ORG
+        RPUSH
+        LAD     GR1,GRAPH
         LAD     GR2,RES
         CALL    ROTATE
-        LAD     GR2,0
-LOOP    LD      GR1,RES,GR2
-        CALL    OUTB
-        LAD     GR2,1,GR2
-        CPA     GR2,HEIGHT
-        JZE     FIN
-        JUMP    LOOP
+        LAD     GR1,RES
+        CALL    PBM16
+        RPOP
 FIN     RET
-ORG     DC      #FFFC
+GRAPH   DC      #FFFC
         DC      #FFFC
         DC      #FFFC
         DC      #0700
@@ -27,6 +26,5 @@ ORG     DC      #FFFC
         DC      #FFFF
         DC      #FFFF
         DC      #0000
-HEIGHT  DC      16
 RES     DS      16
         END
similarity index 52%
rename from as/app/pbm/call_rotate3.casl
rename to as/app/pbm/five_nn_part_pbm.casl
index 67a2a4c..857bc5c 100644 (file)
@@ -1,18 +1,17 @@
-;;; casl2 call_rotate3.casl ../../casl2lib/outb_w.casl ../../casl2lib/divl.casl ../../casl2lib/rev.casl rotate3.casl | cat 16_16.pbm - >five_rot3.pbm
+;;; 「五」を表す画像を時計方向へ90度回転させた結果をPBMファイルとして出力する
+;;; 呼び出し方:
+;;;   casl2 -M 1024 five_nn_part_pbm.casl $CASL2LIB/pbm16.casl $CASL2LIB/outb_w.casl $CASL2LIB/divl.casl $CASL2LIB/rev.casl rotate_nn_part.casl >five_nn_part.pbm
 MAIN    START
-        LAD     GR1,ORG
+        RPUSH
+        LAD     GR1,GRAPH
         LAD     GR2,RES
         LAD     GR3,8
         CALL    ROTATE
-        LAD     GR2,0
-LOOP    LD      GR1,RES,GR2
-        CALL    OUTB
-        LAD     GR2,1,GR2
-        CPA     GR2,HEIGHT
-        JZE     FIN
-        JUMP    LOOP
+        LAD     GR1,RES
+        CALL    PBM16
+        RPOP
 FIN     RET
-ORG     DC      #FFFC
+GRAPH   DC      #FFFC
         DC      #FFFC
         DC      #FFFC
         DC      #0700
@@ -28,6 +27,5 @@ ORG     DC      #FFFC
         DC      #FFFF
         DC      #FFFF
         DC      #0000
-HEIGHT  DC      16
 RES     DS      16
         END
similarity index 69%
rename from as/app/pbm/call_pbm16.casl
rename to as/app/pbm/five_pbm.casl
index 4846fbd..dd59314 100644 (file)
@@ -1,3 +1,6 @@
+;;; 「五」を表す16 x 16のpbm画像を出力する
+;;; 呼び出し方:
+;;;   casl2 five_pbm.casl $CASL2LIB/pbm16.casl $CASL2LIB/outb_w.casl $CASL2LIB/divl.casl $CASL2LIB/rev.casl >five.pbm
 MAIN    START
         LAD     GR1,GRAPH
         CALL    PBM16
similarity index 96%
rename from as/app/pbm/rotate2.casl
rename to as/app/pbm/rotate_ccw90.casl
index a647c83..f84649f 100644 (file)
@@ -12,11 +12,11 @@ LOOP1   LD     GR4,=16
         LD     GR5,GR2         ; GR5 ← 結果の領域のアドレス
         LD     GR6,0,GR1       ; GR6 ← 元の図形の先頭語の内容
 LOOP2   LD     GR7,0,GR5       ; GR7 ← 結果の領域の1語の内容
-        SRL    GR7,1
+        SLL    GR7,1
         SRL    GR6,1
         JOV    ON
         JUMP   CONT
-ON      OR     GR7,=#8000
+ON      OR     GR7,=#0001
 CONT    ST     GR7,0,GR5       ; 処理した1語を結果の領域に格納
         LAD    GR5,1,GR5
         SUBA   GR4,=1
similarity index 99%
rename from as/app/pbm/rotate3.casl
rename to as/app/pbm/rotate_nn_part.casl
index b40ad07..62f94fc 100644 (file)
@@ -34,7 +34,7 @@ LOOP1   LD     GR4,N
         LD     GR6,0,GR1       ; GR6 ← 元の図形の先頭語の内容
 LOOP2   LD     GR7,0,GR5       ; GR7 ← 結果の領域の1語の内容
         SRL    GR7,1
-        SRL    GR6,1
+        SLL    GR6,1
         JOV    ON
         JUMP   CONT
 ON      OR     GR7,=#8000
similarity index 92%
rename from as/app/pbm/pbm16.casl
rename to as/casl2lib/pbm16.casl
index 2b9404a..39671ca 100644 (file)
@@ -3,7 +3,7 @@
 ;;; 白黒ビットマップ画像データ(白:0 黒:1)とみなし、
 ;;; PBM画像ファイルとして出力
 ;;; 入力: GR1 画像データの先頭アドレス
-;;; 依存副プログラム: outl.casl
+;;; 依存副プログラム: outb_w.casl divl.casl rotate.casl
 PBM16   START
         PUSH    0,GR1
         PUSH    0,GR2