home *** CD-ROM | disk | FTP | other *** search
- /* A Rexx plot program for PCLO */
-
- trace off
-
- arg plotfile
- if plotfile = "" then
- do;
- say "Usage: rx plot file.block"
- say "Note: Only works on PCLO Block files, Board files are encrypted"
- exit 10
- end;
-
-
- image.0=copies('00'x,72)
- image.1=copies('3f 3f 3f 00'x,18)
-
- image.2=('00 3f 00 00 00 3f 00 00 01 3e 00 00 03 3c 00 00'x)
- image.2=image.2||('07 08 00 00 0f 30 00 00 3f 80 03 00 3f 00 07 00'x)
- image.2=image.2||('3e 00 0f 00 3c 00 1f 00 38 00 3f 00 30 01 3f 00'x)
- image.2=image.2||('20 03 3c 00 00 07 38 00 00 0f 30 00 00 1f 20 00'x)
- image.2=image.2||('00 3f 00 00 00 3f 00 00'x)
-
- image.3=('00 3f 00 00 00 3f 00 00 00 1f 20 00 00 0f 30 00'x)
- image.3=image.3||('00 07 38 00 20 03 3c 00 30 01 3f 00 38 00 3f 00'x)
- image.3=image.3||('3c 00 1f 00 3e 00 0f 00 3f 00 07 00 3f 80 03 00'x)
- image.3=image.3||('0f 30 00 00 07 08 00 00 03 3c 00 00 01 3e 00 00'x)
- image.3=image.3||('00 3f 00 00 00 3f 00 00'x)
-
- image.4=copies('00 3f 00 00'x,18)
- image.5=copies('00'x,24)||copies('3f 3f 3f 00'x,6)||copies('00'x,24)
-
- image.6=copies('00'x,24)
- image.6=image.6||('30 00 00 00 38 00 00 00 3c 00 00 00 3e 00 00 00'x)
- image.6=image.6||('3f 00 00 00 3f 20 00 00 0f 30 00 00 0e 38 00 00'x)
- image.6=image.6||('03 3c 00 00 01 3e 00 00 00 3f 00 00 00 3f 00 00'x)
-
-
- image.7=('00 3f 00 00 00 3f 00 00 00 1f 80 00 00 0f 30 00'x)
- image.7=image.7||('00 07 38 00 00 03 3c 00 00 01 3e 00 00 00 3f 00'x)
- image.7=image.7||('00 00 1f 00 00 00 0f 00 00 00 0e 00 00 00 03 00'x)
- image.7=image.7||copies('00'x,24)
-
- image.9=copies('00'x,24)
- image.9=image.9||('00 00 03 00 00 00 0e 00 00 00 0f 00 00 00 1f 00'x)
- image.9=image.9||('00 00 3f 00 00 01 3e 00 00 03 3c 00 00 07 38 00'x)
- image.9=image.9||('00 0f 30 00 00 1f 80 00 00 3f 00 00 00 3f 00 00'x)
-
- image.8=('00 3f 00 00 00 3f 00 00 01 3e 00 00 03 3c 00 00'x)
- image.8=image.8||('0e 38 00 00 0f 30 00 00 3f 20 00 00 3f 00 00 00'x)
- image.8=image.8||('3e 00 00 00 3c 00 00 00 38 00 00 00 30 00 00 00'x)
- image.8=image.8||copies('00'x,24)
-
-
- image.10=copies('00 3f 00 00'x,6)||copies('3f 3f 00 00'x,6)
- image.10=image10||copies('00 3f 00 00'x,6)
-
- image.12=copies('00 3f 00 00'x,6)||copies('00 3f 3f 00'x,6)
- image.12=image.12||copies('00 3f 00 00'x,6)
-
- image.11=copies('00 3f 00 00'x,6)||copies('3f 3f 3f 00'x,6)
- image.11=image.11||copies('00'x,24)
-
- image.13=copies('00'x,24)||copies('3f 3f 3f 00'x,6)||copies('00 3f 00 00'x,6)
-
- image.14=copies('00 3f 00 00'x,6)||copies('3f 3f 3f 00'x,6)
- image.14=image.14||copies('00 3f 00 00'x,6)
-
- image.15=('00 3f 00 00 03 3f 30 00 0f 3f 3c 00 0f 3f 3c 00'x)
- image.15=image.15||('1f 3f 3e 00 1f 3f 3e 00 3f 3f 3f 00'x)
- image.15=image.15||copies('3f 21 3f 00'x,4)
- image.15=image.15||('3f 3f 3f 00 1f 3f 3e 00 1f 3f 3e 00'x)
- image.15=image.15||('0f 3f 3c 00 0f 3f 3c 00 03 3f 30 00 00 3f 00 00'x)
-
- image.16=image.15
-
- image.17=image.0
-
- image.18=image.15
-
- image.19=image.15
-
-
- if open(file,plotfile,Read)~=1 then
- do
- say "Can't open source file"
- exit
- end
- file=readch(file,60000)
-
-
- if open(printer,'par:',Write)~=1 then
- do
- say "Can't open Parallel Port"
- exit
- end
- writech(printer,"0d 1b 1e 06 0d 0a"x)
-
- length=(c2d(substr(file,8,1))+1)*18
- length =right('0000'||length,4)
- blimit=(c2d(substr(file,8,1))+1)*2
-
- alimit=(c2d(substr(file,4,1))+1)*blimit;
-
- file=right(file,length(file)-7)
- do a=0 to alimit by blimit
- outstring="1b 3b"x||length
- do b=blimit to 2 by -2
- data = c2d(substr(file,a+b,1))
-
- outstring=outstring||image.data
-
- end b
-
- outstring=outstring||"0a 0d"x
-
- writech(printer,outstring)
-
- end a
-