home *** CD-ROM | disk | FTP | other *** search
- 9000 //
- 9005 proc dump1520(reverse,color) closed
- 9010 dim d$ of 1
- 9015 dim mo$ of 1
- 9020 dim p$ of 1
- 9025 dim xc$ of 3
- 9030 dim yc$ of 4
- 9035 dim pos$ of 9
- 9040 dim endl$ of 3
- 9045 if reverse then
- 9050 d$:="m"; mo$:="d"
- 9055 else
- 9060 d$:="d"; mo$:="m"
- 9065 endif
- 9070 open file 1,"",unit 6,1,write
- 9075 open file 6,"",unit 6,0,write
- 9080 open file 2,"",unit 6,2,write
- 9085 open file 7,"",unit 6,7,write
- 9090 print file 2: chr$(color+ord("0")),
- 9095 //
- 9100 for i:=1 to 10 do
- 9105 print file 6:
- 9110 endfor i
- 9115 print file 1: " m80 199"
- 9120 for y:=199 to 0 step -2 do
- 9125 yc$:=""
- 9130 strpp(yc$,y)
- 9135 yc$:=" "+yc$
- 9140 pos$:="m80"+yc$
- 9145 yy:=y
- 9150 z:=getcolor(0,yy)
- 9155 print file 1: pos$
- 9160 for i:=1 to 2 do
- 9165 if i=1 then
- 9170 ss:=0
- 9175 ff:=319
- 9180 sp:=1
- 9185 endl$:="399"
- 9190 else
- 9195 ff:=0
- 9200 ss:=319
- 9205 sp:=-1
- 9210 endl$:="80"
- 9215 yy:=y-1
- 9220 yc$:=""
- 9225 strpp(yc$,yy)
- 9230 yc$:=" "+yc$
- 9235 pos$:="m"+"399"+yc$
- 9240 print file 1: pos$
- 9245 endif
- 9250 for x:=ss to ff step sp do
- 9255 if getcolor(x,yy)<>z then
- 9260 case z of
- 9265 when 1
- 9270 p$:=mo$
- 9275 otherwise
- 9280 p$:=d$
- 9285 endcase
- 9290 xc$:=""
- 9295 xx:=x
- 9300 if i=2 then xx:=xx+1
- 9305 strpp(xc$,xx+80)
- 9310 pos$:=p$+xc$+yc$
- 9315 print file 1: pos$
- 9320 z:=getcolor(x,yy)
- 9325 endif
- 9330 endfor x
- 9335 z:=getcolor(319,yy)
- 9340 if z<>1 then
- 9345 pos$:=d$+endl$+yc$
- 9350 print file 1: pos$
- 9355 endif
- 9360 z:=getcolor(319,y-1)
- 9365 endfor i
- 9370 endfor y
- 9375 print file 1: "m"
- 9380 print file 6: chr$(13),chr$(13)
- 9385 print file 7:
- 9390 close
- 9395 endproc dump1520
- 9400 //
- 9405 proc strpp(ref c$,n) closed
- 9410 dim t$ of 6
- 9415 n:=abs(n)
- 9420 d:=n mod 10
- 9425 t$:=t$+chr$(d+48)
- 9430 if d=n then
- 9435 c$:=c$+t$
- 9440 else
- 9445 strpp(c$,(n-d)/10)
- 9450 c$:=c$+t$
- 9455 endif
- 9460 endproc strpp
- 9465 //
- 9470 proc str(ref c$,n) closed
- 9475 dim t$ of 11, s$ of 1, dd$ of 5
- 9480 if n<0 then s$:="-"
- 9485 n:=abs(n)
- 9490 if (n div 1)<>n then
- 9495 f:=int((n*10000) mod 10000+.5)
- 9500 str(dd$,f)
- 9505 dd$:="."+dd$
- 9510 p:=len(dd$)
- 9515 while dd$(p)="0" and p>1 do
- 9520 dd$:=dd$(1:p-1)
- 9525 p:=p-1
- 9530 endwhile
- 9535 n:=n div 1
- 9540 endif
- 9545 d:=n mod 10
- 9550 t$:=t$+chr$(d+48)
- 9555 if d=n then
- 9560 c$:=c$+t$
- 9565 else
- 9570 str(c$,(n-d)/10)
- 9575 c$:=c$+t$
- 9580 endif
- 9585 c$:=s$+c$+dd$
- 9590 endproc str
-