Home » Archimedes archive » Micro User » MU 1991-06.adf » PD-Stuff » Utilities/!Find/!RunImage

Utilities/!Find/!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 » Archimedes archive » Micro User » MU 1991-06.adf » PD-Stuff
Filename: Utilities/!Find/!RunImage
Read OK:
File size: 366E bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >$.Util*.Disc.!Find.!RunImage
   20
   30Progname$      ="Find"
   40VersionStr$    ="1.09 (16-Dec-90)"
   50
   60Icon_name%=3
   70Icon_type%=5
   80Icon_root%=7
   90Icon_files%=8
  100Icon_dirs%=9
  110Icon_go%=10
  120Icon_abort%=11
  130Icon_first%=12
  140iptr%=0
  150Space1%=60
  160Space2%=48
  170menu$=""
  180menu_data%=0
  190SYS "Wimp_Initialise",200,&4B534154,Progname$ TO ,Task_h%
  200DIM union% 1024
  210temp_data_size%=4*1024
  220DIM temp_data% temp_data_size%
  230menu_data_size%=5*1024
  240DIM menu_data% menu_data_size%
  250DIM menu% 100
  260DIM recurse% 256
  270DIM fw_code% 1100
  280SYS "OS_File",&FF,"<Obey$Dir>.FW_code",fw_code%,0
  290icon_temp%=0
  300DIM val% 8:$val%="u0,0,4"+CHR$(0)
  310PROCread_msg
  320PROCtemplates
  330PROCset_colours
  340PROCversion
  350PROCtype_init
  370PROCroot
  380PROCset_text(main%,Icon_type%,"All")
  390PROCmem_init
  400PROCread_sys_var
  410Otptr%=tptr%
  420
  430 !union%=main%
  440 SYS "Wimp_GetWindowState",,union%
  450 SYS "Wimp_OpenWindow",,union%
  460 SYS "Wimp_SetCaretPosition",main%,Icon_name%,,,-1,1
  470Own%=FNown
  480
  490mask%=1
  500REPEAT
  510SYS "Wimp_Poll",mask%,union% TO R%
  520CASE R% OF
  530  WHEN 0:PROCnull
  540  WHEN 1:PROCredraw
  550  WHEN 2:SYS "Wimp_OpenWindow",,union%
  560  WHEN 3:SYS "Wimp_CloseDown",&4B534154,Task_h%
  570  WHEN 4:IF !union%=main% THEN PROCdefault_ptr
  580  WHEN 5:IF !union%=main% THEN PROCmy_ptr
  590  WHEN 6:PROCmouse_button_click
  600  WHEN 8:PROCkey
  610  WHEN 9 :PROCmenuselect(union%)
  620  WHEN 17,18,19:PROCreceive
  630ENDCASE
  640UNTIL FALSE
  650END
  660
  670DEFPROCkey
  680IF !union%=main% THEN
  690  IF union%!24=13 THEN PROCgo ELSE SYS "Wimp_ProcessKey",union%!24
  700ELSE
  710  SYS "Wimp_ProcessKey",union%!24
  720ENDIF
  730ENDPROC
  740
  750DEFPROCredraw
  760LOCAL n%
  770SYS "Wimp_RedrawWindow",,union% TO more%
  780WHILE more%
  790  A%=12 :REM nr of icons
  800  B%=union%
  810  CALL fw_code%,A%,B%
  820  SYS "Wimp_GetRectangle",,union% TO more%
  830ENDWHILE
  840ENDPROC
  850:
  860DEF PROCreceive
  870LOCAL task%, ref%,taskname$,newtaskid%
  880ref% =!(union%+8)
  890task%=!(union%+4)
  900IF task%=Task_h% ENDPROC
  910CASE union%!16 OF
  920 WHEN 0:PROCterminate
  930 WHEN 3:IF mask%=1 THEN PROCcheck_dir(FNGetStr(union%+44)):PROCDataLoadAck(ref%)
  940 WHEN &400C2
  950  taskname$=FNGetStr(union%+28):newtaskid%=union%!4
  960  IF taskname$=Progname$ AND newtaskid%<>Task_h% THEN
  970   PROCterminate
  980  ENDIF
  990 WHEN &502:PROChelp
 1000 WHEN &400C1:IF Own% THEN PROCmy_ptr
 1010ENDCASE
 1020ENDPROC
 1030:
 1040DEF PROCmouse_button_click
 1050LOCALB%,C%,W%,I%,inc%
 1060W%=union%!12:I%=union%!16
 1070B%=%111 AND union%!8
 1080Mouse_X%=union%!0:Mouse_Y%=union%!4
 1090IF (B%AND5) AND W%=-2 THEN
 1100 !union%=main%
 1110 SYS "Wimp_GetWindowState",,union%
 1120 SYS "Wimp_OpenWindow",,union%
 1130ENDIF
 1140IF (B%AND5) AND W%=main% THEN
 1150    IF I%=Icon_go% THEN PROCgo
 1160    IF I%=Icon_abort% THEN PROCstop:mask%=1
 1170    IF I%>=Icon_first% THEN
 1180      OSCLI("Filer_OpenDir "+FNtp(FNget_text(main%,I%)))
 1190    ENDIF
 1200ENDIF
 1210IF (B%AND2) THEN
 1220  IF W%=main% AND I%=Icon_type% THEN
 1230    PROCtype_menu
 1240  ELSE
 1250    IF W%=-2 THEN
 1260      PROCdomenu(101,">Info,Quit",Progname$,menu%,-1,-1)
 1270    ELSE
 1280      IF mask%=0 THEN
 1290        PROCdomenu(101,">Info,Abort,Quit",Progname$,menu%,Mouse_X%-64,Mouse_Y%+32)
 1300      ELSE
 1310        PROCdomenu(101,">Info,|Abort,Quit",Progname$,menu%,Mouse_X%-64,Mouse_Y%+32)
 1320      ENDIF
 1330    ENDIF
 1340  ENDIF
 1350ENDIF
 1360ENDPROC
 1370:
 1380DEF PROCdomenu(handle%,menu$,menutitle$,Mbuff%,Mx%,My%)
 1390LOCAL C%,H%,i%,menuptr%,item$,M%,Mptr%
 1400C%=0:H%=44:M%=4
 1410menuptr%=Mbuff%
 1420i%=0
 1430$menuptr%=menutitle$
 1440menuptr%?12=C_MenuTitlefg:menuptr%?13=C_MenuTitlebg
 1450menuptr%?14=C_Menufg:menuptr%?15=C_Menubg
 1460menuptr%!16=80
 1470Mptr%=menuptr%+16
 1480menuptr%!20=H%:menuptr%!24=0
 1490menuptr%+=28
 1500REPEAT item$=FNpar(",")
 1510IF LEN(item$)>M% THEN M%=LEN(item$)
 1520PROCmenuitem(item$):C%+=1
 1530UNTIL item$=""
 1540!Mptr%=M%*16+8
 1550menuptr%!-24=(menuptr%!-24)OR&80
 1560IF Mx%<0 AND My%<0 THEN Mx%=Mouse_X%-64:My%=96+((C%-1)*H%)
 1570IF handle%=101 THEN Meno%=1:SYS "Wimp_CreateMenu",,Mbuff%,Mx%,My%
 1580ENDPROC
 1590:
 1600DEF PROCmenuitem(text$)
 1610IF text$="" ENDPROC
 1620!menuptr%=0
 1630menuptr%!4=-1
 1640IF LEFT$(text$,2)=">I" menuptr%!4=info% : text$=MID$(text$,2)
 1650IF LEFT$(text$,1)="#" menuptr%!4=1:!menuptr%=!menuptr% OR 8 : text$=MID$(text$,2)
 1660menuptr%!8=&07000021
 1670IF LEFT$(text$,1)="|" menuptr%!8=menuptr%!8 OR (1<<22) : text$=MID$(text$,2)
 1680$(menuptr%+12)=text$
 1690menuptr%+=24
 1700ENDPROC
 1710:
 1720DEF FNpar(sep$)
 1730i1%=i%+1:i%=INSTR(menu$+sep$,sep$,i1%)
 1740=MID$(menu$,i1%,i%-i1%)
 1750:
 1760DEF PROCmenuselect(menus%)
 1770LOCAL a$,M%
 1780IF Meno%=1 THEN
 1790  SYS "Wimp_DecodeMenu",,menu%,menus%,tptr% TO,,,a$
 1800IF a$="" THEN ENDPROC
 1810CASE a$ OF
 1820  WHEN "Quit":PROCterminate:END
 1830  WHEN "Abort":PROCstop:mask%=1
 1840  WHEN "Info":
 1850ENDCASE
 1860  M%=menu%
 1870ELSE
 1880  SYS "Wimp_DecodeMenu",,menu_data%,menus%,tptr% TO,,,a$
 1890  M%=menu_data%
 1900  PROCset_text(main%,Icon_type%,a$)
 1910ENDIF
 1920
 1930SYS "Wimp_GetPointerInfo",,union%
 1940IF (!(union%+8) AND 1)>0 THEN
 1950  SYS "Wimp_CreateMenu",,M%
 1960ENDIF
 1970ENDPROC
 1980
 1990DEFPROCtemplates
 2000tptr%=temp_data%
 2010SYS "Wimp_OpenTemplate",,"<Obey$Dir>.Templates"
 2020SYS "Wimp_LoadTemplate",,union%,tptr%,temp_data%+temp_data_size%,-1,"Info",0 TO ,,tptr%
 2030SYS "Wimp_CreateWindow",,union% TO info%
 2040SYS "Wimp_LoadTemplate",,union%,tptr%,temp_data%+temp_data_size%,-1,"Main",0 TO ,,tptr%
 2050title%=union%!72
 2060Wx1%=union%!40
 2070Wy1%=union%!44
 2080OWy1%=union%!44
 2090Wx2%=union%!48
 2100Wy2%=union%!52
 2110I%=union%+88+(((union%!84)-1)*32)
 2120Ix1%=I%!0
 2130Iy1%=I%!4
 2140Ix2%=I%!8
 2150Iy2%=I%!12
 2160If%=I%!16
 2170J%=union%!84
 2180union%!84=J%-1
 2190SYS "Wimp_CreateWindow",,union% TO main%
 2200oity1%=Iy1%
 2210oity2%=Iy2%
 2220SYS "Wimp_CloseTemplate"
 2230PROCbcol(Icon_abort%,12):PROCshade(Icon_abort%)
 2240ENDPROC
 2250:
 2260DEF PROCset_colours
 2270LOCALC%
 2280REM colours defined in memo from WStoye 21/7/88
 2290C_MenuTitlefg = 7
 2300C_MenuTitlebg = 2
 2310C_Menufg = 7
 2320C_Menubg = 0
 2330C_MenuItemfg = 7
 2340C_MenuItembg = 0
 2350ENDPROC
 2360:
 2370DEFPROCversion
 2380LOCAL p%
 2390!union%=info%
 2400union%!4=3
 2410SYS "Wimp_GetIconState",,union%
 2420p%=union%!28
 2430$p%=VersionStr$+CHR$(0)
 2440ENDPROC
 2450:
 2460DEF PROCterminate
 2470IF Task_h%>0 THEN
 2480 ON ERROR SYS "Wimp_CloseDown",&4B534154,Task_h%
 2490ELSE
 2500 ON ERROR END
 2510ENDIF
 2520END
 2530ENDPROC
 2540
 2550DEFPROCset_text(w%,i%,t$)
 2560LOCAL p%
 2570!union%=w%
 2580union%!4=i%
 2590SYS "Wimp_GetIconState",,union%
 2600p%=union%!28
 2610$p%=t$+CHR$(0)
 2620union%!8=0
 2630union%!12=0
 2640SYS "Wimp_SetIconState",,union%
 2650ENDPROC
 2660:
 2670DEFFNget_text(w%,i%)
 2680LOCAL p%
 2690!union%=w%
 2700union%!4=i%
 2710SYS "Wimp_GetIconState",,union%
 2720p%=union%!28
 2730=FNGetStr(p%)
 2740:
 2750DEFPROCtype_init
 2760LOCAL n%,l%,f%
 2770LOCAL c%,i%,menuptr%,item$,M%,Mptr%
 2780Ct%=0:Ht%=44:M%=4
 2790menuptr%=menu_data%
 2800
 2810i%=0
 2820$menuptr%="Filetypes"
 2830menuptr%?12=C_MenuTitlefg:menuptr%?13=C_MenuTitlebg
 2840menuptr%?14=C_Menufg:menuptr%?15=C_Menubg
 2850menuptr%!16=13*16
 2860menuptr%!20=Ht%:menuptr%!24=0
 2870menuptr%+=28
 2890n%=0:c%=0
 2900REPEAT
 2910SYS "XOS_ReadVarVal","File$Type_*"+CHR$(0),union%,1024,n%,0 TO ,,l%,n%;f%
 2920IF NOT(f%AND1) OR c%=0 THEN
 2930  IF l%>0 OR c%=0 THEN
 2940    IF c%>0 THEN
 2950      ?(union%+l%)=0
 2990      t$=RIGHT$(FNGetStr(n%),3)+" "+FNGetStr(union%)
 3000      PRINTt$;"     ";
 3010    ELSE
 3020      t$="All"
 3030    ENDIF
 3040    c%+=1
 3050    $tptr%=t$+CHR$(0)
 3060    !menuptr%=0
 3070    menuptr%!4=-1
 3080    menuptr%!8=&07000021+(1<<8)
 3090    menuptr%!12=tptr%
 3100    menuptr%!16=-1
 3110    menuptr%!20=13:REM LEN(t$)+1
 3120    tptr%+=LEN(t$)+1
 3130    menuptr%+=24
 3140  ENDIF
 3150ENDIF
 3160UNTIL (f%AND1)<>0 OR l%=0 OR (menuptr%>menu_data%+menu_data_size%-24)
 3170menuptr%!-24=(menuptr%!-24)OR&80
 3190ENDPROC
 3200:
 3210DEFPROCtype_menu
 3220Meno%=2
 3230SYS "Wimp_CreateMenu",,menu_data%,Mouse_X%-64,Mouse_Y%
 3240ENDPROC
 3250:
 3260DEF FNGetStr(s%) : REM get string
 3270LOCAL n$
 3280WHILE(?s%>31):n$+=CHR$(?s%):s%+=1:ENDWHILE
 3290=n$
 3300:
 3310DEFPROCroot
 3320LOCAL a$
 3330SYS "XOS_ReadVarVal","Obey$Dir",union%,100,0,0 TO ,,l%,n%;f%
 3340a$=FNGetStr(union%)
 3350a$=LEFT$(a$,INSTR(a$,"$"))
 3360PROCset_text(main%,Icon_root%,a$)
 3370ENDPROC
 3380
 3390DEFFNcheck_root(r$)
 3400SYS "XOS_FSControl",13,r$,0 TO ,,fc%;f%
 3410IF (f%AND1)<>0 THEN =TRUE
 3420IF (fc%=0) THEN =TRUE
 3430=FALSE
 3440:
 3450DEFPROCgo
 3460File$=FNget_text(main%,Icon_name%)
 3470IF File$="" THEN PROCns_error(msg$(0)):ENDPROC
 3480Type$=FNget_text(main%,Icon_type%)
 3490IF Type$="All" THEN type%=-1 ELSE SYS "OS_ReadUnsigned",16,LEFT$(Type$,3) TO ,,type%
 3500Root$=FNget_text(main%,Icon_root%)
 3510IF Root$="" THEN PROCns_error(msg$(1)):ENDPROC
 3520IF FNcheck_root(Root$) THEN PROCns_error(msg$(16)):ENDPROC
 3530SYS "XOS_File",5,Root$ TO ObjectType%;f%
 3540IF f%AND1 THEN PROCns_error(msg$(14)):ENDPROC
 3550IF ObjectType%=0 THEN PROCns_error(msg$(12)):ENDPROC
 3560IF ObjectType%=1 THEN PROCns_error(msg$(13)):ENDPROC
 3570oRoot$=Root$
 3580Files%=FNget_state(main%,Icon_files%)
 3590Dirs%=FNget_state(main%,Icon_dirs%)
 3600IF NOT Files% AND NOT Dirs% THEN PROCns_error(msg$(2)):ENDPROC
 3610mask%=0
 3620rptr%=0
 3630!recurse%=0
 3640PROCstart
 3650ENDPROC
 3660:
 3670DEFPROCns_error(e$)
 3680!union%=0
 3690$(union%+4)=e$+CHR$(0)
 3700SYS "Wimp_ReportError",union%,%1,"Find"
 3710ENDPROC
 3720:
 3730DEFFNget_state(w%,i%)
 3740LOCAL p%
 3750!union%=w%
 3760union%!4=i%
 3770SYS "Wimp_GetIconState",,union%
 3780p%=union%!24
 3790=(p%AND(1<<21))>0
 3800:
 3810DEFPROCnull
 3820IF start% THEN
 3830    on%=0
 3840    REPEAT
 3850     SYS "OS_GBPB",10,Root$,union%,1,on%,1024,File$ TO ,,,no%,on%
 3860     IF no%=1 THEN
 3870       IF Dirs%=TRUE AND union%!&10=2 THEN
 3880          PROCcopy_icon(iptr%,Root$+"."+FNGetStr(union%+&14))
 3890          IF mask%=1 THEN ENDPROC
 3900       ELSE
 3910          IF Files%=TRUE AND union%!&10=1 AND (type%=-1 OR (((!union%)>>8)AND&FFF)=type%) THEN
 3920            PROCcopy_icon(iptr%,Root$+"."+FNGetStr(union%+&14))
 3930            IF mask%=1 THEN ENDPROC
 3940          ENDIF
 3950       ENDIF
 3960     ENDIF
 3970    UNTIL on%=-1
 3980start%=FALSE
 3990ENDIF
 4000
 4010SYS "XOS_GBPB",10,Root$,union%,1,recurse%!rptr%,1024,"*" TO r0%,,,no%,on%;f%
 4020recurse%!rptr%=on%
 4030IF on%=-1 THEN
 4040  IF rptr%=0 THEN PROCstop:mask%=1:ENDPROC ELSE Root$=FNtp(Root$):rptr%-=4
 4050ENDIF
 4060IF no%=1 THEN
 4070  ObjectType%=union%!&10
 4080  IF ObjectType%=2 THEN
 4090    Root$=Root$+"."+FNGetStr(union%+&14)
 4100    PROCset_text(main%,Icon_root%,Root$)
 4110    on%=0
 4120    REPEAT
 4130     SYS "OS_GBPB",10,Root$,union%,1,on%,1024,File$ TO ,,,no%,on%
 4140     IF no%=1 THEN
 4150       f$=FNGetStr(union%+&14)
 4160       IF Dirs%=TRUE AND union%!&10=2 THEN
 4170          PROCcopy_icon(iptr%,Root$+"."+f$)
 4180          IF mask%=1 THEN ENDPROC
 4190       ELSE
 4200          IF Files%=TRUE AND union%!&10=1 AND (type%=-1 OR (((!union%)>>8)AND&FFF)=type%) THEN
 4210            PROCcopy_icon(iptr%,Root$+"."+f$)
 4220            IF mask%=1 THEN ENDPROC
 4230          ENDIF
 4240       ENDIF
 4250     ENDIF
 4260    UNTIL on%=-1
 4270    rptr%+=4:recurse%!rptr%=0
 4280  ENDIF
 4290ENDIF
 4300ENDPROC
 4310
 4320DEFFNtp(t$)
 4330LOCAL s%,c$
 4340s%=0
 4350REPEAT:c$=MID$(t$,LEN(t$)-s%,1):s%+=1:UNTILc$="." OR s%=LEN(t$)
 4360IF s%<LEN(t$) THEN =LEFT$(t$,LEN(t$)-s%)
 4370=t$
 4380
 4390DEFPROCfull
 4400OSCLI("*POINTER 1"):PROCns_error(msg$(15)):mask%=1:PROCstop
 4410ENDPROC
 4420
 4430DEFPROCcopy_icon(i%,t$)
 4440IF (&8000+CurrSize%)-fptr%<LEN(t$)+1 THEN
 4450  IF NOT FNmem_add THEN PROCfull:ENDPROC
 4460ENDIF
 4470!union%=main%
 4480union%!4=Ix1%
 4490union%!8=Iy1%
 4500union%!12=Ix2%
 4510union%!16=Iy2%
 4520union%!20=If%
 4530union%!24=fptr%
 4540union%!28=-1:REM val%
 4550union%!32=LEN(t$)+1
 4560$fptr%=t$+CHR$(0)
 4570fptr%+=LEN(t$)+1
 4580SYS "Wimp_CreateIcon",,union% TO iptr%
 4590SYS "Wimp_ForceRedraw",main%,Ix1%,Iy1%,Ix2%,Iy2%
 4600Iy1%-=Space2%
 4610Iy2%-=Space2%
 4620IF Wy1%=OWy1% THEN Wy1%-=Space1% ELSE Wy1%-=Space2%
 4630union%!0=Wx1%
 4640union%!4=Wy1%
 4650union%!8=Wx2%
 4660union%!12=Wy2%
 4670SYS "Wimp_SetExtent",main%,union%
 4680REM ENDPROC
 4690!union%=main%
 4700SYS "Wimp_GetWindowState",,union%
 4710IF resize% THEN union%!8=-102400
 4720IF bottom% THEN union%!24=-102400
 4730SYS "Wimp_OpenWindow",,union%
 4740ENDPROC
 4750
 4760DEFPROCstart
 4770SYS "Wimp_SetCaretPosition",-1
 4780PROCbcol(Icon_go%,12):PROCshade(Icon_go%)
 4790PROCshade(Icon_files%)
 4800PROCshade(Icon_dirs%)
 4810PROCshade(Icon_name%)
 4820PROCshade(Icon_root%)
 4830PROCshade(Icon_type%)
 4840PROCunshade(Icon_abort%):PROCbcol(Icon_abort%,2)
 4850IF iptr%>0 THEN
 4860  !union%=main%
 4870  FOR N%=Icon_first% TO iptr%
 4880    union%!4=N%
 4890    SYS "Wimp_DeleteIcon",,union%
 4900  NEXT
 4910  Wy1%=OWy1%
 4920  union%!0=Wx1%
 4930  union%!4=Wy1%
 4940  union%!8=Wx2%
 4950  union%!12=Wy2%
 4960  SYS "Wimp_SetExtent",main%,union%
 4970  !union%=main%
 4980  SYS "Wimp_GetWindowState",,union%
 4990  SYS "Wimp_OpenWindow",,union%
 5000Iy1%=oity1%
 5010Iy2%=oity2%
 5020ENDIF
 5030iptr%=0
 5040PROCmem_reinit
 5050REM fptr%=FNmem_add
 5060fptr%=END+512
 5070fptr%=&8000+ProgSize%
 5080start%=TRUE
 5090IF FNown THEN PROCmy_ptr
 5100ENDPROC
 5110
 5120DEFPROCstop
 5130PROCset_text(main%,Icon_root%,oRoot$)
 5140PROCset_text(main%,Icon_name%,File$)
 5150PROCunshade(Icon_go%):PROCbcol(Icon_go%,2)
 5160PROCunshade(Icon_files%)
 5170PROCunshade(Icon_dirs%)
 5180PROCunshade(Icon_name%)
 5190PROCunshade(Icon_root%)
 5200PROCunshade(Icon_type%)
 5210PROCbcol(Icon_abort%,12):PROCshade(Icon_abort%)
 5220OSCLI("*POINTER 1"):Own%=FALSE
 5230ENDPROC
 5240
 5250DEFPROCunshade(i%)
 5260!union%=main%
 5270union%!4=i%
 5280union%!8=0
 5290union%!12=(1<<22)
 5300SYS "Wimp_SetIconState",,union%
 5310ENDPROC
 5320
 5330DEFPROCshade(i%)
 5340!union%=main%
 5350union%!4=i%
 5360union%!8=(1<<22)
 5370union%!12=(1<<22)
 5380SYS "Wimp_SetIconState",,union%
 5390ENDPROC
 5400:
 5410DEFPROCbcol(i%,c%)
 5420!union%=main%
 5430union%!4=i%
 5440union%!8=(c%<<28)
 5450union%!12=(15<<28)
 5460SYS "Wimp_SetIconState",,union%
 5470ENDPROC
 5480:
 5490DEF PROCDataLoadAck(ref%)
 5500union%!0 = 20
 5510union%!12 = ref%
 5520union%!16 = 4 :REM DataLoadAck
 5530SYS "Wimp_SendMessage",17,union% :REM acknowledge message
 5540ENDPROC
 5550:
 5560DEFPROCcheck_dir(f$)
 5570SYS "OS_File",5,f$ TO ObjectType%
 5580IF ObjectType%=2 THEN PROCset_text(main%,Icon_root%,f$)
 5590ENDPROC
 5600:
 5610DEFPROCread_msg
 5620LOCAL N%,F%
 5630F%=OPENIN("<Obey$Dir>.Messages")
 5640msg_no%=VAL(GET$#F%)-1
 5650DIM msg$(msg_no%)
 5660FOR N%=0 TO msg_no%
 5670  msg$(N%)=GET$#F%
 5680NEXT
 5690CLOSE#F%
 5700ENDPROC
 5710:
 5720DEFPROChelp
 5730Do_help%=TRUE
 5740union%!12=union%!8
 5750union%!16=&503
 5760help%=union%+20
 5770hw%=union%!32:hi%=union%!36
 5780IF hw%=-2 THEN
 5790  PROChelp_txt(msg$(11))
 5800ELSE
 5810 CASE hi% OF
 5820   WHEN Icon_name%:PROChelp_txt(msg$(3))
 5830   WHEN Icon_type%:PROChelp_txt(msg$(4))
 5840   WHEN Icon_root%:PROChelp_txt(msg$(5))
 5850   WHEN Icon_abort%:PROChelp_txt(msg$(6))
 5860   WHEN Icon_files%:PROChelp_txt(msg$(7))
 5870   WHEN Icon_dirs%:PROChelp_txt(msg$(8))
 5880   WHEN Icon_go%:PROChelp_txt(msg$(9))
 5890 ENDCASE
 5900 IF hi%>=Icon_first% THEN PROChelp_txt(msg$(10))
 5910ENDIF
 5920IF Do_help% THEN
 5930  ?help%=0:!union%=(help%+4-union%)ANDNOT3
 5940  SYS "Wimp_SendMessage",17,union%,union%!4
 5950ENDIF
 5960ENDPROC
 5970
 5980DEF PROChelp_txt(a$) $help%=a$+"|M":help%+=LENa$+2:Do_help%=TRUE:ENDPROC
 5990
 6000DEFPROCdefault_ptr
 6010IF mask%=0 THEN
 6020  OSCLI("*POINTER 1")
 6030  Own%=FALSE
 6040ENDIF
 6050ENDPROC
 6060
 6070DEFPROCmy_ptr
 6080IF mask%=0 THEN
 6090  SYS "Wimp_SpriteOp",36,1,"ptr_find",2,8,5,0,0
 6100  Own%=TRUE
 6110ENDIF
 6120ENDPROC
 6130
 6140DEFFNown
 6150SYS "Wimp_GetPointerInfo",,union%
 6160IF union%!12=main% THEN =TRUE
 6170=FALSE
 6180
 6190DEFPROCmem_init
 6200SYS "XWimp_SlotSize",-1,-1 TO ProgSize%
 6210CurrSize%=ProgSize%
 6220ENDPROC
 6230
 6240DEFFNmem_add
 6250LOCAL c%
 6260c%=CurrSize%
 6270SYS "XWimp_SlotSize",CurrSize%+1024,-1 TO CurrSize%
 6280IF CurrSize%=c% THEN =FALSE
 6290=TRUE
 6300
 6310DEFPROCmem_reinit
 6320SYS "XWimp_SlotSize",ProgSize%,-1
 6330CurrSize%=ProgSize%
 6340ENDPROC
 6350
 6360DEFPROCread_sys_var
 6370LOCAL f%,o$
 6380resize%=FALSE
 6390bottom%=FALSE
 6400SYS "XOS_ReadVarVal","Find$Options",union%,1024,0,0 TO ,;f%
 6410IF f%AND1 THEN ENDPROC
 6420o$=FNGetStr(union%)
 6430IF INSTR(o$,"B") OR INSTR(o$,"b") THEN bottom%=TRUE
 6440IF INSTR(o$,"R") OR INSTR(o$,"r") THEN resize%=TRUE
 6450ENDPROC

#� >$.Util*.Disc.!Find.!RunImage

Progname$      ="Find"
(&VersionStr$    ="1.09 (16-Dec-90)"
2
<Icon_name%=3
FIcon_type%=5
PIcon_root%=7
ZIcon_files%=8
dIcon_dirs%=9
nIcon_go%=10
xIcon_abort%=11
�Icon_first%=12
�iptr%=0
�Space1%=60
�Space2%=48
�menu$=""
�menu_data%=0
�;ș "Wimp_Initialise",200,&4B534154,Progname$ � ,Task_h%
�� union% 1024
�temp_data_size%=4*1024
� � temp_data% temp_data_size%
�menu_data_size%=5*1024
� � menu_data% menu_data_size%
�� menu% 100
� recurse% 256
� fw_code% 1100
4ș "OS_File",&FF,"<Obey$Dir>.FW_code",fw_code%,0
"icon_temp%=0
, � val% 8:$val%="u0,0,4"+�(0)
6
�read_msg
@�templates
J�set_colours
T�version
^�type_init
r	�root
|%�set_text(main%,Icon_type%,"All")
�
�mem_init
��read_sys_var
�Otptr%=tptr%
�
� !union%=main%
�% ș "Wimp_GetWindowState",,union%
�! ș "Wimp_OpenWindow",,union%
�7 ș "Wimp_SetCaretPosition",main%,Icon_name%,,,-1,1
�
Own%=�own
�
�mask%=1
��
�$ș "Wimp_Poll",mask%,union% � R%
Ȏ R% �
  � 0:�null
  � 1:�redraw
&&  � 2:ș "Wimp_OpenWindow",,union%
0/  � 3:ș "Wimp_CloseDown",&4B534154,Task_h%
:(  � 4:� !union%=main% � �default_ptr
D#  � 5:� !union%=main% � �my_ptr
N  � 6:�mouse_button_click
X  � 8:�key
b  � 9 :�menuselect(union%)
l  � 17,18,19:�receive
v�
�� �
��
�
�	��key
�� !union%=main% �
�;  � union%!24=13 � �go � ș "Wimp_ProcessKey",union%!24
��
�$  ș "Wimp_ProcessKey",union%!24
��
��
�
���redraw
�� n%
*ș "Wimp_RedrawWindow",,union% � more%
ȕ more%
  A%=12 :� nr of icons
   B%=union%
*  � fw_code%,A%,B%
4,  ș "Wimp_GetRectangle",,union% � more%
>�
H�
R:
\� �receive
f&� task%, ref%,taskname$,newtaskid%
pref% =!(union%+8)
ztask%=!(union%+4)
�� task%=Task_h% �
�Ȏ union%!16 �
� � 0:�terminate
�F � 3:� mask%=1 � �check_dir(�GetStr(union%+44)):�DataLoadAck(ref%)
�
 � &400C2
�6  taskname$=�GetStr(union%+28):newtaskid%=union%!4
�3  � taskname$=Progname$ � newtaskid%<>Task_h% �
�   �terminate
�  �
� � &502:�help
� � &400C1:� Own% � �my_ptr
��
��
:
� �mouse_button_click
�B%,C%,W%,I%,inc%
$W%=union%!12:I%=union%!16
.B%=%111 � union%!8
8'Mouse_X%=union%!0:Mouse_Y%=union%!4
B� (B%�5) � W%=-2 �
L !union%=main%
V% ș "Wimp_GetWindowState",,union%
`! ș "Wimp_OpenWindow",,union%
j�
t� (B%�5) � W%=main% �
~    � I%=Icon_go% � �go
�(    � I%=Icon_abort% � �stop:mask%=1
�    � I%>=Icon_first% �
�6      �("Filer_OpenDir "+�tp(�get_text(main%,I%)))
�	    �
��
�� (B%�2) �
�"  � W%=main% � I%=Icon_type% �
�    �type_menu
�  �
�    � W%=-2 �
�9      �domenu(101,">Info,Quit",Progname$,menu%,-1,-1)
�	    �
      � mask%=0 �

S        �domenu(101,">Info,Abort,Quit",Progname$,menu%,Mouse_X%-64,Mouse_Y%+32)
      �
T        �domenu(101,">Info,|Abort,Quit",Progname$,menu%,Mouse_X%-64,Mouse_Y%+32)
(      �
2	    �
<  �
F�
P�
Z:
d6� �domenu(handle%,menu$,menutitle$,Mbuff%,Mx%,My%)
n&� C%,H%,i%,menuptr%,item$,M%,Mptr%
xC%=0:H%=44:M%=4
�menuptr%=Mbuff%
�i%=0
�$menuptr%=menutitle$
�7menuptr%?12=C_MenuTitlefg:menuptr%?13=C_MenuTitlebg
�-menuptr%?14=C_Menufg:menuptr%?15=C_Menubg
�menuptr%!16=80
�Mptr%=menuptr%+16
� menuptr%!20=H%:menuptr%!24=0
�menuptr%+=28
�� item$=�par(",")
�� �(item$)>M% � M%=�(item$)
��menuitem(item$):C%+=1
�� item$=""
!Mptr%=M%*16+8
#menuptr%!-24=(menuptr%!-24)�&80
8� Mx%<0 � My%<0 � Mx%=Mouse_X%-64:My%=96+((C%-1)*H%)
"@� handle%=101 � Meno%=1:ș "Wimp_CreateMenu",,Mbuff%,Mx%,My%
,�
6:
@� �menuitem(text$)
J� text$="" �
T!menuptr%=0
^menuptr%!4=-1
h7� �text$,2)=">I" menuptr%!4=info% : text$=�text$,2)
rJ� �text$,1)="#" menuptr%!4=1:!menuptr%=!menuptr% � 8 : text$=�text$,2)
|menuptr%!8=&07000021
�E� �text$,1)="|" menuptr%!8=menuptr%!8 � (1<<22) : text$=�text$,2)
�$(menuptr%+12)=text$
�menuptr%+=24
��
�:
�� �par(sep$)
�%i1%=i%+1:i%=�menu$+sep$,sep$,i1%)
�=�menu$,i1%,i%-i1%)
�:
�� �menuselect(menus%)
�� a$,M%
�� Meno%=1 �
�5  ș "Wimp_DecodeMenu",,menu%,menus%,tptr% �,,,a$
� a$="" � �
Ȏ a$ �
  � "Quit":�terminate:�
&  � "Abort":�stop:mask%=1
0  � "Info":
:�
D  M%=menu%
N�
X:  ș "Wimp_DecodeMenu",,menu_data%,menus%,tptr% �,,,a$
b  M%=menu_data%
l$  �set_text(main%,Icon_type%,a$)
v�
�
�$ș "Wimp_GetPointerInfo",,union%
�� (!(union%+8) � 1)>0 �
�  ș "Wimp_CreateMenu",,M%
��
��
�
���templates
�tptr%=temp_data%
�2ș "Wimp_OpenTemplate",,"<Obey$Dir>.Templates"
�Yș "Wimp_LoadTemplate",,union%,tptr%,temp_data%+temp_data_size%,-1,"Info",0 � ,,tptr%
�*ș "Wimp_CreateWindow",,union% � info%
�Yș "Wimp_LoadTemplate",,union%,tptr%,temp_data%+temp_data_size%,-1,"Main",0 � ,,tptr%
title%=union%!72
Wx1%=union%!40
Wy1%=union%!44
 OWy1%=union%!44
*Wx2%=union%!48
4Wy2%=union%!52
>%I%=union%+88+(((union%!84)-1)*32)
H
Ix1%=I%!0
R
Iy1%=I%!4
\
Ix2%=I%!8
fIy2%=I%!12
p
If%=I%!16
zJ%=union%!84
�union%!84=J%-1
�*ș "Wimp_CreateWindow",,union% � main%
�oity1%=Iy1%
�oity2%=Iy2%
�ș "Wimp_CloseTemplate"
�-�bcol(Icon_abort%,12):�shade(Icon_abort%)
��
�:
�� �set_colours
��C%
�1� colours defined in memo from WStoye 21/7/88
�C_MenuTitlefg = 7
�C_MenuTitlebg = 2
	C_Menufg = 7
	C_Menubg = 0
	C_MenuItemfg = 7
	$C_MenuItembg = 0
	.�
	8:
	B
��version
	L� p%
	V!union%=info%
	`union%!4=3
	j"ș "Wimp_GetIconState",,union%
	tp%=union%!28
	~$p%=VersionStr$+�(0)
	��
	�:
	�� �terminate
	�� Task_h%>0 �
	�. � � ș "Wimp_CloseDown",&4B534154,Task_h%
	��
	�
 � � �
	��
	��
	��
	�
	���set_text(w%,i%,t$)
� p%

!union%=w%
union%!4=i%
"ș "Wimp_GetIconState",,union%
(p%=union%!28
2$p%=t$+�(0)
<union%!8=0
Funion%!12=0
P"ș "Wimp_SetIconState",,union%
Z�
d:
nݤget_text(w%,i%)
x� p%
�!union%=w%
�union%!4=i%
�"ș "Wimp_GetIconState",,union%
�p%=union%!28
�=�GetStr(p%)
�:
���type_init
�� n%,l%,f%
�#� c%,i%,menuptr%,item$,M%,Mptr%
�Ct%=0:Ht%=44:M%=4
�menuptr%=menu_data%
�
�i%=0
$menuptr%="Filetypes"
7menuptr%?12=C_MenuTitlefg:menuptr%?13=C_MenuTitlebg
-menuptr%?14=C_Menufg:menuptr%?15=C_Menubg
"menuptr%!16=13*16
,!menuptr%!20=Ht%:menuptr%!24=0
6menuptr%+=28
J
n%=0:c%=0
T�
^Hș "XOS_ReadVarVal","File$Type_*"+�(0),union%,1024,n%,0 � ,,l%,n%;f%
h� �(f%�1) � c%=0 �
r  � l%>0 � c%=0 �
|    � c%>0 �
�      ?(union%+l%)=0
�0      t$=¤GetStr(n%),3)+" "+�GetStr(union%)
�      �t$;"     ";
�	    �
�      t$="All"
�	    �
�
    c%+=1
�    $tptr%=t$+�(0)
�    !menuptr%=0
�    menuptr%!4=-1
#    menuptr%!8=&07000021+(1<<8)
    menuptr%!12=tptr%
    menuptr%!16=-1
&"    menuptr%!20=13:� LEN(t$)+1
0    tptr%+=�(t$)+1
:    menuptr%+=24
D  �
N�
XA� (f%�1)<>0 � l%=0 � (menuptr%>menu_data%+menu_data_size%-24)
b#menuptr%!-24=(menuptr%!-24)�&80
v�
�:
���type_menu
�Meno%=2
�9ș "Wimp_CreateMenu",,menu_data%,Mouse_X%-64,Mouse_Y%
��
�:
� � �GetStr(s%) : � get string
�� n$
�!ȕ(?s%>31):n$+=�(?s%):s%+=1:�
�=n$
�:
�
��root
�� a$

>ș "XOS_ReadVarVal","Obey$Dir",union%,100,0,0 � ,,l%,n%;f%

a$=�GetStr(union%)

a$=�a$,�a$,"$"))

 "�set_text(main%,Icon_root%,a$)

*�

4

>ݤcheck_root(r$)

H)ș "XOS_FSControl",13,r$,0 � ,,fc%;f%

