Home » Personal collection » Acorn hard disk » files » DomFord » !Video/!RunImage

!Video/!RunImage

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn hard disk » files » DomFord
Filename: !Video/!RunImage
Read OK:
File size: 1DFF bytes
Load address: 0000
Exec address: 0000
File contents
   10REM SpriteTest - Interquartile range
   20REM By Dominic Ford - May 1995
   30:
   40maxno=50
   50noobsmax%=50
   60DIM q% 256
   70SYS "Wimp_Initialise",200,&4B534154,"SpriteRecognition" TO,task_handle%
   80DIM sp% 256 , err% 256
   90DIMblock(maxno,256),col(maxno),bmin(maxno,256),CNA$(15),cols(15)
  100DIMc(15),MCC$(15),MCC(15),CM(15),iw(256),o$(7)
  110DIMob(noobsmax%,maxno),prob(noobsmax%,maxno),coobs(noobsmax%,maxno),name$(noobsmax%),mb(noobsmax%)
  120DIMscore(noobsmax%)
  130!sp%=-1
  140sp%!4=0
  150sp%!8=0
  160sp%!12=100
  170sp%!16=68
  180sp%!20=%00010001000000000011000000101010
  190$(sp%+24)="!video"+CHR$0
  200SYS "Wimp_CreateIcon",,sp% TO ic%
  210REPEAT
  220SYS "Wimp_Poll",0,q% TO act%
  230CASE act% OF
  240WHEN 17,18
  250 IF q%!16=0 END
  260WHEN 6
  270 IF q%!12=-2 AND q%!16=ic% THEN
  280  MOUSE X,Y,C
  290  IF C=1 OR C=4 THEN PROCspritein ELSE IF C=2 THEN END
  300 ENDIF
  310ENDCASE
  320UNTIL FALSE
  330:
  340DEFPROCspritein
  350MODE 7
  360RESTORE
  370PROCinit
  380PROCanalyse
  390PROCconclusion
  400PROClearn
  410PROCstore
  420MODE 12
  430MOUSE ON
  440*<Obey$Dir>.!Pallete
  450ENDPROC
  460:
  470DEFPROCanalyse
  480FOR Y=1 TO yax
  490FOR X=1 TO xax
  500PRINTTAB(3,3);FNpera;"%"
  510SYS "OS_SpriteOp",41,,SPR$,X-1,Y-1 TO ,,,,,C,T
  520bin=0
  530c(C)=c(C)+1
  540FOR bo=1 TO mb
  550IF col(bo)=C AND block(bo,X)>Y-6 THEN bin=bin+1:oproc=bo:PROCobject_add
  560NEXT
  570IF bin=0 THEN PROCobject_make
  580IF bin>1 THEN PROCobject_join
  590NEXT,
  600PROCmcc
  610ENDPROC
  620:
  630DEFPROCmcc
  640CM%=0
  650FOR C=1 TO 15
  660IF c(C)>=CM% THEN CM%=c(C):MCC$=CNA$(C):MCC%=C
  670NEXT
  680ENDPROC
  690:
  700DEFPROCerror
  710MODE 12
  720REPORT:PRINT" at line ";ERL
  730MOUSE ON
  740*<Obey$Dir>.!Pallete
  750SYS "Wimp_Poll",0,q% TO act%
  760END
  770ENDPROC
  780:
  790DEFPROCinit
  800ON ERROR PROCerror
  810SYS "OS_ChangeDynamicArea",3,&8000
  820PRINTCHR$(129);CHR$(141);SPC(3)"Sprite Recognition by D Ford"
  830PRINTCHR$(129);CHR$(141);SPC(3)"Sprite Recognition by D Ford"
  840VDU 28,0,24,39,3,135
  850title$="FILING SYSTEM SELECTION":o$(1)="(R)am":o$(2)="(A)DFS":o$(3)="(S)erver":o$(4)="(C)urrent":PROCmenubar(4)
  860IF o=3 THEN PROCserver
  870IF o=2 THEN PROCadfs
  880IF o=1 THEN *RAM
  890CLS
  900*.
  910INPUT"Sprite file name";SFILE$
  920INPUT"     Sprite name";SPR$
  930CLS
  940PRINT'"Please Wait. . ."
  950OSCLI "SLOAD "+SFILE$
  960SYS "OS_SpriteOp",40,,SPR$ TO ,,,xax,yax,H,,MDOE
  970mb=0
  980FOR C=0 TO 15
  990READ CNA$(C),cols(C)
 1000NEXT
 1010ENDPROC
 1020:
 1030DEFPROCserver
 1040INPUT"     Server name";NAME$
 1050OSCLI"I AM "+NAME$
 1060ENDPROC
 1070:
 1080DEFPROCadfs
 1090PRINTSPC(8)"Insert Graphic Data Disc"''SPC(14)"Press SPACE"
 1100REPEAT UNTIL INKEY(-99)
 1110*ADFS
 1120*MOUNT
 1130ENDPROC
 1140:
 1150DEFPROCobject_make
 1160IF mb=maxno THEN PRINT'"I am going to need more objects."
 1170mb=mb+1
 1180col(mb)=C
 1190FOR Xwr=X-5 TO X+5
 1200IF Xwr<0 OR Xwr>xax THEN NEXT:ENDPROC
 1210block(mb,Xwr)=Y
 1220bmin(mb,Xwr)=Y
 1230NEXT
 1240ENDPROC
 1250:
 1260DEFPROCobject_add
 1270FOR Xwr=X-5 TO X+5
 1280IF Xwr<0 OR Xwr>xax THEN NEXT:ENDPROC
 1290block(oproc,Xwr)=Y
 1300IF bmin(oproc,Xwr)=0 THEN bmin(oproc,Xwr)=Y
 1310NEXT
 1320ENDPROC
 1330:
 1340DEFPROCobject_join
 1350FOR ob=1 TO mb
 1360IF col(ob)=C AND block(ob,X)>=Y-5 THEN PROCadditon
 1370NEXT
 1380FOR ob=1 TO mb
 1390IF col(ob)=C AND ob<>oproc AND block(ob,X)>=Y-5 THEN PROCgetridofit
 1400NEXT:oproc=-1
 1410ENDPROC
 1420:
 1430DEFPROCadditon
 1440IF oproc=-1 THEN oproc=ob
 1450FOR xscan=0 TO xax-1
 1460IF block(ob,xscan)>block(oproc,xscan) THEN block(oproc,xscan)=block(ob,xscan)
 1470IF bmin(ob,xscan)<bmin(oproc,xscan) THEN bmin(oproc,xscan)=bmin(ob,xscan)
 1480NEXT
 1490ENDPROC
 1500:
 1510DEFPROCgetridofit
 1520FOR groi=ob+1 TO mb
 1530FOR groil=0 TO xax-1
 1540block(groi,groil)=block(groi-1,groil)
 1550bmin(groi,groil)=bmin(groi-1,groil)
 1560NEXT
 1570col(groi)=col(groi-1)
 1580NEXT
 1590mb=mb-1
 1600ENDPROC
 1610:
 1620DEFPROCgetdata
 1630file=OPENIN "<Obey$Dir>.Objects"
 1640INPUT#file,noobs%
 1650FOR obget=0 TO noobs%
 1660INPUT#file,name$(obget),mb(obget)
 1670PROCgetdataloop
 1680NEXT
 1690CLOSE#file
 1700ENDPROC
 1710:
 1720DEFPROCgetdataloop
 1730FOR oblop=1 TO mb(obget)
 1740INPUT#file,ob(obget,oblop),coobs(obget,oblop),prob(obget,oblop)
 1750NEXT
 1760ENDPROC
 1770:
 1780DEFPROCsaveloop
 1790FOR oblop=1 TO mb(obget)
 1800PRINT#file,ob(obget,oblop),coobs(obget,oblop),prob(obget,oblop)
 1810NEXT
 1820ENDPROC
 1830:
 1840DEFPROCsavedata
 1850file=OPENOUT "<Obey$Dir>.Objects"
 1860PRINT#file,noobs%
 1870FOR obget=0 TO noobs%
 1880PRINT#file,name$(obget),mb(obget)
 1890PROCsaveloop
 1900NEXT
 1910CLOSE#file
 1920ENDPROC
 1930:
 1940DEFPROCconclusion
 1950PROCgetdata
 1960REMPROCcolcheck
 1970PROCiqrcheck
 1980smax=9999999:obname$=""
 1990FOR obscan=0 TO noobs%
 2000IF smax>score(obscan) THEN snum=obscan:smax=score(obscan):obname$=name$(obscan)
 2010PRINTobscan,name$(obscan),score(obscan)
 2020NEXT
 2030ENDPROC
 2040:
 2050DEFPROCcolcheck
 2060FOR picobs=1 TO mb
 2070FOR cclude=0 TO noobs%
 2080FOR obscan=1 TO mb(cclude)
 2090IF(coobs(cclude,obscan) AND 2^(col(picobs)+1))<>0 THEN score(cclude)=score(cclude)+prob(cclude,obscan)
 2100NEXT,,
 2110ENDPROC
 2120:
 2130DEFPROCiqrcheck
 2140FOR picobs=1 TO mb
 2150iqr=FNiqr(picobs)
 2160FOR cclude=0 TO noobs%
 2170st=9999999
 2180FOR obscan=1 TO mb(cclude)
 2190scre=ABS(iqr-ob(cclude,obscan)):REM*prob(cclude,obscan)
 2200PRINTiqr,ob(cclude,obscan)
 2210IF scre<st THEN score(cclude)=scre:st=scre
 2220NEXT,,
 2230ENDPROC
 2240:
 2250DEFPROCbonds
 2260PRINT"BONDS ON"
 2270FOR cclude=1 TO mb(snum)
 2280PRINTcclude;"/";mb(snum)
 2290REPEAT
 2300del=FALSE
 2310prob(snum,cclude)=prob(snum,cclude)+FNpup
 2320IF prob(snum,cclude)<=0 THEN PROCgetrid:del=TRUE
 2330UNTIL del=FALSE OR cclude=mb(snum)
 2340NEXT
 2350PRINT"BONDS OFF"
 2360ENDPROC
 2370:
 2380DEFPROClearn
 2390PRINT'"Is it a ";obname$;:PROCask
 2400IF A$="N" THEN INPUT"What was it then";obnamen$:PROCrethink
 2410PRINT'"Was it a ";MCC$;" ";obname$;:PROCask
 2420IF A$="N" THEN PROCrecolour
 2430FOR cclude=1 TO mb(snum)
 2440prob(snum,cclude)=prob(snum,cclude)+0.25
 2450NEXT
 2460PROCbonds
 2470ENDPROC
 2480:
 2490DEFPROCrecolour
 2500PROCcolourtable
 2510REPEAT
 2520A$=GET$
 2530UNTIL ASC(A$)>64 AND ASC(A$)<70
 2540MCC%=ASC(A$)-64
 2550MCC$=CNA$(MCC%)
 2560ENDPROC
 2570:
 2580DEFPROCcolourtable
 2590MODE 12
 2600*<Obey$Dir>.!Pallete
 2610PRINT"What colour was it then:"
 2620FORc=0TO15
 2630COLOUR 128:PRINTCHR$(c+64);" ";
 2640COLOUR c+128
 2650PRINT;"          "
 2660NEXT
 2670ENDPROC
 2680:
 2690DEFPROCrethink
 2700CLS
 2710PRINT"Please Wait. . ."'
 2720PROCbonds
 2730obname$=obnamen$
 2740REPEAT
 2750err=FALSE
 2760obname$=" "+obname$+" "
 2770FOR c=2 TO LEN(obname$)-1
 2780IF (FNrt<97) AND (FNrt<>32) THEN obname$=LEFT$(obname$,c-1)+CHR$(FNrt+32)+RIGHT$(obname$,LEN(obname$)-c)
 2790IF (FNrt<97 OR FNrt>122) AND FNrt<>32 THEN err=TRUE
 2800NEXT
 2810obname$=MID$(obname$,2,LEN(obname$)-2)
 2820IF err=TRUE THEN PROCreask
 2830UNTIL err=FALSE
 2840FOR ono=0 TO noobs%
 2850IF name$(ono)=obname$ THEN snum=ono:err=TRUE
 2860NEXT
 2870IF err=FALSE THEN PROCnewob
 2880ENDPROC
 2890:
 2900DEFPROCreask
 2910PRINT'"Object names can only contain letters. Please re-type the name"'
 2920INPUT"What was it then";obname$
 2930ENDPROC
 2940:
 2950DEFPROCnewob
 2960noobs%=noobs%+1
 2970mb(noobs%)=mb
 2980name$(noobs%)=obname$
 2990FOR ono=1 TO mb
 3000ob(noobs%,ono)=FNiqr(ono)
 3010coobs(noobs%,ono)=cols(col(ono))
 3020prob(noobs%,ono)=2
 3030NEXT
 3040snum=noobs%
 3050ENDPROC
 3060:
 3070DEFPROCask
 3080PRINT;" (Y/N) ";
 3090REPEAT
 3100A$=GET$
 3110UNTIL INSTR("YyNn",A$)<>0
 3120IF A$="Y" OR A$="y"THEN PRINT"Yes":A$="Y" ELSE PRINT"No":A$="N"
 3130ENDPROC
 3140:
 3150DEFPROCgetrid
 3160mb(snum)=mb(snum)-1
 3170FOR obno=cclude TO mb(snum)
 3180ob(obno,snum)=ob(obno+1,snum)
 3190coobs(obno,snum)=coobs(obno+1,snum)
 3200prob(obno,snum)=prob(obno+1,snum)
 3210NEXT
 3220ENDPROC
 3230:
 3240DEFPROCstore
 3250MODE 12
 3260*<Obey$Dir>.!Pallete
 3270OSCLI"SCHOOSE "+SPR$
 3280PLOT &ED,0,0
 3290PRINT"Do you want me to learn from this sprite";:PROCask
 3300IF A$="N" THEN ENDPROC
 3310PRINT"Please wait. . .";
 3320PROCsavedata
 3330ENDPROC
 3340:
 3350DEFPROCmenubar(options)
 3360CLS
 3370PRINTtitle$'
 3380FOR o=1 TO options
 3390PRINT" ";o$(o)
 3400NEXT
 3410o=1:old=-1
 3420REPEAT
 3430PROCinvert
 3440A$=GET$
 3450IF A$="/" AND o<>options THEN o=o+1
 3460IF A$="'" AND o<>1 THEN o=o-1
 3470UNTIL A$=CHR$(13)
 3480PRINTTAB(0,options+2);
 3490ENDPROC
 3500:
 3510DEFPROCinvert
 3520IF old<>-1 THEN PRINTTAB(0,old+1);" "
 3530PRINTTAB(0,o+1);">"
 3540old=o
 3550ENDPROC
 3560:
 3570DEFFNiqr(ono)
 3580dva=0
 3590FOR xt=0 TO xax
 3600iw(xt)=0
 3610NEXT
 3620FOR xt=0 TO xax-1
 3630IF block(ono,xt)>bmin(ono,xt) THEN PROCaddiqr:dva=dva+1
 3640NEXT
 3650IF iw(INT(dva*.25))=0 THEN =1
 3660=iw(INT(dva*.75))/iw(INT(dva*.25))
 3670:
 3680DEFPROCaddiqr
 3690FOR xs=0 TO dva
 3700IF FNdif>=iw(xs) THEN pos=xs
 3710NEXT
 3720FOR s=pos+1 TO dva
 3730iw(xs-1)=iw(xs)
 3740NEXT
 3750iw(pos)=FNdif
 3760ENDPROC
 3770:
 3780DEFFNdif=block(ono,xt)-bmin(ono,xt)
 3790:
 3800DEFFNpup
 3810xt=0
 3820ono=cclude
 3830iqr=FNiqr(ono)
 3840IF iqr<=ob(snum,cclude) THEN xt=(iqr/ob(snum,cclude))*1.5
 3850IF iqr>ob(snum,cclude) THEN xt=(ob(snum,cclude)/iqr)*1.5
 3860IF (2^(col(ono)+1) AND coobs(snum,cclude)) THEN xt=xt+.25
 3870IF col(ono)=MCC% THEN xt=xt+.25
 3880=xt
 3890:
 3900DEFFNrt=ASC(MID$(obname$,c,1))
 3910:
 3920DEFFNpera=INT((100/(xax*yax))*((X-1)+(Y-1)*xax))
 3930:
 3940DATA "white",3,"light grey",7,"medium grey",14,"dark grey",28,"very dark grey",240
 3950DATA "extremely dark grey",240,"light black",240,"black",240
 3960DATA "dark blue",8448,"yellow",4608,"green",1024,"red",18432
 3970DATA "light yellow",4608,"dark green",8448
 3980DATA "orange",16384,"light blue",32768

