From: j8takagi Date: Fri, 13 Jun 2014 02:24:52 +0000 (+0900) Subject: PBM作成アセンブルプログラムを修正 X-Git-Tag: v0.2p34~1 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7daba1d36c439ad8f585c67cdbe99a07f958a87b;p=YACASL2.git PBM作成アセンブルプログラムを修正 --- diff --git a/as/app/pbm/call_outpbm.casl b/as/app/pbm/call_outpbm.casl deleted file mode 100644 index 35d3d0e..0000000 --- a/as/app/pbm/call_outpbm.casl +++ /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 index 74d9d0e..0000000 --- a/as/app/pbm/five.casl +++ /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 index 0000000..de0a9ba --- /dev/null +++ b/as/app/pbm/five.svg @@ -0,0 +1,261 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/as/app/pbm/five_ccw90_pbm.casl b/as/app/pbm/five_ccw90_pbm.casl new file mode 100644 index 0000000..c64d341 --- /dev/null +++ b/as/app/pbm/five_ccw90_pbm.casl @@ -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 diff --git a/as/app/pbm/call_rotate.casl b/as/app/pbm/five_cw90_pbm.casl similarity index 51% rename from as/app/pbm/call_rotate.casl rename to as/app/pbm/five_cw90_pbm.casl index 322fd31..39d0e85 100644 --- a/as/app/pbm/call_rotate.casl +++ b/as/app/pbm/five_cw90_pbm.casl @@ -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 diff --git a/as/app/pbm/call_rotate3.casl b/as/app/pbm/five_nn_part_pbm.casl 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 --- a/as/app/pbm/call_rotate3.casl +++ b/as/app/pbm/five_nn_part_pbm.casl @@ -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 diff --git a/as/app/pbm/call_pbm16.casl b/as/app/pbm/five_pbm.casl similarity index 69% rename from as/app/pbm/call_pbm16.casl rename to as/app/pbm/five_pbm.casl index 4846fbd..dd59314 100644 --- a/as/app/pbm/call_pbm16.casl +++ b/as/app/pbm/five_pbm.casl @@ -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 diff --git a/as/app/pbm/rotate2.casl b/as/app/pbm/rotate_ccw90.casl similarity index 96% rename from as/app/pbm/rotate2.casl rename to as/app/pbm/rotate_ccw90.casl index a647c83..f84649f 100644 --- a/as/app/pbm/rotate2.casl +++ b/as/app/pbm/rotate_ccw90.casl @@ -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 diff --git a/as/app/pbm/rotate.casl b/as/app/pbm/rotate_cw90.casl similarity index 100% rename from as/app/pbm/rotate.casl rename to as/app/pbm/rotate_cw90.casl diff --git a/as/app/pbm/rotate3.casl b/as/app/pbm/rotate_nn_part.casl similarity index 99% rename from as/app/pbm/rotate3.casl rename to as/app/pbm/rotate_nn_part.casl index b40ad07..62f94fc 100644 --- a/as/app/pbm/rotate3.casl +++ b/as/app/pbm/rotate_nn_part.casl @@ -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 diff --git a/as/app/pbm/pbm16.casl b/as/casl2lib/pbm16.casl similarity index 92% rename from as/app/pbm/pbm16.casl rename to as/casl2lib/pbm16.casl index 2b9404a..39671ca 100644 --- a/as/app/pbm/pbm16.casl +++ b/as/casl2lib/pbm16.casl @@ -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