R� (f%�1)<>0 � =�

\� (fc%=0) � =�

f=�

p:

z��go

�%File$=�get_text(main%,Icon_name%)

�%� File$="" � �ns_error(msg$(0)):�

�%Type$=�get_text(main%,Icon_type%)

�J� Type$="All" � type%=-1 � ș "OS_ReadUnsigned",16,�Type$,3) � ,,type%

�%Root$=�get_text(main%,Icon_root%)

�%� Root$="" � �ns_error(msg$(1)):�

�0� �check_root(Root$) � �ns_error(msg$(16)):�

�*ș "XOS_File",5,Root$ � ObjectType%;f%

�"� f%�1 � �ns_error(msg$(14)):�

�+� ObjectType%=0 � �ns_error(msg$(12)):�

�+� ObjectType%=1 � �ns_error(msg$(13)):�

�oRoot$=Root$

�(Files%=�get_state(main%,Icon_files%)
&Dirs%=�get_state(main%,Icon_dirs%)
/� � Files% � � Dirs% � �ns_error(msg$(2)):�
mask%=0
$rptr%=0
.!recurse%=0
8
�start
B�
L:
V��ns_error(e$)
`
!union%=0
j$(union%+4)=e$+�(0)
t*ș "Wimp_ReportError",union%,%1,"Find"
~�
�:
�ݤget_state(w%,i%)
�� p%
�!union%=w%
�union%!4=i%
�"ș "Wimp_GetIconState",,union%
�p%=union%!24
�=(p%�(1<<21))>0
�:
�
��null
�� start% �
�
    on%=0
	    �

C     ș "OS_GBPB",10,Root$,union%,1,on%,1024,File$ � ,,,no%,on%
     � no%=1 �
%       � Dirs%=� � union%!&10=2 �
(=          �copy_icon(iptr%,Root$+"."+�GetStr(union%+&14))
2          � mask%=1 � �
<       �
FT          � Files%=� � union%!&10=1 � (type%=-1 � (((!union%)>>8)�&FFF)=type%) �
P?            �copy_icon(iptr%,Root$+"."+�GetStr(union%+&14))
Z            � mask%=1 � �
d          �
n       �
x
     �
�    � on%=-1
�start%=�
��
�
�Nș "XOS_GBPB",10,Root$,union%,1,recurse%!rptr%,1024,"*" � r0%,,,no%,on%;f%
�recurse%!rptr%=on%
�� on%=-1 �
�=  � rptr%=0 � �stop:mask%=1:� � Root$=�tp(Root$):rptr%-=4
��
�
� no%=1 �
�  ObjectType%=union%!&10
�  � ObjectType%=2 �
�+    Root$=Root$+"."+�GetStr(union%+&14)
)    �set_text(main%,Icon_root%,Root$)

    on%=0
	    �
"C     ș "OS_GBPB",10,Root$,union%,1,on%,1024,File$ � ,,,no%,on%
,     � no%=1 �
6!       f$=�GetStr(union%+&14)
@%       � Dirs%=� � union%!&10=2 �
J,          �copy_icon(iptr%,Root$+"."+f$)
T          � mask%=1 � �
^       �
hT          � Files%=� � union%!&10=1 � (type%=-1 � (((!union%)>>8)�&FFF)=type%) �
r.            �copy_icon(iptr%,Root$+"."+f$)
|            � mask%=1 � �
�          �
�       �
�
     �
�    � on%=-1
�!    rptr%+=4:recurse%!rptr%=0
�  �
��
��
�
�ݤtp(t$)
�� s%,c$
�s%=0
�1�:c$=�t$,�(t$)-s%,1):s%+=1:�c$="." � s%=�(t$)
� s%<�(t$) � =�t$,�(t$)-s%)
=t$

&
��full
05�("*POINTER 1"):�ns_error(msg$(15)):mask%=1:�stop
:�
D
N��copy_icon(i%,t$)
X'� (&8000+CurrSize%)-fptr%<�(t$)+1 �
b  � � �mem_add � �full:�
l�
v!union%=main%
�union%!4=Ix1%
�union%!8=Iy1%
�union%!12=Ix2%
�union%!16=Iy2%
�union%!20=If%
�union%!24=fptr%
�union%!28=-1:� val%
�union%!32=�(t$)+1
�$fptr%=t$+�(0)
�fptr%+=�(t$)+1
�(ș "Wimp_CreateIcon",,union% � iptr%
�3ș "Wimp_ForceRedraw",main%,Ix1%,Iy1%,Ix2%,Iy2%
�Iy1%-=Space2%
Iy2%-=Space2%
0� Wy1%=OWy1% � Wy1%-=Space1% � Wy1%-=Space2%
union%!0=Wx1%
 union%!4=Wy1%
*union%!8=Wx2%
4union%!12=Wy2%
>$ș "Wimp_SetExtent",main%,union%
H
� ENDPROC
R!union%=main%
\$ș "Wimp_GetWindowState",,union%
f � resize% � union%!8=-102400
p!� bottom% � union%!24=-102400
z ș "Wimp_OpenWindow",,union%
��
�
���start
�!ș "Wimp_SetCaretPosition",-1
�'�bcol(Icon_go%,12):�shade(Icon_go%)
��shade(Icon_files%)
��shade(Icon_dirs%)
��shade(Icon_name%)
��shade(Icon_root%)
��shade(Icon_type%)
�.�unshade(Icon_abort%):�bcol(Icon_abort%,2)
�� iptr%>0 �
�  !union%=main%
  � N%=Icon_first% � iptr%
    union%!4=N%
$    ș "Wimp_DeleteIcon",,union%
$  �
.  Wy1%=OWy1%
8  union%!0=Wx1%
B  union%!4=Wy1%
L  union%!8=Wx2%
V  union%!12=Wy2%
`&  ș "Wimp_SetExtent",main%,union%
j  !union%=main%
t&  ș "Wimp_GetWindowState",,union%
~"  ș "Wimp_OpenWindow",,union%
�Iy1%=oity1%
�Iy2%=oity2%
��
�iptr%=0
��mem_reinit
�� fptr%=FNmem_add
�fptr%=�+512
�fptr%=&8000+ProgSize%
�start%=�
�� �own � �my_ptr
��
�

��stop

&�set_text(main%,Icon_root%,oRoot$)
%�set_text(main%,Icon_name%,File$)
(�unshade(Icon_go%):�bcol(Icon_go%,2)
(�unshade(Icon_files%)
2�unshade(Icon_dirs%)
<�unshade(Icon_name%)
F�unshade(Icon_root%)
P�unshade(Icon_type%)
Z-�bcol(Icon_abort%,12):�shade(Icon_abort%)
d�("*POINTER 1"):Own%=�
n�
x
���unshade(i%)
�!union%=main%
�union%!4=i%
�union%!8=0
�union%!12=(1<<22)
�"ș "Wimp_SetIconState",,union%
��
�
���shade(i%)
�!union%=main%
�union%!4=i%
�union%!8=(1<<22)
�union%!12=(1<<22)
"ș "Wimp_SetIconState",,union%
�
:
"��bcol(i%,c%)
,!union%=main%
6union%!4=i%
@union%!8=(c%<<28)
Junion%!12=(15<<28)
T"ș "Wimp_SetIconState",,union%
^�
h:
r� �DataLoadAck(ref%)
|union%!0 = 20
�union%!12 = ref%
� union%!16 = 4 :� DataLoadAck
�:ș "Wimp_SendMessage",17,union% :� acknowledge message
��
�:
���check_dir(f$)
�#ș "OS_File",5,f$ � ObjectType%
�4� ObjectType%=2 � �set_text(main%,Icon_root%,f$)
��
�:
���read_msg
�� N%,F%
�F%=�("<Obey$Dir>.Messages")
msg_no%=�(�#F%)-1
� msg$(msg_no%)
� N%=0 � msg_no%
&  msg$(N%)=�#F%
0�
:�#F%
D�
N:
X
��help
bDo_help%=�
lunion%!12=union%!8
vunion%!16=&503
�help%=union%+20
�hw%=union%!32:hi%=union%!36
�� hw%=-2 �
�  �help_txt(msg$(11))
��
�
 Ȏ hi% �
�&   � Icon_name%:�help_txt(msg$(3))
�&   � Icon_type%:�help_txt(msg$(4))
�&   � Icon_root%:�help_txt(msg$(5))
�'   � Icon_abort%:�help_txt(msg$(6))
�'   � Icon_files%:�help_txt(msg$(7))
�&   � Icon_dirs%:�help_txt(msg$(8))
�$   � Icon_go%:�help_txt(msg$(9))
 �
- � hi%>=Icon_first% � �help_txt(msg$(10))
�
 � Do_help% �
**  ?help%=0:!union%=(help%+4-union%)��3
4.  ș "Wimp_SendMessage",17,union%,union%!4
>�
H�
R
\<� �help_txt(a$) $help%=a$+"|M":help%+=�a$+2:Do_help%=�:�
f
p��default_ptr
z� mask%=0 �
�  �("*POINTER 1")
�  Own%=�
��
��
�
���my_ptr
�� mask%=0 �
�2  ș "Wimp_SpriteOp",36,1,"ptr_find",2,8,5,0,0
�  Own%=�
��
��
�
�	ݤown
$ș "Wimp_GetPointerInfo",,union%
� union%!12=main% � =�
=�
$
.��mem_init
8)ș "XWimp_SlotSize",-1,-1 � ProgSize%
BCurrSize%=ProgSize%
L�
V
`
ݤmem_add
j� c%
tc%=CurrSize%
~5ș "XWimp_SlotSize",CurrSize%+1024,-1 � CurrSize%
�� CurrSize%=c% � =�
�=�
�
���mem_reinit
�$ș "XWimp_SlotSize",ProgSize%,-1
�CurrSize%=ProgSize%
��
�
���read_sys_var
�� f%,o$
�
resize%=�
�
bottom%=�
=ș "XOS_ReadVarVal","Find$Options",union%,1024,0,0 � ,;f%

� f%�1 � �
o$=�GetStr(union%)
%� �o$,"B") � �o$,"b") � bottom%=�
(%� �o$,"R") � �o$,"r") � resize%=�
2�
�
00000000  0d 00 0a 23 f4 20 3e 24  2e 55 74 69 6c 2a 2e 44  |...#. >$.Util*.D|
00000010  69 73 63 2e 21 46 69 6e  64 2e 21 52 75 6e 49 6d  |isc.!Find.!RunIm|
00000020  61 67 65 0d 00 14 04 0d  00 1e 1a 50 72 6f 67 6e  |age........Progn|
00000030  61 6d 65 24 20 20 20 20  20 20 3d 22 46 69 6e 64  |ame$      ="Find|
00000040  22 0d 00 28 26 56 65 72  73 69 6f 6e 53 74 72 24  |"..(&VersionStr$|
00000050  20 20 20 20 3d 22 31 2e  30 39 20 28 31 36 2d 44  |    ="1.09 (16-D|
00000060  65 63 2d 39 30 29 22 0d  00 32 04 0d 00 3c 10 49  |ec-90)"..2...<.I|
00000070  63 6f 6e 5f 6e 61 6d 65  25 3d 33 0d 00 46 10 49  |con_name%=3..F.I|
00000080  63 6f 6e 5f 74 79 70 65  25 3d 35 0d 00 50 10 49  |con_type%=5..P.I|
00000090  63 6f 6e 5f 72 6f 6f 74  25 3d 37 0d 00 5a 11 49  |con_root%=7..Z.I|
000000a0  63 6f 6e 5f 66 69 6c 65  73 25 3d 38 0d 00 64 10  |con_files%=8..d.|
000000b0  49 63 6f 6e 5f 64 69 72  73 25 3d 39 0d 00 6e 0f  |Icon_dirs%=9..n.|
000000c0  49 63 6f 6e 5f 67 6f 25  3d 31 30 0d 00 78 12 49  |Icon_go%=10..x.I|
000000d0  63 6f 6e 5f 61 62 6f 72  74 25 3d 31 31 0d 00 82  |con_abort%=11...|
000000e0  12 49 63 6f 6e 5f 66 69  72 73 74 25 3d 31 32 0d  |.Icon_first%=12.|
000000f0  00 8c 0b 69 70 74 72 25  3d 30 0d 00 96 0e 53 70  |...iptr%=0....Sp|
00000100  61 63 65 31 25 3d 36 30  0d 00 a0 0e 53 70 61 63  |ace1%=60....Spac|
00000110  65 32 25 3d 34 38 0d 00  aa 0c 6d 65 6e 75 24 3d  |e2%=48....menu$=|
00000120  22 22 0d 00 b4 10 6d 65  6e 75 5f 64 61 74 61 25  |""....menu_data%|
00000130  3d 30 0d 00 be 3b c8 99  20 22 57 69 6d 70 5f 49  |=0...;.. "Wimp_I|
00000140  6e 69 74 69 61 6c 69 73  65 22 2c 32 30 30 2c 26  |nitialise",200,&|
00000150  34 42 35 33 34 31 35 34  2c 50 72 6f 67 6e 61 6d  |4B534154,Prognam|
00000160  65 24 20 b8 20 2c 54 61  73 6b 5f 68 25 0d 00 c8  |e$ . ,Task_h%...|
00000170  11 de 20 75 6e 69 6f 6e  25 20 31 30 32 34 0d 00  |.. union% 1024..|
00000180  d2 1a 74 65 6d 70 5f 64  61 74 61 5f 73 69 7a 65  |..temp_data_size|
00000190  25 3d 34 2a 31 30 32 34  0d 00 dc 20 de 20 74 65  |%=4*1024... . te|
000001a0  6d 70 5f 64 61 74 61 25  20 74 65 6d 70 5f 64 61  |mp_data% temp_da|
000001b0  74 61 5f 73 69 7a 65 25  0d 00 e6 1a 6d 65 6e 75  |ta_size%....menu|
000001c0  5f 64 61 74 61 5f 73 69  7a 65 25 3d 35 2a 31 30  |_data_size%=5*10|
000001d0  32 34 0d 00 f0 20 de 20  6d 65 6e 75 5f 64 61 74  |24... . menu_dat|
000001e0  61 25 20 6d 65 6e 75 5f  64 61 74 61 5f 73 69 7a  |a% menu_data_siz|
000001f0  65 25 0d 00 fa 0f de 20  6d 65 6e 75 25 20 31 30  |e%..... menu% 10|
00000200  30 0d 01 04 12 de 20 72  65 63 75 72 73 65 25 20  |0..... recurse% |
00000210  32 35 36 0d 01 0e 13 de  20 66 77 5f 63 6f 64 65  |256..... fw_code|
00000220  25 20 31 31 30 30 0d 01  18 34 c8 99 20 22 4f 53  |% 1100...4.. "OS|
00000230  5f 46 69 6c 65 22 2c 26  46 46 2c 22 3c 4f 62 65  |_File",&FF,"<Obe|
00000240  79 24 44 69 72 3e 2e 46  57 5f 63 6f 64 65 22 2c  |y$Dir>.FW_code",|
00000250  66 77 5f 63 6f 64 65 25  2c 30 0d 01 22 10 69 63  |fw_code%,0..".ic|
00000260  6f 6e 5f 74 65 6d 70 25  3d 30 0d 01 2c 20 de 20  |on_temp%=0.., . |
00000270  76 61 6c 25 20 38 3a 24  76 61 6c 25 3d 22 75 30  |val% 8:$val%="u0|
00000280  2c 30 2c 34 22 2b bd 28  30 29 0d 01 36 0d f2 72  |,0,4"+.(0)..6..r|
00000290  65 61 64 5f 6d 73 67 0d  01 40 0e f2 74 65 6d 70  |ead_msg..@..temp|
000002a0  6c 61 74 65 73 0d 01 4a  10 f2 73 65 74 5f 63 6f  |lates..J..set_co|
000002b0  6c 6f 75 72 73 0d 01 54  0c f2 76 65 72 73 69 6f  |lours..T..versio|
000002c0  6e 0d 01 5e 0e f2 74 79  70 65 5f 69 6e 69 74 0d  |n..^..type_init.|
000002d0  01 72 09 f2 72 6f 6f 74  0d 01 7c 25 f2 73 65 74  |.r..root..|%.set|
000002e0  5f 74 65 78 74 28 6d 61  69 6e 25 2c 49 63 6f 6e  |_text(main%,Icon|
000002f0  5f 74 79 70 65 25 2c 22  41 6c 6c 22 29 0d 01 86  |_type%,"All")...|
00000300  0d f2 6d 65 6d 5f 69 6e  69 74 0d 01 90 11 f2 72  |..mem_init.....r|
00000310  65 61 64 5f 73 79 73 5f  76 61 72 0d 01 9a 10 4f  |ead_sys_var....O|
00000320  74 70 74 72 25 3d 74 70  74 72 25 0d 01 a4 04 0d  |tptr%=tptr%.....|
00000330  01 ae 12 20 21 75 6e 69  6f 6e 25 3d 6d 61 69 6e  |... !union%=main|
00000340  25 0d 01 b8 25 20 c8 99  20 22 57 69 6d 70 5f 47  |%...% .. "Wimp_G|
00000350  65 74 57 69 6e 64 6f 77  53 74 61 74 65 22 2c 2c  |etWindowState",,|
00000360  75 6e 69 6f 6e 25 0d 01  c2 21 20 c8 99 20 22 57  |union%...! .. "W|
00000370  69 6d 70 5f 4f 70 65 6e  57 69 6e 64 6f 77 22 2c  |imp_OpenWindow",|
00000380  2c 75 6e 69 6f 6e 25 0d  01 cc 37 20 c8 99 20 22  |,union%...7 .. "|
00000390  57 69 6d 70 5f 53 65 74  43 61 72 65 74 50 6f 73  |Wimp_SetCaretPos|
000003a0  69 74 69 6f 6e 22 2c 6d  61 69 6e 25 2c 49 63 6f  |ition",main%,Ico|
000003b0  6e 5f 6e 61 6d 65 25 2c  2c 2c 2d 31 2c 31 0d 01  |n_name%,,,-1,1..|
000003c0  d6 0d 4f 77 6e 25 3d a4  6f 77 6e 0d 01 e0 04 0d  |..Own%=.own.....|
000003d0  01 ea 0b 6d 61 73 6b 25  3d 31 0d 01 f4 05 f5 0d  |...mask%=1......|
000003e0  01 fe 24 c8 99 20 22 57  69 6d 70 5f 50 6f 6c 6c  |..$.. "Wimp_Poll|
000003f0  22 2c 6d 61 73 6b 25 2c  75 6e 69 6f 6e 25 20 b8  |",mask%,union% .|
00000400  20 52 25 0d 02 08 0b c8  8e 20 52 25 20 ca 0d 02  | R%...... R% ...|
00000410  12 0f 20 20 c9 20 30 3a  f2 6e 75 6c 6c 0d 02 1c  |..  . 0:.null...|
00000420  11 20 20 c9 20 31 3a f2  72 65 64 72 61 77 0d 02  |.  . 1:.redraw..|
00000430  26 26 20 20 c9 20 32 3a  c8 99 20 22 57 69 6d 70  |&&  . 2:.. "Wimp|
00000440  5f 4f 70 65 6e 57 69 6e  64 6f 77 22 2c 2c 75 6e  |_OpenWindow",,un|
00000450  69 6f 6e 25 0d 02 30 2f  20 20 c9 20 33 3a c8 99  |ion%..0/  . 3:..|
00000460  20 22 57 69 6d 70 5f 43  6c 6f 73 65 44 6f 77 6e  | "Wimp_CloseDown|
00000470  22 2c 26 34 42 35 33 34  31 35 34 2c 54 61 73 6b  |",&4B534154,Task|
00000480  5f 68 25 0d 02 3a 28 20  20 c9 20 34 3a e7 20 21  |_h%..:(  . 4:. !|
00000490  75 6e 69 6f 6e 25 3d 6d  61 69 6e 25 20 8c 20 f2  |union%=main% . .|
000004a0  64 65 66 61 75 6c 74 5f  70 74 72 0d 02 44 23 20  |default_ptr..D# |
000004b0  20 c9 20 35 3a e7 20 21  75 6e 69 6f 6e 25 3d 6d  | . 5:. !union%=m|
000004c0  61 69 6e 25 20 8c 20 f2  6d 79 5f 70 74 72 0d 02  |ain% . .my_ptr..|
000004d0  4e 1d 20 20 c9 20 36 3a  f2 6d 6f 75 73 65 5f 62  |N.  . 6:.mouse_b|
000004e0  75 74 74 6f 6e 5f 63 6c  69 63 6b 0d 02 58 0e 20  |utton_click..X. |
000004f0  20 c9 20 38 3a f2 6b 65  79 0d 02 62 1e 20 20 c9  | . 8:.key..b.  .|
00000500  20 39 20 3a f2 6d 65 6e  75 73 65 6c 65 63 74 28  | 9 :.menuselect(|
00000510  75 6e 69 6f 6e 25 29 0d  02 6c 19 20 20 c9 20 31  |union%)..l.  . 1|
00000520  37 2c 31 38 2c 31 39 3a  f2 72 65 63 65 69 76 65  |7,18,19:.receive|
00000530  0d 02 76 05 cb 0d 02 80  07 fd 20 a3 0d 02 8a 05  |..v....... .....|
00000540  e0 0d 02 94 04 0d 02 9e  09 dd f2 6b 65 79 0d 02  |...........key..|
00000550  a8 15 e7 20 21 75 6e 69  6f 6e 25 3d 6d 61 69 6e  |... !union%=main|
00000560  25 20 8c 0d 02 b2 3b 20  20 e7 20 75 6e 69 6f 6e  |% ....;  . union|
00000570  25 21 32 34 3d 31 33 20  8c 20 f2 67 6f 20 8b 20  |%!24=13 . .go . |
00000580  c8 99 20 22 57 69 6d 70  5f 50 72 6f 63 65 73 73  |.. "Wimp_Process|
00000590  4b 65 79 22 2c 75 6e 69  6f 6e 25 21 32 34 0d 02  |Key",union%!24..|
000005a0  bc 05 cc 0d 02 c6 24 20  20 c8 99 20 22 57 69 6d  |......$  .. "Wim|
000005b0  70 5f 50 72 6f 63 65 73  73 4b 65 79 22 2c 75 6e  |p_ProcessKey",un|
000005c0  69 6f 6e 25 21 32 34 0d  02 d0 05 cd 0d 02 da 05  |ion%!24.........|
000005d0  e1 0d 02 e4 04 0d 02 ee  0c dd f2 72 65 64 72 61  |...........redra|
000005e0  77 0d 02 f8 08 ea 20 6e  25 0d 03 02 2a c8 99 20  |w..... n%...*.. |
000005f0  22 57 69 6d 70 5f 52 65  64 72 61 77 57 69 6e 64  |"Wimp_RedrawWind|
00000600  6f 77 22 2c 2c 75 6e 69  6f 6e 25 20 b8 20 6d 6f  |ow",,union% . mo|
00000610  72 65 25 0d 03 0c 0c c8  95 20 6d 6f 72 65 25 0d  |re%...... more%.|
00000620  03 16 1a 20 20 41 25 3d  31 32 20 3a f4 20 6e 72  |...  A%=12 :. nr|
00000630  20 6f 66 20 69 63 6f 6e  73 0d 03 20 0f 20 20 42  | of icons.. .  B|
00000640  25 3d 75 6e 69 6f 6e 25  0d 03 2a 16 20 20 d6 20  |%=union%..*.  . |
00000650  66 77 5f 63 6f 64 65 25  2c 41 25 2c 42 25 0d 03  |fw_code%,A%,B%..|
00000660  34 2c 20 20 c8 99 20 22  57 69 6d 70 5f 47 65 74  |4,  .. "Wimp_Get|
00000670  52 65 63 74 61 6e 67 6c  65 22 2c 2c 75 6e 69 6f  |Rectangle",,unio|
00000680  6e 25 20 b8 20 6d 6f 72  65 25 0d 03 3e 05 ce 0d  |n% . more%..>...|
00000690  03 48 05 e1 0d 03 52 05  3a 0d 03 5c 0e dd 20 f2  |.H....R.:..\.. .|
000006a0  72 65 63 65 69 76 65 0d  03 66 26 ea 20 74 61 73  |receive..f&. tas|
000006b0  6b 25 2c 20 72 65 66 25  2c 74 61 73 6b 6e 61 6d  |k%, ref%,tasknam|
000006c0  65 24 2c 6e 65 77 74 61  73 6b 69 64 25 0d 03 70  |e$,newtaskid%..p|
000006d0  15 72 65 66 25 20 3d 21  28 75 6e 69 6f 6e 25 2b  |.ref% =!(union%+|
000006e0  38 29 0d 03 7a 15 74 61  73 6b 25 3d 21 28 75 6e  |8)..z.task%=!(un|
000006f0  69 6f 6e 25 2b 34 29 0d  03 84 15 e7 20 74 61 73  |ion%+4)..... tas|
00000700  6b 25 3d 54 61 73 6b 5f  68 25 20 e1 0d 03 8e 12  |k%=Task_h% .....|
00000710  c8 8e 20 75 6e 69 6f 6e  25 21 31 36 20 ca 0d 03  |.. union%!16 ...|
00000720  98 13 20 c9 20 30 3a f2  74 65 72 6d 69 6e 61 74  |.. . 0:.terminat|
00000730  65 0d 03 a2 46 20 c9 20  33 3a e7 20 6d 61 73 6b  |e...F . 3:. mask|
00000740  25 3d 31 20 8c 20 f2 63  68 65 63 6b 5f 64 69 72  |%=1 . .check_dir|
00000750  28 a4 47 65 74 53 74 72  28 75 6e 69 6f 6e 25 2b  |(.GetStr(union%+|
00000760  34 34 29 29 3a f2 44 61  74 61 4c 6f 61 64 41 63  |44)):.DataLoadAc|
00000770  6b 28 72 65 66 25 29 0d  03 ac 0d 20 c9 20 26 34  |k(ref%).... . &4|
00000780  30 30 43 32 0d 03 b6 36  20 20 74 61 73 6b 6e 61  |00C2...6  taskna|
00000790  6d 65 24 3d a4 47 65 74  53 74 72 28 75 6e 69 6f  |me$=.GetStr(unio|
000007a0  6e 25 2b 32 38 29 3a 6e  65 77 74 61 73 6b 69 64  |n%+28):newtaskid|
000007b0  25 3d 75 6e 69 6f 6e 25  21 34 0d 03 c0 33 20 20  |%=union%!4...3  |
000007c0  e7 20 74 61 73 6b 6e 61  6d 65 24 3d 50 72 6f 67  |. taskname$=Prog|
000007d0  6e 61 6d 65 24 20 80 20  6e 65 77 74 61 73 6b 69  |name$ . newtaski|
000007e0  64 25 3c 3e 54 61 73 6b  5f 68 25 20 8c 0d 03 ca  |d%<>Task_h% ....|
000007f0  11 20 20 20 f2 74 65 72  6d 69 6e 61 74 65 0d 03  |.   .terminate..|
00000800  d4 07 20 20 cd 0d 03 de  11 20 c9 20 26 35 30 32  |..  ..... . &502|
00000810  3a f2 68 65 6c 70 0d 03  e8 1e 20 c9 20 26 34 30  |:.help.... . &40|
00000820  30 43 31 3a e7 20 4f 77  6e 25 20 8c 20 f2 6d 79  |0C1:. Own% . .my|
00000830  5f 70 74 72 0d 03 f2 05  cb 0d 03 fc 05 e1 0d 04  |_ptr............|
00000840  06 05 3a 0d 04 10 19 dd  20 f2 6d 6f 75 73 65 5f  |..:..... .mouse_|
00000850  62 75 74 74 6f 6e 5f 63  6c 69 63 6b 0d 04 1a 15  |button_click....|
00000860  ea 42 25 2c 43 25 2c 57  25 2c 49 25 2c 69 6e 63  |.B%,C%,W%,I%,inc|
00000870  25 0d 04 24 1d 57 25 3d  75 6e 69 6f 6e 25 21 31  |%..$.W%=union%!1|
00000880  32 3a 49 25 3d 75 6e 69  6f 6e 25 21 31 36 0d 04  |2:I%=union%!16..|
00000890  2e 16 42 25 3d 25 31 31  31 20 80 20 75 6e 69 6f  |..B%=%111 . unio|
000008a0  6e 25 21 38 0d 04 38 27  4d 6f 75 73 65 5f 58 25  |n%!8..8'Mouse_X%|
000008b0  3d 75 6e 69 6f 6e 25 21  30 3a 4d 6f 75 73 65 5f  |=union%!0:Mouse_|
000008c0  59 25 3d 75 6e 69 6f 6e  25 21 34 0d 04 42 16 e7  |Y%=union%!4..B..|
000008d0  20 28 42 25 80 35 29 20  80 20 57 25 3d 2d 32 20  | (B%.5) . W%=-2 |
000008e0  8c 0d 04 4c 12 20 21 75  6e 69 6f 6e 25 3d 6d 61  |...L. !union%=ma|
000008f0  69 6e 25 0d 04 56 25 20  c8 99 20 22 57 69 6d 70  |in%..V% .. "Wimp|
00000900  5f 47 65 74 57 69 6e 64  6f 77 53 74 61 74 65 22  |_GetWindowState"|
00000910  2c 2c 75 6e 69 6f 6e 25  0d 04 60 21 20 c8 99 20  |,,union%..`! .. |
00000920  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
00000930  22 2c 2c 75 6e 69 6f 6e  25 0d 04 6a 05 cd 0d 04  |",,union%..j....|
00000940  74 19 e7 20 28 42 25 80  35 29 20 80 20 57 25 3d  |t.. (B%.5) . W%=|
00000950  6d 61 69 6e 25 20 8c 0d  04 7e 1b 20 20 20 20 e7  |main% ...~.    .|
00000960  20 49 25 3d 49 63 6f 6e  5f 67 6f 25 20 8c 20 f2  | I%=Icon_go% . .|
00000970  67 6f 0d 04 88 28 20 20  20 20 e7 20 49 25 3d 49  |go...(    . I%=I|
00000980  63 6f 6e 5f 61 62 6f 72  74 25 20 8c 20 f2 73 74  |con_abort% . .st|
00000990  6f 70 3a 6d 61 73 6b 25  3d 31 0d 04 92 1b 20 20  |op:mask%=1....  |
000009a0  20 20 e7 20 49 25 3e 3d  49 63 6f 6e 5f 66 69 72  |  . I%>=Icon_fir|
000009b0  73 74 25 20 8c 0d 04 9c  36 20 20 20 20 20 20 ff  |st% ....6      .|
000009c0  28 22 46 69 6c 65 72 5f  4f 70 65 6e 44 69 72 20  |("Filer_OpenDir |
000009d0  22 2b a4 74 70 28 a4 67  65 74 5f 74 65 78 74 28  |"+.tp(.get_text(|
000009e0  6d 61 69 6e 25 2c 49 25  29 29 29 0d 04 a6 09 20  |main%,I%))).... |
000009f0  20 20 20 cd 0d 04 b0 05  cd 0d 04 ba 0e e7 20 28  |   ........... (|
00000a00  42 25 80 32 29 20 8c 0d  04 c4 22 20 20 e7 20 57  |B%.2) ...."  . W|
00000a10  25 3d 6d 61 69 6e 25 20  80 20 49 25 3d 49 63 6f  |%=main% . I%=Ico|
00000a20  6e 5f 74 79 70 65 25 20  8c 0d 04 ce 12 20 20 20  |n_type% .....   |
00000a30  20 f2 74 79 70 65 5f 6d  65 6e 75 0d 04 d8 07 20  | .type_menu.... |
00000a40  20 cc 0d 04 e2 11 20 20  20 20 e7 20 57 25 3d 2d  | .....    . W%=-|
00000a50  32 20 8c 0d 04 ec 39 20  20 20 20 20 20 f2 64 6f  |2 ....9      .do|
00000a60  6d 65 6e 75 28 31 30 31  2c 22 3e 49 6e 66 6f 2c  |menu(101,">Info,|
00000a70  51 75 69 74 22 2c 50 72  6f 67 6e 61 6d 65 24 2c  |Quit",Progname$,|
00000a80  6d 65 6e 75 25 2c 2d 31  2c 2d 31 29 0d 04 f6 09  |menu%,-1,-1)....|
00000a90  20 20 20 20 cc 0d 05 00  15 20 20 20 20 20 20 e7  |    .....      .|
00000aa0  20 6d 61 73 6b 25 3d 30  20 8c 0d 05 0a 53 20 20  | mask%=0 ....S  |
00000ab0  20 20 20 20 20 20 f2 64  6f 6d 65 6e 75 28 31 30  |      .domenu(10|
00000ac0  31 2c 22 3e 49 6e 66 6f  2c 41 62 6f 72 74 2c 51  |1,">Info,Abort,Q|
00000ad0  75 69 74 22 2c 50 72 6f  67 6e 61 6d 65 24 2c 6d  |uit",Progname$,m|
00000ae0  65 6e 75 25 2c 4d 6f 75  73 65 5f 58 25 2d 36 34  |enu%,Mouse_X%-64|
00000af0  2c 4d 6f 75 73 65 5f 59  25 2b 33 32 29 0d 05 14  |,Mouse_Y%+32)...|
00000b00  0b 20 20 20 20 20 20 cc  0d 05 1e 54 20 20 20 20  |.      ....T    |
00000b10  20 20 20 20 f2 64 6f 6d  65 6e 75 28 31 30 31 2c  |    .domenu(101,|
00000b20  22 3e 49 6e 66 6f 2c 7c  41 62 6f 72 74 2c 51 75  |">Info,|Abort,Qu|
00000b30  69 74 22 2c 50 72 6f 67  6e 61 6d 65 24 2c 6d 65  |it",Progname$,me|
00000b40  6e 75 25 2c 4d 6f 75 73  65 5f 58 25 2d 36 34 2c  |nu%,Mouse_X%-64,|
00000b50  4d 6f 75 73 65 5f 59 25  2b 33 32 29 0d 05 28 0b  |Mouse_Y%+32)..(.|
00000b60  20 20 20 20 20 20 cd 0d  05 32 09 20 20 20 20 cd  |      ...2.    .|
00000b70  0d 05 3c 07 20 20 cd 0d  05 46 05 cd 0d 05 50 05  |..<.  ...F....P.|
00000b80  e1 0d 05 5a 05 3a 0d 05  64 36 dd 20 f2 64 6f 6d  |...Z.:..d6. .dom|
00000b90  65 6e 75 28 68 61 6e 64  6c 65 25 2c 6d 65 6e 75  |enu(handle%,menu|
00000ba0  24 2c 6d 65 6e 75 74 69  74 6c 65 24 2c 4d 62 75  |$,menutitle$,Mbu|
00000bb0  66 66 25 2c 4d 78 25 2c  4d 79 25 29 0d 05 6e 26  |ff%,Mx%,My%)..n&|
00000bc0  ea 20 43 25 2c 48 25 2c  69 25 2c 6d 65 6e 75 70  |. C%,H%,i%,menup|
00000bd0  74 72 25 2c 69 74 65 6d  24 2c 4d 25 2c 4d 70 74  |tr%,item$,M%,Mpt|
00000be0  72 25 0d 05 78 13 43 25  3d 30 3a 48 25 3d 34 34  |r%..x.C%=0:H%=44|
00000bf0  3a 4d 25 3d 34 0d 05 82  13 6d 65 6e 75 70 74 72  |:M%=4....menuptr|
00000c00  25 3d 4d 62 75 66 66 25  0d 05 8c 08 69 25 3d 30  |%=Mbuff%....i%=0|
00000c10  0d 05 96 18 24 6d 65 6e  75 70 74 72 25 3d 6d 65  |....$menuptr%=me|
00000c20  6e 75 74 69 74 6c 65 24  0d 05 a0 37 6d 65 6e 75  |nutitle$...7menu|
00000c30  70 74 72 25 3f 31 32 3d  43 5f 4d 65 6e 75 54 69  |ptr%?12=C_MenuTi|
00000c40  74 6c 65 66 67 3a 6d 65  6e 75 70 74 72 25 3f 31  |tlefg:menuptr%?1|
00000c50  33 3d 43 5f 4d 65 6e 75  54 69 74 6c 65 62 67 0d  |3=C_MenuTitlebg.|
00000c60  05 aa 2d 6d 65 6e 75 70  74 72 25 3f 31 34 3d 43  |..-menuptr%?14=C|
00000c70  5f 4d 65 6e 75 66 67 3a  6d 65 6e 75 70 74 72 25  |_Menufg:menuptr%|
00000c80  3f 31 35 3d 43 5f 4d 65  6e 75 62 67 0d 05 b4 12  |?15=C_Menubg....|
00000c90  6d 65 6e 75 70 74 72 25  21 31 36 3d 38 30 0d 05  |menuptr%!16=80..|
00000ca0  be 15 4d 70 74 72 25 3d  6d 65 6e 75 70 74 72 25  |..Mptr%=menuptr%|
00000cb0  2b 31 36 0d 05 c8 20 6d  65 6e 75 70 74 72 25 21  |+16... menuptr%!|
00000cc0  32 30 3d 48 25 3a 6d 65  6e 75 70 74 72 25 21 32  |20=H%:menuptr%!2|
00000cd0  34 3d 30 0d 05 d2 10 6d  65 6e 75 70 74 72 25 2b  |4=0....menuptr%+|
00000ce0  3d 32 38 0d 05 dc 15 f5  20 69 74 65 6d 24 3d a4  |=28..... item$=.|
00000cf0  70 61 72 28 22 2c 22 29  0d 05 e6 1f e7 20 a9 28  |par(",")..... .(|
00000d00  69 74 65 6d 24 29 3e 4d  25 20 8c 20 4d 25 3d a9  |item$)>M% . M%=.|
00000d10  28 69 74 65 6d 24 29 0d  05 f0 1a f2 6d 65 6e 75  |(item$).....menu|
00000d20  69 74 65 6d 28 69 74 65  6d 24 29 3a 43 25 2b 3d  |item(item$):C%+=|
00000d30  31 0d 05 fa 0e fd 20 69  74 65 6d 24 3d 22 22 0d  |1..... item$="".|
00000d40  06 04 12 21 4d 70 74 72  25 3d 4d 25 2a 31 36 2b  |...!Mptr%=M%*16+|
00000d50  38 0d 06 0e 23 6d 65 6e  75 70 74 72 25 21 2d 32  |8...#menuptr%!-2|
00000d60  34 3d 28 6d 65 6e 75 70  74 72 25 21 2d 32 34 29  |4=(menuptr%!-24)|
00000d70  84 26 38 30 0d 06 18 38  e7 20 4d 78 25 3c 30 20  |.&80...8. Mx%<0 |
00000d80  80 20 4d 79 25 3c 30 20  8c 20 4d 78 25 3d 4d 6f  |. My%<0 . Mx%=Mo|
00000d90  75 73 65 5f 58 25 2d 36  34 3a 4d 79 25 3d 39 36  |use_X%-64:My%=96|
00000da0  2b 28 28 43 25 2d 31 29  2a 48 25 29 0d 06 22 40  |+((C%-1)*H%).."@|
00000db0  e7 20 68 61 6e 64 6c 65  25 3d 31 30 31 20 8c 20  |. handle%=101 . |
00000dc0  4d 65 6e 6f 25 3d 31 3a  c8 99 20 22 57 69 6d 70  |Meno%=1:.. "Wimp|
00000dd0  5f 43 72 65 61 74 65 4d  65 6e 75 22 2c 2c 4d 62  |_CreateMenu",,Mb|
00000de0  75 66 66 25 2c 4d 78 25  2c 4d 79 25 0d 06 2c 05  |uff%,Mx%,My%..,.|
00000df0  e1 0d 06 36 05 3a 0d 06  40 16 dd 20 f2 6d 65 6e  |...6.:..@.. .men|
00000e00  75 69 74 65 6d 28 74 65  78 74 24 29 0d 06 4a 10  |uitem(text$)..J.|
00000e10  e7 20 74 65 78 74 24 3d  22 22 20 e1 0d 06 54 0f  |. text$="" ...T.|
00000e20  21 6d 65 6e 75 70 74 72  25 3d 30 0d 06 5e 11 6d  |!menuptr%=0..^.m|
00000e30  65 6e 75 70 74 72 25 21  34 3d 2d 31 0d 06 68 37  |enuptr%!4=-1..h7|
00000e40  e7 20 c0 74 65 78 74 24  2c 32 29 3d 22 3e 49 22  |. .text$,2)=">I"|
00000e50  20 6d 65 6e 75 70 74 72  25 21 34 3d 69 6e 66 6f  | menuptr%!4=info|
00000e60  25 20 3a 20 74 65 78 74  24 3d c1 74 65 78 74 24  |% : text$=.text$|
00000e70  2c 32 29 0d 06 72 4a e7  20 c0 74 65 78 74 24 2c  |,2)..rJ. .text$,|
00000e80  31 29 3d 22 23 22 20 6d  65 6e 75 70 74 72 25 21  |1)="#" menuptr%!|
00000e90  34 3d 31 3a 21 6d 65 6e  75 70 74 72 25 3d 21 6d  |4=1:!menuptr%=!m|
00000ea0  65 6e 75 70 74 72 25 20  84 20 38 20 3a 20 74 65  |enuptr% . 8 : te|
00000eb0  78 74 24 3d c1 74 65 78  74 24 2c 32 29 0d 06 7c  |xt$=.text$,2)..||
00000ec0  18 6d 65 6e 75 70 74 72  25 21 38 3d 26 30 37 30  |.menuptr%!8=&070|
00000ed0  30 30 30 32 31 0d 06 86  45 e7 20 c0 74 65 78 74  |00021...E. .text|
00000ee0  24 2c 31 29 3d 22 7c 22  20 6d 65 6e 75 70 74 72  |$,1)="|" menuptr|
00000ef0  25 21 38 3d 6d 65 6e 75  70 74 72 25 21 38 20 84  |%!8=menuptr%!8 .|
00000f00  20 28 31 3c 3c 32 32 29  20 3a 20 74 65 78 74 24  | (1<<22) : text$|
00000f10  3d c1 74 65 78 74 24 2c  32 29 0d 06 90 18 24 28  |=.text$,2)....$(|
00000f20  6d 65 6e 75 70 74 72 25  2b 31 32 29 3d 74 65 78  |menuptr%+12)=tex|
00000f30  74 24 0d 06 9a 10 6d 65  6e 75 70 74 72 25 2b 3d  |t$....menuptr%+=|
00000f40  32 34 0d 06 a4 05 e1 0d  06 ae 05 3a 0d 06 b8 10  |24.........:....|
00000f50  dd 20 a4 70 61 72 28 73  65 70 24 29 0d 06 c2 25  |. .par(sep$)...%|
00000f60  69 31 25 3d 69 25 2b 31  3a 69 25 3d a7 6d 65 6e  |i1%=i%+1:i%=.men|
00000f70  75 24 2b 73 65 70 24 2c  73 65 70 24 2c 69 31 25  |u$+sep$,sep$,i1%|
00000f80  29 0d 06 cc 17 3d c1 6d  65 6e 75 24 2c 69 31 25  |)....=.menu$,i1%|
00000f90  2c 69 25 2d 69 31 25 29  0d 06 d6 05 3a 0d 06 e0  |,i%-i1%)....:...|
00000fa0  19 dd 20 f2 6d 65 6e 75  73 65 6c 65 63 74 28 6d  |.. .menuselect(m|
00000fb0  65 6e 75 73 25 29 0d 06  ea 0b ea 20 61 24 2c 4d  |enus%)..... a$,M|
00000fc0  25 0d 06 f4 0f e7 20 4d  65 6e 6f 25 3d 31 20 8c  |%..... Meno%=1 .|
00000fd0  0d 06 fe 35 20 20 c8 99  20 22 57 69 6d 70 5f 44  |...5  .. "Wimp_D|
00000fe0  65 63 6f 64 65 4d 65 6e  75 22 2c 2c 6d 65 6e 75  |ecodeMenu",,menu|
00000ff0  25 2c 6d 65 6e 75 73 25  2c 74 70 74 72 25 20 b8  |%,menus%,tptr% .|
00001000  2c 2c 2c 61 24 0d 07 08  0f e7 20 61 24 3d 22 22  |,,,a$..... a$=""|
00001010  20 8c 20 e1 0d 07 12 0b  c8 8e 20 61 24 20 ca 0d  | . ....... a$ ..|
00001020  07 1c 1b 20 20 c9 20 22  51 75 69 74 22 3a f2 74  |...  . "Quit":.t|
00001030  65 72 6d 69 6e 61 74 65  3a e0 0d 07 26 1d 20 20  |erminate:...&.  |
00001040  c9 20 22 41 62 6f 72 74  22 3a f2 73 74 6f 70 3a  |. "Abort":.stop:|
00001050  6d 61 73 6b 25 3d 31 0d  07 30 0f 20 20 c9 20 22  |mask%=1..0.  . "|
00001060  49 6e 66 6f 22 3a 0d 07  3a 05 cb 0d 07 44 0e 20  |Info":..:....D. |
00001070  20 4d 25 3d 6d 65 6e 75  25 0d 07 4e 05 cc 0d 07  | M%=menu%..N....|
00001080  58 3a 20 20 c8 99 20 22  57 69 6d 70 5f 44 65 63  |X:  .. "Wimp_Dec|
00001090  6f 64 65 4d 65 6e 75 22  2c 2c 6d 65 6e 75 5f 64  |odeMenu",,menu_d|
000010a0  61 74 61 25 2c 6d 65 6e  75 73 25 2c 74 70 74 72  |ata%,menus%,tptr|
000010b0  25 20 b8 2c 2c 2c 61 24  0d 07 62 13 20 20 4d 25  |% .,,,a$..b.  M%|
000010c0  3d 6d 65 6e 75 5f 64 61  74 61 25 0d 07 6c 24 20  |=menu_data%..l$ |
000010d0  20 f2 73 65 74 5f 74 65  78 74 28 6d 61 69 6e 25  | .set_text(main%|
000010e0  2c 49 63 6f 6e 5f 74 79  70 65 25 2c 61 24 29 0d  |,Icon_type%,a$).|
000010f0  07 76 05 cd 0d 07 80 04  0d 07 8a 24 c8 99 20 22  |.v.........$.. "|
00001100  57 69 6d 70 5f 47 65 74  50 6f 69 6e 74 65 72 49  |Wimp_GetPointerI|
00001110  6e 66 6f 22 2c 2c 75 6e  69 6f 6e 25 0d 07 94 1b  |nfo",,union%....|
00001120  e7 20 28 21 28 75 6e 69  6f 6e 25 2b 38 29 20 80  |. (!(union%+8) .|
00001130  20 31 29 3e 30 20 8c 0d  07 9e 1e 20 20 c8 99 20  | 1)>0 .....  .. |
00001140  22 57 69 6d 70 5f 43 72  65 61 74 65 4d 65 6e 75  |"Wimp_CreateMenu|
00001150  22 2c 2c 4d 25 0d 07 a8  05 cd 0d 07 b2 05 e1 0d  |",,M%...........|
00001160  07 bc 04 0d 07 c6 0f dd  f2 74 65 6d 70 6c 61 74  |.........templat|
00001170  65 73 0d 07 d0 14 74 70  74 72 25 3d 74 65 6d 70  |es....tptr%=temp|
00001180  5f 64 61 74 61 25 0d 07  da 32 c8 99 20 22 57 69  |_data%...2.. "Wi|
00001190  6d 70 5f 4f 70 65 6e 54  65 6d 70 6c 61 74 65 22  |mp_OpenTemplate"|
000011a0  2c 2c 22 3c 4f 62 65 79  24 44 69 72 3e 2e 54 65  |,,"<Obey$Dir>.Te|
000011b0  6d 70 6c 61 74 65 73 22  0d 07 e4 59 c8 99 20 22  |mplates"...Y.. "|
000011c0  57 69 6d 70 5f 4c 6f 61  64 54 65 6d 70 6c 61 74  |Wimp_LoadTemplat|
000011d0  65 22 2c 2c 75 6e 69 6f  6e 25 2c 74 70 74 72 25  |e",,union%,tptr%|
000011e0  2c 74 65 6d 70 5f 64 61  74 61 25 2b 74 65 6d 70  |,temp_data%+temp|
000011f0  5f 64 61 74 61 5f 73 69  7a 65 25 2c 2d 31 2c 22  |_data_size%,-1,"|
00001200  49 6e 66 6f 22 2c 30 20  b8 20 2c 2c 74 70 74 72  |Info",0 . ,,tptr|
00001210  25 0d 07 ee 2a c8 99 20  22 57 69 6d 70 5f 43 72  |%...*.. "Wimp_Cr|
00001220  65 61 74 65 57 69 6e 64  6f 77 22 2c 2c 75 6e 69  |eateWindow",,uni|
00001230  6f 6e 25 20 b8 20 69 6e  66 6f 25 0d 07 f8 59 c8  |on% . info%...Y.|
00001240  99 20 22 57 69 6d 70 5f  4c 6f 61 64 54 65 6d 70  |. "Wimp_LoadTemp|
00001250  6c 61 74 65 22 2c 2c 75  6e 69 6f 6e 25 2c 74 70  |late",,union%,tp|
00001260  74 72 25 2c 74 65 6d 70  5f 64 61 74 61 25 2b 74  |tr%,temp_data%+t|
00001270  65 6d 70 5f 64 61 74 61  5f 73 69 7a 65 25 2c 2d  |emp_data_size%,-|
00001280  31 2c 22 4d 61 69 6e 22  2c 30 20 b8 20 2c 2c 74  |1,"Main",0 . ,,t|
00001290  70 74 72 25 0d 08 02 14  74 69 74 6c 65 25 3d 75  |ptr%....title%=u|
000012a0  6e 69 6f 6e 25 21 37 32  0d 08 0c 12 57 78 31 25  |nion%!72....Wx1%|
000012b0  3d 75 6e 69 6f 6e 25 21  34 30 0d 08 16 12 57 79  |=union%!40....Wy|
000012c0  31 25 3d 75 6e 69 6f 6e  25 21 34 34 0d 08 20 13  |1%=union%!44.. .|
000012d0  4f 57 79 31 25 3d 75 6e  69 6f 6e 25 21 34 34 0d  |OWy1%=union%!44.|
000012e0  08 2a 12 57 78 32 25 3d  75 6e 69 6f 6e 25 21 34  |.*.Wx2%=union%!4|
000012f0  38 0d 08 34 12 57 79 32  25 3d 75 6e 69 6f 6e 25  |8..4.Wy2%=union%|
00001300  21 35 32 0d 08 3e 25 49  25 3d 75 6e 69 6f 6e 25  |!52..>%I%=union%|
00001310  2b 38 38 2b 28 28 28 75  6e 69 6f 6e 25 21 38 34  |+88+(((union%!84|
00001320  29 2d 31 29 2a 33 32 29  0d 08 48 0d 49 78 31 25  |)-1)*32)..H.Ix1%|
00001330  3d 49 25 21 30 0d 08 52  0d 49 79 31 25 3d 49 25  |=I%!0..R.Iy1%=I%|
00001340  21 34 0d 08 5c 0d 49 78  32 25 3d 49 25 21 38 0d  |!4..\.Ix2%=I%!8.|
00001350  08 66 0e 49 79 32 25 3d  49 25 21 31 32 0d 08 70  |.f.Iy2%=I%!12..p|
00001360  0d 49 66 25 3d 49 25 21  31 36 0d 08 7a 10 4a 25  |.If%=I%!16..z.J%|
00001370  3d 75 6e 69 6f 6e 25 21  38 34 0d 08 84 12 75 6e  |=union%!84....un|
00001380  69 6f 6e 25 21 38 34 3d  4a 25 2d 31 0d 08 8e 2a  |ion%!84=J%-1...*|
00001390  c8 99 20 22 57 69 6d 70  5f 43 72 65 61 74 65 57  |.. "Wimp_CreateW|
000013a0  69 6e 64 6f 77 22 2c 2c  75 6e 69 6f 6e 25 20 b8  |indow",,union% .|
000013b0  20 6d 61 69 6e 25 0d 08  98 0f 6f 69 74 79 31 25  | main%....oity1%|
000013c0  3d 49 79 31 25 0d 08 a2  0f 6f 69 74 79 32 25 3d  |=Iy1%....oity2%=|
000013d0  49 79 32 25 0d 08 ac 1b  c8 99 20 22 57 69 6d 70  |Iy2%...... "Wimp|
000013e0  5f 43 6c 6f 73 65 54 65  6d 70 6c 61 74 65 22 0d  |_CloseTemplate".|
000013f0  08 b6 2d f2 62 63 6f 6c  28 49 63 6f 6e 5f 61 62  |..-.bcol(Icon_ab|
00001400  6f 72 74 25 2c 31 32 29  3a f2 73 68 61 64 65 28  |ort%,12):.shade(|
00001410  49 63 6f 6e 5f 61 62 6f  72 74 25 29 0d 08 c0 05  |Icon_abort%)....|
00001420  e1 0d 08 ca 05 3a 0d 08  d4 12 dd 20 f2 73 65 74  |.....:..... .set|
00001430  5f 63 6f 6c 6f 75 72 73  0d 08 de 07 ea 43 25 0d  |_colours.....C%.|
00001440  08 e8 31 f4 20 63 6f 6c  6f 75 72 73 20 64 65 66  |..1. colours def|
00001450  69 6e 65 64 20 69 6e 20  6d 65 6d 6f 20 66 72 6f  |ined in memo fro|
00001460  6d 20 57 53 74 6f 79 65  20 32 31 2f 37 2f 38 38  |m WStoye 21/7/88|
00001470  0d 08 f2 15 43 5f 4d 65  6e 75 54 69 74 6c 65 66  |....C_MenuTitlef|
00001480  67 20 3d 20 37 0d 08 fc  15 43 5f 4d 65 6e 75 54  |g = 7....C_MenuT|
00001490  69 74 6c 65 62 67 20 3d  20 32 0d 09 06 10 43 5f  |itlebg = 2....C_|
000014a0  4d 65 6e 75 66 67 20 3d  20 37 0d 09 10 10 43 5f  |Menufg = 7....C_|
000014b0  4d 65 6e 75 62 67 20 3d  20 30 0d 09 1a 14 43 5f  |Menubg = 0....C_|
000014c0  4d 65 6e 75 49 74 65 6d  66 67 20 3d 20 37 0d 09  |MenuItemfg = 7..|
000014d0  24 14 43 5f 4d 65 6e 75  49 74 65 6d 62 67 20 3d  |$.C_MenuItembg =|
000014e0  20 30 0d 09 2e 05 e1 0d  09 38 05 3a 0d 09 42 0d  | 0.......8.:..B.|
000014f0  dd f2 76 65 72 73 69 6f  6e 0d 09 4c 08 ea 20 70  |..version..L.. p|
00001500  25 0d 09 56 11 21 75 6e  69 6f 6e 25 3d 69 6e 66  |%..V.!union%=inf|
00001510  6f 25 0d 09 60 0e 75 6e  69 6f 6e 25 21 34 3d 33  |o%..`.union%!4=3|
00001520  0d 09 6a 22 c8 99 20 22  57 69 6d 70 5f 47 65 74  |..j".. "Wimp_Get|
00001530  49 63 6f 6e 53 74 61 74  65 22 2c 2c 75 6e 69 6f  |IconState",,unio|
00001540  6e 25 0d 09 74 10 70 25  3d 75 6e 69 6f 6e 25 21  |n%..t.p%=union%!|
00001550  32 38 0d 09 7e 18 24 70  25 3d 56 65 72 73 69 6f  |28..~.$p%=Versio|
00001560  6e 53 74 72 24 2b bd 28  30 29 0d 09 88 05 e1 0d  |nStr$+.(0)......|
00001570  09 92 05 3a 0d 09 9c 10  dd 20 f2 74 65 72 6d 69  |...:..... .termi|
00001580  6e 61 74 65 0d 09 a6 11  e7 20 54 61 73 6b 5f 68  |nate..... Task_h|
00001590  25 3e 30 20 8c 0d 09 b0  2e 20 ee 20 85 20 c8 99  |%>0 ..... . . ..|
000015a0  20 22 57 69 6d 70 5f 43  6c 6f 73 65 44 6f 77 6e  | "Wimp_CloseDown|
000015b0  22 2c 26 34 42 35 33 34  31 35 34 2c 54 61 73 6b  |",&4B534154,Task|
000015c0  5f 68 25 0d 09 ba 05 cc  0d 09 c4 0a 20 ee 20 85  |_h%......... . .|
000015d0  20 e0 0d 09 ce 05 cd 0d  09 d8 05 e0 0d 09 e2 05  | ...............|
000015e0  e1 0d 09 ec 04 0d 09 f6  18 dd f2 73 65 74 5f 74  |...........set_t|
000015f0  65 78 74 28 77 25 2c 69  25 2c 74 24 29 0d 0a 00  |ext(w%,i%,t$)...|
00001600  08 ea 20 70 25 0d 0a 0a  0e 21 75 6e 69 6f 6e 25  |.. p%....!union%|
00001610  3d 77 25 0d 0a 14 0f 75  6e 69 6f 6e 25 21 34 3d  |=w%....union%!4=|
00001620  69 25 0d 0a 1e 22 c8 99  20 22 57 69 6d 70 5f 47  |i%...".. "Wimp_G|
00001630  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 75 6e  |etIconState",,un|
00001640  69 6f 6e 25 0d 0a 28 10  70 25 3d 75 6e 69 6f 6e  |ion%..(.p%=union|
00001650  25 21 32 38 0d 0a 32 0f  24 70 25 3d 74 24 2b bd  |%!28..2.$p%=t$+.|
00001660  28 30 29 0d 0a 3c 0e 75  6e 69 6f 6e 25 21 38 3d  |(0)..<.union%!8=|
00001670  30 0d 0a 46 0f 75 6e 69  6f 6e 25 21 31 32 3d 30  |0..F.union%!12=0|
00001680  0d 0a 50 22 c8 99 20 22  57 69 6d 70 5f 53 65 74  |..P".. "Wimp_Set|
00001690  49 63 6f 6e 53 74 61 74  65 22 2c 2c 75 6e 69 6f  |IconState",,unio|
000016a0  6e 25 0d 0a 5a 05 e1 0d  0a 64 05 3a 0d 0a 6e 15  |n%..Z....d.:..n.|
000016b0  dd a4 67 65 74 5f 74 65  78 74 28 77 25 2c 69 25  |..get_text(w%,i%|
000016c0  29 0d 0a 78 08 ea 20 70  25 0d 0a 82 0e 21 75 6e  |)..x.. p%....!un|
000016d0  69 6f 6e 25 3d 77 25 0d  0a 8c 0f 75 6e 69 6f 6e  |ion%=w%....union|
000016e0  25 21 34 3d 69 25 0d 0a  96 22 c8 99 20 22 57 69  |%!4=i%...".. "Wi|
000016f0  6d 70 5f 47 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_GetIconState"|
00001700  2c 2c 75 6e 69 6f 6e 25  0d 0a a0 10 70 25 3d 75  |,,union%....p%=u|
00001710  6e 69 6f 6e 25 21 32 38  0d 0a aa 10 3d a4 47 65  |nion%!28....=.Ge|
00001720  74 53 74 72 28 70 25 29  0d 0a b4 05 3a 0d 0a be  |tStr(p%)....:...|
00001730  0f dd f2 74 79 70 65 5f  69 6e 69 74 0d 0a c8 0e  |...type_init....|
00001740  ea 20 6e 25 2c 6c 25 2c  66 25 0d 0a d2 23 ea 20  |. n%,l%,f%...#. |
00001750  63 25 2c 69 25 2c 6d 65  6e 75 70 74 72 25 2c 69  |c%,i%,menuptr%,i|
00001760  74 65 6d 24 2c 4d 25 2c  4d 70 74 72 25 0d 0a dc  |tem$,M%,Mptr%...|
00001770  15 43 74 25 3d 30 3a 48  74 25 3d 34 34 3a 4d 25  |.Ct%=0:Ht%=44:M%|
00001780  3d 34 0d 0a e6 17 6d 65  6e 75 70 74 72 25 3d 6d  |=4....menuptr%=m|
00001790  65 6e 75 5f 64 61 74 61  25 0d 0a f0 04 0d 0a fa  |enu_data%.......|
000017a0  08 69 25 3d 30 0d 0b 04  19 24 6d 65 6e 75 70 74  |.i%=0....$menupt|
000017b0  72 25 3d 22 46 69 6c 65  74 79 70 65 73 22 0d 0b  |r%="Filetypes"..|
000017c0  0e 37 6d 65 6e 75 70 74  72 25 3f 31 32 3d 43 5f  |.7menuptr%?12=C_|
000017d0  4d 65 6e 75 54 69 74 6c  65 66 67 3a 6d 65 6e 75  |MenuTitlefg:menu|
000017e0  70 74 72 25 3f 31 33 3d  43 5f 4d 65 6e 75 54 69  |ptr%?13=C_MenuTi|
000017f0  74 6c 65 62 67 0d 0b 18  2d 6d 65 6e 75 70 74 72  |tlebg...-menuptr|
00001800  25 3f 31 34 3d 43 5f 4d  65 6e 75 66 67 3a 6d 65  |%?14=C_Menufg:me|
00001810  6e 75 70 74 72 25 3f 31  35 3d 43 5f 4d 65 6e 75  |nuptr%?15=C_Menu|
00001820  62 67 0d 0b 22 15 6d 65  6e 75 70 74 72 25 21 31  |bg..".menuptr%!1|
00001830  36 3d 31 33 2a 31 36 0d  0b 2c 21 6d 65 6e 75 70  |6=13*16..,!menup|
00001840  74 72 25 21 32 30 3d 48  74 25 3a 6d 65 6e 75 70  |tr%!20=Ht%:menup|
00001850  74 72 25 21 32 34 3d 30  0d 0b 36 10 6d 65 6e 75  |tr%!24=0..6.menu|
00001860  70 74 72 25 2b 3d 32 38  0d 0b 4a 0d 6e 25 3d 30  |ptr%+=28..J.n%=0|
00001870  3a 63 25 3d 30 0d 0b 54  05 f5 0d 0b 5e 48 c8 99  |:c%=0..T....^H..|
00001880  20 22 58 4f 53 5f 52 65  61 64 56 61 72 56 61 6c  | "XOS_ReadVarVal|
00001890  22 2c 22 46 69 6c 65 24  54 79 70 65 5f 2a 22 2b  |","File$Type_*"+|
000018a0  bd 28 30 29 2c 75 6e 69  6f 6e 25 2c 31 30 32 34  |.(0),union%,1024|
000018b0  2c 6e 25 2c 30 20 b8 20  2c 2c 6c 25 2c 6e 25 3b  |,n%,0 . ,,l%,n%;|
000018c0  66 25 0d 0b 68 16 e7 20  ac 28 66 25 80 31 29 20  |f%..h.. .(f%.1) |
000018d0  84 20 63 25 3d 30 20 8c  0d 0b 72 15 20 20 e7 20  |. c%=0 ...r.  . |
000018e0  6c 25 3e 30 20 84 20 63  25 3d 30 20 8c 0d 0b 7c  |l%>0 . c%=0 ...||
000018f0  10 20 20 20 20 e7 20 63  25 3e 30 20 8c 0d 0b 86  |.    . c%>0 ....|
00001900  18 20 20 20 20 20 20 3f  28 75 6e 69 6f 6e 25 2b  |.      ?(union%+|
00001910  6c 25 29 3d 30 0d 0b ae  30 20 20 20 20 20 20 74  |l%)=0...0      t|
00001920  24 3d c2 a4 47 65 74 53  74 72 28 6e 25 29 2c 33  |$=..GetStr(n%),3|
00001930  29 2b 22 20 22 2b a4 47  65 74 53 74 72 28 75 6e  |)+" "+.GetStr(un|
00001940  69 6f 6e 25 29 0d 0b b8  16 20 20 20 20 20 20 f1  |ion%)....      .|
00001950  74 24 3b 22 20 20 20 20  20 22 3b 0d 0b c2 09 20  |t$;"     ";.... |
00001960  20 20 20 cc 0d 0b cc 12  20 20 20 20 20 20 74 24  |   .....      t$|
00001970  3d 22 41 6c 6c 22 0d 0b  d6 09 20 20 20 20 cd 0d  |="All"....    ..|
00001980  0b e0 0d 20 20 20 20 63  25 2b 3d 31 0d 0b ea 16  |...    c%+=1....|
00001990  20 20 20 20 24 74 70 74  72 25 3d 74 24 2b bd 28  |    $tptr%=t$+.(|
000019a0  30 29 0d 0b f4 13 20 20  20 20 21 6d 65 6e 75 70  |0)....    !menup|
000019b0  74 72 25 3d 30 0d 0b fe  15 20 20 20 20 6d 65 6e  |tr%=0....    men|
000019c0  75 70 74 72 25 21 34 3d  2d 31 0d 0c 08 23 20 20  |uptr%!4=-1...#  |
000019d0  20 20 6d 65 6e 75 70 74  72 25 21 38 3d 26 30 37  |  menuptr%!8=&07|
000019e0  30 30 30 30 32 31 2b 28  31 3c 3c 38 29 0d 0c 12  |000021+(1<<8)...|
000019f0  19 20 20 20 20 6d 65 6e  75 70 74 72 25 21 31 32  |.    menuptr%!12|
00001a00  3d 74 70 74 72 25 0d 0c  1c 16 20 20 20 20 6d 65  |=tptr%....    me|
00001a10  6e 75 70 74 72 25 21 31  36 3d 2d 31 0d 0c 26 22  |nuptr%!16=-1..&"|
00001a20  20 20 20 20 6d 65 6e 75  70 74 72 25 21 32 30 3d  |    menuptr%!20=|
00001a30  31 33 3a f4 20 4c 45 4e  28 74 24 29 2b 31 0d 0c  |13:. LEN(t$)+1..|
00001a40  30 16 20 20 20 20 74 70  74 72 25 2b 3d a9 28 74  |0.    tptr%+=.(t|
00001a50  24 29 2b 31 0d 0c 3a 14  20 20 20 20 6d 65 6e 75  |$)+1..:.    menu|
00001a60  70 74 72 25 2b 3d 32 34  0d 0c 44 07 20 20 cd 0d  |ptr%+=24..D.  ..|
00001a70  0c 4e 05 cd 0d 0c 58 41  fd 20 28 66 25 80 31 29  |.N....XA. (f%.1)|
00001a80  3c 3e 30 20 84 20 6c 25  3d 30 20 84 20 28 6d 65  |<>0 . l%=0 . (me|
00001a90  6e 75 70 74 72 25 3e 6d  65 6e 75 5f 64 61 74 61  |nuptr%>menu_data|
00001aa0  25 2b 6d 65 6e 75 5f 64  61 74 61 5f 73 69 7a 65  |%+menu_data_size|
00001ab0  25 2d 32 34 29 0d 0c 62  23 6d 65 6e 75 70 74 72  |%-24)..b#menuptr|
00001ac0  25 21 2d 32 34 3d 28 6d  65 6e 75 70 74 72 25 21  |%!-24=(menuptr%!|
00001ad0  2d 32 34 29 84 26 38 30  0d 0c 76 05 e1 0d 0c 80  |-24).&80..v.....|
00001ae0  05 3a 0d 0c 8a 0f dd f2  74 79 70 65 5f 6d 65 6e  |.:......type_men|
00001af0  75 0d 0c 94 0b 4d 65 6e  6f 25 3d 32 0d 0c 9e 39  |u....Meno%=2...9|
00001b00  c8 99 20 22 57 69 6d 70  5f 43 72 65 61 74 65 4d  |.. "Wimp_CreateM|
00001b10  65 6e 75 22 2c 2c 6d 65  6e 75 5f 64 61 74 61 25  |enu",,menu_data%|
00001b20  2c 4d 6f 75 73 65 5f 58  25 2d 36 34 2c 4d 6f 75  |,Mouse_X%-64,Mou|
00001b30  73 65 5f 59 25 0d 0c a8  05 e1 0d 0c b2 05 3a 0d  |se_Y%.........:.|
00001b40  0c bc 20 dd 20 a4 47 65  74 53 74 72 28 73 25 29  |.. . .GetStr(s%)|
00001b50  20 3a 20 f4 20 67 65 74  20 73 74 72 69 6e 67 0d  | : . get string.|
00001b60  0c c6 08 ea 20 6e 24 0d  0c d0 21 c8 95 28 3f 73  |.... n$...!..(?s|
00001b70  25 3e 33 31 29 3a 6e 24  2b 3d bd 28 3f 73 25 29  |%>31):n$+=.(?s%)|
00001b80  3a 73 25 2b 3d 31 3a ce  0d 0c da 07 3d 6e 24 0d  |:s%+=1:.....=n$.|
00001b90  0c e4 05 3a 0d 0c ee 0a  dd f2 72 6f 6f 74 0d 0c  |...:......root..|
00001ba0  f8 08 ea 20 61 24 0d 0d  02 3e c8 99 20 22 58 4f  |... a$...>.. "XO|
00001bb0  53 5f 52 65 61 64 56 61  72 56 61 6c 22 2c 22 4f  |S_ReadVarVal","O|
00001bc0  62 65 79 24 44 69 72 22  2c 75 6e 69 6f 6e 25 2c  |bey$Dir",union%,|
00001bd0  31 30 30 2c 30 2c 30 20  b8 20 2c 2c 6c 25 2c 6e  |100,0,0 . ,,l%,n|
00001be0  25 3b 66 25 0d 0d 0c 16  61 24 3d a4 47 65 74 53  |%;f%....a$=.GetS|
00001bf0  74 72 28 75 6e 69 6f 6e  25 29 0d 0d 16 14 61 24  |tr(union%)....a$|
00001c00  3d c0 61 24 2c a7 61 24  2c 22 24 22 29 29 0d 0d  |=.a$,.a$,"$"))..|
00001c10  20 22 f2 73 65 74 5f 74  65 78 74 28 6d 61 69 6e  | ".set_text(main|
00001c20  25 2c 49 63 6f 6e 5f 72  6f 6f 74 25 2c 61 24 29  |%,Icon_root%,a$)|
00001c30  0d 0d 2a 05 e1 0d 0d 34  04 0d 0d 3e 14 dd a4 63  |..*....4...>...c|
00001c40  68 65 63 6b 5f 72 6f 6f  74 28 72 24 29 0d 0d 48  |heck_root(r$)..H|
00001c50  29 c8 99 20 22 58 4f 53  5f 46 53 43 6f 6e 74 72  |).. "XOS_FSContr|
00001c60  6f 6c 22 2c 31 33 2c 72  24 2c 30 20 b8 20 2c 2c  |ol",13,r$,0 . ,,|
00001c70  66 63 25 3b 66 25 0d 0d  52 14 e7 20 28 66 25 80  |fc%;f%..R.. (f%.|
00001c80  31 29 3c 3e 30 20 8c 20  3d b9 0d 0d 5c 12 e7 20  |1)<>0 . =...\.. |
00001c90  28 66 63 25 3d 30 29 20  8c 20 3d b9 0d 0d 66 06  |(fc%=0) . =...f.|
00001ca0  3d a3 0d 0d 70 05 3a 0d  0d 7a 08 dd f2 67 6f 0d  |=...p.:..z...go.|
00001cb0  0d 84 25 46 69 6c 65 24  3d a4 67 65 74 5f 74 65  |..%File$=.get_te|
00001cc0  78 74 28 6d 61 69 6e 25  2c 49 63 6f 6e 5f 6e 61  |xt(main%,Icon_na|
00001cd0  6d 65 25 29 0d 0d 8e 25  e7 20 46 69 6c 65 24 3d  |me%)...%. File$=|
00001ce0  22 22 20 8c 20 f2 6e 73  5f 65 72 72 6f 72 28 6d  |"" . .ns_error(m|
00001cf0  73 67 24 28 30 29 29 3a  e1 0d 0d 98 25 54 79 70  |sg$(0)):....%Typ|
00001d00  65 24 3d a4 67 65 74 5f  74 65 78 74 28 6d 61 69  |e$=.get_text(mai|
00001d10  6e 25 2c 49 63 6f 6e 5f  74 79 70 65 25 29 0d 0d  |n%,Icon_type%)..|
00001d20  a2 4a e7 20 54 79 70 65  24 3d 22 41 6c 6c 22 20  |.J. Type$="All" |
00001d30  8c 20 74 79 70 65 25 3d  2d 31 20 8b 20 c8 99 20  |. type%=-1 . .. |
00001d40  22 4f 53 5f 52 65 61 64  55 6e 73 69 67 6e 65 64  |"OS_ReadUnsigned|
00001d50  22 2c 31 36 2c c0 54 79  70 65 24 2c 33 29 20 b8  |",16,.Type$,3) .|
00001d60  20 2c 2c 74 79 70 65 25  0d 0d ac 25 52 6f 6f 74  | ,,type%...%Root|
00001d70  24 3d a4 67 65 74 5f 74  65 78 74 28 6d 61 69 6e  |$=.get_text(main|
00001d80  25 2c 49 63 6f 6e 5f 72  6f 6f 74 25 29 0d 0d b6  |%,Icon_root%)...|
00001d90  25 e7 20 52 6f 6f 74 24  3d 22 22 20 8c 20 f2 6e  |%. Root$="" . .n|
00001da0  73 5f 65 72 72 6f 72 28  6d 73 67 24 28 31 29 29  |s_error(msg$(1))|
00001db0  3a e1 0d 0d c0 30 e7 20  a4 63 68 65 63 6b 5f 72  |:....0. .check_r|
00001dc0  6f 6f 74 28 52 6f 6f 74  24 29 20 8c 20 f2 6e 73  |oot(Root$) . .ns|
00001dd0  5f 65 72 72 6f 72 28 6d  73 67 24 28 31 36 29 29  |_error(msg$(16))|
00001de0  3a e1 0d 0d ca 2a c8 99  20 22 58 4f 53 5f 46 69  |:....*.. "XOS_Fi|
00001df0  6c 65 22 2c 35 2c 52 6f  6f 74 24 20 b8 20 4f 62  |le",5,Root$ . Ob|
00001e00  6a 65 63 74 54 79 70 65  25 3b 66 25 0d 0d d4 22  |jectType%;f%..."|
00001e10  e7 20 66 25 80 31 20 8c  20 f2 6e 73 5f 65 72 72  |. f%.1 . .ns_err|
00001e20  6f 72 28 6d 73 67 24 28  31 34 29 29 3a e1 0d 0d  |or(msg$(14)):...|
00001e30  de 2b e7 20 4f 62 6a 65  63 74 54 79 70 65 25 3d  |.+. ObjectType%=|
00001e40  30 20 8c 20 f2 6e 73 5f  65 72 72 6f 72 28 6d 73  |0 . .ns_error(ms|
00001e50  67 24 28 31 32 29 29 3a  e1 0d 0d e8 2b e7 20 4f  |g$(12)):....+. O|
00001e60  62 6a 65 63 74 54 79 70  65 25 3d 31 20 8c 20 f2  |bjectType%=1 . .|
00001e70  6e 73 5f 65 72 72 6f 72  28 6d 73 67 24 28 31 33  |ns_error(msg$(13|
00001e80  29 29 3a e1 0d 0d f2 10  6f 52 6f 6f 74 24 3d 52  |)):.....oRoot$=R|
00001e90  6f 6f 74 24 0d 0d fc 28  46 69 6c 65 73 25 3d a4  |oot$...(Files%=.|
00001ea0  67 65 74 5f 73 74 61 74  65 28 6d 61 69 6e 25 2c  |get_state(main%,|
00001eb0  49 63 6f 6e 5f 66 69 6c  65 73 25 29 0d 0e 06 26  |Icon_files%)...&|
00001ec0  44 69 72 73 25 3d a4 67  65 74 5f 73 74 61 74 65  |Dirs%=.get_state|
00001ed0  28 6d 61 69 6e 25 2c 49  63 6f 6e 5f 64 69 72 73  |(main%,Icon_dirs|
00001ee0  25 29 0d 0e 10 2f e7 20  ac 20 46 69 6c 65 73 25  |%).../. . Files%|
00001ef0  20 80 20 ac 20 44 69 72  73 25 20 8c 20 f2 6e 73  | . . Dirs% . .ns|
00001f00  5f 65 72 72 6f 72 28 6d  73 67 24 28 32 29 29 3a  |_error(msg$(2)):|
00001f10  e1 0d 0e 1a 0b 6d 61 73  6b 25 3d 30 0d 0e 24 0b  |.....mask%=0..$.|
00001f20  72 70 74 72 25 3d 30 0d  0e 2e 0f 21 72 65 63 75  |rptr%=0....!recu|
00001f30  72 73 65 25 3d 30 0d 0e  38 0a f2 73 74 61 72 74  |rse%=0..8..start|
00001f40  0d 0e 42 05 e1 0d 0e 4c  05 3a 0d 0e 56 12 dd f2  |..B....L.:..V...|
00001f50  6e 73 5f 65 72 72 6f 72  28 65 24 29 0d 0e 60 0d  |ns_error(e$)..`.|
00001f60  21 75 6e 69 6f 6e 25 3d  30 0d 0e 6a 17 24 28 75  |!union%=0..j.$(u|
00001f70  6e 69 6f 6e 25 2b 34 29  3d 65 24 2b bd 28 30 29  |nion%+4)=e$+.(0)|
00001f80  0d 0e 74 2a c8 99 20 22  57 69 6d 70 5f 52 65 70  |..t*.. "Wimp_Rep|
00001f90  6f 72 74 45 72 72 6f 72  22 2c 75 6e 69 6f 6e 25  |ortError",union%|
00001fa0  2c 25 31 2c 22 46 69 6e  64 22 0d 0e 7e 05 e1 0d  |,%1,"Find"..~...|
00001fb0  0e 88 05 3a 0d 0e 92 16  dd a4 67 65 74 5f 73 74  |...:......get_st|
00001fc0  61 74 65 28 77 25 2c 69  25 29 0d 0e 9c 08 ea 20  |ate(w%,i%)..... |
00001fd0  70 25 0d 0e a6 0e 21 75  6e 69 6f 6e 25 3d 77 25  |p%....!union%=w%|
00001fe0  0d 0e b0 0f 75 6e 69 6f  6e 25 21 34 3d 69 25 0d  |....union%!4=i%.|
00001ff0  0e ba 22 c8 99 20 22 57  69 6d 70 5f 47 65 74 49  |..".. "Wimp_GetI|
00002000  63 6f 6e 53 74 61 74 65  22 2c 2c 75 6e 69 6f 6e  |conState",,union|
00002010  25 0d 0e c4 10 70 25 3d  75 6e 69 6f 6e 25 21 32  |%....p%=union%!2|
00002020  34 0d 0e ce 13 3d 28 70  25 80 28 31 3c 3c 32 31  |4....=(p%.(1<<21|
00002030  29 29 3e 30 0d 0e d8 05  3a 0d 0e e2 0a dd f2 6e  |))>0....:......n|
00002040  75 6c 6c 0d 0e ec 0e e7  20 73 74 61 72 74 25 20  |ull..... start% |
00002050  8c 0d 0e f6 0d 20 20 20  20 6f 6e 25 3d 30 0d 0f  |.....    on%=0..|
00002060  00 09 20 20 20 20 f5 0d  0f 0a 43 20 20 20 20 20  |..    ....C     |
00002070  c8 99 20 22 4f 53 5f 47  42 50 42 22 2c 31 30 2c  |.. "OS_GBPB",10,|
00002080  52 6f 6f 74 24 2c 75 6e  69 6f 6e 25 2c 31 2c 6f  |Root$,union%,1,o|
00002090  6e 25 2c 31 30 32 34 2c  46 69 6c 65 24 20 b8 20  |n%,1024,File$ . |
000020a0  2c 2c 2c 6e 6f 25 2c 6f  6e 25 0d 0f 14 12 20 20  |,,,no%,on%....  |
000020b0  20 20 20 e7 20 6e 6f 25  3d 31 20 8c 0d 0f 1e 25  |   . no%=1 ....%|
000020c0  20 20 20 20 20 20 20 e7  20 44 69 72 73 25 3d b9  |       . Dirs%=.|
000020d0  20 80 20 75 6e 69 6f 6e  25 21 26 31 30 3d 32 20  | . union%!&10=2 |
000020e0  8c 0d 0f 28 3d 20 20 20  20 20 20 20 20 20 20 f2  |...(=          .|
000020f0  63 6f 70 79 5f 69 63 6f  6e 28 69 70 74 72 25 2c  |copy_icon(iptr%,|
00002100  52 6f 6f 74 24 2b 22 2e  22 2b a4 47 65 74 53 74  |Root$+"."+.GetSt|
00002110  72 28 75 6e 69 6f 6e 25  2b 26 31 34 29 29 0d 0f  |r(union%+&14))..|
00002120  32 1b 20 20 20 20 20 20  20 20 20 20 e7 20 6d 61  |2.          . ma|
00002130  73 6b 25 3d 31 20 8c 20  e1 0d 0f 3c 0c 20 20 20  |sk%=1 . ...<.   |
00002140  20 20 20 20 cc 0d 0f 46  54 20 20 20 20 20 20 20  |    ...FT       |
00002150  20 20 20 e7 20 46 69 6c  65 73 25 3d b9 20 80 20  |   . Files%=. . |
00002160  75 6e 69 6f 6e 25 21 26  31 30 3d 31 20 80 20 28  |union%!&10=1 . (|
00002170  74 79 70 65 25 3d 2d 31  20 84 20 28 28 28 21 75  |type%=-1 . (((!u|
00002180  6e 69 6f 6e 25 29 3e 3e  38 29 80 26 46 46 46 29  |nion%)>>8).&FFF)|
00002190  3d 74 79 70 65 25 29 20  8c 0d 0f 50 3f 20 20 20  |=type%) ...P?   |
000021a0  20 20 20 20 20 20 20 20  20 f2 63 6f 70 79 5f 69  |         .copy_i|
000021b0  63 6f 6e 28 69 70 74 72  25 2c 52 6f 6f 74 24 2b  |con(iptr%,Root$+|
000021c0  22 2e 22 2b a4 47 65 74  53 74 72 28 75 6e 69 6f  |"."+.GetStr(unio|
000021d0  6e 25 2b 26 31 34 29 29  0d 0f 5a 1d 20 20 20 20  |n%+&14))..Z.    |
000021e0  20 20 20 20 20 20 20 20  e7 20 6d 61 73 6b 25 3d  |        . mask%=|
000021f0  31 20 8c 20 e1 0d 0f 64  0f 20 20 20 20 20 20 20  |1 . ...d.       |
00002200  20 20 20 cd 0d 0f 6e 0c  20 20 20 20 20 20 20 cd  |   ...n.       .|
00002210  0d 0f 78 0a 20 20 20 20  20 cd 0d 0f 82 10 20 20  |..x.     .....  |
00002220  20 20 fd 20 6f 6e 25 3d  2d 31 0d 0f 8c 0c 73 74  |  . on%=-1....st|
00002230  61 72 74 25 3d a3 0d 0f  96 05 cd 0d 0f a0 04 0d  |art%=...........|
00002240  0f aa 4e c8 99 20 22 58  4f 53 5f 47 42 50 42 22  |..N.. "XOS_GBPB"|
00002250  2c 31 30 2c 52 6f 6f 74  24 2c 75 6e 69 6f 6e 25  |,10,Root$,union%|
00002260  2c 31 2c 72 65 63 75 72  73 65 25 21 72 70 74 72  |,1,recurse%!rptr|
00002270  25 2c 31 30 32 34 2c 22  2a 22 20 b8 20 72 30 25  |%,1024,"*" . r0%|
00002280  2c 2c 2c 6e 6f 25 2c 6f  6e 25 3b 66 25 0d 0f b4  |,,,no%,on%;f%...|
00002290  16 72 65 63 75 72 73 65  25 21 72 70 74 72 25 3d  |.recurse%!rptr%=|
000022a0  6f 6e 25 0d 0f be 0e e7  20 6f 6e 25 3d 2d 31 20  |on%..... on%=-1 |
000022b0  8c 0d 0f c8 3d 20 20 e7  20 72 70 74 72 25 3d 30  |....=  . rptr%=0|
000022c0  20 8c 20 f2 73 74 6f 70  3a 6d 61 73 6b 25 3d 31  | . .stop:mask%=1|
000022d0  3a e1 20 8b 20 52 6f 6f  74 24 3d a4 74 70 28 52  |:. . Root$=.tp(R|
000022e0  6f 6f 74 24 29 3a 72 70  74 72 25 2d 3d 34 0d 0f  |oot$):rptr%-=4..|
000022f0  d2 05 cd 0d 0f dc 0d e7  20 6e 6f 25 3d 31 20 8c  |........ no%=1 .|
00002300  0d 0f e6 1c 20 20 4f 62  6a 65 63 74 54 79 70 65  |....  ObjectType|
00002310  25 3d 75 6e 69 6f 6e 25  21 26 31 30 0d 0f f0 17  |%=union%!&10....|
00002320  20 20 e7 20 4f 62 6a 65  63 74 54 79 70 65 25 3d  |  . ObjectType%=|
00002330  32 20 8c 0d 0f fa 2b 20  20 20 20 52 6f 6f 74 24  |2 ....+    Root$|
00002340  3d 52 6f 6f 74 24 2b 22  2e 22 2b a4 47 65 74 53  |=Root$+"."+.GetS|
00002350  74 72 28 75 6e 69 6f 6e  25 2b 26 31 34 29 0d 10  |tr(union%+&14)..|
00002360  04 29 20 20 20 20 f2 73  65 74 5f 74 65 78 74 28  |.)    .set_text(|
00002370  6d 61 69 6e 25 2c 49 63  6f 6e 5f 72 6f 6f 74 25  |main%,Icon_root%|
00002380  2c 52 6f 6f 74 24 29 0d  10 0e 0d 20 20 20 20 6f  |,Root$)....    o|
00002390  6e 25 3d 30 0d 10 18 09  20 20 20 20 f5 0d 10 22  |n%=0....    ..."|
000023a0  43 20 20 20 20 20 c8 99  20 22 4f 53 5f 47 42 50  |C     .. "OS_GBP|
000023b0  42 22 2c 31 30 2c 52 6f  6f 74 24 2c 75 6e 69 6f  |B",10,Root$,unio|
000023c0  6e 25 2c 31 2c 6f 6e 25  2c 31 30 32 34 2c 46 69  |n%,1,on%,1024,Fi|
000023d0  6c 65 24 20 b8 20 2c 2c  2c 6e 6f 25 2c 6f 6e 25  |le$ . ,,,no%,on%|
000023e0  0d 10 2c 12 20 20 20 20  20 e7 20 6e 6f 25 3d 31  |..,.     . no%=1|
000023f0  20 8c 0d 10 36 21 20 20  20 20 20 20 20 66 24 3d  | ...6!       f$=|
00002400  a4 47 65 74 53 74 72 28  75 6e 69 6f 6e 25 2b 26  |.GetStr(union%+&|
00002410  31 34 29 0d 10 40 25 20  20 20 20 20 20 20 e7 20  |14)..@%       . |
00002420  44 69 72 73 25 3d b9 20  80 20 75 6e 69 6f 6e 25  |Dirs%=. . union%|
00002430  21 26 31 30 3d 32 20 8c  0d 10 4a 2c 20 20 20 20  |!&10=2 ...J,    |
00002440  20 20 20 20 20 20 f2 63  6f 70 79 5f 69 63 6f 6e  |      .copy_icon|
00002450  28 69 70 74 72 25 2c 52  6f 6f 74 24 2b 22 2e 22  |(iptr%,Root$+"."|
00002460  2b 66 24 29 0d 10 54 1b  20 20 20 20 20 20 20 20  |+f$)..T.        |
00002470  20 20 e7 20 6d 61 73 6b  25 3d 31 20 8c 20 e1 0d  |  . mask%=1 . ..|
00002480  10 5e 0c 20 20 20 20 20  20 20 cc 0d 10 68 54 20  |.^.       ...hT |
00002490  20 20 20 20 20 20 20 20  20 e7 20 46 69 6c 65 73  |         . Files|
000024a0  25 3d b9 20 80 20 75 6e  69 6f 6e 25 21 26 31 30  |%=. . union%!&10|
000024b0  3d 31 20 80 20 28 74 79  70 65 25 3d 2d 31 20 84  |=1 . (type%=-1 .|
000024c0  20 28 28 28 21 75 6e 69  6f 6e 25 29 3e 3e 38 29  | (((!union%)>>8)|
000024d0  80 26 46 46 46 29 3d 74  79 70 65 25 29 20 8c 0d  |.&FFF)=type%) ..|
000024e0  10 72 2e 20 20 20 20 20  20 20 20 20 20 20 20 f2  |.r.            .|
000024f0  63 6f 70 79 5f 69 63 6f  6e 28 69 70 74 72 25 2c  |copy_icon(iptr%,|
00002500  52 6f 6f 74 24 2b 22 2e  22 2b 66 24 29 0d 10 7c  |Root$+"."+f$)..||
00002510  1d 20 20 20 20 20 20 20  20 20 20 20 20 e7 20 6d  |.            . m|
00002520  61 73 6b 25 3d 31 20 8c  20 e1 0d 10 86 0f 20 20  |ask%=1 . .....  |
00002530  20 20 20 20 20 20 20 20  cd 0d 10 90 0c 20 20 20  |        .....   |
00002540  20 20 20 20 cd 0d 10 9a  0a 20 20 20 20 20 cd 0d  |    .....     ..|
00002550  10 a4 10 20 20 20 20 fd  20 6f 6e 25 3d 2d 31 0d  |...    . on%=-1.|
00002560  10 ae 21 20 20 20 20 72  70 74 72 25 2b 3d 34 3a  |..!    rptr%+=4:|
00002570  72 65 63 75 72 73 65 25  21 72 70 74 72 25 3d 30  |recurse%!rptr%=0|
00002580  0d 10 b8 07 20 20 cd 0d  10 c2 05 cd 0d 10 cc 05  |....  ..........|
00002590  e1 0d 10 d6 04 0d 10 e0  0c dd a4 74 70 28 74 24  |...........tp(t$|
000025a0  29 0d 10 ea 0b ea 20 73  25 2c 63 24 0d 10 f4 08  |)..... s%,c$....|
000025b0  73 25 3d 30 0d 10 fe 31  f5 3a 63 24 3d c1 74 24  |s%=0...1.:c$=.t$|
000025c0  2c a9 28 74 24 29 2d 73  25 2c 31 29 3a 73 25 2b  |,.(t$)-s%,1):s%+|
000025d0  3d 31 3a fd 63 24 3d 22  2e 22 20 84 20 73 25 3d  |=1:.c$="." . s%=|
000025e0  a9 28 74 24 29 0d 11 08  1f e7 20 73 25 3c a9 28  |.(t$)..... s%<.(|
000025f0  74 24 29 20 8c 20 3d c0  74 24 2c a9 28 74 24 29  |t$) . =.t$,.(t$)|
00002600  2d 73 25 29 0d 11 12 07  3d 74 24 0d 11 1c 04 0d  |-s%)....=t$.....|
00002610  11 26 0a dd f2 66 75 6c  6c 0d 11 30 35 ff 28 22  |.&...full..05.("|
00002620  2a 50 4f 49 4e 54 45 52  20 31 22 29 3a f2 6e 73  |*POINTER 1"):.ns|
00002630  5f 65 72 72 6f 72 28 6d  73 67 24 28 31 35 29 29  |_error(msg$(15))|
00002640  3a 6d 61 73 6b 25 3d 31  3a f2 73 74 6f 70 0d 11  |:mask%=1:.stop..|
00002650  3a 05 e1 0d 11 44 04 0d  11 4e 16 dd f2 63 6f 70  |:....D...N...cop|
00002660  79 5f 69 63 6f 6e 28 69  25 2c 74 24 29 0d 11 58  |y_icon(i%,t$)..X|
00002670  27 e7 20 28 26 38 30 30  30 2b 43 75 72 72 53 69  |'. (&8000+CurrSi|
00002680  7a 65 25 29 2d 66 70 74  72 25 3c a9 28 74 24 29  |ze%)-fptr%<.(t$)|
00002690  2b 31 20 8c 0d 11 62 1c  20 20 e7 20 ac 20 a4 6d  |+1 ...b.  . . .m|
000026a0  65 6d 5f 61 64 64 20 8c  20 f2 66 75 6c 6c 3a e1  |em_add . .full:.|
000026b0  0d 11 6c 05 cd 0d 11 76  11 21 75 6e 69 6f 6e 25  |..l....v.!union%|
000026c0  3d 6d 61 69 6e 25 0d 11  80 11 75 6e 69 6f 6e 25  |=main%....union%|
000026d0  21 34 3d 49 78 31 25 0d  11 8a 11 75 6e 69 6f 6e  |!4=Ix1%....union|
000026e0  25 21 38 3d 49 79 31 25  0d 11 94 12 75 6e 69 6f  |%!8=Iy1%....unio|
000026f0  6e 25 21 31 32 3d 49 78  32 25 0d 11 9e 12 75 6e  |n%!12=Ix2%....un|
00002700  69 6f 6e 25 21 31 36 3d  49 79 32 25 0d 11 a8 11  |ion%!16=Iy2%....|
00002710  75 6e 69 6f 6e 25 21 32  30 3d 49 66 25 0d 11 b2  |union%!20=If%...|
00002720  13 75 6e 69 6f 6e 25 21  32 34 3d 66 70 74 72 25  |.union%!24=fptr%|
00002730  0d 11 bc 17 75 6e 69 6f  6e 25 21 32 38 3d 2d 31  |....union%!28=-1|
00002740  3a f4 20 76 61 6c 25 0d  11 c6 15 75 6e 69 6f 6e  |:. val%....union|
00002750  25 21 33 32 3d a9 28 74  24 29 2b 31 0d 11 d0 12  |%!32=.(t$)+1....|
00002760  24 66 70 74 72 25 3d 74  24 2b bd 28 30 29 0d 11  |$fptr%=t$+.(0)..|
00002770  da 12 66 70 74 72 25 2b  3d a9 28 74 24 29 2b 31  |..fptr%+=.(t$)+1|
00002780  0d 11 e4 28 c8 99 20 22  57 69 6d 70 5f 43 72 65  |...(.. "Wimp_Cre|
00002790  61 74 65 49 63 6f 6e 22  2c 2c 75 6e 69 6f 6e 25  |ateIcon",,union%|
000027a0  20 b8 20 69 70 74 72 25  0d 11 ee 33 c8 99 20 22  | . iptr%...3.. "|
000027b0  57 69 6d 70 5f 46 6f 72  63 65 52 65 64 72 61 77  |Wimp_ForceRedraw|
000027c0  22 2c 6d 61 69 6e 25 2c  49 78 31 25 2c 49 79 31  |",main%,Ix1%,Iy1|
000027d0  25 2c 49 78 32 25 2c 49  79 32 25 0d 11 f8 11 49  |%,Ix2%,Iy2%....I|
000027e0  79 31 25 2d 3d 53 70 61  63 65 32 25 0d 12 02 11  |y1%-=Space2%....|
000027f0  49 79 32 25 2d 3d 53 70  61 63 65 32 25 0d 12 0c  |Iy2%-=Space2%...|
00002800  30 e7 20 57 79 31 25 3d  4f 57 79 31 25 20 8c 20  |0. Wy1%=OWy1% . |
00002810  57 79 31 25 2d 3d 53 70  61 63 65 31 25 20 8b 20  |Wy1%-=Space1% . |
00002820  57 79 31 25 2d 3d 53 70  61 63 65 32 25 0d 12 16  |Wy1%-=Space2%...|
00002830  11 75 6e 69 6f 6e 25 21  30 3d 57 78 31 25 0d 12  |.union%!0=Wx1%..|
00002840  20 11 75 6e 69 6f 6e 25  21 34 3d 57 79 31 25 0d  | .union%!4=Wy1%.|
00002850  12 2a 11 75 6e 69 6f 6e  25 21 38 3d 57 78 32 25  |.*.union%!8=Wx2%|
00002860  0d 12 34 12 75 6e 69 6f  6e 25 21 31 32 3d 57 79  |..4.union%!12=Wy|
00002870  32 25 0d 12 3e 24 c8 99  20 22 57 69 6d 70 5f 53  |2%..>$.. "Wimp_S|
00002880  65 74 45 78 74 65 6e 74  22 2c 6d 61 69 6e 25 2c  |etExtent",main%,|
00002890  75 6e 69 6f 6e 25 0d 12  48 0d f4 20 45 4e 44 50  |union%..H.. ENDP|
000028a0  52 4f 43 0d 12 52 11 21  75 6e 69 6f 6e 25 3d 6d  |ROC..R.!union%=m|
000028b0  61 69 6e 25 0d 12 5c 24  c8 99 20 22 57 69 6d 70  |ain%..\$.. "Wimp|
000028c0  5f 47 65 74 57 69 6e 64  6f 77 53 74 61 74 65 22  |_GetWindowState"|
000028d0  2c 2c 75 6e 69 6f 6e 25  0d 12 66 20 e7 20 72 65  |,,union%..f . re|
000028e0  73 69 7a 65 25 20 8c 20  75 6e 69 6f 6e 25 21 38  |size% . union%!8|
000028f0  3d 2d 31 30 32 34 30 30  0d 12 70 21 e7 20 62 6f  |=-102400..p!. bo|
00002900  74 74 6f 6d 25 20 8c 20  75 6e 69 6f 6e 25 21 32  |ttom% . union%!2|
00002910  34 3d 2d 31 30 32 34 30  30 0d 12 7a 20 c8 99 20  |4=-102400..z .. |
00002920  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
00002930  22 2c 2c 75 6e 69 6f 6e  25 0d 12 84 05 e1 0d 12  |",,union%.......|
00002940  8e 04 0d 12 98 0b dd f2  73 74 61 72 74 0d 12 a2  |........start...|
00002950  21 c8 99 20 22 57 69 6d  70 5f 53 65 74 43 61 72  |!.. "Wimp_SetCar|
00002960  65 74 50 6f 73 69 74 69  6f 6e 22 2c 2d 31 0d 12  |etPosition",-1..|
00002970  ac 27 f2 62 63 6f 6c 28  49 63 6f 6e 5f 67 6f 25  |.'.bcol(Icon_go%|
00002980  2c 31 32 29 3a f2 73 68  61 64 65 28 49 63 6f 6e  |,12):.shade(Icon|
00002990  5f 67 6f 25 29 0d 12 b6  17 f2 73 68 61 64 65 28  |_go%).....shade(|
000029a0  49 63 6f 6e 5f 66 69 6c  65 73 25 29 0d 12 c0 16  |Icon_files%)....|
000029b0  f2 73 68 61 64 65 28 49  63 6f 6e 5f 64 69 72 73  |.shade(Icon_dirs|
000029c0  25 29 0d 12 ca 16 f2 73  68 61 64 65 28 49 63 6f  |%).....shade(Ico|
000029d0  6e 5f 6e 61 6d 65 25 29  0d 12 d4 16 f2 73 68 61  |n_name%).....sha|
000029e0  64 65 28 49 63 6f 6e 5f  72 6f 6f 74 25 29 0d 12  |de(Icon_root%)..|
000029f0  de 16 f2 73 68 61 64 65  28 49 63 6f 6e 5f 74 79  |...shade(Icon_ty|
00002a00  70 65 25 29 0d 12 e8 2e  f2 75 6e 73 68 61 64 65  |pe%).....unshade|
00002a10  28 49 63 6f 6e 5f 61 62  6f 72 74 25 29 3a f2 62  |(Icon_abort%):.b|
00002a20  63 6f 6c 28 49 63 6f 6e  5f 61 62 6f 72 74 25 2c  |col(Icon_abort%,|
00002a30  32 29 0d 12 f2 0f e7 20  69 70 74 72 25 3e 30 20  |2)..... iptr%>0 |
00002a40  8c 0d 12 fc 13 20 20 21  75 6e 69 6f 6e 25 3d 6d  |.....  !union%=m|
00002a50  61 69 6e 25 0d 13 06 1e  20 20 e3 20 4e 25 3d 49  |ain%....  . N%=I|
00002a60  63 6f 6e 5f 66 69 72 73  74 25 20 b8 20 69 70 74  |con_first% . ipt|
00002a70  72 25 0d 13 10 13 20 20  20 20 75 6e 69 6f 6e 25  |r%....    union%|
00002a80  21 34 3d 4e 25 0d 13 1a  24 20 20 20 20 c8 99 20  |!4=N%...$    .. |
00002a90  22 57 69 6d 70 5f 44 65  6c 65 74 65 49 63 6f 6e  |"Wimp_DeleteIcon|
00002aa0  22 2c 2c 75 6e 69 6f 6e  25 0d 13 24 07 20 20 ed  |",,union%..$.  .|
00002ab0  0d 13 2e 10 20 20 57 79  31 25 3d 4f 57 79 31 25  |....  Wy1%=OWy1%|
00002ac0  0d 13 38 13 20 20 75 6e  69 6f 6e 25 21 30 3d 57  |..8.  union%!0=W|
00002ad0  78 31 25 0d 13 42 13 20  20 75 6e 69 6f 6e 25 21  |x1%..B.  union%!|
00002ae0  34 3d 57 79 31 25 0d 13  4c 13 20 20 75 6e 69 6f  |4=Wy1%..L.  unio|
00002af0  6e 25 21 38 3d 57 78 32  25 0d 13 56 14 20 20 75  |n%!8=Wx2%..V.  u|
00002b00  6e 69 6f 6e 25 21 31 32  3d 57 79 32 25 0d 13 60  |nion%!12=Wy2%..`|
00002b10  26 20 20 c8 99 20 22 57  69 6d 70 5f 53 65 74 45  |&  .. "Wimp_SetE|
00002b20  78 74 65 6e 74 22 2c 6d  61 69 6e 25 2c 75 6e 69  |xtent",main%,uni|
00002b30  6f 6e 25 0d 13 6a 13 20  20 21 75 6e 69 6f 6e 25  |on%..j.  !union%|
00002b40  3d 6d 61 69 6e 25 0d 13  74 26 20 20 c8 99 20 22  |=main%..t&  .. "|
00002b50  57 69 6d 70 5f 47 65 74  57 69 6e 64 6f 77 53 74  |Wimp_GetWindowSt|
00002b60  61 74 65 22 2c 2c 75 6e  69 6f 6e 25 0d 13 7e 22  |ate",,union%..~"|
00002b70  20 20 c8 99 20 22 57 69  6d 70 5f 4f 70 65 6e 57  |  .. "Wimp_OpenW|
00002b80  69 6e 64 6f 77 22 2c 2c  75 6e 69 6f 6e 25 0d 13  |indow",,union%..|
00002b90  88 0f 49 79 31 25 3d 6f  69 74 79 31 25 0d 13 92  |..Iy1%=oity1%...|
00002ba0  0f 49 79 32 25 3d 6f 69  74 79 32 25 0d 13 9c 05  |.Iy2%=oity2%....|
00002bb0  cd 0d 13 a6 0b 69 70 74  72 25 3d 30 0d 13 b0 0f  |.....iptr%=0....|
00002bc0  f2 6d 65 6d 5f 72 65 69  6e 69 74 0d 13 ba 15 f4  |.mem_reinit.....|
00002bd0  20 66 70 74 72 25 3d 46  4e 6d 65 6d 5f 61 64 64  | fptr%=FNmem_add|
00002be0  0d 13 c4 0f 66 70 74 72  25 3d e0 2b 35 31 32 0d  |....fptr%=.+512.|
00002bf0  13 ce 19 66 70 74 72 25  3d 26 38 30 30 30 2b 50  |...fptr%=&8000+P|
00002c00  72 6f 67 53 69 7a 65 25  0d 13 d8 0c 73 74 61 72  |rogSize%....star|
00002c10  74 25 3d b9 0d 13 e2 14  e7 20 a4 6f 77 6e 20 8c  |t%=...... .own .|
00002c20  20 f2 6d 79 5f 70 74 72  0d 13 ec 05 e1 0d 13 f6  | .my_ptr........|
00002c30  04 0d 14 00 0a dd f2 73  74 6f 70 0d 14 0a 26 f2  |.......stop...&.|
00002c40  73 65 74 5f 74 65 78 74  28 6d 61 69 6e 25 2c 49  |set_text(main%,I|
00002c50  63 6f 6e 5f 72 6f 6f 74  25 2c 6f 52 6f 6f 74 24  |con_root%,oRoot$|
00002c60  29 0d 14 14 25 f2 73 65  74 5f 74 65 78 74 28 6d  |)...%.set_text(m|
00002c70  61 69 6e 25 2c 49 63 6f  6e 5f 6e 61 6d 65 25 2c  |ain%,Icon_name%,|
00002c80  46 69 6c 65 24 29 0d 14  1e 28 f2 75 6e 73 68 61  |File$)...(.unsha|
00002c90  64 65 28 49 63 6f 6e 5f  67 6f 25 29 3a f2 62 63  |de(Icon_go%):.bc|
00002ca0  6f 6c 28 49 63 6f 6e 5f  67 6f 25 2c 32 29 0d 14  |ol(Icon_go%,2)..|
00002cb0  28 19 f2 75 6e 73 68 61  64 65 28 49 63 6f 6e 5f  |(..unshade(Icon_|
00002cc0  66 69 6c 65 73 25 29 0d  14 32 18 f2 75 6e 73 68  |files%)..2..unsh|
00002cd0  61 64 65 28 49 63 6f 6e  5f 64 69 72 73 25 29 0d  |ade(Icon_dirs%).|
00002ce0  14 3c 18 f2 75 6e 73 68  61 64 65 28 49 63 6f 6e  |.<..unshade(Icon|
00002cf0  5f 6e 61 6d 65 25 29 0d  14 46 18 f2 75 6e 73 68  |_name%)..F..unsh|
00002d00  61 64 65 28 49 63 6f 6e  5f 72 6f 6f 74 25 29 0d  |ade(Icon_root%).|
00002d10  14 50 18 f2 75 6e 73 68  61 64 65 28 49 63 6f 6e  |.P..unshade(Icon|
00002d20  5f 74 79 70 65 25 29 0d  14 5a 2d f2 62 63 6f 6c  |_type%)..Z-.bcol|
00002d30  28 49 63 6f 6e 5f 61 62  6f 72 74 25 2c 31 32 29  |(Icon_abort%,12)|
00002d40  3a f2 73 68 61 64 65 28  49 63 6f 6e 5f 61 62 6f  |:.shade(Icon_abo|
00002d50  72 74 25 29 0d 14 64 1a  ff 28 22 2a 50 4f 49 4e  |rt%)..d..("*POIN|
00002d60  54 45 52 20 31 22 29 3a  4f 77 6e 25 3d a3 0d 14  |TER 1"):Own%=...|
00002d70  6e 05 e1 0d 14 78 04 0d  14 82 11 dd f2 75 6e 73  |n....x.......uns|
00002d80  68 61 64 65 28 69 25 29  0d 14 8c 11 21 75 6e 69  |hade(i%)....!uni|
00002d90  6f 6e 25 3d 6d 61 69 6e  25 0d 14 96 0f 75 6e 69  |on%=main%....uni|
00002da0  6f 6e 25 21 34 3d 69 25  0d 14 a0 0e 75 6e 69 6f  |on%!4=i%....unio|
00002db0  6e 25 21 38 3d 30 0d 14  aa 15 75 6e 69 6f 6e 25  |n%!8=0....union%|
00002dc0  21 31 32 3d 28 31 3c 3c  32 32 29 0d 14 b4 22 c8  |!12=(1<<22)...".|
00002dd0  99 20 22 57 69 6d 70 5f  53 65 74 49 63 6f 6e 53  |. "Wimp_SetIconS|
00002de0  74 61 74 65 22 2c 2c 75  6e 69 6f 6e 25 0d 14 be  |tate",,union%...|
00002df0  05 e1 0d 14 c8 04 0d 14  d2 0f dd f2 73 68 61 64  |............shad|
00002e00  65 28 69 25 29 0d 14 dc  11 21 75 6e 69 6f 6e 25  |e(i%)....!union%|
00002e10  3d 6d 61 69 6e 25 0d 14  e6 0f 75 6e 69 6f 6e 25  |=main%....union%|
00002e20  21 34 3d 69 25 0d 14 f0  14 75 6e 69 6f 6e 25 21  |!4=i%....union%!|
00002e30  38 3d 28 31 3c 3c 32 32  29 0d 14 fa 15 75 6e 69  |8=(1<<22)....uni|
00002e40  6f 6e 25 21 31 32 3d 28  31 3c 3c 32 32 29 0d 15  |on%!12=(1<<22)..|
00002e50  04 22 c8 99 20 22 57 69  6d 70 5f 53 65 74 49 63  |.".. "Wimp_SetIc|
00002e60  6f 6e 53 74 61 74 65 22  2c 2c 75 6e 69 6f 6e 25  |onState",,union%|
00002e70  0d 15 0e 05 e1 0d 15 18  05 3a 0d 15 22 11 dd f2  |.........:.."...|
00002e80  62 63 6f 6c 28 69 25 2c  63 25 29 0d 15 2c 11 21  |bcol(i%,c%)..,.!|
00002e90  75 6e 69 6f 6e 25 3d 6d  61 69 6e 25 0d 15 36 0f  |union%=main%..6.|
00002ea0  75 6e 69 6f 6e 25 21 34  3d 69 25 0d 15 40 15 75  |union%!4=i%..@.u|
00002eb0  6e 69 6f 6e 25 21 38 3d  28 63 25 3c 3c 32 38 29  |nion%!8=(c%<<28)|
00002ec0  0d 15 4a 16 75 6e 69 6f  6e 25 21 31 32 3d 28 31  |..J.union%!12=(1|
00002ed0  35 3c 3c 32 38 29 0d 15  54 22 c8 99 20 22 57 69  |5<<28)..T".. "Wi|
00002ee0  6d 70 5f 53 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_SetIconState"|
00002ef0  2c 2c 75 6e 69 6f 6e 25  0d 15 5e 05 e1 0d 15 68  |,,union%..^....h|
00002f00  05 3a 0d 15 72 18 dd 20  f2 44 61 74 61 4c 6f 61  |.:..r.. .DataLoa|
00002f10  64 41 63 6b 28 72 65 66  25 29 0d 15 7c 11 75 6e  |dAck(ref%)..|.un|
00002f20  69 6f 6e 25 21 30 20 3d  20 32 30 0d 15 86 14 75  |ion%!0 = 20....u|
00002f30  6e 69 6f 6e 25 21 31 32  20 3d 20 72 65 66 25 0d  |nion%!12 = ref%.|
00002f40  15 90 20 75 6e 69 6f 6e  25 21 31 36 20 3d 20 34  |.. union%!16 = 4|
00002f50  20 3a f4 20 44 61 74 61  4c 6f 61 64 41 63 6b 0d  | :. DataLoadAck.|
00002f60  15 9a 3a c8 99 20 22 57  69 6d 70 5f 53 65 6e 64  |..:.. "Wimp_Send|
00002f70  4d 65 73 73 61 67 65 22  2c 31 37 2c 75 6e 69 6f  |Message",17,unio|
00002f80  6e 25 20 3a f4 20 61 63  6b 6e 6f 77 6c 65 64 67  |n% :. acknowledg|
00002f90  65 20 6d 65 73 73 61 67  65 0d 15 a4 05 e1 0d 15  |e message.......|
00002fa0  ae 05 3a 0d 15 b8 13 dd  f2 63 68 65 63 6b 5f 64  |..:......check_d|
00002fb0  69 72 28 66 24 29 0d 15  c2 23 c8 99 20 22 4f 53  |ir(f$)...#.. "OS|
00002fc0  5f 46 69 6c 65 22 2c 35  2c 66 24 20 b8 20 4f 62  |_File",5,f$ . Ob|
00002fd0  6a 65 63 74 54 79 70 65  25 0d 15 cc 34 e7 20 4f  |jectType%...4. O|
00002fe0  62 6a 65 63 74 54 79 70  65 25 3d 32 20 8c 20 f2  |bjectType%=2 . .|
00002ff0  73 65 74 5f 74 65 78 74  28 6d 61 69 6e 25 2c 49  |set_text(main%,I|
00003000  63 6f 6e 5f 72 6f 6f 74  25 2c 66 24 29 0d 15 d6  |con_root%,f$)...|
00003010  05 e1 0d 15 e0 05 3a 0d  15 ea 0e dd f2 72 65 61  |......:......rea|
00003020  64 5f 6d 73 67 0d 15 f4  0b ea 20 4e 25 2c 46 25  |d_msg..... N%,F%|
00003030  0d 15 fe 1f 46 25 3d 8e  28 22 3c 4f 62 65 79 24  |....F%=.("<Obey$|
00003040  44 69 72 3e 2e 4d 65 73  73 61 67 65 73 22 29 0d  |Dir>.Messages").|
00003050  16 08 15 6d 73 67 5f 6e  6f 25 3d bb 28 be 23 46  |...msg_no%=.(.#F|
00003060  25 29 2d 31 0d 16 12 13  de 20 6d 73 67 24 28 6d  |%)-1..... msg$(m|
00003070  73 67 5f 6e 6f 25 29 0d  16 1c 14 e3 20 4e 25 3d  |sg_no%)..... N%=|
00003080  30 20 b8 20 6d 73 67 5f  6e 6f 25 0d 16 26 13 20  |0 . msg_no%..&. |
00003090  20 6d 73 67 24 28 4e 25  29 3d be 23 46 25 0d 16  | msg$(N%)=.#F%..|
000030a0  30 05 ed 0d 16 3a 08 d9  23 46 25 0d 16 44 05 e1  |0....:..#F%..D..|
000030b0  0d 16 4e 05 3a 0d 16 58  0a dd f2 68 65 6c 70 0d  |..N.:..X...help.|
000030c0  16 62 0e 44 6f 5f 68 65  6c 70 25 3d b9 0d 16 6c  |.b.Do_help%=...l|
000030d0  16 75 6e 69 6f 6e 25 21  31 32 3d 75 6e 69 6f 6e  |.union%!12=union|
000030e0  25 21 38 0d 16 76 12 75  6e 69 6f 6e 25 21 31 36  |%!8..v.union%!16|
000030f0  3d 26 35 30 33 0d 16 80  13 68 65 6c 70 25 3d 75  |=&503....help%=u|
00003100  6e 69 6f 6e 25 2b 32 30  0d 16 8a 1f 68 77 25 3d  |nion%+20....hw%=|
00003110  75 6e 69 6f 6e 25 21 33  32 3a 68 69 25 3d 75 6e  |union%!32:hi%=un|
00003120  69 6f 6e 25 21 33 36 0d  16 94 0e e7 20 68 77 25  |ion%!36..... hw%|
00003130  3d 2d 32 20 8c 0d 16 9e  19 20 20 f2 68 65 6c 70  |=-2 .....  .help|
00003140  5f 74 78 74 28 6d 73 67  24 28 31 31 29 29 0d 16  |_txt(msg$(11))..|
00003150  a8 05 cc 0d 16 b2 0d 20  c8 8e 20 68 69 25 20 ca  |....... .. hi% .|
00003160  0d 16 bc 26 20 20 20 c9  20 49 63 6f 6e 5f 6e 61  |...&   . Icon_na|
00003170  6d 65 25 3a f2 68 65 6c  70 5f 74 78 74 28 6d 73  |me%:.help_txt(ms|
00003180  67 24 28 33 29 29 0d 16  c6 26 20 20 20 c9 20 49  |g$(3))...&   . I|
00003190  63 6f 6e 5f 74 79 70 65  25 3a f2 68 65 6c 70 5f  |con_type%:.help_|
000031a0  74 78 74 28 6d 73 67 24  28 34 29 29 0d 16 d0 26  |txt(msg$(4))...&|
000031b0  20 20 20 c9 20 49 63 6f  6e 5f 72 6f 6f 74 25 3a  |   . Icon_root%:|
000031c0  f2 68 65 6c 70 5f 74 78  74 28 6d 73 67 24 28 35  |.help_txt(msg$(5|
000031d0  29 29 0d 16 da 27 20 20  20 c9 20 49 63 6f 6e 5f  |))...'   . Icon_|
000031e0  61 62 6f 72 74 25 3a f2  68 65 6c 70 5f 74 78 74  |abort%:.help_txt|
000031f0  28 6d 73 67 24 28 36 29  29 0d 16 e4 27 20 20 20  |(msg$(6))...'   |
00003200  c9 20 49 63 6f 6e 5f 66  69 6c 65 73 25 3a f2 68  |. Icon_files%:.h|
00003210  65 6c 70 5f 74 78 74 28  6d 73 67 24 28 37 29 29  |elp_txt(msg$(7))|
00003220  0d 16 ee 26 20 20 20 c9  20 49 63 6f 6e 5f 64 69  |...&   . Icon_di|
00003230  72 73 25 3a f2 68 65 6c  70 5f 74 78 74 28 6d 73  |rs%:.help_txt(ms|
00003240  67 24 28 38 29 29 0d 16  f8 24 20 20 20 c9 20 49  |g$(8))...$   . I|
00003250  63 6f 6e 5f 67 6f 25 3a  f2 68 65 6c 70 5f 74 78  |con_go%:.help_tx|
00003260  74 28 6d 73 67 24 28 39  29 29 0d 17 02 06 20 cb  |t(msg$(9)).... .|
00003270  0d 17 0c 2d 20 e7 20 68  69 25 3e 3d 49 63 6f 6e  |...- . hi%>=Icon|
00003280  5f 66 69 72 73 74 25 20  8c 20 f2 68 65 6c 70 5f  |_first% . .help_|
00003290  74 78 74 28 6d 73 67 24  28 31 30 29 29 0d 17 16  |txt(msg$(10))...|
000032a0  05 cd 0d 17 20 10 e7 20  44 6f 5f 68 65 6c 70 25  |.... .. Do_help%|
000032b0  20 8c 0d 17 2a 2a 20 20  3f 68 65 6c 70 25 3d 30  | ...**  ?help%=0|
000032c0  3a 21 75 6e 69 6f 6e 25  3d 28 68 65 6c 70 25 2b  |:!union%=(help%+|
000032d0  34 2d 75 6e 69 6f 6e 25  29 80 ac 33 0d 17 34 2e  |4-union%)..3..4.|
000032e0  20 20 c8 99 20 22 57 69  6d 70 5f 53 65 6e 64 4d  |  .. "Wimp_SendM|
000032f0  65 73 73 61 67 65 22 2c  31 37 2c 75 6e 69 6f 6e  |essage",17,union|
00003300  25 2c 75 6e 69 6f 6e 25  21 34 0d 17 3e 05 cd 0d  |%,union%!4..>...|
00003310  17 48 05 e1 0d 17 52 04  0d 17 5c 3c dd 20 f2 68  |.H....R...\<. .h|
00003320  65 6c 70 5f 74 78 74 28  61 24 29 20 24 68 65 6c  |elp_txt(a$) $hel|
00003330  70 25 3d 61 24 2b 22 7c  4d 22 3a 68 65 6c 70 25  |p%=a$+"|M":help%|
00003340  2b 3d a9 61 24 2b 32 3a  44 6f 5f 68 65 6c 70 25  |+=.a$+2:Do_help%|
00003350  3d b9 3a e1 0d 17 66 04  0d 17 70 11 dd f2 64 65  |=.:...f...p...de|
00003360  66 61 75 6c 74 5f 70 74  72 0d 17 7a 0f e7 20 6d  |fault_ptr..z.. m|
00003370  61 73 6b 25 3d 30 20 8c  0d 17 84 15 20 20 ff 28  |ask%=0 .....  .(|
00003380  22 2a 50 4f 49 4e 54 45  52 20 31 22 29 0d 17 8e  |"*POINTER 1")...|
00003390  0c 20 20 4f 77 6e 25 3d  a3 0d 17 98 05 cd 0d 17  |.  Own%=........|
000033a0  a2 05 e1 0d 17 ac 04 0d  17 b6 0c dd f2 6d 79 5f  |.............my_|
000033b0  70 74 72 0d 17 c0 0f e7  20 6d 61 73 6b 25 3d 30  |ptr..... mask%=0|
000033c0  20 8c 0d 17 ca 32 20 20  c8 99 20 22 57 69 6d 70  | ....2  .. "Wimp|
000033d0  5f 53 70 72 69 74 65 4f  70 22 2c 33 36 2c 31 2c  |_SpriteOp",36,1,|
000033e0  22 70 74 72 5f 66 69 6e  64 22 2c 32 2c 38 2c 35  |"ptr_find",2,8,5|
000033f0  2c 30 2c 30 0d 17 d4 0c  20 20 4f 77 6e 25 3d b9  |,0,0....  Own%=.|
00003400  0d 17 de 05 cd 0d 17 e8  05 e1 0d 17 f2 04 0d 17  |................|
00003410  fc 09 dd a4 6f 77 6e 0d  18 06 24 c8 99 20 22 57  |....own...$.. "W|
00003420  69 6d 70 5f 47 65 74 50  6f 69 6e 74 65 72 49 6e  |imp_GetPointerIn|
00003430  66 6f 22 2c 2c 75 6e 69  6f 6e 25 0d 18 10 1a e7  |fo",,union%.....|
00003440  20 75 6e 69 6f 6e 25 21  31 32 3d 6d 61 69 6e 25  | union%!12=main%|
00003450  20 8c 20 3d b9 0d 18 1a  06 3d a3 0d 18 24 04 0d  | . =.....=...$..|
00003460  18 2e 0e dd f2 6d 65 6d  5f 69 6e 69 74 0d 18 38  |.....mem_init..8|
00003470  29 c8 99 20 22 58 57 69  6d 70 5f 53 6c 6f 74 53  |).. "XWimp_SlotS|
00003480  69 7a 65 22 2c 2d 31 2c  2d 31 20 b8 20 50 72 6f  |ize",-1,-1 . Pro|
00003490  67 53 69 7a 65 25 0d 18  42 17 43 75 72 72 53 69  |gSize%..B.CurrSi|
000034a0  7a 65 25 3d 50 72 6f 67  53 69 7a 65 25 0d 18 4c  |ze%=ProgSize%..L|
000034b0  05 e1 0d 18 56 04 0d 18  60 0d dd a4 6d 65 6d 5f  |....V...`...mem_|
000034c0  61 64 64 0d 18 6a 08 ea  20 63 25 0d 18 74 10 63  |add..j.. c%..t.c|
000034d0  25 3d 43 75 72 72 53 69  7a 65 25 0d 18 7e 35 c8  |%=CurrSize%..~5.|
000034e0  99 20 22 58 57 69 6d 70  5f 53 6c 6f 74 53 69 7a  |. "XWimp_SlotSiz|
000034f0  65 22 2c 43 75 72 72 53  69 7a 65 25 2b 31 30 32  |e",CurrSize%+102|
00003500  34 2c 2d 31 20 b8 20 43  75 72 72 53 69 7a 65 25  |4,-1 . CurrSize%|
00003510  0d 18 88 17 e7 20 43 75  72 72 53 69 7a 65 25 3d  |..... CurrSize%=|
00003520  63 25 20 8c 20 3d a3 0d  18 92 06 3d b9 0d 18 9c  |c% . =.....=....|
00003530  04 0d 18 a6 10 dd f2 6d  65 6d 5f 72 65 69 6e 69  |.......mem_reini|
00003540  74 0d 18 b0 24 c8 99 20  22 58 57 69 6d 70 5f 53  |t...$.. "XWimp_S|
00003550  6c 6f 74 53 69 7a 65 22  2c 50 72 6f 67 53 69 7a  |lotSize",ProgSiz|
00003560  65 25 2c 2d 31 0d 18 ba  17 43 75 72 72 53 69 7a  |e%,-1....CurrSiz|
00003570  65 25 3d 50 72 6f 67 53  69 7a 65 25 0d 18 c4 05  |e%=ProgSize%....|
00003580  e1 0d 18 ce 04 0d 18 d8  12 dd f2 72 65 61 64 5f  |...........read_|
00003590  73 79 73 5f 76 61 72 0d  18 e2 0b ea 20 66 25 2c  |sys_var..... f%,|
000035a0  6f 24 0d 18 ec 0d 72 65  73 69 7a 65 25 3d a3 0d  |o$....resize%=..|
000035b0  18 f6 0d 62 6f 74 74 6f  6d 25 3d a3 0d 19 00 3d  |...bottom%=....=|
000035c0  c8 99 20 22 58 4f 53 5f  52 65 61 64 56 61 72 56  |.. "XOS_ReadVarV|
000035d0  61 6c 22 2c 22 46 69 6e  64 24 4f 70 74 69 6f 6e  |al","Find$Option|
000035e0  73 22 2c 75 6e 69 6f 6e  25 2c 31 30 32 34 2c 30  |s",union%,1024,0|
000035f0  2c 30 20 b8 20 2c 3b 66  25 0d 19 0a 0e e7 20 66  |,0 . ,;f%..... f|
00003600  25 80 31 20 8c 20 e1 0d  19 14 16 6f 24 3d a4 47  |%.1 . .....o$=.G|
00003610  65 74 53 74 72 28 75 6e  69 6f 6e 25 29 0d 19 1e  |etStr(union%)...|
00003620  25 e7 20 a7 6f 24 2c 22  42 22 29 20 84 20 a7 6f  |%. .o$,"B") . .o|
00003630  24 2c 22 62 22 29 20 8c  20 62 6f 74 74 6f 6d 25  |$,"b") . bottom%|
00003640  3d b9 0d 19 28 25 e7 20  a7 6f 24 2c 22 52 22 29  |=...(%. .o$,"R")|
00003650  20 84 20 a7 6f 24 2c 22  72 22 29 20 8c 20 72 65  | . .o$,"r") . re|
00003660  73 69 7a 65 25 3d b9 0d  19 32 05 e1 0d ff        |size%=...2....|
0000366e