&� SpriteTest - Interquartile range
 � By Dominic Ford - May 1995
:
(maxno=50
2noobsmax%=50
<� q% 256
FIș "Wimp_Initialise",200,&4B534154,"SpriteRecognition" �,task_handle%
P� sp% 256 , err% 256
ZB�block(maxno,256),col(maxno),bmin(maxno,256),CNA$(15),cols(15)
d0�c(15),MCC$(15),MCC(15),CM(15),iw(256),o$(7)
nd�ob(noobsmax%,maxno),prob(noobsmax%,maxno),coobs(noobsmax%,maxno),name$(noobsmax%),mb(noobsmax%)
x�score(noobsmax%)
�!sp%=-1
�sp%!4=0
�sp%!8=0
�sp%!12=100
�
sp%!16=68
�,sp%!20=%00010001000000000011000000101010
�$(sp%+24)="!video"+�0
�#ș "Wimp_CreateIcon",,sp% � ic%
��
�ș "Wimp_Poll",0,q% � act%
�
Ȏ act% �
�� 17,18
� � q%!16=0 �
� 6
 � q%!12=-2 � q%!16=ic% �
  ȗ X,Y,C
")  � C=1 � C=4 � �spritein � � C=2 � �
, �
6�
@� �
J:
T��spritein
^� 7
h�
r	�init
|�analyse
��conclusion
�
�learn
�
�store
�� 12
�ȗ �
�*<Obey$Dir>.!Pallete
��
�:
�
��analyse
�� Y=1 � yax
�� X=1 � xax
��3,3);�pera;"%"
�0ș "OS_SpriteOp",41,,SPR$,X-1,Y-1 � ,,,,,C,T
	bin=0
c(C)=c(C)+1
� bo=1 � mb
&B� col(bo)=C � block(bo,X)>Y-6 � bin=bin+1:oproc=bo:�object_add
0�
:� bin=0 � �object_make
D� bin>1 � �object_join
N�,
X�mcc
b�
l:
v	��mcc
�	CM%=0
�� C=1 � 15
�.� c(C)>=CM% � CM%=c(C):MCC$=CNA$(C):MCC%=C
��
��
�:
���error
�� 12
��:�" at line ";�
�ȗ �
�*<Obey$Dir>.!Pallete
�ș "Wimp_Poll",0,q% � act%
��
�
:

��init
 � � �error
*%ș "OS_ChangeDynamicArea",3,&8000
45�(129);�(141);�(3)"Sprite Recognition by D Ford"
>5�(129);�(141);�(3)"Sprite Recognition by D Ford"
H� 28,0,24,39,3,135
Rptitle$="FILING SYSTEM SELECTION":o$(1)="(R)am":o$(2)="(A)DFS":o$(3)="(S)erver":o$(4)="(C)urrent":�menubar(4)
\� o=3 � �server
f� o=2 � �adfs
p� o=1 � *RAM
z�
�*.
��"Sprite file name";SFILE$
��"     Sprite name";SPR$
��
��'"Please Wait. . ."
�� "SLOAD "+SFILE$
�2ș "OS_SpriteOp",40,,SPR$ � ,,,xax,yax,H,,MDOE
�mb=0
�� C=0 � 15
�� CNA$(C),cols(C)
��
��
�:
��server
�"     Server name";NAME$
�"I AM "+NAME$
$�
.:
8
��adfs
B7�(8)"Insert Graphic Data Disc"''�(14)"Press SPACE"
L� � �(-99)
V	*ADFS
`
*MOUNT
j�
t:
~��object_make
�5� mb=maxno � �'"I am going to need more objects."
�mb=mb+1
�
col(mb)=C
�� Xwr=X-5 � X+5
�� Xwr<0 � Xwr>xax � �:�
�block(mb,Xwr)=Y
�bmin(mb,Xwr)=Y
��
��
�:
���object_add
�� Xwr=X-5 � X+5
� Xwr<0 � Xwr>xax � �:�

block(oproc,Xwr)=Y
+� bmin(oproc,Xwr)=0 � bmin(oproc,Xwr)=Y
�
(�
2:
<��object_join
F� ob=1 � mb
P-� col(ob)=C � block(ob,X)>=Y-5 � �additon
Z�
d� ob=1 � mb
n<� col(ob)=C � ob<>oproc � block(ob,X)>=Y-5 � �getridofit
x�:oproc=-1
��
�:
�
��additon
�� oproc=-1 � oproc=ob
�� xscan=0 � xax-1
�M� block(ob,xscan)>block(oproc,xscan) � block(oproc,xscan)=block(ob,xscan)
�I� bmin(ob,xscan)<bmin(oproc,xscan) � bmin(oproc,xscan)=bmin(ob,xscan)
��
��
�:
���getridofit
�� groi=ob+1 � mb
�� groil=0 � xax-1
)block(groi,groil)=block(groi-1,groil)
'bmin(groi,groil)=bmin(groi-1,groil)
�
"col(groi)=col(groi-1)
,�
6mb=mb-1
@�
J:
T
��getdata
^file=� "<Obey$Dir>.Objects"
h�#file,noobs%
r� obget=0 � noobs%
|!�#file,name$(obget),mb(obget)
��getdataloop
��
�
�#file
��
�:
���getdataloop
�� oblop=1 � mb(obget)
�?�#file,ob(obget,oblop),coobs(obget,oblop),prob(obget,oblop)
��
��
�:
���saveloop
�� oblop=1 � mb(obget)
?�#file,ob(obget,oblop),coobs(obget,oblop),prob(obget,oblop)
�
�
&:
0��savedata
:file=� "<Obey$Dir>.Objects"
D�#file,noobs%
N� obget=0 � noobs%
X!�#file,name$(obget),mb(obget)
b
�saveloop
l�
v
�#file
��
�:
���conclusion
��getdata
��PROCcolcheck
�
�iqrcheck
�smax=9999999:obname$=""
�� obscan=0 � noobs%
�O� smax>score(obscan) � snum=obscan:smax=score(obscan):obname$=name$(obscan)
�'�obscan,name$(obscan),score(obscan)
��
��
�:
��colcheck
� picobs=1 � mb
� cclude=0 � noobs%
 � obscan=1 � mb(cclude)
*d�(coobs(cclude,obscan) � 2^(col(picobs)+1))<>0 � score(cclude)=score(cclude)+prob(cclude,obscan)
4�,,
>�
H:
R��iqrcheck
\� picobs=1 � mb
fiqr=�iqr(picobs)
p� cclude=0 � noobs%
zst=9999999
�� obscan=1 � mb(cclude)
�7scre=�(iqr-ob(cclude,obscan)):�*prob(cclude,obscan)
��iqr,ob(cclude,obscan)
�*� scre<st � score(cclude)=scre:st=scre
��,,
��
�:
���bonds
��"BONDS ON"
�� cclude=1 � mb(snum)
��cclude;"/";mb(snum)
��
�	del=�
	,prob(snum,cclude)=prob(snum,cclude)+�pup
	*� prob(snum,cclude)<=0 � �getrid:del=�
	� del=� � cclude=mb(snum)
	$�
	.�"BONDS OFF"
	8�
	B:
	L��learn
	V�'"Is it a ";obname$;:�ask
	`4� A$="N" � �"What was it then";obnamen$:�rethink
	j(�'"Was it a ";MCC$;" ";obname$;:�ask
	t� A$="N" � �recolour
	~� cclude=1 � mb(snum)
	�,prob(snum,cclude)=prob(snum,cclude)+0.25
	��
	�
�bonds
	��
	�:
	���recolour
	��colourtable
	��
	�A$=�
	�� �(A$)>64 � �(A$)<70
	�MCC%=�(A$)-64
	�MCC$=CNA$(MCC%)
�

:
��colourtable
� 12
(*<Obey$Dir>.!Pallete
2�"What colour was it then:"
<�c=0�15
F� 128:�(c+64);" ";
P� c+128
Z�;"          "
d�
n�
x:
�
��rethink
��
��"Please Wait. . ."'
�
�bonds
�obname$=obnamen$
��
�	err=�
�obname$=" "+obname$+" "
�� c=2 � �(obname$)-1
�S� (�rt<97) � (�rt<>32) � obname$=�obname$,c-1)+�(�rt+32)+�obname$,�(obname$)-c)
�*� (�rt<97 � �rt>122) � �rt<>32 � err=�
��
�$obname$=�obname$,2,�(obname$)-2)
� err=� � �reask
� err=�
� ono=0 � noobs%
")� name$(ono)=obname$ � snum=ono:err=�
,�
6� err=� � �newob
@�
J:
T��reask
^G�'"Object names can only contain letters. Please re-type the name"'
h�"What was it then";obname$
r�
|:
���newob
�noobs%=noobs%+1
�mb(noobs%)=mb
�name$(noobs%)=obname$
�� ono=1 � mb
�ob(noobs%,ono)=�iqr(ono)
�$coobs(noobs%,ono)=cols(col(ono))
�prob(noobs%,ono)=2
��
�snum=noobs%
��
�:
�	��ask
�;" (Y/N) ";
�
A$=�
&� �"YyNn",A$)<>0
03� A$="Y" � A$="y"� �"Yes":A$="Y" � �"No":A$="N"
:�
D:
N��getrid
Xmb(snum)=mb(snum)-1
b� obno=cclude � mb(snum)
l!ob(obno,snum)=ob(obno+1,snum)
v'coobs(obno,snum)=coobs(obno+1,snum)
�%prob(obno,snum)=prob(obno+1,snum)
��
��
�:
���store
�� 12
�*<Obey$Dir>.!Pallete
��"SCHOOSE "+SPR$
�
� &ED,0,0
�5�"Do you want me to learn from this sprite";:�ask
�� A$="N" � �
��"Please wait. . .";
�
�savedata

