Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199611.adf » Regulars » StarInfo/Lindop/!Bio/!RunImage

StarInfo/Lindop/!Bio/!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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199611.adf » Regulars
Filename: StarInfo/Lindop/!Bio/!RunImage
Read OK:
File size: 3F7E bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >!RunImage
   20REM !Bio file processor
   30REM by Dave Acton and Dave Lawrence
   40REM for 32-bit machines
   50REM (c) BAU February 1993
   60:
   70DIM q% &400
   80$q%="TASK"
   90SYS "Wimp_Initialise",200,!q%,"Bio" TO version%,mytask%
  100ON ERROR PROCwarn("!Bio has suffered a fatal error ("+REPORT$+" at line "+STR$ERL+") and must exit"):SYS "Wimp_CloseDown":END
  110PROCinit
  120PROCinit_sel
  130done%=FALSE
  140REPEAT
  150 SYS "Wimp_Poll",,q% TO reason%
  160 CASE reason% OF
  170  WHEN 1:PROCredraw(!q%)
  180  WHEN 2:SYS "Wimp_OpenWindow",,q%
  190  WHEN 3:PROCclose(!q%)
  200  WHEN 6:PROCmouse(!q%,q%!4,q%!8,q%!12,q%!16)
  210  WHEN 7:PROCdrag
  220  WHEN 8:PROCkey(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24)
  230  WHEN 9:PROCmenu_select
  240  WHEN 17,18:PROCmessage
  250  WHEN 19:PROCpop_up_save
  260 ENDCASE
  270UNTIL done%
  280SYS "Wimp_CloseDown"
  290END
  300:
  310DEF PROCinit
  320DIM ind% &1400,string% &100,menubuf% &300,_word% 4,_star% 12
  330DIM temp% &100,ic% 64,mess% &100
  340ind_end%=ind%+&1400
  350library$="<Bio$Dir>.Library"
  360junk$="<Bio$Junk>"
  370type_def$="in/k,out=results/k,directory=dir/s,send/s"
  380max_lib_files%=32
  390border%=8
  400DIM lib_file$(max_lib_files%),lib_proc$(max_lib_files%)
  410DIM lib_name$(max_lib_files%),lib_flags%(max_lib_files%)
  420DIM lib_in%(max_lib_files%),lib_out%(max_lib_files%)
  430DIM proc_icon%(max_lib_files%),wind_hand%(max_lib_files%)
  440DIM r$(max_lib_files%,10),result_hand%(max_lib_files%)
  450DIM running%(max_lib_files%),result_title%(max_lib_files%)
  460DIM result_open%(max_lib_files%)
  470lib_files%=0
  480lib_sprite_size%=16
  490PROCfind_procedures(library$)
  500DIM lib_sprites% lib_sprite_size%
  510!lib_sprites%=lib_sprite_size%
  520lib_sprites%!4=0
  530lib_sprites%!8=16
  540lib_sprites%!12=16
  550PROCload_data(library$)
  560OVERLAY lib_file$()
  570PROCinit_procedures
  580SYS "Wimp_OpenTemplate",,"<Bio$Dir>.Templates"
  590FOR i%=1 TO lib_files%
  600 IF (lib_flags%(i%) AND 8)>0 THEN
  610  SYS "Wimp_LoadTemplate",,q%,ind%,ind_end%,-1,"result" TO ,,ind%
  620  q%!4+=RND(400)-200
  630  q%!16+=RND(400)-200
  640  result_title%(i%)=q%!72
  650  SYS "Wimp_CreateWindow",,q% TO result_hand%(i%)
  660 ENDIF
  670NEXT
  680SYS "Wimp_LoadTemplate",,q%,ind%,ind_end%,-1,"progInfo" TO ,,ind%
  690SYS "Wimp_CreateWindow",,q% TO info_hand%
  700SYS "Wimp_LoadTemplate",,q%,ind%,ind_end%,-1,"save" TO ,,ind%
  710SYS "Wimp_CreateWindow",,q% TO save_hand%
  720SYS "Wimp_CloseTemplate"
  730savetext=FNic_addr(save_hand%,2,28)
  740savetype=FNic_addr(save_hand%,1,32)
  750$savetext="Result"
  760menuptr%=menubuf%
  770menudat%=menubuf%+&300
  780proc_menu%=FNmake_men_raw(pmenu%,"Process")
  790main_menu%=FNmake_men("Info,Process,Set default,Quit,","Bio")
  800all_menu%=FNmake_men("All,","Quit")
  810PROCattach_sub_menu(info_hand%,main_menu%,0)
  820PROCattach_sub_menu(proc_menu%,main_menu%,1)
  830PROCattach_sub_menu(all_menu%,main_menu%,3)
  840cur_setup_hand%=-1
  850ENDPROC
  860:
  870DEF PROCfind_procedures(dir$)
  880LOCAL n%,r%
  890n%=0
  900WHILE n%<>-1
  910 SYS "OS_GBPB",10,dir$,temp%,1,n%,&100,"*" TO ,,,r%,n%
  920 IF r%=1 THEN
  930  file$=FNget_str(temp%+20)
  940  IF temp%!16=2 THEN
  950   PROCfind_procedures(dir$+"."+file$)
  960  ELSE
  970   CASE ((!temp%) AND &FFF00) DIV &100 OF
  980    WHEN &FF9:
  990     lib_sprite_size%+=temp%!8
 1000    WHEN &FFB:
 1010     lib_files%+=1
 1020     lib_proc$(lib_files%)=FNlc(file$)
 1030     lib_file$(lib_files%)=dir$+"."+file$
 1040   ENDCASE
 1050  ENDIF
 1060 ENDIF
 1070ENDWHILE
 1080ENDPROC
 1090:
 1100DEF PROCload_data(dir$)
 1110LOCAL n%,r%,file$
 1120n%=0
 1130WHILE n%<>-1
 1140 SYS "OS_GBPB",10,dir$,temp%,1,n%,&100,"*" TO ,,,r%,n%
 1150 IF r%=1 THEN
 1160  file$=FNget_str(temp%+20)
 1170  IF temp%!16=2 THEN
 1180   PROCload_data(dir$+"."+file$)
 1190  ELSE
 1200   CASE ((!temp%) AND &FFF00) DIV &100 OF
 1210    WHEN &FF9:
 1220     SYS "OS_SpriteOp",&10B,lib_sprites%,dir$+"."+file$
 1230    WHEN &FEC:
 1240     SYS "Wimp_OpenTemplate",,dir$+"."+file$
 1250     wind%=0
 1260     REPEAT
 1270      $_star%="*"
 1280      SYS "Wimp_LoadTemplate",,q%,ind%,ind_end%,-1,_star%,wind% TO ,,newind%,,,,wind%
 1290      IF wind%<>0 THEN
 1300       proc%=FNfind_proc(FNlc(FNget_str(_star%)))
 1310       IF proc%>0 THEN
 1320        ind%=newind%
 1330        SYS "Wimp_CreateWindow",,q% TO wind_hand%(proc%)
 1340        wind%=0
 1350       ENDIF
 1360      ENDIF
 1370     UNTIL wind%=0
 1380     SYS "Wimp_CloseTemplate"
 1390   ENDCASE
 1400  ENDIF
 1410 ENDIF
 1420ENDWHILE
 1430ENDPROC
 1440:
 1450DEF FNfind_proc(proc$)
 1460LOCAL i%
 1470i%=lib_files%+1
 1480REPEAT
 1490 i%-=1
 1500UNTIL i%=0 OR proc$=lib_proc$(i%)
 1510=i%
 1520:
 1530DEF FNfind_elem(e%,a%())
 1540LOCAL i%
 1550i%=lib_files%+1
 1560REPEAT
 1570 i%-=1
 1580UNTIL i%=0 OR e%=a%(i%)
 1590=i%
 1600:
 1610DEF PROCinit_procedures
 1620DIM lib_spr%(lib_files%,1),pmenu% &400
 1630lib_spr%(0,0)=FNsprite_address("Bio4")
 1640lib_spr%(0,1)=FNsprite_address("Bio2")
 1650pmp%=pmenu%
 1660FOR i%=1 TO lib_files%
 1670 lib_spr%(i%,0)=FNsprite_address(lib_proc$(i%)+"4")
 1680 lib_spr%(i%,1)=FNsprite_address(lib_proc$(i%)+"2")
 1690 lib_name$(i%)=EVAL("FN"+lib_proc$(i%)+"_name")
 1700 type$=EVAL("FN"+lib_proc$(i%)+"_args")
 1710 SYS "OS_ReadArgs",type_def$,type$,q%,&400
 1720 files_in%=(q%!0<>0)
 1730 is_out%=(q%!4<>0)
 1740 dirs_in%=(q%!8<>0)
 1750 send_out%=(q%!12<>0)
 1760 files_out%=FALSE
 1770 data_out%=FALSE
 1780 IF files_in% lib_in%(i%)=FNfile_type(FNget_str(q%!0))
 1790 IF is_out% THEN
 1800  out$=FNget_str(q%!4)
 1810  IF STR$VALout$=out$ THEN
 1820   lib_out%(i%)=VALout$
 1830   data_out%=TRUE
 1840  ELSE
 1850   lib_out%(i%)=FNfile_type(out$)
 1860   files_out%=TRUE
 1870  ENDIF
 1880 ENDIF
 1890 lib_flags%(i%)=(files_in% AND 1) OR (dirs_in% AND 2) OR (files_out% AND 4) OR (data_out% AND 8) OR (send_out% AND 16)
 1900 wind_hand%=wind_hand%(i%)
 1910 z=EVAL("FN"+lib_proc$(i%)+"_init")
 1920 $pmp%=lib_name$(i%)+","
 1930 pmp%+=LEN($pmp%)
 1940NEXT
 1950ENDPROC
 1960:
 1970DEF FNsprite_address(spr$)
 1980SYS "XOS_SpriteOp",&118,lib_sprites%,spr$ TO ,,addr%;ok
 1990IF (ok AND 1)>0 addr%=0
 2000=addr%
 2010:
 2020DEF PROCinit_sel
 2030in%=OPENIN("<Bio$Dir>.!Choices")
 2040running%=0
 2050IF in%<>0 THEN
 2060 WHILE NOT EOF#in%
 2070  proc%=FNfind_proc(FNlc(GET$#in%))
 2080  IF proc%>0 PROCstart_proc(proc%):running%+=1:running%(running%)=proc%
 2090 ENDWHILE
 2100 CLOSE #in%
 2110ENDIF
 2120IF running%=0 PROCstart_proc(0)
 2130ENDPROC
 2140:
 2150DEF PROCstart_proc(proc%)
 2160!ic%=-1
 2170IF FNmv(5)=1 AND lib_spr%(proc%,1)<>0 icon%=1 ELSE icon%=0
 2180ic%!4=0
 2190ic%!8=0
 2200ic%!12=68
 2210ic%!16=68
 2220ic%!20=&7000311A
 2230ic%!24=lib_spr%(proc%,icon%)
 2240ic%!28=lib_sprites%
 2250ic%!32=0
 2260SYS "Wimp_CreateIcon",,ic% TO proc_icon%(proc%)
 2270ENDPROC
 2280:
 2290DEF PROCselect_proc(proc%,but%)
 2300IF proc_icon%(proc%)>0 THEN
 2310 PROCkill_proc(proc%)
 2320ELSE
 2330 IF running%=0 PROCdelete_icon(proc_icon%(0))
 2340 PROCstart_proc(proc%) : REM if but AND 4 replace the old one...
 2350 running%+=1
 2360 running%(running%)=proc%
 2370ENDIF
 2380ENDPROC
 2390:
 2400DEF PROCkill_proc(proc%)
 2410PROCdelete_icon(proc_icon%(proc%))
 2420proc_icon%(proc%)=0
 2430IF cur_setup_hand%=wind_hand%(proc%) PROCclose(cur_setup_hand%)
 2440IF result_open%(proc%) PROCclose(result_hand%(proc%))
 2450run_pos%=FNfind_elem(proc%,running%())
 2460running%(run_pos%)=0
 2470WHILE run_pos%<running%
 2480 running%(run_pos%)=running%(run_pos%+1)
 2490 run_pos%+=1
 2500ENDWHILE
 2510running%-=1
 2520IF running%=0 PROCstart_proc(0)
 2530ENDPROC
 2540:
 2550DEF PROCdelete_icon(ic%!4)
 2560!ic%=-1
 2570SYS "Wimp_DeleteIcon",,ic%
 2580ENDPROC
 2590:
 2600DEF FNleaf_name(s$)
 2610WHILE INSTR(s$,".")>0
 2620 s$=MID$(s$,INSTR(s$,".")+1)
 2630ENDWHILE
 2640=s$
 2650:
 2660DEF FNget_str(a%)
 2670LOCAL a$
 2680WHILE ?a%>=32
 2690 a$=a$+CHR$?a%
 2700 a%+=1
 2710ENDWHILE
 2720=a$
 2730:
 2740DEF FNmake_men($temp%,menutitle$)
 2750=FNmake_men_raw(temp%,menutitle$)
 2760:
 2770DEF FNmake_men_raw(mp%,menutitle$)
 2780LOCAL menumax%,wasptr%,item$
 2790wasptr%=menuptr%
 2800menumax%=0
 2810menuptr%!20=44
 2820$menuptr%=menutitle$
 2830menuptr%!12=&70207
 2840maxaddr%=menuptr%+16
 2850menuptr%!24=0
 2860menuptr%+=28
 2870REPEAT
 2880 item$=""
 2890 WHILE ?mp%<>44
 2900  item$+=CHR$?mp%
 2910  mp%+=1
 2920 ENDWHILE
 2930 mp%+=1
 2940 IF LEN(item$)>menumax% menumax%=LEN(item$)
 2950 menuptr%!0=0
 2960 menuptr%!4=-1
 2970 menuptr%!8=&7000021
 2980 IF LEN(item$)<12 THEN
 2990  $(menuptr%+12)=item$
 3000 ELSE
 3010  menudat%-=LEN(item$)+1
 3020  $menudat%=item$
 3030  menuptr%!12=menudat%
 3040  menuptr%!16=-1
 3050  menuptr%!20=LEN(item$)
 3060  menuptr%!8+=&100
 3070 ENDIF
 3080 menuptr%+=24
 3090UNTIL ?mp%<32
 3100menuptr%!-24=(menuptr%!-24) OR &80
 3110!maxaddr%=menumax%*16+32
 3120=wasptr%
 3130:
 3140DEF PROCattach_sub_menu(m1%,m2%,i%)
 3150m2%!(32+24*i%)=m1%
 3160ENDPROC
 3170:
 3180DEF PROCopen_menu(m%,x%,y%)
 3190LOCAL i%
 3200FOR i%=1 TO lib_files%
 3210 PROCtick(proc_menu%,i%-1,proc_icon%(i%)>0)
 3220NEXT
 3230menux%=x%
 3240menuy%=y%
 3250SYS "Wimp_CreateMenu",,m%,x%,y%
 3260ENDPROC
 3270:
 3280DEF PROCmenu_select
 3290SYS "Wimp_GetPointerInfo",,temp%
 3300redo%=((temp%!8) AND 1)>0
 3310CASE !q% OF
 3320 WHEN 1:IF q%!4>=0 PROCselect_proc(q%!4+1,temp%!8)
 3330 WHEN 2:PROCset_default
 3340 WHEN 3:redo%=FALSE:IF q%!4>=0 OR running%=0 done%=TRUE ELSE PROCkill_proc(bar_proc%)
 3350ENDCASE
 3360IF redo% PROCopen_menu(main_menu%,menux%,menuy%)
 3370ENDPROC
 3380:
 3390DEF PROCset_default
 3400LOCAL out%
 3410out%=OPENOUT("<Bio$Dir>.!Choices")
 3420IF running%>0 THEN
 3430 FOR i%=1 TO running%
 3440  PROCbput(out%,lib_proc$(running%(i%)))
 3450 NEXT
 3460ENDIF
 3470CLOSE #out%
 3480ENDPROC
 3490:
 3500DEF PROCtick(a%,i%,c%)
 3510a%=a%+28+24*i%
 3520IF c% THEN !a%=!a% OR 1 ELSE !a%=!a% AND &FFFFFFFE
 3530ENDPROC
 3540:
 3550DEF PROCwarn(w$)
 3560!temp%=17
 3570$(temp%+4)=w$
 3580SYS "Wimp_ReportError",temp%,1,"Bio"
 3590ENDPROC
 3600:
 3610DEF PROCmouse(mousex%,mousey%,b%,handle%,icon%)
 3620LOCAL shand%,proc%
 3630bar_proc%=FNfind_elem(icon%,proc_icon%())
 3640IF (b% AND 5)>0 THEN
 3650 CASE handle% OF
 3660  WHEN save_hand%:
 3670   CASE icon% OF
 3680    WHEN 0:IF FNsave(FNget_str(savetext)) PROCclose(save_hand%)
 3690    WHEN 1:PROCinit_save_drag(save_hand%)
 3700   ENDCASE
 3710  WHEN -2:
 3720   shand%=wind_hand%(bar_proc%)
 3730   IF shand%>0 THEN
 3740    IF cur_setup_hand%<>-1 PROCclose(cur_setup_hand%)
 3750    cur_setup_hand%=shand%
 3760    !q%=shand%
 3770    SYS "Wimp_GetWindowState",,q%
 3780    q%!28=-1
 3790    SYS "Wimp_OpenWindow",,q%
 3800   ENDIF
 3810  OTHERWISE:
 3820   proc%=FNfind_elem(handle%,wind_hand%())
 3830   IF proc%>0 THEN
 3840    e=EVAL("FN"+lib_proc$(proc%)+"_mouse("+STR$mousex%+","+STR$mousey%+","+STR$b%+","+STR$handle%+","+STR$icon%+")")
 3850    IF e PROCprocess(proc%,"")
 3860   ENDIF
 3870 ENDCASE
 3880ELSE
 3890 IF (b% AND 2)>0 AND handle%=-2 THEN
 3900  IF bar_proc%=0 PROClabel_main("Bio") ELSE PROClabel_main(FNleaf_name(lib_file$(bar_proc%)))
 3910  PROCopen_menu(main_menu%,mousex%-64,272)
 3920 ENDIF
 3930ENDIF
 3940ENDPROC
 3950:
 3960DEF PROClabel_main(title$)
 3970FOR i%=0 TO LENtitle$
 3980 main_menu%?i%=ASCMID$(title$+CHR$0,i%+1,1)
 3990NEXT
 4000ENDPROC
 4010:
 4020DEF FNfile_type(name$)
 4030LOCAL type%,ok
 4040IF name$="*" THEN =-1
 4050SYS "XOS_FSControl",31,name$ TO ,,type%;ok
 4060IF (ok AND 1)>0 PROCwarn("Unknown file type '"+name$+"'")
 4070=type%
 4080:
 4090DEF PROCmessage
 4100LOCAL proc%
 4110PROCcopy(q%,mess%,&100)
 4120CASE mess%!16 OF
 4130 WHEN 0:done%=TRUE
 4140 WHEN 1:
 4150  cur_proc%=FNwhich_proc
 4160  IF FNallow_type(mess%!40,cur_proc%) THEN
 4170   mess%!36=-1
 4180   $(mess%+44)="<Wimp$Scrap>"+CHR$0
 4190   mess%!12=mess%!8
 4200   mess%!16=2
 4210   !mess%=60
 4220   SYS "Wimp_SendMessage",17,mess%,mess%!4
 4230  ELSE
 4240   PROCbad_file_type
 4250  ENDIF
 4260 WHEN 2:
 4270  IF FNsave(FNget_str(mess%+44)) THEN
 4280   mess%!12=mess%!8
 4290   mess%!16=3
 4300   SYS "Wimp_SendMessage",17,mess%,mess%!4
 4310   PROCclose(save_hand%)
 4320  ENDIF
 4330 WHEN 3:
 4340  proc%=FNwhich_proc
 4350  IF FNallow_type(mess%!40,proc%) THEN
 4360   PROCprocess(proc%,FNget_str(mess%+44))
 4370   mess%!12=mess%!8
 4380   mess%!16=4
 4390   SYS "Wimp_SendMessage",17,mess%,mess%!4
 4400  ELSE
 4410   PROCbad_file_type
 4420  ENDIF
 4430ENDCASE
 4440ENDPROC
 4450:
 4460DEF PROCbad_file_type
 4470PROCwarn("Invalid file type")
 4480ENDPROC
 4490:
 4500DEF FNwhich_proc
 4510SYS "Wimp_GetPointerInfo",,ic%
 4520IF ic%!12=-2 THEN =FNfind_elem(ic%!16,proc_icon%())
 4530=FNfind_elem(ic%!12,wind_hand%())
 4540:
 4550DEF FNallow_type(given%,proc%)
 4560IF (given%=&1000 OR given%=&2000) THEN =(lib_flags%(proc%) AND 2)<>0
 4570IF (lib_flags%(proc%) AND 1) AND (lib_in%(proc%)=-1 OR lib_in%(proc%)=given%) THEN =TRUE
 4580=FALSE
 4590:
 4600DEF PROCcopy(from%,to%,bytes%)
 4610LOCAL i%
 4620FOR i%=0 TO bytes%-1 STEP 4
 4630 to%!i%=from%!i%
 4640NEXT
 4650ENDPROC
 4660:
 4670DEF PROCprocess(proc%,file$)
 4680LOCAL e$,z,x,y,b,i%
 4690cur_proc%=proc%
 4700IF cur_setup_hand%<>-1 PROCclose(cur_setup_hand%)
 4710MOUSE x,y,b
 4720e$="FN"+lib_proc$(proc%)+"("""+file$+""""
 4730makes_file%=(lib_flags%(proc%) AND 4)>0
 4740makes_results%=(lib_flags%(proc%) AND 8)>0
 4750send_out%=(lib_flags%(proc%) AND 16)>0
 4760CASE TRUE OF
 4770 WHEN makes_file%:
 4780  e$+=","""+junk$+""""
 4790 WHEN makes_results%:
 4800  FOR i%=0 TO lib_out%(proc%)
 4810   e$+=",r$("+STR$proc%+","+STR$i%+")"
 4820  NEXT
 4830ENDCASE
 4840e$+=")"
 4850SYS "Hourglass_On"
 4860wind_hand%=wind_hand%(proc%)
 4870z=EVAL(e$)
 4880SYS "Hourglass_Off"
 4890IF z=0 THEN
 4900 CASE TRUE OF
 4910  WHEN makes_results%:
 4920   IF r$(proc%,0)="" OR LEFT$(r$(proc%,0),1)="<" r$(proc%,0)="Results"
 4930   PROCopen_result(proc%)
 4940  WHEN makes_file%:
 4950   SYS "OS_File",18,junk$,lib_out%(proc%)
 4960   IF send_out% THEN
 4970    $q%=STRING$(44,CHR$0)+junk$
 4980    q%!16=5
 4990    q%!40=lib_out%(proc%)
 5000    !q%=((LEN(junk$)+4) AND NOT 3)+44
 5010    SYS "Wimp_SendMessage",18,q%,0
 5020   ELSE
 5030    PROCopen_save(x-64,y-64,lib_out%(proc%))
 5040   ENDIF
 5050 ENDCASE
 5060ENDIF
 5070ENDPROC
 5080:
 5090DEF PROCpop_up_save
 5100LOCAL x,y,b
 5110MOUSE x,y,b
 5120PROCopen_save(x-64,y-64,lib_out%(cur_proc%))
 5130ENDPROC
 5140:
 5150DEF PROCopen_result(proc%)
 5160LOCAL i%,maxw%
 5170IF result_open%(proc%) PROCclose(result_hand%(proc%))
 5180$result_title%(proc%)=r$(proc%,0)
 5190maxw%=0
 5200FOR i%=0 TO lib_out%(proc%)
 5210 IF LEN(r$(proc%,i%))>maxw% maxw%=LEN(r$(proc%,i%))
 5220NEXT
 5230!q%=0
 5240q%!4=-(2*border%+40*lib_out%(proc%))
 5250q%!8=16*maxw%+2*border%
 5260q%!12=0
 5270SYS "Wimp_SetExtent",result_hand%(proc%),q%
 5280!q%=result_hand%(proc%)
 5290SYS "Wimp_GetWindowState",,q%
 5300q%!12=q%!4+16*maxw%+2*border%
 5310q%!8=q%!16-(2*border%+40*lib_out%(proc%))
 5320q%!28=-1
 5330SYS "Wimp_OpenWindow",,q%
 5340result_open%(proc%)=TRUE
 5350ENDPROC
 5360:
 5370DEF PROCopen_save(x%,y%,type%)
 5380LOCAL w%,h%
 5390$savetype="Sfile_"+RIGHT$("FF"+STR$~type%,3)
 5400!q%=save_hand%
 5410SYS "Wimp_GetWindowInfo",,q%
 5420w%=q%!12-q%!4
 5430h%=q%!16-q%!8
 5440q%!4=x%
 5450q%!8=y%
 5460q%!12=x%+w%
 5470q%!16=y%+h%
 5480q%!20=0
 5490q%!24=0
 5500q%!28=-1
 5510SYS "Wimp_OpenWindow",,q%
 5520ENDPROC
 5530:
 5540DEF PROCdrag
 5550SYS "Wimp_GetPointerInfo",,q%
 5560q%!32=q%!4:q%!28=!q%
 5570q%!24=q%!16:q%!20=q%!12
 5580q%!16=1:q%!12=0
 5590SYS "OS_File",5,junk$ TO ,,q%!40,,q%!36
 5600q%!40=(q%!40 AND &FFF00) DIV &100
 5610$(q%+44)=FNleaf_name(FNget_str(savetext))+CHR$(0)
 5620!q%=60
 5630SYS "Wimp_SendMessage",17,q%,q%!20,q%!24
 5640ENDPROC
 5650:
 5660DEF PROCkey(hand%,icon%,xcar%,ycar%,carh%,carpos%,key%)
 5670LOCAL proc%
 5680IF hand%=save_hand% AND key%=13 THEN
 5690 IF FNsave(FNget_str(savetext)) PROCclose(save_hand%)
 5700ELSE
 5710 proc%=FNfind_elem(hand%,wind_hand%())
 5720 IF proc%=0 THEN
 5730  SYS "Wimp_ProcessKey",key%
 5740 ELSE
 5750  e=EVAL("FN"+lib_proc$(proc%)+"_key("+STR$hand%+","+STR$icon%+","+STR$xcar%+","+STR$ycar%+","+STR$carh%+","+STR$carpos%+","+STR$key%+")")
 5760  IF e PROCprocess(proc%,"")
 5770 ENDIF
 5780ENDIF
 5790ENDPROC
 5800:
 5810DEF PROCinit_save_drag(save_hand%)
 5820LOCAL x%,y%,ysize%
 5830!q%=save_hand%
 5840SYS "Wimp_GetWindowState",,q%
 5850ysize%=q%!16-q%!8
 5860x%=q%!4
 5870y%=q%!8
 5880q%!4=1
 5890SYS "Wimp_GetIconState",,q%
 5900q%!8+=x%
 5910q%!12+=y%+ysize%
 5920q%!16+=x%
 5930q%!20+=y%+ysize%
 5940q%!24=0
 5950q%!28=0
 5960q%!32=(FNmv(11)+1)<<FNmv(4)
 5970q%!36=(FNmv(12)+1)<<FNmv(5)
 5980!q%=0
 5990q%!4=5
 6000SYS "Wimp_DragBox",,q%
 6010ENDPROC
 6020:
 6030DEF FNmv(m%)
 6040LOCAL v%
 6050SYS "OS_ReadModeVariable",-1,m% TO ,,v%
 6060=v%
 6070:
 6080DEF FNsave(save$)
 6090LOCAL saved%
 6100IF FNgood_save_name(save$) THEN
 6110 SYS "OS_FSControl",26,junk$,save$,&82
 6120 saved%=TRUE
 6130ELSE
 6140 PROCwarn("To save, drag the icon to a directory viewer.")
 6150 saved%=FALSE
 6160ENDIF
 6170=saved%
 6180:
 6190DEF FNgood_save_name(save$)
 6200=save$="<Wimp$Scrap>" OR INSTR(save$,":")>0 OR INSTR(save$,".")>0
 6210:
 6220DEF FNic_addr(hand%,icon%,off%)
 6230!ic%=hand%
 6240ic%!4=icon%
 6250SYS "Wimp_GetIconState",,ic%
 6260=ic%!off%
 6270:
 6280DEF PROCclose(hand%)
 6290LOCAL proc%
 6300!q%=hand%
 6310SYS "Wimp_CloseWindow",,q%
 6320IF hand%=save_hand% SYS "XOS_File",6,junk$
 6330IF hand%=cur_setup_hand% THEN cur_setup_hand%=-1
 6340proc%=FNfind_elem(hand%,result_hand%())
 6350IF proc%>0 result_open%(proc%)=FALSE
 6360ENDPROC
 6370:
 6380DEF PROCredraw(hand%)
 6390LOCAL i%,more%,ax0%,ay0%,proc%
 6400proc%=FNfind_elem(hand%,result_hand%())
 6410SYS "Wimp_RedrawWindow",,q% TO more%
 6420WHILE more%
 6430 ax0%=q%!4-q%!20
 6440 ay0%=q%!16-q%!24
 6450 FOR i%=1 TO lib_out%(proc%)
 6460  MOVE ax0%+border%,ay0%-8-border%-40*(i%-1)
 6470  PRINT r$(proc%,i%)
 6480 NEXT
 6490 SYS "Wimp_GetRectangle",,q% TO more%
 6500ENDWHILE
 6510ENDPROC
 6520:
 6530DEF FNuc(a$)
 6540LOCAL i%,c$
 6550FOR i%=1 TO LEN(a$)
 6560 c$=MID$(a$,i%,1)
 6570 IF c$>="a" AND c$<="z" MID$(a$,i%,1)=CHR$(ASCc$-32)
 6580NEXT
 6590=a$
 6600:
 6610DEF FNlc(a$)
 6620LOCAL i%
 6630FOR i%=1 TO LEN(a$)
 6640 c$=MID$(a$,i%,1)
 6650 IF c$>="A" AND c$<="Z" MID$(a$,i%,1)=CHR$(ASCc$+32)
 6660NEXT
 6670=a$
 6680:
 6690DEF FNstrip_spaces(str$)
 6700WHILE LEFT$(str$,1)=" "
 6710 str$=MID$(str$,2)
 6720ENDWHILE
 6730WHILE RIGHT$(str$,1)=" "
 6740 str$=LEFT$(str$)
 6750ENDWHILE
 6760=str$
 6770:
 6780DEF PROCbput(f%,str$)
 6790BPUT #f%,str$+CHR$10;
 6800ENDPROC
 6810:
 6820DEF PROCwput(f%,!_word%)
 6830SYS "OS_GBPB",2,f%,_word%,4
 6840ENDPROC
 6850:
 6860DEF FNwget(f%)
 6870SYS "OS_GBPB",4,f%,_word%,4
 6880=!_word%
 6890:
 6900DEF PROCwrite_in_icon(hand%,icon%,text$)
 6910$FNic_addr(hand%,icon%,28)=text$
 6920ic%!8=0:ic%!12=0
 6930SYS "Wimp_SetIconState",,ic%
 6940SYS "Wimp_GetCaretPosition",,ic%
 6950IF !ic%=hand% AND ic%!4=icon% SYS "Wimp_SetCaretPosition",!ic%,ic%!4,ic%!8,ic%!12,-1,-1
 6960ENDPROC
 6970:
 6980DEF FNicon_text(wind%,icon%)
 6990=$FNic_addr(wind%,icon%,28)
 7000:
 7010DEF PROCset_button(!ic%,ic%!4,state%)
 7020ic%!8=state%<<21
 7030ic%!12=1<<21
 7040SYS "Wimp_SetIconState",,ic%
 7050ENDPROC
 7060:
 7070DEF FNbutton_state(!ic%,ic%!4)
 7080SYS "Wimp_GetIconState",,ic%
 7090=SGN(ic%!(8+16) AND 1<<21)
 7100:
 7110DEF FNesg_state(wind%,esg%)
 7120SYS "Wimp_WhichIcon",wind%,ic%,%111111<<16,(esg%<<16) OR (1<<21)
 7130=!ic%
 7140:
 7150DEF PROChourglass(current,maximum)
 7160IF maximum<>0 SYS "Hourglass_Percentage",current*100/maximum
 7170ENDPROC

� >!RunImage
� !Bio file processor
%� by Dave Acton and Dave Lawrence
(� for 32-bit machines
2� (c) BAU February 1993
<:
F
� q% &400
P$q%="TASK"
Z9ș "Wimp_Initialise",200,!q%,"Bio" � version%,mytask%
dl� � �warn("!Bio has suffered a fatal error ("+�$+" at line "+Þ+") and must exit"):ș "Wimp_CloseDown":�
n	�init
x
�init_sel
�done%=�
��
�! ș "Wimp_Poll",,q% � reason%
� Ȏ reason% �
�  � 1:�redraw(!q%)
�"  � 2:ș "Wimp_OpenWindow",,q%
�  � 3:�close(!q%)
�+  � 6:�mouse(!q%,q%!4,q%!8,q%!12,q%!16)
�  � 7:�drag
�5  � 8:�key(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24)
�  � 9:�menu_select
�  � 17,18:�message
�  � 19:�pop_up_save
 �
� done%
ș "Wimp_CloseDown"
"�
,:
6� �init
@>� ind% &1400,string% &100,menubuf% &300,_word% 4,_star% 12
J"� temp% &100,ic% 64,mess% &100
Tind_end%=ind%+&1400
^ library$="<Bio$Dir>.Library"
hjunk$="<Bio$Junk>"
r9type_def$="in/k,out=results/k,directory=dir/s,send/s"
|max_lib_files%=32
�
border%=8
�9� lib_file$(max_lib_files%),lib_proc$(max_lib_files%)
�:� lib_name$(max_lib_files%),lib_flags%(max_lib_files%)
�6� lib_in%(max_lib_files%),lib_out%(max_lib_files%)
�;� proc_icon%(max_lib_files%),wind_hand%(max_lib_files%)
�8� r$(max_lib_files%,10),result_hand%(max_lib_files%)
�<� running%(max_lib_files%),result_title%(max_lib_files%)
�"� result_open%(max_lib_files%)
�lib_files%=0
�lib_sprite_size%=16
��find_procedures(library$)
�#� lib_sprites% lib_sprite_size%
�"!lib_sprites%=lib_sprite_size%
lib_sprites%!4=0
lib_sprites%!8=16
lib_sprites%!12=16
&�load_data(library$)
0ȣ lib_file$()
:�init_procedures
D1ș "Wimp_OpenTemplate",,"<Bio$Dir>.Templates"
N� i%=1 � lib_files%
X � (lib_flags%(i%) � 8)>0 �
bC  ș "Wimp_LoadTemplate",,q%,ind%,ind_end%,-1,"result" � ,,ind%
l  q%!4+=�(400)-200
v  q%!16+=�(400)-200
�  result_title%(i%)=q%!72
�3  ș "Wimp_CreateWindow",,q% � result_hand%(i%)
� �
��
�Cș "Wimp_LoadTemplate",,q%,ind%,ind_end%,-1,"progInfo" � ,,ind%
�+ș "Wimp_CreateWindow",,q% � info_hand%
�?ș "Wimp_LoadTemplate",,q%,ind%,ind_end%,-1,"save" � ,,ind%
�+ș "Wimp_CreateWindow",,q% � save_hand%
�ș "Wimp_CloseTemplate"
�&savetext=�ic_addr(save_hand%,2,28)
�&savetype=�ic_addr(save_hand%,1,32)
�$savetext="Result"
�menuptr%=menubuf%
menudat%=menubuf%+&300
.proc_menu%=�make_men_raw(pmenu%,"Process")
@main_menu%=�make_men("Info,Process,Set default,Quit,","Bio")
 &all_menu%=�make_men("All,","Quit")
*-�attach_sub_menu(info_hand%,main_menu%,0)
4-�attach_sub_menu(proc_menu%,main_menu%,1)
>,�attach_sub_menu(all_menu%,main_menu%,3)
Hcur_setup_hand%=-1
R�
\:
f� �find_procedures(dir$)
p� n%,r%
zn%=0
�
ȕ n%<>-1
�8 ș "OS_GBPB",10,dir$,temp%,1,n%,&100,"*" � ,,,r%,n%
�
 � r%=1 �
�  file$=�get_str(temp%+20)
�  � temp%!16=2 �
�'   �find_procedures(dir$+"."+file$)
�  �
�&   Ȏ ((!temp%) � &FFF00) � &100 �
�    � &FF9:
�"     lib_sprite_size%+=temp%!8
�    � &FFB:
�     lib_files%+=1
�)     lib_proc$(lib_files%)=�lc(file$)
-     lib_file$(lib_files%)=dir$+"."+file$
   �
  �
$ �
.�
8�
B:
L� �load_data(dir$)
V� n%,r%,file$
`n%=0
j
ȕ n%<>-1
t8 ș "OS_GBPB",10,dir$,temp%,1,n%,&100,"*" � ,,,r%,n%
~
 � r%=1 �
�  file$=�get_str(temp%+20)
�  � temp%!16=2 �
�!   �load_data(dir$+"."+file$)
�  �
�&   Ȏ ((!temp%) � &FFF00) � &100 �
�    � &FF9:
�:     ș "OS_SpriteOp",&10B,lib_sprites%,dir$+"."+file$
�    � &FEC:
�/     ș "Wimp_OpenTemplate",,dir$+"."+file$
�     wind%=0
�
     �
�      $_star%="*"
W      ș "Wimp_LoadTemplate",,q%,ind%,ind_end%,-1,_star%,wind% � ,,newind%,,,,wind%

      � wind%<>0 �
2       proc%=�find_proc(�lc(�get_str(_star%)))
       � proc%>0 �
(        ind%=newind%
2:        ș "Wimp_CreateWindow",,q% � wind_hand%(proc%)
<        wind%=0
F       �
P      �
Z     � wind%=0
d      ș "Wimp_CloseTemplate"
n   �
x  �
� �
��
��
�:
�� �find_proc(proc$)
�� i%
�i%=lib_files%+1
��
�
 i%-=1
� � i%=0 � proc$=lib_proc$(i%)
�=i%
�:
�� �find_elem(e%,a%())
� i%
i%=lib_files%+1
�
"
 i%-=1
,� i%=0 � e%=a%(i%)
6=i%
@:
J� �init_procedures
T(� lib_spr%(lib_files%,1),pmenu% &400
^)lib_spr%(0,0)=�sprite_address("Bio4")
h)lib_spr%(0,1)=�sprite_address("Bio2")
rpmp%=pmenu%
|� i%=1 � lib_files%
�6 lib_spr%(i%,0)=�sprite_address(lib_proc$(i%)+"4")
�6 lib_spr%(i%,1)=�sprite_address(lib_proc$(i%)+"2")
�0 lib_name$(i%)=�("FN"+lib_proc$(i%)+"_name")
�( type$=�("FN"+lib_proc$(i%)+"_args")
�- ș "OS_ReadArgs",type_def$,type$,q%,&400
� files_in%=(q%!0<>0)
� is_out%=(q%!4<>0)
� dirs_in%=(q%!8<>0)
� send_out%=(q%!12<>0)
� files_out%=�
� data_out%=�
�7 � files_in% lib_in%(i%)=�file_type(�get_str(q%!0))
� � is_out% �
  out$=�get_str(q%!4)
  � ûout$=out$ �
   lib_out%(i%)=�out$
&   data_out%=�
0  �
:$   lib_out%(i%)=�file_type(out$)
D   files_out%=�
N  �
X �
bl lib_flags%(i%)=(files_in% � 1) � (dirs_in% � 2) � (files_out% � 4) � (data_out% � 8) � (send_out% � 16)
l wind_hand%=wind_hand%(i%)
v$ z=�("FN"+lib_proc$(i%)+"_init")
� $pmp%=lib_name$(i%)+","
� pmp%+=�($pmp%)
��
��
�:
�� �sprite_address(spr$)
�9ș "XOS_SpriteOp",&118,lib_sprites%,spr$ � ,,addr%;ok
�� (ok � 1)>0 addr%=0
�
=addr%
�:
�� �init_sel
�in%=�("<Bio$Dir>.!Choices")
�running%=0
� in%<>0 �
 ȕ � �#in%
"  proc%=�find_proc(�lc(�#in%))
 G  � proc%>0 �start_proc(proc%):running%+=1:running%(running%)=proc%
* �
4 � #in%
>�
H� running%=0 �start_proc(0)
R�
\:
f� �start_proc(proc%)
p!ic%=-1
z7� �mv(5)=1 � lib_spr%(proc%,1)<>0 icon%=1 � icon%=0
�ic%!4=0
�ic%!8=0
�
ic%!12=68
�
ic%!16=68
�ic%!20=&7000311A
� ic%!24=lib_spr%(proc%,icon%)
�ic%!28=lib_sprites%
�ic%!32=0
�1ș "Wimp_CreateIcon",,ic% � proc_icon%(proc%)
��
�:
�� �select_proc(proc%,but%)
�� proc_icon%(proc%)>0 �
	 �kill_proc(proc%)
	�
	- � running%=0 �delete_icon(proc_icon%(0))
	$? �start_proc(proc%) : � if but AND 4 replace the old one...
	. running%+=1
	8 running%(running%)=proc%
	B�
	L�
	V:
	`� �kill_proc(proc%)
	j#�delete_icon(proc_icon%(proc%))
	tproc_icon%(proc%)=0
	~?� cur_setup_hand%=wind_hand%(proc%) �close(cur_setup_hand%)
	�5� result_open%(proc%) �close(result_hand%(proc%))
	�)run_pos%=�find_elem(proc%,running%())
	�running%(run_pos%)=0
	�ȕ run_pos%<running%
	�, running%(run_pos%)=running%(run_pos%+1)
	� run_pos%+=1
	��
	�running%-=1
	�� running%=0 �start_proc(0)
	��
	�:
	�� �delete_icon(ic%!4)
!ic%=-1

ș "Wimp_DeleteIcon",,ic%
�
:
(� �leaf_name(s$)
2ȕ �s$,".")>0
< s$=�s$,�s$,".")+1)
F�
P=s$
Z:
d� �get_str(a%)
n� a$
xȕ ?a%>=32
� a$=a$+�?a%
�
 a%+=1
��
�=a$
�:
�"� �make_men($temp%,menutitle$)
�$=�make_men_raw(temp%,menutitle$)
�:
�#� �make_men_raw(mp%,menutitle$)
�� menumax%,wasptr%,item$
�wasptr%=menuptr%
�menumax%=0
�menuptr%!20=44
$menuptr%=menutitle$
menuptr%!12=&70207
maxaddr%=menuptr%+16
"menuptr%!24=0
,menuptr%+=28
6�
@
 item$=""
J ȕ ?mp%<>44
T  item$+=�?mp%
^  mp%+=1
h �
r mp%+=1
|* � �(item$)>menumax% menumax%=�(item$)
� menuptr%!0=0
� menuptr%!4=-1
� menuptr%!8=&7000021
� � �(item$)<12 �
�  $(menuptr%+12)=item$
� �
�  menudat%-=�(item$)+1
�  $menudat%=item$
�  menuptr%!12=menudat%
�  menuptr%!16=-1
�  menuptr%!20=�(item$)
�  menuptr%!8+=&100
� �
 menuptr%+=24

� ?mp%<32
%menuptr%!-24=(menuptr%!-24) � &80
&!maxaddr%=menumax%*16+32
0=wasptr%
::
D"� �attach_sub_menu(m1%,m2%,i%)
Nm2%!(32+24*i%)=m1%
X�
b:
l� �open_menu(m%,x%,y%)
v� i%
�� i%=1 � lib_files%
�, �tick(proc_menu%,i%-1,proc_icon%(i%)>0)
��
�
menux%=x%
�
menuy%=y%
�"ș "Wimp_CreateMenu",,m%,x%,y%
��
�:
�� �menu_select
�#ș "Wimp_GetPointerInfo",,temp%
�redo%=((temp%!8) � 1)>0
�Ȏ !q% �
�/ � 1:� q%!4>=0 �select_proc(q%!4+1,temp%!8)

 � 2:�set_default

G � 3:redo%=�:� q%!4>=0 � running%=0 done%=� � �kill_proc(bar_proc%)

�

 0� redo% �open_menu(main_menu%,menux%,menuy%)

*�

4:

>� �set_default

H
� out%

R out%=�("<Bio$Dir>.!Choices")

\� running%>0 �

f � i%=1 � running%

p)  �bput(out%,lib_proc$(running%(i%)))

z �

��

�� #out%

��

�:

�� �tick(a%,i%,c%)

�a%=a%+28+24*i%

�,� c% � !a%=!a% � 1 � !a%=!a% � &FFFFFFFE

��

�:

�� �warn(w$)

�
!temp%=17

�$(temp%+4)=w$

�'ș "Wimp_ReportError",temp%,1,"Bio"
�
:
.� �mouse(mousex%,mousey%,b%,handle%,icon%)
$� shand%,proc%
.,bar_proc%=�find_elem(icon%,proc_icon%())
8� (b% � 5)>0 �
B Ȏ handle% �
L  � save_hand%:
V   Ȏ icon% �
`:    � 0:� �save(�get_str(savetext)) �close(save_hand%)
j'    � 1:�init_save_drag(save_hand%)
t   �
~  � -2:
�#   shand%=wind_hand%(bar_proc%)
�   � shand%>0 �
�5    � cur_setup_hand%<>-1 �close(cur_setup_hand%)
�    cur_setup_hand%=shand%
�    !q%=shand%
�$    ș "Wimp_GetWindowState",,q%
�    q%!28=-1
�     ș "Wimp_OpenWindow",,q%
�   �
�  :
�-   proc%=�find_elem(handle%,wind_hand%())
�   � proc%>0 �
f    e=�("FN"+lib_proc$(proc%)+"_mouse("+�mousex%+","+�mousey%+","+�b%+","+�handle%+","+�icon%+")")

    � e �process(proc%,"")
   �
 �
(�
2  � (b% � 2)>0 � handle%=-2 �
<V  � bar_proc%=0 �label_main("Bio") � �label_main(�leaf_name(lib_file$(bar_proc%)))
F+  �open_menu(main_menu%,mousex%-64,272)
P �
Z�
d�
n:
x� �label_main(title$)
�� i%=0 � �title$
�& main_menu%?i%=��title$+�0,i%+1,1)
��
��
�:
�� �file_type(name$)
�� type%,ok
�� name$="*" � =-1
�,ș "XOS_FSControl",31,name$ � ,,type%;ok
�7� (ok � 1)>0 �warn("Unknown file type '"+name$+"'")
�
=type%
�:
�� �message
� proc%
�copy(q%,mess%,&100)
Ȏ mess%!16 �
" � 0:done%=�
,	 � 1:
6  cur_proc%=�which_proc
@)  � �allow_type(mess%!40,cur_proc%) �
J   mess%!36=-1
T$   $(mess%+44)="<Wimp$Scrap>"+�0
^   mess%!12=mess%!8
h   mess%!16=2
r   !mess%=60
|-   ș "Wimp_SendMessage",17,mess%,mess%!4
�  �
�   �bad_file_type
�  �
�	 � 2:
�#  � �save(�get_str(mess%+44)) �
�   mess%!12=mess%!8
�   mess%!16=3
�-   ș "Wimp_SendMessage",17,mess%,mess%!4
�   �close(save_hand%)
�  �
�	 � 3:
�  proc%=�which_proc
�%  � �allow_type(mess%!40,proc%) �
)   �process(proc%,�get_str(mess%+44))
   mess%!12=mess%!8
   mess%!16=4
&-   ș "Wimp_SendMessage",17,mess%,mess%!4
0  �
:   �bad_file_type
D  �
N�
X�
b:
l� �bad_file_type
v�warn("Invalid file type")
��
�:
�� �which_proc
�!ș "Wimp_GetPointerInfo",,ic%
�2� ic%!12=-2 � =�find_elem(ic%!16,proc_icon%())
�$=�find_elem(ic%!12,wind_hand%())
�:
�� �allow_type(given%,proc%)
�A� (given%=&1000 � given%=&2000) � =(lib_flags%(proc%) � 2)<>0
�P� (lib_flags%(proc%) � 1) � (lib_in%(proc%)=-1 � lib_in%(proc%)=given%) � =�
�=�
�:
�� �copy(from%,to%,bytes%)
� i%
� i%=0 � bytes%-1 � 4
 to%!i%=from%!i%
 �
*�
4:
>� �process(proc%,file$)
H� e$,z,x,y,b,i%
Rcur_proc%=proc%
\1� cur_setup_hand%<>-1 �close(cur_setup_hand%)
fȗ x,y,b
p-e$="FN"+lib_proc$(proc%)+"("""+file$+""""
z)makes_file%=(lib_flags%(proc%) � 4)>0
�,makes_results%=(lib_flags%(proc%) � 8)>0
�(send_out%=(lib_flags%(proc%) � 16)>0
�
Ȏ � �
� � makes_file%:
�  e$+=","""+junk$+""""
� � makes_results%:
�  � i%=0 � lib_out%(proc%)
�$   e$+=",r$("+�proc%+","+�i%+")"
�  �
��
�e$+=")"
�ș "Hourglass_On"
� wind_hand%=wind_hand%(proc%)
z=�(e$)
ș "Hourglass_Off"
� z=0 �
$ Ȏ � �
.  � makes_results%:
8C   � r$(proc%,0)="" � �r$(proc%,0),1)="<" r$(proc%,0)="Results"
B   �open_result(proc%)
L  � makes_file%:
V,   ș "OS_File",18,junk$,lib_out%(proc%)
`   � send_out% �
j    $q%=�44,�0)+junk$
t    q%!16=5
~    q%!40=lib_out%(proc%)
�#    !q%=((�(junk$)+4) � � 3)+44
�%    ș "Wimp_SendMessage",18,q%,0
�   �
�-    �open_save(x-64,y-64,lib_out%(proc%))
�   �
� �
��
��
�:
�� �pop_up_save
�� x,y,b
�ȗ x,y,b
-�open_save(x-64,y-64,lib_out%(cur_proc%))

�
:
� �open_result(proc%)
(� i%,maxw%
25� result_open%(proc%) �close(result_hand%(proc%))
<%$result_title%(proc%)=r$(proc%,0)
Fmaxw%=0
P� i%=0 � lib_out%(proc%)
Z2 � �(r$(proc%,i%))>maxw% maxw%=�(r$(proc%,i%))
d�
n	!q%=0
x(q%!4=-(2*border%+40*lib_out%(proc%))
�q%!8=16*maxw%+2*border%
�q%!12=0
�.ș "Wimp_SetExtent",result_hand%(proc%),q%
�!q%=result_hand%(proc%)
� ș "Wimp_GetWindowState",,q%
�!q%!12=q%!4+16*maxw%+2*border%
�-q%!8=q%!16-(2*border%+40*lib_out%(proc%))
�q%!28=-1
�ș "Wimp_OpenWindow",,q%
�result_open%(proc%)=�
��
�:
�� �open_save(x%,y%,type%)
� w%,h%
'$savetype="Sfile_"+�"FF"+�~type%,3)
!q%=save_hand%
"ș "Wimp_GetWindowInfo",,q%
,w%=q%!12-q%!4
6h%=q%!16-q%!8
@q%!4=x%
Jq%!8=y%
Tq%!12=x%+w%
^q%!16=y%+h%
hq%!20=0
rq%!24=0
|q%!28=-1
�ș "Wimp_OpenWindow",,q%
��
�:
�� �drag
� ș "Wimp_GetPointerInfo",,q%
�q%!32=q%!4:q%!28=!q%
�q%!24=q%!16:q%!20=q%!12
�q%!16=1:q%!12=0
�)ș "OS_File",5,junk$ � ,,q%!40,,q%!36
�!q%!40=(q%!40 � &FFF00) � &100
�0$(q%+44)=�leaf_name(�get_str(savetext))+�(0)
�
!q%=60
�+ș "Wimp_SendMessage",17,q%,q%!20,q%!24
�
:
6� �key(hand%,icon%,xcar%,ycar%,carh%,carpos%,key%)
&� proc%
0"� hand%=save_hand% � key%=13 �
:3 � �save(�get_str(savetext)) �close(save_hand%)
D�
N) proc%=�find_elem(hand%,wind_hand%())
X � proc%=0 �
b  ș "Wimp_ProcessKey",key%
l �
vv  e=�("FN"+lib_proc$(proc%)+"_key("+�hand%+","+�icon%+","+�xcar%+","+�ycar%+","+�carh%+","+�carpos%+","+�key%+")")
�  � e �process(proc%,"")
� �
��
��
�:
�!� �init_save_drag(save_hand%)
�� x%,y%,ysize%
�!q%=save_hand%
� ș "Wimp_GetWindowState",,q%
�ysize%=q%!16-q%!8
�x%=q%!4
�y%=q%!8
�
q%!4=1
ș "Wimp_GetIconState",,q%
q%!8+=x%
q%!12+=y%+ysize%
 
q%!16+=x%
*q%!20+=y%+ysize%
4q%!24=0
>q%!28=0
Hq%!32=(�mv(11)+1)<<�mv(4)
Rq%!36=(�mv(12)+1)<<�mv(5)
\	!q%=0
f
q%!4=5
pș "Wimp_DragBox",,q%
z�
�:
�
� �mv(m%)
�� v%
�)ș "OS_ReadModeVariable",-1,m% � ,,v%
�=v%
�:
�� �save(save$)
�� saved%
�� �good_save_name(save$) �
�) ș "OS_FSControl",26,junk$,save$,&82
�
 saved%=�
��
�; �warn("To save, drag the icon to a directory viewer.")

 saved%=�
�
=saved%
$:
.� �good_save_name(save$)
89=save$="<Wimp$Scrap>" � �save$,":")>0 � �save$,".")>0
B:
L � �ic_addr(hand%,icon%,off%)
V!ic%=hand%
`ic%!4=icon%
jș "Wimp_GetIconState",,ic%
t
=ic%!off%
~:
�� �close(hand%)
�� proc%
�
!q%=hand%
�ș "Wimp_CloseWindow",,q%
�,� hand%=save_hand% ș "XOS_File",6,junk$
�0� hand%=cur_setup_hand% � cur_setup_hand%=-1
�*proc%=�find_elem(hand%,result_hand%())
�#� proc%>0 result_open%(proc%)=�
��
�:
�� �redraw(hand%)
�� i%,more%,ax0%,ay0%,proc%
*proc%=�find_elem(hand%,result_hand%())

&ș "Wimp_RedrawWindow",,q% � more%
ȕ more%
 ax0%=q%!4-q%!20
( ay0%=q%!16-q%!24
2 � i%=1 � lib_out%(proc%)
<-  � ax0%+border%,ay0%-8-border%-40*(i%-1)
F  � r$(proc%,i%)
P �
Z' ș "Wimp_GetRectangle",,q% � more%
d�
n�
x:
�
� �uc(a$)
�� i%,c$
�� i%=1 � �(a$)
� c$=�a$,i%,1)
�, � c$>="a" � c$<="z" �a$,i%,1)=�(�c$-32)
��
�=a$
�:
�
� �lc(a$)
�� i%
�� i%=1 � �(a$)
� c$=�a$,i%,1)
�, � c$>="A" � c$<="Z" �a$,i%,1)=�(�c$+32)
�
=a$
:
"� �strip_spaces(str$)
,ȕ �str$,1)=" "
6 str$=�str$,2)
@�
Jȕ �str$,1)=" "
T str$=�str$)
^�
h	=str$
r:
|� �bput(f%,str$)
�� #f%,str$+�10;
��
�:
�� �wput(f%,!_word%)
�ș "OS_GBPB",2,f%,_word%,4
��
�:
�� �wget(f%)
�ș "OS_GBPB",4,f%,_word%,4
�=!_word%
�:
�'� �write_in_icon(hand%,icon%,text$)
�#$�ic_addr(hand%,icon%,28)=text$
ic%!8=0:ic%!12=0
ș "Wimp_SetIconState",,ic%
#ș "Wimp_GetCaretPosition",,ic%
&W� !ic%=hand% � ic%!4=icon% ș "Wimp_SetCaretPosition",!ic%,ic%!4,ic%!8,ic%!12,-1,-1
0�
::
D� �icon_text(wind%,icon%)
N=$�ic_addr(wind%,icon%,28)
X:
b$� �set_button(!ic%,ic%!4,state%)
lic%!8=state%<<21
vic%!12=1<<21
�ș "Wimp_SetIconState",,ic%
��
�:
�� �button_state(!ic%,ic%!4)
�ș "Wimp_GetIconState",,ic%
�=�(ic%!(8+16) � 1<<21)
�:
�� �esg_state(wind%,esg%)
�Bș "Wimp_WhichIcon",wind%,ic%,%111111<<16,(esg%<<16) � (1<<21)
�	=!ic%
�:
�!� �hourglass(current,maximum)
�>� maximum<>0 ș "Hourglass_Percentage",current*100/maximum
�
�
00000000  0d 00 0a 10 f4 20 3e 21  52 75 6e 49 6d 61 67 65  |..... >!RunImage|
00000010  0d 00 14 19 f4 20 21 42  69 6f 20 66 69 6c 65 20  |..... !Bio file |
00000020  70 72 6f 63 65 73 73 6f  72 0d 00 1e 25 f4 20 62  |processor...%. b|
00000030  79 20 44 61 76 65 20 41  63 74 6f 6e 20 61 6e 64  |y Dave Acton and|
00000040  20 44 61 76 65 20 4c 61  77 72 65 6e 63 65 0d 00  | Dave Lawrence..|
00000050  28 19 f4 20 66 6f 72 20  33 32 2d 62 69 74 20 6d  |(.. for 32-bit m|
00000060  61 63 68 69 6e 65 73 0d  00 32 1b f4 20 28 63 29  |achines..2.. (c)|
00000070  20 42 41 55 20 46 65 62  72 75 61 72 79 20 31 39  | BAU February 19|
00000080  39 33 0d 00 3c 05 3a 0d  00 46 0d de 20 71 25 20  |93..<.:..F.. q% |
00000090  26 34 30 30 0d 00 50 0e  24 71 25 3d 22 54 41 53  |&400..P.$q%="TAS|
000000a0  4b 22 0d 00 5a 39 c8 99  20 22 57 69 6d 70 5f 49  |K"..Z9.. "Wimp_I|
000000b0  6e 69 74 69 61 6c 69 73  65 22 2c 32 30 30 2c 21  |nitialise",200,!|
000000c0  71 25 2c 22 42 69 6f 22  20 b8 20 76 65 72 73 69  |q%,"Bio" . versi|
000000d0  6f 6e 25 2c 6d 79 74 61  73 6b 25 0d 00 64 6c ee  |on%,mytask%..dl.|
000000e0  20 85 20 f2 77 61 72 6e  28 22 21 42 69 6f 20 68  | . .warn("!Bio h|
000000f0  61 73 20 73 75 66 66 65  72 65 64 20 61 20 66 61  |as suffered a fa|
00000100  74 61 6c 20 65 72 72 6f  72 20 28 22 2b f6 24 2b  |tal error ("+.$+|
00000110  22 20 61 74 20 6c 69 6e  65 20 22 2b c3 9e 2b 22  |" at line "+..+"|
00000120  29 20 61 6e 64 20 6d 75  73 74 20 65 78 69 74 22  |) and must exit"|
00000130  29 3a c8 99 20 22 57 69  6d 70 5f 43 6c 6f 73 65  |):.. "Wimp_Close|
00000140  44 6f 77 6e 22 3a e0 0d  00 6e 09 f2 69 6e 69 74  |Down":...n..init|
00000150  0d 00 78 0d f2 69 6e 69  74 5f 73 65 6c 0d 00 82  |..x..init_sel...|
00000160  0b 64 6f 6e 65 25 3d a3  0d 00 8c 05 f5 0d 00 96  |.done%=.........|
00000170  21 20 c8 99 20 22 57 69  6d 70 5f 50 6f 6c 6c 22  |! .. "Wimp_Poll"|
00000180  2c 2c 71 25 20 b8 20 72  65 61 73 6f 6e 25 0d 00  |,,q% . reason%..|
00000190  a0 11 20 c8 8e 20 72 65  61 73 6f 6e 25 20 ca 0d  |.. .. reason% ..|
000001a0  00 aa 16 20 20 c9 20 31  3a f2 72 65 64 72 61 77  |...  . 1:.redraw|
000001b0  28 21 71 25 29 0d 00 b4  22 20 20 c9 20 32 3a c8  |(!q%)..."  . 2:.|
000001c0  99 20 22 57 69 6d 70 5f  4f 70 65 6e 57 69 6e 64  |. "Wimp_OpenWind|
000001d0  6f 77 22 2c 2c 71 25 0d  00 be 15 20 20 c9 20 33  |ow",,q%....  . 3|
000001e0  3a f2 63 6c 6f 73 65 28  21 71 25 29 0d 00 c8 2b  |:.close(!q%)...+|
000001f0  20 20 c9 20 36 3a f2 6d  6f 75 73 65 28 21 71 25  |  . 6:.mouse(!q%|
00000200  2c 71 25 21 34 2c 71 25  21 38 2c 71 25 21 31 32  |,q%!4,q%!8,q%!12|
00000210  2c 71 25 21 31 36 29 0d  00 d2 0f 20 20 c9 20 37  |,q%!16)....  . 7|
00000220  3a f2 64 72 61 67 0d 00  dc 35 20 20 c9 20 38 3a  |:.drag...5  . 8:|
00000230  f2 6b 65 79 28 21 71 25  2c 71 25 21 34 2c 71 25  |.key(!q%,q%!4,q%|
00000240  21 38 2c 71 25 21 31 32  2c 71 25 21 31 36 2c 71  |!8,q%!12,q%!16,q|
00000250  25 21 32 30 2c 71 25 21  32 34 29 0d 00 e6 16 20  |%!20,q%!24).... |
00000260  20 c9 20 39 3a f2 6d 65  6e 75 5f 73 65 6c 65 63  | . 9:.menu_selec|
00000270  74 0d 00 f0 16 20 20 c9  20 31 37 2c 31 38 3a f2  |t....  . 17,18:.|
00000280  6d 65 73 73 61 67 65 0d  00 fa 17 20 20 c9 20 31  |message....  . 1|
00000290  39 3a f2 70 6f 70 5f 75  70 5f 73 61 76 65 0d 01  |9:.pop_up_save..|
000002a0  04 06 20 cb 0d 01 0e 0b  fd 20 64 6f 6e 65 25 0d  |.. ...... done%.|
000002b0  01 18 17 c8 99 20 22 57  69 6d 70 5f 43 6c 6f 73  |..... "Wimp_Clos|
000002c0  65 44 6f 77 6e 22 0d 01  22 05 e0 0d 01 2c 05 3a  |eDown".."....,.:|
000002d0  0d 01 36 0b dd 20 f2 69  6e 69 74 0d 01 40 3e de  |..6.. .init..@>.|
000002e0  20 69 6e 64 25 20 26 31  34 30 30 2c 73 74 72 69  | ind% &1400,stri|
000002f0  6e 67 25 20 26 31 30 30  2c 6d 65 6e 75 62 75 66  |ng% &100,menubuf|
00000300  25 20 26 33 30 30 2c 5f  77 6f 72 64 25 20 34 2c  |% &300,_word% 4,|
00000310  5f 73 74 61 72 25 20 31  32 0d 01 4a 22 de 20 74  |_star% 12..J". t|
00000320  65 6d 70 25 20 26 31 30  30 2c 69 63 25 20 36 34  |emp% &100,ic% 64|
00000330  2c 6d 65 73 73 25 20 26  31 30 30 0d 01 54 17 69  |,mess% &100..T.i|
00000340  6e 64 5f 65 6e 64 25 3d  69 6e 64 25 2b 26 31 34  |nd_end%=ind%+&14|
00000350  30 30 0d 01 5e 20 6c 69  62 72 61 72 79 24 3d 22  |00..^ library$="|
00000360  3c 42 69 6f 24 44 69 72  3e 2e 4c 69 62 72 61 72  |<Bio$Dir>.Librar|
00000370  79 22 0d 01 68 16 6a 75  6e 6b 24 3d 22 3c 42 69  |y"..h.junk$="<Bi|
00000380  6f 24 4a 75 6e 6b 3e 22  0d 01 72 39 74 79 70 65  |o$Junk>"..r9type|
00000390  5f 64 65 66 24 3d 22 69  6e 2f 6b 2c 6f 75 74 3d  |_def$="in/k,out=|
000003a0  72 65 73 75 6c 74 73 2f  6b 2c 64 69 72 65 63 74  |results/k,direct|
000003b0  6f 72 79 3d 64 69 72 2f  73 2c 73 65 6e 64 2f 73  |ory=dir/s,send/s|
000003c0  22 0d 01 7c 15 6d 61 78  5f 6c 69 62 5f 66 69 6c  |"..|.max_lib_fil|
000003d0  65 73 25 3d 33 32 0d 01  86 0d 62 6f 72 64 65 72  |es%=32....border|
000003e0  25 3d 38 0d 01 90 39 de  20 6c 69 62 5f 66 69 6c  |%=8...9. lib_fil|
000003f0  65 24 28 6d 61 78 5f 6c  69 62 5f 66 69 6c 65 73  |e$(max_lib_files|
00000400  25 29 2c 6c 69 62 5f 70  72 6f 63 24 28 6d 61 78  |%),lib_proc$(max|
00000410  5f 6c 69 62 5f 66 69 6c  65 73 25 29 0d 01 9a 3a  |_lib_files%)...:|
00000420  de 20 6c 69 62 5f 6e 61  6d 65 24 28 6d 61 78 5f  |. lib_name$(max_|
00000430  6c 69 62 5f 66 69 6c 65  73 25 29 2c 6c 69 62 5f  |lib_files%),lib_|
00000440  66 6c 61 67 73 25 28 6d  61 78 5f 6c 69 62 5f 66  |flags%(max_lib_f|
00000450  69 6c 65 73 25 29 0d 01  a4 36 de 20 6c 69 62 5f  |iles%)...6. lib_|
00000460  69 6e 25 28 6d 61 78 5f  6c 69 62 5f 66 69 6c 65  |in%(max_lib_file|
00000470  73 25 29 2c 6c 69 62 5f  6f 75 74 25 28 6d 61 78  |s%),lib_out%(max|
00000480  5f 6c 69 62 5f 66 69 6c  65 73 25 29 0d 01 ae 3b  |_lib_files%)...;|
00000490  de 20 70 72 6f 63 5f 69  63 6f 6e 25 28 6d 61 78  |. proc_icon%(max|
000004a0  5f 6c 69 62 5f 66 69 6c  65 73 25 29 2c 77 69 6e  |_lib_files%),win|
000004b0  64 5f 68 61 6e 64 25 28  6d 61 78 5f 6c 69 62 5f  |d_hand%(max_lib_|
000004c0  66 69 6c 65 73 25 29 0d  01 b8 38 de 20 72 24 28  |files%)...8. r$(|
000004d0  6d 61 78 5f 6c 69 62 5f  66 69 6c 65 73 25 2c 31  |max_lib_files%,1|
000004e0  30 29 2c 72 65 73 75 6c  74 5f 68 61 6e 64 25 28  |0),result_hand%(|
000004f0  6d 61 78 5f 6c 69 62 5f  66 69 6c 65 73 25 29 0d  |max_lib_files%).|
00000500  01 c2 3c de 20 72 75 6e  6e 69 6e 67 25 28 6d 61  |..<. running%(ma|
00000510  78 5f 6c 69 62 5f 66 69  6c 65 73 25 29 2c 72 65  |x_lib_files%),re|
00000520  73 75 6c 74 5f 74 69 74  6c 65 25 28 6d 61 78 5f  |sult_title%(max_|
00000530  6c 69 62 5f 66 69 6c 65  73 25 29 0d 01 cc 22 de  |lib_files%)...".|
00000540  20 72 65 73 75 6c 74 5f  6f 70 65 6e 25 28 6d 61  | result_open%(ma|
00000550  78 5f 6c 69 62 5f 66 69  6c 65 73 25 29 0d 01 d6  |x_lib_files%)...|
00000560  10 6c 69 62 5f 66 69 6c  65 73 25 3d 30 0d 01 e0  |.lib_files%=0...|
00000570  17 6c 69 62 5f 73 70 72  69 74 65 5f 73 69 7a 65  |.lib_sprite_size|
00000580  25 3d 31 36 0d 01 ea 1e  f2 66 69 6e 64 5f 70 72  |%=16.....find_pr|
00000590  6f 63 65 64 75 72 65 73  28 6c 69 62 72 61 72 79  |ocedures(library|
000005a0  24 29 0d 01 f4 23 de 20  6c 69 62 5f 73 70 72 69  |$)...#. lib_spri|
000005b0  74 65 73 25 20 6c 69 62  5f 73 70 72 69 74 65 5f  |tes% lib_sprite_|
000005c0  73 69 7a 65 25 0d 01 fe  22 21 6c 69 62 5f 73 70  |size%..."!lib_sp|
000005d0  72 69 74 65 73 25 3d 6c  69 62 5f 73 70 72 69 74  |rites%=lib_sprit|
000005e0  65 5f 73 69 7a 65 25 0d  02 08 14 6c 69 62 5f 73  |e_size%....lib_s|
000005f0  70 72 69 74 65 73 25 21  34 3d 30 0d 02 12 15 6c  |prites%!4=0....l|
00000600  69 62 5f 73 70 72 69 74  65 73 25 21 38 3d 31 36  |ib_sprites%!8=16|
00000610  0d 02 1c 16 6c 69 62 5f  73 70 72 69 74 65 73 25  |....lib_sprites%|
00000620  21 31 32 3d 31 36 0d 02  26 18 f2 6c 6f 61 64 5f  |!12=16..&..load_|
00000630  64 61 74 61 28 6c 69 62  72 61 72 79 24 29 0d 02  |data(library$)..|
00000640  30 12 c8 a3 20 6c 69 62  5f 66 69 6c 65 24 28 29  |0... lib_file$()|
00000650  0d 02 3a 14 f2 69 6e 69  74 5f 70 72 6f 63 65 64  |..:..init_proced|
00000660  75 72 65 73 0d 02 44 31  c8 99 20 22 57 69 6d 70  |ures..D1.. "Wimp|
00000670  5f 4f 70 65 6e 54 65 6d  70 6c 61 74 65 22 2c 2c  |_OpenTemplate",,|
00000680  22 3c 42 69 6f 24 44 69  72 3e 2e 54 65 6d 70 6c  |"<Bio$Dir>.Templ|
00000690  61 74 65 73 22 0d 02 4e  17 e3 20 69 25 3d 31 20  |ates"..N.. i%=1 |
000006a0  b8 20 6c 69 62 5f 66 69  6c 65 73 25 0d 02 58 1f  |. lib_files%..X.|
000006b0  20 e7 20 28 6c 69 62 5f  66 6c 61 67 73 25 28 69  | . (lib_flags%(i|
000006c0  25 29 20 80 20 38 29 3e  30 20 8c 0d 02 62 43 20  |%) . 8)>0 ...bC |
000006d0  20 c8 99 20 22 57 69 6d  70 5f 4c 6f 61 64 54 65  | .. "Wimp_LoadTe|
000006e0  6d 70 6c 61 74 65 22 2c  2c 71 25 2c 69 6e 64 25  |mplate",,q%,ind%|
000006f0  2c 69 6e 64 5f 65 6e 64  25 2c 2d 31 2c 22 72 65  |,ind_end%,-1,"re|
00000700  73 75 6c 74 22 20 b8 20  2c 2c 69 6e 64 25 0d 02  |sult" . ,,ind%..|
00000710  6c 16 20 20 71 25 21 34  2b 3d b3 28 34 30 30 29  |l.  q%!4+=.(400)|
00000720  2d 32 30 30 0d 02 76 17  20 20 71 25 21 31 36 2b  |-200..v.  q%!16+|
00000730  3d b3 28 34 30 30 29 2d  32 30 30 0d 02 80 1d 20  |=.(400)-200.... |
00000740  20 72 65 73 75 6c 74 5f  74 69 74 6c 65 25 28 69  | result_title%(i|
00000750  25 29 3d 71 25 21 37 32  0d 02 8a 33 20 20 c8 99  |%)=q%!72...3  ..|
00000760  20 22 57 69 6d 70 5f 43  72 65 61 74 65 57 69 6e  | "Wimp_CreateWin|
00000770  64 6f 77 22 2c 2c 71 25  20 b8 20 72 65 73 75 6c  |dow",,q% . resul|
00000780  74 5f 68 61 6e 64 25 28  69 25 29 0d 02 94 06 20  |t_hand%(i%).... |
00000790  cd 0d 02 9e 05 ed 0d 02  a8 43 c8 99 20 22 57 69  |.........C.. "Wi|
000007a0  6d 70 5f 4c 6f 61 64 54  65 6d 70 6c 61 74 65 22  |mp_LoadTemplate"|
000007b0  2c 2c 71 25 2c 69 6e 64  25 2c 69 6e 64 5f 65 6e  |,,q%,ind%,ind_en|
000007c0  64 25 2c 2d 31 2c 22 70  72 6f 67 49 6e 66 6f 22  |d%,-1,"progInfo"|
000007d0  20 b8 20 2c 2c 69 6e 64  25 0d 02 b2 2b c8 99 20  | . ,,ind%...+.. |
000007e0  22 57 69 6d 70 5f 43 72  65 61 74 65 57 69 6e 64  |"Wimp_CreateWind|
000007f0  6f 77 22 2c 2c 71 25 20  b8 20 69 6e 66 6f 5f 68  |ow",,q% . info_h|
00000800  61 6e 64 25 0d 02 bc 3f  c8 99 20 22 57 69 6d 70  |and%...?.. "Wimp|
00000810  5f 4c 6f 61 64 54 65 6d  70 6c 61 74 65 22 2c 2c  |_LoadTemplate",,|
00000820  71 25 2c 69 6e 64 25 2c  69 6e 64 5f 65 6e 64 25  |q%,ind%,ind_end%|
00000830  2c 2d 31 2c 22 73 61 76  65 22 20 b8 20 2c 2c 69  |,-1,"save" . ,,i|
00000840  6e 64 25 0d 02 c6 2b c8  99 20 22 57 69 6d 70 5f  |nd%...+.. "Wimp_|
00000850  43 72 65 61 74 65 57 69  6e 64 6f 77 22 2c 2c 71  |CreateWindow",,q|
00000860  25 20 b8 20 73 61 76 65  5f 68 61 6e 64 25 0d 02  |% . save_hand%..|
00000870  d0 1b c8 99 20 22 57 69  6d 70 5f 43 6c 6f 73 65  |.... "Wimp_Close|
00000880  54 65 6d 70 6c 61 74 65  22 0d 02 da 26 73 61 76  |Template"...&sav|
00000890  65 74 65 78 74 3d a4 69  63 5f 61 64 64 72 28 73  |etext=.ic_addr(s|
000008a0  61 76 65 5f 68 61 6e 64  25 2c 32 2c 32 38 29 0d  |ave_hand%,2,28).|
000008b0  02 e4 26 73 61 76 65 74  79 70 65 3d a4 69 63 5f  |..&savetype=.ic_|
000008c0  61 64 64 72 28 73 61 76  65 5f 68 61 6e 64 25 2c  |addr(save_hand%,|
000008d0  31 2c 33 32 29 0d 02 ee  16 24 73 61 76 65 74 65  |1,32)....$savete|
000008e0  78 74 3d 22 52 65 73 75  6c 74 22 0d 02 f8 15 6d  |xt="Result"....m|
000008f0  65 6e 75 70 74 72 25 3d  6d 65 6e 75 62 75 66 25  |enuptr%=menubuf%|
00000900  0d 03 02 1a 6d 65 6e 75  64 61 74 25 3d 6d 65 6e  |....menudat%=men|
00000910  75 62 75 66 25 2b 26 33  30 30 0d 03 0c 2e 70 72  |ubuf%+&300....pr|
00000920  6f 63 5f 6d 65 6e 75 25  3d a4 6d 61 6b 65 5f 6d  |oc_menu%=.make_m|
00000930  65 6e 5f 72 61 77 28 70  6d 65 6e 75 25 2c 22 50  |en_raw(pmenu%,"P|
00000940  72 6f 63 65 73 73 22 29  0d 03 16 40 6d 61 69 6e  |rocess")...@main|
00000950  5f 6d 65 6e 75 25 3d a4  6d 61 6b 65 5f 6d 65 6e  |_menu%=.make_men|
00000960  28 22 49 6e 66 6f 2c 50  72 6f 63 65 73 73 2c 53  |("Info,Process,S|
00000970  65 74 20 64 65 66 61 75  6c 74 2c 51 75 69 74 2c  |et default,Quit,|
00000980  22 2c 22 42 69 6f 22 29  0d 03 20 26 61 6c 6c 5f  |","Bio").. &all_|
00000990  6d 65 6e 75 25 3d a4 6d  61 6b 65 5f 6d 65 6e 28  |menu%=.make_men(|
000009a0  22 41 6c 6c 2c 22 2c 22  51 75 69 74 22 29 0d 03  |"All,","Quit")..|
000009b0  2a 2d f2 61 74 74 61 63  68 5f 73 75 62 5f 6d 65  |*-.attach_sub_me|
000009c0  6e 75 28 69 6e 66 6f 5f  68 61 6e 64 25 2c 6d 61  |nu(info_hand%,ma|
000009d0  69 6e 5f 6d 65 6e 75 25  2c 30 29 0d 03 34 2d f2  |in_menu%,0)..4-.|
000009e0  61 74 74 61 63 68 5f 73  75 62 5f 6d 65 6e 75 28  |attach_sub_menu(|
000009f0  70 72 6f 63 5f 6d 65 6e  75 25 2c 6d 61 69 6e 5f  |proc_menu%,main_|
00000a00  6d 65 6e 75 25 2c 31 29  0d 03 3e 2c f2 61 74 74  |menu%,1)..>,.att|
00000a10  61 63 68 5f 73 75 62 5f  6d 65 6e 75 28 61 6c 6c  |ach_sub_menu(all|
00000a20  5f 6d 65 6e 75 25 2c 6d  61 69 6e 5f 6d 65 6e 75  |_menu%,main_menu|
00000a30  25 2c 33 29 0d 03 48 16  63 75 72 5f 73 65 74 75  |%,3)..H.cur_setu|
00000a40  70 5f 68 61 6e 64 25 3d  2d 31 0d 03 52 05 e1 0d  |p_hand%=-1..R...|
00000a50  03 5c 05 3a 0d 03 66 1c  dd 20 f2 66 69 6e 64 5f  |.\.:..f.. .find_|
00000a60  70 72 6f 63 65 64 75 72  65 73 28 64 69 72 24 29  |procedures(dir$)|
00000a70  0d 03 70 0b ea 20 6e 25  2c 72 25 0d 03 7a 08 6e  |..p.. n%,r%..z.n|
00000a80  25 3d 30 0d 03 84 0d c8  95 20 6e 25 3c 3e 2d 31  |%=0...... n%<>-1|
00000a90  0d 03 8e 38 20 c8 99 20  22 4f 53 5f 47 42 50 42  |...8 .. "OS_GBPB|
00000aa0  22 2c 31 30 2c 64 69 72  24 2c 74 65 6d 70 25 2c  |",10,dir$,temp%,|
00000ab0  31 2c 6e 25 2c 26 31 30  30 2c 22 2a 22 20 b8 20  |1,n%,&100,"*" . |
00000ac0  2c 2c 2c 72 25 2c 6e 25  0d 03 98 0d 20 e7 20 72  |,,,r%,n%.... . r|
00000ad0  25 3d 31 20 8c 0d 03 a2  1e 20 20 66 69 6c 65 24  |%=1 .....  file$|
00000ae0  3d a4 67 65 74 5f 73 74  72 28 74 65 6d 70 25 2b  |=.get_str(temp%+|
00000af0  32 30 29 0d 03 ac 14 20  20 e7 20 74 65 6d 70 25  |20)....  . temp%|
00000b00  21 31 36 3d 32 20 8c 0d  03 b6 27 20 20 20 f2 66  |!16=2 ....'   .f|
00000b10  69 6e 64 5f 70 72 6f 63  65 64 75 72 65 73 28 64  |ind_procedures(d|
00000b20  69 72 24 2b 22 2e 22 2b  66 69 6c 65 24 29 0d 03  |ir$+"."+file$)..|
00000b30  c0 07 20 20 cc 0d 03 ca  26 20 20 20 c8 8e 20 28  |..  ....&   .. (|
00000b40  28 21 74 65 6d 70 25 29  20 80 20 26 46 46 46 30  |(!temp%) . &FFF0|
00000b50  30 29 20 81 20 26 31 30  30 20 ca 0d 03 d4 0f 20  |0) . &100 ..... |
00000b60  20 20 20 c9 20 26 46 46  39 3a 0d 03 de 22 20 20  |   . &FF9:..."  |
00000b70  20 20 20 6c 69 62 5f 73  70 72 69 74 65 5f 73 69  |   lib_sprite_si|
00000b80  7a 65 25 2b 3d 74 65 6d  70 25 21 38 0d 03 e8 0f  |ze%+=temp%!8....|
00000b90  20 20 20 20 c9 20 26 46  46 42 3a 0d 03 f2 16 20  |    . &FFB:.... |
00000ba0  20 20 20 20 6c 69 62 5f  66 69 6c 65 73 25 2b 3d  |    lib_files%+=|
00000bb0  31 0d 03 fc 29 20 20 20  20 20 6c 69 62 5f 70 72  |1...)     lib_pr|
00000bc0  6f 63 24 28 6c 69 62 5f  66 69 6c 65 73 25 29 3d  |oc$(lib_files%)=|
00000bd0  a4 6c 63 28 66 69 6c 65  24 29 0d 04 06 2d 20 20  |.lc(file$)...-  |
00000be0  20 20 20 6c 69 62 5f 66  69 6c 65 24 28 6c 69 62  |   lib_file$(lib|
00000bf0  5f 66 69 6c 65 73 25 29  3d 64 69 72 24 2b 22 2e  |_files%)=dir$+".|
00000c00  22 2b 66 69 6c 65 24 0d  04 10 08 20 20 20 cb 0d  |"+file$....   ..|
00000c10  04 1a 07 20 20 cd 0d 04  24 06 20 cd 0d 04 2e 05  |...  ...$. .....|
00000c20  ce 0d 04 38 05 e1 0d 04  42 05 3a 0d 04 4c 16 dd  |...8....B.:..L..|
00000c30  20 f2 6c 6f 61 64 5f 64  61 74 61 28 64 69 72 24  | .load_data(dir$|
00000c40  29 0d 04 56 11 ea 20 6e  25 2c 72 25 2c 66 69 6c  |)..V.. n%,r%,fil|
00000c50  65 24 0d 04 60 08 6e 25  3d 30 0d 04 6a 0d c8 95  |e$..`.n%=0..j...|
00000c60  20 6e 25 3c 3e 2d 31 0d  04 74 38 20 c8 99 20 22  | n%<>-1..t8 .. "|
00000c70  4f 53 5f 47 42 50 42 22  2c 31 30 2c 64 69 72 24  |OS_GBPB",10,dir$|
00000c80  2c 74 65 6d 70 25 2c 31  2c 6e 25 2c 26 31 30 30  |,temp%,1,n%,&100|
00000c90  2c 22 2a 22 20 b8 20 2c  2c 2c 72 25 2c 6e 25 0d  |,"*" . ,,,r%,n%.|
00000ca0  04 7e 0d 20 e7 20 72 25  3d 31 20 8c 0d 04 88 1e  |.~. . r%=1 .....|
00000cb0  20 20 66 69 6c 65 24 3d  a4 67 65 74 5f 73 74 72  |  file$=.get_str|
00000cc0  28 74 65 6d 70 25 2b 32  30 29 0d 04 92 14 20 20  |(temp%+20)....  |
00000cd0  e7 20 74 65 6d 70 25 21  31 36 3d 32 20 8c 0d 04  |. temp%!16=2 ...|
00000ce0  9c 21 20 20 20 f2 6c 6f  61 64 5f 64 61 74 61 28  |.!   .load_data(|
00000cf0  64 69 72 24 2b 22 2e 22  2b 66 69 6c 65 24 29 0d  |dir$+"."+file$).|
00000d00  04 a6 07 20 20 cc 0d 04  b0 26 20 20 20 c8 8e 20  |...  ....&   .. |
00000d10  28 28 21 74 65 6d 70 25  29 20 80 20 26 46 46 46  |((!temp%) . &FFF|
00000d20  30 30 29 20 81 20 26 31  30 30 20 ca 0d 04 ba 0f  |00) . &100 .....|
00000d30  20 20 20 20 c9 20 26 46  46 39 3a 0d 04 c4 3a 20  |    . &FF9:...: |
00000d40  20 20 20 20 c8 99 20 22  4f 53 5f 53 70 72 69 74  |    .. "OS_Sprit|
00000d50  65 4f 70 22 2c 26 31 30  42 2c 6c 69 62 5f 73 70  |eOp",&10B,lib_sp|
00000d60  72 69 74 65 73 25 2c 64  69 72 24 2b 22 2e 22 2b  |rites%,dir$+"."+|
00000d70  66 69 6c 65 24 0d 04 ce  0f 20 20 20 20 c9 20 26  |file$....    . &|
00000d80  46 45 43 3a 0d 04 d8 2f  20 20 20 20 20 c8 99 20  |FEC:.../     .. |
00000d90  22 57 69 6d 70 5f 4f 70  65 6e 54 65 6d 70 6c 61  |"Wimp_OpenTempla|
00000da0  74 65 22 2c 2c 64 69 72  24 2b 22 2e 22 2b 66 69  |te",,dir$+"."+fi|
00000db0  6c 65 24 0d 04 e2 10 20  20 20 20 20 77 69 6e 64  |le$....     wind|
00000dc0  25 3d 30 0d 04 ec 0a 20  20 20 20 20 f5 0d 04 f6  |%=0....     ....|
00000dd0  15 20 20 20 20 20 20 24  5f 73 74 61 72 25 3d 22  |.      $_star%="|
00000de0  2a 22 0d 05 00 57 20 20  20 20 20 20 c8 99 20 22  |*"...W      .. "|
00000df0  57 69 6d 70 5f 4c 6f 61  64 54 65 6d 70 6c 61 74  |Wimp_LoadTemplat|
00000e00  65 22 2c 2c 71 25 2c 69  6e 64 25 2c 69 6e 64 5f  |e",,q%,ind%,ind_|
00000e10  65 6e 64 25 2c 2d 31 2c  5f 73 74 61 72 25 2c 77  |end%,-1,_star%,w|
00000e20  69 6e 64 25 20 b8 20 2c  2c 6e 65 77 69 6e 64 25  |ind% . ,,newind%|
00000e30  2c 2c 2c 2c 77 69 6e 64  25 0d 05 0a 16 20 20 20  |,,,,wind%....   |
00000e40  20 20 20 e7 20 77 69 6e  64 25 3c 3e 30 20 8c 0d  |   . wind%<>0 ..|
00000e50  05 14 32 20 20 20 20 20  20 20 70 72 6f 63 25 3d  |..2       proc%=|
00000e60  a4 66 69 6e 64 5f 70 72  6f 63 28 a4 6c 63 28 a4  |.find_proc(.lc(.|
00000e70  67 65 74 5f 73 74 72 28  5f 73 74 61 72 25 29 29  |get_str(_star%))|
00000e80  29 0d 05 1e 16 20 20 20  20 20 20 20 e7 20 70 72  |)....       . pr|
00000e90  6f 63 25 3e 30 20 8c 0d  05 28 18 20 20 20 20 20  |oc%>0 ...(.     |
00000ea0  20 20 20 69 6e 64 25 3d  6e 65 77 69 6e 64 25 0d  |   ind%=newind%.|
00000eb0  05 32 3a 20 20 20 20 20  20 20 20 c8 99 20 22 57  |.2:        .. "W|
00000ec0  69 6d 70 5f 43 72 65 61  74 65 57 69 6e 64 6f 77  |imp_CreateWindow|
00000ed0  22 2c 2c 71 25 20 b8 20  77 69 6e 64 5f 68 61 6e  |",,q% . wind_han|
00000ee0  64 25 28 70 72 6f 63 25  29 0d 05 3c 13 20 20 20  |d%(proc%)..<.   |
00000ef0  20 20 20 20 20 77 69 6e  64 25 3d 30 0d 05 46 0c  |     wind%=0..F.|
00000f00  20 20 20 20 20 20 20 cd  0d 05 50 0b 20 20 20 20  |       ...P.    |
00000f10  20 20 cd 0d 05 5a 12 20  20 20 20 20 fd 20 77 69  |  ...Z.     . wi|
00000f20  6e 64 25 3d 30 0d 05 64  20 20 20 20 20 20 c8 99  |nd%=0..d      ..|
00000f30  20 22 57 69 6d 70 5f 43  6c 6f 73 65 54 65 6d 70  | "Wimp_CloseTemp|
00000f40  6c 61 74 65 22 0d 05 6e  08 20 20 20 cb 0d 05 78  |late"..n.   ...x|
00000f50  07 20 20 cd 0d 05 82 06  20 cd 0d 05 8c 05 ce 0d  |.  ..... .......|
00000f60  05 96 05 e1 0d 05 a0 05  3a 0d 05 aa 17 dd 20 a4  |........:..... .|
00000f70  66 69 6e 64 5f 70 72 6f  63 28 70 72 6f 63 24 29  |find_proc(proc$)|
00000f80  0d 05 b4 08 ea 20 69 25  0d 05 be 13 69 25 3d 6c  |..... i%....i%=l|
00000f90  69 62 5f 66 69 6c 65 73  25 2b 31 0d 05 c8 05 f5  |ib_files%+1.....|
00000fa0  0d 05 d2 0a 20 69 25 2d  3d 31 0d 05 dc 20 fd 20  |.... i%-=1... . |
00000fb0  69 25 3d 30 20 84 20 70  72 6f 63 24 3d 6c 69 62  |i%=0 . proc$=lib|
00000fc0  5f 70 72 6f 63 24 28 69  25 29 0d 05 e6 07 3d 69  |_proc$(i%)....=i|
00000fd0  25 0d 05 f0 05 3a 0d 05  fa 19 dd 20 a4 66 69 6e  |%....:..... .fin|
00000fe0  64 5f 65 6c 65 6d 28 65  25 2c 61 25 28 29 29 0d  |d_elem(e%,a%()).|
00000ff0  06 04 08 ea 20 69 25 0d  06 0e 13 69 25 3d 6c 69  |.... i%....i%=li|
00001000  62 5f 66 69 6c 65 73 25  2b 31 0d 06 18 05 f5 0d  |b_files%+1......|
00001010  06 22 0a 20 69 25 2d 3d  31 0d 06 2c 16 fd 20 69  |.". i%-=1..,.. i|
00001020  25 3d 30 20 84 20 65 25  3d 61 25 28 69 25 29 0d  |%=0 . e%=a%(i%).|
00001030  06 36 07 3d 69 25 0d 06  40 05 3a 0d 06 4a 16 dd  |.6.=i%..@.:..J..|
00001040  20 f2 69 6e 69 74 5f 70  72 6f 63 65 64 75 72 65  | .init_procedure|
00001050  73 0d 06 54 28 de 20 6c  69 62 5f 73 70 72 25 28  |s..T(. lib_spr%(|
00001060  6c 69 62 5f 66 69 6c 65  73 25 2c 31 29 2c 70 6d  |lib_files%,1),pm|
00001070  65 6e 75 25 20 26 34 30  30 0d 06 5e 29 6c 69 62  |enu% &400..^)lib|
00001080  5f 73 70 72 25 28 30 2c  30 29 3d a4 73 70 72 69  |_spr%(0,0)=.spri|
00001090  74 65 5f 61 64 64 72 65  73 73 28 22 42 69 6f 34  |te_address("Bio4|
000010a0  22 29 0d 06 68 29 6c 69  62 5f 73 70 72 25 28 30  |")..h)lib_spr%(0|
000010b0  2c 31 29 3d a4 73 70 72  69 74 65 5f 61 64 64 72  |,1)=.sprite_addr|
000010c0  65 73 73 28 22 42 69 6f  32 22 29 0d 06 72 0f 70  |ess("Bio2")..r.p|
000010d0  6d 70 25 3d 70 6d 65 6e  75 25 0d 06 7c 17 e3 20  |mp%=pmenu%..|.. |
000010e0  69 25 3d 31 20 b8 20 6c  69 62 5f 66 69 6c 65 73  |i%=1 . lib_files|
000010f0  25 0d 06 86 36 20 6c 69  62 5f 73 70 72 25 28 69  |%...6 lib_spr%(i|
00001100  25 2c 30 29 3d a4 73 70  72 69 74 65 5f 61 64 64  |%,0)=.sprite_add|
00001110  72 65 73 73 28 6c 69 62  5f 70 72 6f 63 24 28 69  |ress(lib_proc$(i|
00001120  25 29 2b 22 34 22 29 0d  06 90 36 20 6c 69 62 5f  |%)+"4")...6 lib_|
00001130  73 70 72 25 28 69 25 2c  31 29 3d a4 73 70 72 69  |spr%(i%,1)=.spri|
00001140  74 65 5f 61 64 64 72 65  73 73 28 6c 69 62 5f 70  |te_address(lib_p|
00001150  72 6f 63 24 28 69 25 29  2b 22 32 22 29 0d 06 9a  |roc$(i%)+"2")...|
00001160  30 20 6c 69 62 5f 6e 61  6d 65 24 28 69 25 29 3d  |0 lib_name$(i%)=|
00001170  a0 28 22 46 4e 22 2b 6c  69 62 5f 70 72 6f 63 24  |.("FN"+lib_proc$|
00001180  28 69 25 29 2b 22 5f 6e  61 6d 65 22 29 0d 06 a4  |(i%)+"_name")...|
00001190  28 20 74 79 70 65 24 3d  a0 28 22 46 4e 22 2b 6c  |( type$=.("FN"+l|
000011a0  69 62 5f 70 72 6f 63 24  28 69 25 29 2b 22 5f 61  |ib_proc$(i%)+"_a|
000011b0  72 67 73 22 29 0d 06 ae  2d 20 c8 99 20 22 4f 53  |rgs")...- .. "OS|
000011c0  5f 52 65 61 64 41 72 67  73 22 2c 74 79 70 65 5f  |_ReadArgs",type_|
000011d0  64 65 66 24 2c 74 79 70  65 24 2c 71 25 2c 26 34  |def$,type$,q%,&4|
000011e0  30 30 0d 06 b8 18 20 66  69 6c 65 73 5f 69 6e 25  |00.... files_in%|
000011f0  3d 28 71 25 21 30 3c 3e  30 29 0d 06 c2 16 20 69  |=(q%!0<>0).... i|
00001200  73 5f 6f 75 74 25 3d 28  71 25 21 34 3c 3e 30 29  |s_out%=(q%!4<>0)|
00001210  0d 06 cc 17 20 64 69 72  73 5f 69 6e 25 3d 28 71  |.... dirs_in%=(q|
00001220  25 21 38 3c 3e 30 29 0d  06 d6 19 20 73 65 6e 64  |%!8<>0).... send|
00001230  5f 6f 75 74 25 3d 28 71  25 21 31 32 3c 3e 30 29  |_out%=(q%!12<>0)|
00001240  0d 06 e0 11 20 66 69 6c  65 73 5f 6f 75 74 25 3d  |.... files_out%=|
00001250  a3 0d 06 ea 10 20 64 61  74 61 5f 6f 75 74 25 3d  |..... data_out%=|
00001260  a3 0d 06 f4 37 20 e7 20  66 69 6c 65 73 5f 69 6e  |....7 . files_in|
00001270  25 20 6c 69 62 5f 69 6e  25 28 69 25 29 3d a4 66  |% lib_in%(i%)=.f|
00001280  69 6c 65 5f 74 79 70 65  28 a4 67 65 74 5f 73 74  |ile_type(.get_st|
00001290  72 28 71 25 21 30 29 29  0d 06 fe 10 20 e7 20 69  |r(q%!0)).... . i|
000012a0  73 5f 6f 75 74 25 20 8c  0d 07 08 19 20 20 6f 75  |s_out% .....  ou|
000012b0  74 24 3d a4 67 65 74 5f  73 74 72 28 71 25 21 34  |t$=.get_str(q%!4|
000012c0  29 0d 07 12 15 20 20 e7  20 c3 bb 6f 75 74 24 3d  |)....  . ..out$=|
000012d0  6f 75 74 24 20 8c 0d 07  1c 19 20 20 20 6c 69 62  |out$ .....   lib|
000012e0  5f 6f 75 74 25 28 69 25  29 3d bb 6f 75 74 24 0d  |_out%(i%)=.out$.|
000012f0  07 26 12 20 20 20 64 61  74 61 5f 6f 75 74 25 3d  |.&.   data_out%=|
00001300  b9 0d 07 30 07 20 20 cc  0d 07 3a 24 20 20 20 6c  |...0.  ...:$   l|
00001310  69 62 5f 6f 75 74 25 28  69 25 29 3d a4 66 69 6c  |ib_out%(i%)=.fil|
00001320  65 5f 74 79 70 65 28 6f  75 74 24 29 0d 07 44 13  |e_type(out$)..D.|
00001330  20 20 20 66 69 6c 65 73  5f 6f 75 74 25 3d b9 0d  |   files_out%=..|
00001340  07 4e 07 20 20 cd 0d 07  58 06 20 cd 0d 07 62 6c  |.N.  ...X. ...bl|
00001350  20 6c 69 62 5f 66 6c 61  67 73 25 28 69 25 29 3d  | lib_flags%(i%)=|
00001360  28 66 69 6c 65 73 5f 69  6e 25 20 80 20 31 29 20  |(files_in% . 1) |
00001370  84 20 28 64 69 72 73 5f  69 6e 25 20 80 20 32 29  |. (dirs_in% . 2)|
00001380  20 84 20 28 66 69 6c 65  73 5f 6f 75 74 25 20 80  | . (files_out% .|
00001390  20 34 29 20 84 20 28 64  61 74 61 5f 6f 75 74 25  | 4) . (data_out%|
000013a0  20 80 20 38 29 20 84 20  28 73 65 6e 64 5f 6f 75  | . 8) . (send_ou|
000013b0  74 25 20 80 20 31 36 29  0d 07 6c 1e 20 77 69 6e  |t% . 16)..l. win|
000013c0  64 5f 68 61 6e 64 25 3d  77 69 6e 64 5f 68 61 6e  |d_hand%=wind_han|
000013d0  64 25 28 69 25 29 0d 07  76 24 20 7a 3d a0 28 22  |d%(i%)..v$ z=.("|
000013e0  46 4e 22 2b 6c 69 62 5f  70 72 6f 63 24 28 69 25  |FN"+lib_proc$(i%|
000013f0  29 2b 22 5f 69 6e 69 74  22 29 0d 07 80 1c 20 24  |)+"_init").... $|
00001400  70 6d 70 25 3d 6c 69 62  5f 6e 61 6d 65 24 28 69  |pmp%=lib_name$(i|
00001410  25 29 2b 22 2c 22 0d 07  8a 13 20 70 6d 70 25 2b  |%)+",".... pmp%+|
00001420  3d a9 28 24 70 6d 70 25  29 0d 07 94 05 ed 0d 07  |=.($pmp%).......|
00001430  9e 05 e1 0d 07 a8 05 3a  0d 07 b2 1b dd 20 a4 73  |.......:..... .s|
00001440  70 72 69 74 65 5f 61 64  64 72 65 73 73 28 73 70  |prite_address(sp|
00001450  72 24 29 0d 07 bc 39 c8  99 20 22 58 4f 53 5f 53  |r$)...9.. "XOS_S|
00001460  70 72 69 74 65 4f 70 22  2c 26 31 31 38 2c 6c 69  |priteOp",&118,li|
00001470  62 5f 73 70 72 69 74 65  73 25 2c 73 70 72 24 20  |b_sprites%,spr$ |
00001480  b8 20 2c 2c 61 64 64 72  25 3b 6f 6b 0d 07 c6 18  |. ,,addr%;ok....|
00001490  e7 20 28 6f 6b 20 80 20  31 29 3e 30 20 61 64 64  |. (ok . 1)>0 add|
000014a0  72 25 3d 30 0d 07 d0 0a  3d 61 64 64 72 25 0d 07  |r%=0....=addr%..|
000014b0  da 05 3a 0d 07 e4 0f dd  20 f2 69 6e 69 74 5f 73  |..:..... .init_s|
000014c0  65 6c 0d 07 ee 1f 69 6e  25 3d 8e 28 22 3c 42 69  |el....in%=.("<Bi|
000014d0  6f 24 44 69 72 3e 2e 21  43 68 6f 69 63 65 73 22  |o$Dir>.!Choices"|
000014e0  29 0d 07 f8 0e 72 75 6e  6e 69 6e 67 25 3d 30 0d  |)....running%=0.|
000014f0  08 02 0e e7 20 69 6e 25  3c 3e 30 20 8c 0d 08 0c  |.... in%<>0 ....|
00001500  0f 20 c8 95 20 ac 20 c5  23 69 6e 25 0d 08 16 22  |. .. . .#in%..."|
00001510  20 20 70 72 6f 63 25 3d  a4 66 69 6e 64 5f 70 72  |  proc%=.find_pr|
00001520  6f 63 28 a4 6c 63 28 be  23 69 6e 25 29 29 0d 08  |oc(.lc(.#in%))..|
00001530  20 47 20 20 e7 20 70 72  6f 63 25 3e 30 20 f2 73  | G  . proc%>0 .s|
00001540  74 61 72 74 5f 70 72 6f  63 28 70 72 6f 63 25 29  |tart_proc(proc%)|
00001550  3a 72 75 6e 6e 69 6e 67  25 2b 3d 31 3a 72 75 6e  |:running%+=1:run|
00001560  6e 69 6e 67 25 28 72 75  6e 6e 69 6e 67 25 29 3d  |ning%(running%)=|
00001570  70 72 6f 63 25 0d 08 2a  06 20 ce 0d 08 34 0b 20  |proc%..*. ...4. |
00001580  d9 20 23 69 6e 25 0d 08  3e 05 cd 0d 08 48 1f e7  |. #in%..>....H..|
00001590  20 72 75 6e 6e 69 6e 67  25 3d 30 20 f2 73 74 61  | running%=0 .sta|
000015a0  72 74 5f 70 72 6f 63 28  30 29 0d 08 52 05 e1 0d  |rt_proc(0)..R...|
000015b0  08 5c 05 3a 0d 08 66 18  dd 20 f2 73 74 61 72 74  |.\.:..f.. .start|
000015c0  5f 70 72 6f 63 28 70 72  6f 63 25 29 0d 08 70 0b  |_proc(proc%)..p.|
000015d0  21 69 63 25 3d 2d 31 0d  08 7a 37 e7 20 a4 6d 76  |!ic%=-1..z7. .mv|
000015e0  28 35 29 3d 31 20 80 20  6c 69 62 5f 73 70 72 25  |(5)=1 . lib_spr%|
000015f0  28 70 72 6f 63 25 2c 31  29 3c 3e 30 20 69 63 6f  |(proc%,1)<>0 ico|
00001600  6e 25 3d 31 20 8b 20 69  63 6f 6e 25 3d 30 0d 08  |n%=1 . icon%=0..|
00001610  84 0b 69 63 25 21 34 3d  30 0d 08 8e 0b 69 63 25  |..ic%!4=0....ic%|
00001620  21 38 3d 30 0d 08 98 0d  69 63 25 21 31 32 3d 36  |!8=0....ic%!12=6|
00001630  38 0d 08 a2 0d 69 63 25  21 31 36 3d 36 38 0d 08  |8....ic%!16=68..|
00001640  ac 14 69 63 25 21 32 30  3d 26 37 30 30 30 33 31  |..ic%!20=&700031|
00001650  31 41 0d 08 b6 20 69 63  25 21 32 34 3d 6c 69 62  |1A... ic%!24=lib|
00001660  5f 73 70 72 25 28 70 72  6f 63 25 2c 69 63 6f 6e  |_spr%(proc%,icon|
00001670  25 29 0d 08 c0 17 69 63  25 21 32 38 3d 6c 69 62  |%)....ic%!28=lib|
00001680  5f 73 70 72 69 74 65 73  25 0d 08 ca 0c 69 63 25  |_sprites%....ic%|
00001690  21 33 32 3d 30 0d 08 d4  31 c8 99 20 22 57 69 6d  |!32=0...1.. "Wim|
000016a0  70 5f 43 72 65 61 74 65  49 63 6f 6e 22 2c 2c 69  |p_CreateIcon",,i|
000016b0  63 25 20 b8 20 70 72 6f  63 5f 69 63 6f 6e 25 28  |c% . proc_icon%(|
000016c0  70 72 6f 63 25 29 0d 08  de 05 e1 0d 08 e8 05 3a  |proc%).........:|
000016d0  0d 08 f2 1e dd 20 f2 73  65 6c 65 63 74 5f 70 72  |..... .select_pr|
000016e0  6f 63 28 70 72 6f 63 25  2c 62 75 74 25 29 0d 08  |oc(proc%,but%)..|
000016f0  fc 1b e7 20 70 72 6f 63  5f 69 63 6f 6e 25 28 70  |... proc_icon%(p|
00001700  72 6f 63 25 29 3e 30 20  8c 0d 09 06 16 20 f2 6b  |roc%)>0 ..... .k|
00001710  69 6c 6c 5f 70 72 6f 63  28 70 72 6f 63 25 29 0d  |ill_proc(proc%).|
00001720  09 10 05 cc 0d 09 1a 2d  20 e7 20 72 75 6e 6e 69  |.......- . runni|
00001730  6e 67 25 3d 30 20 f2 64  65 6c 65 74 65 5f 69 63  |ng%=0 .delete_ic|
00001740  6f 6e 28 70 72 6f 63 5f  69 63 6f 6e 25 28 30 29  |on(proc_icon%(0)|
00001750  29 0d 09 24 3f 20 f2 73  74 61 72 74 5f 70 72 6f  |)..$? .start_pro|
00001760  63 28 70 72 6f 63 25 29  20 3a 20 f4 20 69 66 20  |c(proc%) : . if |
00001770  62 75 74 20 41 4e 44 20  34 20 72 65 70 6c 61 63  |but AND 4 replac|
00001780  65 20 74 68 65 20 6f 6c  64 20 6f 6e 65 2e 2e 2e  |e the old one...|
00001790  0d 09 2e 10 20 72 75 6e  6e 69 6e 67 25 2b 3d 31  |.... running%+=1|
000017a0  0d 09 38 1d 20 72 75 6e  6e 69 6e 67 25 28 72 75  |..8. running%(ru|
000017b0  6e 6e 69 6e 67 25 29 3d  70 72 6f 63 25 0d 09 42  |nning%)=proc%..B|
000017c0  05 cd 0d 09 4c 05 e1 0d  09 56 05 3a 0d 09 60 17  |....L....V.:..`.|
000017d0  dd 20 f2 6b 69 6c 6c 5f  70 72 6f 63 28 70 72 6f  |. .kill_proc(pro|
000017e0  63 25 29 0d 09 6a 23 f2  64 65 6c 65 74 65 5f 69  |c%)..j#.delete_i|
000017f0  63 6f 6e 28 70 72 6f 63  5f 69 63 6f 6e 25 28 70  |con(proc_icon%(p|
00001800  72 6f 63 25 29 29 0d 09  74 17 70 72 6f 63 5f 69  |roc%))..t.proc_i|
00001810  63 6f 6e 25 28 70 72 6f  63 25 29 3d 30 0d 09 7e  |con%(proc%)=0..~|
00001820  3f e7 20 63 75 72 5f 73  65 74 75 70 5f 68 61 6e  |?. cur_setup_han|
00001830  64 25 3d 77 69 6e 64 5f  68 61 6e 64 25 28 70 72  |d%=wind_hand%(pr|
00001840  6f 63 25 29 20 f2 63 6c  6f 73 65 28 63 75 72 5f  |oc%) .close(cur_|
00001850  73 65 74 75 70 5f 68 61  6e 64 25 29 0d 09 88 35  |setup_hand%)...5|
00001860  e7 20 72 65 73 75 6c 74  5f 6f 70 65 6e 25 28 70  |. result_open%(p|
00001870  72 6f 63 25 29 20 f2 63  6c 6f 73 65 28 72 65 73  |roc%) .close(res|
00001880  75 6c 74 5f 68 61 6e 64  25 28 70 72 6f 63 25 29  |ult_hand%(proc%)|
00001890  29 0d 09 92 29 72 75 6e  5f 70 6f 73 25 3d a4 66  |)...)run_pos%=.f|
000018a0  69 6e 64 5f 65 6c 65 6d  28 70 72 6f 63 25 2c 72  |ind_elem(proc%,r|
000018b0  75 6e 6e 69 6e 67 25 28  29 29 0d 09 9c 18 72 75  |unning%())....ru|
000018c0  6e 6e 69 6e 67 25 28 72  75 6e 5f 70 6f 73 25 29  |nning%(run_pos%)|
000018d0  3d 30 0d 09 a6 18 c8 95  20 72 75 6e 5f 70 6f 73  |=0...... run_pos|
000018e0  25 3c 72 75 6e 6e 69 6e  67 25 0d 09 b0 2c 20 72  |%<running%..., r|
000018f0  75 6e 6e 69 6e 67 25 28  72 75 6e 5f 70 6f 73 25  |unning%(run_pos%|
00001900  29 3d 72 75 6e 6e 69 6e  67 25 28 72 75 6e 5f 70  |)=running%(run_p|
00001910  6f 73 25 2b 31 29 0d 09  ba 10 20 72 75 6e 5f 70  |os%+1).... run_p|
00001920  6f 73 25 2b 3d 31 0d 09  c4 05 ce 0d 09 ce 0f 72  |os%+=1.........r|
00001930  75 6e 6e 69 6e 67 25 2d  3d 31 0d 09 d8 1f e7 20  |unning%-=1..... |
00001940  72 75 6e 6e 69 6e 67 25  3d 30 20 f2 73 74 61 72  |running%=0 .star|
00001950  74 5f 70 72 6f 63 28 30  29 0d 09 e2 05 e1 0d 09  |t_proc(0).......|
00001960  ec 05 3a 0d 09 f6 19 dd  20 f2 64 65 6c 65 74 65  |..:..... .delete|
00001970  5f 69 63 6f 6e 28 69 63  25 21 34 29 0d 0a 00 0b  |_icon(ic%!4)....|
00001980  21 69 63 25 3d 2d 31 0d  0a 0a 1d c8 99 20 22 57  |!ic%=-1...... "W|
00001990  69 6d 70 5f 44 65 6c 65  74 65 49 63 6f 6e 22 2c  |imp_DeleteIcon",|
000019a0  2c 69 63 25 0d 0a 14 05  e1 0d 0a 1e 05 3a 0d 0a  |,ic%.........:..|
000019b0  28 14 dd 20 a4 6c 65 61  66 5f 6e 61 6d 65 28 73  |(.. .leaf_name(s|
000019c0  24 29 0d 0a 32 11 c8 95  20 a7 73 24 2c 22 2e 22  |$)..2... .s$,"."|
000019d0  29 3e 30 0d 0a 3c 17 20  73 24 3d c1 73 24 2c a7  |)>0..<. s$=.s$,.|
000019e0  73 24 2c 22 2e 22 29 2b  31 29 0d 0a 46 05 ce 0d  |s$,".")+1)..F...|
000019f0  0a 50 07 3d 73 24 0d 0a  5a 05 3a 0d 0a 64 12 dd  |.P.=s$..Z.:..d..|
00001a00  20 a4 67 65 74 5f 73 74  72 28 61 25 29 0d 0a 6e  | .get_str(a%)..n|
00001a10  08 ea 20 61 24 0d 0a 78  0e c8 95 20 3f 61 25 3e  |.. a$..x... ?a%>|
00001a20  3d 33 32 0d 0a 82 0f 20  61 24 3d 61 24 2b bd 3f  |=32.... a$=a$+.?|
00001a30  61 25 0d 0a 8c 0a 20 61  25 2b 3d 31 0d 0a 96 05  |a%.... a%+=1....|
00001a40  ce 0d 0a a0 07 3d 61 24  0d 0a aa 05 3a 0d 0a b4  |.....=a$....:...|
00001a50  22 dd 20 a4 6d 61 6b 65  5f 6d 65 6e 28 24 74 65  |". .make_men($te|
00001a60  6d 70 25 2c 6d 65 6e 75  74 69 74 6c 65 24 29 0d  |mp%,menutitle$).|
00001a70  0a be 24 3d a4 6d 61 6b  65 5f 6d 65 6e 5f 72 61  |..$=.make_men_ra|
00001a80  77 28 74 65 6d 70 25 2c  6d 65 6e 75 74 69 74 6c  |w(temp%,menutitl|
00001a90  65 24 29 0d 0a c8 05 3a  0d 0a d2 23 dd 20 a4 6d  |e$)....:...#. .m|
00001aa0  61 6b 65 5f 6d 65 6e 5f  72 61 77 28 6d 70 25 2c  |ake_men_raw(mp%,|
00001ab0  6d 65 6e 75 74 69 74 6c  65 24 29 0d 0a dc 1c ea  |menutitle$).....|
00001ac0  20 6d 65 6e 75 6d 61 78  25 2c 77 61 73 70 74 72  | menumax%,wasptr|
00001ad0  25 2c 69 74 65 6d 24 0d  0a e6 14 77 61 73 70 74  |%,item$....waspt|
00001ae0  72 25 3d 6d 65 6e 75 70  74 72 25 0d 0a f0 0e 6d  |r%=menuptr%....m|
00001af0  65 6e 75 6d 61 78 25 3d  30 0d 0a fa 12 6d 65 6e  |enumax%=0....men|
00001b00  75 70 74 72 25 21 32 30  3d 34 34 0d 0b 04 18 24  |uptr%!20=44....$|
00001b10  6d 65 6e 75 70 74 72 25  3d 6d 65 6e 75 74 69 74  |menuptr%=menutit|
00001b20  6c 65 24 0d 0b 0e 16 6d  65 6e 75 70 74 72 25 21  |le$....menuptr%!|
00001b30  31 32 3d 26 37 30 32 30  37 0d 0b 18 18 6d 61 78  |12=&70207....max|
00001b40  61 64 64 72 25 3d 6d 65  6e 75 70 74 72 25 2b 31  |addr%=menuptr%+1|
00001b50  36 0d 0b 22 11 6d 65 6e  75 70 74 72 25 21 32 34  |6..".menuptr%!24|
00001b60  3d 30 0d 0b 2c 10 6d 65  6e 75 70 74 72 25 2b 3d  |=0..,.menuptr%+=|
00001b70  32 38 0d 0b 36 05 f5 0d  0b 40 0d 20 69 74 65 6d  |28..6....@. item|
00001b80  24 3d 22 22 0d 0b 4a 10  20 c8 95 20 3f 6d 70 25  |$=""..J. .. ?mp%|
00001b90  3c 3e 34 34 0d 0b 54 12  20 20 69 74 65 6d 24 2b  |<>44..T.  item$+|
00001ba0  3d bd 3f 6d 70 25 0d 0b  5e 0c 20 20 6d 70 25 2b  |=.?mp%..^.  mp%+|
00001bb0  3d 31 0d 0b 68 06 20 ce  0d 0b 72 0b 20 6d 70 25  |=1..h. ...r. mp%|
00001bc0  2b 3d 31 0d 0b 7c 2a 20  e7 20 a9 28 69 74 65 6d  |+=1..|* . .(item|
00001bd0  24 29 3e 6d 65 6e 75 6d  61 78 25 20 6d 65 6e 75  |$)>menumax% menu|
00001be0  6d 61 78 25 3d a9 28 69  74 65 6d 24 29 0d 0b 86  |max%=.(item$)...|
00001bf0  11 20 6d 65 6e 75 70 74  72 25 21 30 3d 30 0d 0b  |. menuptr%!0=0..|
00001c00  90 12 20 6d 65 6e 75 70  74 72 25 21 34 3d 2d 31  |.. menuptr%!4=-1|
00001c10  0d 0b 9a 18 20 6d 65 6e  75 70 74 72 25 21 38 3d  |.... menuptr%!8=|
00001c20  26 37 30 30 30 30 32 31  0d 0b a4 14 20 e7 20 a9  |&7000021.... . .|
00001c30  28 69 74 65 6d 24 29 3c  31 32 20 8c 0d 0b ae 1a  |(item$)<12 .....|
00001c40  20 20 24 28 6d 65 6e 75  70 74 72 25 2b 31 32 29  |  $(menuptr%+12)|
00001c50  3d 69 74 65 6d 24 0d 0b  b8 06 20 cc 0d 0b c2 1a  |=item$.... .....|
00001c60  20 20 6d 65 6e 75 64 61  74 25 2d 3d a9 28 69 74  |  menudat%-=.(it|
00001c70  65 6d 24 29 2b 31 0d 0b  cc 15 20 20 24 6d 65 6e  |em$)+1....  $men|
00001c80  75 64 61 74 25 3d 69 74  65 6d 24 0d 0b d6 1a 20  |udat%=item$.... |
00001c90  20 6d 65 6e 75 70 74 72  25 21 31 32 3d 6d 65 6e  | menuptr%!12=men|
00001ca0  75 64 61 74 25 0d 0b e0  14 20 20 6d 65 6e 75 70  |udat%....  menup|
00001cb0  74 72 25 21 31 36 3d 2d  31 0d 0b ea 1a 20 20 6d  |tr%!16=-1....  m|
00001cc0  65 6e 75 70 74 72 25 21  32 30 3d a9 28 69 74 65  |enuptr%!20=.(ite|
00001cd0  6d 24 29 0d 0b f4 16 20  20 6d 65 6e 75 70 74 72  |m$)....  menuptr|
00001ce0  25 21 38 2b 3d 26 31 30  30 0d 0b fe 06 20 cd 0d  |%!8+=&100.... ..|
00001cf0  0c 08 11 20 6d 65 6e 75  70 74 72 25 2b 3d 32 34  |... menuptr%+=24|
00001d00  0d 0c 12 0d fd 20 3f 6d  70 25 3c 33 32 0d 0c 1c  |..... ?mp%<32...|
00001d10  25 6d 65 6e 75 70 74 72  25 21 2d 32 34 3d 28 6d  |%menuptr%!-24=(m|
00001d20  65 6e 75 70 74 72 25 21  2d 32 34 29 20 84 20 26  |enuptr%!-24) . &|
00001d30  38 30 0d 0c 26 1c 21 6d  61 78 61 64 64 72 25 3d  |80..&.!maxaddr%=|
00001d40  6d 65 6e 75 6d 61 78 25  2a 31 36 2b 33 32 0d 0c  |menumax%*16+32..|
00001d50  30 0c 3d 77 61 73 70 74  72 25 0d 0c 3a 05 3a 0d  |0.=wasptr%..:.:.|
00001d60  0c 44 22 dd 20 f2 61 74  74 61 63 68 5f 73 75 62  |.D". .attach_sub|
00001d70  5f 6d 65 6e 75 28 6d 31  25 2c 6d 32 25 2c 69 25  |_menu(m1%,m2%,i%|
00001d80  29 0d 0c 4e 16 6d 32 25  21 28 33 32 2b 32 34 2a  |)..N.m2%!(32+24*|
00001d90  69 25 29 3d 6d 31 25 0d  0c 58 05 e1 0d 0c 62 05  |i%)=m1%..X....b.|
00001da0  3a 0d 0c 6c 1a dd 20 f2  6f 70 65 6e 5f 6d 65 6e  |:..l.. .open_men|
00001db0  75 28 6d 25 2c 78 25 2c  79 25 29 0d 0c 76 08 ea  |u(m%,x%,y%)..v..|
00001dc0  20 69 25 0d 0c 80 17 e3  20 69 25 3d 31 20 b8 20  | i%..... i%=1 . |
00001dd0  6c 69 62 5f 66 69 6c 65  73 25 0d 0c 8a 2c 20 f2  |lib_files%..., .|
00001de0  74 69 63 6b 28 70 72 6f  63 5f 6d 65 6e 75 25 2c  |tick(proc_menu%,|
00001df0  69 25 2d 31 2c 70 72 6f  63 5f 69 63 6f 6e 25 28  |i%-1,proc_icon%(|
00001e00  69 25 29 3e 30 29 0d 0c  94 05 ed 0d 0c 9e 0d 6d  |i%)>0).........m|
00001e10  65 6e 75 78 25 3d 78 25  0d 0c a8 0d 6d 65 6e 75  |enux%=x%....menu|
00001e20  79 25 3d 79 25 0d 0c b2  22 c8 99 20 22 57 69 6d  |y%=y%...".. "Wim|
00001e30  70 5f 43 72 65 61 74 65  4d 65 6e 75 22 2c 2c 6d  |p_CreateMenu",,m|
00001e40  25 2c 78 25 2c 79 25 0d  0c bc 05 e1 0d 0c c6 05  |%,x%,y%.........|
00001e50  3a 0d 0c d0 12 dd 20 f2  6d 65 6e 75 5f 73 65 6c  |:..... .menu_sel|
00001e60  65 63 74 0d 0c da 23 c8  99 20 22 57 69 6d 70 5f  |ect...#.. "Wimp_|
00001e70  47 65 74 50 6f 69 6e 74  65 72 49 6e 66 6f 22 2c  |GetPointerInfo",|
00001e80  2c 74 65 6d 70 25 0d 0c  e4 1b 72 65 64 6f 25 3d  |,temp%....redo%=|
00001e90  28 28 74 65 6d 70 25 21  38 29 20 80 20 31 29 3e  |((temp%!8) . 1)>|
00001ea0  30 0d 0c ee 0c c8 8e 20  21 71 25 20 ca 0d 0c f8  |0...... !q% ....|
00001eb0  2f 20 c9 20 31 3a e7 20  71 25 21 34 3e 3d 30 20  |/ . 1:. q%!4>=0 |
00001ec0  f2 73 65 6c 65 63 74 5f  70 72 6f 63 28 71 25 21  |.select_proc(q%!|
00001ed0  34 2b 31 2c 74 65 6d 70  25 21 38 29 0d 0d 02 15  |4+1,temp%!8)....|
00001ee0  20 c9 20 32 3a f2 73 65  74 5f 64 65 66 61 75 6c  | . 2:.set_defaul|
00001ef0  74 0d 0d 0c 47 20 c9 20  33 3a 72 65 64 6f 25 3d  |t...G . 3:redo%=|
00001f00  a3 3a e7 20 71 25 21 34  3e 3d 30 20 84 20 72 75  |.:. q%!4>=0 . ru|
00001f10  6e 6e 69 6e 67 25 3d 30  20 64 6f 6e 65 25 3d b9  |nning%=0 done%=.|
00001f20  20 8b 20 f2 6b 69 6c 6c  5f 70 72 6f 63 28 62 61  | . .kill_proc(ba|
00001f30  72 5f 70 72 6f 63 25 29  0d 0d 16 05 cb 0d 0d 20  |r_proc%)....... |
00001f40  30 e7 20 72 65 64 6f 25  20 f2 6f 70 65 6e 5f 6d  |0. redo% .open_m|
00001f50  65 6e 75 28 6d 61 69 6e  5f 6d 65 6e 75 25 2c 6d  |enu(main_menu%,m|
00001f60  65 6e 75 78 25 2c 6d 65  6e 75 79 25 29 0d 0d 2a  |enux%,menuy%)..*|
00001f70  05 e1 0d 0d 34 05 3a 0d  0d 3e 12 dd 20 f2 73 65  |....4.:..>.. .se|
00001f80  74 5f 64 65 66 61 75 6c  74 0d 0d 48 0a ea 20 6f  |t_default..H.. o|
00001f90  75 74 25 0d 0d 52 20 6f  75 74 25 3d ae 28 22 3c  |ut%..R out%=.("<|
00001fa0  42 69 6f 24 44 69 72 3e  2e 21 43 68 6f 69 63 65  |Bio$Dir>.!Choice|
00001fb0  73 22 29 0d 0d 5c 12 e7  20 72 75 6e 6e 69 6e 67  |s")..\.. running|
00001fc0  25 3e 30 20 8c 0d 0d 66  16 20 e3 20 69 25 3d 31  |%>0 ...f. . i%=1|
00001fd0  20 b8 20 72 75 6e 6e 69  6e 67 25 0d 0d 70 29 20  | . running%..p) |
00001fe0  20 f2 62 70 75 74 28 6f  75 74 25 2c 6c 69 62 5f  | .bput(out%,lib_|
00001ff0  70 72 6f 63 24 28 72 75  6e 6e 69 6e 67 25 28 69  |proc$(running%(i|
00002000  25 29 29 29 0d 0d 7a 06  20 ed 0d 0d 84 05 cd 0d  |%)))..z. .......|
00002010  0d 8e 0b d9 20 23 6f 75  74 25 0d 0d 98 05 e1 0d  |.... #out%......|
00002020  0d a2 05 3a 0d 0d ac 15  dd 20 f2 74 69 63 6b 28  |...:..... .tick(|
00002030  61 25 2c 69 25 2c 63 25  29 0d 0d b6 12 61 25 3d  |a%,i%,c%)....a%=|
00002040  61 25 2b 32 38 2b 32 34  2a 69 25 0d 0d c0 2c e7  |a%+28+24*i%...,.|
00002050  20 63 25 20 8c 20 21 61  25 3d 21 61 25 20 84 20  | c% . !a%=!a% . |
00002060  31 20 8b 20 21 61 25 3d  21 61 25 20 80 20 26 46  |1 . !a%=!a% . &F|
00002070  46 46 46 46 46 46 45 0d  0d ca 05 e1 0d 0d d4 05  |FFFFFFE.........|
00002080  3a 0d 0d de 0f dd 20 f2  77 61 72 6e 28 77 24 29  |:..... .warn(w$)|
00002090  0d 0d e8 0d 21 74 65 6d  70 25 3d 31 37 0d 0d f2  |....!temp%=17...|
000020a0  11 24 28 74 65 6d 70 25  2b 34 29 3d 77 24 0d 0d  |.$(temp%+4)=w$..|
000020b0  fc 27 c8 99 20 22 57 69  6d 70 5f 52 65 70 6f 72  |.'.. "Wimp_Repor|
000020c0  74 45 72 72 6f 72 22 2c  74 65 6d 70 25 2c 31 2c  |tError",temp%,1,|
000020d0  22 42 69 6f 22 0d 0e 06  05 e1 0d 0e 10 05 3a 0d  |"Bio".........:.|
000020e0  0e 1a 2e dd 20 f2 6d 6f  75 73 65 28 6d 6f 75 73  |.... .mouse(mous|
000020f0  65 78 25 2c 6d 6f 75 73  65 79 25 2c 62 25 2c 68  |ex%,mousey%,b%,h|
00002100  61 6e 64 6c 65 25 2c 69  63 6f 6e 25 29 0d 0e 24  |andle%,icon%)..$|
00002110  12 ea 20 73 68 61 6e 64  25 2c 70 72 6f 63 25 0d  |.. shand%,proc%.|
00002120  0e 2e 2c 62 61 72 5f 70  72 6f 63 25 3d a4 66 69  |..,bar_proc%=.fi|
00002130  6e 64 5f 65 6c 65 6d 28  69 63 6f 6e 25 2c 70 72  |nd_elem(icon%,pr|
00002140  6f 63 5f 69 63 6f 6e 25  28 29 29 0d 0e 38 12 e7  |oc_icon%())..8..|
00002150  20 28 62 25 20 80 20 35  29 3e 30 20 8c 0d 0e 42  | (b% . 5)>0 ...B|
00002160  11 20 c8 8e 20 68 61 6e  64 6c 65 25 20 ca 0d 0e  |. .. handle% ...|
00002170  4c 13 20 20 c9 20 73 61  76 65 5f 68 61 6e 64 25  |L.  . save_hand%|
00002180  3a 0d 0e 56 11 20 20 20  c8 8e 20 69 63 6f 6e 25  |:..V.   .. icon%|
00002190  20 ca 0d 0e 60 3a 20 20  20 20 c9 20 30 3a e7 20  | ...`:    . 0:. |
000021a0  a4 73 61 76 65 28 a4 67  65 74 5f 73 74 72 28 73  |.save(.get_str(s|
000021b0  61 76 65 74 65 78 74 29  29 20 f2 63 6c 6f 73 65  |avetext)) .close|
000021c0  28 73 61 76 65 5f 68 61  6e 64 25 29 0d 0e 6a 27  |(save_hand%)..j'|
000021d0  20 20 20 20 c9 20 31 3a  f2 69 6e 69 74 5f 73 61  |    . 1:.init_sa|
000021e0  76 65 5f 64 72 61 67 28  73 61 76 65 5f 68 61 6e  |ve_drag(save_han|
000021f0  64 25 29 0d 0e 74 08 20  20 20 cb 0d 0e 7e 0b 20  |d%)..t.   ...~. |
00002200  20 c9 20 2d 32 3a 0d 0e  88 23 20 20 20 73 68 61  | . -2:...#   sha|
00002210  6e 64 25 3d 77 69 6e 64  5f 68 61 6e 64 25 28 62  |nd%=wind_hand%(b|
00002220  61 72 5f 70 72 6f 63 25  29 0d 0e 92 13 20 20 20  |ar_proc%)....   |
00002230  e7 20 73 68 61 6e 64 25  3e 30 20 8c 0d 0e 9c 35  |. shand%>0 ....5|
00002240  20 20 20 20 e7 20 63 75  72 5f 73 65 74 75 70 5f  |    . cur_setup_|
00002250  68 61 6e 64 25 3c 3e 2d  31 20 f2 63 6c 6f 73 65  |hand%<>-1 .close|
00002260  28 63 75 72 5f 73 65 74  75 70 5f 68 61 6e 64 25  |(cur_setup_hand%|
00002270  29 0d 0e a6 1e 20 20 20  20 63 75 72 5f 73 65 74  |)....    cur_set|
00002280  75 70 5f 68 61 6e 64 25  3d 73 68 61 6e 64 25 0d  |up_hand%=shand%.|
00002290  0e b0 12 20 20 20 20 21  71 25 3d 73 68 61 6e 64  |...    !q%=shand|
000022a0  25 0d 0e ba 24 20 20 20  20 c8 99 20 22 57 69 6d  |%...$    .. "Wim|
000022b0  70 5f 47 65 74 57 69 6e  64 6f 77 53 74 61 74 65  |p_GetWindowState|
000022c0  22 2c 2c 71 25 0d 0e c4  10 20 20 20 20 71 25 21  |",,q%....    q%!|
000022d0  32 38 3d 2d 31 0d 0e ce  20 20 20 20 20 c8 99 20  |28=-1...     .. |
000022e0  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
000022f0  22 2c 2c 71 25 0d 0e d8  08 20 20 20 cd 0d 0e e2  |",,q%....   ....|
00002300  08 20 20 7f 3a 0d 0e ec  2d 20 20 20 70 72 6f 63  |.  .:...-   proc|
00002310  25 3d a4 66 69 6e 64 5f  65 6c 65 6d 28 68 61 6e  |%=.find_elem(han|
00002320  64 6c 65 25 2c 77 69 6e  64 5f 68 61 6e 64 25 28  |dle%,wind_hand%(|
00002330  29 29 0d 0e f6 12 20 20  20 e7 20 70 72 6f 63 25  |))....   . proc%|
00002340  3e 30 20 8c 0d 0f 00 66  20 20 20 20 65 3d a0 28  |>0 ....f    e=.(|
00002350  22 46 4e 22 2b 6c 69 62  5f 70 72 6f 63 24 28 70  |"FN"+lib_proc$(p|
00002360  72 6f 63 25 29 2b 22 5f  6d 6f 75 73 65 28 22 2b  |roc%)+"_mouse("+|
00002370  c3 6d 6f 75 73 65 78 25  2b 22 2c 22 2b c3 6d 6f  |.mousex%+","+.mo|
00002380  75 73 65 79 25 2b 22 2c  22 2b c3 62 25 2b 22 2c  |usey%+","+.b%+",|
00002390  22 2b c3 68 61 6e 64 6c  65 25 2b 22 2c 22 2b c3  |"+.handle%+","+.|
000023a0  69 63 6f 6e 25 2b 22 29  22 29 0d 0f 0a 1e 20 20  |icon%+")")....  |
000023b0  20 20 e7 20 65 20 f2 70  72 6f 63 65 73 73 28 70  |  . e .process(p|
000023c0  72 6f 63 25 2c 22 22 29  0d 0f 14 08 20 20 20 cd  |roc%,"")....   .|
000023d0  0d 0f 1e 06 20 cb 0d 0f  28 05 cc 0d 0f 32 20 20  |.... ...(....2  |
000023e0  e7 20 28 62 25 20 80 20  32 29 3e 30 20 80 20 68  |. (b% . 2)>0 . h|
000023f0  61 6e 64 6c 65 25 3d 2d  32 20 8c 0d 0f 3c 56 20  |andle%=-2 ...<V |
00002400  20 e7 20 62 61 72 5f 70  72 6f 63 25 3d 30 20 f2  | . bar_proc%=0 .|
00002410  6c 61 62 65 6c 5f 6d 61  69 6e 28 22 42 69 6f 22  |label_main("Bio"|
00002420  29 20 8b 20 f2 6c 61 62  65 6c 5f 6d 61 69 6e 28  |) . .label_main(|
00002430  a4 6c 65 61 66 5f 6e 61  6d 65 28 6c 69 62 5f 66  |.leaf_name(lib_f|
00002440  69 6c 65 24 28 62 61 72  5f 70 72 6f 63 25 29 29  |ile$(bar_proc%))|
00002450  29 0d 0f 46 2b 20 20 f2  6f 70 65 6e 5f 6d 65 6e  |)..F+  .open_men|
00002460  75 28 6d 61 69 6e 5f 6d  65 6e 75 25 2c 6d 6f 75  |u(main_menu%,mou|
00002470  73 65 78 25 2d 36 34 2c  32 37 32 29 0d 0f 50 06  |sex%-64,272)..P.|
00002480  20 cd 0d 0f 5a 05 cd 0d  0f 64 05 e1 0d 0f 6e 05  | ...Z....d....n.|
00002490  3a 0d 0f 78 19 dd 20 f2  6c 61 62 65 6c 5f 6d 61  |:..x.. .label_ma|
000024a0  69 6e 28 74 69 74 6c 65  24 29 0d 0f 82 14 e3 20  |in(title$)..... |
000024b0  69 25 3d 30 20 b8 20 a9  74 69 74 6c 65 24 0d 0f  |i%=0 . .title$..|
000024c0  8c 26 20 6d 61 69 6e 5f  6d 65 6e 75 25 3f 69 25  |.& main_menu%?i%|
000024d0  3d 97 c1 74 69 74 6c 65  24 2b bd 30 2c 69 25 2b  |=..title$+.0,i%+|
000024e0  31 2c 31 29 0d 0f 96 05  ed 0d 0f a0 05 e1 0d 0f  |1,1)............|
000024f0  aa 05 3a 0d 0f b4 17 dd  20 a4 66 69 6c 65 5f 74  |..:..... .file_t|
00002500  79 70 65 28 6e 61 6d 65  24 29 0d 0f be 0e ea 20  |ype(name$)..... |
00002510  74 79 70 65 25 2c 6f 6b  0d 0f c8 15 e7 20 6e 61  |type%,ok..... na|
00002520  6d 65 24 3d 22 2a 22 20  8c 20 3d 2d 31 0d 0f d2  |me$="*" . =-1...|
00002530  2c c8 99 20 22 58 4f 53  5f 46 53 43 6f 6e 74 72  |,.. "XOS_FSContr|
00002540  6f 6c 22 2c 33 31 2c 6e  61 6d 65 24 20 b8 20 2c  |ol",31,name$ . ,|
00002550  2c 74 79 70 65 25 3b 6f  6b 0d 0f dc 37 e7 20 28  |,type%;ok...7. (|
00002560  6f 6b 20 80 20 31 29 3e  30 20 f2 77 61 72 6e 28  |ok . 1)>0 .warn(|
00002570  22 55 6e 6b 6e 6f 77 6e  20 66 69 6c 65 20 74 79  |"Unknown file ty|
00002580  70 65 20 27 22 2b 6e 61  6d 65 24 2b 22 27 22 29  |pe '"+name$+"'")|
00002590  0d 0f e6 0a 3d 74 79 70  65 25 0d 0f f0 05 3a 0d  |....=type%....:.|
000025a0  0f fa 0e dd 20 f2 6d 65  73 73 61 67 65 0d 10 04  |.... .message...|
000025b0  0b ea 20 70 72 6f 63 25  0d 10 0e 18 f2 63 6f 70  |.. proc%.....cop|
000025c0  79 28 71 25 2c 6d 65 73  73 25 2c 26 31 30 30 29  |y(q%,mess%,&100)|
000025d0  0d 10 18 11 c8 8e 20 6d  65 73 73 25 21 31 36 20  |...... mess%!16 |
000025e0  ca 0d 10 22 10 20 c9 20  30 3a 64 6f 6e 65 25 3d  |...". . 0:done%=|
000025f0  b9 0d 10 2c 09 20 c9 20  31 3a 0d 10 36 1b 20 20  |...,. . 1:..6.  |
00002600  63 75 72 5f 70 72 6f 63  25 3d a4 77 68 69 63 68  |cur_proc%=.which|
00002610  5f 70 72 6f 63 0d 10 40  29 20 20 e7 20 a4 61 6c  |_proc..@)  . .al|
00002620  6c 6f 77 5f 74 79 70 65  28 6d 65 73 73 25 21 34  |low_type(mess%!4|
00002630  30 2c 63 75 72 5f 70 72  6f 63 25 29 20 8c 0d 10  |0,cur_proc%) ...|
00002640  4a 12 20 20 20 6d 65 73  73 25 21 33 36 3d 2d 31  |J.   mess%!36=-1|
00002650  0d 10 54 24 20 20 20 24  28 6d 65 73 73 25 2b 34  |..T$   $(mess%+4|
00002660  34 29 3d 22 3c 57 69 6d  70 24 53 63 72 61 70 3e  |4)="<Wimp$Scrap>|
00002670  22 2b bd 30 0d 10 5e 17  20 20 20 6d 65 73 73 25  |"+.0..^.   mess%|
00002680  21 31 32 3d 6d 65 73 73  25 21 38 0d 10 68 11 20  |!12=mess%!8..h. |
00002690  20 20 6d 65 73 73 25 21  31 36 3d 32 0d 10 72 10  |  mess%!16=2..r.|
000026a0  20 20 20 21 6d 65 73 73  25 3d 36 30 0d 10 7c 2d  |   !mess%=60..|-|
000026b0  20 20 20 c8 99 20 22 57  69 6d 70 5f 53 65 6e 64  |   .. "Wimp_Send|
000026c0  4d 65 73 73 61 67 65 22  2c 31 37 2c 6d 65 73 73  |Message",17,mess|
000026d0  25 2c 6d 65 73 73 25 21  34 0d 10 86 07 20 20 cc  |%,mess%!4....  .|
000026e0  0d 10 90 15 20 20 20 f2  62 61 64 5f 66 69 6c 65  |....   .bad_file|
000026f0  5f 74 79 70 65 0d 10 9a  07 20 20 cd 0d 10 a4 09  |_type....  .....|
00002700  20 c9 20 32 3a 0d 10 ae  23 20 20 e7 20 a4 73 61  | . 2:...#  . .sa|
00002710  76 65 28 a4 67 65 74 5f  73 74 72 28 6d 65 73 73  |ve(.get_str(mess|
00002720  25 2b 34 34 29 29 20 8c  0d 10 b8 17 20 20 20 6d  |%+44)) .....   m|
00002730  65 73 73 25 21 31 32 3d  6d 65 73 73 25 21 38 0d  |ess%!12=mess%!8.|
00002740  10 c2 11 20 20 20 6d 65  73 73 25 21 31 36 3d 33  |...   mess%!16=3|
00002750  0d 10 cc 2d 20 20 20 c8  99 20 22 57 69 6d 70 5f  |...-   .. "Wimp_|
00002760  53 65 6e 64 4d 65 73 73  61 67 65 22 2c 31 37 2c  |SendMessage",17,|
00002770  6d 65 73 73 25 2c 6d 65  73 73 25 21 34 0d 10 d6  |mess%,mess%!4...|
00002780  19 20 20 20 f2 63 6c 6f  73 65 28 73 61 76 65 5f  |.   .close(save_|
00002790  68 61 6e 64 25 29 0d 10  e0 07 20 20 cd 0d 10 ea  |hand%)....  ....|
000027a0  09 20 c9 20 33 3a 0d 10  f4 17 20 20 70 72 6f 63  |. . 3:....  proc|
000027b0  25 3d a4 77 68 69 63 68  5f 70 72 6f 63 0d 10 fe  |%=.which_proc...|
000027c0  25 20 20 e7 20 a4 61 6c  6c 6f 77 5f 74 79 70 65  |%  . .allow_type|
000027d0  28 6d 65 73 73 25 21 34  30 2c 70 72 6f 63 25 29  |(mess%!40,proc%)|
000027e0  20 8c 0d 11 08 29 20 20  20 f2 70 72 6f 63 65 73  | ....)   .proces|
000027f0  73 28 70 72 6f 63 25 2c  a4 67 65 74 5f 73 74 72  |s(proc%,.get_str|
00002800  28 6d 65 73 73 25 2b 34  34 29 29 0d 11 12 17 20  |(mess%+44)).... |
00002810  20 20 6d 65 73 73 25 21  31 32 3d 6d 65 73 73 25  |  mess%!12=mess%|
00002820  21 38 0d 11 1c 11 20 20  20 6d 65 73 73 25 21 31  |!8....   mess%!1|
00002830  36 3d 34 0d 11 26 2d 20  20 20 c8 99 20 22 57 69  |6=4..&-   .. "Wi|
00002840  6d 70 5f 53 65 6e 64 4d  65 73 73 61 67 65 22 2c  |mp_SendMessage",|
00002850  31 37 2c 6d 65 73 73 25  2c 6d 65 73 73 25 21 34  |17,mess%,mess%!4|
00002860  0d 11 30 07 20 20 cc 0d  11 3a 15 20 20 20 f2 62  |..0.  ...:.   .b|
00002870  61 64 5f 66 69 6c 65 5f  74 79 70 65 0d 11 44 07  |ad_file_type..D.|
00002880  20 20 cd 0d 11 4e 05 cb  0d 11 58 05 e1 0d 11 62  |  ...N....X....b|
00002890  05 3a 0d 11 6c 14 dd 20  f2 62 61 64 5f 66 69 6c  |.:..l.. .bad_fil|
000028a0  65 5f 74 79 70 65 0d 11  76 1e f2 77 61 72 6e 28  |e_type..v..warn(|
000028b0  22 49 6e 76 61 6c 69 64  20 66 69 6c 65 20 74 79  |"Invalid file ty|
000028c0  70 65 22 29 0d 11 80 05  e1 0d 11 8a 05 3a 0d 11  |pe").........:..|
000028d0  94 11 dd 20 a4 77 68 69  63 68 5f 70 72 6f 63 0d  |... .which_proc.|
000028e0  11 9e 21 c8 99 20 22 57  69 6d 70 5f 47 65 74 50  |..!.. "Wimp_GetP|
000028f0  6f 69 6e 74 65 72 49 6e  66 6f 22 2c 2c 69 63 25  |ointerInfo",,ic%|
00002900  0d 11 a8 32 e7 20 69 63  25 21 31 32 3d 2d 32 20  |...2. ic%!12=-2 |
00002910  8c 20 3d a4 66 69 6e 64  5f 65 6c 65 6d 28 69 63  |. =.find_elem(ic|
00002920  25 21 31 36 2c 70 72 6f  63 5f 69 63 6f 6e 25 28  |%!16,proc_icon%(|
00002930  29 29 0d 11 b2 24 3d a4  66 69 6e 64 5f 65 6c 65  |))...$=.find_ele|
00002940  6d 28 69 63 25 21 31 32  2c 77 69 6e 64 5f 68 61  |m(ic%!12,wind_ha|
00002950  6e 64 25 28 29 29 0d 11  bc 05 3a 0d 11 c6 1f dd  |nd%())....:.....|
00002960  20 a4 61 6c 6c 6f 77 5f  74 79 70 65 28 67 69 76  | .allow_type(giv|
00002970  65 6e 25 2c 70 72 6f 63  25 29 0d 11 d0 41 e7 20  |en%,proc%)...A. |
00002980  28 67 69 76 65 6e 25 3d  26 31 30 30 30 20 84 20  |(given%=&1000 . |
00002990  67 69 76 65 6e 25 3d 26  32 30 30 30 29 20 8c 20  |given%=&2000) . |
000029a0  3d 28 6c 69 62 5f 66 6c  61 67 73 25 28 70 72 6f  |=(lib_flags%(pro|
000029b0  63 25 29 20 80 20 32 29  3c 3e 30 0d 11 da 50 e7  |c%) . 2)<>0...P.|
000029c0  20 28 6c 69 62 5f 66 6c  61 67 73 25 28 70 72 6f  | (lib_flags%(pro|
000029d0  63 25 29 20 80 20 31 29  20 80 20 28 6c 69 62 5f  |c%) . 1) . (lib_|
000029e0  69 6e 25 28 70 72 6f 63  25 29 3d 2d 31 20 84 20  |in%(proc%)=-1 . |
000029f0  6c 69 62 5f 69 6e 25 28  70 72 6f 63 25 29 3d 67  |lib_in%(proc%)=g|
00002a00  69 76 65 6e 25 29 20 8c  20 3d b9 0d 11 e4 06 3d  |iven%) . =.....=|
00002a10  a3 0d 11 ee 05 3a 0d 11  f8 1d dd 20 f2 63 6f 70  |.....:..... .cop|
00002a20  79 28 66 72 6f 6d 25 2c  74 6f 25 2c 62 79 74 65  |y(from%,to%,byte|
00002a30  73 25 29 0d 12 02 08 ea  20 69 25 0d 12 0c 19 e3  |s%)..... i%.....|
00002a40  20 69 25 3d 30 20 b8 20  62 79 74 65 73 25 2d 31  | i%=0 . bytes%-1|
00002a50  20 88 20 34 0d 12 16 14  20 74 6f 25 21 69 25 3d  | . 4.... to%!i%=|
00002a60  66 72 6f 6d 25 21 69 25  0d 12 20 05 ed 0d 12 2a  |from%!i%.. ....*|
00002a70  05 e1 0d 12 34 05 3a 0d  12 3e 1b dd 20 f2 70 72  |....4.:..>.. .pr|
00002a80  6f 63 65 73 73 28 70 72  6f 63 25 2c 66 69 6c 65  |ocess(proc%,file|
00002a90  24 29 0d 12 48 13 ea 20  65 24 2c 7a 2c 78 2c 79  |$)..H.. e$,z,x,y|
00002aa0  2c 62 2c 69 25 0d 12 52  13 63 75 72 5f 70 72 6f  |,b,i%..R.cur_pro|
00002ab0  63 25 3d 70 72 6f 63 25  0d 12 5c 31 e7 20 63 75  |c%=proc%..\1. cu|
00002ac0  72 5f 73 65 74 75 70 5f  68 61 6e 64 25 3c 3e 2d  |r_setup_hand%<>-|
00002ad0  31 20 f2 63 6c 6f 73 65  28 63 75 72 5f 73 65 74  |1 .close(cur_set|
00002ae0  75 70 5f 68 61 6e 64 25  29 0d 12 66 0c c8 97 20  |up_hand%)..f... |
00002af0  78 2c 79 2c 62 0d 12 70  2d 65 24 3d 22 46 4e 22  |x,y,b..p-e$="FN"|
00002b00  2b 6c 69 62 5f 70 72 6f  63 24 28 70 72 6f 63 25  |+lib_proc$(proc%|
00002b10  29 2b 22 28 22 22 22 2b  66 69 6c 65 24 2b 22 22  |)+"("""+file$+""|
00002b20  22 22 0d 12 7a 29 6d 61  6b 65 73 5f 66 69 6c 65  |""..z)makes_file|
00002b30  25 3d 28 6c 69 62 5f 66  6c 61 67 73 25 28 70 72  |%=(lib_flags%(pr|
00002b40  6f 63 25 29 20 80 20 34  29 3e 30 0d 12 84 2c 6d  |oc%) . 4)>0...,m|
00002b50  61 6b 65 73 5f 72 65 73  75 6c 74 73 25 3d 28 6c  |akes_results%=(l|
00002b60  69 62 5f 66 6c 61 67 73  25 28 70 72 6f 63 25 29  |ib_flags%(proc%)|
00002b70  20 80 20 38 29 3e 30 0d  12 8e 28 73 65 6e 64 5f  | . 8)>0...(send_|
00002b80  6f 75 74 25 3d 28 6c 69  62 5f 66 6c 61 67 73 25  |out%=(lib_flags%|
00002b90  28 70 72 6f 63 25 29 20  80 20 31 36 29 3e 30 0d  |(proc%) . 16)>0.|
00002ba0  12 98 0a c8 8e 20 b9 20  ca 0d 12 a2 13 20 c9 20  |..... . ..... . |
00002bb0  6d 61 6b 65 73 5f 66 69  6c 65 25 3a 0d 12 ac 1a  |makes_file%:....|
00002bc0  20 20 65 24 2b 3d 22 2c  22 22 22 2b 6a 75 6e 6b  |  e$+=","""+junk|
00002bd0  24 2b 22 22 22 22 0d 12  b6 16 20 c9 20 6d 61 6b  |$+"""".... . mak|
00002be0  65 73 5f 72 65 73 75 6c  74 73 25 3a 0d 12 c0 1e  |es_results%:....|
00002bf0  20 20 e3 20 69 25 3d 30  20 b8 20 6c 69 62 5f 6f  |  . i%=0 . lib_o|
00002c00  75 74 25 28 70 72 6f 63  25 29 0d 12 ca 24 20 20  |ut%(proc%)...$  |
00002c10  20 65 24 2b 3d 22 2c 72  24 28 22 2b c3 70 72 6f  | e$+=",r$("+.pro|
00002c20  63 25 2b 22 2c 22 2b c3  69 25 2b 22 29 22 0d 12  |c%+","+.i%+")"..|
00002c30  d4 07 20 20 ed 0d 12 de  05 cb 0d 12 e8 0b 65 24  |..  ..........e$|
00002c40  2b 3d 22 29 22 0d 12 f2  15 c8 99 20 22 48 6f 75  |+=")"...... "Hou|
00002c50  72 67 6c 61 73 73 5f 4f  6e 22 0d 12 fc 20 77 69  |rglass_On"... wi|
00002c60  6e 64 5f 68 61 6e 64 25  3d 77 69 6e 64 5f 68 61  |nd_hand%=wind_ha|
00002c70  6e 64 25 28 70 72 6f 63  25 29 0d 13 06 0b 7a 3d  |nd%(proc%)....z=|
00002c80  a0 28 65 24 29 0d 13 10  16 c8 99 20 22 48 6f 75  |.(e$)...... "Hou|
00002c90  72 67 6c 61 73 73 5f 4f  66 66 22 0d 13 1a 0b e7  |rglass_Off".....|
00002ca0  20 7a 3d 30 20 8c 0d 13  24 0b 20 c8 8e 20 b9 20  | z=0 ...$. .. . |
00002cb0  ca 0d 13 2e 17 20 20 c9  20 6d 61 6b 65 73 5f 72  |.....  . makes_r|
00002cc0  65 73 75 6c 74 73 25 3a  0d 13 38 43 20 20 20 e7  |esults%:..8C   .|
00002cd0  20 72 24 28 70 72 6f 63  25 2c 30 29 3d 22 22 20  | r$(proc%,0)="" |
00002ce0  84 20 c0 72 24 28 70 72  6f 63 25 2c 30 29 2c 31  |. .r$(proc%,0),1|
00002cf0  29 3d 22 3c 22 20 72 24  28 70 72 6f 63 25 2c 30  |)="<" r$(proc%,0|
00002d00  29 3d 22 52 65 73 75 6c  74 73 22 0d 13 42 1a 20  |)="Results"..B. |
00002d10  20 20 f2 6f 70 65 6e 5f  72 65 73 75 6c 74 28 70  |  .open_result(p|
00002d20  72 6f 63 25 29 0d 13 4c  14 20 20 c9 20 6d 61 6b  |roc%)..L.  . mak|
00002d30  65 73 5f 66 69 6c 65 25  3a 0d 13 56 2c 20 20 20  |es_file%:..V,   |
00002d40  c8 99 20 22 4f 53 5f 46  69 6c 65 22 2c 31 38 2c  |.. "OS_File",18,|
00002d50  6a 75 6e 6b 24 2c 6c 69  62 5f 6f 75 74 25 28 70  |junk$,lib_out%(p|
00002d60  72 6f 63 25 29 0d 13 60  14 20 20 20 e7 20 73 65  |roc%)..`.   . se|
00002d70  6e 64 5f 6f 75 74 25 20  8c 0d 13 6a 19 20 20 20  |nd_out% ...j.   |
00002d80  20 24 71 25 3d c4 34 34  2c bd 30 29 2b 6a 75 6e  | $q%=.44,.0)+jun|
00002d90  6b 24 0d 13 74 0f 20 20  20 20 71 25 21 31 36 3d  |k$..t.    q%!16=|
00002da0  35 0d 13 7e 1d 20 20 20  20 71 25 21 34 30 3d 6c  |5..~.    q%!40=l|
00002db0  69 62 5f 6f 75 74 25 28  70 72 6f 63 25 29 0d 13  |ib_out%(proc%)..|
00002dc0  88 23 20 20 20 20 21 71  25 3d 28 28 a9 28 6a 75  |.#    !q%=((.(ju|
00002dd0  6e 6b 24 29 2b 34 29 20  80 20 ac 20 33 29 2b 34  |nk$)+4) . . 3)+4|
00002de0  34 0d 13 92 25 20 20 20  20 c8 99 20 22 57 69 6d  |4...%    .. "Wim|
00002df0  70 5f 53 65 6e 64 4d 65  73 73 61 67 65 22 2c 31  |p_SendMessage",1|
00002e00  38 2c 71 25 2c 30 0d 13  9c 08 20 20 20 cc 0d 13  |8,q%,0....   ...|
00002e10  a6 2d 20 20 20 20 f2 6f  70 65 6e 5f 73 61 76 65  |.-    .open_save|
00002e20  28 78 2d 36 34 2c 79 2d  36 34 2c 6c 69 62 5f 6f  |(x-64,y-64,lib_o|
00002e30  75 74 25 28 70 72 6f 63  25 29 29 0d 13 b0 08 20  |ut%(proc%)).... |
00002e40  20 20 cd 0d 13 ba 06 20  cb 0d 13 c4 05 cd 0d 13  |  ..... ........|
00002e50  ce 05 e1 0d 13 d8 05 3a  0d 13 e2 12 dd 20 f2 70  |.......:..... .p|
00002e60  6f 70 5f 75 70 5f 73 61  76 65 0d 13 ec 0b ea 20  |op_up_save..... |
00002e70  78 2c 79 2c 62 0d 13 f6  0c c8 97 20 78 2c 79 2c  |x,y,b...... x,y,|
00002e80  62 0d 14 00 2d f2 6f 70  65 6e 5f 73 61 76 65 28  |b...-.open_save(|
00002e90  78 2d 36 34 2c 79 2d 36  34 2c 6c 69 62 5f 6f 75  |x-64,y-64,lib_ou|
00002ea0  74 25 28 63 75 72 5f 70  72 6f 63 25 29 29 0d 14  |t%(cur_proc%))..|
00002eb0  0a 05 e1 0d 14 14 05 3a  0d 14 1e 19 dd 20 f2 6f  |.......:..... .o|
00002ec0  70 65 6e 5f 72 65 73 75  6c 74 28 70 72 6f 63 25  |pen_result(proc%|
00002ed0  29 0d 14 28 0e ea 20 69  25 2c 6d 61 78 77 25 0d  |)..(.. i%,maxw%.|
00002ee0  14 32 35 e7 20 72 65 73  75 6c 74 5f 6f 70 65 6e  |.25. result_open|
00002ef0  25 28 70 72 6f 63 25 29  20 f2 63 6c 6f 73 65 28  |%(proc%) .close(|
00002f00  72 65 73 75 6c 74 5f 68  61 6e 64 25 28 70 72 6f  |result_hand%(pro|
00002f10  63 25 29 29 0d 14 3c 25  24 72 65 73 75 6c 74 5f  |c%))..<%$result_|
00002f20  74 69 74 6c 65 25 28 70  72 6f 63 25 29 3d 72 24  |title%(proc%)=r$|
00002f30  28 70 72 6f 63 25 2c 30  29 0d 14 46 0b 6d 61 78  |(proc%,0)..F.max|
00002f40  77 25 3d 30 0d 14 50 1c  e3 20 69 25 3d 30 20 b8  |w%=0..P.. i%=0 .|
00002f50  20 6c 69 62 5f 6f 75 74  25 28 70 72 6f 63 25 29  | lib_out%(proc%)|
00002f60  0d 14 5a 32 20 e7 20 a9  28 72 24 28 70 72 6f 63  |..Z2 . .(r$(proc|
00002f70  25 2c 69 25 29 29 3e 6d  61 78 77 25 20 6d 61 78  |%,i%))>maxw% max|
00002f80  77 25 3d a9 28 72 24 28  70 72 6f 63 25 2c 69 25  |w%=.(r$(proc%,i%|
00002f90  29 29 0d 14 64 05 ed 0d  14 6e 09 21 71 25 3d 30  |))..d....n.!q%=0|
00002fa0  0d 14 78 28 71 25 21 34  3d 2d 28 32 2a 62 6f 72  |..x(q%!4=-(2*bor|
00002fb0  64 65 72 25 2b 34 30 2a  6c 69 62 5f 6f 75 74 25  |der%+40*lib_out%|
00002fc0  28 70 72 6f 63 25 29 29  0d 14 82 1b 71 25 21 38  |(proc%))....q%!8|
00002fd0  3d 31 36 2a 6d 61 78 77  25 2b 32 2a 62 6f 72 64  |=16*maxw%+2*bord|
00002fe0  65 72 25 0d 14 8c 0b 71  25 21 31 32 3d 30 0d 14  |er%....q%!12=0..|
00002ff0  96 2e c8 99 20 22 57 69  6d 70 5f 53 65 74 45 78  |.... "Wimp_SetEx|
00003000  74 65 6e 74 22 2c 72 65  73 75 6c 74 5f 68 61 6e  |tent",result_han|
00003010  64 25 28 70 72 6f 63 25  29 2c 71 25 0d 14 a0 1b  |d%(proc%),q%....|
00003020  21 71 25 3d 72 65 73 75  6c 74 5f 68 61 6e 64 25  |!q%=result_hand%|
00003030  28 70 72 6f 63 25 29 0d  14 aa 20 c8 99 20 22 57  |(proc%)... .. "W|
00003040  69 6d 70 5f 47 65 74 57  69 6e 64 6f 77 53 74 61  |imp_GetWindowSta|
00003050  74 65 22 2c 2c 71 25 0d  14 b4 21 71 25 21 31 32  |te",,q%...!q%!12|
00003060  3d 71 25 21 34 2b 31 36  2a 6d 61 78 77 25 2b 32  |=q%!4+16*maxw%+2|
00003070  2a 62 6f 72 64 65 72 25  0d 14 be 2d 71 25 21 38  |*border%...-q%!8|
00003080  3d 71 25 21 31 36 2d 28  32 2a 62 6f 72 64 65 72  |=q%!16-(2*border|
00003090  25 2b 34 30 2a 6c 69 62  5f 6f 75 74 25 28 70 72  |%+40*lib_out%(pr|
000030a0  6f 63 25 29 29 0d 14 c8  0c 71 25 21 32 38 3d 2d  |oc%))....q%!28=-|
000030b0  31 0d 14 d2 1c c8 99 20  22 57 69 6d 70 5f 4f 70  |1...... "Wimp_Op|
000030c0  65 6e 57 69 6e 64 6f 77  22 2c 2c 71 25 0d 14 dc  |enWindow",,q%...|
000030d0  19 72 65 73 75 6c 74 5f  6f 70 65 6e 25 28 70 72  |.result_open%(pr|
000030e0  6f 63 25 29 3d b9 0d 14  e6 05 e1 0d 14 f0 05 3a  |oc%)=..........:|
000030f0  0d 14 fa 1d dd 20 f2 6f  70 65 6e 5f 73 61 76 65  |..... .open_save|
00003100  28 78 25 2c 79 25 2c 74  79 70 65 25 29 0d 15 04  |(x%,y%,type%)...|
00003110  0b ea 20 77 25 2c 68 25  0d 15 0e 27 24 73 61 76  |.. w%,h%...'$sav|
00003120  65 74 79 70 65 3d 22 53  66 69 6c 65 5f 22 2b c2  |etype="Sfile_"+.|
00003130  22 46 46 22 2b c3 7e 74  79 70 65 25 2c 33 29 0d  |"FF"+.~type%,3).|
00003140  15 18 12 21 71 25 3d 73  61 76 65 5f 68 61 6e 64  |...!q%=save_hand|
00003150  25 0d 15 22 1f c8 99 20  22 57 69 6d 70 5f 47 65  |%.."... "Wimp_Ge|
00003160  74 57 69 6e 64 6f 77 49  6e 66 6f 22 2c 2c 71 25  |tWindowInfo",,q%|
00003170  0d 15 2c 11 77 25 3d 71  25 21 31 32 2d 71 25 21  |..,.w%=q%!12-q%!|
00003180  34 0d 15 36 11 68 25 3d  71 25 21 31 36 2d 71 25  |4..6.h%=q%!16-q%|
00003190  21 38 0d 15 40 0b 71 25  21 34 3d 78 25 0d 15 4a  |!8..@.q%!4=x%..J|
000031a0  0b 71 25 21 38 3d 79 25  0d 15 54 0f 71 25 21 31  |.q%!8=y%..T.q%!1|
000031b0  32 3d 78 25 2b 77 25 0d  15 5e 0f 71 25 21 31 36  |2=x%+w%..^.q%!16|
000031c0  3d 79 25 2b 68 25 0d 15  68 0b 71 25 21 32 30 3d  |=y%+h%..h.q%!20=|
000031d0  30 0d 15 72 0b 71 25 21  32 34 3d 30 0d 15 7c 0c  |0..r.q%!24=0..|.|
000031e0  71 25 21 32 38 3d 2d 31  0d 15 86 1c c8 99 20 22  |q%!28=-1...... "|
000031f0  57 69 6d 70 5f 4f 70 65  6e 57 69 6e 64 6f 77 22  |Wimp_OpenWindow"|
00003200  2c 2c 71 25 0d 15 90 05  e1 0d 15 9a 05 3a 0d 15  |,,q%.........:..|
00003210  a4 0b dd 20 f2 64 72 61  67 0d 15 ae 20 c8 99 20  |... .drag... .. |
00003220  22 57 69 6d 70 5f 47 65  74 50 6f 69 6e 74 65 72  |"Wimp_GetPointer|
00003230  49 6e 66 6f 22 2c 2c 71  25 0d 15 b8 18 71 25 21  |Info",,q%....q%!|
00003240  33 32 3d 71 25 21 34 3a  71 25 21 32 38 3d 21 71  |32=q%!4:q%!28=!q|
00003250  25 0d 15 c2 1b 71 25 21  32 34 3d 71 25 21 31 36  |%....q%!24=q%!16|
00003260  3a 71 25 21 32 30 3d 71  25 21 31 32 0d 15 cc 13  |:q%!20=q%!12....|
00003270  71 25 21 31 36 3d 31 3a  71 25 21 31 32 3d 30 0d  |q%!16=1:q%!12=0.|
00003280  15 d6 29 c8 99 20 22 4f  53 5f 46 69 6c 65 22 2c  |..).. "OS_File",|
00003290  35 2c 6a 75 6e 6b 24 20  b8 20 2c 2c 71 25 21 34  |5,junk$ . ,,q%!4|
000032a0  30 2c 2c 71 25 21 33 36  0d 15 e0 21 71 25 21 34  |0,,q%!36...!q%!4|
000032b0  30 3d 28 71 25 21 34 30  20 80 20 26 46 46 46 30  |0=(q%!40 . &FFF0|
000032c0  30 29 20 81 20 26 31 30  30 0d 15 ea 30 24 28 71  |0) . &100...0$(q|
000032d0  25 2b 34 34 29 3d a4 6c  65 61 66 5f 6e 61 6d 65  |%+44)=.leaf_name|
000032e0  28 a4 67 65 74 5f 73 74  72 28 73 61 76 65 74 65  |(.get_str(savete|
000032f0  78 74 29 29 2b bd 28 30  29 0d 15 f4 0a 21 71 25  |xt))+.(0)....!q%|
00003300  3d 36 30 0d 15 fe 2b c8  99 20 22 57 69 6d 70 5f  |=60...+.. "Wimp_|
00003310  53 65 6e 64 4d 65 73 73  61 67 65 22 2c 31 37 2c  |SendMessage",17,|
00003320  71 25 2c 71 25 21 32 30  2c 71 25 21 32 34 0d 16  |q%,q%!20,q%!24..|
00003330  08 05 e1 0d 16 12 05 3a  0d 16 1c 36 dd 20 f2 6b  |.......:...6. .k|
00003340  65 79 28 68 61 6e 64 25  2c 69 63 6f 6e 25 2c 78  |ey(hand%,icon%,x|
00003350  63 61 72 25 2c 79 63 61  72 25 2c 63 61 72 68 25  |car%,ycar%,carh%|
00003360  2c 63 61 72 70 6f 73 25  2c 6b 65 79 25 29 0d 16  |,carpos%,key%)..|
00003370  26 0b ea 20 70 72 6f 63  25 0d 16 30 22 e7 20 68  |&.. proc%..0". h|
00003380  61 6e 64 25 3d 73 61 76  65 5f 68 61 6e 64 25 20  |and%=save_hand% |
00003390  80 20 6b 65 79 25 3d 31  33 20 8c 0d 16 3a 33 20  |. key%=13 ...:3 |
000033a0  e7 20 a4 73 61 76 65 28  a4 67 65 74 5f 73 74 72  |. .save(.get_str|
000033b0  28 73 61 76 65 74 65 78  74 29 29 20 f2 63 6c 6f  |(savetext)) .clo|
000033c0  73 65 28 73 61 76 65 5f  68 61 6e 64 25 29 0d 16  |se(save_hand%)..|
000033d0  44 05 cc 0d 16 4e 29 20  70 72 6f 63 25 3d a4 66  |D....N) proc%=.f|
000033e0  69 6e 64 5f 65 6c 65 6d  28 68 61 6e 64 25 2c 77  |ind_elem(hand%,w|
000033f0  69 6e 64 5f 68 61 6e 64  25 28 29 29 0d 16 58 10  |ind_hand%())..X.|
00003400  20 e7 20 70 72 6f 63 25  3d 30 20 8c 0d 16 62 1f  | . proc%=0 ...b.|
00003410  20 20 c8 99 20 22 57 69  6d 70 5f 50 72 6f 63 65  |  .. "Wimp_Proce|
00003420  73 73 4b 65 79 22 2c 6b  65 79 25 0d 16 6c 06 20  |ssKey",key%..l. |
00003430  cc 0d 16 76 76 20 20 65  3d a0 28 22 46 4e 22 2b  |...vv  e=.("FN"+|
00003440  6c 69 62 5f 70 72 6f 63  24 28 70 72 6f 63 25 29  |lib_proc$(proc%)|
00003450  2b 22 5f 6b 65 79 28 22  2b c3 68 61 6e 64 25 2b  |+"_key("+.hand%+|
00003460  22 2c 22 2b c3 69 63 6f  6e 25 2b 22 2c 22 2b c3  |","+.icon%+","+.|
00003470  78 63 61 72 25 2b 22 2c  22 2b c3 79 63 61 72 25  |xcar%+","+.ycar%|
00003480  2b 22 2c 22 2b c3 63 61  72 68 25 2b 22 2c 22 2b  |+","+.carh%+","+|
00003490  c3 63 61 72 70 6f 73 25  2b 22 2c 22 2b c3 6b 65  |.carpos%+","+.ke|
000034a0  79 25 2b 22 29 22 29 0d  16 80 1c 20 20 e7 20 65  |y%+")")....  . e|
000034b0  20 f2 70 72 6f 63 65 73  73 28 70 72 6f 63 25 2c  | .process(proc%,|
000034c0  22 22 29 0d 16 8a 06 20  cd 0d 16 94 05 cd 0d 16  |"").... ........|
000034d0  9e 05 e1 0d 16 a8 05 3a  0d 16 b2 21 dd 20 f2 69  |.......:...!. .i|
000034e0  6e 69 74 5f 73 61 76 65  5f 64 72 61 67 28 73 61  |nit_save_drag(sa|
000034f0  76 65 5f 68 61 6e 64 25  29 0d 16 bc 12 ea 20 78  |ve_hand%)..... x|
00003500  25 2c 79 25 2c 79 73 69  7a 65 25 0d 16 c6 12 21  |%,y%,ysize%....!|
00003510  71 25 3d 73 61 76 65 5f  68 61 6e 64 25 0d 16 d0  |q%=save_hand%...|
00003520  20 c8 99 20 22 57 69 6d  70 5f 47 65 74 57 69 6e  | .. "Wimp_GetWin|
00003530  64 6f 77 53 74 61 74 65  22 2c 2c 71 25 0d 16 da  |dowState",,q%...|
00003540  15 79 73 69 7a 65 25 3d  71 25 21 31 36 2d 71 25  |.ysize%=q%!16-q%|
00003550  21 38 0d 16 e4 0b 78 25  3d 71 25 21 34 0d 16 ee  |!8....x%=q%!4...|
00003560  0b 79 25 3d 71 25 21 38  0d 16 f8 0a 71 25 21 34  |.y%=q%!8....q%!4|
00003570  3d 31 0d 17 02 1e c8 99  20 22 57 69 6d 70 5f 47  |=1...... "Wimp_G|
00003580  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 71 25  |etIconState",,q%|
00003590  0d 17 0c 0c 71 25 21 38  2b 3d 78 25 0d 17 16 14  |....q%!8+=x%....|
000035a0  71 25 21 31 32 2b 3d 79  25 2b 79 73 69 7a 65 25  |q%!12+=y%+ysize%|
000035b0  0d 17 20 0d 71 25 21 31  36 2b 3d 78 25 0d 17 2a  |.. .q%!16+=x%..*|
000035c0  14 71 25 21 32 30 2b 3d  79 25 2b 79 73 69 7a 65  |.q%!20+=y%+ysize|
000035d0  25 0d 17 34 0b 71 25 21  32 34 3d 30 0d 17 3e 0b  |%..4.q%!24=0..>.|
000035e0  71 25 21 32 38 3d 30 0d  17 48 1d 71 25 21 33 32  |q%!28=0..H.q%!32|
000035f0  3d 28 a4 6d 76 28 31 31  29 2b 31 29 3c 3c a4 6d  |=(.mv(11)+1)<<.m|
00003600  76 28 34 29 0d 17 52 1d  71 25 21 33 36 3d 28 a4  |v(4)..R.q%!36=(.|
00003610  6d 76 28 31 32 29 2b 31  29 3c 3c a4 6d 76 28 35  |mv(12)+1)<<.mv(5|
00003620  29 0d 17 5c 09 21 71 25  3d 30 0d 17 66 0a 71 25  |)..\.!q%=0..f.q%|
00003630  21 34 3d 35 0d 17 70 19  c8 99 20 22 57 69 6d 70  |!4=5..p... "Wimp|
00003640  5f 44 72 61 67 42 6f 78  22 2c 2c 71 25 0d 17 7a  |_DragBox",,q%..z|
00003650  05 e1 0d 17 84 05 3a 0d  17 8e 0d dd 20 a4 6d 76  |......:..... .mv|
00003660  28 6d 25 29 0d 17 98 08  ea 20 76 25 0d 17 a2 29  |(m%)..... v%...)|
00003670  c8 99 20 22 4f 53 5f 52  65 61 64 4d 6f 64 65 56  |.. "OS_ReadModeV|
00003680  61 72 69 61 62 6c 65 22  2c 2d 31 2c 6d 25 20 b8  |ariable",-1,m% .|
00003690  20 2c 2c 76 25 0d 17 ac  07 3d 76 25 0d 17 b6 05  | ,,v%....=v%....|
000036a0  3a 0d 17 c0 12 dd 20 a4  73 61 76 65 28 73 61 76  |:..... .save(sav|
000036b0  65 24 29 0d 17 ca 0c ea  20 73 61 76 65 64 25 0d  |e$)..... saved%.|
000036c0  17 d4 1e e7 20 a4 67 6f  6f 64 5f 73 61 76 65 5f  |.... .good_save_|
000036d0  6e 61 6d 65 28 73 61 76  65 24 29 20 8c 0d 17 de  |name(save$) ....|
000036e0  29 20 c8 99 20 22 4f 53  5f 46 53 43 6f 6e 74 72  |) .. "OS_FSContr|
000036f0  6f 6c 22 2c 32 36 2c 6a  75 6e 6b 24 2c 73 61 76  |ol",26,junk$,sav|
00003700  65 24 2c 26 38 32 0d 17  e8 0d 20 73 61 76 65 64  |e$,&82.... saved|
00003710  25 3d b9 0d 17 f2 05 cc  0d 17 fc 3b 20 f2 77 61  |%=.........; .wa|
00003720  72 6e 28 22 54 6f 20 73  61 76 65 2c 20 64 72 61  |rn("To save, dra|
00003730  67 20 74 68 65 20 69 63  6f 6e 20 74 6f 20 61 20  |g the icon to a |
00003740  64 69 72 65 63 74 6f 72  79 20 76 69 65 77 65 72  |directory viewer|
00003750  2e 22 29 0d 18 06 0d 20  73 61 76 65 64 25 3d a3  |.").... saved%=.|
00003760  0d 18 10 05 cd 0d 18 1a  0b 3d 73 61 76 65 64 25  |.........=saved%|
00003770  0d 18 24 05 3a 0d 18 2e  1c dd 20 a4 67 6f 6f 64  |..$.:..... .good|
00003780  5f 73 61 76 65 5f 6e 61  6d 65 28 73 61 76 65 24  |_save_name(save$|
00003790  29 0d 18 38 39 3d 73 61  76 65 24 3d 22 3c 57 69  |)..89=save$="<Wi|
000037a0  6d 70 24 53 63 72 61 70  3e 22 20 84 20 a7 73 61  |mp$Scrap>" . .sa|
000037b0  76 65 24 2c 22 3a 22 29  3e 30 20 84 20 a7 73 61  |ve$,":")>0 . .sa|
000037c0  76 65 24 2c 22 2e 22 29  3e 30 0d 18 42 05 3a 0d  |ve$,".")>0..B.:.|
000037d0  18 4c 20 dd 20 a4 69 63  5f 61 64 64 72 28 68 61  |.L . .ic_addr(ha|
000037e0  6e 64 25 2c 69 63 6f 6e  25 2c 6f 66 66 25 29 0d  |nd%,icon%,off%).|
000037f0  18 56 0e 21 69 63 25 3d  68 61 6e 64 25 0d 18 60  |.V.!ic%=hand%..`|
00003800  0f 69 63 25 21 34 3d 69  63 6f 6e 25 0d 18 6a 1f  |.ic%!4=icon%..j.|
00003810  c8 99 20 22 57 69 6d 70  5f 47 65 74 49 63 6f 6e  |.. "Wimp_GetIcon|
00003820  53 74 61 74 65 22 2c 2c  69 63 25 0d 18 74 0d 3d  |State",,ic%..t.=|
00003830  69 63 25 21 6f 66 66 25  0d 18 7e 05 3a 0d 18 88  |ic%!off%..~.:...|
00003840  13 dd 20 f2 63 6c 6f 73  65 28 68 61 6e 64 25 29  |.. .close(hand%)|
00003850  0d 18 92 0b ea 20 70 72  6f 63 25 0d 18 9c 0d 21  |..... proc%....!|
00003860  71 25 3d 68 61 6e 64 25  0d 18 a6 1d c8 99 20 22  |q%=hand%...... "|
00003870  57 69 6d 70 5f 43 6c 6f  73 65 57 69 6e 64 6f 77  |Wimp_CloseWindow|
00003880  22 2c 2c 71 25 0d 18 b0  2c e7 20 68 61 6e 64 25  |",,q%...,. hand%|
00003890  3d 73 61 76 65 5f 68 61  6e 64 25 20 c8 99 20 22  |=save_hand% .. "|
000038a0  58 4f 53 5f 46 69 6c 65  22 2c 36 2c 6a 75 6e 6b  |XOS_File",6,junk|
000038b0  24 0d 18 ba 30 e7 20 68  61 6e 64 25 3d 63 75 72  |$...0. hand%=cur|
000038c0  5f 73 65 74 75 70 5f 68  61 6e 64 25 20 8c 20 63  |_setup_hand% . c|
000038d0  75 72 5f 73 65 74 75 70  5f 68 61 6e 64 25 3d 2d  |ur_setup_hand%=-|
000038e0  31 0d 18 c4 2a 70 72 6f  63 25 3d a4 66 69 6e 64  |1...*proc%=.find|
000038f0  5f 65 6c 65 6d 28 68 61  6e 64 25 2c 72 65 73 75  |_elem(hand%,resu|
00003900  6c 74 5f 68 61 6e 64 25  28 29 29 0d 18 ce 23 e7  |lt_hand%())...#.|
00003910  20 70 72 6f 63 25 3e 30  20 72 65 73 75 6c 74 5f  | proc%>0 result_|
00003920  6f 70 65 6e 25 28 70 72  6f 63 25 29 3d a3 0d 18  |open%(proc%)=...|
00003930  d8 05 e1 0d 18 e2 05 3a  0d 18 ec 14 dd 20 f2 72  |.......:..... .r|
00003940  65 64 72 61 77 28 68 61  6e 64 25 29 0d 18 f6 1e  |edraw(hand%)....|
00003950  ea 20 69 25 2c 6d 6f 72  65 25 2c 61 78 30 25 2c  |. i%,more%,ax0%,|
00003960  61 79 30 25 2c 70 72 6f  63 25 0d 19 00 2a 70 72  |ay0%,proc%...*pr|
00003970  6f 63 25 3d a4 66 69 6e  64 5f 65 6c 65 6d 28 68  |oc%=.find_elem(h|
00003980  61 6e 64 25 2c 72 65 73  75 6c 74 5f 68 61 6e 64  |and%,result_hand|
00003990  25 28 29 29 0d 19 0a 26  c8 99 20 22 57 69 6d 70  |%())...&.. "Wimp|
000039a0  5f 52 65 64 72 61 77 57  69 6e 64 6f 77 22 2c 2c  |_RedrawWindow",,|
000039b0  71 25 20 b8 20 6d 6f 72  65 25 0d 19 14 0c c8 95  |q% . more%......|
000039c0  20 6d 6f 72 65 25 0d 19  1e 14 20 61 78 30 25 3d  | more%.... ax0%=|
000039d0  71 25 21 34 2d 71 25 21  32 30 0d 19 28 15 20 61  |q%!4-q%!20..(. a|
000039e0  79 30 25 3d 71 25 21 31  36 2d 71 25 21 32 34 0d  |y0%=q%!16-q%!24.|
000039f0  19 32 1d 20 e3 20 69 25  3d 31 20 b8 20 6c 69 62  |.2. . i%=1 . lib|
00003a00  5f 6f 75 74 25 28 70 72  6f 63 25 29 0d 19 3c 2d  |_out%(proc%)..<-|
00003a10  20 20 ec 20 61 78 30 25  2b 62 6f 72 64 65 72 25  |  . ax0%+border%|
00003a20  2c 61 79 30 25 2d 38 2d  62 6f 72 64 65 72 25 2d  |,ay0%-8-border%-|
00003a30  34 30 2a 28 69 25 2d 31  29 0d 19 46 14 20 20 f1  |40*(i%-1)..F.  .|
00003a40  20 72 24 28 70 72 6f 63  25 2c 69 25 29 0d 19 50  | r$(proc%,i%)..P|
00003a50  06 20 ed 0d 19 5a 27 20  c8 99 20 22 57 69 6d 70  |. ...Z' .. "Wimp|
00003a60  5f 47 65 74 52 65 63 74  61 6e 67 6c 65 22 2c 2c  |_GetRectangle",,|
00003a70  71 25 20 b8 20 6d 6f 72  65 25 0d 19 64 05 ce 0d  |q% . more%..d...|
00003a80  19 6e 05 e1 0d 19 78 05  3a 0d 19 82 0d dd 20 a4  |.n....x.:..... .|
00003a90  75 63 28 61 24 29 0d 19  8c 0b ea 20 69 25 2c 63  |uc(a$)..... i%,c|
00003aa0  24 0d 19 96 12 e3 20 69  25 3d 31 20 b8 20 a9 28  |$..... i%=1 . .(|
00003ab0  61 24 29 0d 19 a0 11 20  63 24 3d c1 61 24 2c 69  |a$).... c$=.a$,i|
00003ac0  25 2c 31 29 0d 19 aa 2c  20 e7 20 63 24 3e 3d 22  |%,1)..., . c$>="|
00003ad0  61 22 20 80 20 63 24 3c  3d 22 7a 22 20 c1 61 24  |a" . c$<="z" .a$|
00003ae0  2c 69 25 2c 31 29 3d bd  28 97 63 24 2d 33 32 29  |,i%,1)=.(.c$-32)|
00003af0  0d 19 b4 05 ed 0d 19 be  07 3d 61 24 0d 19 c8 05  |.........=a$....|
00003b00  3a 0d 19 d2 0d dd 20 a4  6c 63 28 61 24 29 0d 19  |:..... .lc(a$)..|
00003b10  dc 08 ea 20 69 25 0d 19  e6 12 e3 20 69 25 3d 31  |... i%..... i%=1|
00003b20  20 b8 20 a9 28 61 24 29  0d 19 f0 11 20 63 24 3d  | . .(a$).... c$=|
00003b30  c1 61 24 2c 69 25 2c 31  29 0d 19 fa 2c 20 e7 20  |.a$,i%,1)..., . |
00003b40  63 24 3e 3d 22 41 22 20  80 20 63 24 3c 3d 22 5a  |c$>="A" . c$<="Z|
00003b50  22 20 c1 61 24 2c 69 25  2c 31 29 3d bd 28 97 63  |" .a$,i%,1)=.(.c|
00003b60  24 2b 33 32 29 0d 1a 04  05 ed 0d 1a 0e 07 3d 61  |$+32).........=a|
00003b70  24 0d 1a 18 05 3a 0d 1a  22 19 dd 20 a4 73 74 72  |$....:..".. .str|
00003b80  69 70 5f 73 70 61 63 65  73 28 73 74 72 24 29 0d  |ip_spaces(str$).|
00003b90  1a 2c 13 c8 95 20 c0 73  74 72 24 2c 31 29 3d 22  |.,... .str$,1)="|
00003ba0  20 22 0d 1a 36 12 20 73  74 72 24 3d c1 73 74 72  | "..6. str$=.str|
00003bb0  24 2c 32 29 0d 1a 40 05  ce 0d 1a 4a 13 c8 95 20  |$,2)..@....J... |
00003bc0  c2 73 74 72 24 2c 31 29  3d 22 20 22 0d 1a 54 10  |.str$,1)=" "..T.|
00003bd0  20 73 74 72 24 3d c0 73  74 72 24 29 0d 1a 5e 05  | str$=.str$)..^.|
00003be0  ce 0d 1a 68 09 3d 73 74  72 24 0d 1a 72 05 3a 0d  |...h.=str$..r.:.|
00003bf0  1a 7c 14 dd 20 f2 62 70  75 74 28 66 25 2c 73 74  |.|.. .bput(f%,st|
00003c00  72 24 29 0d 1a 86 13 d5  20 23 66 25 2c 73 74 72  |r$)..... #f%,str|
00003c10  24 2b bd 31 30 3b 0d 1a  90 05 e1 0d 1a 9a 05 3a  |$+.10;.........:|
00003c20  0d 1a a4 17 dd 20 f2 77  70 75 74 28 66 25 2c 21  |..... .wput(f%,!|
00003c30  5f 77 6f 72 64 25 29 0d  1a ae 1e c8 99 20 22 4f  |_word%)...... "O|
00003c40  53 5f 47 42 50 42 22 2c  32 2c 66 25 2c 5f 77 6f  |S_GBPB",2,f%,_wo|
00003c50  72 64 25 2c 34 0d 1a b8  05 e1 0d 1a c2 05 3a 0d  |rd%,4.........:.|
00003c60  1a cc 0f dd 20 a4 77 67  65 74 28 66 25 29 0d 1a  |.... .wget(f%)..|
00003c70  d6 1e c8 99 20 22 4f 53  5f 47 42 50 42 22 2c 34  |.... "OS_GBPB",4|
00003c80  2c 66 25 2c 5f 77 6f 72  64 25 2c 34 0d 1a e0 0c  |,f%,_word%,4....|
00003c90  3d 21 5f 77 6f 72 64 25  0d 1a ea 05 3a 0d 1a f4  |=!_word%....:...|
00003ca0  27 dd 20 f2 77 72 69 74  65 5f 69 6e 5f 69 63 6f  |'. .write_in_ico|
00003cb0  6e 28 68 61 6e 64 25 2c  69 63 6f 6e 25 2c 74 65  |n(hand%,icon%,te|
00003cc0  78 74 24 29 0d 1a fe 23  24 a4 69 63 5f 61 64 64  |xt$)...#$.ic_add|
00003cd0  72 28 68 61 6e 64 25 2c  69 63 6f 6e 25 2c 32 38  |r(hand%,icon%,28|
00003ce0  29 3d 74 65 78 74 24 0d  1b 08 14 69 63 25 21 38  |)=text$....ic%!8|
00003cf0  3d 30 3a 69 63 25 21 31  32 3d 30 0d 1b 12 1f c8  |=0:ic%!12=0.....|
00003d00  99 20 22 57 69 6d 70 5f  53 65 74 49 63 6f 6e 53  |. "Wimp_SetIconS|
00003d10  74 61 74 65 22 2c 2c 69  63 25 0d 1b 1c 23 c8 99  |tate",,ic%...#..|
00003d20  20 22 57 69 6d 70 5f 47  65 74 43 61 72 65 74 50  | "Wimp_GetCaretP|
00003d30  6f 73 69 74 69 6f 6e 22  2c 2c 69 63 25 0d 1b 26  |osition",,ic%..&|
00003d40  57 e7 20 21 69 63 25 3d  68 61 6e 64 25 20 80 20  |W. !ic%=hand% . |
00003d50  69 63 25 21 34 3d 69 63  6f 6e 25 20 c8 99 20 22  |ic%!4=icon% .. "|
00003d60  57 69 6d 70 5f 53 65 74  43 61 72 65 74 50 6f 73  |Wimp_SetCaretPos|
00003d70  69 74 69 6f 6e 22 2c 21  69 63 25 2c 69 63 25 21  |ition",!ic%,ic%!|
00003d80  34 2c 69 63 25 21 38 2c  69 63 25 21 31 32 2c 2d  |4,ic%!8,ic%!12,-|
00003d90  31 2c 2d 31 0d 1b 30 05  e1 0d 1b 3a 05 3a 0d 1b  |1,-1..0....:.:..|
00003da0  44 1d dd 20 a4 69 63 6f  6e 5f 74 65 78 74 28 77  |D.. .icon_text(w|
00003db0  69 6e 64 25 2c 69 63 6f  6e 25 29 0d 1b 4e 1e 3d  |ind%,icon%)..N.=|
00003dc0  24 a4 69 63 5f 61 64 64  72 28 77 69 6e 64 25 2c  |$.ic_addr(wind%,|
00003dd0  69 63 6f 6e 25 2c 32 38  29 0d 1b 58 05 3a 0d 1b  |icon%,28)..X.:..|
00003de0  62 24 dd 20 f2 73 65 74  5f 62 75 74 74 6f 6e 28  |b$. .set_button(|
00003df0  21 69 63 25 2c 69 63 25  21 34 2c 73 74 61 74 65  |!ic%,ic%!4,state|
00003e00  25 29 0d 1b 6c 14 69 63  25 21 38 3d 73 74 61 74  |%)..l.ic%!8=stat|
00003e10  65 25 3c 3c 32 31 0d 1b  76 10 69 63 25 21 31 32  |e%<<21..v.ic%!12|
00003e20  3d 31 3c 3c 32 31 0d 1b  80 1f c8 99 20 22 57 69  |=1<<21...... "Wi|
00003e30  6d 70 5f 53 65 74 49 63  6f 6e 53 74 61 74 65 22  |mp_SetIconState"|
00003e40  2c 2c 69 63 25 0d 1b 8a  05 e1 0d 1b 94 05 3a 0d  |,,ic%.........:.|
00003e50  1b 9e 1f dd 20 a4 62 75  74 74 6f 6e 5f 73 74 61  |.... .button_sta|
00003e60  74 65 28 21 69 63 25 2c  69 63 25 21 34 29 0d 1b  |te(!ic%,ic%!4)..|
00003e70  a8 1f c8 99 20 22 57 69  6d 70 5f 47 65 74 49 63  |.... "Wimp_GetIc|
00003e80  6f 6e 53 74 61 74 65 22  2c 2c 69 63 25 0d 1b b2  |onState",,ic%...|
00003e90  1a 3d b4 28 69 63 25 21  28 38 2b 31 36 29 20 80  |.=.(ic%!(8+16) .|
00003ea0  20 31 3c 3c 32 31 29 0d  1b bc 05 3a 0d 1b c6 1c  | 1<<21)....:....|
00003eb0  dd 20 a4 65 73 67 5f 73  74 61 74 65 28 77 69 6e  |. .esg_state(win|
00003ec0  64 25 2c 65 73 67 25 29  0d 1b d0 42 c8 99 20 22  |d%,esg%)...B.. "|
00003ed0  57 69 6d 70 5f 57 68 69  63 68 49 63 6f 6e 22 2c  |Wimp_WhichIcon",|
00003ee0  77 69 6e 64 25 2c 69 63  25 2c 25 31 31 31 31 31  |wind%,ic%,%11111|
00003ef0  31 3c 3c 31 36 2c 28 65  73 67 25 3c 3c 31 36 29  |1<<16,(esg%<<16)|
00003f00  20 84 20 28 31 3c 3c 32  31 29 0d 1b da 09 3d 21  | . (1<<21)....=!|
00003f10  69 63 25 0d 1b e4 05 3a  0d 1b ee 21 dd 20 f2 68  |ic%....:...!. .h|
00003f20  6f 75 72 67 6c 61 73 73  28 63 75 72 72 65 6e 74  |ourglass(current|
00003f30  2c 6d 61 78 69 6d 75 6d  29 0d 1b f8 3e e7 20 6d  |,maximum)...>. m|
00003f40  61 78 69 6d 75 6d 3c 3e  30 20 c8 99 20 22 48 6f  |aximum<>0 .. "Ho|
00003f50  75 72 67 6c 61 73 73 5f  50 65 72 63 65 6e 74 61  |urglass_Percenta|
00003f60  67 65 22 2c 63 75 72 72  65 6e 74 2a 31 30 30 2f  |ge",current*100/|
00003f70  6d 61 78 69 6d 75 6d 0d  1c 02 05 e1 0d ff        |maximum.......|
00003f7e