Home » Archimedes archive » Archimedes World » AW-1992-03.adf » AWMar92 » !AWMar92/Goodies/Encode4/!Encode4/!Runimage

!AWMar92/Goodies/Encode4/!Encode4/!Runimage

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

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

Tape/disk: Home » Archimedes archive » Archimedes World » AW-1992-03.adf » AWMar92
Filename: !AWMar92/Goodies/Encode4/!Encode4/!Runimage
Read OK:
File size: 490F bytes
Load address: 0000
Exec address: 0000
File contents
   10REM > <Encode4$Dir>.!Runimage
   15REM (c) Archimedes World March 1992
   20
   30DIM buffer% 75
   40ON ERROR PROCerror
   50quit% = FALSE
   60PROCswinumbers
   70SYS houron%
   80PROCinitialise
   90PROCcreate
  100PROCviruscheck
  110PROCcheck
  120SYS houroff%
  130ON ERROR PROCerror
  140REPEAT
  150SYS poll%,1,block TO reason%
  160CASE reason% OF
  170WHEN 1 : PROCredraw
  180WHEN 2 : PROCopen(block)
  190WHEN 3 : PROCclose(block!0)
  200WHEN 6 : PROCmouse(block!8,block!12,block!16)
  210WHEN 8 : PROCkey(block!0,block!4,block!24)
  220WHEN 9 : PROCdecode_menu
  230WHEN 17,18 : PROCreceive
  240ENDCASE
  250UNTIL quit%
  260SYS close%
  270END
  280
  290
  300
  310DEF PROCcheck
  320SYS getenv% TO command$
  330LOCAL old%
  340REPEAT
  350pos% = INSTR(command$,"""",old%)
  360IF pos% <> 0 THEN old% = pos%+1
  370UNTIL pos% = 0
  380command$ = MID$(command$,old%)
  390WHILE LEFT$(command$,1) = " "
  400command$ = MID$(command$,2)
  410ENDWHILE
  420IF command$ <> "" THEN
  430SYS osfile%,17,command$ TO ,,load%
  440type$ = MID$(STR$~load%,4,3)
  450IF type$ <> "" THEN
  460action% = 10
  470PROCincoming(-2,EVAL("&"+type$),FALSE)
  480ENDIF
  490ENDIF
  500ENDPROC
  510
  520
  530
  540DEF FNchecksprite(find$)
  550LOCAL found%
  560found% = FALSE
  570SYS spriteop%+&20000,24,,find$ TO ;flags
  580IF flags = 6 THEN found% = TRUE
  590=found%
  600
  610
  620
  630DEF PROCclose(w%)
  640block!0 = w%
  650SYS closeW%,,block
  660CASE w% OF
  670WHEN handle% : open% = FALSE : IF optopen% THEN PROCclose(option%)
  680WHEN option% : optopen% = FALSE
  690ENDCASE
  700ENDPROC
  710
  720
  730
  740DEF PROCcompile
  750P% = code% : count = 6
  760work = 7 : factor = 8 : index = 9
  770[ OPT 2
  780.newencode
  790MOV count,#0 ; count = 0
  800MOV index,#0 ; index into string = 0
  810.protection
  820LDRB factor,[R1,index] ; factor = ascii of index pos in string
  830ADD index,index,#1     ; add one to string index
  840EOR factor,factor,index; Exclusive OR factor by position in string
  850SUB index,index,#1     ; Subtract 1 from index
  860STRB factor,[R1,index] ; Store back in memory
  870ADD index,index,#1     ; add one to string index
  880CMP index,R3           ; compare index with length
  890BLT protection         ; if less then jump
  900.loop1
  910MOV index,#0
  920.inner    
  930LDRB factor,[R1,index] ; factor = ascii of index pos in string
  940LDRB work,[R0,count]   ; byte = block + loop
  950EOR work,work,factor   ; exclusive OR byte by factor
  960STRB work,[R0,count]   ; place byte back into memory
  970ADD index,index,#1     ; add one to string index
  980ADD count,count,#1     ; add one to position counter
  990CMP index,R3           ; see if end of string
 1000BLT inner              ; in not, jump to start
 1010CMP count,R2           ; compare to size of file
 1020BLE loop1              ; if less than, then jump to start
 1030MOV PC,R14             ; return to basic?
 1040.oldencode
 1050MOV count,#0
 1060.loop2
 1070ADD count,count,#3     ; add 3 to initial position
 1080LDRB index,[R0,count]  ; load index
 1090SUB index,index,#4     ; decrement counter
 1100.loop3
 1110ADD count,count,#1     ; add 1 to count
 1120SUB index,index,#1     ; add 1 to index
 1130LDRB work,[R0,count]   ; load byte from block+loop in memory
 1140EOR work,work,R1       ; exclusive OR by factor
 1150STRB work,[R0,count]   ; save byte back into memory
 1160CMP index,#0
 1170BGT loop3
 1180CMP count,R2           ; compare to length of file
 1190BLE loop2              ; if less jump back to start
 1200MOV PC,R14             ; return to basic?
 1210]        
 1220ENDPROC
 1230
 1240
 1250
 1260DEF PROCcreate
 1270handle%=FNwindow(100,200,532,584,-1,&87000052,7,14,7,1,3,1,14,taskid$)
 1280info% = FNwindow(400,100,1020,360,-1,&84000012,7,14,7,1,3,1,14,"Program Info")
 1290option%=FNwindow(800,400,1150,784,-1,&87000052,7,14,7,1,3,1,14,"Options")
 1300text$ = "Drag file to box or icon on iconbar to encode it."
 1310text% = FNicon(handle%,10,-125,400,-20,&7013111,text$,8,1)
 1320picture% = FNicon(handle%,50,-220,210,-150,&3102,"picture",1,sprites%)
 1330password% = FNicon(handle%,10,-300,210,-250,&7012001,"Password for",0,1)
 1340sprite% = FNicon(handle%,250,-240,350,-140,&1E02313E,"encode",1,1)
 1350name% = FNicon(handle%,219,-300,390,-250,&17183139,"No file",2,1)
 1360enter%= FNicon(handle%,50,-363,382,-312,&704F125,STRING$(20,CHR$(0)),3,1)
 1370flag% = &17010211
 1380info1%= FNicon(info%,10,-50,180,-4,flag%,"Name:",0,1)
 1390info2%= FNicon(info%,10,-100,180,-54,flag%,"Purpose:",0,1)
 1400info3%= FNicon(info%,10,-150,180,-104,flag%,"Author:",0,1)
 1410info4%= FNicon(info%,10,-200,180,-154,flag%,"Version:",0,1)
 1420info5%= FNicon(info%,10,-250,180,-204,flag%,"Copyright:",0,1)
 1430flag% = &702013D
 1440info5%= FNicon(info%,180,-50,610,-4,flag%,taskid$,2,1)
 1450info6%= FNicon(info%,180,-100,610,-54,flag%,"Encrypts Files",2,1)
 1460info7%= FNicon(info%,180,-150,610,-104,flag%,"Timothy Kimber",2,1)
 1470info8%= FNicon(info%,180,-200,610,-154,flag%,"4.50 (21 December 1991)",2,1)
 1480info9%= FNicon(info%,180,-250,610,-204,flag%,"Archimedes World",2,1)
 1490opt1% = FNicon(option%,30,-60,300,-10,&1503B133," New Format",4,sprites%)
 1500opt2% = FNicon(option%,30,-120,300,-70,&1503B133," Old Format",5,sprites%)
 1510opt3% = FNicon(option%,30,-180,300,-130,&1504B133," Hourglass On",6,sprites%)
 1520opt4% = FNicon(option%,30,-240,300,-190,&1504B133," Hourglass Off",7,sprites%)
 1530opt5% = FNicon(option%,30,-300,300,-250,&1500B133," Extra Secure",6,sprites%)
 1540save% = FNicon(option%,230,-360,320,-310,&0708903D,"Save",0,1)
 1550iconbar%= FNicon(-1,0,0,63,68,&3102,"!encode4",1,1)
 1560PROCopenup(handle%,enter%)
 1570IF format% = 1 THEN
 1580PROChiIcon(option%,opt1%)
 1590ELSE
 1600PROChiIcon(option%,opt2%)
 1610ENDIF
 1620IF hour% = 1 THEN
 1630PROChiIcon(option%,opt3%)
 1640ELSE
 1650PROChiIcon(option%,opt4%)
 1660ENDIF
 1670IF secure% = 1 THEN PROChiIcon(option%,opt5%)
 1680ENDPROC
 1690
 1700
 1710
 1720DEF PROCdecode_menu
 1730LOCAL selected$,x%,y%,open%
 1740open% = TRUE
 1750SYS decodeM%,,menu%,block,STRING$(200," ") TO ,,,selected$
 1760SYS pointer%,,block
 1770CASE selected$ OF
 1780WHEN "Info"
 1790x% = block!0
 1800y% = block!4
 1810SYS createM%,,info%,x%,y%
 1820open% = FALSE
 1830WHEN "Options"
 1840IF optopen% THEN
 1850PROCclose(option%)
 1860ELSE
 1870PROCopenup(option%,-1)
 1880ENDIF
 1890WHEN "Quit" : quit%=TRUE
 1900ENDCASE
 1910IF block!8 = 1 AND open% THEN
 1920PROCmenu(2)
 1930ENDIF
 1940ENDPROC
 1950
 1960
 1970
 1980DEF PROCdirectory(where$)
 1990LOCAL offset%,file$,filetype$
 2000REPEAT
 2010SYS gbpb%,10,where$,buffer%,1,offset%,75,"*" TO ,,,,offset%
 2020IF offset% <> -1 THEN
 2030file$ = FNgetstring(buffer%+20)
 2040filetype$ = MID$(STR$~(!buffer%),4,3)
 2050SYS osfile%,17,where$+"."+file$ TO object%,,load%
 2060type$ = MID$(STR$~load%,4,3)
 2070CASE type$ OF
 2080WHEN "1000" : sprite$ = "directory"
 2090WHEN "2000" : sprite$ = filename$
 2100OTHERWISE
 2110sprite$ = "file_"+type$
 2120ENDCASE
 2130IF FNchecksprite(sprite$) THEN
 2140PROCindirect(handle%,sprite%,sprite$)
 2150ELSE
 2160IF type$ = "2000" THEN
 2170PROCindirect(handle%,sprite%,"application")
 2180ELSE
 2190PROCindirect(handle%,sprite%,"file_xxx")
 2200ENDIF
 2210ENDIF
 2220PROCindirect(handle%,name%,file$+CHR$(0))
 2230CASE object% OF
 2240WHEN 1 : PROCencode(where$+"."+file$,filetype$)
 2250WHEN 2 : PROCdirectory(where$+"."+file$)
 2260ENDCASE
 2270ENDIF
 2280UNTIL offset% = -1 OR NOT flag%
 2290ENDPROC
 2300
 2310
 2320
 2330DEF PROCencode(filepath$,filetype$)
 2340LOCAL error%
 2350error% = FALSE
 2360ON ERROR LOCAL error% = TRUE
 2370IF NOT error% THEN
 2380flag% = FALSE
 2390IF filepath$ = "" THEN PROCmessage("No file selected"):ENDPROC
 2400IF hour% = 1 THEN SYS houron%
 2410SYS control%,28,filepath$ TO ,,count%
 2420SYS slotsize%,slot%+count%+25,-1 TO got%
 2430IF got%<slot%+count% THEN
 2440PROCmessage("Not enough memory available")
 2450ELSE
 2460total%=start%+count%
 2470SYS osfile%,12,filepath$,start%,0
 2480CASE filetype$ OF
 2490WHEN "198":
 2500IF ?(total%-1) = 5 THEN
 2510oldcode$ = ""
 2520sett$ = "FFD"
 2530PROCnewencode(start%,total%-1)
 2540ELSE
 2550oldcode$=""
 2560len% = ?(total%-2) : eor% = 1
 2570FOR loop% = len% TO 1 STEP -1
 2580oldcode$ += CHR$(?(total%-(loop%+2)) EOR (eor% * 5))
 2590eor% += 1
 2600NEXT loop%
 2610sett$ = $(total%-(len%+6))
 2620PROCnewencode(start%,total%-(6+len%))
 2630ENDIF
 2640WHEN "199":
 2650IF ?(total%-1) = 5 THEN
 2660oldfactor% = 0
 2670sett$ = "FFD"
 2680PROColdencode(start%,total%-1)
 2690ELSE
 2700oldfactor% = ?(total%-3)
 2710sett$ = $(total%-7)
 2720PROColdencode(start%,(total%-7))
 2730ENDIF
 2740OTHERWISE
 2750IF format% = 1 THEN
 2760oldcode$ = ""
 2770PROCnewencode(start%,total%)
 2780ELSE
 2790oldfactor% = 0
 2800PROColdencode(start%,total%)
 2810ENDIF
 2820ENDCASE
 2830ENDIF
 2840SYS slotsize%,slot%,-1 TO got%
 2850IF hour% = 1 THEN SYS houroff%
 2860ELSE
 2870PROCmessage(REPORT$)
 2880ENDIF
 2890ENDPROC
 2900
 2910
 2920
 2930DEF PROCerror
 2940SYS "Wimp_DragBox",,-1
 2950!buffer% = ERR
 2960$(buffer%+4)= REPORT$+" At line "+STR$ERL
 2970SYS "Wimp_ReportError",buffer%,3,taskid$ TO ,answer%
 2980IF answer% = 2 THEN SYS"Wimp_CloseDown":END
 2990ENDPROC
 3000
 3010
 3020
 3030DEF PROCgetIconInfo
 3040SYS getI%,,block
 3050flags%=block!24
 3060IF (flags% AND &100)>0 THEN
 3070code$=$block!28
 3080ELSE
 3090code$=$(block+28)
 3100ENDIF
 3110ENDPROC
 3120
 3130
 3140
 3150DEF FNgetstring(block%)
 3160LOCAL result$
 3170WHILE ?block% <> 0
 3180result$+=CHR$?block%
 3190block%+=1
 3200ENDWHILE
 3210=result$
 3220
 3230
 3240
 3250DEF PROChiIcon(block!0,block!4)
 3260block!8=1<<21
 3270block!12=1<<21
 3280SYS setI%,,block
 3290ENDPROC
 3300
 3310
 3320
 3330DEF FNicon(window%,leftx%,bottomy%,rightx%,topy%,flags%,text$,t%,sp%)
 3340REM remember that all coordinates start at top left
 3350REM (i.e. that all y values are zero or less.)
 3360$block = STRING$(36,CHR$(0)):REM clear
 3370block!0 = window%
 3380block!4 = leftx%
 3390block!8 = bottomy%
 3400block!12 = rightx%
 3410block!16 = topy%
 3420block!20 = flags%
 3430IF t% = 0 THEN
 3440$(block+24) = text$
 3450ELSE
 3460DIM block!24 (LENtext$+1)
 3470$(block!24)=text$
 3480CASE t% OF
 3490WHEN 1 : block!28=sp% : REM sprites
 3500WHEN 3 : DIM a% 4 : $a% = "D\-" : block!28 = a% : REM validation
 3510WHEN 4 : DIM a% 16 : $a% = "Soptoff,small_198":block!28=a%
 3520WHEN 5 : DIM a% 16 : $a% = "Soptoff,small_199":block!28=a%
 3530WHEN 6 : DIM a% 16 : $a% = "Soptoff,yes" :block!28=a%
 3540WHEN 7 : DIM a% 16 : $a% = "Soptoff,no" :block!28=a%
 3550WHEN 8 : DIM a% 16 : $a% = "L40" : block!28 = a%
 3560ENDCASE
 3570block!32=LENtext$+1
 3580ENDIF
 3590SYS createI%,,block TO icon%
 3600=icon%
 3610
 3620
 3630
 3640DEF PROCincoming(where%,type%,spec%)
 3650LOCAL ref%
 3660ref% = block!8
 3670IF type% <> &198 AND type% <> &199 AND action% = 5 THEN ENDPROC
 3680type$ = STR$~(type%)
 3690IF spec% THEN
 3700filename$=FNgetstring(block+44)
 3710ELSE
 3720filename$ = command$
 3730ENDIF
 3740IF where% = -2 AND NOT open% THEN
 3750PROCopenup(handle%,enter%)
 3760ENDIF
 3770IF where% = handle% OR where% = -2 THEN
 3780fullpath$ = filename$
 3790REPEAT
 3800position% = INSTR(filename$,".")
 3810IF position% <> 0 THEN
 3820filename$ = MID$(filename$,position%+1)
 3830ENDIF
 3840UNTIL position% = 0
 3850PROCindirect(handle%,name%,filename$+CHR$(0))
 3860$block = STRING$(32,CHR$(0))
 3870CASE type$ OF
 3880WHEN "1000" : sprite$ = "directory"
 3890WHEN "2000" : sprite$ = filename$
 3900OTHERWISE
 3910sprite$ = "file_"+type$
 3920ENDCASE
 3930IF FNchecksprite(sprite$) THEN
 3940PROCindirect(handle%,sprite%,sprite$+CHR$10)
 3950ELSE
 3960IF type$ = "2000" THEN
 3970PROCindirect(handle%,sprite%,"application")
 3980ELSE
 3990PROCindirect(handle%,sprite%,"file_xxx")
 4000ENDIF
 4010ENDIF
 4020SYS caret%,handle%,enter%,,,-1,0
 4030PROCindirect(handle%,enter%,STRING$(20,CHR$0))
 4040IF message% THEN
 4050message% = FALSE
 4060PROCindirect(handle%,text%,text$)
 4070ENDIF
 4080IF spec% THEN
 4090block!0=20
 4100block!12=ref%
 4110block!16=4
 4120SYS send%,reason%,block
 4130ENDIF
 4140ENDIF
 4150ENDPROC
 4160
 4170
 4180
 4190DEF PROCindirect(w%,i%,text$)
 4200block!0 = w%
 4210block!4 = i%
 4220SYS getI%,,block
 4230$block!28 = text$
 4240block!8 = 0
 4250block!12 = 0
 4260SYS setI%,,block
 4270ENDPROC
 4280
 4290
 4300
 4310DEF PROCinitialise
 4320LOCAL task%
 4330taskid$ = "Encode4"
 4340type$=""
 4350DIM task% 4
 4360DIM block 360,menu% 100
 4370DIM sprites% &C00,data% 5
 4380DIM code% 150,string% 21
 4390PROCcompile
 4400$task%="TASK"
 4410SYS "Wimp_Initialise",300,!task%,taskid$ TO ,taskhandle%
 4420SYS "OS_SpriteOp",9+256,sprites%
 4430SYS "OS_SpriteOp",10+256,sprites%,"<Encode4$Dir>.Sprites"
 4440SYS slotsize%,-1,-1 TO slot%
 4450start%=&8000+slot%
 4460open% = TRUE:optopen% = FALSE:message% = FALSE:flag% = TRUE
 4470SYS osfile%,12,"<Encode4$Dir>.Data",data%,0
 4480format% = ?data% : IF format% = 0 THEN format% = 1
 4490hour% = ?(data%+1) : IF hour% = 0 THEN hour% = 1
 4500secure% = ?(data%+2) : IF secure% = 0 THEN secure% = 2
 4510fullpath$ = ""
 4520ENDPROC
 4530
 4540
 4550
 4560DEF PROCkey(w%,i%,key%)
 4570PROCgetIconInfo
 4580IF w% = handle% AND i% = enter% THEN
 4590IF message% THEN
 4600message% = FALSE
 4610PROCindirect(handle%,text%,text$)
 4620ENDIF
 4630IF key% = 13 THEN
 4640PROCindirect(handle%,enter%,STRING$(20,CHR$(0)))
 4650SYS caret%,handle%,enter%,,,-1,0
 4660IF type$ = "2000" OR type$ = "1000" THEN
 4670PROCdirectory(fullpath$)
 4680ELSE
 4690PROCencode(fullpath$,type$)
 4700IF flag% THEN fullpath$ = ""
 4710ENDIF
 4720ENDIF
 4730ENDIF
 4740SYS process%,key%
 4750ENDPROC
 4760
 4770
 4780
 4790DEF PROCmenu(iconbar%)
 4800$menu%="Encoder"
 4810menu%?12=7   :REM title fg colour
 4820menu%?13=2   :REM title bg colour
 4830menu%?14=7   :REM work bg colour
 4840menu%?15=0   :REM work fg colour
 4850menu%!16=8*16:REM width (8 characters * 16 units)
 4860menu%!20=44  :REM height of menu items
 4870menu%!24=0   :REM vertical gap
 4880menu%!28=0        :REM flags
 4890menu%!32=info%    :REM window pointer
 4900menu%!36=&7000021 :REM icon flags
 4910$(menu%+40)="Info":REM icon data
 4920menu%!52=0        :REM flags
 4930menu%!56=-1       :REM window pointer
 4940menu%!60=&7000021 :REM icon flags
 4950$(menu%+64)="Options":REM icon data
 4960menu%!76=&80      :REM flags (&80 means last item)
 4970menu%!80=-1       :REM No submenu
 4980menu%!84=&7000021 :REM icon flags
 4990$(menu%+88)="Quit":REM icon data
 5000CASE iconbar% OF
 5010WHEN 1 : SYS createM%,,menu%,block!0-75,96+(3*44)
 5020WHEN 2 : SYS createM%,,menu%
 5030ENDCASE
 5040ENDPROC
 5050
 5060
 5070
 5080DEF PROCmessage(M$)
 5090SOUND 1,-6,100,5
 5100PROCindirect(handle%,text%,"Error : "+M$)
 5110message% = TRUE
 5120ENDPROC
 5130
 5140
 5150
 5160DEF PROCmess(M$)
 5170!buffer%=ERR:$(buffer%+4)=M$
 5180SYS "Wimp_ReportError",buffer%,3,taskid$ TO ,answer%
 5190IF answer% = 2 THEN quit% = TRUE
 5200ENDPROC
 5210
 5220
 5230
 5240DEF PROCmouse(button%,window%,icon%)
 5250LOCAL temp%
 5260temp% = FALSE
 5270CASE window% OF
 5280WHEN -2
 5290IF (button% AND 2) THEN PROCmenu(1)
 5300IF (button% AND 4) AND icon% = iconbar% THEN
 5310IF open% THEN temp% = TRUE ELSE PROCopenup(handle%,enter%)
 5320ENDIF
 5330WHEN handle%
 5340IF (button% AND 4) OR (button% AND 1) THEN
 5350IF message% THEN
 5360message% = FALSE
 5370PROCindirect(handle%,text%,text$)
 5380ELSE
 5390temp% = TRUE
 5400ENDIF
 5410ENDIF
 5420WHEN option%
 5430IF (button% AND 4) OR (button% AND 1) THEN
 5440IF (button% AND 1) THEN
 5450select% = FALSE
 5460CASE icon% OF
 5470WHEN opt1% : IF format% = 1 THEN select% = TRUE
 5480WHEN opt2% : IF format% = 2 THEN select% = TRUE
 5490WHEN opt3% : IF hour% = 1 THEN select% = TRUE
 5500WHEN opt4% : IF hour% = 2 THEN select% = TRUE
 5510ENDCASE
 5520IF select% THEN PROChiIcon(option%,icon%)
 5530ENDIF
 5540CASE icon% OF
 5550WHEN opt1% : format% = 1
 5560WHEN opt2% : format% = 2
 5570WHEN opt3% : hour% = 1
 5580WHEN opt4% : hour% = 2
 5590WHEN opt5% : IF secure% = 1 THEN secure% = 2 ELSE secure% = 1
 5600ENDCASE
 5610IF icon% = save% THEN
 5620?data% = format%
 5630?(data%+1) = hour%
 5640?(data%+2) = secure%
 5650?(data%+3) = 0
 5660SYS xosfile%,10,"<Encode4$Dir>.Data",&FFF,,data%,data%+4 TO ;flags%
 5670IF flags% = 7 THEN
 5680PROCmess("Error while saving data")
 5690ELSE
 5700PROCclose(option%)
 5710ENDIF
 5720ENDIF
 5730ENDIF
 5740ENDCASE
 5750IF temp% THEN
 5760IF optopen% THEN
 5770PROCclose(option%)
 5780ELSE
 5790PROCopenup(option%,-1)
 5800optopen% = TRUE
 5810ENDIF
 5820ENDIF
 5830ENDPROC
 5840
 5850
 5860
 5870DEF PROCnewencode(begin%,end%)
 5880LOCAL block%,error%
 5890error% = FALSE
 5900block% = begin%
 5910code$ = LEFT$(code$,INSTR(code$,CHR$0)-1)
 5920length% = LENcode$
 5930ON ERROR LOCAL error% = TRUE
 5940IF NOT error% THEN
 5950SYS osbyte%,229,0,0
 5960IF length% = 0 THEN
 5970PROCmessage("Please enter a password")
 5980ELSE
 5990IF oldcode$ = "" THEN oldcode$ = code$
 6000IF code$ <> oldcode$ THEN
 6010PROCmessage("Wrong Password")
 6020ELSE
 6030$string% = code$ + CHR$0
 6040A% = block%
 6050B% = string%
 6060C% = (end%-begin%)
 6070D% = length%
 6080CALL newencode
 6090IF filetype$ <> "198" THEN
 6100IF secure% = 1 THEN
 6110end% += 1
 6120?(end%-1) = 5
 6130ELSE
 6140len% = LENcode$
 6150$end% = filetype$
 6160end% += 3
 6170FOR loop% = 1 TO len%
 6180?(end%+loop%) = ASCMID$(code$,loop%,1) EOR (loop% * 5)
 6190NEXT loop%
 6200end% += len%+1
 6210?end% = len%
 6220?(end%+1) = 4
 6230end% += 2
 6240ENDIF
 6250sett$ = "198"
 6260ENDIF
 6270SYS osfile%,10,filepath$,EVAL("&"+sett$),,begin%,end%
 6280flag% = TRUE
 6290ENDIF
 6300PROCindirect(handle%,sprite%,"encode")
 6310PROCindirect(handle%,name%,"No file")
 6320ENDIF
 6330ELSE
 6340PROCmessage(REPORT$)
 6350ENDIF
 6360SYS osbyte%,229,1,0
 6370SYS osbyte%,124
 6380ENDPROC
 6390
 6400
 6410
 6420DEF PROColdencode(begin%,end%)
 6430LOCAL block%,factor%,error%
 6440error% = FALSE
 6450block% = begin%
 6460ON ERROR LOCAL error% = TRUE
 6470IF NOT error% THEN
 6480SYS osbyte%,229,0,0
 6490CASE LEN(code$) OF
 6500WHEN 1: factor% = ASC(code$)
 6510WHEN 2: factor% = ASC(LEFT$(code$,1)) EOR ASC(RIGHT$(code$,1))
 6520OTHERWISE
 6530factor% = ASC(LEFT$(code$,1)) EOR ASC(MID$(code$,2,1))
 6540FOR loop% = 3 TO LEN(code$)
 6550factor% = factor% EOR ASC(MID$(code$,loop%,1))
 6560NEXT loop%
 6570ENDCASE
 6580IF oldfactor% = 0 THEN oldfactor% = factor%
 6590IF oldfactor% <> factor% THEN
 6600PROCmessage("Wrong Password")
 6610ELSE
 6620A% = block%
 6630B% = factor%
 6640C% = (end%-begin%)
 6650CALL oldencode
 6660IF filetype$ <> "199" THEN
 6670IF secure% = 1 THEN
 6680end% += 1
 6690?(end%-1) = 5
 6700ELSE
 6710end% += 7
 6720$(end%-7) = filetype$
 6730?(end%-3) = factor%
 6740ENDIF
 6750sett$ = "199"
 6760ENDIF
 6770SYS osfile%,10,filepath$,EVAL("&"+sett$),,begin%,end%
 6780flag% = TRUE
 6790PROCindirect(handle%,sprite%,"encode")
 6800PROCindirect(handle%,name%,"No file")
 6810ENDIF
 6820ELSE
 6830PROCmessage(REPORT$)
 6840ENDIF
 6850SYS osbyte%,229,1,0
 6860SYS osbyte%,124
 6870ENDPROC
 6880
 6890
 6900
 6910DEF PROCopen(block)
 6920SYS openW%,,block
 6930ENDPROC
 6940
 6950
 6960
 6970DEF PROCopenup(w%,i%)
 6980block!0 = w%
 6990SYS getW%,,block
 7000SYS openW%,,block
 7010CASE w% OF
 7020WHEN handle% : open% = TRUE
 7030WHEN option% : optopen% = TRUE
 7040ENDCASE
 7050IF i% >= 0 THEN
 7060SYS caret%,w%,i%,,,-1,0
 7070ENDIF
 7080ENDPROC
 7090
 7100
 7110
 7120DEF PROCreceive
 7130action% = block!16
 7140CASE action% OF
 7150WHEN 0 : quit% = TRUE
 7160WHEN 3 : PROCincoming(block!20,block!40,TRUE)
 7170WHEN 5 : PROCincoming(-2,block!40,TRUE)
 7180ENDCASE
 7190ENDPROC
 7200
 7210
 7220
 7230DEF PROCswinumbers
 7240caret%   = &400D2
 7250close%   = &400DD
 7260closeW%  = &400C6
 7270createI% = &400C2
 7280createM% = &400D4
 7290createW% = &400C1
 7300decodeM% = &400D5
 7310osbyte%  = &00006
 7320osfile%  = &00008
 7330control% = &00029
 7340getenv%  = &00010
 7350getI%    = &400CE
 7360getW%    = &400CB
 7370gbpb%    = &0000C
 7380openW%   = &400C5
 7390poll%    = &400C7
 7400pointer% = &400CF
 7410process% = &400DC
 7420send%    = &400E7
 7430setI%    = &400CD
 7440slotsize%= &400EC
 7450spriteop%= &400E9
 7460xosfile% = &20008
 7470houron%  = &406C0
 7480houroff% = &406C1
 7490ENDPROC
 7500
 7510
 7520
 7530DEF PROCviruscheck
 7540DATA !Boot,263,!Help,2336,!Run,289,!Runimage,18703
 7550DATA !Sprites,2612,Data,4,Sprites,2868
 7560number% = 7
 7570DIM file$(number%+1),size%(number%),found%(number%)
 7580FOR loop% = 1 TO number%
 7590READ file$(loop%),size%(loop%)
 7600NEXT loop%
 7610where% = 1:offset% = 0
 7620path$ = "<Encode4$Dir>"
 7630REPEAT
 7640SYS gbpb%,10,path$,buffer%,1,offset%,50,"*" TO ,,,,offset%
 7650IF offset% <> -1 THEN
 7660a$ = FNgetstring(buffer%+20)
 7670where% = 0
 7680REPEAT
 7690where% += 1
 7700UNTIL a$ = file$(where%) OR where% = number%+1
 7710IF a$ = file$(where%) THEN
 7720found%(where%) = 1
 7730SYS osfile%,17,path$+"."+file$(where%) TO object%,,,,length%
 7740IF length% <> size%(where%) THEN
 7750PROCmess("File '"+a$+"' has been altered.")
 7760ENDIF
 7770ENDIF
 7780IF where% = number%+1 THEN PROCmess("Unknown file '"+a$+"' found.")
 7790ENDIF
 7800UNTIL offset% = -1
 7810FOR loop% = 1 TO number%
 7820IF found%(loop%) <> 1 THEN
 7830PROCmess("File '"+file$(loop%)+"' is missing.")
 7840ENDIF
 7850NEXT loop%
 7860ENDPROC
 7870
 7880
 7890
 7900DEF FNwindow(x1%,y1%,x2%,y2%,h%,w%,tf%,tb%,wf%,wb%,so%,si%,if%,title$)
 7910$block = STRING$(90,CHR$(0)):REM clear
 7920block!0 = x1%  : REM visible min x coordinate
 7930block!4 = y1%  : REM visible min y coordinate
 7940block!8 = x2%  : REM visible max x coordinate
 7950block!12 = y2% : REM visible max y coordinate
 7960block!24 = h%  : REM handle to open window behind(-1=top,-2=bottom)
 7970block!28 = w%  : REM window flags
 7980block!32 = tf% : REM title foreground
 7990block!33 = tb% : REM title background
 8000block!34 = wf% : REM work foreground
 8010block!35 = wb% : REM work background
 8020block!36 = so% : REM scroll outer
 8030block!37 = si% : REM scroll inner
 8040block!38 = if% : REM input focus
 8050block!39 = 0   : REM must be zero
 8060block!40 = 0   : REM work area min x
 8070block!44 = (y1%-y2%):REM work area min y
 8080block!48 = (x2%-x1%):REM work area max x
 8090block!52 = 0   : REM work area max y
 8100block!56 = &3D : REM title bar flags
 8110block!60 = &3000
 8120IF title$ = "Options" THEN block!64 = sprites%
 8130$(block+72) = title$ : REM title data
 8140block!84 = 0   : REM initial number of icons
 8150SYS createW%,,block TO window%
 8160=window%

� > <Encode4$Dir>.!Runimage
%� (c) Archimedes World March 1992

� buffer% 75
(� � �error
2
quit% = �
<�swinumbers
Fș houron%
P�initialise
Z�create
d�viruscheck
n
�check
xș houroff%
�� � �error
��
�ș poll%,1,block � reason%
�Ȏ reason% �
�� 1 : �redraw
�� 2 : �open(block)
�� 3 : �close(block!0)
�+� 6 : �mouse(block!8,block!12,block!16)
�(� 8 : �key(block!0,block!4,block!24)
�� 9 : �decode_menu
�� 17,18 : �receive
��
�� quit%

ș close%
�

"
,
6� �check
@ș getenv% � command$
J
� old%
T�
^pos% = �command$,"""",old%)
h� pos% <> 0 � old% = pos%+1
r� pos% = 0
|command$ = �command$,old%)
�ȕ �command$,1) = " "
�command$ = �command$,2)
��
�� command$ <> "" �
�$ș osfile%,17,command$ � ,,load%
�type$ = ��~load%,4,3)
�� type$ <> "" �
�action% = 10
� �incoming(-2,�("&"+type$),�)
��
��
��
�


� �checksprite(find$)
&� found%
0found% = �
:*ș spriteop%+&20000,24,,find$ � ;flags
D� flags = 6 � found% = �
N=found%
X
b
l
v� �close(w%)
�block!0 = w%
�ș closeW%,,block
�Ȏ w% �
�8� handle% : open% = � : � optopen% � �close(option%)
�� option% : optopen% = �
��
��
�
�
�
�� �compile
�P% = code% : count = 6
�%work = 7 : factor = 8 : index = 9
[ OPT 2
.newencode
MOV count,#0 ; count = 0
 (MOV index,#0 ; index into string = 0
*.protection
4BLDRB factor,[R1,index] ; factor = ascii of index pos in string
>4ADD index,index,#1     ; add one to string index
HC� factor,factor,index; Exclusive � factor by position in string
R2SUB index,index,#1     ; Subtract 1 from index
\1STRB factor,[R1,index] ; Store back in memory
f4ADD index,index,#1     ; add one to string index
p6CMP index,R3           ; compare index with length
z.BLT protection         ; if less then jump
�
.loop1
�MOV index,#0
�.inner    
�BLDRB factor,[R1,index] ; factor = ascii of index pos in string
�0LDRB work,[R0,count]   ; byte = block + loop
�5� work,work,factor   ; exclusive � byte by factor
�8STRB work,[R0,count]   ; place byte back into memory
�4ADD index,index,#1     ; add one to string index
�8ADD count,count,#1     ; add one to position counter
�1CMP index,R3           ; see if end of string
�2BLT inner              ; in not, jump to start
�4CMP count,R2           ; compare to size of file
�=BLE loop1              ; if less than, then jump to start
-MOV PC,R14             ; return to basic?
.oldencode
MOV count,#0
$
.loop2
.6ADD count,count,#3     ; add 3 to initial position
8'LDRB index,[R0,count]  ; load index
B.SUB index,index,#4     ; decrement counter
L
.loop3
V+ADD count,count,#1     ; add 1 to count
`+SUB index,index,#1     ; add 1 to index
j@LDRB work,[R0,count]   ; load byte from block+loop in memory
t0� work,work,R1       ; exclusive � by factor
~7STRB work,[R0,count]   ; save byte back into memory
�CMP index,#0
�
BGT loop3
�6CMP count,R2           ; compare to length of file
�7BLE loop2              ; if less jump back to start
�-MOV PC,R14             ; return to basic?
�
]        
��
�
�
�
�
� �create
�Ihandle%=�window(100,200,532,584,-1,&87000052,7,14,7,1,3,1,14,taskid$)
Qinfo% = �window(400,100,1020,360,-1,&84000012,7,14,7,1,3,1,14,"Program Info")

Loption%=�window(800,400,1150,784,-1,&87000052,7,14,7,1,3,1,14,"Options")
?text$ = "Drag file to box or icon on iconbar to encode it."
=text% = �icon(handle%,10,-125,400,-20,&7013111,text$,8,1)
(Ipicture% = �icon(handle%,50,-220,210,-150,&3102,"picture",1,sprites%)
2Kpassword% = �icon(handle%,10,-300,210,-250,&7012001,"Password for",0,1)
<Esprite% = �icon(handle%,250,-240,350,-140,&1E02313E,"encode",1,1)
FDname% = �icon(handle%,219,-300,390,-250,&17183139,"No file",2,1)
PBenter%= �icon(handle%,50,-363,382,-312,&704F125,�20,�(0)),3,1)
Zflag% = &17010211
d8info1%= �icon(info%,10,-50,180,-4,flag%,"Name:",0,1)
n=info2%= �icon(info%,10,-100,180,-54,flag%,"Purpose:",0,1)
x=info3%= �icon(info%,10,-150,180,-104,flag%,"Author:",0,1)
�>info4%= �icon(info%,10,-200,180,-154,flag%,"Version:",0,1)
�@info5%= �icon(info%,10,-250,180,-204,flag%,"Copyright:",0,1)
�flag% = &702013D
�9info5%= �icon(info%,180,-50,610,-4,flag%,taskid$,2,1)
�Dinfo6%= �icon(info%,180,-100,610,-54,flag%,"Encrypts Files",2,1)
�Einfo7%= �icon(info%,180,-150,610,-104,flag%,"Timothy Kimber",2,1)
�Ninfo8%= �icon(info%,180,-200,610,-154,flag%,"4.50 (21 December 1991)",2,1)
�Ginfo9%= �icon(info%,180,-250,610,-204,flag%,"Archimedes World",2,1)
�Lopt1% = �icon(option%,30,-60,300,-10,&1503B133," New Format",4,sprites%)
�Mopt2% = �icon(option%,30,-120,300,-70,&1503B133," Old Format",5,sprites%)
�Popt3% = �icon(option%,30,-180,300,-130,&1504B133," Hourglass On",6,sprites%)
�Qopt4% = �icon(option%,30,-240,300,-190,&1504B133," Hourglass Off",7,sprites%)
�Popt5% = �icon(option%,30,-300,300,-250,&1500B133," Extra Secure",6,sprites%)
Asave% = �icon(option%,230,-360,320,-310,&0708903D,"Save",0,1)
6iconbar%= �icon(-1,0,0,63,68,&3102,"!encode4",1,1)
�openup(handle%,enter%)
"� format% = 1 �
,�hiIcon(option%,opt1%)
6�
@�hiIcon(option%,opt2%)
J�
T� hour% = 1 �
^�hiIcon(option%,opt3%)
h�
r�hiIcon(option%,opt4%)
|�
�*� secure% = 1 � �hiIcon(option%,opt5%)
��
�
�
�
�� �decode_menu
�� selected$,x%,y%,open%
�
open% = �
�5ș decodeM%,,menu%,block,�200," ") � ,,,selected$
�ș pointer%,,block
�Ȏ selected$ �
�� "Info"
�x% = block!0
y% = block!4
ș createM%,,info%,x%,y%

open% = �
&� "Options"
0� optopen% �
:�close(option%)
D�
N�openup(option%,-1)
X�
b� "Quit" : quit%=�
l�
v� block!8 = 1 � open% �
��menu(2)
��
��
�
�
�
�� �directory(where$)
�� offset%,file$,filetype$
��
�=ș gbpb%,10,where$,buffer%,1,offset%,75,"*" � ,,,,offset%
�� offset% <> -1 �
�"file$ = �getstring(buffer%+20)
�"filetype$ = ��~(!buffer%),4,3)
3ș osfile%,17,where$+"."+file$ � object%,,load%
type$ = ��~load%,4,3)
Ȏ type$ �
 $� "1000" : sprite$ = "directory"
*"� "2000" : sprite$ = filename$
4
>sprite$ = "file_"+type$
H�
R� �checksprite(sprite$) �
\&�indirect(handle%,sprite%,sprite$)
f�
p� type$ = "2000" �
z,�indirect(handle%,sprite%,"application")
��
�)�indirect(handle%,sprite%,"file_xxx")
��
��
�'�indirect(handle%,name%,file$+�(0))
�Ȏ object% �
�-� 1 : �encode(where$+"."+file$,filetype$)
�&� 2 : �directory(where$+"."+file$)
��
��
�� offset% = -1 � � flag%
��
�
	
	
	"� �encode(filepath$,filetype$)
	$� error%
	.error% = �
	8� � � error% = �
	B� � error% �
	L
flag% = �
	V5� filepath$ = "" � �message("No file selected"):�
	`� hour% = 1 � ș houron%
	j'ș control%,28,filepath$ � ,,count%
	t*ș slotsize%,slot%+count%+25,-1 � got%
	~� got%<slot%+count% �
	�+�message("Not enough memory available")
	��
	�total%=start%+count%
	�$ș osfile%,12,filepath$,start%,0
	�Ȏ filetype$ �
	�� "198":
	�� ?(total%-1) = 5 �
	�oldcode$ = ""
	�sett$ = "FFD"
	��newencode(start%,total%-1)
	��
	�oldcode$=""
!len% = ?(total%-2) : eor% = 1

� loop% = len% � 1 � -1
3oldcode$ += �(?(total%-(loop%+2)) � (eor% * 5))

eor% += 1
(� loop%
2sett$ = $(total%-(len%+6))
<&�newencode(start%,total%-(6+len%))
F�
P� "199":
Z� ?(total%-1) = 5 �
doldfactor% = 0
nsett$ = "FFD"
x�oldencode(start%,total%-1)
��
�oldfactor% = ?(total%-3)
�sett$ = $(total%-7)
�!�oldencode(start%,(total%-7))
��
�
�� format% = 1 �
�oldcode$ = ""
��newencode(start%,total%)
��
�oldfactor% = 0
��oldencode(start%,total%)
��
�
�
 ș slotsize%,slot%,-1 � got%
"� hour% = 1 � ș houroff%
,�
6�message(�$)
@�
J�
T
^
h
r� �error
|ș "Wimp_DragBox",,-1
�!buffer% = �
�#$(buffer%+4)= �$+" At line "+Þ
�6ș "Wimp_ReportError",buffer%,3,taskid$ � ,answer%
�(� answer% = 2 � ș"Wimp_CloseDown":�
��
�
�
�
�� �getIconInfo
�ș getI%,,block
�flags%=block!24
�� (flags% � &100)>0 �
�code$=$block!28
�
code$=$(block+28)
�
&�
0
:
D
N� �getstring(block%)
X
� result$
bȕ ?block% <> 0
lresult$+=�?block%
v
block%+=1
��
�=result$
�
�
�
�� �hiIcon(block!0,block!4)
�block!8=1<<21
�block!12=1<<21
�ș setI%,,block
��
�
�
�

F� �icon(window%,leftx%,bottomy%,rightx%,topy%,flags%,text$,t%,sp%)

5� remember that all coordinates start at top left

0� (i.e. that all y values are zero or less.)

 $block = �36,�(0)):� clear

*block!0 = window%

4block!4 = leftx%

>block!8 = bottomy%

Hblock!12 = rightx%

Rblock!16 = topy%

\block!20 = flags%

f� t% = 0 �

p$(block+24) = text$

z�

�� block!24 (�text$+1)

�$(block!24)=text$

�Ȏ t% �

�"� 1 : block!28=sp% : � sprites

�=� 3 : � a% 4 : $a% = "D\-" : block!28 = a% : � validation

�9� 4 : � a% 16 : $a% = "Soptoff,small_198":block!28=a%

�9� 5 : � a% 16 : $a% = "Soptoff,small_199":block!28=a%

�4� 6 : � a% 16 : $a% = "Soptoff,yes" :block!28=a%

�3� 7 : � a% 16 : $a% = "Soptoff,no" :block!28=a%

�/� 8 : � a% 16 : $a% = "L40" : block!28 = a%

��

�block!32=�text$+1

��
ș createI%,,block � icon%

=icon%

$
.
8#� �incoming(where%,type%,spec%)
B
� ref%
Lref% = block!8
V5� type% <> &198 � type% <> &199 � action% = 5 � �
`type$ = �~(type%)
j
� spec% �
t"filename$=�getstring(block+44)
~�
�filename$ = command$
��
�� where% = -2 � � open% �
��openup(handle%,enter%)
��
�&� where% = handle% � where% = -2 �
�fullpath$ = filename$
��
�position% = �filename$,".")
�� position% <> 0 �
�'filename$ = �filename$,position%+1)
��
� position% = 0

+�indirect(handle%,name%,filename$+�(0))
$block = �32,�(0))
Ȏ type$ �
($� "1000" : sprite$ = "directory"
2"� "2000" : sprite$ = filename$
<
Fsprite$ = "file_"+type$
P�
Z� �checksprite(sprite$) �
d*�indirect(handle%,sprite%,sprite$+�10)
n�
x� type$ = "2000" �
�,�indirect(handle%,sprite%,"application")
��
�)�indirect(handle%,sprite%,"file_xxx")
��
��
�#ș caret%,handle%,enter%,,,-1,0
�%�indirect(handle%,enter%,�20,�0))
�� message% �
�message% = �
�"�indirect(handle%,text%,text$)
��
�
� spec% �
�block!0=20
block!12=ref%
block!16=4
ș send%,reason%,block
"�
,�
6�
@
J
T
^� �indirect(w%,i%,text$)
hblock!0 = w%
rblock!4 = i%
|ș getI%,,block
�$block!28 = text$
�block!8 = 0
�block!12 = 0
�ș setI%,,block
��
�
�
�
�� �initialise
�� task%
�taskid$ = "Encode4"
�type$=""
�
� task% 4
� block 360,menu% 100
� sprites% &C00,data% 5
� code% 150,string% 21
&�compile
0$task%="TASK"
::ș "Wimp_Initialise",300,!task%,taskid$ � ,taskhandle%
D#ș "OS_SpriteOp",9+256,sprites%
N<ș "OS_SpriteOp",10+256,sprites%,"<Encode4$Dir>.Sprites"
Xș slotsize%,-1,-1 � slot%
bstart%=&8000+slot%
l1open% = �:optopen% = �:message% = �:flag% = �
v.ș osfile%,12,"<Encode4$Dir>.Data",data%,0
�2format% = ?data% : � format% = 0 � format% = 1
�0hour% = ?(data%+1) : � hour% = 0 � hour% = 1
�6secure% = ?(data%+2) : � secure% = 0 � secure% = 2
�fullpath$ = ""
��
�
�
�
�� �key(w%,i%,key%)
��getIconInfo
�"� w% = handle% � i% = enter% �
�� message% �
�message% = �
"�indirect(handle%,text%,text$)
�
� key% = 13 �
 '�indirect(handle%,enter%,�20,�(0)))
*#ș caret%,handle%,enter%,,,-1,0
4'� type$ = "2000" � type$ = "1000" �
>�directory(fullpath$)
H�
R�encode(fullpath$,type$)
\� flag% � fullpath$ = ""
f�
p�
z�
�ș process%,key%
��
�
�
�
�� �menu(iconbar%)
�$menu%="Encoder"
�#menu%?12=7   :� title fg colour
�#menu%?13=2   :� title bg colour
�"menu%?14=7   :� work bg colour
�"menu%?15=0   :� work fg colour
�3menu%!16=8*16:� width (8 characters * 16 units)
�(menu%!20=44  :� height of menu items
 menu%!24=0   :� vertical gap
menu%!28=0        :� flags
'menu%!32=info%    :� window pointer
$#menu%!36=&7000021 :� icon flags
."$(menu%+40)="Info":� icon data
8menu%!52=0        :� flags
B'menu%!56=-1       :� window pointer
L#menu%!60=&7000021 :� icon flags
V%$(menu%+64)="Options":� icon data
`4menu%!76=&80      :� flags (&80 means last item)
j#menu%!80=-1       :� No submenu
t#menu%!84=&7000021 :� icon flags
~"$(menu%+88)="Quit":� icon data
�Ȏ iconbar% �
�1� 1 : ș createM%,,menu%,block!0-75,96+(3*44)
�� 2 : ș createM%,,menu%
��
��
�
�
�
�� �message(M$)
�� 1,-6,100,5
�*�indirect(handle%,text%,"Error : "+M$)
�message% = �
�




(� �mess(M$)
2!buffer%=�:$(buffer%+4)=M$
<6ș "Wimp_ReportError",buffer%,3,taskid$ � ,answer%
F� answer% = 2 � quit% = �
P�
Z
d
n
x#� �mouse(button%,window%,icon%)
�� temp%
�
temp% = �
�Ȏ window% �
�� -2
�� (button% � 2) � �menu(1)
�(� (button% � 4) � icon% = iconbar% �
�1� open% � temp% = � � �openup(handle%,enter%)
��
�
� handle%
�%� (button% � 4) � (button% � 1) �
�� message% �
�message% = �
�"�indirect(handle%,text%,text$)
�

temp% = �
�
"�
,
� option%
6%� (button% � 4) � (button% � 1) �
@� (button% � 1) �
Jselect% = �
TȎ icon% �
^)� opt1% : � format% = 1 � select% = �
h)� opt2% : � format% = 2 � select% = �
r'� opt3% : � hour% = 1 � select% = �
|'� opt4% : � hour% = 2 � select% = �
��
�&� select% � �hiIcon(option%,icon%)
��
�Ȏ icon% �
�� opt1% : format% = 1
�� opt2% : format% = 2
�� opt3% : hour% = 1
�� opt4% : hour% = 2
�7� opt5% : � secure% = 1 � secure% = 2 � secure% = 1
��
�� icon% = save% �
�?data% = format%
�?(data%+1) = hour%
?(data%+2) = secure%
?(data%+3) = 0
Eș xosfile%,10,"<Encode4$Dir>.Data",&FFF,,data%,data%+4 � ;flags%
&� flags% = 7 �
0$�mess("Error while saving data")
:�
D�close(option%)
N�
X�
b�
l�
v
� temp% �
�� optopen% �
��close(option%)
��
��openup(option%,-1)
�optopen% = �
��
��
��
�
�
�
�� �newencode(begin%,end%)
�� block%,error%
error% = �
block% = begin%
 code$ = �code$,�code$,�0)-1)
 length% = �code$
*� � � error% = �
4� � error% �
>ș osbyte%,229,0,0
H� length% = 0 �
R'�message("Please enter a password")
\�
f&� oldcode$ = "" � oldcode$ = code$
p� code$ <> oldcode$ �
z�message("Wrong Password")
��
�$string% = code$ + �0
�A% = block%
�B% = string%
�C% = (end%-begin%)
�D% = length%
�� newencode
�� filetype$ <> "198" �
�� secure% = 1 �
�
end% += 1
�?(end%-1) = 5
��
�len% = �code$
$end% = filetype$

end% += 3
� loop% = 1 � len%
$2?(end%+loop%) = ��code$,loop%,1) � (loop% * 5)
.� loop%
8end% += len%+1
B?end% = len%
L?(end%+1) = 4
V
end% += 2
`�
jsett$ = "198"
t�
~5ș osfile%,10,filepath$,�("&"+sett$),,begin%,end%
�
flag% = �
��
�'�indirect(handle%,sprite%,"encode")
�&�indirect(handle%,name%,"No file")
��
��
��message(�$)
��
�ș osbyte%,229,1,0
�ș osbyte%,124
��
�



� �oldencode(begin%,end%)
� block%,factor%,error%
(error% = �
2block% = begin%
<� � � error% = �
F� � error% �
Pș osbyte%,229,0,0
ZȎ �(code$) �
d� 1: factor% = �(code$)
n.� 2: factor% = �(�code$,1)) � �(�code$,1))
x
�+factor% = �(�code$,1)) � �(�code$,2,1))
�� loop% = 3 � �(code$)
�*factor% = factor% � �(�code$,loop%,1))
�� loop%
��
�+� oldfactor% = 0 � oldfactor% = factor%
�� oldfactor% <> factor% �
��message("Wrong Password")
��
�A% = block%
�B% = factor%
�C% = (end%-begin%)
�� oldencode
� filetype$ <> "199" �
� secure% = 1 �

end% += 1
"?(end%-1) = 5
,�
6
end% += 7
@$(end%-7) = filetype$
J?(end%-3) = factor%
T�
^sett$ = "199"
h�
r5ș osfile%,10,filepath$,�("&"+sett$),,begin%,end%
|
flag% = �
�'�indirect(handle%,sprite%,"encode")
�&�indirect(handle%,name%,"No file")
��
��
��message(�$)
��
�ș osbyte%,229,1,0
�ș osbyte%,124
��
�
�
�
�� �open(block)
ș openW%,,block
�

&
0
:� �openup(w%,i%)
Dblock!0 = w%
Nș getW%,,block
Xș openW%,,block
bȎ w% �
l� handle% : open% = �
v� option% : optopen% = �
��
�� i% >= 0 �
�ș caret%,w%,i%,,,-1,0
��
��
�
�
�
�� �receive
�action% = block!16
�Ȏ action% �
�� 0 : quit% = �
�(� 3 : �incoming(block!20,block!40,�)
"� 5 : �incoming(-2,block!40,�)
�
�
 
*
4
>� �swinumbers
Hcaret%   = &400D2
Rclose%   = &400DD
\closeW%  = &400C6
fcreateI% = &400C2
pcreateM% = &400D4
zcreateW% = &400C1
�decodeM% = &400D5
�osbyte%  = &00006
�osfile%  = &00008
�control% = &00029
�getenv%  = &00010
�getI%    = &400CE
�getW%    = &400CB
�gbpb%    = &0000C
�openW%   = &400C5
�poll%    = &400C7
�pointer% = &400CF
�process% = &400DC
�send%    = &400E7
setI%    = &400CD
slotsize%= &400EC
spriteop%= &400E9
$xosfile% = &20008
.houron%  = &406C0
8houroff% = &406C1
B�
L
V
`
j� �viruscheck
t3� !Boot,263,!Help,2336,!Run,289,!Runimage,18703
~'� !Sprites,2612,Data,4,Sprites,2868
�number% = 7
�5� file$(number%+1),size%(number%),found%(number%)
�� loop% = 1 � number%
�� file$(loop%),size%(loop%)
�� loop%
�where% = 1:offset% = 0
�path$ = "<Encode4$Dir>"
��
�<ș gbpb%,10,path$,buffer%,1,offset%,50,"*" � ,,,,offset%
�� offset% <> -1 �
�a$ = �getstring(buffer%+20)
�where% = 0
�

where% += 1
-� a$ = file$(where%) � where% = number%+1
� a$ = file$(where%) �
(found%(where%) = 1
2>ș osfile%,17,path$+"."+file$(where%) � object%,,,,length%
< � length% <> size%(where%) �
F,�mess("File '"+a$+"' has been altered.")
P�
Z�
d@� where% = number%+1 � �mess("Unknown file '"+a$+"' found.")
n�
x� offset% = -1
�� loop% = 1 � number%
�� found%(loop%) <> 1 �
�0�mess("File '"+file$(loop%)+"' is missing.")
��
�� loop%
��
�
�
�
�G� �window(x1%,y1%,x2%,y2%,h%,w%,tf%,tb%,wf%,wb%,so%,si%,if%,title$)
�$block = �90,�(0)):� clear
�/block!0 = x1%  : � visible min x coordinate
�/block!4 = y1%  : � visible min y coordinate
/block!8 = x2%  : � visible max x coordinate
/block!12 = y2% : � visible max y coordinate
Eblock!24 = h%  : � handle to open window behind(-1=top,-2=bottom)
"#block!28 = w%  : � window flags
,'block!32 = tf% : � title foreground
6'block!33 = tb% : � title background
@&block!34 = wf% : � work foreground
J&block!35 = wb% : � work background
T#block!36 = so% : � scroll outer
^#block!37 = si% : � scroll inner
h"block!38 = if% : � input focus
r#block!39 = 0   : � must be zero
|&block!40 = 0   : � work area min x
�*block!44 = (y1%-y2%):� work area min y
�*block!48 = (x2%-x1%):� work area max x
�&block!52 = 0   : � work area max y
�&block!56 = &3D : � title bar flags
�block!60 = &3000
�.� title$ = "Options" � block!64 = sprites%
�'$(block+72) = title$ : � title data
�.block!84 = 0   : � initial number of icons
� ș createW%,,block � window%
�=window%
�
00000000  0d 00 0a 1f f4 20 3e 20  3c 45 6e 63 6f 64 65 34  |..... > <Encode4|
00000010  24 44 69 72 3e 2e 21 52  75 6e 69 6d 61 67 65 0d  |$Dir>.!Runimage.|
00000020  00 0f 25 f4 20 28 63 29  20 41 72 63 68 69 6d 65  |..%. (c) Archime|
00000030  64 65 73 20 57 6f 72 6c  64 20 4d 61 72 63 68 20  |des World March |
00000040  31 39 39 32 0d 00 14 04  0d 00 1e 10 de 20 62 75  |1992......... bu|
00000050  66 66 65 72 25 20 37 35  0d 00 28 0e ee 20 85 20  |ffer% 75..(.. . |
00000060  f2 65 72 72 6f 72 0d 00  32 0d 71 75 69 74 25 20  |.error..2.quit% |
00000070  3d 20 a3 0d 00 3c 0f f2  73 77 69 6e 75 6d 62 65  |= ...<..swinumbe|
00000080  72 73 0d 00 46 0e c8 99  20 68 6f 75 72 6f 6e 25  |rs..F... houron%|
00000090  0d 00 50 0f f2 69 6e 69  74 69 61 6c 69 73 65 0d  |..P..initialise.|
000000a0  00 5a 0b f2 63 72 65 61  74 65 0d 00 64 0f f2 76  |.Z..create..d..v|
000000b0  69 72 75 73 63 68 65 63  6b 0d 00 6e 0a f2 63 68  |iruscheck..n..ch|
000000c0  65 63 6b 0d 00 78 0f c8  99 20 68 6f 75 72 6f 66  |eck..x... hourof|
000000d0  66 25 0d 00 82 0e ee 20  85 20 f2 65 72 72 6f 72  |f%..... . .error|
000000e0  0d 00 8c 05 f5 0d 00 96  1e c8 99 20 70 6f 6c 6c  |........... poll|
000000f0  25 2c 31 2c 62 6c 6f 63  6b 20 b8 20 72 65 61 73  |%,1,block . reas|
00000100  6f 6e 25 0d 00 a0 10 c8  8e 20 72 65 61 73 6f 6e  |on%...... reason|
00000110  25 20 ca 0d 00 aa 11 c9  20 31 20 3a 20 f2 72 65  |% ...... 1 : .re|
00000120  64 72 61 77 0d 00 b4 16  c9 20 32 20 3a 20 f2 6f  |draw..... 2 : .o|
00000130  70 65 6e 28 62 6c 6f 63  6b 29 0d 00 be 19 c9 20  |pen(block)..... |
00000140  33 20 3a 20 f2 63 6c 6f  73 65 28 62 6c 6f 63 6b  |3 : .close(block|
00000150  21 30 29 0d 00 c8 2b c9  20 36 20 3a 20 f2 6d 6f  |!0)...+. 6 : .mo|
00000160  75 73 65 28 62 6c 6f 63  6b 21 38 2c 62 6c 6f 63  |use(block!8,bloc|
00000170  6b 21 31 32 2c 62 6c 6f  63 6b 21 31 36 29 0d 00  |k!12,block!16)..|
00000180  d2 28 c9 20 38 20 3a 20  f2 6b 65 79 28 62 6c 6f  |.(. 8 : .key(blo|
00000190  63 6b 21 30 2c 62 6c 6f  63 6b 21 34 2c 62 6c 6f  |ck!0,block!4,blo|
000001a0  63 6b 21 32 34 29 0d 00  dc 16 c9 20 39 20 3a 20  |ck!24)..... 9 : |
000001b0  f2 64 65 63 6f 64 65 5f  6d 65 6e 75 0d 00 e6 16  |.decode_menu....|
000001c0  c9 20 31 37 2c 31 38 20  3a 20 f2 72 65 63 65 69  |. 17,18 : .recei|
000001d0  76 65 0d 00 f0 05 cb 0d  00 fa 0b fd 20 71 75 69  |ve.......... qui|
000001e0  74 25 0d 01 04 0d c8 99  20 63 6c 6f 73 65 25 0d  |t%...... close%.|
000001f0  01 0e 05 e0 0d 01 18 04  0d 01 22 04 0d 01 2c 04  |.........."...,.|
00000200  0d 01 36 0c dd 20 f2 63  68 65 63 6b 0d 01 40 19  |..6.. .check..@.|
00000210  c8 99 20 67 65 74 65 6e  76 25 20 b8 20 63 6f 6d  |.. getenv% . com|
00000220  6d 61 6e 64 24 0d 01 4a  0a ea 20 6f 6c 64 25 0d  |mand$..J.. old%.|
00000230  01 54 05 f5 0d 01 5e 1f  70 6f 73 25 20 3d 20 a7  |.T....^.pos% = .|
00000240  63 6f 6d 6d 61 6e 64 24  2c 22 22 22 22 2c 6f 6c  |command$,"""",ol|
00000250  64 25 29 0d 01 68 1f e7  20 70 6f 73 25 20 3c 3e  |d%)..h.. pos% <>|
00000260  20 30 20 8c 20 6f 6c 64  25 20 3d 20 70 6f 73 25  | 0 . old% = pos%|
00000270  2b 31 0d 01 72 0e fd 20  70 6f 73 25 20 3d 20 30  |+1..r.. pos% = 0|
00000280  0d 01 7c 1e 63 6f 6d 6d  61 6e 64 24 20 3d 20 c1  |..|.command$ = .|
00000290  63 6f 6d 6d 61 6e 64 24  2c 6f 6c 64 25 29 0d 01  |command$,old%)..|
000002a0  86 19 c8 95 20 c0 63 6f  6d 6d 61 6e 64 24 2c 31  |.... .command$,1|
000002b0  29 20 3d 20 22 20 22 0d  01 90 1b 63 6f 6d 6d 61  |) = " "....comma|
000002c0  6e 64 24 20 3d 20 c1 63  6f 6d 6d 61 6e 64 24 2c  |nd$ = .command$,|
000002d0  32 29 0d 01 9a 05 ce 0d  01 a4 16 e7 20 63 6f 6d  |2).......... com|
000002e0  6d 61 6e 64 24 20 3c 3e  20 22 22 20 8c 0d 01 ae  |mand$ <> "" ....|
000002f0  24 c8 99 20 6f 73 66 69  6c 65 25 2c 31 37 2c 63  |$.. osfile%,17,c|
00000300  6f 6d 6d 61 6e 64 24 20  b8 20 2c 2c 6c 6f 61 64  |ommand$ . ,,load|
00000310  25 0d 01 b8 19 74 79 70  65 24 20 3d 20 c1 c3 7e  |%....type$ = ..~|
00000320  6c 6f 61 64 25 2c 34 2c  33 29 0d 01 c2 13 e7 20  |load%,4,3)..... |
00000330  74 79 70 65 24 20 3c 3e  20 22 22 20 8c 0d 01 cc  |type$ <> "" ....|
00000340  10 61 63 74 69 6f 6e 25  20 3d 20 31 30 0d 01 d6  |.action% = 10...|
00000350  20 f2 69 6e 63 6f 6d 69  6e 67 28 2d 32 2c a0 28  | .incoming(-2,.(|
00000360  22 26 22 2b 74 79 70 65  24 29 2c a3 29 0d 01 e0  |"&"+type$),.)...|
00000370  05 cd 0d 01 ea 05 cd 0d  01 f4 05 e1 0d 01 fe 04  |................|
00000380  0d 02 08 04 0d 02 12 04  0d 02 1c 19 dd 20 a4 63  |............. .c|
00000390  68 65 63 6b 73 70 72 69  74 65 28 66 69 6e 64 24  |hecksprite(find$|
000003a0  29 0d 02 26 0c ea 20 66  6f 75 6e 64 25 0d 02 30  |)..&.. found%..0|
000003b0  0e 66 6f 75 6e 64 25 20  3d 20 a3 0d 02 3a 2a c8  |.found% = ...:*.|
000003c0  99 20 73 70 72 69 74 65  6f 70 25 2b 26 32 30 30  |. spriteop%+&200|
000003d0  30 30 2c 32 34 2c 2c 66  69 6e 64 24 20 b8 20 3b  |00,24,,find$ . ;|
000003e0  66 6c 61 67 73 0d 02 44  1c e7 20 66 6c 61 67 73  |flags..D.. flags|
000003f0  20 3d 20 36 20 8c 20 66  6f 75 6e 64 25 20 3d 20  | = 6 . found% = |
00000400  b9 0d 02 4e 0b 3d 66 6f  75 6e 64 25 0d 02 58 04  |...N.=found%..X.|
00000410  0d 02 62 04 0d 02 6c 04  0d 02 76 10 dd 20 f2 63  |..b...l...v.. .c|
00000420  6c 6f 73 65 28 77 25 29  0d 02 80 10 62 6c 6f 63  |lose(w%)....bloc|
00000430  6b 21 30 20 3d 20 77 25  0d 02 8a 15 c8 99 20 63  |k!0 = w%...... c|
00000440  6c 6f 73 65 57 25 2c 2c  62 6c 6f 63 6b 0d 02 94  |loseW%,,block...|
00000450  0b c8 8e 20 77 25 20 ca  0d 02 9e 38 c9 20 68 61  |... w% ....8. ha|
00000460  6e 64 6c 65 25 20 3a 20  6f 70 65 6e 25 20 3d 20  |ndle% : open% = |
00000470  a3 20 3a 20 e7 20 6f 70  74 6f 70 65 6e 25 20 8c  |. : . optopen% .|
00000480  20 f2 63 6c 6f 73 65 28  6f 70 74 69 6f 6e 25 29  | .close(option%)|
00000490  0d 02 a8 1c c9 20 6f 70  74 69 6f 6e 25 20 3a 20  |..... option% : |
000004a0  6f 70 74 6f 70 65 6e 25  20 3d 20 a3 0d 02 b2 05  |optopen% = .....|
000004b0  cb 0d 02 bc 05 e1 0d 02  c6 04 0d 02 d0 04 0d 02  |................|
000004c0  da 04 0d 02 e4 0e dd 20  f2 63 6f 6d 70 69 6c 65  |....... .compile|
000004d0  0d 02 ee 1a 50 25 20 3d  20 63 6f 64 65 25 20 3a  |....P% = code% :|
000004e0  20 63 6f 75 6e 74 20 3d  20 36 0d 02 f8 25 77 6f  | count = 6...%wo|
000004f0  72 6b 20 3d 20 37 20 3a  20 66 61 63 74 6f 72 20  |rk = 7 : factor |
00000500  3d 20 38 20 3a 20 69 6e  64 65 78 20 3d 20 39 0d  |= 8 : index = 9.|
00000510  03 02 0b 5b 20 4f 50 54  20 32 0d 03 0c 0e 2e 6e  |...[ OPT 2.....n|
00000520  65 77 65 6e 63 6f 64 65  0d 03 16 1c 4d 4f 56 20  |ewencode....MOV |
00000530  63 6f 75 6e 74 2c 23 30  20 3b 20 63 6f 75 6e 74  |count,#0 ; count|
00000540  20 3d 20 30 0d 03 20 28  4d 4f 56 20 69 6e 64 65  | = 0.. (MOV inde|
00000550  78 2c 23 30 20 3b 20 69  6e 64 65 78 20 69 6e 74  |x,#0 ; index int|
00000560  6f 20 73 74 72 69 6e 67  20 3d 20 30 0d 03 2a 0f  |o string = 0..*.|
00000570  2e 70 72 6f 74 65 63 74  69 6f 6e 0d 03 34 42 4c  |.protection..4BL|
00000580  44 52 42 20 66 61 63 74  6f 72 2c 5b 52 31 2c 69  |DRB factor,[R1,i|
00000590  6e 64 65 78 5d 20 3b 20  66 61 63 74 6f 72 20 3d  |ndex] ; factor =|
000005a0  20 61 73 63 69 69 20 6f  66 20 69 6e 64 65 78 20  | ascii of index |
000005b0  70 6f 73 20 69 6e 20 73  74 72 69 6e 67 0d 03 3e  |pos in string..>|
000005c0  34 41 44 44 20 69 6e 64  65 78 2c 69 6e 64 65 78  |4ADD index,index|
000005d0  2c 23 31 20 20 20 20 20  3b 20 61 64 64 20 6f 6e  |,#1     ; add on|
000005e0  65 20 74 6f 20 73 74 72  69 6e 67 20 69 6e 64 65  |e to string inde|
000005f0  78 0d 03 48 43 82 20 66  61 63 74 6f 72 2c 66 61  |x..HC. factor,fa|
00000600  63 74 6f 72 2c 69 6e 64  65 78 3b 20 45 78 63 6c  |ctor,index; Excl|
00000610  75 73 69 76 65 20 84 20  66 61 63 74 6f 72 20 62  |usive . factor b|
00000620  79 20 70 6f 73 69 74 69  6f 6e 20 69 6e 20 73 74  |y position in st|
00000630  72 69 6e 67 0d 03 52 32  53 55 42 20 69 6e 64 65  |ring..R2SUB inde|
00000640  78 2c 69 6e 64 65 78 2c  23 31 20 20 20 20 20 3b  |x,index,#1     ;|
00000650  20 53 75 62 74 72 61 63  74 20 31 20 66 72 6f 6d  | Subtract 1 from|
00000660  20 69 6e 64 65 78 0d 03  5c 31 53 54 52 42 20 66  | index..\1STRB f|
00000670  61 63 74 6f 72 2c 5b 52  31 2c 69 6e 64 65 78 5d  |actor,[R1,index]|
00000680  20 3b 20 53 74 6f 72 65  20 62 61 63 6b 20 69 6e  | ; Store back in|
00000690  20 6d 65 6d 6f 72 79 0d  03 66 34 41 44 44 20 69  | memory..f4ADD i|
000006a0  6e 64 65 78 2c 69 6e 64  65 78 2c 23 31 20 20 20  |ndex,index,#1   |
000006b0  20 20 3b 20 61 64 64 20  6f 6e 65 20 74 6f 20 73  |  ; add one to s|
000006c0  74 72 69 6e 67 20 69 6e  64 65 78 0d 03 70 36 43  |tring index..p6C|
000006d0  4d 50 20 69 6e 64 65 78  2c 52 33 20 20 20 20 20  |MP index,R3     |
000006e0  20 20 20 20 20 20 3b 20  63 6f 6d 70 61 72 65 20  |      ; compare |
000006f0  69 6e 64 65 78 20 77 69  74 68 20 6c 65 6e 67 74  |index with lengt|
00000700  68 0d 03 7a 2e 42 4c 54  20 70 72 6f 74 65 63 74  |h..z.BLT protect|
00000710  69 6f 6e 20 20 20 20 20  20 20 20 20 3b 20 69 66  |ion         ; if|
00000720  20 6c 65 73 73 20 74 68  65 6e 20 6a 75 6d 70 0d  | less then jump.|
00000730  03 84 0a 2e 6c 6f 6f 70  31 0d 03 8e 10 4d 4f 56  |....loop1....MOV|
00000740  20 69 6e 64 65 78 2c 23  30 0d 03 98 0e 2e 69 6e  | index,#0.....in|
00000750  6e 65 72 20 20 20 20 0d  03 a2 42 4c 44 52 42 20  |ner    ...BLDRB |
00000760  66 61 63 74 6f 72 2c 5b  52 31 2c 69 6e 64 65 78  |factor,[R1,index|
00000770  5d 20 3b 20 66 61 63 74  6f 72 20 3d 20 61 73 63  |] ; factor = asc|
00000780  69 69 20 6f 66 20 69 6e  64 65 78 20 70 6f 73 20  |ii of index pos |
00000790  69 6e 20 73 74 72 69 6e  67 0d 03 ac 30 4c 44 52  |in string...0LDR|
000007a0  42 20 77 6f 72 6b 2c 5b  52 30 2c 63 6f 75 6e 74  |B work,[R0,count|
000007b0  5d 20 20 20 3b 20 62 79  74 65 20 3d 20 62 6c 6f  |]   ; byte = blo|
000007c0  63 6b 20 2b 20 6c 6f 6f  70 0d 03 b6 35 82 20 77  |ck + loop...5. w|
000007d0  6f 72 6b 2c 77 6f 72 6b  2c 66 61 63 74 6f 72 20  |ork,work,factor |
000007e0  20 20 3b 20 65 78 63 6c  75 73 69 76 65 20 84 20  |  ; exclusive . |
000007f0  62 79 74 65 20 62 79 20  66 61 63 74 6f 72 0d 03  |byte by factor..|
00000800  c0 38 53 54 52 42 20 77  6f 72 6b 2c 5b 52 30 2c  |.8STRB work,[R0,|
00000810  63 6f 75 6e 74 5d 20 20  20 3b 20 70 6c 61 63 65  |count]   ; place|
00000820  20 62 79 74 65 20 62 61  63 6b 20 69 6e 74 6f 20  | byte back into |
00000830  6d 65 6d 6f 72 79 0d 03  ca 34 41 44 44 20 69 6e  |memory...4ADD in|
00000840  64 65 78 2c 69 6e 64 65  78 2c 23 31 20 20 20 20  |dex,index,#1    |
00000850  20 3b 20 61 64 64 20 6f  6e 65 20 74 6f 20 73 74  | ; add one to st|
00000860  72 69 6e 67 20 69 6e 64  65 78 0d 03 d4 38 41 44  |ring index...8AD|
00000870  44 20 63 6f 75 6e 74 2c  63 6f 75 6e 74 2c 23 31  |D count,count,#1|
00000880  20 20 20 20 20 3b 20 61  64 64 20 6f 6e 65 20 74  |     ; add one t|
00000890  6f 20 70 6f 73 69 74 69  6f 6e 20 63 6f 75 6e 74  |o position count|
000008a0  65 72 0d 03 de 31 43 4d  50 20 69 6e 64 65 78 2c  |er...1CMP index,|
000008b0  52 33 20 20 20 20 20 20  20 20 20 20 20 3b 20 73  |R3           ; s|
000008c0  65 65 20 69 66 20 65 6e  64 20 6f 66 20 73 74 72  |ee if end of str|
000008d0  69 6e 67 0d 03 e8 32 42  4c 54 20 69 6e 6e 65 72  |ing...2BLT inner|
000008e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
000008f0  69 6e 20 6e 6f 74 2c 20  6a 75 6d 70 20 74 6f 20  |in not, jump to |
00000900  73 74 61 72 74 0d 03 f2  34 43 4d 50 20 63 6f 75  |start...4CMP cou|
00000910  6e 74 2c 52 32 20 20 20  20 20 20 20 20 20 20 20  |nt,R2           |
00000920  3b 20 63 6f 6d 70 61 72  65 20 74 6f 20 73 69 7a  |; compare to siz|
00000930  65 20 6f 66 20 66 69 6c  65 0d 03 fc 3d 42 4c 45  |e of file...=BLE|
00000940  20 6c 6f 6f 70 31 20 20  20 20 20 20 20 20 20 20  | loop1          |
00000950  20 20 20 20 3b 20 69 66  20 6c 65 73 73 20 74 68  |    ; if less th|
00000960  61 6e 2c 20 74 68 65 6e  20 6a 75 6d 70 20 74 6f  |an, then jump to|
00000970  20 73 74 61 72 74 0d 04  06 2d 4d 4f 56 20 50 43  | start...-MOV PC|
00000980  2c 52 31 34 20 20 20 20  20 20 20 20 20 20 20 20  |,R14            |
00000990  20 3b 20 72 65 74 75 72  6e 20 74 6f 20 62 61 73  | ; return to bas|
000009a0  69 63 3f 0d 04 10 0e 2e  6f 6c 64 65 6e 63 6f 64  |ic?.....oldencod|
000009b0  65 0d 04 1a 10 4d 4f 56  20 63 6f 75 6e 74 2c 23  |e....MOV count,#|
000009c0  30 0d 04 24 0a 2e 6c 6f  6f 70 32 0d 04 2e 36 41  |0..$..loop2...6A|
000009d0  44 44 20 63 6f 75 6e 74  2c 63 6f 75 6e 74 2c 23  |DD count,count,#|
000009e0  33 20 20 20 20 20 3b 20  61 64 64 20 33 20 74 6f  |3     ; add 3 to|
000009f0  20 69 6e 69 74 69 61 6c  20 70 6f 73 69 74 69 6f  | initial positio|
00000a00  6e 0d 04 38 27 4c 44 52  42 20 69 6e 64 65 78 2c  |n..8'LDRB index,|
00000a10  5b 52 30 2c 63 6f 75 6e  74 5d 20 20 3b 20 6c 6f  |[R0,count]  ; lo|
00000a20  61 64 20 69 6e 64 65 78  0d 04 42 2e 53 55 42 20  |ad index..B.SUB |
00000a30  69 6e 64 65 78 2c 69 6e  64 65 78 2c 23 34 20 20  |index,index,#4  |
00000a40  20 20 20 3b 20 64 65 63  72 65 6d 65 6e 74 20 63  |   ; decrement c|
00000a50  6f 75 6e 74 65 72 0d 04  4c 0a 2e 6c 6f 6f 70 33  |ounter..L..loop3|
00000a60  0d 04 56 2b 41 44 44 20  63 6f 75 6e 74 2c 63 6f  |..V+ADD count,co|
00000a70  75 6e 74 2c 23 31 20 20  20 20 20 3b 20 61 64 64  |unt,#1     ; add|
00000a80  20 31 20 74 6f 20 63 6f  75 6e 74 0d 04 60 2b 53  | 1 to count..`+S|
00000a90  55 42 20 69 6e 64 65 78  2c 69 6e 64 65 78 2c 23  |UB index,index,#|
00000aa0  31 20 20 20 20 20 3b 20  61 64 64 20 31 20 74 6f  |1     ; add 1 to|
00000ab0  20 69 6e 64 65 78 0d 04  6a 40 4c 44 52 42 20 77  | index..j@LDRB w|
00000ac0  6f 72 6b 2c 5b 52 30 2c  63 6f 75 6e 74 5d 20 20  |ork,[R0,count]  |
00000ad0  20 3b 20 6c 6f 61 64 20  62 79 74 65 20 66 72 6f  | ; load byte fro|
00000ae0  6d 20 62 6c 6f 63 6b 2b  6c 6f 6f 70 20 69 6e 20  |m block+loop in |
00000af0  6d 65 6d 6f 72 79 0d 04  74 30 82 20 77 6f 72 6b  |memory..t0. work|
00000b00  2c 77 6f 72 6b 2c 52 31  20 20 20 20 20 20 20 3b  |,work,R1       ;|
00000b10  20 65 78 63 6c 75 73 69  76 65 20 84 20 62 79 20  | exclusive . by |
00000b20  66 61 63 74 6f 72 0d 04  7e 37 53 54 52 42 20 77  |factor..~7STRB w|
00000b30  6f 72 6b 2c 5b 52 30 2c  63 6f 75 6e 74 5d 20 20  |ork,[R0,count]  |
00000b40  20 3b 20 73 61 76 65 20  62 79 74 65 20 62 61 63  | ; save byte bac|
00000b50  6b 20 69 6e 74 6f 20 6d  65 6d 6f 72 79 0d 04 88  |k into memory...|
00000b60  10 43 4d 50 20 69 6e 64  65 78 2c 23 30 0d 04 92  |.CMP index,#0...|
00000b70  0d 42 47 54 20 6c 6f 6f  70 33 0d 04 9c 36 43 4d  |.BGT loop3...6CM|
00000b80  50 20 63 6f 75 6e 74 2c  52 32 20 20 20 20 20 20  |P count,R2      |
00000b90  20 20 20 20 20 3b 20 63  6f 6d 70 61 72 65 20 74  |     ; compare t|
00000ba0  6f 20 6c 65 6e 67 74 68  20 6f 66 20 66 69 6c 65  |o length of file|
00000bb0  0d 04 a6 37 42 4c 45 20  6c 6f 6f 70 32 20 20 20  |...7BLE loop2   |
00000bc0  20 20 20 20 20 20 20 20  20 20 20 3b 20 69 66 20  |           ; if |
00000bd0  6c 65 73 73 20 6a 75 6d  70 20 62 61 63 6b 20 74  |less jump back t|
00000be0  6f 20 73 74 61 72 74 0d  04 b0 2d 4d 4f 56 20 50  |o start...-MOV P|
00000bf0  43 2c 52 31 34 20 20 20  20 20 20 20 20 20 20 20  |C,R14           |
00000c00  20 20 3b 20 72 65 74 75  72 6e 20 74 6f 20 62 61  |  ; return to ba|
00000c10  73 69 63 3f 0d 04 ba 0d  5d 20 20 20 20 20 20 20  |sic?....]       |
00000c20  20 0d 04 c4 05 e1 0d 04  ce 04 0d 04 d8 04 0d 04  | ...............|
00000c30  e2 04 0d 04 ec 0d dd 20  f2 63 72 65 61 74 65 0d  |....... .create.|
00000c40  04 f6 49 68 61 6e 64 6c  65 25 3d a4 77 69 6e 64  |..Ihandle%=.wind|
00000c50  6f 77 28 31 30 30 2c 32  30 30 2c 35 33 32 2c 35  |ow(100,200,532,5|
00000c60  38 34 2c 2d 31 2c 26 38  37 30 30 30 30 35 32 2c  |84,-1,&87000052,|
00000c70  37 2c 31 34 2c 37 2c 31  2c 33 2c 31 2c 31 34 2c  |7,14,7,1,3,1,14,|
00000c80  74 61 73 6b 69 64 24 29  0d 05 00 51 69 6e 66 6f  |taskid$)...Qinfo|
00000c90  25 20 3d 20 a4 77 69 6e  64 6f 77 28 34 30 30 2c  |% = .window(400,|
00000ca0  31 30 30 2c 31 30 32 30  2c 33 36 30 2c 2d 31 2c  |100,1020,360,-1,|
00000cb0  26 38 34 30 30 30 30 31  32 2c 37 2c 31 34 2c 37  |&84000012,7,14,7|
00000cc0  2c 31 2c 33 2c 31 2c 31  34 2c 22 50 72 6f 67 72  |,1,3,1,14,"Progr|
00000cd0  61 6d 20 49 6e 66 6f 22  29 0d 05 0a 4c 6f 70 74  |am Info")...Lopt|
00000ce0  69 6f 6e 25 3d a4 77 69  6e 64 6f 77 28 38 30 30  |ion%=.window(800|
00000cf0  2c 34 30 30 2c 31 31 35  30 2c 37 38 34 2c 2d 31  |,400,1150,784,-1|
00000d00  2c 26 38 37 30 30 30 30  35 32 2c 37 2c 31 34 2c  |,&87000052,7,14,|
00000d10  37 2c 31 2c 33 2c 31 2c  31 34 2c 22 4f 70 74 69  |7,1,3,1,14,"Opti|
00000d20  6f 6e 73 22 29 0d 05 14  3f 74 65 78 74 24 20 3d  |ons")...?text$ =|
00000d30  20 22 44 72 61 67 20 66  69 6c 65 20 74 6f 20 62  | "Drag file to b|
00000d40  6f 78 20 6f 72 20 69 63  6f 6e 20 6f 6e 20 69 63  |ox or icon on ic|
00000d50  6f 6e 62 61 72 20 74 6f  20 65 6e 63 6f 64 65 20  |onbar to encode |
00000d60  69 74 2e 22 0d 05 1e 3d  74 65 78 74 25 20 3d 20  |it."...=text% = |
00000d70  a4 69 63 6f 6e 28 68 61  6e 64 6c 65 25 2c 31 30  |.icon(handle%,10|
00000d80  2c 2d 31 32 35 2c 34 30  30 2c 2d 32 30 2c 26 37  |,-125,400,-20,&7|
00000d90  30 31 33 31 31 31 2c 74  65 78 74 24 2c 38 2c 31  |013111,text$,8,1|
00000da0  29 0d 05 28 49 70 69 63  74 75 72 65 25 20 3d 20  |)..(Ipicture% = |
00000db0  a4 69 63 6f 6e 28 68 61  6e 64 6c 65 25 2c 35 30  |.icon(handle%,50|
00000dc0  2c 2d 32 32 30 2c 32 31  30 2c 2d 31 35 30 2c 26  |,-220,210,-150,&|
00000dd0  33 31 30 32 2c 22 70 69  63 74 75 72 65 22 2c 31  |3102,"picture",1|
00000de0  2c 73 70 72 69 74 65 73  25 29 0d 05 32 4b 70 61  |,sprites%)..2Kpa|
00000df0  73 73 77 6f 72 64 25 20  3d 20 a4 69 63 6f 6e 28  |ssword% = .icon(|
00000e00  68 61 6e 64 6c 65 25 2c  31 30 2c 2d 33 30 30 2c  |handle%,10,-300,|
00000e10  32 31 30 2c 2d 32 35 30  2c 26 37 30 31 32 30 30  |210,-250,&701200|
00000e20  31 2c 22 50 61 73 73 77  6f 72 64 20 66 6f 72 22  |1,"Password for"|
00000e30  2c 30 2c 31 29 0d 05 3c  45 73 70 72 69 74 65 25  |,0,1)..<Esprite%|
00000e40  20 3d 20 a4 69 63 6f 6e  28 68 61 6e 64 6c 65 25  | = .icon(handle%|
00000e50  2c 32 35 30 2c 2d 32 34  30 2c 33 35 30 2c 2d 31  |,250,-240,350,-1|
00000e60  34 30 2c 26 31 45 30 32  33 31 33 45 2c 22 65 6e  |40,&1E02313E,"en|
00000e70  63 6f 64 65 22 2c 31 2c  31 29 0d 05 46 44 6e 61  |code",1,1)..FDna|
00000e80  6d 65 25 20 3d 20 a4 69  63 6f 6e 28 68 61 6e 64  |me% = .icon(hand|
00000e90  6c 65 25 2c 32 31 39 2c  2d 33 30 30 2c 33 39 30  |le%,219,-300,390|
00000ea0  2c 2d 32 35 30 2c 26 31  37 31 38 33 31 33 39 2c  |,-250,&17183139,|
00000eb0  22 4e 6f 20 66 69 6c 65  22 2c 32 2c 31 29 0d 05  |"No file",2,1)..|
00000ec0  50 42 65 6e 74 65 72 25  3d 20 a4 69 63 6f 6e 28  |PBenter%= .icon(|
00000ed0  68 61 6e 64 6c 65 25 2c  35 30 2c 2d 33 36 33 2c  |handle%,50,-363,|
00000ee0  33 38 32 2c 2d 33 31 32  2c 26 37 30 34 46 31 32  |382,-312,&704F12|
00000ef0  35 2c c4 32 30 2c bd 28  30 29 29 2c 33 2c 31 29  |5,.20,.(0)),3,1)|
00000f00  0d 05 5a 15 66 6c 61 67  25 20 3d 20 26 31 37 30  |..Z.flag% = &170|
00000f10  31 30 32 31 31 0d 05 64  38 69 6e 66 6f 31 25 3d  |10211..d8info1%=|
00000f20  20 a4 69 63 6f 6e 28 69  6e 66 6f 25 2c 31 30 2c  | .icon(info%,10,|
00000f30  2d 35 30 2c 31 38 30 2c  2d 34 2c 66 6c 61 67 25  |-50,180,-4,flag%|
00000f40  2c 22 4e 61 6d 65 3a 22  2c 30 2c 31 29 0d 05 6e  |,"Name:",0,1)..n|
00000f50  3d 69 6e 66 6f 32 25 3d  20 a4 69 63 6f 6e 28 69  |=info2%= .icon(i|
00000f60  6e 66 6f 25 2c 31 30 2c  2d 31 30 30 2c 31 38 30  |nfo%,10,-100,180|
00000f70  2c 2d 35 34 2c 66 6c 61  67 25 2c 22 50 75 72 70  |,-54,flag%,"Purp|
00000f80  6f 73 65 3a 22 2c 30 2c  31 29 0d 05 78 3d 69 6e  |ose:",0,1)..x=in|
00000f90  66 6f 33 25 3d 20 a4 69  63 6f 6e 28 69 6e 66 6f  |fo3%= .icon(info|
00000fa0  25 2c 31 30 2c 2d 31 35  30 2c 31 38 30 2c 2d 31  |%,10,-150,180,-1|
00000fb0  30 34 2c 66 6c 61 67 25  2c 22 41 75 74 68 6f 72  |04,flag%,"Author|
00000fc0  3a 22 2c 30 2c 31 29 0d  05 82 3e 69 6e 66 6f 34  |:",0,1)...>info4|
00000fd0  25 3d 20 a4 69 63 6f 6e  28 69 6e 66 6f 25 2c 31  |%= .icon(info%,1|
00000fe0  30 2c 2d 32 30 30 2c 31  38 30 2c 2d 31 35 34 2c  |0,-200,180,-154,|
00000ff0  66 6c 61 67 25 2c 22 56  65 72 73 69 6f 6e 3a 22  |flag%,"Version:"|
00001000  2c 30 2c 31 29 0d 05 8c  40 69 6e 66 6f 35 25 3d  |,0,1)...@info5%=|
00001010  20 a4 69 63 6f 6e 28 69  6e 66 6f 25 2c 31 30 2c  | .icon(info%,10,|
00001020  2d 32 35 30 2c 31 38 30  2c 2d 32 30 34 2c 66 6c  |-250,180,-204,fl|
00001030  61 67 25 2c 22 43 6f 70  79 72 69 67 68 74 3a 22  |ag%,"Copyright:"|
00001040  2c 30 2c 31 29 0d 05 96  14 66 6c 61 67 25 20 3d  |,0,1)....flag% =|
00001050  20 26 37 30 32 30 31 33  44 0d 05 a0 39 69 6e 66  | &702013D...9inf|
00001060  6f 35 25 3d 20 a4 69 63  6f 6e 28 69 6e 66 6f 25  |o5%= .icon(info%|
00001070  2c 31 38 30 2c 2d 35 30  2c 36 31 30 2c 2d 34 2c  |,180,-50,610,-4,|
00001080  66 6c 61 67 25 2c 74 61  73 6b 69 64 24 2c 32 2c  |flag%,taskid$,2,|
00001090  31 29 0d 05 aa 44 69 6e  66 6f 36 25 3d 20 a4 69  |1)...Dinfo6%= .i|
000010a0  63 6f 6e 28 69 6e 66 6f  25 2c 31 38 30 2c 2d 31  |con(info%,180,-1|
000010b0  30 30 2c 36 31 30 2c 2d  35 34 2c 66 6c 61 67 25  |00,610,-54,flag%|
000010c0  2c 22 45 6e 63 72 79 70  74 73 20 46 69 6c 65 73  |,"Encrypts Files|
000010d0  22 2c 32 2c 31 29 0d 05  b4 45 69 6e 66 6f 37 25  |",2,1)...Einfo7%|
000010e0  3d 20 a4 69 63 6f 6e 28  69 6e 66 6f 25 2c 31 38  |= .icon(info%,18|
000010f0  30 2c 2d 31 35 30 2c 36  31 30 2c 2d 31 30 34 2c  |0,-150,610,-104,|
00001100  66 6c 61 67 25 2c 22 54  69 6d 6f 74 68 79 20 4b  |flag%,"Timothy K|
00001110  69 6d 62 65 72 22 2c 32  2c 31 29 0d 05 be 4e 69  |imber",2,1)...Ni|
00001120  6e 66 6f 38 25 3d 20 a4  69 63 6f 6e 28 69 6e 66  |nfo8%= .icon(inf|
00001130  6f 25 2c 31 38 30 2c 2d  32 30 30 2c 36 31 30 2c  |o%,180,-200,610,|
00001140  2d 31 35 34 2c 66 6c 61  67 25 2c 22 34 2e 35 30  |-154,flag%,"4.50|
00001150  20 28 32 31 20 44 65 63  65 6d 62 65 72 20 31 39  | (21 December 19|
00001160  39 31 29 22 2c 32 2c 31  29 0d 05 c8 47 69 6e 66  |91)",2,1)...Ginf|
00001170  6f 39 25 3d 20 a4 69 63  6f 6e 28 69 6e 66 6f 25  |o9%= .icon(info%|
00001180  2c 31 38 30 2c 2d 32 35  30 2c 36 31 30 2c 2d 32  |,180,-250,610,-2|
00001190  30 34 2c 66 6c 61 67 25  2c 22 41 72 63 68 69 6d  |04,flag%,"Archim|
000011a0  65 64 65 73 20 57 6f 72  6c 64 22 2c 32 2c 31 29  |edes World",2,1)|
000011b0  0d 05 d2 4c 6f 70 74 31  25 20 3d 20 a4 69 63 6f  |...Lopt1% = .ico|
000011c0  6e 28 6f 70 74 69 6f 6e  25 2c 33 30 2c 2d 36 30  |n(option%,30,-60|
000011d0  2c 33 30 30 2c 2d 31 30  2c 26 31 35 30 33 42 31  |,300,-10,&1503B1|
000011e0  33 33 2c 22 20 4e 65 77  20 46 6f 72 6d 61 74 22  |33," New Format"|
000011f0  2c 34 2c 73 70 72 69 74  65 73 25 29 0d 05 dc 4d  |,4,sprites%)...M|
00001200  6f 70 74 32 25 20 3d 20  a4 69 63 6f 6e 28 6f 70  |opt2% = .icon(op|
00001210  74 69 6f 6e 25 2c 33 30  2c 2d 31 32 30 2c 33 30  |tion%,30,-120,30|
00001220  30 2c 2d 37 30 2c 26 31  35 30 33 42 31 33 33 2c  |0,-70,&1503B133,|
00001230  22 20 4f 6c 64 20 46 6f  72 6d 61 74 22 2c 35 2c  |" Old Format",5,|
00001240  73 70 72 69 74 65 73 25  29 0d 05 e6 50 6f 70 74  |sprites%)...Popt|
00001250  33 25 20 3d 20 a4 69 63  6f 6e 28 6f 70 74 69 6f  |3% = .icon(optio|
00001260  6e 25 2c 33 30 2c 2d 31  38 30 2c 33 30 30 2c 2d  |n%,30,-180,300,-|
00001270  31 33 30 2c 26 31 35 30  34 42 31 33 33 2c 22 20  |130,&1504B133," |
00001280  48 6f 75 72 67 6c 61 73  73 20 4f 6e 22 2c 36 2c  |Hourglass On",6,|
00001290  73 70 72 69 74 65 73 25  29 0d 05 f0 51 6f 70 74  |sprites%)...Qopt|
000012a0  34 25 20 3d 20 a4 69 63  6f 6e 28 6f 70 74 69 6f  |4% = .icon(optio|
000012b0  6e 25 2c 33 30 2c 2d 32  34 30 2c 33 30 30 2c 2d  |n%,30,-240,300,-|
000012c0  31 39 30 2c 26 31 35 30  34 42 31 33 33 2c 22 20  |190,&1504B133," |
000012d0  48 6f 75 72 67 6c 61 73  73 20 4f 66 66 22 2c 37  |Hourglass Off",7|
000012e0  2c 73 70 72 69 74 65 73  25 29 0d 05 fa 50 6f 70  |,sprites%)...Pop|
000012f0  74 35 25 20 3d 20 a4 69  63 6f 6e 28 6f 70 74 69  |t5% = .icon(opti|
00001300  6f 6e 25 2c 33 30 2c 2d  33 30 30 2c 33 30 30 2c  |on%,30,-300,300,|
00001310  2d 32 35 30 2c 26 31 35  30 30 42 31 33 33 2c 22  |-250,&1500B133,"|
00001320  20 45 78 74 72 61 20 53  65 63 75 72 65 22 2c 36  | Extra Secure",6|
00001330  2c 73 70 72 69 74 65 73  25 29 0d 06 04 41 73 61  |,sprites%)...Asa|
00001340  76 65 25 20 3d 20 a4 69  63 6f 6e 28 6f 70 74 69  |ve% = .icon(opti|
00001350  6f 6e 25 2c 32 33 30 2c  2d 33 36 30 2c 33 32 30  |on%,230,-360,320|
00001360  2c 2d 33 31 30 2c 26 30  37 30 38 39 30 33 44 2c  |,-310,&0708903D,|
00001370  22 53 61 76 65 22 2c 30  2c 31 29 0d 06 0e 36 69  |"Save",0,1)...6i|
00001380  63 6f 6e 62 61 72 25 3d  20 a4 69 63 6f 6e 28 2d  |conbar%= .icon(-|
00001390  31 2c 30 2c 30 2c 36 33  2c 36 38 2c 26 33 31 30  |1,0,0,63,68,&310|
000013a0  32 2c 22 21 65 6e 63 6f  64 65 34 22 2c 31 2c 31  |2,"!encode4",1,1|
000013b0  29 0d 06 18 1b f2 6f 70  65 6e 75 70 28 68 61 6e  |).....openup(han|
000013c0  64 6c 65 25 2c 65 6e 74  65 72 25 29 0d 06 22 13  |dle%,enter%)..".|
000013d0  e7 20 66 6f 72 6d 61 74  25 20 3d 20 31 20 8c 0d  |. format% = 1 ..|
000013e0  06 2c 1a f2 68 69 49 63  6f 6e 28 6f 70 74 69 6f  |.,..hiIcon(optio|
000013f0  6e 25 2c 6f 70 74 31 25  29 0d 06 36 05 cc 0d 06  |n%,opt1%)..6....|
00001400  40 1a f2 68 69 49 63 6f  6e 28 6f 70 74 69 6f 6e  |@..hiIcon(option|
00001410  25 2c 6f 70 74 32 25 29  0d 06 4a 05 cd 0d 06 54  |%,opt2%)..J....T|
00001420  11 e7 20 68 6f 75 72 25  20 3d 20 31 20 8c 0d 06  |.. hour% = 1 ...|
00001430  5e 1a f2 68 69 49 63 6f  6e 28 6f 70 74 69 6f 6e  |^..hiIcon(option|
00001440  25 2c 6f 70 74 33 25 29  0d 06 68 05 cc 0d 06 72  |%,opt3%)..h....r|
00001450  1a f2 68 69 49 63 6f 6e  28 6f 70 74 69 6f 6e 25  |..hiIcon(option%|
00001460  2c 6f 70 74 34 25 29 0d  06 7c 05 cd 0d 06 86 2a  |,opt4%)..|.....*|
00001470  e7 20 73 65 63 75 72 65  25 20 3d 20 31 20 8c 20  |. secure% = 1 . |
00001480  f2 68 69 49 63 6f 6e 28  6f 70 74 69 6f 6e 25 2c  |.hiIcon(option%,|
00001490  6f 70 74 35 25 29 0d 06  90 05 e1 0d 06 9a 04 0d  |opt5%)..........|
000014a0  06 a4 04 0d 06 ae 04 0d  06 b8 12 dd 20 f2 64 65  |............ .de|
000014b0  63 6f 64 65 5f 6d 65 6e  75 0d 06 c2 1b ea 20 73  |code_menu..... s|
000014c0  65 6c 65 63 74 65 64 24  2c 78 25 2c 79 25 2c 6f  |elected$,x%,y%,o|
000014d0  70 65 6e 25 0d 06 cc 0d  6f 70 65 6e 25 20 3d 20  |pen%....open% = |
000014e0  b9 0d 06 d6 35 c8 99 20  64 65 63 6f 64 65 4d 25  |....5.. decodeM%|
000014f0  2c 2c 6d 65 6e 75 25 2c  62 6c 6f 63 6b 2c c4 32  |,,menu%,block,.2|
00001500  30 30 2c 22 20 22 29 20  b8 20 2c 2c 2c 73 65 6c  |00," ") . ,,,sel|
00001510  65 63 74 65 64 24 0d 06  e0 16 c8 99 20 70 6f 69  |ected$...... poi|
00001520  6e 74 65 72 25 2c 2c 62  6c 6f 63 6b 0d 06 ea 12  |nter%,,block....|
00001530  c8 8e 20 73 65 6c 65 63  74 65 64 24 20 ca 0d 06  |.. selected$ ...|
00001540  f4 0c c9 20 22 49 6e 66  6f 22 0d 06 fe 10 78 25  |... "Info"....x%|
00001550  20 3d 20 62 6c 6f 63 6b  21 30 0d 07 08 10 79 25  | = block!0....y%|
00001560  20 3d 20 62 6c 6f 63 6b  21 34 0d 07 12 1c c8 99  | = block!4......|
00001570  20 63 72 65 61 74 65 4d  25 2c 2c 69 6e 66 6f 25  | createM%,,info%|
00001580  2c 78 25 2c 79 25 0d 07  1c 0d 6f 70 65 6e 25 20  |,x%,y%....open% |
00001590  3d 20 a3 0d 07 26 0f c9  20 22 4f 70 74 69 6f 6e  |= ...&.. "Option|
000015a0  73 22 0d 07 30 10 e7 20  6f 70 74 6f 70 65 6e 25  |s"..0.. optopen%|
000015b0  20 8c 0d 07 3a 13 f2 63  6c 6f 73 65 28 6f 70 74  | ...:..close(opt|
000015c0  69 6f 6e 25 29 0d 07 44  05 cc 0d 07 4e 17 f2 6f  |ion%)..D....N..o|
000015d0  70 65 6e 75 70 28 6f 70  74 69 6f 6e 25 2c 2d 31  |penup(option%,-1|
000015e0  29 0d 07 58 05 cd 0d 07  62 16 c9 20 22 51 75 69  |)..X....b.. "Qui|
000015f0  74 22 20 3a 20 71 75 69  74 25 3d b9 0d 07 6c 05  |t" : quit%=...l.|
00001600  cb 0d 07 76 1b e7 20 62  6c 6f 63 6b 21 38 20 3d  |...v.. block!8 =|
00001610  20 31 20 80 20 6f 70 65  6e 25 20 8c 0d 07 80 0c  | 1 . open% .....|
00001620  f2 6d 65 6e 75 28 32 29  0d 07 8a 05 cd 0d 07 94  |.menu(2)........|
00001630  05 e1 0d 07 9e 04 0d 07  a8 04 0d 07 b2 04 0d 07  |................|
00001640  bc 18 dd 20 f2 64 69 72  65 63 74 6f 72 79 28 77  |... .directory(w|
00001650  68 65 72 65 24 29 0d 07  c6 1d ea 20 6f 66 66 73  |here$)..... offs|
00001660  65 74 25 2c 66 69 6c 65  24 2c 66 69 6c 65 74 79  |et%,file$,filety|
00001670  70 65 24 0d 07 d0 05 f5  0d 07 da 3d c8 99 20 67  |pe$........=.. g|
00001680  62 70 62 25 2c 31 30 2c  77 68 65 72 65 24 2c 62  |bpb%,10,where$,b|
00001690  75 66 66 65 72 25 2c 31  2c 6f 66 66 73 65 74 25  |uffer%,1,offset%|
000016a0  2c 37 35 2c 22 2a 22 20  b8 20 2c 2c 2c 2c 6f 66  |,75,"*" . ,,,,of|
000016b0  66 73 65 74 25 0d 07 e4  15 e7 20 6f 66 66 73 65  |fset%..... offse|
000016c0  74 25 20 3c 3e 20 2d 31  20 8c 0d 07 ee 22 66 69  |t% <> -1 ...."fi|
000016d0  6c 65 24 20 3d 20 a4 67  65 74 73 74 72 69 6e 67  |le$ = .getstring|
000016e0  28 62 75 66 66 65 72 25  2b 32 30 29 0d 07 f8 22  |(buffer%+20)..."|
000016f0  66 69 6c 65 74 79 70 65  24 20 3d 20 c1 c3 7e 28  |filetype$ = ..~(|
00001700  21 62 75 66 66 65 72 25  29 2c 34 2c 33 29 0d 08  |!buffer%),4,3)..|
00001710  02 33 c8 99 20 6f 73 66  69 6c 65 25 2c 31 37 2c  |.3.. osfile%,17,|
00001720  77 68 65 72 65 24 2b 22  2e 22 2b 66 69 6c 65 24  |where$+"."+file$|
00001730  20 b8 20 6f 62 6a 65 63  74 25 2c 2c 6c 6f 61 64  | . object%,,load|
00001740  25 0d 08 0c 19 74 79 70  65 24 20 3d 20 c1 c3 7e  |%....type$ = ..~|
00001750  6c 6f 61 64 25 2c 34 2c  33 29 0d 08 16 0e c8 8e  |load%,4,3)......|
00001760  20 74 79 70 65 24 20 ca  0d 08 20 24 c9 20 22 31  | type$ ... $. "1|
00001770  30 30 30 22 20 3a 20 73  70 72 69 74 65 24 20 3d  |000" : sprite$ =|
00001780  20 22 64 69 72 65 63 74  6f 72 79 22 0d 08 2a 22  | "directory"..*"|
00001790  c9 20 22 32 30 30 30 22  20 3a 20 73 70 72 69 74  |. "2000" : sprit|
000017a0  65 24 20 3d 20 66 69 6c  65 6e 61 6d 65 24 0d 08  |e$ = filename$..|
000017b0  34 05 7f 0d 08 3e 1b 73  70 72 69 74 65 24 20 3d  |4....>.sprite$ =|
000017c0  20 22 66 69 6c 65 5f 22  2b 74 79 70 65 24 0d 08  | "file_"+type$..|
000017d0  48 05 cb 0d 08 52 1d e7  20 a4 63 68 65 63 6b 73  |H....R.. .checks|
000017e0  70 72 69 74 65 28 73 70  72 69 74 65 24 29 20 8c  |prite(sprite$) .|
000017f0  0d 08 5c 26 f2 69 6e 64  69 72 65 63 74 28 68 61  |..\&.indirect(ha|
00001800  6e 64 6c 65 25 2c 73 70  72 69 74 65 25 2c 73 70  |ndle%,sprite%,sp|
00001810  72 69 74 65 24 29 0d 08  66 05 cc 0d 08 70 16 e7  |rite$)..f....p..|
00001820  20 74 79 70 65 24 20 3d  20 22 32 30 30 30 22 20  | type$ = "2000" |
00001830  8c 0d 08 7a 2c f2 69 6e  64 69 72 65 63 74 28 68  |...z,.indirect(h|
00001840  61 6e 64 6c 65 25 2c 73  70 72 69 74 65 25 2c 22  |andle%,sprite%,"|
00001850  61 70 70 6c 69 63 61 74  69 6f 6e 22 29 0d 08 84  |application")...|
00001860  05 cc 0d 08 8e 29 f2 69  6e 64 69 72 65 63 74 28  |.....).indirect(|
00001870  68 61 6e 64 6c 65 25 2c  73 70 72 69 74 65 25 2c  |handle%,sprite%,|
00001880  22 66 69 6c 65 5f 78 78  78 22 29 0d 08 98 05 cd  |"file_xxx").....|
00001890  0d 08 a2 05 cd 0d 08 ac  27 f2 69 6e 64 69 72 65  |........'.indire|
000018a0  63 74 28 68 61 6e 64 6c  65 25 2c 6e 61 6d 65 25  |ct(handle%,name%|
000018b0  2c 66 69 6c 65 24 2b bd  28 30 29 29 0d 08 b6 10  |,file$+.(0))....|
000018c0  c8 8e 20 6f 62 6a 65 63  74 25 20 ca 0d 08 c0 2d  |.. object% ....-|
000018d0  c9 20 31 20 3a 20 f2 65  6e 63 6f 64 65 28 77 68  |. 1 : .encode(wh|
000018e0  65 72 65 24 2b 22 2e 22  2b 66 69 6c 65 24 2c 66  |ere$+"."+file$,f|
000018f0  69 6c 65 74 79 70 65 24  29 0d 08 ca 26 c9 20 32  |iletype$)...&. 2|
00001900  20 3a 20 f2 64 69 72 65  63 74 6f 72 79 28 77 68  | : .directory(wh|
00001910  65 72 65 24 2b 22 2e 22  2b 66 69 6c 65 24 29 0d  |ere$+"."+file$).|
00001920  08 d4 05 cb 0d 08 de 05  cd 0d 08 e8 1c fd 20 6f  |.............. o|
00001930  66 66 73 65 74 25 20 3d  20 2d 31 20 84 20 ac 20  |ffset% = -1 . . |
00001940  66 6c 61 67 25 0d 08 f2  05 e1 0d 08 fc 04 0d 09  |flag%...........|
00001950  06 04 0d 09 10 04 0d 09  1a 22 dd 20 f2 65 6e 63  |.........". .enc|
00001960  6f 64 65 28 66 69 6c 65  70 61 74 68 24 2c 66 69  |ode(filepath$,fi|
00001970  6c 65 74 79 70 65 24 29  0d 09 24 0c ea 20 65 72  |letype$)..$.. er|
00001980  72 6f 72 25 0d 09 2e 0e  65 72 72 6f 72 25 20 3d  |ror%....error% =|
00001990  20 a3 0d 09 38 14 ee 20  85 20 ea 20 65 72 72 6f  | ...8.. . . erro|
000019a0  72 25 20 3d 20 b9 0d 09  42 10 e7 20 ac 20 65 72  |r% = ...B.. . er|
000019b0  72 6f 72 25 20 8c 0d 09  4c 0d 66 6c 61 67 25 20  |ror% ...L.flag% |
000019c0  3d 20 a3 0d 09 56 35 e7  20 66 69 6c 65 70 61 74  |= ...V5. filepat|
000019d0  68 24 20 3d 20 22 22 20  8c 20 f2 6d 65 73 73 61  |h$ = "" . .messa|
000019e0  67 65 28 22 4e 6f 20 66  69 6c 65 20 73 65 6c 65  |ge("No file sele|
000019f0  63 74 65 64 22 29 3a e1  0d 09 60 1c e7 20 68 6f  |cted"):...`.. ho|
00001a00  75 72 25 20 3d 20 31 20  8c 20 c8 99 20 68 6f 75  |ur% = 1 . .. hou|
00001a10  72 6f 6e 25 0d 09 6a 27  c8 99 20 63 6f 6e 74 72  |ron%..j'.. contr|
00001a20  6f 6c 25 2c 32 38 2c 66  69 6c 65 70 61 74 68 24  |ol%,28,filepath$|
00001a30  20 b8 20 2c 2c 63 6f 75  6e 74 25 0d 09 74 2a c8  | . ,,count%..t*.|
00001a40  99 20 73 6c 6f 74 73 69  7a 65 25 2c 73 6c 6f 74  |. slotsize%,slot|
00001a50  25 2b 63 6f 75 6e 74 25  2b 32 35 2c 2d 31 20 b8  |%+count%+25,-1 .|
00001a60  20 67 6f 74 25 0d 09 7e  19 e7 20 67 6f 74 25 3c  | got%..~.. got%<|
00001a70  73 6c 6f 74 25 2b 63 6f  75 6e 74 25 20 8c 0d 09  |slot%+count% ...|
00001a80  88 2b f2 6d 65 73 73 61  67 65 28 22 4e 6f 74 20  |.+.message("Not |
00001a90  65 6e 6f 75 67 68 20 6d  65 6d 6f 72 79 20 61 76  |enough memory av|
00001aa0  61 69 6c 61 62 6c 65 22  29 0d 09 92 05 cc 0d 09  |ailable").......|
00001ab0  9c 18 74 6f 74 61 6c 25  3d 73 74 61 72 74 25 2b  |..total%=start%+|
00001ac0  63 6f 75 6e 74 25 0d 09  a6 24 c8 99 20 6f 73 66  |count%...$.. osf|
00001ad0  69 6c 65 25 2c 31 32 2c  66 69 6c 65 70 61 74 68  |ile%,12,filepath|
00001ae0  24 2c 73 74 61 72 74 25  2c 30 0d 09 b0 12 c8 8e  |$,start%,0......|
00001af0  20 66 69 6c 65 74 79 70  65 24 20 ca 0d 09 ba 0c  | filetype$ .....|
00001b00  c9 20 22 31 39 38 22 3a  0d 09 c4 17 e7 20 3f 28  |. "198":..... ?(|
00001b10  74 6f 74 61 6c 25 2d 31  29 20 3d 20 35 20 8c 0d  |total%-1) = 5 ..|
00001b20  09 ce 11 6f 6c 64 63 6f  64 65 24 20 3d 20 22 22  |...oldcode$ = ""|
00001b30  0d 09 d8 11 73 65 74 74  24 20 3d 20 22 46 46 44  |....sett$ = "FFD|
00001b40  22 0d 09 e2 1f f2 6e 65  77 65 6e 63 6f 64 65 28  |".....newencode(|
00001b50  73 74 61 72 74 25 2c 74  6f 74 61 6c 25 2d 31 29  |start%,total%-1)|
00001b60  0d 09 ec 05 cc 0d 09 f6  0f 6f 6c 64 63 6f 64 65  |.........oldcode|
00001b70  24 3d 22 22 0d 0a 00 21  6c 65 6e 25 20 3d 20 3f  |$=""...!len% = ?|
00001b80  28 74 6f 74 61 6c 25 2d  32 29 20 3a 20 65 6f 72  |(total%-2) : eor|
00001b90  25 20 3d 20 31 0d 0a 0a  1b e3 20 6c 6f 6f 70 25  |% = 1..... loop%|
00001ba0  20 3d 20 6c 65 6e 25 20  b8 20 31 20 88 20 2d 31  | = len% . 1 . -1|
00001bb0  0d 0a 14 33 6f 6c 64 63  6f 64 65 24 20 2b 3d 20  |...3oldcode$ += |
00001bc0  bd 28 3f 28 74 6f 74 61  6c 25 2d 28 6c 6f 6f 70  |.(?(total%-(loop|
00001bd0  25 2b 32 29 29 20 82 20  28 65 6f 72 25 20 2a 20  |%+2)) . (eor% * |
00001be0  35 29 29 0d 0a 1e 0d 65  6f 72 25 20 2b 3d 20 31  |5))....eor% += 1|
00001bf0  0d 0a 28 0b ed 20 6c 6f  6f 70 25 0d 0a 32 1e 73  |..(.. loop%..2.s|
00001c00  65 74 74 24 20 3d 20 24  28 74 6f 74 61 6c 25 2d  |ett$ = $(total%-|
00001c10  28 6c 65 6e 25 2b 36 29  29 0d 0a 3c 26 f2 6e 65  |(len%+6))..<&.ne|
00001c20  77 65 6e 63 6f 64 65 28  73 74 61 72 74 25 2c 74  |wencode(start%,t|
00001c30  6f 74 61 6c 25 2d 28 36  2b 6c 65 6e 25 29 29 0d  |otal%-(6+len%)).|
00001c40  0a 46 05 cd 0d 0a 50 0c  c9 20 22 31 39 39 22 3a  |.F....P.. "199":|
00001c50  0d 0a 5a 17 e7 20 3f 28  74 6f 74 61 6c 25 2d 31  |..Z.. ?(total%-1|
00001c60  29 20 3d 20 35 20 8c 0d  0a 64 12 6f 6c 64 66 61  |) = 5 ...d.oldfa|
00001c70  63 74 6f 72 25 20 3d 20  30 0d 0a 6e 11 73 65 74  |ctor% = 0..n.set|
00001c80  74 24 20 3d 20 22 46 46  44 22 0d 0a 78 1f f2 6f  |t$ = "FFD"..x..o|
00001c90  6c 64 65 6e 63 6f 64 65  28 73 74 61 72 74 25 2c  |ldencode(start%,|
00001ca0  74 6f 74 61 6c 25 2d 31  29 0d 0a 82 05 cc 0d 0a  |total%-1).......|
00001cb0  8c 1c 6f 6c 64 66 61 63  74 6f 72 25 20 3d 20 3f  |..oldfactor% = ?|
00001cc0  28 74 6f 74 61 6c 25 2d  33 29 0d 0a 96 17 73 65  |(total%-3)....se|
00001cd0  74 74 24 20 3d 20 24 28  74 6f 74 61 6c 25 2d 37  |tt$ = $(total%-7|
00001ce0  29 0d 0a a0 21 f2 6f 6c  64 65 6e 63 6f 64 65 28  |)...!.oldencode(|
00001cf0  73 74 61 72 74 25 2c 28  74 6f 74 61 6c 25 2d 37  |start%,(total%-7|
00001d00  29 29 0d 0a aa 05 cd 0d  0a b4 05 7f 0d 0a be 13  |))..............|
00001d10  e7 20 66 6f 72 6d 61 74  25 20 3d 20 31 20 8c 0d  |. format% = 1 ..|
00001d20  0a c8 11 6f 6c 64 63 6f  64 65 24 20 3d 20 22 22  |...oldcode$ = ""|
00001d30  0d 0a d2 1d f2 6e 65 77  65 6e 63 6f 64 65 28 73  |.....newencode(s|
00001d40  74 61 72 74 25 2c 74 6f  74 61 6c 25 29 0d 0a dc  |tart%,total%)...|
00001d50  05 cc 0d 0a e6 12 6f 6c  64 66 61 63 74 6f 72 25  |......oldfactor%|
00001d60  20 3d 20 30 0d 0a f0 1d  f2 6f 6c 64 65 6e 63 6f  | = 0.....oldenco|
00001d70  64 65 28 73 74 61 72 74  25 2c 74 6f 74 61 6c 25  |de(start%,total%|
00001d80  29 0d 0a fa 05 cd 0d 0b  04 05 cb 0d 0b 0e 05 cd  |)...............|
00001d90  0d 0b 18 20 c8 99 20 73  6c 6f 74 73 69 7a 65 25  |... .. slotsize%|
00001da0  2c 73 6c 6f 74 25 2c 2d  31 20 b8 20 67 6f 74 25  |,slot%,-1 . got%|
00001db0  0d 0b 22 1d e7 20 68 6f  75 72 25 20 3d 20 31 20  |..".. hour% = 1 |
00001dc0  8c 20 c8 99 20 68 6f 75  72 6f 66 66 25 0d 0b 2c  |. .. houroff%..,|
00001dd0  05 cc 0d 0b 36 10 f2 6d  65 73 73 61 67 65 28 f6  |....6..message(.|
00001de0  24 29 0d 0b 40 05 cd 0d  0b 4a 05 e1 0d 0b 54 04  |$)..@....J....T.|
00001df0  0d 0b 5e 04 0d 0b 68 04  0d 0b 72 0c dd 20 f2 65  |..^...h...r.. .e|
00001e00  72 72 6f 72 0d 0b 7c 19  c8 99 20 22 57 69 6d 70  |rror..|... "Wimp|
00001e10  5f 44 72 61 67 42 6f 78  22 2c 2c 2d 31 0d 0b 86  |_DragBox",,-1...|
00001e20  10 21 62 75 66 66 65 72  25 20 3d 20 9f 0d 0b 90  |.!buffer% = ....|
00001e30  23 24 28 62 75 66 66 65  72 25 2b 34 29 3d 20 f6  |#$(buffer%+4)= .|
00001e40  24 2b 22 20 41 74 20 6c  69 6e 65 20 22 2b c3 9e  |$+" At line "+..|
00001e50  0d 0b 9a 36 c8 99 20 22  57 69 6d 70 5f 52 65 70  |...6.. "Wimp_Rep|
00001e60  6f 72 74 45 72 72 6f 72  22 2c 62 75 66 66 65 72  |ortError",buffer|
00001e70  25 2c 33 2c 74 61 73 6b  69 64 24 20 b8 20 2c 61  |%,3,taskid$ . ,a|
00001e80  6e 73 77 65 72 25 0d 0b  a4 28 e7 20 61 6e 73 77  |nswer%...(. answ|
00001e90  65 72 25 20 3d 20 32 20  8c 20 c8 99 22 57 69 6d  |er% = 2 . .."Wim|
00001ea0  70 5f 43 6c 6f 73 65 44  6f 77 6e 22 3a e0 0d 0b  |p_CloseDown":...|
00001eb0  ae 05 e1 0d 0b b8 04 0d  0b c2 04 0d 0b cc 04 0d  |................|
00001ec0  0b d6 12 dd 20 f2 67 65  74 49 63 6f 6e 49 6e 66  |.... .getIconInf|
00001ed0  6f 0d 0b e0 13 c8 99 20  67 65 74 49 25 2c 2c 62  |o...... getI%,,b|
00001ee0  6c 6f 63 6b 0d 0b ea 13  66 6c 61 67 73 25 3d 62  |lock....flags%=b|
00001ef0  6c 6f 63 6b 21 32 34 0d  0b f4 19 e7 20 28 66 6c  |lock!24..... (fl|
00001f00  61 67 73 25 20 80 20 26  31 30 30 29 3e 30 20 8c  |ags% . &100)>0 .|
00001f10  0d 0b fe 13 63 6f 64 65  24 3d 24 62 6c 6f 63 6b  |....code$=$block|
00001f20  21 32 38 0d 0c 08 05 cc  0d 0c 12 15 63 6f 64 65  |!28.........code|
00001f30  24 3d 24 28 62 6c 6f 63  6b 2b 32 38 29 0d 0c 1c  |$=$(block+28)...|
00001f40  05 cd 0d 0c 26 05 e1 0d  0c 30 04 0d 0c 3a 04 0d  |....&....0...:..|
00001f50  0c 44 04 0d 0c 4e 18 dd  20 a4 67 65 74 73 74 72  |.D...N.. .getstr|
00001f60  69 6e 67 28 62 6c 6f 63  6b 25 29 0d 0c 58 0d ea  |ing(block%)..X..|
00001f70  20 72 65 73 75 6c 74 24  0d 0c 62 13 c8 95 20 3f  | result$..b... ?|
00001f80  62 6c 6f 63 6b 25 20 3c  3e 20 30 0d 0c 6c 15 72  |block% <> 0..l.r|
00001f90  65 73 75 6c 74 24 2b 3d  bd 3f 62 6c 6f 63 6b 25  |esult$+=.?block%|
00001fa0  0d 0c 76 0d 62 6c 6f 63  6b 25 2b 3d 31 0d 0c 80  |..v.block%+=1...|
00001fb0  05 ce 0d 0c 8a 0c 3d 72  65 73 75 6c 74 24 0d 0c  |......=result$..|
00001fc0  94 04 0d 0c 9e 04 0d 0c  a8 04 0d 0c b2 1e dd 20  |............... |
00001fd0  f2 68 69 49 63 6f 6e 28  62 6c 6f 63 6b 21 30 2c  |.hiIcon(block!0,|
00001fe0  62 6c 6f 63 6b 21 34 29  0d 0c bc 11 62 6c 6f 63  |block!4)....bloc|
00001ff0  6b 21 38 3d 31 3c 3c 32  31 0d 0c c6 12 62 6c 6f  |k!8=1<<21....blo|
00002000  63 6b 21 31 32 3d 31 3c  3c 32 31 0d 0c d0 13 c8  |ck!12=1<<21.....|
00002010  99 20 73 65 74 49 25 2c  2c 62 6c 6f 63 6b 0d 0c  |. setI%,,block..|
00002020  da 05 e1 0d 0c e4 04 0d  0c ee 04 0d 0c f8 04 0d  |................|
00002030  0d 02 46 dd 20 a4 69 63  6f 6e 28 77 69 6e 64 6f  |..F. .icon(windo|
00002040  77 25 2c 6c 65 66 74 78  25 2c 62 6f 74 74 6f 6d  |w%,leftx%,bottom|
00002050  79 25 2c 72 69 67 68 74  78 25 2c 74 6f 70 79 25  |y%,rightx%,topy%|
00002060  2c 66 6c 61 67 73 25 2c  74 65 78 74 24 2c 74 25  |,flags%,text$,t%|
00002070  2c 73 70 25 29 0d 0d 0c  35 f4 20 72 65 6d 65 6d  |,sp%)...5. remem|
00002080  62 65 72 20 74 68 61 74  20 61 6c 6c 20 63 6f 6f  |ber that all coo|
00002090  72 64 69 6e 61 74 65 73  20 73 74 61 72 74 20 61  |rdinates start a|
000020a0  74 20 74 6f 70 20 6c 65  66 74 0d 0d 16 30 f4 20  |t top left...0. |
000020b0  28 69 2e 65 2e 20 74 68  61 74 20 61 6c 6c 20 79  |(i.e. that all y|
000020c0  20 76 61 6c 75 65 73 20  61 72 65 20 7a 65 72 6f  | values are zero|
000020d0  20 6f 72 20 6c 65 73 73  2e 29 0d 0d 20 1e 24 62  | or less.).. .$b|
000020e0  6c 6f 63 6b 20 3d 20 c4  33 36 2c bd 28 30 29 29  |lock = .36,.(0))|
000020f0  3a f4 20 63 6c 65 61 72  0d 0d 2a 15 62 6c 6f 63  |:. clear..*.bloc|
00002100  6b 21 30 20 3d 20 77 69  6e 64 6f 77 25 0d 0d 34  |k!0 = window%..4|
00002110  14 62 6c 6f 63 6b 21 34  20 3d 20 6c 65 66 74 78  |.block!4 = leftx|
00002120  25 0d 0d 3e 16 62 6c 6f  63 6b 21 38 20 3d 20 62  |%..>.block!8 = b|
00002130  6f 74 74 6f 6d 79 25 0d  0d 48 16 62 6c 6f 63 6b  |ottomy%..H.block|
00002140  21 31 32 20 3d 20 72 69  67 68 74 78 25 0d 0d 52  |!12 = rightx%..R|
00002150  14 62 6c 6f 63 6b 21 31  36 20 3d 20 74 6f 70 79  |.block!16 = topy|
00002160  25 0d 0d 5c 15 62 6c 6f  63 6b 21 32 30 20 3d 20  |%..\.block!20 = |
00002170  66 6c 61 67 73 25 0d 0d  66 0e e7 20 74 25 20 3d  |flags%..f.. t% =|
00002180  20 30 20 8c 0d 0d 70 17  24 28 62 6c 6f 63 6b 2b  | 0 ...p.$(block+|
00002190  32 34 29 20 3d 20 74 65  78 74 24 0d 0d 7a 05 cc  |24) = text$..z..|
000021a0  0d 0d 84 19 de 20 62 6c  6f 63 6b 21 32 34 20 28  |..... block!24 (|
000021b0  a9 74 65 78 74 24 2b 31  29 0d 0d 8e 15 24 28 62  |.text$+1)....$(b|
000021c0  6c 6f 63 6b 21 32 34 29  3d 74 65 78 74 24 0d 0d  |lock!24)=text$..|
000021d0  98 0b c8 8e 20 74 25 20  ca 0d 0d a2 22 c9 20 31  |.... t% ....". 1|
000021e0  20 3a 20 62 6c 6f 63 6b  21 32 38 3d 73 70 25 20  | : block!28=sp% |
000021f0  3a 20 f4 20 73 70 72 69  74 65 73 0d 0d ac 3d c9  |: . sprites...=.|
00002200  20 33 20 3a 20 de 20 61  25 20 34 20 3a 20 24 61  | 3 : . a% 4 : $a|
00002210  25 20 3d 20 22 44 5c 2d  22 20 3a 20 62 6c 6f 63  |% = "D\-" : bloc|
00002220  6b 21 32 38 20 3d 20 61  25 20 3a 20 f4 20 76 61  |k!28 = a% : . va|
00002230  6c 69 64 61 74 69 6f 6e  0d 0d b6 39 c9 20 34 20  |lidation...9. 4 |
00002240  3a 20 de 20 61 25 20 31  36 20 3a 20 24 61 25 20  |: . a% 16 : $a% |
00002250  3d 20 22 53 6f 70 74 6f  66 66 2c 73 6d 61 6c 6c  |= "Soptoff,small|
00002260  5f 31 39 38 22 3a 62 6c  6f 63 6b 21 32 38 3d 61  |_198":block!28=a|
00002270  25 0d 0d c0 39 c9 20 35  20 3a 20 de 20 61 25 20  |%...9. 5 : . a% |
00002280  31 36 20 3a 20 24 61 25  20 3d 20 22 53 6f 70 74  |16 : $a% = "Sopt|
00002290  6f 66 66 2c 73 6d 61 6c  6c 5f 31 39 39 22 3a 62  |off,small_199":b|
000022a0  6c 6f 63 6b 21 32 38 3d  61 25 0d 0d ca 34 c9 20  |lock!28=a%...4. |
000022b0  36 20 3a 20 de 20 61 25  20 31 36 20 3a 20 24 61  |6 : . a% 16 : $a|
000022c0  25 20 3d 20 22 53 6f 70  74 6f 66 66 2c 79 65 73  |% = "Soptoff,yes|
000022d0  22 20 3a 62 6c 6f 63 6b  21 32 38 3d 61 25 0d 0d  |" :block!28=a%..|
000022e0  d4 33 c9 20 37 20 3a 20  de 20 61 25 20 31 36 20  |.3. 7 : . a% 16 |
000022f0  3a 20 24 61 25 20 3d 20  22 53 6f 70 74 6f 66 66  |: $a% = "Soptoff|
00002300  2c 6e 6f 22 20 3a 62 6c  6f 63 6b 21 32 38 3d 61  |,no" :block!28=a|
00002310  25 0d 0d de 2f c9 20 38  20 3a 20 de 20 61 25 20  |%.../. 8 : . a% |
00002320  31 36 20 3a 20 24 61 25  20 3d 20 22 4c 34 30 22  |16 : $a% = "L40"|
00002330  20 3a 20 62 6c 6f 63 6b  21 32 38 20 3d 20 61 25  | : block!28 = a%|
00002340  0d 0d e8 05 cb 0d 0d f2  15 62 6c 6f 63 6b 21 33  |.........block!3|
00002350  32 3d a9 74 65 78 74 24  2b 31 0d 0d fc 05 cd 0d  |2=.text$+1......|
00002360  0e 06 1e c8 99 20 63 72  65 61 74 65 49 25 2c 2c  |..... createI%,,|
00002370  62 6c 6f 63 6b 20 b8 20  69 63 6f 6e 25 0d 0e 10  |block . icon%...|
00002380  0a 3d 69 63 6f 6e 25 0d  0e 1a 04 0d 0e 24 04 0d  |.=icon%......$..|
00002390  0e 2e 04 0d 0e 38 23 dd  20 f2 69 6e 63 6f 6d 69  |.....8#. .incomi|
000023a0  6e 67 28 77 68 65 72 65  25 2c 74 79 70 65 25 2c  |ng(where%,type%,|
000023b0  73 70 65 63 25 29 0d 0e  42 0a ea 20 72 65 66 25  |spec%)..B.. ref%|
000023c0  0d 0e 4c 12 72 65 66 25  20 3d 20 62 6c 6f 63 6b  |..L.ref% = block|
000023d0  21 38 0d 0e 56 35 e7 20  74 79 70 65 25 20 3c 3e  |!8..V5. type% <>|
000023e0  20 26 31 39 38 20 80 20  74 79 70 65 25 20 3c 3e  | &198 . type% <>|
000023f0  20 26 31 39 39 20 80 20  61 63 74 69 6f 6e 25 20  | &199 . action% |
00002400  3d 20 35 20 8c 20 e1 0d  0e 60 15 74 79 70 65 24  |= 5 . ...`.type$|
00002410  20 3d 20 c3 7e 28 74 79  70 65 25 29 0d 0e 6a 0d  | = .~(type%)..j.|
00002420  e7 20 73 70 65 63 25 20  8c 0d 0e 74 22 66 69 6c  |. spec% ...t"fil|
00002430  65 6e 61 6d 65 24 3d a4  67 65 74 73 74 72 69 6e  |ename$=.getstrin|
00002440  67 28 62 6c 6f 63 6b 2b  34 34 29 0d 0e 7e 05 cc  |g(block+44)..~..|
00002450  0d 0e 88 18 66 69 6c 65  6e 61 6d 65 24 20 3d 20  |....filename$ = |
00002460  63 6f 6d 6d 61 6e 64 24  0d 0e 92 05 cd 0d 0e 9c  |command$........|
00002470  1d e7 20 77 68 65 72 65  25 20 3d 20 2d 32 20 80  |.. where% = -2 .|
00002480  20 ac 20 6f 70 65 6e 25  20 8c 0d 0e a6 1b f2 6f  | . open% ......o|
00002490  70 65 6e 75 70 28 68 61  6e 64 6c 65 25 2c 65 6e  |penup(handle%,en|
000024a0  74 65 72 25 29 0d 0e b0  05 cd 0d 0e ba 26 e7 20  |ter%)........&. |
000024b0  77 68 65 72 65 25 20 3d  20 68 61 6e 64 6c 65 25  |where% = handle%|
000024c0  20 84 20 77 68 65 72 65  25 20 3d 20 2d 32 20 8c  | . where% = -2 .|
000024d0  0d 0e c4 19 66 75 6c 6c  70 61 74 68 24 20 3d 20  |....fullpath$ = |
000024e0  66 69 6c 65 6e 61 6d 65  24 0d 0e ce 05 f5 0d 0e  |filename$.......|
000024f0  d8 1f 70 6f 73 69 74 69  6f 6e 25 20 3d 20 a7 66  |..position% = .f|
00002500  69 6c 65 6e 61 6d 65 24  2c 22 2e 22 29 0d 0e e2  |ilename$,".")...|
00002510  16 e7 20 70 6f 73 69 74  69 6f 6e 25 20 3c 3e 20  |.. position% <> |
00002520  30 20 8c 0d 0e ec 27 66  69 6c 65 6e 61 6d 65 24  |0 ....'filename$|
00002530  20 3d 20 c1 66 69 6c 65  6e 61 6d 65 24 2c 70 6f  | = .filename$,po|
00002540  73 69 74 69 6f 6e 25 2b  31 29 0d 0e f6 05 cd 0d  |sition%+1)......|
00002550  0f 00 13 fd 20 70 6f 73  69 74 69 6f 6e 25 20 3d  |.... position% =|
00002560  20 30 0d 0f 0a 2b f2 69  6e 64 69 72 65 63 74 28  | 0...+.indirect(|
00002570  68 61 6e 64 6c 65 25 2c  6e 61 6d 65 25 2c 66 69  |handle%,name%,fi|
00002580  6c 65 6e 61 6d 65 24 2b  bd 28 30 29 29 0d 0f 14  |lename$+.(0))...|
00002590  16 24 62 6c 6f 63 6b 20  3d 20 c4 33 32 2c bd 28  |.$block = .32,.(|
000025a0  30 29 29 0d 0f 1e 0e c8  8e 20 74 79 70 65 24 20  |0))...... type$ |
000025b0  ca 0d 0f 28 24 c9 20 22  31 30 30 30 22 20 3a 20  |...($. "1000" : |
000025c0  73 70 72 69 74 65 24 20  3d 20 22 64 69 72 65 63  |sprite$ = "direc|
000025d0  74 6f 72 79 22 0d 0f 32  22 c9 20 22 32 30 30 30  |tory"..2". "2000|
000025e0  22 20 3a 20 73 70 72 69  74 65 24 20 3d 20 66 69  |" : sprite$ = fi|
000025f0  6c 65 6e 61 6d 65 24 0d  0f 3c 05 7f 0d 0f 46 1b  |lename$..<....F.|
00002600  73 70 72 69 74 65 24 20  3d 20 22 66 69 6c 65 5f  |sprite$ = "file_|
00002610  22 2b 74 79 70 65 24 0d  0f 50 05 cb 0d 0f 5a 1d  |"+type$..P....Z.|
00002620  e7 20 a4 63 68 65 63 6b  73 70 72 69 74 65 28 73  |. .checksprite(s|
00002630  70 72 69 74 65 24 29 20  8c 0d 0f 64 2a f2 69 6e  |prite$) ...d*.in|
00002640  64 69 72 65 63 74 28 68  61 6e 64 6c 65 25 2c 73  |direct(handle%,s|
00002650  70 72 69 74 65 25 2c 73  70 72 69 74 65 24 2b bd  |prite%,sprite$+.|
00002660  31 30 29 0d 0f 6e 05 cc  0d 0f 78 16 e7 20 74 79  |10)..n....x.. ty|
00002670  70 65 24 20 3d 20 22 32  30 30 30 22 20 8c 0d 0f  |pe$ = "2000" ...|
00002680  82 2c f2 69 6e 64 69 72  65 63 74 28 68 61 6e 64  |.,.indirect(hand|
00002690  6c 65 25 2c 73 70 72 69  74 65 25 2c 22 61 70 70  |le%,sprite%,"app|
000026a0  6c 69 63 61 74 69 6f 6e  22 29 0d 0f 8c 05 cc 0d  |lication")......|
000026b0  0f 96 29 f2 69 6e 64 69  72 65 63 74 28 68 61 6e  |..).indirect(han|
000026c0  64 6c 65 25 2c 73 70 72  69 74 65 25 2c 22 66 69  |dle%,sprite%,"fi|
000026d0  6c 65 5f 78 78 78 22 29  0d 0f a0 05 cd 0d 0f aa  |le_xxx")........|
000026e0  05 cd 0d 0f b4 23 c8 99  20 63 61 72 65 74 25 2c  |.....#.. caret%,|
000026f0  68 61 6e 64 6c 65 25 2c  65 6e 74 65 72 25 2c 2c  |handle%,enter%,,|
00002700  2c 2d 31 2c 30 0d 0f be  25 f2 69 6e 64 69 72 65  |,-1,0...%.indire|
00002710  63 74 28 68 61 6e 64 6c  65 25 2c 65 6e 74 65 72  |ct(handle%,enter|
00002720  25 2c c4 32 30 2c bd 30  29 29 0d 0f c8 10 e7 20  |%,.20,.0))..... |
00002730  6d 65 73 73 61 67 65 25  20 8c 0d 0f d2 10 6d 65  |message% .....me|
00002740  73 73 61 67 65 25 20 3d  20 a3 0d 0f dc 22 f2 69  |ssage% = ....".i|
00002750  6e 64 69 72 65 63 74 28  68 61 6e 64 6c 65 25 2c  |ndirect(handle%,|
00002760  74 65 78 74 25 2c 74 65  78 74 24 29 0d 0f e6 05  |text%,text$)....|
00002770  cd 0d 0f f0 0d e7 20 73  70 65 63 25 20 8c 0d 0f  |...... spec% ...|
00002780  fa 0e 62 6c 6f 63 6b 21  30 3d 32 30 0d 10 04 11  |..block!0=20....|
00002790  62 6c 6f 63 6b 21 31 32  3d 72 65 66 25 0d 10 0e  |block!12=ref%...|
000027a0  0e 62 6c 6f 63 6b 21 31  36 3d 34 0d 10 18 1a c8  |.block!16=4.....|
000027b0  99 20 73 65 6e 64 25 2c  72 65 61 73 6f 6e 25 2c  |. send%,reason%,|
000027c0  62 6c 6f 63 6b 0d 10 22  05 cd 0d 10 2c 05 cd 0d  |block.."....,...|
000027d0  10 36 05 e1 0d 10 40 04  0d 10 4a 04 0d 10 54 04  |.6....@...J...T.|
000027e0  0d 10 5e 1c dd 20 f2 69  6e 64 69 72 65 63 74 28  |..^.. .indirect(|
000027f0  77 25 2c 69 25 2c 74 65  78 74 24 29 0d 10 68 10  |w%,i%,text$)..h.|
00002800  62 6c 6f 63 6b 21 30 20  3d 20 77 25 0d 10 72 10  |block!0 = w%..r.|
00002810  62 6c 6f 63 6b 21 34 20  3d 20 69 25 0d 10 7c 13  |block!4 = i%..|.|
00002820  c8 99 20 67 65 74 49 25  2c 2c 62 6c 6f 63 6b 0d  |.. getI%,,block.|
00002830  10 86 15 24 62 6c 6f 63  6b 21 32 38 20 3d 20 74  |...$block!28 = t|
00002840  65 78 74 24 0d 10 90 0f  62 6c 6f 63 6b 21 38 20  |ext$....block!8 |
00002850  3d 20 30 0d 10 9a 10 62  6c 6f 63 6b 21 31 32 20  |= 0....block!12 |
00002860  3d 20 30 0d 10 a4 13 c8  99 20 73 65 74 49 25 2c  |= 0...... setI%,|
00002870  2c 62 6c 6f 63 6b 0d 10  ae 05 e1 0d 10 b8 04 0d  |,block..........|
00002880  10 c2 04 0d 10 cc 04 0d  10 d6 11 dd 20 f2 69 6e  |............ .in|
00002890  69 74 69 61 6c 69 73 65  0d 10 e0 0b ea 20 74 61  |itialise..... ta|
000028a0  73 6b 25 0d 10 ea 17 74  61 73 6b 69 64 24 20 3d  |sk%....taskid$ =|
000028b0  20 22 45 6e 63 6f 64 65  34 22 0d 10 f4 0c 74 79  | "Encode4"....ty|
000028c0  70 65 24 3d 22 22 0d 10  fe 0d de 20 74 61 73 6b  |pe$=""..... task|
000028d0  25 20 34 0d 11 08 19 de  20 62 6c 6f 63 6b 20 33  |% 4..... block 3|
000028e0  36 30 2c 6d 65 6e 75 25  20 31 30 30 0d 11 12 1b  |60,menu% 100....|
000028f0  de 20 73 70 72 69 74 65  73 25 20 26 43 30 30 2c  |. sprites% &C00,|
00002900  64 61 74 61 25 20 35 0d  11 1c 1a de 20 63 6f 64  |data% 5..... cod|
00002910  65 25 20 31 35 30 2c 73  74 72 69 6e 67 25 20 32  |e% 150,string% 2|
00002920  31 0d 11 26 0c f2 63 6f  6d 70 69 6c 65 0d 11 30  |1..&..compile..0|
00002930  11 24 74 61 73 6b 25 3d  22 54 41 53 4b 22 0d 11  |.$task%="TASK"..|
00002940  3a 3a c8 99 20 22 57 69  6d 70 5f 49 6e 69 74 69  |::.. "Wimp_Initi|
00002950  61 6c 69 73 65 22 2c 33  30 30 2c 21 74 61 73 6b  |alise",300,!task|
00002960  25 2c 74 61 73 6b 69 64  24 20 b8 20 2c 74 61 73  |%,taskid$ . ,tas|
00002970  6b 68 61 6e 64 6c 65 25  0d 11 44 23 c8 99 20 22  |khandle%..D#.. "|
00002980  4f 53 5f 53 70 72 69 74  65 4f 70 22 2c 39 2b 32  |OS_SpriteOp",9+2|
00002990  35 36 2c 73 70 72 69 74  65 73 25 0d 11 4e 3c c8  |56,sprites%..N<.|
000029a0  99 20 22 4f 53 5f 53 70  72 69 74 65 4f 70 22 2c  |. "OS_SpriteOp",|
000029b0  31 30 2b 32 35 36 2c 73  70 72 69 74 65 73 25 2c  |10+256,sprites%,|
000029c0  22 3c 45 6e 63 6f 64 65  34 24 44 69 72 3e 2e 53  |"<Encode4$Dir>.S|
000029d0  70 72 69 74 65 73 22 0d  11 58 1e c8 99 20 73 6c  |prites"..X... sl|
000029e0  6f 74 73 69 7a 65 25 2c  2d 31 2c 2d 31 20 b8 20  |otsize%,-1,-1 . |
000029f0  73 6c 6f 74 25 0d 11 62  16 73 74 61 72 74 25 3d  |slot%..b.start%=|
00002a00  26 38 30 30 30 2b 73 6c  6f 74 25 0d 11 6c 31 6f  |&8000+slot%..l1o|
00002a10  70 65 6e 25 20 3d 20 b9  3a 6f 70 74 6f 70 65 6e  |pen% = .:optopen|
00002a20  25 20 3d 20 a3 3a 6d 65  73 73 61 67 65 25 20 3d  |% = .:message% =|
00002a30  20 a3 3a 66 6c 61 67 25  20 3d 20 b9 0d 11 76 2e  | .:flag% = ...v.|
00002a40  c8 99 20 6f 73 66 69 6c  65 25 2c 31 32 2c 22 3c  |.. osfile%,12,"<|
00002a50  45 6e 63 6f 64 65 34 24  44 69 72 3e 2e 44 61 74  |Encode4$Dir>.Dat|
00002a60  61 22 2c 64 61 74 61 25  2c 30 0d 11 80 32 66 6f  |a",data%,0...2fo|
00002a70  72 6d 61 74 25 20 3d 20  3f 64 61 74 61 25 20 3a  |rmat% = ?data% :|
00002a80  20 e7 20 66 6f 72 6d 61  74 25 20 3d 20 30 20 8c  | . format% = 0 .|
00002a90  20 66 6f 72 6d 61 74 25  20 3d 20 31 0d 11 8a 30  | format% = 1...0|
00002aa0  68 6f 75 72 25 20 3d 20  3f 28 64 61 74 61 25 2b  |hour% = ?(data%+|
00002ab0  31 29 20 3a 20 e7 20 68  6f 75 72 25 20 3d 20 30  |1) : . hour% = 0|
00002ac0  20 8c 20 68 6f 75 72 25  20 3d 20 31 0d 11 94 36  | . hour% = 1...6|
00002ad0  73 65 63 75 72 65 25 20  3d 20 3f 28 64 61 74 61  |secure% = ?(data|
00002ae0  25 2b 32 29 20 3a 20 e7  20 73 65 63 75 72 65 25  |%+2) : . secure%|
00002af0  20 3d 20 30 20 8c 20 73  65 63 75 72 65 25 20 3d  | = 0 . secure% =|
00002b00  20 32 0d 11 9e 12 66 75  6c 6c 70 61 74 68 24 20  | 2....fullpath$ |
00002b10  3d 20 22 22 0d 11 a8 05  e1 0d 11 b2 04 0d 11 bc  |= ""............|
00002b20  04 0d 11 c6 04 0d 11 d0  16 dd 20 f2 6b 65 79 28  |.......... .key(|
00002b30  77 25 2c 69 25 2c 6b 65  79 25 29 0d 11 da 10 f2  |w%,i%,key%).....|
00002b40  67 65 74 49 63 6f 6e 49  6e 66 6f 0d 11 e4 22 e7  |getIconInfo...".|
00002b50  20 77 25 20 3d 20 68 61  6e 64 6c 65 25 20 80 20  | w% = handle% . |
00002b60  69 25 20 3d 20 65 6e 74  65 72 25 20 8c 0d 11 ee  |i% = enter% ....|
00002b70  10 e7 20 6d 65 73 73 61  67 65 25 20 8c 0d 11 f8  |.. message% ....|
00002b80  10 6d 65 73 73 61 67 65  25 20 3d 20 a3 0d 12 02  |.message% = ....|
00002b90  22 f2 69 6e 64 69 72 65  63 74 28 68 61 6e 64 6c  |".indirect(handl|
00002ba0  65 25 2c 74 65 78 74 25  2c 74 65 78 74 24 29 0d  |e%,text%,text$).|
00002bb0  12 0c 05 cd 0d 12 16 11  e7 20 6b 65 79 25 20 3d  |......... key% =|
00002bc0  20 31 33 20 8c 0d 12 20  27 f2 69 6e 64 69 72 65  | 13 ... '.indire|
00002bd0  63 74 28 68 61 6e 64 6c  65 25 2c 65 6e 74 65 72  |ct(handle%,enter|
00002be0  25 2c c4 32 30 2c bd 28  30 29 29 29 0d 12 2a 23  |%,.20,.(0)))..*#|
00002bf0  c8 99 20 63 61 72 65 74  25 2c 68 61 6e 64 6c 65  |.. caret%,handle|
00002c00  25 2c 65 6e 74 65 72 25  2c 2c 2c 2d 31 2c 30 0d  |%,enter%,,,-1,0.|
00002c10  12 34 27 e7 20 74 79 70  65 24 20 3d 20 22 32 30  |.4'. type$ = "20|
00002c20  30 30 22 20 84 20 74 79  70 65 24 20 3d 20 22 31  |00" . type$ = "1|
00002c30  30 30 30 22 20 8c 0d 12  3e 19 f2 64 69 72 65 63  |000" ...>..direc|
00002c40  74 6f 72 79 28 66 75 6c  6c 70 61 74 68 24 29 0d  |tory(fullpath$).|
00002c50  12 48 05 cc 0d 12 52 1c  f2 65 6e 63 6f 64 65 28  |.H....R..encode(|
00002c60  66 75 6c 6c 70 61 74 68  24 2c 74 79 70 65 24 29  |fullpath$,type$)|
00002c70  0d 12 5c 1c e7 20 66 6c  61 67 25 20 8c 20 66 75  |..\.. flag% . fu|
00002c80  6c 6c 70 61 74 68 24 20  3d 20 22 22 0d 12 66 05  |llpath$ = ""..f.|
00002c90  cd 0d 12 70 05 cd 0d 12  7a 05 cd 0d 12 84 14 c8  |...p....z.......|
00002ca0  99 20 70 72 6f 63 65 73  73 25 2c 6b 65 79 25 0d  |. process%,key%.|
00002cb0  12 8e 05 e1 0d 12 98 04  0d 12 a2 04 0d 12 ac 04  |................|
00002cc0  0d 12 b6 15 dd 20 f2 6d  65 6e 75 28 69 63 6f 6e  |..... .menu(icon|
00002cd0  62 61 72 25 29 0d 12 c0  14 24 6d 65 6e 75 25 3d  |bar%)....$menu%=|
00002ce0  22 45 6e 63 6f 64 65 72  22 0d 12 ca 23 6d 65 6e  |"Encoder"...#men|
00002cf0  75 25 3f 31 32 3d 37 20  20 20 3a f4 20 74 69 74  |u%?12=7   :. tit|
00002d00  6c 65 20 66 67 20 63 6f  6c 6f 75 72 0d 12 d4 23  |le fg colour...#|
00002d10  6d 65 6e 75 25 3f 31 33  3d 32 20 20 20 3a f4 20  |menu%?13=2   :. |
00002d20  74 69 74 6c 65 20 62 67  20 63 6f 6c 6f 75 72 0d  |title bg colour.|
00002d30  12 de 22 6d 65 6e 75 25  3f 31 34 3d 37 20 20 20  |.."menu%?14=7   |
00002d40  3a f4 20 77 6f 72 6b 20  62 67 20 63 6f 6c 6f 75  |:. work bg colou|
00002d50  72 0d 12 e8 22 6d 65 6e  75 25 3f 31 35 3d 30 20  |r..."menu%?15=0 |
00002d60  20 20 3a f4 20 77 6f 72  6b 20 66 67 20 63 6f 6c  |  :. work fg col|
00002d70  6f 75 72 0d 12 f2 33 6d  65 6e 75 25 21 31 36 3d  |our...3menu%!16=|
00002d80  38 2a 31 36 3a f4 20 77  69 64 74 68 20 28 38 20  |8*16:. width (8 |
00002d90  63 68 61 72 61 63 74 65  72 73 20 2a 20 31 36 20  |characters * 16 |
00002da0  75 6e 69 74 73 29 0d 12  fc 28 6d 65 6e 75 25 21  |units)...(menu%!|
00002db0  32 30 3d 34 34 20 20 3a  f4 20 68 65 69 67 68 74  |20=44  :. height|
00002dc0  20 6f 66 20 6d 65 6e 75  20 69 74 65 6d 73 0d 13  | of menu items..|
00002dd0  06 20 6d 65 6e 75 25 21  32 34 3d 30 20 20 20 3a  |. menu%!24=0   :|
00002de0  f4 20 76 65 72 74 69 63  61 6c 20 67 61 70 0d 13  |. vertical gap..|
00002df0  10 1e 6d 65 6e 75 25 21  32 38 3d 30 20 20 20 20  |..menu%!28=0    |
00002e00  20 20 20 20 3a f4 20 66  6c 61 67 73 0d 13 1a 27  |    :. flags...'|
00002e10  6d 65 6e 75 25 21 33 32  3d 69 6e 66 6f 25 20 20  |menu%!32=info%  |
00002e20  20 20 3a f4 20 77 69 6e  64 6f 77 20 70 6f 69 6e  |  :. window poin|
00002e30  74 65 72 0d 13 24 23 6d  65 6e 75 25 21 33 36 3d  |ter..$#menu%!36=|
00002e40  26 37 30 30 30 30 32 31  20 3a f4 20 69 63 6f 6e  |&7000021 :. icon|
00002e50  20 66 6c 61 67 73 0d 13  2e 22 24 28 6d 65 6e 75  | flags..."$(menu|
00002e60  25 2b 34 30 29 3d 22 49  6e 66 6f 22 3a f4 20 69  |%+40)="Info":. i|
00002e70  63 6f 6e 20 64 61 74 61  0d 13 38 1e 6d 65 6e 75  |con data..8.menu|
00002e80  25 21 35 32 3d 30 20 20  20 20 20 20 20 20 3a f4  |%!52=0        :.|
00002e90  20 66 6c 61 67 73 0d 13  42 27 6d 65 6e 75 25 21  | flags..B'menu%!|
00002ea0  35 36 3d 2d 31 20 20 20  20 20 20 20 3a f4 20 77  |56=-1       :. w|
00002eb0  69 6e 64 6f 77 20 70 6f  69 6e 74 65 72 0d 13 4c  |indow pointer..L|
00002ec0  23 6d 65 6e 75 25 21 36  30 3d 26 37 30 30 30 30  |#menu%!60=&70000|
00002ed0  32 31 20 3a f4 20 69 63  6f 6e 20 66 6c 61 67 73  |21 :. icon flags|
00002ee0  0d 13 56 25 24 28 6d 65  6e 75 25 2b 36 34 29 3d  |..V%$(menu%+64)=|
00002ef0  22 4f 70 74 69 6f 6e 73  22 3a f4 20 69 63 6f 6e  |"Options":. icon|
00002f00  20 64 61 74 61 0d 13 60  34 6d 65 6e 75 25 21 37  | data..`4menu%!7|
00002f10  36 3d 26 38 30 20 20 20  20 20 20 3a f4 20 66 6c  |6=&80      :. fl|
00002f20  61 67 73 20 28 26 38 30  20 6d 65 61 6e 73 20 6c  |ags (&80 means l|
00002f30  61 73 74 20 69 74 65 6d  29 0d 13 6a 23 6d 65 6e  |ast item)..j#men|
00002f40  75 25 21 38 30 3d 2d 31  20 20 20 20 20 20 20 3a  |u%!80=-1       :|
00002f50  f4 20 4e 6f 20 73 75 62  6d 65 6e 75 0d 13 74 23  |. No submenu..t#|
00002f60  6d 65 6e 75 25 21 38 34  3d 26 37 30 30 30 30 32  |menu%!84=&700002|
00002f70  31 20 3a f4 20 69 63 6f  6e 20 66 6c 61 67 73 0d  |1 :. icon flags.|
00002f80  13 7e 22 24 28 6d 65 6e  75 25 2b 38 38 29 3d 22  |.~"$(menu%+88)="|
00002f90  51 75 69 74 22 3a f4 20  69 63 6f 6e 20 64 61 74  |Quit":. icon dat|
00002fa0  61 0d 13 88 11 c8 8e 20  69 63 6f 6e 62 61 72 25  |a...... iconbar%|
00002fb0  20 ca 0d 13 92 31 c9 20  31 20 3a 20 c8 99 20 63  | ....1. 1 : .. c|
00002fc0  72 65 61 74 65 4d 25 2c  2c 6d 65 6e 75 25 2c 62  |reateM%,,menu%,b|
00002fd0  6c 6f 63 6b 21 30 2d 37  35 2c 39 36 2b 28 33 2a  |lock!0-75,96+(3*|
00002fe0  34 34 29 0d 13 9c 1c c9  20 32 20 3a 20 c8 99 20  |44)..... 2 : .. |
00002ff0  63 72 65 61 74 65 4d 25  2c 2c 6d 65 6e 75 25 0d  |createM%,,menu%.|
00003000  13 a6 05 cb 0d 13 b0 05  e1 0d 13 ba 04 0d 13 c4  |................|
00003010  04 0d 13 ce 04 0d 13 d8  12 dd 20 f2 6d 65 73 73  |.......... .mess|
00003020  61 67 65 28 4d 24 29 0d  13 e2 10 d4 20 31 2c 2d  |age(M$)..... 1,-|
00003030  36 2c 31 30 30 2c 35 0d  13 ec 2a f2 69 6e 64 69  |6,100,5...*.indi|
00003040  72 65 63 74 28 68 61 6e  64 6c 65 25 2c 74 65 78  |rect(handle%,tex|
00003050  74 25 2c 22 45 72 72 6f  72 20 3a 20 22 2b 4d 24  |t%,"Error : "+M$|
00003060  29 0d 13 f6 10 6d 65 73  73 61 67 65 25 20 3d 20  |)....message% = |
00003070  b9 0d 14 00 05 e1 0d 14  0a 04 0d 14 14 04 0d 14  |................|
00003080  1e 04 0d 14 28 0f dd 20  f2 6d 65 73 73 28 4d 24  |....(.. .mess(M$|
00003090  29 0d 14 32 1e 21 62 75  66 66 65 72 25 3d 9f 3a  |)..2.!buffer%=.:|
000030a0  24 28 62 75 66 66 65 72  25 2b 34 29 3d 4d 24 0d  |$(buffer%+4)=M$.|
000030b0  14 3c 36 c8 99 20 22 57  69 6d 70 5f 52 65 70 6f  |.<6.. "Wimp_Repo|
000030c0  72 74 45 72 72 6f 72 22  2c 62 75 66 66 65 72 25  |rtError",buffer%|
000030d0  2c 33 2c 74 61 73 6b 69  64 24 20 b8 20 2c 61 6e  |,3,taskid$ . ,an|
000030e0  73 77 65 72 25 0d 14 46  1d e7 20 61 6e 73 77 65  |swer%..F.. answe|
000030f0  72 25 20 3d 20 32 20 8c  20 71 75 69 74 25 20 3d  |r% = 2 . quit% =|
00003100  20 b9 0d 14 50 05 e1 0d  14 5a 04 0d 14 64 04 0d  | ...P....Z...d..|
00003110  14 6e 04 0d 14 78 23 dd  20 f2 6d 6f 75 73 65 28  |.n...x#. .mouse(|
00003120  62 75 74 74 6f 6e 25 2c  77 69 6e 64 6f 77 25 2c  |button%,window%,|
00003130  69 63 6f 6e 25 29 0d 14  82 0b ea 20 74 65 6d 70  |icon%)..... temp|
00003140  25 0d 14 8c 0d 74 65 6d  70 25 20 3d 20 a3 0d 14  |%....temp% = ...|
00003150  96 10 c8 8e 20 77 69 6e  64 6f 77 25 20 ca 0d 14  |.... window% ...|
00003160  a0 08 c9 20 2d 32 0d 14  aa 1e e7 20 28 62 75 74  |... -2..... (but|
00003170  74 6f 6e 25 20 80 20 32  29 20 8c 20 f2 6d 65 6e  |ton% . 2) . .men|
00003180  75 28 31 29 0d 14 b4 28  e7 20 28 62 75 74 74 6f  |u(1)...(. (butto|
00003190  6e 25 20 80 20 34 29 20  80 20 69 63 6f 6e 25 20  |n% . 4) . icon% |
000031a0  3d 20 69 63 6f 6e 62 61  72 25 20 8c 0d 14 be 31  |= iconbar% ....1|
000031b0  e7 20 6f 70 65 6e 25 20  8c 20 74 65 6d 70 25 20  |. open% . temp% |
000031c0  3d 20 b9 20 8b 20 f2 6f  70 65 6e 75 70 28 68 61  |= . . .openup(ha|
000031d0  6e 64 6c 65 25 2c 65 6e  74 65 72 25 29 0d 14 c8  |ndle%,enter%)...|
000031e0  05 cd 0d 14 d2 0d c9 20  68 61 6e 64 6c 65 25 0d  |....... handle%.|
000031f0  14 dc 25 e7 20 28 62 75  74 74 6f 6e 25 20 80 20  |..%. (button% . |
00003200  34 29 20 84 20 28 62 75  74 74 6f 6e 25 20 80 20  |4) . (button% . |
00003210  31 29 20 8c 0d 14 e6 10  e7 20 6d 65 73 73 61 67  |1) ...... messag|
00003220  65 25 20 8c 0d 14 f0 10  6d 65 73 73 61 67 65 25  |e% .....message%|
00003230  20 3d 20 a3 0d 14 fa 22  f2 69 6e 64 69 72 65 63  | = ....".indirec|
00003240  74 28 68 61 6e 64 6c 65  25 2c 74 65 78 74 25 2c  |t(handle%,text%,|
00003250  74 65 78 74 24 29 0d 15  04 05 cc 0d 15 0e 0d 74  |text$).........t|
00003260  65 6d 70 25 20 3d 20 b9  0d 15 18 05 cd 0d 15 22  |emp% = ........"|
00003270  05 cd 0d 15 2c 0d c9 20  6f 70 74 69 6f 6e 25 0d  |....,.. option%.|
00003280  15 36 25 e7 20 28 62 75  74 74 6f 6e 25 20 80 20  |.6%. (button% . |
00003290  34 29 20 84 20 28 62 75  74 74 6f 6e 25 20 80 20  |4) . (button% . |
000032a0  31 29 20 8c 0d 15 40 15  e7 20 28 62 75 74 74 6f  |1) ...@.. (butto|
000032b0  6e 25 20 80 20 31 29 20  8c 0d 15 4a 0f 73 65 6c  |n% . 1) ...J.sel|
000032c0  65 63 74 25 20 3d 20 a3  0d 15 54 0e c8 8e 20 69  |ect% = ...T... i|
000032d0  63 6f 6e 25 20 ca 0d 15  5e 29 c9 20 6f 70 74 31  |con% ...^). opt1|
000032e0  25 20 3a 20 e7 20 66 6f  72 6d 61 74 25 20 3d 20  |% : . format% = |
000032f0  31 20 8c 20 73 65 6c 65  63 74 25 20 3d 20 b9 0d  |1 . select% = ..|
00003300  15 68 29 c9 20 6f 70 74  32 25 20 3a 20 e7 20 66  |.h). opt2% : . f|
00003310  6f 72 6d 61 74 25 20 3d  20 32 20 8c 20 73 65 6c  |ormat% = 2 . sel|
00003320  65 63 74 25 20 3d 20 b9  0d 15 72 27 c9 20 6f 70  |ect% = ...r'. op|
00003330  74 33 25 20 3a 20 e7 20  68 6f 75 72 25 20 3d 20  |t3% : . hour% = |
00003340  31 20 8c 20 73 65 6c 65  63 74 25 20 3d 20 b9 0d  |1 . select% = ..|
00003350  15 7c 27 c9 20 6f 70 74  34 25 20 3a 20 e7 20 68  |.|'. opt4% : . h|
00003360  6f 75 72 25 20 3d 20 32  20 8c 20 73 65 6c 65 63  |our% = 2 . selec|
00003370  74 25 20 3d 20 b9 0d 15  86 05 cb 0d 15 90 26 e7  |t% = .........&.|
00003380  20 73 65 6c 65 63 74 25  20 8c 20 f2 68 69 49 63  | select% . .hiIc|
00003390  6f 6e 28 6f 70 74 69 6f  6e 25 2c 69 63 6f 6e 25  |on(option%,icon%|
000033a0  29 0d 15 9a 05 cd 0d 15  a4 0e c8 8e 20 69 63 6f  |)........... ico|
000033b0  6e 25 20 ca 0d 15 ae 19  c9 20 6f 70 74 31 25 20  |n% ...... opt1% |
000033c0  3a 20 66 6f 72 6d 61 74  25 20 3d 20 31 0d 15 b8  |: format% = 1...|
000033d0  19 c9 20 6f 70 74 32 25  20 3a 20 66 6f 72 6d 61  |.. opt2% : forma|
000033e0  74 25 20 3d 20 32 0d 15  c2 17 c9 20 6f 70 74 33  |t% = 2..... opt3|
000033f0  25 20 3a 20 68 6f 75 72  25 20 3d 20 31 0d 15 cc  |% : hour% = 1...|
00003400  17 c9 20 6f 70 74 34 25  20 3a 20 68 6f 75 72 25  |.. opt4% : hour%|
00003410  20 3d 20 32 0d 15 d6 37  c9 20 6f 70 74 35 25 20  | = 2...7. opt5% |
00003420  3a 20 e7 20 73 65 63 75  72 65 25 20 3d 20 31 20  |: . secure% = 1 |
00003430  8c 20 73 65 63 75 72 65  25 20 3d 20 32 20 8b 20  |. secure% = 2 . |
00003440  73 65 63 75 72 65 25 20  3d 20 31 0d 15 e0 05 cb  |secure% = 1.....|
00003450  0d 15 ea 15 e7 20 69 63  6f 6e 25 20 3d 20 73 61  |..... icon% = sa|
00003460  76 65 25 20 8c 0d 15 f4  14 3f 64 61 74 61 25 20  |ve% .....?data% |
00003470  3d 20 66 6f 72 6d 61 74  25 0d 15 fe 16 3f 28 64  |= format%....?(d|
00003480  61 74 61 25 2b 31 29 20  3d 20 68 6f 75 72 25 0d  |ata%+1) = hour%.|
00003490  16 08 18 3f 28 64 61 74  61 25 2b 32 29 20 3d 20  |...?(data%+2) = |
000034a0  73 65 63 75 72 65 25 0d  16 12 12 3f 28 64 61 74  |secure%....?(dat|
000034b0  61 25 2b 33 29 20 3d 20  30 0d 16 1c 45 c8 99 20  |a%+3) = 0...E.. |
000034c0  78 6f 73 66 69 6c 65 25  2c 31 30 2c 22 3c 45 6e  |xosfile%,10,"<En|
000034d0  63 6f 64 65 34 24 44 69  72 3e 2e 44 61 74 61 22  |code4$Dir>.Data"|
000034e0  2c 26 46 46 46 2c 2c 64  61 74 61 25 2c 64 61 74  |,&FFF,,data%,dat|
000034f0  61 25 2b 34 20 b8 20 3b  66 6c 61 67 73 25 0d 16  |a%+4 . ;flags%..|
00003500  26 12 e7 20 66 6c 61 67  73 25 20 3d 20 37 20 8c  |&.. flags% = 7 .|
00003510  0d 16 30 24 f2 6d 65 73  73 28 22 45 72 72 6f 72  |..0$.mess("Error|
00003520  20 77 68 69 6c 65 20 73  61 76 69 6e 67 20 64 61  | while saving da|
00003530  74 61 22 29 0d 16 3a 05  cc 0d 16 44 13 f2 63 6c  |ta")..:....D..cl|
00003540  6f 73 65 28 6f 70 74 69  6f 6e 25 29 0d 16 4e 05  |ose(option%)..N.|
00003550  cd 0d 16 58 05 cd 0d 16  62 05 cd 0d 16 6c 05 cb  |...X....b....l..|
00003560  0d 16 76 0d e7 20 74 65  6d 70 25 20 8c 0d 16 80  |..v.. temp% ....|
00003570  10 e7 20 6f 70 74 6f 70  65 6e 25 20 8c 0d 16 8a  |.. optopen% ....|
00003580  13 f2 63 6c 6f 73 65 28  6f 70 74 69 6f 6e 25 29  |..close(option%)|
00003590  0d 16 94 05 cc 0d 16 9e  17 f2 6f 70 65 6e 75 70  |..........openup|
000035a0  28 6f 70 74 69 6f 6e 25  2c 2d 31 29 0d 16 a8 10  |(option%,-1)....|
000035b0  6f 70 74 6f 70 65 6e 25  20 3d 20 b9 0d 16 b2 05  |optopen% = .....|
000035c0  cd 0d 16 bc 05 cd 0d 16  c6 05 e1 0d 16 d0 04 0d  |................|
000035d0  16 da 04 0d 16 e4 04 0d  16 ee 1d dd 20 f2 6e 65  |............ .ne|
000035e0  77 65 6e 63 6f 64 65 28  62 65 67 69 6e 25 2c 65  |wencode(begin%,e|
000035f0  6e 64 25 29 0d 16 f8 13  ea 20 62 6c 6f 63 6b 25  |nd%)..... block%|
00003600  2c 65 72 72 6f 72 25 0d  17 02 0e 65 72 72 6f 72  |,error%....error|
00003610  25 20 3d 20 a3 0d 17 0c  13 62 6c 6f 63 6b 25 20  |% = .....block% |
00003620  3d 20 62 65 67 69 6e 25  0d 17 16 20 63 6f 64 65  |= begin%... code|
00003630  24 20 3d 20 c0 63 6f 64  65 24 2c a7 63 6f 64 65  |$ = .code$,.code|
00003640  24 2c bd 30 29 2d 31 29  0d 17 20 14 6c 65 6e 67  |$,.0)-1).. .leng|
00003650  74 68 25 20 3d 20 a9 63  6f 64 65 24 0d 17 2a 14  |th% = .code$..*.|
00003660  ee 20 85 20 ea 20 65 72  72 6f 72 25 20 3d 20 b9  |. . . error% = .|
00003670  0d 17 34 10 e7 20 ac 20  65 72 72 6f 72 25 20 8c  |..4.. . error% .|
00003680  0d 17 3e 16 c8 99 20 6f  73 62 79 74 65 25 2c 32  |..>... osbyte%,2|
00003690  32 39 2c 30 2c 30 0d 17  48 13 e7 20 6c 65 6e 67  |29,0,0..H.. leng|
000036a0  74 68 25 20 3d 20 30 20  8c 0d 17 52 27 f2 6d 65  |th% = 0 ...R'.me|
000036b0  73 73 61 67 65 28 22 50  6c 65 61 73 65 20 65 6e  |ssage("Please en|
000036c0  74 65 72 20 61 20 70 61  73 73 77 6f 72 64 22 29  |ter a password")|
000036d0  0d 17 5c 05 cc 0d 17 66  26 e7 20 6f 6c 64 63 6f  |..\....f&. oldco|
000036e0  64 65 24 20 3d 20 22 22  20 8c 20 6f 6c 64 63 6f  |de$ = "" . oldco|
000036f0  64 65 24 20 3d 20 63 6f  64 65 24 0d 17 70 19 e7  |de$ = code$..p..|
00003700  20 63 6f 64 65 24 20 3c  3e 20 6f 6c 64 63 6f 64  | code$ <> oldcod|
00003710  65 24 20 8c 0d 17 7a 1e  f2 6d 65 73 73 61 67 65  |e$ ...z..message|
00003720  28 22 57 72 6f 6e 67 20  50 61 73 73 77 6f 72 64  |("Wrong Password|
00003730  22 29 0d 17 84 05 cc 0d  17 8e 19 24 73 74 72 69  |").........$stri|
00003740  6e 67 25 20 3d 20 63 6f  64 65 24 20 2b 20 bd 30  |ng% = code$ + .0|
00003750  0d 17 98 0f 41 25 20 3d  20 62 6c 6f 63 6b 25 0d  |....A% = block%.|
00003760  17 a2 10 42 25 20 3d 20  73 74 72 69 6e 67 25 0d  |...B% = string%.|
00003770  17 ac 16 43 25 20 3d 20  28 65 6e 64 25 2d 62 65  |...C% = (end%-be|
00003780  67 69 6e 25 29 0d 17 b6  10 44 25 20 3d 20 6c 65  |gin%)....D% = le|
00003790  6e 67 74 68 25 0d 17 c0  0f d6 20 6e 65 77 65 6e  |ngth%..... newen|
000037a0  63 6f 64 65 0d 17 ca 1a  e7 20 66 69 6c 65 74 79  |code..... filety|
000037b0  70 65 24 20 3c 3e 20 22  31 39 38 22 20 8c 0d 17  |pe$ <> "198" ...|
000037c0  d4 13 e7 20 73 65 63 75  72 65 25 20 3d 20 31 20  |... secure% = 1 |
000037d0  8c 0d 17 de 0d 65 6e 64  25 20 2b 3d 20 31 0d 17  |.....end% += 1..|
000037e0  e8 11 3f 28 65 6e 64 25  2d 31 29 20 3d 20 35 0d  |..?(end%-1) = 5.|
000037f0  17 f2 05 cc 0d 17 fc 11  6c 65 6e 25 20 3d 20 a9  |........len% = .|
00003800  63 6f 64 65 24 0d 18 06  15 24 65 6e 64 25 20 3d  |code$....$end% =|
00003810  20 66 69 6c 65 74 79 70  65 24 0d 18 10 0d 65 6e  | filetype$....en|
00003820  64 25 20 2b 3d 20 33 0d  18 1a 16 e3 20 6c 6f 6f  |d% += 3..... loo|
00003830  70 25 20 3d 20 31 20 b8  20 6c 65 6e 25 0d 18 24  |p% = 1 . len%..$|
00003840  32 3f 28 65 6e 64 25 2b  6c 6f 6f 70 25 29 20 3d  |2?(end%+loop%) =|
00003850  20 97 c1 63 6f 64 65 24  2c 6c 6f 6f 70 25 2c 31  | ..code$,loop%,1|
00003860  29 20 82 20 28 6c 6f 6f  70 25 20 2a 20 35 29 0d  |) . (loop% * 5).|
00003870  18 2e 0b ed 20 6c 6f 6f  70 25 0d 18 38 12 65 6e  |.... loop%..8.en|
00003880  64 25 20 2b 3d 20 6c 65  6e 25 2b 31 0d 18 42 10  |d% += len%+1..B.|
00003890  3f 65 6e 64 25 20 3d 20  6c 65 6e 25 0d 18 4c 11  |?end% = len%..L.|
000038a0  3f 28 65 6e 64 25 2b 31  29 20 3d 20 34 0d 18 56  |?(end%+1) = 4..V|
000038b0  0d 65 6e 64 25 20 2b 3d  20 32 0d 18 60 05 cd 0d  |.end% += 2..`...|
000038c0  18 6a 11 73 65 74 74 24  20 3d 20 22 31 39 38 22  |.j.sett$ = "198"|
000038d0  0d 18 74 05 cd 0d 18 7e  35 c8 99 20 6f 73 66 69  |..t....~5.. osfi|
000038e0  6c 65 25 2c 31 30 2c 66  69 6c 65 70 61 74 68 24  |le%,10,filepath$|
000038f0  2c a0 28 22 26 22 2b 73  65 74 74 24 29 2c 2c 62  |,.("&"+sett$),,b|
00003900  65 67 69 6e 25 2c 65 6e  64 25 0d 18 88 0d 66 6c  |egin%,end%....fl|
00003910  61 67 25 20 3d 20 b9 0d  18 92 05 cd 0d 18 9c 27  |ag% = .........'|
00003920  f2 69 6e 64 69 72 65 63  74 28 68 61 6e 64 6c 65  |.indirect(handle|
00003930  25 2c 73 70 72 69 74 65  25 2c 22 65 6e 63 6f 64  |%,sprite%,"encod|
00003940  65 22 29 0d 18 a6 26 f2  69 6e 64 69 72 65 63 74  |e")...&.indirect|
00003950  28 68 61 6e 64 6c 65 25  2c 6e 61 6d 65 25 2c 22  |(handle%,name%,"|
00003960  4e 6f 20 66 69 6c 65 22  29 0d 18 b0 05 cd 0d 18  |No file").......|
00003970  ba 05 cc 0d 18 c4 10 f2  6d 65 73 73 61 67 65 28  |........message(|
00003980  f6 24 29 0d 18 ce 05 cd  0d 18 d8 16 c8 99 20 6f  |.$)........... o|
00003990  73 62 79 74 65 25 2c 32  32 39 2c 31 2c 30 0d 18  |sbyte%,229,1,0..|
000039a0  e2 12 c8 99 20 6f 73 62  79 74 65 25 2c 31 32 34  |.... osbyte%,124|
000039b0  0d 18 ec 05 e1 0d 18 f6  04 0d 19 00 04 0d 19 0a  |................|
000039c0  04 0d 19 14 1d dd 20 f2  6f 6c 64 65 6e 63 6f 64  |...... .oldencod|
000039d0  65 28 62 65 67 69 6e 25  2c 65 6e 64 25 29 0d 19  |e(begin%,end%)..|
000039e0  1e 1b ea 20 62 6c 6f 63  6b 25 2c 66 61 63 74 6f  |... block%,facto|
000039f0  72 25 2c 65 72 72 6f 72  25 0d 19 28 0e 65 72 72  |r%,error%..(.err|
00003a00  6f 72 25 20 3d 20 a3 0d  19 32 13 62 6c 6f 63 6b  |or% = ...2.block|
00003a10  25 20 3d 20 62 65 67 69  6e 25 0d 19 3c 14 ee 20  |% = begin%..<.. |
00003a20  85 20 ea 20 65 72 72 6f  72 25 20 3d 20 b9 0d 19  |. . error% = ...|
00003a30  46 10 e7 20 ac 20 65 72  72 6f 72 25 20 8c 0d 19  |F.. . error% ...|
00003a40  50 16 c8 99 20 6f 73 62  79 74 65 25 2c 32 32 39  |P... osbyte%,229|
00003a50  2c 30 2c 30 0d 19 5a 11  c8 8e 20 a9 28 63 6f 64  |,0,0..Z... .(cod|
00003a60  65 24 29 20 ca 0d 19 64  1b c9 20 31 3a 20 66 61  |e$) ...d.. 1: fa|
00003a70  63 74 6f 72 25 20 3d 20  97 28 63 6f 64 65 24 29  |ctor% = .(code$)|
00003a80  0d 19 6e 2e c9 20 32 3a  20 66 61 63 74 6f 72 25  |..n.. 2: factor%|
00003a90  20 3d 20 97 28 c0 63 6f  64 65 24 2c 31 29 29 20  | = .(.code$,1)) |
00003aa0  82 20 97 28 c2 63 6f 64  65 24 2c 31 29 29 0d 19  |. .(.code$,1))..|
00003ab0  78 05 7f 0d 19 82 2b 66  61 63 74 6f 72 25 20 3d  |x.....+factor% =|
00003ac0  20 97 28 c0 63 6f 64 65  24 2c 31 29 29 20 82 20  | .(.code$,1)) . |
00003ad0  97 28 c1 63 6f 64 65 24  2c 32 2c 31 29 29 0d 19  |.(.code$,2,1))..|
00003ae0  8c 1a e3 20 6c 6f 6f 70  25 20 3d 20 33 20 b8 20  |... loop% = 3 . |
00003af0  a9 28 63 6f 64 65 24 29  0d 19 96 2a 66 61 63 74  |.(code$)...*fact|
00003b00  6f 72 25 20 3d 20 66 61  63 74 6f 72 25 20 82 20  |or% = factor% . |
00003b10  97 28 c1 63 6f 64 65 24  2c 6c 6f 6f 70 25 2c 31  |.(.code$,loop%,1|
00003b20  29 29 0d 19 a0 0b ed 20  6c 6f 6f 70 25 0d 19 aa  |))..... loop%...|
00003b30  05 cb 0d 19 b4 2b e7 20  6f 6c 64 66 61 63 74 6f  |.....+. oldfacto|
00003b40  72 25 20 3d 20 30 20 8c  20 6f 6c 64 66 61 63 74  |r% = 0 . oldfact|
00003b50  6f 72 25 20 3d 20 66 61  63 74 6f 72 25 0d 19 be  |or% = factor%...|
00003b60  1d e7 20 6f 6c 64 66 61  63 74 6f 72 25 20 3c 3e  |.. oldfactor% <>|
00003b70  20 66 61 63 74 6f 72 25  20 8c 0d 19 c8 1e f2 6d  | factor% ......m|
00003b80  65 73 73 61 67 65 28 22  57 72 6f 6e 67 20 50 61  |essage("Wrong Pa|
00003b90  73 73 77 6f 72 64 22 29  0d 19 d2 05 cc 0d 19 dc  |ssword")........|
00003ba0  0f 41 25 20 3d 20 62 6c  6f 63 6b 25 0d 19 e6 10  |.A% = block%....|
00003bb0  42 25 20 3d 20 66 61 63  74 6f 72 25 0d 19 f0 16  |B% = factor%....|
00003bc0  43 25 20 3d 20 28 65 6e  64 25 2d 62 65 67 69 6e  |C% = (end%-begin|
00003bd0  25 29 0d 19 fa 0f d6 20  6f 6c 64 65 6e 63 6f 64  |%)..... oldencod|
00003be0  65 0d 1a 04 1a e7 20 66  69 6c 65 74 79 70 65 24  |e..... filetype$|
00003bf0  20 3c 3e 20 22 31 39 39  22 20 8c 0d 1a 0e 13 e7  | <> "199" ......|
00003c00  20 73 65 63 75 72 65 25  20 3d 20 31 20 8c 0d 1a  | secure% = 1 ...|
00003c10  18 0d 65 6e 64 25 20 2b  3d 20 31 0d 1a 22 11 3f  |..end% += 1..".?|
00003c20  28 65 6e 64 25 2d 31 29  20 3d 20 35 0d 1a 2c 05  |(end%-1) = 5..,.|
00003c30  cc 0d 1a 36 0d 65 6e 64  25 20 2b 3d 20 37 0d 1a  |...6.end% += 7..|
00003c40  40 19 24 28 65 6e 64 25  2d 37 29 20 3d 20 66 69  |@.$(end%-7) = fi|
00003c50  6c 65 74 79 70 65 24 0d  1a 4a 17 3f 28 65 6e 64  |letype$..J.?(end|
00003c60  25 2d 33 29 20 3d 20 66  61 63 74 6f 72 25 0d 1a  |%-3) = factor%..|
00003c70  54 05 cd 0d 1a 5e 11 73  65 74 74 24 20 3d 20 22  |T....^.sett$ = "|
00003c80  31 39 39 22 0d 1a 68 05  cd 0d 1a 72 35 c8 99 20  |199"..h....r5.. |
00003c90  6f 73 66 69 6c 65 25 2c  31 30 2c 66 69 6c 65 70  |osfile%,10,filep|
00003ca0  61 74 68 24 2c a0 28 22  26 22 2b 73 65 74 74 24  |ath$,.("&"+sett$|
00003cb0  29 2c 2c 62 65 67 69 6e  25 2c 65 6e 64 25 0d 1a  |),,begin%,end%..|
00003cc0  7c 0d 66 6c 61 67 25 20  3d 20 b9 0d 1a 86 27 f2  ||.flag% = ....'.|
00003cd0  69 6e 64 69 72 65 63 74  28 68 61 6e 64 6c 65 25  |indirect(handle%|
00003ce0  2c 73 70 72 69 74 65 25  2c 22 65 6e 63 6f 64 65  |,sprite%,"encode|
00003cf0  22 29 0d 1a 90 26 f2 69  6e 64 69 72 65 63 74 28  |")...&.indirect(|
00003d00  68 61 6e 64 6c 65 25 2c  6e 61 6d 65 25 2c 22 4e  |handle%,name%,"N|
00003d10  6f 20 66 69 6c 65 22 29  0d 1a 9a 05 cd 0d 1a a4  |o file")........|
00003d20  05 cc 0d 1a ae 10 f2 6d  65 73 73 61 67 65 28 f6  |.......message(.|
00003d30  24 29 0d 1a b8 05 cd 0d  1a c2 16 c8 99 20 6f 73  |$)........... os|
00003d40  62 79 74 65 25 2c 32 32  39 2c 31 2c 30 0d 1a cc  |byte%,229,1,0...|
00003d50  12 c8 99 20 6f 73 62 79  74 65 25 2c 31 32 34 0d  |... osbyte%,124.|
00003d60  1a d6 05 e1 0d 1a e0 04  0d 1a ea 04 0d 1a f4 04  |................|
00003d70  0d 1a fe 12 dd 20 f2 6f  70 65 6e 28 62 6c 6f 63  |..... .open(bloc|
00003d80  6b 29 0d 1b 08 14 c8 99  20 6f 70 65 6e 57 25 2c  |k)...... openW%,|
00003d90  2c 62 6c 6f 63 6b 0d 1b  12 05 e1 0d 1b 1c 04 0d  |,block..........|
00003da0  1b 26 04 0d 1b 30 04 0d  1b 3a 14 dd 20 f2 6f 70  |.&...0...:.. .op|
00003db0  65 6e 75 70 28 77 25 2c  69 25 29 0d 1b 44 10 62  |enup(w%,i%)..D.b|
00003dc0  6c 6f 63 6b 21 30 20 3d  20 77 25 0d 1b 4e 13 c8  |lock!0 = w%..N..|
00003dd0  99 20 67 65 74 57 25 2c  2c 62 6c 6f 63 6b 0d 1b  |. getW%,,block..|
00003de0  58 14 c8 99 20 6f 70 65  6e 57 25 2c 2c 62 6c 6f  |X... openW%,,blo|
00003df0  63 6b 0d 1b 62 0b c8 8e  20 77 25 20 ca 0d 1b 6c  |ck..b... w% ...l|
00003e00  19 c9 20 68 61 6e 64 6c  65 25 20 3a 20 6f 70 65  |.. handle% : ope|
00003e10  6e 25 20 3d 20 b9 0d 1b  76 1c c9 20 6f 70 74 69  |n% = ...v.. opti|
00003e20  6f 6e 25 20 3a 20 6f 70  74 6f 70 65 6e 25 20 3d  |on% : optopen% =|
00003e30  20 b9 0d 1b 80 05 cb 0d  1b 8a 0f e7 20 69 25 20  | ........... i% |
00003e40  3e 3d 20 30 20 8c 0d 1b  94 1a c8 99 20 63 61 72  |>= 0 ....... car|
00003e50  65 74 25 2c 77 25 2c 69  25 2c 2c 2c 2d 31 2c 30  |et%,w%,i%,,,-1,0|
00003e60  0d 1b 9e 05 cd 0d 1b a8  05 e1 0d 1b b2 04 0d 1b  |................|
00003e70  bc 04 0d 1b c6 04 0d 1b  d0 0e dd 20 f2 72 65 63  |........... .rec|
00003e80  65 69 76 65 0d 1b da 16  61 63 74 69 6f 6e 25 20  |eive....action% |
00003e90  3d 20 62 6c 6f 63 6b 21  31 36 0d 1b e4 10 c8 8e  |= block!16......|
00003ea0  20 61 63 74 69 6f 6e 25  20 ca 0d 1b ee 13 c9 20  | action% ...... |
00003eb0  30 20 3a 20 71 75 69 74  25 20 3d 20 b9 0d 1b f8  |0 : quit% = ....|
00003ec0  28 c9 20 33 20 3a 20 f2  69 6e 63 6f 6d 69 6e 67  |(. 3 : .incoming|
00003ed0  28 62 6c 6f 63 6b 21 32  30 2c 62 6c 6f 63 6b 21  |(block!20,block!|
00003ee0  34 30 2c b9 29 0d 1c 02  22 c9 20 35 20 3a 20 f2  |40,.)...". 5 : .|
00003ef0  69 6e 63 6f 6d 69 6e 67  28 2d 32 2c 62 6c 6f 63  |incoming(-2,bloc|
00003f00  6b 21 34 30 2c b9 29 0d  1c 0c 05 cb 0d 1c 16 05  |k!40,.).........|
00003f10  e1 0d 1c 20 04 0d 1c 2a  04 0d 1c 34 04 0d 1c 3e  |... ...*...4...>|
00003f20  11 dd 20 f2 73 77 69 6e  75 6d 62 65 72 73 0d 1c  |.. .swinumbers..|
00003f30  48 15 63 61 72 65 74 25  20 20 20 3d 20 26 34 30  |H.caret%   = &40|
00003f40  30 44 32 0d 1c 52 15 63  6c 6f 73 65 25 20 20 20  |0D2..R.close%   |
00003f50  3d 20 26 34 30 30 44 44  0d 1c 5c 15 63 6c 6f 73  |= &400DD..\.clos|
00003f60  65 57 25 20 20 3d 20 26  34 30 30 43 36 0d 1c 66  |eW%  = &400C6..f|
00003f70  15 63 72 65 61 74 65 49  25 20 3d 20 26 34 30 30  |.createI% = &400|
00003f80  43 32 0d 1c 70 15 63 72  65 61 74 65 4d 25 20 3d  |C2..p.createM% =|
00003f90  20 26 34 30 30 44 34 0d  1c 7a 15 63 72 65 61 74  | &400D4..z.creat|
00003fa0  65 57 25 20 3d 20 26 34  30 30 43 31 0d 1c 84 15  |eW% = &400C1....|
00003fb0  64 65 63 6f 64 65 4d 25  20 3d 20 26 34 30 30 44  |decodeM% = &400D|
00003fc0  35 0d 1c 8e 15 6f 73 62  79 74 65 25 20 20 3d 20  |5....osbyte%  = |
00003fd0  26 30 30 30 30 36 0d 1c  98 15 6f 73 66 69 6c 65  |&00006....osfile|
00003fe0  25 20 20 3d 20 26 30 30  30 30 38 0d 1c a2 15 63  |%  = &00008....c|
00003ff0  6f 6e 74 72 6f 6c 25 20  3d 20 26 30 30 30 32 39  |ontrol% = &00029|
00004000  0d 1c ac 15 67 65 74 65  6e 76 25 20 20 3d 20 26  |....getenv%  = &|
00004010  30 30 30 31 30 0d 1c b6  15 67 65 74 49 25 20 20  |00010....getI%  |
00004020  20 20 3d 20 26 34 30 30  43 45 0d 1c c0 15 67 65  |  = &400CE....ge|
00004030  74 57 25 20 20 20 20 3d  20 26 34 30 30 43 42 0d  |tW%    = &400CB.|
00004040  1c ca 15 67 62 70 62 25  20 20 20 20 3d 20 26 30  |...gbpb%    = &0|
00004050  30 30 30 43 0d 1c d4 15  6f 70 65 6e 57 25 20 20  |000C....openW%  |
00004060  20 3d 20 26 34 30 30 43  35 0d 1c de 15 70 6f 6c  | = &400C5....pol|
00004070  6c 25 20 20 20 20 3d 20  26 34 30 30 43 37 0d 1c  |l%    = &400C7..|
00004080  e8 15 70 6f 69 6e 74 65  72 25 20 3d 20 26 34 30  |..pointer% = &40|
00004090  30 43 46 0d 1c f2 15 70  72 6f 63 65 73 73 25 20  |0CF....process% |
000040a0  3d 20 26 34 30 30 44 43  0d 1c fc 15 73 65 6e 64  |= &400DC....send|
000040b0  25 20 20 20 20 3d 20 26  34 30 30 45 37 0d 1d 06  |%    = &400E7...|
000040c0  15 73 65 74 49 25 20 20  20 20 3d 20 26 34 30 30  |.setI%    = &400|
000040d0  43 44 0d 1d 10 15 73 6c  6f 74 73 69 7a 65 25 3d  |CD....slotsize%=|
000040e0  20 26 34 30 30 45 43 0d  1d 1a 15 73 70 72 69 74  | &400EC....sprit|
000040f0  65 6f 70 25 3d 20 26 34  30 30 45 39 0d 1d 24 15  |eop%= &400E9..$.|
00004100  78 6f 73 66 69 6c 65 25  20 3d 20 26 32 30 30 30  |xosfile% = &2000|
00004110  38 0d 1d 2e 15 68 6f 75  72 6f 6e 25 20 20 3d 20  |8....houron%  = |
00004120  26 34 30 36 43 30 0d 1d  38 15 68 6f 75 72 6f 66  |&406C0..8.hourof|
00004130  66 25 20 3d 20 26 34 30  36 43 31 0d 1d 42 05 e1  |f% = &406C1..B..|
00004140  0d 1d 4c 04 0d 1d 56 04  0d 1d 60 04 0d 1d 6a 11  |..L...V...`...j.|
00004150  dd 20 f2 76 69 72 75 73  63 68 65 63 6b 0d 1d 74  |. .viruscheck..t|
00004160  33 dc 20 21 42 6f 6f 74  2c 32 36 33 2c 21 48 65  |3. !Boot,263,!He|
00004170  6c 70 2c 32 33 33 36 2c  21 52 75 6e 2c 32 38 39  |lp,2336,!Run,289|
00004180  2c 21 52 75 6e 69 6d 61  67 65 2c 31 38 37 30 33  |,!Runimage,18703|
00004190  0d 1d 7e 27 dc 20 21 53  70 72 69 74 65 73 2c 32  |..~'. !Sprites,2|
000041a0  36 31 32 2c 44 61 74 61  2c 34 2c 53 70 72 69 74  |612,Data,4,Sprit|
000041b0  65 73 2c 32 38 36 38 0d  1d 88 0f 6e 75 6d 62 65  |es,2868....numbe|
000041c0  72 25 20 3d 20 37 0d 1d  92 35 de 20 66 69 6c 65  |r% = 7...5. file|
000041d0  24 28 6e 75 6d 62 65 72  25 2b 31 29 2c 73 69 7a  |$(number%+1),siz|
000041e0  65 25 28 6e 75 6d 62 65  72 25 29 2c 66 6f 75 6e  |e%(number%),foun|
000041f0  64 25 28 6e 75 6d 62 65  72 25 29 0d 1d 9c 19 e3  |d%(number%).....|
00004200  20 6c 6f 6f 70 25 20 3d  20 31 20 b8 20 6e 75 6d  | loop% = 1 . num|
00004210  62 65 72 25 0d 1d a6 1f  f3 20 66 69 6c 65 24 28  |ber%..... file$(|
00004220  6c 6f 6f 70 25 29 2c 73  69 7a 65 25 28 6c 6f 6f  |loop%),size%(loo|
00004230  70 25 29 0d 1d b0 0b ed  20 6c 6f 6f 70 25 0d 1d  |p%)..... loop%..|
00004240  ba 1a 77 68 65 72 65 25  20 3d 20 31 3a 6f 66 66  |..where% = 1:off|
00004250  73 65 74 25 20 3d 20 30  0d 1d c4 1b 70 61 74 68  |set% = 0....path|
00004260  24 20 3d 20 22 3c 45 6e  63 6f 64 65 34 24 44 69  |$ = "<Encode4$Di|
00004270  72 3e 22 0d 1d ce 05 f5  0d 1d d8 3c c8 99 20 67  |r>"........<.. g|
00004280  62 70 62 25 2c 31 30 2c  70 61 74 68 24 2c 62 75  |bpb%,10,path$,bu|
00004290  66 66 65 72 25 2c 31 2c  6f 66 66 73 65 74 25 2c  |ffer%,1,offset%,|
000042a0  35 30 2c 22 2a 22 20 b8  20 2c 2c 2c 2c 6f 66 66  |50,"*" . ,,,,off|
000042b0  73 65 74 25 0d 1d e2 15  e7 20 6f 66 66 73 65 74  |set%..... offset|
000042c0  25 20 3c 3e 20 2d 31 20  8c 0d 1d ec 1f 61 24 20  |% <> -1 .....a$ |
000042d0  3d 20 a4 67 65 74 73 74  72 69 6e 67 28 62 75 66  |= .getstring(buf|
000042e0  66 65 72 25 2b 32 30 29  0d 1d f6 0e 77 68 65 72  |fer%+20)....wher|
000042f0  65 25 20 3d 20 30 0d 1e  00 05 f5 0d 1e 0a 0f 77  |e% = 0.........w|
00004300  68 65 72 65 25 20 2b 3d  20 31 0d 1e 14 2d fd 20  |here% += 1...-. |
00004310  61 24 20 3d 20 66 69 6c  65 24 28 77 68 65 72 65  |a$ = file$(where|
00004320  25 29 20 84 20 77 68 65  72 65 25 20 3d 20 6e 75  |%) . where% = nu|
00004330  6d 62 65 72 25 2b 31 0d  1e 1e 1a e7 20 61 24 20  |mber%+1..... a$ |
00004340  3d 20 66 69 6c 65 24 28  77 68 65 72 65 25 29 20  |= file$(where%) |
00004350  8c 0d 1e 28 16 66 6f 75  6e 64 25 28 77 68 65 72  |...(.found%(wher|
00004360  65 25 29 20 3d 20 31 0d  1e 32 3e c8 99 20 6f 73  |e%) = 1..2>.. os|
00004370  66 69 6c 65 25 2c 31 37  2c 70 61 74 68 24 2b 22  |file%,17,path$+"|
00004380  2e 22 2b 66 69 6c 65 24  28 77 68 65 72 65 25 29  |."+file$(where%)|
00004390  20 b8 20 6f 62 6a 65 63  74 25 2c 2c 2c 2c 6c 65  | . object%,,,,le|
000043a0  6e 67 74 68 25 0d 1e 3c  20 e7 20 6c 65 6e 67 74  |ngth%..< . lengt|
000043b0  68 25 20 3c 3e 20 73 69  7a 65 25 28 77 68 65 72  |h% <> size%(wher|
000043c0  65 25 29 20 8c 0d 1e 46  2c f2 6d 65 73 73 28 22  |e%) ...F,.mess("|
000043d0  46 69 6c 65 20 27 22 2b  61 24 2b 22 27 20 68 61  |File '"+a$+"' ha|
000043e0  73 20 62 65 65 6e 20 61  6c 74 65 72 65 64 2e 22  |s been altered."|
000043f0  29 0d 1e 50 05 cd 0d 1e  5a 05 cd 0d 1e 64 40 e7  |)..P....Z....d@.|
00004400  20 77 68 65 72 65 25 20  3d 20 6e 75 6d 62 65 72  | where% = number|
00004410  25 2b 31 20 8c 20 f2 6d  65 73 73 28 22 55 6e 6b  |%+1 . .mess("Unk|
00004420  6e 6f 77 6e 20 66 69 6c  65 20 27 22 2b 61 24 2b  |nown file '"+a$+|
00004430  22 27 20 66 6f 75 6e 64  2e 22 29 0d 1e 6e 05 cd  |"' found.")..n..|
00004440  0d 1e 78 12 fd 20 6f 66  66 73 65 74 25 20 3d 20  |..x.. offset% = |
00004450  2d 31 0d 1e 82 19 e3 20  6c 6f 6f 70 25 20 3d 20  |-1..... loop% = |
00004460  31 20 b8 20 6e 75 6d 62  65 72 25 0d 1e 8c 1a e7  |1 . number%.....|
00004470  20 66 6f 75 6e 64 25 28  6c 6f 6f 70 25 29 20 3c  | found%(loop%) <|
00004480  3e 20 31 20 8c 0d 1e 96  30 f2 6d 65 73 73 28 22  |> 1 ....0.mess("|
00004490  46 69 6c 65 20 27 22 2b  66 69 6c 65 24 28 6c 6f  |File '"+file$(lo|
000044a0  6f 70 25 29 2b 22 27 20  69 73 20 6d 69 73 73 69  |op%)+"' is missi|
000044b0  6e 67 2e 22 29 0d 1e a0  05 cd 0d 1e aa 0b ed 20  |ng.").......... |
000044c0  6c 6f 6f 70 25 0d 1e b4  05 e1 0d 1e be 04 0d 1e  |loop%...........|
000044d0  c8 04 0d 1e d2 04 0d 1e  dc 47 dd 20 a4 77 69 6e  |.........G. .win|
000044e0  64 6f 77 28 78 31 25 2c  79 31 25 2c 78 32 25 2c  |dow(x1%,y1%,x2%,|
000044f0  79 32 25 2c 68 25 2c 77  25 2c 74 66 25 2c 74 62  |y2%,h%,w%,tf%,tb|
00004500  25 2c 77 66 25 2c 77 62  25 2c 73 6f 25 2c 73 69  |%,wf%,wb%,so%,si|
00004510  25 2c 69 66 25 2c 74 69  74 6c 65 24 29 0d 1e e6  |%,if%,title$)...|
00004520  1e 24 62 6c 6f 63 6b 20  3d 20 c4 39 30 2c bd 28  |.$block = .90,.(|
00004530  30 29 29 3a f4 20 63 6c  65 61 72 0d 1e f0 2f 62  |0)):. clear.../b|
00004540  6c 6f 63 6b 21 30 20 3d  20 78 31 25 20 20 3a 20  |lock!0 = x1%  : |
00004550  f4 20 76 69 73 69 62 6c  65 20 6d 69 6e 20 78 20  |. visible min x |
00004560  63 6f 6f 72 64 69 6e 61  74 65 0d 1e fa 2f 62 6c  |coordinate.../bl|
00004570  6f 63 6b 21 34 20 3d 20  79 31 25 20 20 3a 20 f4  |ock!4 = y1%  : .|
00004580  20 76 69 73 69 62 6c 65  20 6d 69 6e 20 79 20 63  | visible min y c|
00004590  6f 6f 72 64 69 6e 61 74  65 0d 1f 04 2f 62 6c 6f  |oordinate.../blo|
000045a0  63 6b 21 38 20 3d 20 78  32 25 20 20 3a 20 f4 20  |ck!8 = x2%  : . |
000045b0  76 69 73 69 62 6c 65 20  6d 61 78 20 78 20 63 6f  |visible max x co|
000045c0  6f 72 64 69 6e 61 74 65  0d 1f 0e 2f 62 6c 6f 63  |ordinate.../bloc|
000045d0  6b 21 31 32 20 3d 20 79  32 25 20 3a 20 f4 20 76  |k!12 = y2% : . v|
000045e0  69 73 69 62 6c 65 20 6d  61 78 20 79 20 63 6f 6f  |isible max y coo|
000045f0  72 64 69 6e 61 74 65 0d  1f 18 45 62 6c 6f 63 6b  |rdinate...Eblock|
00004600  21 32 34 20 3d 20 68 25  20 20 3a 20 f4 20 68 61  |!24 = h%  : . ha|
00004610  6e 64 6c 65 20 74 6f 20  6f 70 65 6e 20 77 69 6e  |ndle to open win|
00004620  64 6f 77 20 62 65 68 69  6e 64 28 2d 31 3d 74 6f  |dow behind(-1=to|
00004630  70 2c 2d 32 3d 62 6f 74  74 6f 6d 29 0d 1f 22 23  |p,-2=bottom).."#|
00004640  62 6c 6f 63 6b 21 32 38  20 3d 20 77 25 20 20 3a  |block!28 = w%  :|
00004650  20 f4 20 77 69 6e 64 6f  77 20 66 6c 61 67 73 0d  | . window flags.|
00004660  1f 2c 27 62 6c 6f 63 6b  21 33 32 20 3d 20 74 66  |.,'block!32 = tf|
00004670  25 20 3a 20 f4 20 74 69  74 6c 65 20 66 6f 72 65  |% : . title fore|
00004680  67 72 6f 75 6e 64 0d 1f  36 27 62 6c 6f 63 6b 21  |ground..6'block!|
00004690  33 33 20 3d 20 74 62 25  20 3a 20 f4 20 74 69 74  |33 = tb% : . tit|
000046a0  6c 65 20 62 61 63 6b 67  72 6f 75 6e 64 0d 1f 40  |le background..@|
000046b0  26 62 6c 6f 63 6b 21 33  34 20 3d 20 77 66 25 20  |&block!34 = wf% |
000046c0  3a 20 f4 20 77 6f 72 6b  20 66 6f 72 65 67 72 6f  |: . work foregro|
000046d0  75 6e 64 0d 1f 4a 26 62  6c 6f 63 6b 21 33 35 20  |und..J&block!35 |
000046e0  3d 20 77 62 25 20 3a 20  f4 20 77 6f 72 6b 20 62  |= wb% : . work b|
000046f0  61 63 6b 67 72 6f 75 6e  64 0d 1f 54 23 62 6c 6f  |ackground..T#blo|
00004700  63 6b 21 33 36 20 3d 20  73 6f 25 20 3a 20 f4 20  |ck!36 = so% : . |
00004710  73 63 72 6f 6c 6c 20 6f  75 74 65 72 0d 1f 5e 23  |scroll outer..^#|
00004720  62 6c 6f 63 6b 21 33 37  20 3d 20 73 69 25 20 3a  |block!37 = si% :|
00004730  20 f4 20 73 63 72 6f 6c  6c 20 69 6e 6e 65 72 0d  | . scroll inner.|
00004740  1f 68 22 62 6c 6f 63 6b  21 33 38 20 3d 20 69 66  |.h"block!38 = if|
00004750  25 20 3a 20 f4 20 69 6e  70 75 74 20 66 6f 63 75  |% : . input focu|
00004760  73 0d 1f 72 23 62 6c 6f  63 6b 21 33 39 20 3d 20  |s..r#block!39 = |
00004770  30 20 20 20 3a 20 f4 20  6d 75 73 74 20 62 65 20  |0   : . must be |
00004780  7a 65 72 6f 0d 1f 7c 26  62 6c 6f 63 6b 21 34 30  |zero..|&block!40|
00004790  20 3d 20 30 20 20 20 3a  20 f4 20 77 6f 72 6b 20  | = 0   : . work |
000047a0  61 72 65 61 20 6d 69 6e  20 78 0d 1f 86 2a 62 6c  |area min x...*bl|
000047b0  6f 63 6b 21 34 34 20 3d  20 28 79 31 25 2d 79 32  |ock!44 = (y1%-y2|
000047c0  25 29 3a f4 20 77 6f 72  6b 20 61 72 65 61 20 6d  |%):. work area m|
000047d0  69 6e 20 79 0d 1f 90 2a  62 6c 6f 63 6b 21 34 38  |in y...*block!48|
000047e0  20 3d 20 28 78 32 25 2d  78 31 25 29 3a f4 20 77  | = (x2%-x1%):. w|
000047f0  6f 72 6b 20 61 72 65 61  20 6d 61 78 20 78 0d 1f  |ork area max x..|
00004800  9a 26 62 6c 6f 63 6b 21  35 32 20 3d 20 30 20 20  |.&block!52 = 0  |
00004810  20 3a 20 f4 20 77 6f 72  6b 20 61 72 65 61 20 6d  | : . work area m|
00004820  61 78 20 79 0d 1f a4 26  62 6c 6f 63 6b 21 35 36  |ax y...&block!56|
00004830  20 3d 20 26 33 44 20 3a  20 f4 20 74 69 74 6c 65  | = &3D : . title|
00004840  20 62 61 72 20 66 6c 61  67 73 0d 1f ae 14 62 6c  | bar flags....bl|
00004850  6f 63 6b 21 36 30 20 3d  20 26 33 30 30 30 0d 1f  |ock!60 = &3000..|
00004860  b8 2e e7 20 74 69 74 6c  65 24 20 3d 20 22 4f 70  |... title$ = "Op|
00004870  74 69 6f 6e 73 22 20 8c  20 62 6c 6f 63 6b 21 36  |tions" . block!6|
00004880  34 20 3d 20 73 70 72 69  74 65 73 25 0d 1f c2 27  |4 = sprites%...'|
00004890  24 28 62 6c 6f 63 6b 2b  37 32 29 20 3d 20 74 69  |$(block+72) = ti|
000048a0  74 6c 65 24 20 3a 20 f4  20 74 69 74 6c 65 20 64  |tle$ : . title d|
000048b0  61 74 61 0d 1f cc 2e 62  6c 6f 63 6b 21 38 34 20  |ata....block!84 |
000048c0  3d 20 30 20 20 20 3a 20  f4 20 69 6e 69 74 69 61  |= 0   : . initia|
000048d0  6c 20 6e 75 6d 62 65 72  20 6f 66 20 69 63 6f 6e  |l number of icon|
000048e0  73 0d 1f d6 20 c8 99 20  63 72 65 61 74 65 57 25  |s... .. createW%|
000048f0  2c 2c 62 6c 6f 63 6b 20  b8 20 77 69 6e 64 6f 77  |,,block . window|
00004900  25 0d 1f e0 0c 3d 77 69  6e 64 6f 77 25 0d ff     |%....=window%..|
0000490f