�

:

��menubar(options)

 �

*�title$'

4� o=1 � options

>�" ";o$(o)

H�

Ro=1:old=-1

\�

f�invert

pA$=�

z!� A$="/" � o<>options � o=o+1

�� A$="'" � o<>1 � o=o-1

�� A$=�(13)

��0,options+2);

��

�:

���invert

�� old<>-1 � �0,old+1);" "

��0,o+1);">"

�	old=o

��

�:

�ݤiqr(ono)

�	dva=0
� xt=0 � xax
iw(xt)=0
�
$� xt=0 � xax-1
.4� block(ono,xt)>bmin(ono,xt) � �addiqr:dva=dva+1
8�
B� iw(�(dva*.25))=0 � =1
L"=iw(�(dva*.75))/iw(�(dva*.25))
V:
`��addiqr
j� xs=0 � dva
t� �dif>=iw(xs) � pos=xs
~�
�� s=pos+1 � dva
�iw(xs-1)=iw(xs)
��
�iw(pos)=�dif
��
�:
�$ݤdif=block(ono,xt)-bmin(ono,xt)
�:
�	ݤpup
�xt=0
�ono=cclude
�iqr=�iqr(ono)
9� iqr<=ob(snum,cclude) � xt=(iqr/ob(snum,cclude))*1.5

8� iqr>ob(snum,cclude) � xt=(ob(snum,cclude)/iqr)*1.5
7� (2^(col(ono)+1) � coobs(snum,cclude)) � xt=xt+.25
� col(ono)=MCC% � xt=xt+.25
(=xt
2:
<ݤrt=�(�obname$,c,1))
F:
P/ݤpera=�((100/(xax*yax))*((X-1)+(Y-1)*xax))
Z:
dS� "white",3,"light grey",7,"medium grey",14,"dark grey",28,"very dark grey",240
n=� "extremely dark grey",240,"light black",240,"black",240
x=� "dark blue",8448,"yellow",4608,"green",1024,"red",18432
�+� "light yellow",4608,"dark green",8448
�'� "orange",16384,"light blue",32768
�
00000000  0d 00 0a 26 f4 20 53 70  72 69 74 65 54 65 73 74  |...&. SpriteTest|
00000010  20 2d 20 49 6e 74 65 72  71 75 61 72 74 69 6c 65  | - Interquartile|
00000020  20 72 61 6e 67 65 0d 00  14 20 f4 20 42 79 20 44  | range... . By D|
00000030  6f 6d 69 6e 69 63 20 46  6f 72 64 20 2d 20 4d 61  |ominic Ford - Ma|
00000040  79 20 31 39 39 35 0d 00  1e 05 3a 0d 00 28 0c 6d  |y 1995....:..(.m|
00000050  61 78 6e 6f 3d 35 30 0d  00 32 10 6e 6f 6f 62 73  |axno=50..2.noobs|
00000060  6d 61 78 25 3d 35 30 0d  00 3c 0c de 20 71 25 20  |max%=50..<.. q% |
00000070  32 35 36 0d 00 46 49 c8  99 20 22 57 69 6d 70 5f  |256..FI.. "Wimp_|
00000080  49 6e 69 74 69 61 6c 69  73 65 22 2c 32 30 30 2c  |Initialise",200,|
00000090  26 34 42 35 33 34 31 35  34 2c 22 53 70 72 69 74  |&4B534154,"Sprit|
000000a0  65 52 65 63 6f 67 6e 69  74 69 6f 6e 22 20 b8 2c  |eRecognition" .,|
000000b0  74 61 73 6b 5f 68 61 6e  64 6c 65 25 0d 00 50 18  |task_handle%..P.|
000000c0  de 20 73 70 25 20 32 35  36 20 2c 20 65 72 72 25  |. sp% 256 , err%|
000000d0  20 32 35 36 0d 00 5a 42  de 62 6c 6f 63 6b 28 6d  | 256..ZB.block(m|
000000e0  61 78 6e 6f 2c 32 35 36  29 2c 63 6f 6c 28 6d 61  |axno,256),col(ma|
000000f0  78 6e 6f 29 2c 62 6d 69  6e 28 6d 61 78 6e 6f 2c  |xno),bmin(maxno,|
00000100  32 35 36 29 2c 43 4e 41  24 28 31 35 29 2c 63 6f  |256),CNA$(15),co|
00000110  6c 73 28 31 35 29 0d 00  64 30 de 63 28 31 35 29  |ls(15)..d0.c(15)|
00000120  2c 4d 43 43 24 28 31 35  29 2c 4d 43 43 28 31 35  |,MCC$(15),MCC(15|
00000130  29 2c 43 4d 28 31 35 29  2c 69 77 28 32 35 36 29  |),CM(15),iw(256)|
00000140  2c 6f 24 28 37 29 0d 00  6e 64 de 6f 62 28 6e 6f  |,o$(7)..nd.ob(no|
00000150  6f 62 73 6d 61 78 25 2c  6d 61 78 6e 6f 29 2c 70  |obsmax%,maxno),p|
00000160  72 6f 62 28 6e 6f 6f 62  73 6d 61 78 25 2c 6d 61  |rob(noobsmax%,ma|
00000170  78 6e 6f 29 2c 63 6f 6f  62 73 28 6e 6f 6f 62 73  |xno),coobs(noobs|
00000180  6d 61 78 25 2c 6d 61 78  6e 6f 29 2c 6e 61 6d 65  |max%,maxno),name|
00000190  24 28 6e 6f 6f 62 73 6d  61 78 25 29 2c 6d 62 28  |$(noobsmax%),mb(|
000001a0  6e 6f 6f 62 73 6d 61 78  25 29 0d 00 78 15 de 73  |noobsmax%)..x..s|
000001b0  63 6f 72 65 28 6e 6f 6f  62 73 6d 61 78 25 29 0d  |core(noobsmax%).|
000001c0  00 82 0b 21 73 70 25 3d  2d 31 0d 00 8c 0b 73 70  |...!sp%=-1....sp|
000001d0  25 21 34 3d 30 0d 00 96  0b 73 70 25 21 38 3d 30  |%!4=0....sp%!8=0|
000001e0  0d 00 a0 0e 73 70 25 21  31 32 3d 31 30 30 0d 00  |....sp%!12=100..|
000001f0  aa 0d 73 70 25 21 31 36  3d 36 38 0d 00 b4 2c 73  |..sp%!16=68...,s|
00000200  70 25 21 32 30 3d 25 30  30 30 31 30 30 30 31 30  |p%!20=%000100010|
00000210  30 30 30 30 30 30 30 30  30 31 31 30 30 30 30 30  |0000000001100000|
00000220  30 31 30 31 30 31 30 0d  00 be 19 24 28 73 70 25  |0101010....$(sp%|
00000230  2b 32 34 29 3d 22 21 76  69 64 65 6f 22 2b bd 30  |+24)="!video"+.0|
00000240  0d 00 c8 23 c8 99 20 22  57 69 6d 70 5f 43 72 65  |...#.. "Wimp_Cre|
00000250  61 74 65 49 63 6f 6e 22  2c 2c 73 70 25 20 b8 20  |ateIcon",,sp% . |
00000260  69 63 25 0d 00 d2 05 f5  0d 00 dc 1e c8 99 20 22  |ic%........... "|
00000270  57 69 6d 70 5f 50 6f 6c  6c 22 2c 30 2c 71 25 20  |Wimp_Poll",0,q% |
00000280  b8 20 61 63 74 25 0d 00  e6 0d c8 8e 20 61 63 74  |. act%...... act|
00000290  25 20 ca 0d 00 f0 0b c9  20 31 37 2c 31 38 0d 00  |% ...... 17,18..|
000002a0  fa 10 20 e7 20 71 25 21  31 36 3d 30 20 e0 0d 01  |.. . q%!16=0 ...|
000002b0  04 07 c9 20 36 0d 01 0e  1d 20 e7 20 71 25 21 31  |... 6.... . q%!1|
000002c0  32 3d 2d 32 20 80 20 71  25 21 31 36 3d 69 63 25  |2=-2 . q%!16=ic%|
000002d0  20 8c 0d 01 18 0e 20 20  c8 97 20 58 2c 59 2c 43  | .....  .. X,Y,C|
000002e0  0d 01 22 29 20 20 e7 20  43 3d 31 20 84 20 43 3d  |..")  . C=1 . C=|
000002f0  34 20 8c 20 f2 73 70 72  69 74 65 69 6e 20 8b 20  |4 . .spritein . |
00000300  e7 20 43 3d 32 20 8c 20  e0 0d 01 2c 06 20 cd 0d  |. C=2 . ...,. ..|
00000310  01 36 05 cb 0d 01 40 07  fd 20 a3 0d 01 4a 05 3a  |.6....@.. ...J.:|
00000320  0d 01 54 0e dd f2 73 70  72 69 74 65 69 6e 0d 01  |..T...spritein..|
00000330  5e 07 eb 20 37 0d 01 68  05 f7 0d 01 72 09 f2 69  |^.. 7..h....r..i|
00000340  6e 69 74 0d 01 7c 0c f2  61 6e 61 6c 79 73 65 0d  |nit..|..analyse.|
00000350  01 86 0f f2 63 6f 6e 63  6c 75 73 69 6f 6e 0d 01  |....conclusion..|
00000360  90 0a f2 6c 65 61 72 6e  0d 01 9a 0a f2 73 74 6f  |...learn.....sto|
00000370  72 65 0d 01 a4 08 eb 20  31 32 0d 01 ae 08 c8 97  |re..... 12......|
00000380  20 ee 0d 01 b8 18 2a 3c  4f 62 65 79 24 44 69 72  | .....*<Obey$Dir|
00000390  3e 2e 21 50 61 6c 6c 65  74 65 0d 01 c2 05 e1 0d  |>.!Pallete......|
000003a0  01 cc 05 3a 0d 01 d6 0d  dd f2 61 6e 61 6c 79 73  |...:......analys|
000003b0  65 0d 01 e0 0f e3 20 59  3d 31 20 b8 20 79 61 78  |e..... Y=1 . yax|
000003c0  0d 01 ea 0f e3 20 58 3d  31 20 b8 20 78 61 78 0d  |..... X=1 . xax.|
000003d0  01 f4 14 f1 8a 33 2c 33  29 3b a4 70 65 72 61 3b  |.....3,3);.pera;|
000003e0  22 25 22 0d 01 fe 30 c8  99 20 22 4f 53 5f 53 70  |"%"...0.. "OS_Sp|
000003f0  72 69 74 65 4f 70 22 2c  34 31 2c 2c 53 50 52 24  |riteOp",41,,SPR$|
00000400  2c 58 2d 31 2c 59 2d 31  20 b8 20 2c 2c 2c 2c 2c  |,X-1,Y-1 . ,,,,,|
00000410  43 2c 54 0d 02 08 09 62  69 6e 3d 30 0d 02 12 0f  |C,T....bin=0....|
00000420  63 28 43 29 3d 63 28 43  29 2b 31 0d 02 1c 0f e3  |c(C)=c(C)+1.....|
00000430  20 62 6f 3d 31 20 b8 20  6d 62 0d 02 26 42 e7 20  | bo=1 . mb..&B. |
00000440  63 6f 6c 28 62 6f 29 3d  43 20 80 20 62 6c 6f 63  |col(bo)=C . bloc|
00000450  6b 28 62 6f 2c 58 29 3e  59 2d 36 20 8c 20 62 69  |k(bo,X)>Y-6 . bi|
00000460  6e 3d 62 69 6e 2b 31 3a  6f 70 72 6f 63 3d 62 6f  |n=bin+1:oproc=bo|
00000470  3a f2 6f 62 6a 65 63 74  5f 61 64 64 0d 02 30 05  |:.object_add..0.|
00000480  ed 0d 02 3a 1a e7 20 62  69 6e 3d 30 20 8c 20 f2  |...:.. bin=0 . .|
00000490  6f 62 6a 65 63 74 5f 6d  61 6b 65 0d 02 44 1a e7  |object_make..D..|
000004a0  20 62 69 6e 3e 31 20 8c  20 f2 6f 62 6a 65 63 74  | bin>1 . .object|
000004b0  5f 6a 6f 69 6e 0d 02 4e  06 ed 2c 0d 02 58 08 f2  |_join..N..,..X..|
000004c0  6d 63 63 0d 02 62 05 e1  0d 02 6c 05 3a 0d 02 76  |mcc..b....l.:..v|
000004d0  09 dd f2 6d 63 63 0d 02  80 09 43 4d 25 3d 30 0d  |...mcc....CM%=0.|
000004e0  02 8a 0e e3 20 43 3d 31  20 b8 20 31 35 0d 02 94  |.... C=1 . 15...|
000004f0  2e e7 20 63 28 43 29 3e  3d 43 4d 25 20 8c 20 43  |.. c(C)>=CM% . C|
00000500  4d 25 3d 63 28 43 29 3a  4d 43 43 24 3d 43 4e 41  |M%=c(C):MCC$=CNA|
00000510  24 28 43 29 3a 4d 43 43  25 3d 43 0d 02 9e 05 ed  |$(C):MCC%=C.....|
00000520  0d 02 a8 05 e1 0d 02 b2  05 3a 0d 02 bc 0b dd f2  |.........:......|
00000530  65 72 72 6f 72 0d 02 c6  08 eb 20 31 32 0d 02 d0  |error..... 12...|
00000540  14 f6 3a f1 22 20 61 74  20 6c 69 6e 65 20 22 3b  |..:." at line ";|
00000550  9e 0d 02 da 08 c8 97 20  ee 0d 02 e4 18 2a 3c 4f  |....... .....*<O|
00000560  62 65 79 24 44 69 72 3e  2e 21 50 61 6c 6c 65 74  |bey$Dir>.!Pallet|
00000570  65 0d 02 ee 1e c8 99 20  22 57 69 6d 70 5f 50 6f  |e...... "Wimp_Po|
00000580  6c 6c 22 2c 30 2c 71 25  20 b8 20 61 63 74 25 0d  |ll",0,q% . act%.|
00000590  02 f8 05 e0 0d 03 02 05  e1 0d 03 0c 05 3a 0d 03  |.............:..|
000005a0  16 0a dd f2 69 6e 69 74  0d 03 20 0e ee 20 85 20  |....init.. .. . |
000005b0  f2 65 72 72 6f 72 0d 03  2a 25 c8 99 20 22 4f 53  |.error..*%.. "OS|
000005c0  5f 43 68 61 6e 67 65 44  79 6e 61 6d 69 63 41 72  |_ChangeDynamicAr|
000005d0  65 61 22 2c 33 2c 26 38  30 30 30 0d 03 34 35 f1  |ea",3,&8000..45.|
000005e0  bd 28 31 32 39 29 3b bd  28 31 34 31 29 3b 89 28  |.(129);.(141);.(|
000005f0  33 29 22 53 70 72 69 74  65 20 52 65 63 6f 67 6e  |3)"Sprite Recogn|
00000600  69 74 69 6f 6e 20 62 79  20 44 20 46 6f 72 64 22  |ition by D Ford"|
00000610  0d 03 3e 35 f1 bd 28 31  32 39 29 3b bd 28 31 34  |..>5..(129);.(14|
00000620  31 29 3b 89 28 33 29 22  53 70 72 69 74 65 20 52  |1);.(3)"Sprite R|
00000630  65 63 6f 67 6e 69 74 69  6f 6e 20 62 79 20 44 20  |ecognition by D |
00000640  46 6f 72 64 22 0d 03 48  16 ef 20 32 38 2c 30 2c  |Ford"..H.. 28,0,|
00000650  32 34 2c 33 39 2c 33 2c  31 33 35 0d 03 52 70 74  |24,39,3,135..Rpt|
00000660  69 74 6c 65 24 3d 22 46  49 4c 49 4e 47 20 53 59  |itle$="FILING SY|
00000670  53 54 45 4d 20 53 45 4c  45 43 54 49 4f 4e 22 3a  |STEM SELECTION":|
00000680  6f 24 28 31 29 3d 22 28  52 29 61 6d 22 3a 6f 24  |o$(1)="(R)am":o$|
00000690  28 32 29 3d 22 28 41 29  44 46 53 22 3a 6f 24 28  |(2)="(A)DFS":o$(|
000006a0  33 29 3d 22 28 53 29 65  72 76 65 72 22 3a 6f 24  |3)="(S)erver":o$|
000006b0  28 34 29 3d 22 28 43 29  75 72 72 65 6e 74 22 3a  |(4)="(C)urrent":|
000006c0  f2 6d 65 6e 75 62 61 72  28 34 29 0d 03 5c 13 e7  |.menubar(4)..\..|
000006d0  20 6f 3d 33 20 8c 20 f2  73 65 72 76 65 72 0d 03  | o=3 . .server..|
000006e0  66 11 e7 20 6f 3d 32 20  8c 20 f2 61 64 66 73 0d  |f.. o=2 . .adfs.|
000006f0  03 70 10 e7 20 6f 3d 31  20 8c 20 2a 52 41 4d 0d  |.p.. o=1 . *RAM.|
00000700  03 7a 05 db 0d 03 84 06  2a 2e 0d 03 8e 1e e8 22  |.z......*......"|
00000710  53 70 72 69 74 65 20 66  69 6c 65 20 6e 61 6d 65  |Sprite file name|
00000720  22 3b 53 46 49 4c 45 24  0d 03 98 1c e8 22 20 20  |";SFILE$....."  |
00000730  20 20 20 53 70 72 69 74  65 20 6e 61 6d 65 22 3b  |   Sprite name";|
00000740  53 50 52 24 0d 03 a2 05  db 0d 03 ac 18 f1 27 22  |SPR$..........'"|
00000750  50 6c 65 61 73 65 20 57  61 69 74 2e 20 2e 20 2e  |Please Wait. . .|
00000760  22 0d 03 b6 15 ff 20 22  53 4c 4f 41 44 20 22 2b  |"..... "SLOAD "+|
00000770  53 46 49 4c 45 24 0d 03  c0 32 c8 99 20 22 4f 53  |SFILE$...2.. "OS|
00000780  5f 53 70 72 69 74 65 4f  70 22 2c 34 30 2c 2c 53  |_SpriteOp",40,,S|
00000790  50 52 24 20 b8 20 2c 2c  2c 78 61 78 2c 79 61 78  |PR$ . ,,,xax,yax|
000007a0  2c 48 2c 2c 4d 44 4f 45  0d 03 ca 08 6d 62 3d 30  |,H,,MDOE....mb=0|
000007b0  0d 03 d4 0e e3 20 43 3d  30 20 b8 20 31 35 0d 03  |..... C=0 . 15..|
000007c0  de 15 f3 20 43 4e 41 24  28 43 29 2c 63 6f 6c 73  |... CNA$(C),cols|
000007d0  28 43 29 0d 03 e8 05 ed  0d 03 f2 05 e1 0d 03 fc  |(C).............|
000007e0  05 3a 0d 04 06 0c dd f2  73 65 72 76 65 72 0d 04  |.:......server..|
000007f0  10 1d e8 22 20 20 20 20  20 53 65 72 76 65 72 20  |..."     Server |
00000800  6e 61 6d 65 22 3b 4e 41  4d 45 24 0d 04 1a 12 ff  |name";NAME$.....|
00000810  22 49 20 41 4d 20 22 2b  4e 41 4d 45 24 0d 04 24  |"I AM "+NAME$..$|
00000820  05 e1 0d 04 2e 05 3a 0d  04 38 0a dd f2 61 64 66  |......:..8...adf|
00000830  73 0d 04 42 37 f1 89 28  38 29 22 49 6e 73 65 72  |s..B7..(8)"Inser|
00000840  74 20 47 72 61 70 68 69  63 20 44 61 74 61 20 44  |t Graphic Data D|
00000850  69 73 63 22 27 27 89 28  31 34 29 22 50 72 65 73  |isc"''.(14)"Pres|
00000860  73 20 53 50 41 43 45 22  0d 04 4c 0e f5 20 fd 20  |s SPACE"..L.. . |
00000870  a6 28 2d 39 39 29 0d 04  56 09 2a 41 44 46 53 0d  |.(-99)..V.*ADFS.|
00000880  04 60 0a 2a 4d 4f 55 4e  54 0d 04 6a 05 e1 0d 04  |.`.*MOUNT..j....|
00000890  74 05 3a 0d 04 7e 11 dd  f2 6f 62 6a 65 63 74 5f  |t.:..~...object_|
000008a0  6d 61 6b 65 0d 04 88 35  e7 20 6d 62 3d 6d 61 78  |make...5. mb=max|
000008b0  6e 6f 20 8c 20 f1 27 22  49 20 61 6d 20 67 6f 69  |no . .'"I am goi|
000008c0  6e 67 20 74 6f 20 6e 65  65 64 20 6d 6f 72 65 20  |ng to need more |
000008d0  6f 62 6a 65 63 74 73 2e  22 0d 04 92 0b 6d 62 3d  |objects."....mb=|
000008e0  6d 62 2b 31 0d 04 9c 0d  63 6f 6c 28 6d 62 29 3d  |mb+1....col(mb)=|
000008f0  43 0d 04 a6 13 e3 20 58  77 72 3d 58 2d 35 20 b8  |C..... Xwr=X-5 .|
00000900  20 58 2b 35 0d 04 b0 1b  e7 20 58 77 72 3c 30 20  | X+5..... Xwr<0 |
00000910  84 20 58 77 72 3e 78 61  78 20 8c 20 ed 3a e1 0d  |. Xwr>xax . .:..|
00000920  04 ba 13 62 6c 6f 63 6b  28 6d 62 2c 58 77 72 29  |...block(mb,Xwr)|
00000930  3d 59 0d 04 c4 12 62 6d  69 6e 28 6d 62 2c 58 77  |=Y....bmin(mb,Xw|
00000940  72 29 3d 59 0d 04 ce 05  ed 0d 04 d8 05 e1 0d 04  |r)=Y............|
00000950  e2 05 3a 0d 04 ec 10 dd  f2 6f 62 6a 65 63 74 5f  |..:......object_|
00000960  61 64 64 0d 04 f6 13 e3  20 58 77 72 3d 58 2d 35  |add..... Xwr=X-5|
00000970  20 b8 20 58 2b 35 0d 05  00 1b e7 20 58 77 72 3c  | . X+5..... Xwr<|
00000980  30 20 84 20 58 77 72 3e  78 61 78 20 8c 20 ed 3a  |0 . Xwr>xax . .:|
00000990  e1 0d 05 0a 16 62 6c 6f  63 6b 28 6f 70 72 6f 63  |.....block(oproc|
000009a0  2c 58 77 72 29 3d 59 0d  05 14 2b e7 20 62 6d 69  |,Xwr)=Y...+. bmi|
000009b0  6e 28 6f 70 72 6f 63 2c  58 77 72 29 3d 30 20 8c  |n(oproc,Xwr)=0 .|
000009c0  20 62 6d 69 6e 28 6f 70  72 6f 63 2c 58 77 72 29  | bmin(oproc,Xwr)|
000009d0  3d 59 0d 05 1e 05 ed 0d  05 28 05 e1 0d 05 32 05  |=Y.......(....2.|
000009e0  3a 0d 05 3c 11 dd f2 6f  62 6a 65 63 74 5f 6a 6f  |:..<...object_jo|
000009f0  69 6e 0d 05 46 0f e3 20  6f 62 3d 31 20 b8 20 6d  |in..F.. ob=1 . m|
00000a00  62 0d 05 50 2d e7 20 63  6f 6c 28 6f 62 29 3d 43  |b..P-. col(ob)=C|
00000a10  20 80 20 62 6c 6f 63 6b  28 6f 62 2c 58 29 3e 3d  | . block(ob,X)>=|
00000a20  59 2d 35 20 8c 20 f2 61  64 64 69 74 6f 6e 0d 05  |Y-5 . .additon..|
00000a30  5a 05 ed 0d 05 64 0f e3  20 6f 62 3d 31 20 b8 20  |Z....d.. ob=1 . |
00000a40  6d 62 0d 05 6e 3c e7 20  63 6f 6c 28 6f 62 29 3d  |mb..n<. col(ob)=|
00000a50  43 20 80 20 6f 62 3c 3e  6f 70 72 6f 63 20 80 20  |C . ob<>oproc . |
00000a60  62 6c 6f 63 6b 28 6f 62  2c 58 29 3e 3d 59 2d 35  |block(ob,X)>=Y-5|
00000a70  20 8c 20 f2 67 65 74 72  69 64 6f 66 69 74 0d 05  | . .getridofit..|
00000a80  78 0e ed 3a 6f 70 72 6f  63 3d 2d 31 0d 05 82 05  |x..:oproc=-1....|
00000a90  e1 0d 05 8c 05 3a 0d 05  96 0d dd f2 61 64 64 69  |.....:......addi|
00000aa0  74 6f 6e 0d 05 a0 19 e7  20 6f 70 72 6f 63 3d 2d  |ton..... oproc=-|
00000ab0  31 20 8c 20 6f 70 72 6f  63 3d 6f 62 0d 05 aa 15  |1 . oproc=ob....|
00000ac0  e3 20 78 73 63 61 6e 3d  30 20 b8 20 78 61 78 2d  |. xscan=0 . xax-|
00000ad0  31 0d 05 b4 4d e7 20 62  6c 6f 63 6b 28 6f 62 2c  |1...M. block(ob,|
00000ae0  78 73 63 61 6e 29 3e 62  6c 6f 63 6b 28 6f 70 72  |xscan)>block(opr|
00000af0  6f 63 2c 78 73 63 61 6e  29 20 8c 20 62 6c 6f 63  |oc,xscan) . bloc|
00000b00  6b 28 6f 70 72 6f 63 2c  78 73 63 61 6e 29 3d 62  |k(oproc,xscan)=b|
00000b10  6c 6f 63 6b 28 6f 62 2c  78 73 63 61 6e 29 0d 05  |lock(ob,xscan)..|
00000b20  be 49 e7 20 62 6d 69 6e  28 6f 62 2c 78 73 63 61  |.I. bmin(ob,xsca|
00000b30  6e 29 3c 62 6d 69 6e 28  6f 70 72 6f 63 2c 78 73  |n)<bmin(oproc,xs|
00000b40  63 61 6e 29 20 8c 20 62  6d 69 6e 28 6f 70 72 6f  |can) . bmin(opro|
00000b50  63 2c 78 73 63 61 6e 29  3d 62 6d 69 6e 28 6f 62  |c,xscan)=bmin(ob|
00000b60  2c 78 73 63 61 6e 29 0d  05 c8 05 ed 0d 05 d2 05  |,xscan).........|
00000b70  e1 0d 05 dc 05 3a 0d 05  e6 10 dd f2 67 65 74 72  |.....:......getr|
00000b80  69 64 6f 66 69 74 0d 05  f0 14 e3 20 67 72 6f 69  |idofit..... groi|
00000b90  3d 6f 62 2b 31 20 b8 20  6d 62 0d 05 fa 15 e3 20  |=ob+1 . mb..... |
00000ba0  67 72 6f 69 6c 3d 30 20  b8 20 78 61 78 2d 31 0d  |groil=0 . xax-1.|
00000bb0  06 04 29 62 6c 6f 63 6b  28 67 72 6f 69 2c 67 72  |..)block(groi,gr|
00000bc0  6f 69 6c 29 3d 62 6c 6f  63 6b 28 67 72 6f 69 2d  |oil)=block(groi-|
00000bd0  31 2c 67 72 6f 69 6c 29  0d 06 0e 27 62 6d 69 6e  |1,groil)...'bmin|
00000be0  28 67 72 6f 69 2c 67 72  6f 69 6c 29 3d 62 6d 69  |(groi,groil)=bmi|
00000bf0  6e 28 67 72 6f 69 2d 31  2c 67 72 6f 69 6c 29 0d  |n(groi-1,groil).|
00000c00  06 18 05 ed 0d 06 22 19  63 6f 6c 28 67 72 6f 69  |......".col(groi|
00000c10  29 3d 63 6f 6c 28 67 72  6f 69 2d 31 29 0d 06 2c  |)=col(groi-1)..,|
00000c20  05 ed 0d 06 36 0b 6d 62  3d 6d 62 2d 31 0d 06 40  |....6.mb=mb-1..@|
00000c30  05 e1 0d 06 4a 05 3a 0d  06 54 0d dd f2 67 65 74  |....J.:..T...get|
00000c40  64 61 74 61 0d 06 5e 1f  66 69 6c 65 3d 8e 20 22  |data..^.file=. "|
00000c50  3c 4f 62 65 79 24 44 69  72 3e 2e 4f 62 6a 65 63  |<Obey$Dir>.Objec|
00000c60  74 73 22 0d 06 68 11 e8  23 66 69 6c 65 2c 6e 6f  |ts"..h..#file,no|
00000c70  6f 62 73 25 0d 06 72 16  e3 20 6f 62 67 65 74 3d  |obs%..r.. obget=|
00000c80  30 20 b8 20 6e 6f 6f 62  73 25 0d 06 7c 21 e8 23  |0 . noobs%..|!.#|
00000c90  66 69 6c 65 2c 6e 61 6d  65 24 28 6f 62 67 65 74  |file,name$(obget|
00000ca0  29 2c 6d 62 28 6f 62 67  65 74 29 0d 06 86 10 f2  |),mb(obget).....|
00000cb0  67 65 74 64 61 74 61 6c  6f 6f 70 0d 06 90 05 ed  |getdataloop.....|
00000cc0  0d 06 9a 0a d9 23 66 69  6c 65 0d 06 a4 05 e1 0d  |.....#file......|
00000cd0  06 ae 05 3a 0d 06 b8 11  dd f2 67 65 74 64 61 74  |...:......getdat|
00000ce0  61 6c 6f 6f 70 0d 06 c2  19 e3 20 6f 62 6c 6f 70  |aloop..... oblop|
00000cf0  3d 31 20 b8 20 6d 62 28  6f 62 67 65 74 29 0d 06  |=1 . mb(obget)..|
00000d00  cc 3f e8 23 66 69 6c 65  2c 6f 62 28 6f 62 67 65  |.?.#file,ob(obge|
00000d10  74 2c 6f 62 6c 6f 70 29  2c 63 6f 6f 62 73 28 6f  |t,oblop),coobs(o|
00000d20  62 67 65 74 2c 6f 62 6c  6f 70 29 2c 70 72 6f 62  |bget,oblop),prob|
00000d30  28 6f 62 67 65 74 2c 6f  62 6c 6f 70 29 0d 06 d6  |(obget,oblop)...|
00000d40  05 ed 0d 06 e0 05 e1 0d  06 ea 05 3a 0d 06 f4 0e  |...........:....|
00000d50  dd f2 73 61 76 65 6c 6f  6f 70 0d 06 fe 19 e3 20  |..saveloop..... |
00000d60  6f 62 6c 6f 70 3d 31 20  b8 20 6d 62 28 6f 62 67  |oblop=1 . mb(obg|
00000d70  65 74 29 0d 07 08 3f f1  23 66 69 6c 65 2c 6f 62  |et)...?.#file,ob|
00000d80  28 6f 62 67 65 74 2c 6f  62 6c 6f 70 29 2c 63 6f  |(obget,oblop),co|
00000d90  6f 62 73 28 6f 62 67 65  74 2c 6f 62 6c 6f 70 29  |obs(obget,oblop)|
00000da0  2c 70 72 6f 62 28 6f 62  67 65 74 2c 6f 62 6c 6f  |,prob(obget,oblo|
00000db0  70 29 0d 07 12 05 ed 0d  07 1c 05 e1 0d 07 26 05  |p)............&.|
00000dc0  3a 0d 07 30 0e dd f2 73  61 76 65 64 61 74 61 0d  |:..0...savedata.|
00000dd0  07 3a 1f 66 69 6c 65 3d  ae 20 22 3c 4f 62 65 79  |.:.file=. "<Obey|
00000de0  24 44 69 72 3e 2e 4f 62  6a 65 63 74 73 22 0d 07  |$Dir>.Objects"..|
00000df0  44 11 f1 23 66 69 6c 65  2c 6e 6f 6f 62 73 25 0d  |D..#file,noobs%.|
00000e00  07 4e 16 e3 20 6f 62 67  65 74 3d 30 20 b8 20 6e  |.N.. obget=0 . n|
00000e10  6f 6f 62 73 25 0d 07 58  21 f1 23 66 69 6c 65 2c  |oobs%..X!.#file,|
00000e20  6e 61 6d 65 24 28 6f 62  67 65 74 29 2c 6d 62 28  |name$(obget),mb(|
00000e30  6f 62 67 65 74 29 0d 07  62 0d f2 73 61 76 65 6c  |obget)..b..savel|
00000e40  6f 6f 70 0d 07 6c 05 ed  0d 07 76 0a d9 23 66 69  |oop..l....v..#fi|
00000e50  6c 65 0d 07 80 05 e1 0d  07 8a 05 3a 0d 07 94 10  |le.........:....|
00000e60  dd f2 63 6f 6e 63 6c 75  73 69 6f 6e 0d 07 9e 0c  |..conclusion....|
00000e70  f2 67 65 74 64 61 74 61  0d 07 a8 11 f4 50 52 4f  |.getdata.....PRO|
00000e80  43 63 6f 6c 63 68 65 63  6b 0d 07 b2 0d f2 69 71  |Ccolcheck.....iq|
00000e90  72 63 68 65 63 6b 0d 07  bc 1b 73 6d 61 78 3d 39  |rcheck....smax=9|
00000ea0  39 39 39 39 39 39 3a 6f  62 6e 61 6d 65 24 3d 22  |999999:obname$="|
00000eb0  22 0d 07 c6 17 e3 20 6f  62 73 63 61 6e 3d 30 20  |"..... obscan=0 |
00000ec0  b8 20 6e 6f 6f 62 73 25  0d 07 d0 4f e7 20 73 6d  |. noobs%...O. sm|
00000ed0  61 78 3e 73 63 6f 72 65  28 6f 62 73 63 61 6e 29  |ax>score(obscan)|
00000ee0  20 8c 20 73 6e 75 6d 3d  6f 62 73 63 61 6e 3a 73  | . snum=obscan:s|
00000ef0  6d 61 78 3d 73 63 6f 72  65 28 6f 62 73 63 61 6e  |max=score(obscan|
00000f00  29 3a 6f 62 6e 61 6d 65  24 3d 6e 61 6d 65 24 28  |):obname$=name$(|
00000f10  6f 62 73 63 61 6e 29 0d  07 da 27 f1 6f 62 73 63  |obscan)...'.obsc|
00000f20  61 6e 2c 6e 61 6d 65 24  28 6f 62 73 63 61 6e 29  |an,name$(obscan)|
00000f30  2c 73 63 6f 72 65 28 6f  62 73 63 61 6e 29 0d 07  |,score(obscan)..|
00000f40  e4 05 ed 0d 07 ee 05 e1  0d 07 f8 05 3a 0d 08 02  |............:...|
00000f50  0e dd f2 63 6f 6c 63 68  65 63 6b 0d 08 0c 13 e3  |...colcheck.....|
00000f60  20 70 69 63 6f 62 73 3d  31 20 b8 20 6d 62 0d 08  | picobs=1 . mb..|
00000f70  16 17 e3 20 63 63 6c 75  64 65 3d 30 20 b8 20 6e  |... cclude=0 . n|
00000f80  6f 6f 62 73 25 0d 08 20  1b e3 20 6f 62 73 63 61  |oobs%.. .. obsca|
00000f90  6e 3d 31 20 b8 20 6d 62  28 63 63 6c 75 64 65 29  |n=1 . mb(cclude)|
00000fa0  0d 08 2a 64 e7 28 63 6f  6f 62 73 28 63 63 6c 75  |..*d.(coobs(cclu|
00000fb0  64 65 2c 6f 62 73 63 61  6e 29 20 80 20 32 5e 28  |de,obscan) . 2^(|
00000fc0  63 6f 6c 28 70 69 63 6f  62 73 29 2b 31 29 29 3c  |col(picobs)+1))<|
00000fd0  3e 30 20 8c 20 73 63 6f  72 65 28 63 63 6c 75 64  |>0 . score(cclud|
00000fe0  65 29 3d 73 63 6f 72 65  28 63 63 6c 75 64 65 29  |e)=score(cclude)|
00000ff0  2b 70 72 6f 62 28 63 63  6c 75 64 65 2c 6f 62 73  |+prob(cclude,obs|
00001000  63 61 6e 29 0d 08 34 07  ed 2c 2c 0d 08 3e 05 e1  |can)..4..,,..>..|
00001010  0d 08 48 05 3a 0d 08 52  0e dd f2 69 71 72 63 68  |..H.:..R...iqrch|
00001020  65 63 6b 0d 08 5c 13 e3  20 70 69 63 6f 62 73 3d  |eck..\.. picobs=|
00001030  31 20 b8 20 6d 62 0d 08  66 14 69 71 72 3d a4 69  |1 . mb..f.iqr=.i|
00001040  71 72 28 70 69 63 6f 62  73 29 0d 08 70 17 e3 20  |qr(picobs)..p.. |
00001050  63 63 6c 75 64 65 3d 30  20 b8 20 6e 6f 6f 62 73  |cclude=0 . noobs|
00001060  25 0d 08 7a 0e 73 74 3d  39 39 39 39 39 39 39 0d  |%..z.st=9999999.|
00001070  08 84 1b e3 20 6f 62 73  63 61 6e 3d 31 20 b8 20  |.... obscan=1 . |
00001080  6d 62 28 63 63 6c 75 64  65 29 0d 08 8e 37 73 63  |mb(cclude)...7sc|
00001090  72 65 3d 94 28 69 71 72  2d 6f 62 28 63 63 6c 75  |re=.(iqr-ob(cclu|
000010a0  64 65 2c 6f 62 73 63 61  6e 29 29 3a f4 2a 70 72  |de,obscan)):.*pr|
000010b0  6f 62 28 63 63 6c 75 64  65 2c 6f 62 73 63 61 6e  |ob(cclude,obscan|
000010c0  29 0d 08 98 1a f1 69 71  72 2c 6f 62 28 63 63 6c  |).....iqr,ob(ccl|
000010d0  75 64 65 2c 6f 62 73 63  61 6e 29 0d 08 a2 2a e7  |ude,obscan)...*.|
000010e0  20 73 63 72 65 3c 73 74  20 8c 20 73 63 6f 72 65  | scre<st . score|
000010f0  28 63 63 6c 75 64 65 29  3d 73 63 72 65 3a 73 74  |(cclude)=scre:st|
00001100  3d 73 63 72 65 0d 08 ac  07 ed 2c 2c 0d 08 b6 05  |=scre.....,,....|
00001110  e1 0d 08 c0 05 3a 0d 08  ca 0b dd f2 62 6f 6e 64  |.....:......bond|
00001120  73 0d 08 d4 0f f1 22 42  4f 4e 44 53 20 4f 4e 22  |s....."BONDS ON"|
00001130  0d 08 de 19 e3 20 63 63  6c 75 64 65 3d 31 20 b8  |..... cclude=1 .|
00001140  20 6d 62 28 73 6e 75 6d  29 0d 08 e8 18 f1 63 63  | mb(snum).....cc|
00001150  6c 75 64 65 3b 22 2f 22  3b 6d 62 28 73 6e 75 6d  |lude;"/";mb(snum|
00001160  29 0d 08 f2 05 f5 0d 08  fc 09 64 65 6c 3d a3 0d  |).........del=..|
00001170  09 06 2c 70 72 6f 62 28  73 6e 75 6d 2c 63 63 6c  |..,prob(snum,ccl|
00001180  75 64 65 29 3d 70 72 6f  62 28 73 6e 75 6d 2c 63  |ude)=prob(snum,c|
00001190  63 6c 75 64 65 29 2b a4  70 75 70 0d 09 10 2a e7  |clude)+.pup...*.|
000011a0  20 70 72 6f 62 28 73 6e  75 6d 2c 63 63 6c 75 64  | prob(snum,cclud|
000011b0  65 29 3c 3d 30 20 8c 20  f2 67 65 74 72 69 64 3a  |e)<=0 . .getrid:|
000011c0  64 65 6c 3d b9 0d 09 1a  1d fd 20 64 65 6c 3d a3  |del=...... del=.|
000011d0  20 84 20 63 63 6c 75 64  65 3d 6d 62 28 73 6e 75  | . cclude=mb(snu|
000011e0  6d 29 0d 09 24 05 ed 0d  09 2e 10 f1 22 42 4f 4e  |m)..$......."BON|
000011f0  44 53 20 4f 46 46 22 0d  09 38 05 e1 0d 09 42 05  |DS OFF"..8....B.|
00001200  3a 0d 09 4c 0b dd f2 6c  65 61 72 6e 0d 09 56 1e  |:..L...learn..V.|
00001210  f1 27 22 49 73 20 69 74  20 61 20 22 3b 6f 62 6e  |.'"Is it a ";obn|
00001220  61 6d 65 24 3b 3a f2 61  73 6b 0d 09 60 34 e7 20  |ame$;:.ask..`4. |
00001230  41 24 3d 22 4e 22 20 8c  20 e8 22 57 68 61 74 20  |A$="N" . ."What |
00001240  77 61 73 20 69 74 20 74  68 65 6e 22 3b 6f 62 6e  |was it then";obn|
00001250  61 6d 65 6e 24 3a f2 72  65 74 68 69 6e 6b 0d 09  |amen$:.rethink..|
00001260  6a 28 f1 27 22 57 61 73  20 69 74 20 61 20 22 3b  |j(.'"Was it a ";|
00001270  4d 43 43 24 3b 22 20 22  3b 6f 62 6e 61 6d 65 24  |MCC$;" ";obname$|
00001280  3b 3a f2 61 73 6b 0d 09  74 18 e7 20 41 24 3d 22  |;:.ask..t.. A$="|
00001290  4e 22 20 8c 20 f2 72 65  63 6f 6c 6f 75 72 0d 09  |N" . .recolour..|
000012a0  7e 19 e3 20 63 63 6c 75  64 65 3d 31 20 b8 20 6d  |~.. cclude=1 . m|
000012b0  62 28 73 6e 75 6d 29 0d  09 88 2c 70 72 6f 62 28  |b(snum)...,prob(|
000012c0  73 6e 75 6d 2c 63 63 6c  75 64 65 29 3d 70 72 6f  |snum,cclude)=pro|
000012d0  62 28 73 6e 75 6d 2c 63  63 6c 75 64 65 29 2b 30  |b(snum,cclude)+0|
000012e0  2e 32 35 0d 09 92 05 ed  0d 09 9c 0a f2 62 6f 6e  |.25..........bon|
000012f0  64 73 0d 09 a6 05 e1 0d  09 b0 05 3a 0d 09 ba 0e  |ds.........:....|
00001300  dd f2 72 65 63 6f 6c 6f  75 72 0d 09 c4 10 f2 63  |..recolour.....c|
00001310  6f 6c 6f 75 72 74 61 62  6c 65 0d 09 ce 05 f5 0d  |olourtable......|
00001320  09 d8 08 41 24 3d be 0d  09 e2 19 fd 20 97 28 41  |...A$=...... .(A|
00001330  24 29 3e 36 34 20 80 20  97 28 41 24 29 3c 37 30  |$)>64 . .(A$)<70|
00001340  0d 09 ec 11 4d 43 43 25  3d 97 28 41 24 29 2d 36  |....MCC%=.(A$)-6|
00001350  34 0d 09 f6 13 4d 43 43  24 3d 43 4e 41 24 28 4d  |4....MCC$=CNA$(M|
00001360  43 43 25 29 0d 0a 00 05  e1 0d 0a 0a 05 3a 0d 0a  |CC%).........:..|
00001370  14 11 dd f2 63 6f 6c 6f  75 72 74 61 62 6c 65 0d  |....colourtable.|
00001380  0a 1e 08 eb 20 31 32 0d  0a 28 18 2a 3c 4f 62 65  |.... 12..(.*<Obe|
00001390  79 24 44 69 72 3e 2e 21  50 61 6c 6c 65 74 65 0d  |y$Dir>.!Pallete.|
000013a0  0a 32 1f f1 22 57 68 61  74 20 63 6f 6c 6f 75 72  |.2.."What colour|
000013b0  20 77 61 73 20 69 74 20  74 68 65 6e 3a 22 0d 0a  | was it then:"..|
000013c0  3c 0b e3 63 3d 30 b8 31  35 0d 0a 46 17 fb 20 31  |<..c=0.15..F.. 1|
000013d0  32 38 3a f1 bd 28 63 2b  36 34 29 3b 22 20 22 3b  |28:..(c+64);" ";|
000013e0  0d 0a 50 0b fb 20 63 2b  31 32 38 0d 0a 5a 12 f1  |..P.. c+128..Z..|
000013f0  3b 22 20 20 20 20 20 20  20 20 20 20 22 0d 0a 64  |;"          "..d|
00001400  05 ed 0d 0a 6e 05 e1 0d  0a 78 05 3a 0d 0a 82 0d  |....n....x.:....|
00001410  dd f2 72 65 74 68 69 6e  6b 0d 0a 8c 05 db 0d 0a  |..rethink.......|
00001420  96 18 f1 22 50 6c 65 61  73 65 20 57 61 69 74 2e  |..."Please Wait.|
00001430  20 2e 20 2e 22 27 0d 0a  a0 0a f2 62 6f 6e 64 73  | . ."'.....bonds|
00001440  0d 0a aa 14 6f 62 6e 61  6d 65 24 3d 6f 62 6e 61  |....obname$=obna|
00001450  6d 65 6e 24 0d 0a b4 05  f5 0d 0a be 09 65 72 72  |men$.........err|
00001460  3d a3 0d 0a c8 1b 6f 62  6e 61 6d 65 24 3d 22 20  |=.....obname$=" |
00001470  22 2b 6f 62 6e 61 6d 65  24 2b 22 20 22 0d 0a d2  |"+obname$+" "...|
00001480  18 e3 20 63 3d 32 20 b8  20 a9 28 6f 62 6e 61 6d  |.. c=2 . .(obnam|
00001490  65 24 29 2d 31 0d 0a dc  53 e7 20 28 a4 72 74 3c  |e$)-1...S. (.rt<|
000014a0  39 37 29 20 80 20 28 a4  72 74 3c 3e 33 32 29 20  |97) . (.rt<>32) |
000014b0  8c 20 6f 62 6e 61 6d 65  24 3d c0 6f 62 6e 61 6d  |. obname$=.obnam|
000014c0  65 24 2c 63 2d 31 29 2b  bd 28 a4 72 74 2b 33 32  |e$,c-1)+.(.rt+32|
000014d0  29 2b c2 6f 62 6e 61 6d  65 24 2c a9 28 6f 62 6e  |)+.obname$,.(obn|
000014e0  61 6d 65 24 29 2d 63 29  0d 0a e6 2a e7 20 28 a4  |ame$)-c)...*. (.|
000014f0  72 74 3c 39 37 20 84 20  a4 72 74 3e 31 32 32 29  |rt<97 . .rt>122)|
00001500  20 80 20 a4 72 74 3c 3e  33 32 20 8c 20 65 72 72  | . .rt<>32 . err|
00001510  3d b9 0d 0a f0 05 ed 0d  0a fa 24 6f 62 6e 61 6d  |=.........$obnam|
00001520  65 24 3d c1 6f 62 6e 61  6d 65 24 2c 32 2c a9 28  |e$=.obname$,2,.(|
00001530  6f 62 6e 61 6d 65 24 29  2d 32 29 0d 0b 04 14 e7  |obname$)-2).....|
00001540  20 65 72 72 3d b9 20 8c  20 f2 72 65 61 73 6b 0d  | err=. . .reask.|
00001550  0b 0e 0b fd 20 65 72 72  3d a3 0d 0b 18 14 e3 20  |.... err=...... |
00001560  6f 6e 6f 3d 30 20 b8 20  6e 6f 6f 62 73 25 0d 0b  |ono=0 . noobs%..|
00001570  22 29 e7 20 6e 61 6d 65  24 28 6f 6e 6f 29 3d 6f  |"). name$(ono)=o|
00001580  62 6e 61 6d 65 24 20 8c  20 73 6e 75 6d 3d 6f 6e  |bname$ . snum=on|
00001590  6f 3a 65 72 72 3d b9 0d  0b 2c 05 ed 0d 0b 36 14  |o:err=...,....6.|
000015a0  e7 20 65 72 72 3d a3 20  8c 20 f2 6e 65 77 6f 62  |. err=. . .newob|
000015b0  0d 0b 40 05 e1 0d 0b 4a  05 3a 0d 0b 54 0b dd f2  |..@....J.:..T...|
000015c0  72 65 61 73 6b 0d 0b 5e  47 f1 27 22 4f 62 6a 65  |reask..^G.'"Obje|
000015d0  63 74 20 6e 61 6d 65 73  20 63 61 6e 20 6f 6e 6c  |ct names can onl|
000015e0  79 20 63 6f 6e 74 61 69  6e 20 6c 65 74 74 65 72  |y contain letter|
000015f0  73 2e 20 50 6c 65 61 73  65 20 72 65 2d 74 79 70  |s. Please re-typ|
00001600  65 20 74 68 65 20 6e 61  6d 65 22 27 0d 0b 68 1f  |e the name"'..h.|
00001610  e8 22 57 68 61 74 20 77  61 73 20 69 74 20 74 68  |."What was it th|
00001620  65 6e 22 3b 6f 62 6e 61  6d 65 24 0d 0b 72 05 e1  |en";obname$..r..|
00001630  0d 0b 7c 05 3a 0d 0b 86  0b dd f2 6e 65 77 6f 62  |..|.:......newob|
00001640  0d 0b 90 13 6e 6f 6f 62  73 25 3d 6e 6f 6f 62 73  |....noobs%=noobs|
00001650  25 2b 31 0d 0b 9a 11 6d  62 28 6e 6f 6f 62 73 25  |%+1....mb(noobs%|
00001660  29 3d 6d 62 0d 0b a4 19  6e 61 6d 65 24 28 6e 6f  |)=mb....name$(no|
00001670  6f 62 73 25 29 3d 6f 62  6e 61 6d 65 24 0d 0b ae  |obs%)=obname$...|
00001680  10 e3 20 6f 6e 6f 3d 31  20 b8 20 6d 62 0d 0b b8  |.. ono=1 . mb...|
00001690  1c 6f 62 28 6e 6f 6f 62  73 25 2c 6f 6e 6f 29 3d  |.ob(noobs%,ono)=|
000016a0  a4 69 71 72 28 6f 6e 6f  29 0d 0b c2 24 63 6f 6f  |.iqr(ono)...$coo|
000016b0  62 73 28 6e 6f 6f 62 73  25 2c 6f 6e 6f 29 3d 63  |bs(noobs%,ono)=c|
000016c0  6f 6c 73 28 63 6f 6c 28  6f 6e 6f 29 29 0d 0b cc  |ols(col(ono))...|
000016d0  16 70 72 6f 62 28 6e 6f  6f 62 73 25 2c 6f 6e 6f  |.prob(noobs%,ono|
000016e0  29 3d 32 0d 0b d6 05 ed  0d 0b e0 0f 73 6e 75 6d  |)=2.........snum|
000016f0  3d 6e 6f 6f 62 73 25 0d  0b ea 05 e1 0d 0b f4 05  |=noobs%.........|
00001700  3a 0d 0b fe 09 dd f2 61  73 6b 0d 0c 08 10 f1 3b  |:......ask.....;|
00001710  22 20 28 59 2f 4e 29 20  22 3b 0d 0c 12 05 f5 0d  |" (Y/N) ";......|
00001720  0c 1c 08 41 24 3d be 0d  0c 26 14 fd 20 a7 22 59  |...A$=...&.. ."Y|
00001730  79 4e 6e 22 2c 41 24 29  3c 3e 30 0d 0c 30 33 e7  |yNn",A$)<>0..03.|
00001740  20 41 24 3d 22 59 22 20  84 20 41 24 3d 22 79 22  | A$="Y" . A$="y"|
00001750  8c 20 f1 22 59 65 73 22  3a 41 24 3d 22 59 22 20  |. ."Yes":A$="Y" |
00001760  8b 20 f1 22 4e 6f 22 3a  41 24 3d 22 4e 22 0d 0c  |. ."No":A$="N"..|
00001770  3a 05 e1 0d 0c 44 05 3a  0d 0c 4e 0c dd f2 67 65  |:....D.:..N...ge|
00001780  74 72 69 64 0d 0c 58 17  6d 62 28 73 6e 75 6d 29  |trid..X.mb(snum)|
00001790  3d 6d 62 28 73 6e 75 6d  29 2d 31 0d 0c 62 1c e3  |=mb(snum)-1..b..|
000017a0  20 6f 62 6e 6f 3d 63 63  6c 75 64 65 20 b8 20 6d  | obno=cclude . m|
000017b0  62 28 73 6e 75 6d 29 0d  0c 6c 21 6f 62 28 6f 62  |b(snum)..l!ob(ob|
000017c0  6e 6f 2c 73 6e 75 6d 29  3d 6f 62 28 6f 62 6e 6f  |no,snum)=ob(obno|
000017d0  2b 31 2c 73 6e 75 6d 29  0d 0c 76 27 63 6f 6f 62  |+1,snum)..v'coob|
000017e0  73 28 6f 62 6e 6f 2c 73  6e 75 6d 29 3d 63 6f 6f  |s(obno,snum)=coo|
000017f0  62 73 28 6f 62 6e 6f 2b  31 2c 73 6e 75 6d 29 0d  |bs(obno+1,snum).|
00001800  0c 80 25 70 72 6f 62 28  6f 62 6e 6f 2c 73 6e 75  |..%prob(obno,snu|
00001810  6d 29 3d 70 72 6f 62 28  6f 62 6e 6f 2b 31 2c 73  |m)=prob(obno+1,s|
00001820  6e 75 6d 29 0d 0c 8a 05  ed 0d 0c 94 05 e1 0d 0c  |num)............|
00001830  9e 05 3a 0d 0c a8 0b dd  f2 73 74 6f 72 65 0d 0c  |..:......store..|
00001840  b2 08 eb 20 31 32 0d 0c  bc 18 2a 3c 4f 62 65 79  |... 12....*<Obey|
00001850  24 44 69 72 3e 2e 21 50  61 6c 6c 65 74 65 0d 0c  |$Dir>.!Pallete..|
00001860  c6 14 ff 22 53 43 48 4f  4f 53 45 20 22 2b 53 50  |..."SCHOOSE "+SP|
00001870  52 24 0d 0c d0 0d f0 20  26 45 44 2c 30 2c 30 0d  |R$..... &ED,0,0.|
00001880  0c da 35 f1 22 44 6f 20  79 6f 75 20 77 61 6e 74  |..5."Do you want|
00001890  20 6d 65 20 74 6f 20 6c  65 61 72 6e 20 66 72 6f  | me to learn fro|
000018a0  6d 20 74 68 69 73 20 73  70 72 69 74 65 22 3b 3a  |m this sprite";:|
000018b0  f2 61 73 6b 0d 0c e4 10  e7 20 41 24 3d 22 4e 22  |.ask..... A$="N"|
000018c0  20 8c 20 e1 0d 0c ee 18  f1 22 50 6c 65 61 73 65  | . ......"Please|
000018d0  20 77 61 69 74 2e 20 2e  20 2e 22 3b 0d 0c f8 0d  | wait. . .";....|
000018e0  f2 73 61 76 65 64 61 74  61 0d 0d 02 05 e1 0d 0d  |.savedata.......|
000018f0  0c 05 3a 0d 0d 16 16 dd  f2 6d 65 6e 75 62 61 72  |..:......menubar|
00001900  28 6f 70 74 69 6f 6e 73  29 0d 0d 20 05 db 0d 0d  |(options).. ....|
00001910  2a 0c f1 74 69 74 6c 65  24 27 0d 0d 34 13 e3 20  |*..title$'..4.. |
00001920  6f 3d 31 20 b8 20 6f 70  74 69 6f 6e 73 0d 0d 3e  |o=1 . options..>|
00001930  0e f1 22 20 22 3b 6f 24  28 6f 29 0d 0d 48 05 ed  |.." ";o$(o)..H..|
00001940  0d 0d 52 0e 6f 3d 31 3a  6f 6c 64 3d 2d 31 0d 0d  |..R.o=1:old=-1..|
00001950  5c 05 f5 0d 0d 66 0b f2  69 6e 76 65 72 74 0d 0d  |\....f..invert..|
00001960  70 08 41 24 3d be 0d 0d  7a 21 e7 20 41 24 3d 22  |p.A$=...z!. A$="|
00001970  2f 22 20 80 20 6f 3c 3e  6f 70 74 69 6f 6e 73 20  |/" . o<>options |
00001980  8c 20 6f 3d 6f 2b 31 0d  0d 84 1b e7 20 41 24 3d  |. o=o+1..... A$=|
00001990  22 27 22 20 80 20 6f 3c  3e 31 20 8c 20 6f 3d 6f  |"'" . o<>1 . o=o|
000019a0  2d 31 0d 0d 8e 0e fd 20  41 24 3d bd 28 31 33 29  |-1..... A$=.(13)|
000019b0  0d 0d 98 13 f1 8a 30 2c  6f 70 74 69 6f 6e 73 2b  |......0,options+|
000019c0  32 29 3b 0d 0d a2 05 e1  0d 0d ac 05 3a 0d 0d b6  |2);.........:...|
000019d0  0c dd f2 69 6e 76 65 72  74 0d 0d c0 1e e7 20 6f  |...invert..... o|
000019e0  6c 64 3c 3e 2d 31 20 8c  20 f1 8a 30 2c 6f 6c 64  |ld<>-1 . ..0,old|
000019f0  2b 31 29 3b 22 20 22 0d  0d ca 10 f1 8a 30 2c 6f  |+1);" "......0,o|
00001a00  2b 31 29 3b 22 3e 22 0d  0d d4 09 6f 6c 64 3d 6f  |+1);">"....old=o|
00001a10  0d 0d de 05 e1 0d 0d e8  05 3a 0d 0d f2 0e dd a4  |.........:......|
00001a20  69 71 72 28 6f 6e 6f 29  0d 0d fc 09 64 76 61 3d  |iqr(ono)....dva=|
00001a30  30 0d 0e 06 10 e3 20 78  74 3d 30 20 b8 20 78 61  |0..... xt=0 . xa|
00001a40  78 0d 0e 10 0c 69 77 28  78 74 29 3d 30 0d 0e 1a  |x....iw(xt)=0...|
00001a50  05 ed 0d 0e 24 12 e3 20  78 74 3d 30 20 b8 20 78  |....$.. xt=0 . x|
00001a60  61 78 2d 31 0d 0e 2e 34  e7 20 62 6c 6f 63 6b 28  |ax-1...4. block(|
00001a70  6f 6e 6f 2c 78 74 29 3e  62 6d 69 6e 28 6f 6e 6f  |ono,xt)>bmin(ono|
00001a80  2c 78 74 29 20 8c 20 f2  61 64 64 69 71 72 3a 64  |,xt) . .addiqr:d|
00001a90  76 61 3d 64 76 61 2b 31  0d 0e 38 05 ed 0d 0e 42  |va=dva+1..8....B|
00001aa0  1b e7 20 69 77 28 a8 28  64 76 61 2a 2e 32 35 29  |.. iw(.(dva*.25)|
00001ab0  29 3d 30 20 8c 20 3d 31  0d 0e 4c 22 3d 69 77 28  |)=0 . =1..L"=iw(|
00001ac0  a8 28 64 76 61 2a 2e 37  35 29 29 2f 69 77 28 a8  |.(dva*.75))/iw(.|
00001ad0  28 64 76 61 2a 2e 32 35  29 29 0d 0e 56 05 3a 0d  |(dva*.25))..V.:.|
00001ae0  0e 60 0c dd f2 61 64 64  69 71 72 0d 0e 6a 10 e3  |.`...addiqr..j..|
00001af0  20 78 73 3d 30 20 b8 20  64 76 61 0d 0e 74 1b e7  | xs=0 . dva..t..|
00001b00  20 a4 64 69 66 3e 3d 69  77 28 78 73 29 20 8c 20  | .dif>=iw(xs) . |
00001b10  70 6f 73 3d 78 73 0d 0e  7e 05 ed 0d 0e 88 13 e3  |pos=xs..~.......|
00001b20  20 73 3d 70 6f 73 2b 31  20 b8 20 64 76 61 0d 0e  | s=pos+1 . dva..|
00001b30  92 13 69 77 28 78 73 2d  31 29 3d 69 77 28 78 73  |..iw(xs-1)=iw(xs|
00001b40  29 0d 0e 9c 05 ed 0d 0e  a6 10 69 77 28 70 6f 73  |).........iw(pos|
00001b50  29 3d a4 64 69 66 0d 0e  b0 05 e1 0d 0e ba 05 3a  |)=.dif.........:|
00001b60  0d 0e c4 24 dd a4 64 69  66 3d 62 6c 6f 63 6b 28  |...$..dif=block(|
00001b70  6f 6e 6f 2c 78 74 29 2d  62 6d 69 6e 28 6f 6e 6f  |ono,xt)-bmin(ono|
00001b80  2c 78 74 29 0d 0e ce 05  3a 0d 0e d8 09 dd a4 70  |,xt)....:......p|
00001b90  75 70 0d 0e e2 08 78 74  3d 30 0d 0e ec 0e 6f 6e  |up....xt=0....on|
00001ba0  6f 3d 63 63 6c 75 64 65  0d 0e f6 11 69 71 72 3d  |o=cclude....iqr=|
00001bb0  a4 69 71 72 28 6f 6e 6f  29 0d 0f 00 39 e7 20 69  |.iqr(ono)...9. i|
00001bc0  71 72 3c 3d 6f 62 28 73  6e 75 6d 2c 63 63 6c 75  |qr<=ob(snum,cclu|
00001bd0  64 65 29 20 8c 20 78 74  3d 28 69 71 72 2f 6f 62  |de) . xt=(iqr/ob|
00001be0  28 73 6e 75 6d 2c 63 63  6c 75 64 65 29 29 2a 31  |(snum,cclude))*1|
00001bf0  2e 35 0d 0f 0a 38 e7 20  69 71 72 3e 6f 62 28 73  |.5...8. iqr>ob(s|
00001c00  6e 75 6d 2c 63 63 6c 75  64 65 29 20 8c 20 78 74  |num,cclude) . xt|
00001c10  3d 28 6f 62 28 73 6e 75  6d 2c 63 63 6c 75 64 65  |=(ob(snum,cclude|
00001c20  29 2f 69 71 72 29 2a 31  2e 35 0d 0f 14 37 e7 20  |)/iqr)*1.5...7. |
00001c30  28 32 5e 28 63 6f 6c 28  6f 6e 6f 29 2b 31 29 20  |(2^(col(ono)+1) |
00001c40  80 20 63 6f 6f 62 73 28  73 6e 75 6d 2c 63 63 6c  |. coobs(snum,ccl|
00001c50  75 64 65 29 29 20 8c 20  78 74 3d 78 74 2b 2e 32  |ude)) . xt=xt+.2|
00001c60  35 0d 0f 1e 1f e7 20 63  6f 6c 28 6f 6e 6f 29 3d  |5..... col(ono)=|
00001c70  4d 43 43 25 20 8c 20 78  74 3d 78 74 2b 2e 32 35  |MCC% . xt=xt+.25|
00001c80  0d 0f 28 07 3d 78 74 0d  0f 32 05 3a 0d 0f 3c 19  |..(.=xt..2.:..<.|
00001c90  dd a4 72 74 3d 97 28 c1  6f 62 6e 61 6d 65 24 2c  |..rt=.(.obname$,|
00001ca0  63 2c 31 29 29 0d 0f 46  05 3a 0d 0f 50 2f dd a4  |c,1))..F.:..P/..|
00001cb0  70 65 72 61 3d a8 28 28  31 30 30 2f 28 78 61 78  |pera=.((100/(xax|
00001cc0  2a 79 61 78 29 29 2a 28  28 58 2d 31 29 2b 28 59  |*yax))*((X-1)+(Y|
00001cd0  2d 31 29 2a 78 61 78 29  29 0d 0f 5a 05 3a 0d 0f  |-1)*xax))..Z.:..|
00001ce0  64 53 dc 20 22 77 68 69  74 65 22 2c 33 2c 22 6c  |dS. "white",3,"l|
00001cf0  69 67 68 74 20 67 72 65  79 22 2c 37 2c 22 6d 65  |ight grey",7,"me|
00001d00  64 69 75 6d 20 67 72 65  79 22 2c 31 34 2c 22 64  |dium grey",14,"d|
00001d10  61 72 6b 20 67 72 65 79  22 2c 32 38 2c 22 76 65  |ark grey",28,"ve|
00001d20  72 79 20 64 61 72 6b 20  67 72 65 79 22 2c 32 34  |ry dark grey",24|
00001d30  30 0d 0f 6e 3d dc 20 22  65 78 74 72 65 6d 65 6c  |0..n=. "extremel|
00001d40  79 20 64 61 72 6b 20 67  72 65 79 22 2c 32 34 30  |y dark grey",240|
00001d50  2c 22 6c 69 67 68 74 20  62 6c 61 63 6b 22 2c 32  |,"light black",2|
00001d60  34 30 2c 22 62 6c 61 63  6b 22 2c 32 34 30 0d 0f  |40,"black",240..|
00001d70  78 3d dc 20 22 64 61 72  6b 20 62 6c 75 65 22 2c  |x=. "dark blue",|
00001d80  38 34 34 38 2c 22 79 65  6c 6c 6f 77 22 2c 34 36  |8448,"yellow",46|
00001d90  30 38 2c 22 67 72 65 65  6e 22 2c 31 30 32 34 2c  |08,"green",1024,|
00001da0  22 72 65 64 22 2c 31 38  34 33 32 0d 0f 82 2b dc  |"red",18432...+.|
00001db0  20 22 6c 69 67 68 74 20  79 65 6c 6c 6f 77 22 2c  | "light yellow",|
00001dc0  34 36 30 38 2c 22 64 61  72 6b 20 67 72 65 65 6e  |4608,"dark green|
00001dd0  22 2c 38 34 34 38 0d 0f  8c 27 dc 20 22 6f 72 61  |",8448...'. "ora|
00001de0  6e 67 65 22 2c 31 36 33  38 34 2c 22 6c 69 67 68  |nge",16384,"ligh|
00001df0  74 20 62 6c 75 65 22 2c  33 32 37 36 38 0d ff     |t blue",32768..|
00001dff