Home » Archimedes archive » Micro User » MU 1991-04.adf » PD-Stuff » !VKiller/!RunImage

!VKiller/!RunImage

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

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

Tape/disk: Home » Archimedes archive » Micro User » MU 1991-04.adf » PD-Stuff
Filename: !VKiller/!RunImage
Read OK:
File size: 4127 bytes
Load address: 0000
Exec address: 0000
Duplicates

There are 5 duplicate copies of this file in the archive:

File contents
   10REM > <basicSave$Dir>.!RunImage
   20REM Virus Killer V1.10 (C) Richard K. Lloyd 1990
   30REM Currently kills the "Extend Virus" (see documentation)
   40REM
   50REM Recommended CD:
   60REM B-52's "Cosmic Thing". Weird at first, but it grows on you !
   70
   80REM General error trapper
   90ON ERROR PROCsystemerror
  100
  110quit%=FALSE:REM Nothing happened yet
  120PROCinit
  130REPEAT
  140   PROCwimp_poll
  150UNTIL quit%
  160
  170SYS "XWimp_CloseDown",task%,!taskconst%
  180SYS "OS_Exit"
  190
  200DEFPROCinit
  210size%=77*32:REM Max of 77 files per dir and 32 bytes per file info
  220maxboot%=&1400:REM 5K is largest allowed size for !Boot
  230maxlevel%=8:REM Allow for 8 levels of directory
  240DIM info% size%*maxlevel%,buff% maxboot%,fbuff% 12
  250icon$="IconSprites <Obey$Dir>.!Sprites"+CHR$(&A)
  260iconlen%=LEN(icon$)
  270protect$="| This file has been innoculated against the Extend Virus"+CHR$(&A)+"||"+CHR$(&FF)
  280protlen%=LEN(protect$)
  290extendhelp$="Extend"+CHR$(9)+CHR$(9)+"1.56 (08 Jul 1989)"
  300deffs$="ADFS":REM Default filing system
  310infect%=FALSE:still%=FALSE:REM No virus checks yet
  320nummem%=0:numdisk%=0:numinnoc%=0:numscans%=0:REM Reset counters
  330fsysnum%=0:fsys$="":REM Not checked filing system yet
  340innoc%=FALSE:REM Not innoculating by default
  350
  360REM Application Constants
  370prog$="VKiller":REM English text name of program
  380REM Change next line to date$=MID$(TIME$,5,11) to get the current date
  390date$="05 Dec 1990":REM Current date as a fixed string
  400vkillvar$="<VKiller$Dir>":REM VKiller environmental variable
  410iconbartype%=-1:REM -1 = Utility (RHS of bar), -2 = Service (LHS of bar)
  420windman%=200:REM Expect at LEAST V2.00 of the Window Manager
  430bl$=CHR$(0):REM NULL char used to terminate strings
  440dirscan%=16:REM Directory spec goes in this icon
  450status%=17:REM Status messages go in this icon
  460
  470REM Workspace for application
  480DIM vkillwind% &E00,infowind% &E00:REM Template workspace
  490DIM poll% 256:REM Wimp_Poll workspace
  500DIM icon% 48:REM Icon bar icon workspace
  510DIM menu% &100:REM Menu structure workspace
  520DIM taskconst% 8:$taskconst%="TASK":REM Store Task constant here
  530DIM icondata% 256:REM Temp workspace to get/put icon data
  540
  550REM Initialise WIMP
  560SYS "XWimp_Initialise",windman%,!taskconst%,prog$+bl$ TO windvers%,task%
  570IF windvers%<windman% THEN PROCfatal(prog$+" requires Window Manager V"+FNfraction(windman%)+" or later")
  580
  590PROCmakemenu:REM Construct menu (should be BEFORE template loading)
  600PROCgettemplates:REM Get window templates from file
  610PROCmakeicon:REM Create icon bar icon
  620PROCnextfs
  630PROCfinishscan
  640PROCputdata(status%,"Idle")
  650PROCscanmodules(FNgettaskhand(""))
  660ENDPROC
  670
  680DEFFNgettaskhand(taskname$)
  690REM This routine is unintentionally blank :-(
  700REM Although it is possible to get the name of a task given its handle,
  710REM there appears to be no way to get the reverse (Task Manager cheats -
  720REM it runs first of all and picks up Wimp_Initialise handles/names).
  730REM Can anyone out there complete this routine to return a task handle
  740REM given its name ? Pretty please ?
  750=0
  760
  770DEFPROCcheck(dir$,leafdir$,level%)
  780LOCAL off%,base%,num%,loop%,addr%,name$,fullname$,len%,gotboot%,type%
  790PROCwimp_poll
  800IF quit%=TRUE OR scanning%=FALSE:ENDPROC
  810IF level%=maxlevel% THEN
  820   PROCputdata(status%,"Dir level "+STR$(maxlevel%)+" - skipping deeper")
  830   ENDPROC
  840ENDIF
  850dir$=dir$+"."+leafdir$
  860PROCputdata(dirscan%,dir$)
  870off%=0:gotboot%=FALSE:base%=info%+level%*size%
  880REPEAT
  890   addr%=base%
  900   SYS "XOS_GBPB",10,dir$+CHR$(0),addr%,77,off%,size%,"*"+CHR$(0) TO ,,,num%,off%
  910   IF num% THEN
  920      FOR loop%=0 TO num%-1
  930         obj%=addr%!16
  940         len%=addr%!8:type%=(!addr%>>>8) AND &FFF
  950         addr%+=20:name$=FNgetstring(addr%)
  960         addr%=(addr%+4) DIV 4*4:REM Align to next word
  970         IF obj%=2 THEN
  980            PROCcheck(dir$,name$,level%+1)
  990         ELSE
 1000            fullname$=dir$+"."+name$
 1010            CASE FNlower(name$) OF
 1020            WHEN "!boot":gotboot%=TRUE
 1030                         IF type%=&FEB THEN
 1040                            PROCcheckboot(fullname$,len%)
 1050                         ENDIF
 1060            WHEN "monitorrm","checkmod","extendrm","osextend","colourrm","fastmod","coderm","memrm":
 1070                 IF len%=940 AND type%=&FFA THEN
 1080                    IF FNoscli("Load",fullname$,STR$~buff%)=FALSE THEN
 1090                       buff%!&34=0:REM Zero count due to bad load
 1100                    ENDIF
 1110                    PROCextendvirus("module",buff%)
 1120                    PROCdelmodule(fullname$)
 1130                 ENDIF
 1140            ENDCASE
 1150         ENDIF
 1160      NEXT
 1170   ENDIF
 1180UNTIL off%=-1 OR quit%=TRUE OR scanning%=FALSE
 1190IF gotboot%=FALSE AND ASC(leafdir$)=33 AND innoc%=TRUE AND quit%=FALSE AND scanning%=TRUE THEN
 1200   IF FNinnocboot(dir$+".!Boot",base%,0,FNexists(dir$+".!Sprites",&FF9)) THEN
 1210      PROCputdata(status%,"New innoculated !Boot created")
 1220   ENDIF
 1230ENDIF
 1240ENDPROC
 1250
 1260DEFPROCcheckboot(name$,l%)
 1270LOCAL doinnoc%
 1280IF l%>=maxboot% THEN
 1290   still%=TRUE:infect%=TRUE
 1300   PROCputdata(status%,"!Boot too big - not scanned")
 1310   ENDPROC
 1320ENDIF
 1330doinnoc%=innoc%
 1340SYS "XOS_CLI","Load "+name$+" "+STR$~buff%
 1350CASE buff%?(l%-1) OF
 1360WHEN &FF:CASE buff%?(l%-4) OF
 1370         WHEN 13:PROCextendvirus("in !Boot",0)
 1380                 PROCdiskinfect
 1390                 l%=l%-4:doinnoc%=TRUE
 1400                 WHILE l%>0 AND buff%?(l%-1)<>&D
 1410                    l%=l%-1
 1420                 ENDWHILE
 1430                 buff%?(l%-1)=&A
 1440         WHEN 10:doinnoc%=FALSE
 1450                 PROCputdata(status%,"!Boot already innoculated")
 1460         OTHERWISE doinnoc%=FALSE
 1470         ENDCASE
 1480WHEN &0A:REM Normal terminator
 1490OTHERWISE buff%?l%=&A:l%+=1:REM Add LF on end
 1500ENDCASE
 1510IF doinnoc% THEN
 1520   IF l%+protlen%+1>maxboot% THEN
 1530      still%=TRUE:infect%=TRUE
 1540      PROCputdata(status%,"!Boot too big - not innoculated")
 1550      ENDPROC
 1560   ENDIF
 1570   IF FNinnocboot(name$,buff%,l%,FALSE) THEN
 1580      PROCputdata(status%,"!Boot has now been innoculated")
 1590   ENDIF
 1600ENDIF
 1610ENDPROC
 1620
 1630DEFFNinnocboot(n$,a%,len%,addicon%)
 1640LOCAL good%:good%=FALSE
 1650IF addicon% THEN
 1660  $(a%+len%)=icon$
 1670  len%+=iconlen%
 1680ENDIF
 1690$(a%+len%)=protect$
 1700IF FNoscli("Save",n$,STR$~a%+" "+STR$~(a%+len%+protlen%)) THEN
 1710   IF FNoscli("SetType",n$,"Obey") THEN
 1720      numinnoc%+=1:good%=TRUE:PROCputdata(21,STR$(numinnoc%))
 1730   ENDIF
 1740ENDIF
 1750=good%
 1760
 1770DEFPROCextendvirus(mess$,addr%)
 1780LOCAL t%
 1790IF addr%:PROCputdata(dirscan%,"Execution Count: "+STR$(addr%!&34))
 1800PROCputdata(status%,"Extend Virus "+mess$+" found !")
 1810infect%=TRUE:PROCopenwindow
 1820t%=TIME+200:REM Delay to see message
 1830REPEAT
 1840   PROCwimp_poll
 1850UNTIL TIME>t% OR quit%
 1860ENDPROC
 1870
 1880DEFPROCdelmodule(m$)
 1890PROCdiskinfect
 1900IF FNoscli("Delete",m$,"") THEN
 1910   PROCputdata(status%,"Extend Virus module deleted")
 1920ENDIF
 1930ENDPROC
 1940
 1950DEFPROCdiskinfect
 1960numdisk%+=1:PROCputdata(20,STR$(numdisk%))
 1970ENDPROC
 1980
 1990DEFFNoscli(l$,m$,r$)
 2000LOCAL flags%,again%,errblk%
 2010REPEAT
 2020   IF l$="RMKill" THEN
 2030      SYS "XWimp_StartTask",l$+" "+m$+" "+r$+" { > null: }" TO errblk%;flags%
 2040   ELSE
 2050      SYS "XOS_CLI",l$+" "+m$+" "+r$+" { > null: }" TO errblk%;flags%
 2060   ENDIF
 2070   again%=FALSE
 2080   IF flags% AND 1 THEN
 2090      CASE !errblk% OF
 2100      WHEN &108C9:
 2110         again%=FNyesno("    Write-protected disk !     Retry disk write ?")
 2120      WHEN &108C3:again%=FNoscli("Access",m$,"WR")
 2130      OTHERWISE
 2140         IF !errblk%>&10000 THEN
 2150            PROCputdata(status%,"Couldn't perform disk write")
 2160         ELSE
 2170            PROCputdata(status%,"Couldn't delete Extend module")
 2180         ENDIF
 2190      ENDCASE
 2200      IF again%=FALSE:still%=TRUE
 2210   ENDIF
 2220UNTIL again%=FALSE
 2230=((flags% AND 1)=0)
 2240
 2250DEFFNwimperror(mess$,mask%)
 2260LOCAL click%
 2270SYS "XWimp_ReportError",STRING$(4,bl$)+mess$+bl$,mask%,"VKiller Warning"+bl$ TO ,click%
 2280=click%
 2290
 2300DEFFNyesno(mess$)=(FNwimperror(mess$,%10011)=1)
 2310
 2320DEFPROCwarn(mess$)
 2330LOCAL click%
 2340click%=FNwimperror(mess$,%10001)
 2350ENDPROC
 2360
 2370DEFPROCscanmodules(hand%)
 2380LOCAL module%,sub%,start%,flags%,help%
 2390REPEAT
 2400   SYS "XOS_Module",12,module%,sub% TO ,module%,sub%,start%;flags%
 2410   IF (flags% AND 1)=0 THEN
 2420      help%=start%+start%!&14
 2430      IF FNgetstring(help%)=extendhelp$ THEN
 2440         nummem%+=1:infect%=TRUE
 2450         PROCputdata(19,STR$(nummem%))
 2460         IF hand% THEN
 2470            REM This is a bug-fix :-) It allows the virus task
 2480            REM to shutdown properly without crashing the Task Manager
 2490            start%!&40=hand%:REM Save task handle
 2500            P%=start%+&70
 2510            [OPT 0
 2520            LDR R2,start%+&64:CMP R2,#1:SWIGT "XOS_Module"
 2530            LDR R0,start%+&40:LDR R1,start%+&54
 2540            ]
 2550         ELSE
 2560            PROCwarn("Task Manager is unstable !     Do not use it")
 2570         ENDIF
 2580         PROCextendvirus("in RMA",start%)
 2590         IF FNoscli("RMKill","Extend","") THEN
 2600             PROCputdata(status%,"Extend Virus killed from RMA")
 2610         ELSE
 2620             still%=TRUE
 2630         ENDIF
 2640      ENDIF
 2650   ENDIF
 2660UNTIL flags% AND 1
 2670ENDPROC
 2680
 2690DEFFNexists(file$,type%)
 2700LOCAL found%,ftype%
 2710SYS "XOS_File",5,file$ TO found%,,ftype%
 2720ftype%=(ftype%>>>8) AND &FFF
 2730=(found%=1 AND type%=ftype%)
 2740
 2750DEFFNupper(s$)
 2760LOCAL loop%,n$,A%,C%,Z%
 2770A%=ASC"a":Z%=ASC"z"
 2780FOR loop%=1 TO LEN(s$)
 2790   C%=ASCMID$(s$,loop%)
 2800   IF C%>=A% AND C%<=Z% C%-=32
 2810   n$+=CHR$C%
 2820NEXT
 2830=n$
 2840
 2850DEFFNlower(s$)
 2860LOCAL loop%,n$,A%,C%,Z%
 2870A%=ASC"A":Z%=ASC"Z"
 2880FOR loop%=1 TO LEN(s$)
 2890   C%=ASCMID$(s$,loop%)
 2900   IF C%>=A% AND C%<=Z% C%+=32
 2910   n$+=CHR$C%
 2920NEXT
 2930=n$
 2940
 2950DEFFNgetstring(RETURN addr%)
 2960LOCAL s$:s$=""
 2970WHILE ?addr%>31:s$=s$+CHR$(?addr%):addr%+=1:ENDWHILE
 2980=s$
 2990
 3000DEFPROCwimp_poll
 3010LOCAL reason%
 3020SYS "XWimp_Poll",0,poll% TO reason%
 3030CASE reason% OF
 3040WHEN 2:SYS "XWimp_OpenWindow",,poll%:REM Info window drag
 3050WHEN 3:PROCclosewindow
 3060WHEN 6:PROCmouseclick
 3070WHEN 9:PROCmenuselect
 3080WHEN 17,18:PROCwimpmessage
 3090ENDCASE
 3100ENDPROC
 3110
 3120DEFPROCclosewindow
 3130SYS "XWimp_CloseWindow",,vkillwind%:REM Eval close box
 3140ENDPROC
 3150
 3160DEFPROCmouseclick
 3170CASE poll%!8 OF
 3180   WHEN 1,4:PROCstartup
 3190   WHEN   2:PROCshownewmenu
 3200ENDCASE
 3210ENDPROC
 3220
 3230DEFPROCshownewmenu
 3240LOCAL y%
 3250IF poll%!12=-2:y%=96+!spacing*numitems% ELSE y%=poll%!4+16
 3260oldx%=!poll%-64:oldy%=y%
 3270PROCshowoldmenu
 3280ENDPROC
 3290
 3300DEFPROCshowoldmenu
 3310SYS "XWimp_CreateMenu",,menu%,oldx%,oldy%
 3320ENDPROC
 3330
 3340DEFPROCopenwindow
 3350vkillwind%!28=-1:REM Open on top of everyone else
 3360SYS "XWimp_OpenWindow",,vkillwind%
 3370ENDPROC
 3380
 3390DEFPROCstartup
 3400CASE poll%!12 OF
 3410   WHEN -2:PROCopenwindow
 3420   WHEN vkillhand%:
 3430      CASE poll%!16 OF
 3440      WHEN 7:IF scanning%=FALSE:PROCnextfs:REM Filing system change
 3450      WHEN 8,9,10,11,12,13,14,15:IF scanning%=FALSE:drive%=poll%!16-8:REM Drive change
 3460      WHEN 23:IF scanning%:PROCfinishscan ELSE PROCstartscan
 3470      WHEN 24:innoc%=NOT innoc%
 3480      ENDCASE
 3490ENDCASE
 3500ENDPROC
 3510
 3520DEFPROCmenuselect
 3530LOCAL mouse%,item%:item%=!poll%+1
 3540SYS "XWimp_GetPointerInfo",,poll%:mouse%=poll%!8
 3550CASE item% OF
 3560   WHEN numitems%:quit%=TRUE:REM Last Item = Quit
 3570ENDCASE
 3580IF mouse%=1:PROCshowoldmenu
 3590ENDPROC
 3600
 3610DEFPROCwimpmessage
 3620CASE poll%!16 OF
 3630   WHEN      0:quit%=TRUE:REM Shut down (Desktop Exit, Task Manager Quit)
 3640   WHEN &400C2:PROCappstart
 3650ENDCASE
 3660ENDPROC
 3670
 3680DEFPROCappstart
 3690REM Unlike, ahem, certain Acorn applications we could mention, it really
 3700REM is nice to make sure only one invocation of the program has been
 3710REM activated - this is done by checking a new task's name/handle
 3720LOCAL A%,B%,same%
 3730IF poll%!4<>task% THEN
 3740   A%=poll%+28:B%=-1
 3750   IF ?A% THEN
 3760      REPEAT
 3770         B%+=1:same%=(A%?B%=ASC(MID$(prog$+bl$,B%+1)))
 3780      UNTIL A%?B%=0 OR NOT same%
 3790      IF same%:quit%=TRUE
 3800   ELSE
 3810      PROCscanmodules(poll%!4)
 3820   ENDIF
 3830ENDIF
 3840ENDPROC
 3850
 3860DEFPROCputdata(icon%,mess$)
 3870REM Change icon 'icon%' to the string mess$
 3880REM Note that this assumes an indirected icon of course !
 3890!icondata%=vkillhand%:icondata%!4=icon%
 3900SYS "XWimp_GetIconState",,icondata%
 3910$(icondata%!28)=mess$
 3920SYS "XWimp_ForceRedraw",vkillhand%,icondata%!8,icondata%!12,icondata%!16,icondata%!20
 3930ENDPROC
 3940
 3950DEFFNgetdata(wind%,icon%)
 3960REM Read the value of icon 'icon%' in window 'wind%'
 3970REM Note that this assumes an indirected icon of course !
 3980!icondata%=wind%:icondata%!4=icon%
 3990SYS "XWimp_GetIconState",,icondata%
 4000=$(icondata%!28)
 4010
 4020DEFPROCmakeicon
 4030P%=icon%:REM Use built in assembler - easier to see structure
 4040[OPT 0
 4050                EQUD    iconbartype%    ; Icon bar 'utility' flag
 4060                EQUD    0               ; Bottom left X
 4070                EQUD    0               ; Bottom left Y
 4080                EQUD    69              ; Top right X
 4090                EQUD    68              ; Top right Y
 4100                EQUB    %00000010       ; Icon is a sprite
 4110                EQUB    %00110001       ; Click notifies/Indirected
 4120                EQUB    %00000000       ; Nothing special about icon
 4130                EQUB    %00000001       ; Forecol = 1, Backcol = 0
 4140.pokespname     EQUD    pokespname+12   ; Pointer to sprite name
 4150                EQUD    1               ; Pointer to WIMP sprites
 4160                EQUD    12              ; Length of sprite name
 4170.spritename     EQUS    "!vkiller"+STRING$(4,bl$) ; Sprite name
 4180]
 4190SYS "XWimp_CreateIcon",,icon% TO iconhand%
 4200ENDPROC
 4210
 4220DEFPROCmakemenu
 4230numitems%=2:REM Change if you add more
 4240P%=menu%:REM Use assembler
 4250[OPT 0
 4260                EQUS    prog$+STRING$(12-LEN(prog$),bl$) ; Menu title
 4270                EQUB    7       ; Foreground colour
 4280                EQUB    2       ; Background colour
 4290                EQUB    7       ; Work foregrd colour
 4300                EQUB    0       ; Work backgrd colour
 4310                EQUD    148     ; Total width
 4320.spacing        EQUD    44      ; Total height
 4330                EQUD    0       ; Line spacing
 4340; Item #1
 4350                EQUD    0       ; Nothing special
 4360.submenupoke    EQUD    0       ; Sub-menu addr poked in here
 4370                EQUD    (7<<24) OR 1 ; Item is text & black
 4380                EQUS    "Info       "+bl$
 4390; Item #2
 4400                EQUD    &80     ; Last menu item
 4410                EQUD    -1      ; No sub-menu
 4420                EQUD    (7<<24) OR 1 ; Item is text & black
 4430                EQUS    "Quit       "+bl$
 4440]
 4450ENDPROC
 4460
 4470DEFPROCgettemplates
 4480LOCAL flags%,dummy%
 4490SYS "XWimp_OpenTemplate",,vkillvar$+".Templates" TO ;flags%
 4500IF flags% AND 1:PROCfatal("Missing Templates file for "+prog$)
 4510vkillhand%=FNloadtemplate(vkillwind%,"VKillWindow")
 4520!submenupoke=FNloadtemplate(infowind%,"Info")
 4530SYS "XWimp_CloseTemplate"
 4540ENDPROC
 4550
 4560DEFFNloadtemplate(addr%,wind$)
 4570REM Note the +4 on the address - this allows the poking of the handle
 4580LOCAL windhand%,windptr%
 4590SYS "XWimp_LoadTemplate",,addr%+4,addr%+&700,addr%+&E00,-1,wind$,0 TO ,,,,,,windptr%
 4600IF windptr%=0:PROCfatal("Missing "+wind$+" window from "+prog$+"'s Templates file")
 4610SYS "XWimp_CreateWindow",,addr%+4 TO windhand%
 4620!addr%=windhand%:REM Store window handle because needed by later calls
 4630=windhand%
 4640
 4650DEFPROCsystemerror
 4660REM Why do I need this proc ? Well, the Wimp doesn't report the
 4670REM offending line number of an error !
 4680LOCAL err$
 4690IF ERR:err$=" at line "+STR$(ERL) ELSE err$=""
 4700ON ERROR OFF
 4710PROCfatal(REPORT$+err$)
 4720ENDPROC
 4730
 4740DEFPROCfatal(error$)
 4750OSCLI"Error 0 "+error$
 4760ENDPROC
 4770
 4780DEFPROCnextfs
 4790LOCAL fsname%,oldfsys$,swi$,swiname$,numflop%,numhard%,loop%
 4800oldfsys$=fsys$:fsys$=""
 4810REPEAT
 4820   fsysnum%+=1:IF fsysnum%>255:fsysnum%=1
 4830   SYS "XOS_FSControl",33,fsysnum%,fbuff%,12 TO ,,fsname%
 4840   IF ?fsname% THEN
 4850      fsys$=FNgetstring(fsname%)
 4860      CASE fsys$ OF
 4870      WHEN "null","printer","serial","vdu","rawvdu","kbd","rawkbd","deskfs","msdos":fsys$="":REM Not infectable
 4880      ENDCASE
 4890   ENDIF
 4900UNTIL fsys$<>""
 4910IF oldfsys$<>fsys$ THEN
 4920   CASE fsys$ OF
 4930   WHEN "net":swiname$="NetFS":REM Is this right ?
 4940   OTHERWISE swiname$=FNupper(fsys$)
 4950   ENDCASE
 4960   swi$="X"+swiname$+"_Drives"
 4970   IF FNcheckswi(swi$) THEN
 4980      SYS swi$ TO drive%,numflop%,numhard%
 4990      IF drive%>=numflop% AND numhard%=0 OR drive%>=numhard%+4:drive%=0
 5000   ELSE
 5010      numflop%=1:numhard%=0:drive%=0
 5020   ENDIF
 5030   PROCputdata(7,fsys$)
 5040   FOR loop%=0 TO 7
 5050      PROCallowdrive(loop%,(loop%<4 AND numflop%>loop%) OR (loop%>3 AND numhard%+4>loop%),(loop%=drive%))
 5060   NEXT
 5070ENDIF
 5080ENDPROC
 5090
 5100DEFFNcheckswi(swi$)
 5110LOCAL swi%,flags%
 5120SYS "XOS_SWINumberFromString",,swi$ TO swi%;flags%
 5130=((flags% AND 1)=0)
 5140
 5150DEFPROChackflags(icon%,eor%,clear%)
 5160!icondata%=vkillhand%
 5170icondata%!4=icon%
 5180icondata%!8=eor%
 5190icondata%!12=clear%
 5200SYS "XWimp_SetIconState",,icondata%
 5210ENDPROC
 5220
 5230DEFPROChilite(icon%,bool%)
 5240PROChackflags(icon%,((-bool%)<<21),&00200000)
 5250ENDPROC
 5260
 5270DEFPROCallowdrive(drv%,bool%,hilite%)
 5280bool%=-bool%
 5290PROChackflags(drv%+8,(bool%<<16)+11*(bool%<<12)+((15-bool%*6)<<28),&F01FF000)
 5300PROChilite(drv%+8,hilite%)
 5310ENDPROC
 5320
 5330DEFPROCfinishscan
 5340PROCputdata(23,"Start Drive Scan")
 5350PROCputdata(dirscan%,"Idle")
 5360scanning%=FALSE
 5370ENDPROC
 5380
 5390DEFPROCstartscan
 5400LOCAL prefix$
 5410PROCputdata(23,"Stop Drive Scan")
 5420scanning%=TRUE:infect%=FALSE:still%=FALSE
 5430prefix$=fsys$+"::"+STR$(drive%)
 5440PROCputdata(status%,"Drive Scan started")
 5450PROCcheck(prefix$,"$",0)
 5460IF scanning% THEN
 5470   numscans%+=1:PROCputdata(22,STR$(numscans%))
 5480   PROChilite(23,FALSE)
 5490   IF infect% THEN
 5500      IF still% THEN
 5510         PROCputdata(status%,prefix$+" may still be infected !")
 5520      ELSE
 5530         PROCputdata(status%,prefix$+" was infected, but now clean")
 5540      ENDIF
 5550   ELSE
 5560      PROCputdata(status%,prefix$+" is clean - no infections")
 5570   ENDIF
 5580   PROCopenwindow
 5590ELSE
 5600   PROCputdata(status%,"Drive Scan manually aborted")
 5610ENDIF
 5620PROCfinishscan
 5630ENDPROC

!� > <basicSave$Dir>.!RunImage
2� Virus Killer V1.10 (C) Richard K. Lloyd 1990
<� Currently kills the "Extend Virus" (see documentation)
(�
2� Recommended CD:
<B� B-52's "Cosmic Thing". Weird at first, but it grows on you !
F
P� General error trapper
Z� � �systemerror
d
n"quit%=�:� Nothing happened yet
x	�init
��
�   �wimp_poll
�� quit%
�
�*ș "XWimp_CloseDown",task%,!taskconst%
�ș "OS_Exit"
�
�
��init
�Dsize%=77*32:� Max of 77 files per dir and 32 bytes per file info
�9maxboot%=&1400:� 5K is largest allowed size for !Boot
�1maxlevel%=8:� Allow for 8 levels of directory
�4� info% size%*maxlevel%,buff% maxboot%,fbuff% 12
�1icon$="IconSprites <Obey$Dir>.!Sprites"+�(&A)
iconlen%=�(icon$)
Zprotect$="| This file has been innoculated against the Extend Virus"+�(&A)+"||"+�(&FF)
protlen%=�(protect$)
"7extendhelp$="Extend"+�(9)+�(9)+"1.56 (08 Jul 1989)"
,)deffs$="ADFS":� Default filing system
6,infect%=�:still%=�:� No virus checks yet
@Anummem%=0:numdisk%=0:numinnoc%=0:numscans%=0:� Reset counters
J7fsysnum%=0:fsys$="":� Not checked filing system yet
T*innoc%=�:� Not innoculating by default
^
h� Application Constants
r2prog$="VKiller":� English text name of program
|H� Change next line to date$=MID$(TIME$,5,11) to get the current date
�8date$="05 Dec 1990":� Current date as a fixed string
�>vkillvar$="<VKiller$Dir>":� VKiller environmental variable
�Jiconbartype%=-1:� -1 = Utility (RHS of bar), -2 = Service (LHS of bar)
�>windman%=200:� Expect at LEAST V2.00 of the Window Manager
�2bl$=�(0):� NULL char used to terminate strings
�2dirscan%=16:� Directory spec goes in this icon
�0status%=17:� Status messages go in this icon
�
�� Workspace for application
�9� vkillwind% &E00,infowind% &E00:� Template workspace
�%� poll% 256:� Wimp_Poll workspace
�(� icon% 48:� Icon bar icon workspace
�+� menu% &100:� Menu structure workspace
@� taskconst% 8:$taskconst%="TASK":� Store Task constant here
9� icondata% 256:� Temp workspace to get/put icon data

&� Initialise WIMP
0Jș "XWimp_Initialise",windman%,!taskconst%,prog$+bl$ � windvers%,task%
:e� windvers%<windman% � �fatal(prog$+" requires Window Manager V"+�fraction(windman%)+" or later")
D
NB�makemenu:� Construct menu (should be BEFORE template loading)
X2�gettemplates:� Get window templates from file
b$�makeicon:� Create icon bar icon
l�nextfs
v�finishscan
��putdata(status%,"Idle")
�"�scanmodules(�gettaskhand(""))
��
�
�ݤgettaskhand(taskname$)
�/� This routine is unintentionally blank :-(
�I� Although it is possible to get the name of a task given its handle,
�J� there appears to be no way to get the reverse (Task Manager cheats -
�G� it runs first of all and picks up Wimp_Initialise handles/names).
�H� Can anyone out there complete this routine to return a task handle
�&� given its name ? Pretty please ?
�=0
�
!��check(dir$,leafdir$,level%)
E� off%,base%,num%,loop%,addr%,name$,fullname$,len%,gotboot%,type%
�wimp_poll
 � quit%=� � scanning%=�:�
*� level%=maxlevel% �
4G   �putdata(status%,"Dir level "+�(maxlevel%)+" - skipping deeper")
>   �
H�
Rdir$=dir$+"."+leafdir$
\�putdata(dirscan%,dir$)
f.off%=0:gotboot%=�:base%=info%+level%*size%
p�
z   addr%=base%
�M   ș "XOS_GBPB",10,dir$+�(0),addr%,77,off%,size%,"*"+�(0) � ,,,num%,off%
�   � num% �
�      � loop%=0 � num%-1
�         obj%=addr%!16
�3         len%=addr%!8:type%=(!addr%>>>8) � &FFF
�.         addr%+=20:name$=�getstring(addr%)
�7         addr%=(addr%+4) � 4*4:� Align to next word
�         � obj%=2 �
�+            �check(dir$,name$,level%+1)
�         �
�(            fullname$=dir$+"."+name$
�"            Ȏ �lower(name$) �
�$            � "!boot":gotboot%=�
+                         � type%=&FEB �
:                            �checkboot(fullname$,len%)
                         �
$e            � "monitorrm","checkmod","extendrm","osextend","colourrm","fastmod","coderm","memrm":
..                 � len%=940 � type%=&FFA �
8>                    � �oscli("Load",fullname$,�~buff%)=� �
BC                       buff%!&34=0:� Zero count due to bad load
L                    �
V4                    �extendvirus("module",buff%)
`-                    �delmodule(fullname$)
j                 �
t            �
~         �
�      �
�   �
�%� off%=-1 � quit%=� � scanning%=�
�F� gotboot%=� � �(leafdir$)=33 � innoc%=� � quit%=� � scanning%=� �
�K   � �innocboot(dir$+".!Boot",base%,0,�exists(dir$+".!Sprites",&FF9)) �
�;      �putdata(status%,"New innoculated !Boot created")
�   �
��
��
�
���checkboot(name$,l%)
�� doinnoc%
� l%>=maxboot% �

   still%=�:infect%=�
6   �putdata(status%,"!Boot too big - not scanned")
   �
(�
2doinnoc%=innoc%
<*ș "XOS_CLI","Load "+name$+" "+�~buff%
FȎ buff%?(l%-1) �
P� &FF:Ȏ buff%?(l%-4) �
Z,         � 13:�extendvirus("in !Boot",0)
d                  �diskinfect
n'                 l%=l%-4:doinnoc%=�
x/                 ȕ l%>0 � buff%?(l%-1)<>&D
�                    l%=l%-1
�                 �
�$                 buff%?(l%-1)=&A
�         � 10:doinnoc%=�
�B                 �putdata(status%,"!Boot already innoculated")
�          doinnoc%=�
�         �
�� &0A:� Normal terminator
�' buff%?l%=&A:l%+=1:� Add LF on end
��
�� doinnoc% �
�!   � l%+protlen%+1>maxboot% �
�      still%=�:infect%=�
=      �putdata(status%,"!Boot too big - not innoculated")
      �
   �
"'   � �innocboot(name$,buff%,l%,�) �
,<      �putdata(status%,"!Boot has now been innoculated")
6   �
@�
J�
T
^$ݤinnocboot(n$,a%,len%,addicon%)
h� good%:good%=�
r� addicon% �
|  $(a%+len%)=icon$
�  len%+=iconlen%
��
�$(a%+len%)=protect$
�7� �oscli("Save",n$,�~a%+" "+�~(a%+len%+protlen%)) �
�&   � �oscli("SetType",n$,"Obey") �
�8      numinnoc%+=1:good%=�:�putdata(21,�(numinnoc%))
�   �
��
�
=good%
�
���extendvirus(mess$,addr%)
�� t%
�?� addr%:�putdata(dirscan%,"Execution Count: "+�(addr%!&34))
6�putdata(status%,"Extend Virus "+mess$+" found !")
infect%=�:�openwindow
#t%=�+200:� Delay to see message
&�
0   �wimp_poll
:� �>t% � quit%
D�
N
X��delmodule(m$)
b�diskinfect
l� �oscli("Delete",m$,"") �
v6   �putdata(status%,"Extend Virus module deleted")
��
��
�
���diskinfect
�(numdisk%+=1:�putdata(20,�(numdisk%))
��
�
�ݤoscli(l$,m$,r$)
�� flags%,again%,errblk%
��
�   � l$="RMKill" �
�O      ș "XWimp_StartTask",l$+" "+m$+" "+r$+" { > null: }" � errblk%;flags%
�   �
G      ș "XOS_CLI",l$+" "+m$+" "+r$+" { > null: }" � errblk%;flags%
   �
   again%=�
    � flags% � 1 �
*      Ȏ !errblk% �
4      � &108C9:
>O         again%=�yesno("    Write-protected disk !     Retry disk write ?")
H2      � &108C3:again%=�oscli("Access",m$,"WR")
R      
\          � !errblk%>&10000 �
f?            �putdata(status%,"Couldn't perform disk write")
p         �
zA            �putdata(status%,"Couldn't delete Extend module")
�         �
�      �
�      � again%=�:still%=�
�   �
�� again%=�
�=((flags% � 1)=0)
�
�ݤwimperror(mess$,mask%)
�� click%
�Rș "XWimp_ReportError",�4,bl$)+mess$+bl$,mask%,"VKiller Warning"+bl$ � ,click%
�=click%
�
�/ݤyesno(mess$)=(�wimperror(mess$,%10011)=1)
	
	��warn(mess$)
	� click%
	$#click%=�wimperror(mess$,%10001)
	.�
	8
	B��scanmodules(hand%)
	L&� module%,sub%,start%,flags%,help%
	V�
	`D   ș "XOS_Module",12,module%,sub% � ,module%,sub%,start%;flags%
	j   � (flags% � 1)=0 �
	t!      help%=start%+start%!&14
	~+      � �getstring(help%)=extendhelp$ �
	�!         nummem%+=1:infect%=�
	�$         �putdata(19,�(nummem%))
	�         � hand% �
	�@            � This is a bug-fix :-) It allows the virus task
	�H            � to shutdown properly without crashing the Task Manager
	�3            start%!&40=hand%:� Save task handle
	�            P%=start%+&70
	�            [OPT 0
	�>            LDR R2,start%+&64:CMP R2,#1:SWIGT "XOS_Module"
	�3            LDR R0,start%+&40:LDR R1,start%+&54
	�            ]
	�         �
E            �warn("Task Manager is unstable !     Do not use it")

         �
*         �extendvirus("in RMA",start%)
-         � �oscli("RMKill","Extend","") �
(A             �putdata(status%,"Extend Virus killed from RMA")
2         �
<             still%=�
F         �
P      �
Z   �
d� flags% � 1
n�
x
�ݤexists(file$,type%)
�� found%,ftype%
�*ș "XOS_File",5,file$ � found%,,ftype%
�ftype%=(ftype%>>>8) � &FFF
�=(found%=1 � type%=ftype%)
�
�ݤupper(s$)
�� loop%,n$,A%,C%,Z%
�A%=�"a":Z%=�"z"
�� loop%=1 � �(s$)
�   C%=��s$,loop%)
�   � C%>=A% � C%<=Z% C%-=32
�   n$+=�C%
�
=n$

"ݤlower(s$)
,� loop%,n$,A%,C%,Z%
6A%=�"A":Z%=�"Z"
@� loop%=1 � �(s$)
J   C%=��s$,loop%)
T   � C%>=A% � C%<=Z% C%+=32
^   n$+=�C%
h�
r=n$
|
�ݤgetstring(� addr%)
�� s$:s$=""
�+ȕ ?addr%>31:s$=s$+�(?addr%):addr%+=1:�
�=s$
�
���wimp_poll
�
� reason%
�%ș "XWimp_Poll",0,poll% � reason%
�Ȏ reason% �
�7� 2:ș "XWimp_OpenWindow",,poll%:� Info window drag
�� 3:�closewindow
�� 6:�mouseclick
�� 9:�menuselect
� 17,18:�wimpmessage
�
�
&
0��closewindow
:7ș "XWimp_CloseWindow",,vkillwind%:� Eval close box
D�
N
X��mouseclick
bȎ poll%!8 �
l   � 1,4:�startup
v   �   2:�shownewmenu
��
��
�
���shownewmenu
�� y%
�:� poll%!12=-2:y%=96+!spacing*numitems% � y%=poll%!4+16
�oldx%=!poll%-64:oldy%=y%
��showoldmenu
��
�
���showoldmenu
�,ș "XWimp_CreateMenu",,menu%,oldx%,oldy%
��



��openwindow

3vkillwind%!28=-1:� Open on top of everyone else

 %ș "XWimp_OpenWindow",,vkillwind%

*�

4

>
��startup

HȎ poll%!12 �

R   � -2:�openwindow

\   � vkillhand%:

f      Ȏ poll%!16 �

p:      � 7:� scanning%=�:�nextfs:� Filing system change

zP      � 8,9,10,11,12,13,14,15:� scanning%=�:drive%=poll%!16-8:� Drive change

�3      � 23:� scanning%:�finishscan � �startscan

�      � 24:innoc%=� innoc%

�      �

��

��

�

���menuselect

�!� mouse%,item%:item%=!poll%+1

�3ș "XWimp_GetPointerInfo",,poll%:mouse%=poll%!8

�Ȏ item% �

�-   � numitems%:quit%=�:� Last Item = Quit

��

�� mouse%=1:�showoldmenu
�

��wimpmessage
$Ȏ poll%!16 �
.E   �      0:quit%=�:� Shut down (Desktop Exit, Task Manager Quit)
8   � &400C2:�appstart
B�
L�
V
`��appstart
jJ� Unlike, ahem, certain Acorn applications we could mention, it really
tF� is nice to make sure only one invocation of the program has been
~C� activated - this is done by checking a new task's name/handle
�� A%,B%,same%
�� poll%!4<>task% �
�   A%=poll%+28:B%=-1
�   � ?A% �
�      �
�4         B%+=1:same%=(A%?B%=�(�prog$+bl$,B%+1)))
�      � A%?B%=0 � � same%
�      � same%:quit%=�
�   �
�      �scanmodules(poll%!4)
�   �
��
�


��putdata(icon%,mess$)
-� Change icon 'icon%' to the string mess$
(;� Note that this assumes an indirected icon of course !
2+!icondata%=vkillhand%:icondata%!4=icon%
<&ș "XWimp_GetIconState",,icondata%
F$(icondata%!28)=mess$
PXș "XWimp_ForceRedraw",vkillhand%,icondata%!8,icondata%!12,icondata%!16,icondata%!20
Z�
d
nݤgetdata(wind%,icon%)
x6� Read the value of icon 'icon%' in window 'wind%'
�;� Note that this assumes an indirected icon of course !
�&!icondata%=wind%:icondata%!4=icon%
�&ș "XWimp_GetIconState",,icondata%
�=$(icondata%!28)
�
���makeicon
�?P%=icon%:� Use built in assembler - easier to see structure
�
[OPT 0
�E                EQUD    iconbartype%    ; Icon bar 'utility' flag
�;                EQUD    0               ; Bottom left X
�;                EQUD    0               ; Bottom left Y
�9                EQUD    69              ; Top right X
�9                EQUD    68              ; Top right Y
>                EQUB    %00000010       ; Icon is a sprite
G                EQUB    %00110001       ; Click notifies/Indirected
H                EQUB    %00000000       ; Nothing special about icon
"F                EQUB    %00000001       ; Forecol = 1, Backcol = 0
,D.pokespname     EQUD    pokespname+12   ; Pointer to sprite name
6E                EQUD    1               ; Pointer to WIMP sprites
@C                EQUD    12              ; Length of sprite name
J<.spritename     EQUS    "!vkiller"+�4,bl$) ; Sprite name
T]
^,ș "XWimp_CreateIcon",,icon% � iconhand%
h�
r
|��makemenu
�(numitems%=2:� Change if you add more
�P%=menu%:� Use assembler
�
[OPT 0
�@                EQUS    prog$+�12-�(prog$),bl$) ; Menu title
�7                EQUB    7       ; Foreground colour
�7                EQUB    2       ; Background colour
�9                EQUB    7       ; Work foregrd colour
�9                EQUB    0       ; Work backgrd colour
�1                EQUD    148     ; Total width
�2.spacing        EQUD    44      ; Total height
�2                EQUD    0       ; Line spacing
�
; Item #1
�5                EQUD    0       ; Nothing special
A.submenupoke    EQUD    0       ; Sub-menu addr poked in here
>                EQUD    (7<<24) � 1 ; Item is text & black
-                EQUS    "Info       "+bl$
&
; Item #2
04                EQUD    &80     ; Last menu item
:1                EQUD    -1      ; No sub-menu
D>                EQUD    (7<<24) � 1 ; Item is text & black
N-                EQUS    "Quit       "+bl$
X]
b�
l
v��gettemplates
�� flags%,dummy%
�=ș "XWimp_OpenTemplate",,vkillvar$+".Templates" � ;flags%
�<� flags% � 1:�fatal("Missing Templates file for "+prog$)
�6vkillhand%=�loadtemplate(vkillwind%,"VKillWindow")
�0!submenupoke=�loadtemplate(infowind%,"Info")
�ș "XWimp_CloseTemplate"
��
�
�ݤloadtemplate(addr%,wind$)
�G� Note the +4 on the address - this allows the poking of the handle
�� windhand%,windptr%
�Vș "XWimp_LoadTemplate",,addr%+4,addr%+&700,addr%+&E00,-1,wind$,0 � ,,,,,,windptr%
�S� windptr%=0:�fatal("Missing "+wind$+" window from "+prog$+"'s Templates file")
0ș "XWimp_CreateWindow",,addr%+4 � windhand%
H!addr%=windhand%:� Store window handle because needed by later calls
=windhand%
 
*��systemerror
4A� Why do I need this proc ? Well, the Wimp doesn't report the
>)� offending line number of an error !
H
� err$
R'� �:err$=" at line "+�(�) � err$=""
\	� � �
f�fatal(�$+err$)
p�
z
���fatal(error$)
��"Error 0 "+error$
��
�
���nextfs
�<� fsname%,oldfsys$,swi$,swiname$,numflop%,numhard%,loop%
�oldfsys$=fsys$:fsys$=""
��
�,   fsysnum%+=1:� fsysnum%>255:fsysnum%=1
�;   ș "XOS_FSControl",33,fsysnum%,fbuff%,12 � ,,fsname%
�   � ?fsname% �
�#      fsys$=�getstring(fsname%)
�      Ȏ fsys$ �
n      � "null","printer","serial","vdu","rawvdu","kbd","rawkbd","deskfs","msdos":fsys$="":� Not infectable
      �
   �
$� fsys$<>""
.� oldfsys$<>fsys$ �
8   Ȏ fsys$ �
B1   � "net":swiname$="NetFS":� Is this right ?
L    swiname$=�upper(fsys$)
V   �
`"   swi$="X"+swiname$+"_Drives"
j   � �checkswi(swi$) �
t,      ș swi$ � drive%,numflop%,numhard%
~G      � drive%>=numflop% � numhard%=0 � drive%>=numhard%+4:drive%=0
�   �
�(      numflop%=1:numhard%=0:drive%=0
�   �
�   �putdata(7,fsys$)
�   � loop%=0 � 7
�e      �allowdrive(loop%,(loop%<4 � numflop%>loop%) � (loop%>3 � numhard%+4>loop%),(loop%=drive%))
�   �
��
��
�
�ݤcheckswi(swi$)
�� swi%,flags%
4ș "XOS_SWINumberFromString",,swi$ � swi%;flags%

=((flags% � 1)=0)

"��hackflags(icon%,eor%,clear%)
(!icondata%=vkillhand%
2icondata%!4=icon%
<icondata%!8=eor%
Ficondata%!12=clear%
P&ș "XWimp_SetIconState",,icondata%
Z�
d
n��hilite(icon%,bool%)
x.�hackflags(icon%,((-bool%)<<21),&00200000)
��
�
�$��allowdrive(drv%,bool%,hilite%)
�bool%=-bool%
�N�hackflags(drv%+8,(bool%<<16)+11*(bool%<<12)+((15-bool%*6)<<28),&F01FF000)
��hilite(drv%+8,hilite%)
��
�
���finishscan
�#�putdata(23,"Start Drive Scan")
��putdata(dirscan%,"Idle")
�scanning%=�
��

��startscan

� prefix$
""�putdata(23,"Stop Drive Scan")
,"scanning%=�:infect%=�:still%=�
6 prefix$=fsys$+"::"+�(drive%)
@*�putdata(status%,"Drive Scan started")
J�check(prefix$,"$",0)
T� scanning% �
^-   numscans%+=1:�putdata(22,�(numscans%))
h   �hilite(23,�)
r   � infect% �
|      � still% �
�A         �putdata(status%,prefix$+" may still be infected !")
�      �
�E         �putdata(status%,prefix$+" was infected, but now clean")
�      �
�   �
�?      �putdata(status%,prefix$+" is clean - no infections")
�   �
�   �openwindow
��
�6   �putdata(status%,"Drive Scan manually aborted")
��
��finishscan
��
�
00000000  0d 00 0a 21 f4 20 3e 20  3c 62 61 73 69 63 53 61  |...!. > <basicSa|
00000010  76 65 24 44 69 72 3e 2e  21 52 75 6e 49 6d 61 67  |ve$Dir>.!RunImag|
00000020  65 0d 00 14 32 f4 20 56  69 72 75 73 20 4b 69 6c  |e...2. Virus Kil|
00000030  6c 65 72 20 56 31 2e 31  30 20 28 43 29 20 52 69  |ler V1.10 (C) Ri|
00000040  63 68 61 72 64 20 4b 2e  20 4c 6c 6f 79 64 20 31  |chard K. Lloyd 1|
00000050  39 39 30 0d 00 1e 3c f4  20 43 75 72 72 65 6e 74  |990...<. Current|
00000060  6c 79 20 6b 69 6c 6c 73  20 74 68 65 20 22 45 78  |ly kills the "Ex|
00000070  74 65 6e 64 20 56 69 72  75 73 22 20 28 73 65 65  |tend Virus" (see|
00000080  20 64 6f 63 75 6d 65 6e  74 61 74 69 6f 6e 29 0d  | documentation).|
00000090  00 28 05 f4 0d 00 32 15  f4 20 52 65 63 6f 6d 6d  |.(....2.. Recomm|
000000a0  65 6e 64 65 64 20 43 44  3a 0d 00 3c 42 f4 20 42  |ended CD:..<B. B|
000000b0  2d 35 32 27 73 20 22 43  6f 73 6d 69 63 20 54 68  |-52's "Cosmic Th|
000000c0  69 6e 67 22 2e 20 57 65  69 72 64 20 61 74 20 66  |ing". Weird at f|
000000d0  69 72 73 74 2c 20 62 75  74 20 69 74 20 67 72 6f  |irst, but it gro|
000000e0  77 73 20 6f 6e 20 79 6f  75 20 21 0d 00 46 04 0d  |ws on you !..F..|
000000f0  00 50 1b f4 20 47 65 6e  65 72 61 6c 20 65 72 72  |.P.. General err|
00000100  6f 72 20 74 72 61 70 70  65 72 0d 00 5a 14 ee 20  |or trapper..Z.. |
00000110  85 20 f2 73 79 73 74 65  6d 65 72 72 6f 72 0d 00  |. .systemerror..|
00000120  64 04 0d 00 6e 22 71 75  69 74 25 3d a3 3a f4 20  |d...n"quit%=.:. |
00000130  4e 6f 74 68 69 6e 67 20  68 61 70 70 65 6e 65 64  |Nothing happened|
00000140  20 79 65 74 0d 00 78 09  f2 69 6e 69 74 0d 00 82  | yet..x..init...|
00000150  05 f5 0d 00 8c 11 20 20  20 f2 77 69 6d 70 5f 70  |......   .wimp_p|
00000160  6f 6c 6c 0d 00 96 0b fd  20 71 75 69 74 25 0d 00  |oll..... quit%..|
00000170  a0 04 0d 00 aa 2a c8 99  20 22 58 57 69 6d 70 5f  |.....*.. "XWimp_|
00000180  43 6c 6f 73 65 44 6f 77  6e 22 2c 74 61 73 6b 25  |CloseDown",task%|
00000190  2c 21 74 61 73 6b 63 6f  6e 73 74 25 0d 00 b4 10  |,!taskconst%....|
000001a0  c8 99 20 22 4f 53 5f 45  78 69 74 22 0d 00 be 04  |.. "OS_Exit"....|
000001b0  0d 00 c8 0a dd f2 69 6e  69 74 0d 00 d2 44 73 69  |......init...Dsi|
000001c0  7a 65 25 3d 37 37 2a 33  32 3a f4 20 4d 61 78 20  |ze%=77*32:. Max |
000001d0  6f 66 20 37 37 20 66 69  6c 65 73 20 70 65 72 20  |of 77 files per |
000001e0  64 69 72 20 61 6e 64 20  33 32 20 62 79 74 65 73  |dir and 32 bytes|
000001f0  20 70 65 72 20 66 69 6c  65 20 69 6e 66 6f 0d 00  | per file info..|
00000200  dc 39 6d 61 78 62 6f 6f  74 25 3d 26 31 34 30 30  |.9maxboot%=&1400|
00000210  3a f4 20 35 4b 20 69 73  20 6c 61 72 67 65 73 74  |:. 5K is largest|
00000220  20 61 6c 6c 6f 77 65 64  20 73 69 7a 65 20 66 6f  | allowed size fo|
00000230  72 20 21 42 6f 6f 74 0d  00 e6 31 6d 61 78 6c 65  |r !Boot...1maxle|
00000240  76 65 6c 25 3d 38 3a f4  20 41 6c 6c 6f 77 20 66  |vel%=8:. Allow f|
00000250  6f 72 20 38 20 6c 65 76  65 6c 73 20 6f 66 20 64  |or 8 levels of d|
00000260  69 72 65 63 74 6f 72 79  0d 00 f0 34 de 20 69 6e  |irectory...4. in|
00000270  66 6f 25 20 73 69 7a 65  25 2a 6d 61 78 6c 65 76  |fo% size%*maxlev|
00000280  65 6c 25 2c 62 75 66 66  25 20 6d 61 78 62 6f 6f  |el%,buff% maxboo|
00000290  74 25 2c 66 62 75 66 66  25 20 31 32 0d 00 fa 31  |t%,fbuff% 12...1|
000002a0  69 63 6f 6e 24 3d 22 49  63 6f 6e 53 70 72 69 74  |icon$="IconSprit|
000002b0  65 73 20 3c 4f 62 65 79  24 44 69 72 3e 2e 21 53  |es <Obey$Dir>.!S|
000002c0  70 72 69 74 65 73 22 2b  bd 28 26 41 29 0d 01 04  |prites"+.(&A)...|
000002d0  15 69 63 6f 6e 6c 65 6e  25 3d a9 28 69 63 6f 6e  |.iconlen%=.(icon|
000002e0  24 29 0d 01 0e 5a 70 72  6f 74 65 63 74 24 3d 22  |$)...Zprotect$="|
000002f0  7c 20 54 68 69 73 20 66  69 6c 65 20 68 61 73 20  || This file has |
00000300  62 65 65 6e 20 69 6e 6e  6f 63 75 6c 61 74 65 64  |been innoculated|
00000310  20 61 67 61 69 6e 73 74  20 74 68 65 20 45 78 74  | against the Ext|
00000320  65 6e 64 20 56 69 72 75  73 22 2b bd 28 26 41 29  |end Virus"+.(&A)|
00000330  2b 22 7c 7c 22 2b bd 28  26 46 46 29 0d 01 18 18  |+"||"+.(&FF)....|
00000340  70 72 6f 74 6c 65 6e 25  3d a9 28 70 72 6f 74 65  |protlen%=.(prote|
00000350  63 74 24 29 0d 01 22 37  65 78 74 65 6e 64 68 65  |ct$).."7extendhe|
00000360  6c 70 24 3d 22 45 78 74  65 6e 64 22 2b bd 28 39  |lp$="Extend"+.(9|
00000370  29 2b bd 28 39 29 2b 22  31 2e 35 36 20 28 30 38  |)+.(9)+"1.56 (08|
00000380  20 4a 75 6c 20 31 39 38  39 29 22 0d 01 2c 29 64  | Jul 1989)"..,)d|
00000390  65 66 66 73 24 3d 22 41  44 46 53 22 3a f4 20 44  |effs$="ADFS":. D|
000003a0  65 66 61 75 6c 74 20 66  69 6c 69 6e 67 20 73 79  |efault filing sy|
000003b0  73 74 65 6d 0d 01 36 2c  69 6e 66 65 63 74 25 3d  |stem..6,infect%=|
000003c0  a3 3a 73 74 69 6c 6c 25  3d a3 3a f4 20 4e 6f 20  |.:still%=.:. No |
000003d0  76 69 72 75 73 20 63 68  65 63 6b 73 20 79 65 74  |virus checks yet|
000003e0  0d 01 40 41 6e 75 6d 6d  65 6d 25 3d 30 3a 6e 75  |..@Anummem%=0:nu|
000003f0  6d 64 69 73 6b 25 3d 30  3a 6e 75 6d 69 6e 6e 6f  |mdisk%=0:numinno|
00000400  63 25 3d 30 3a 6e 75 6d  73 63 61 6e 73 25 3d 30  |c%=0:numscans%=0|
00000410  3a f4 20 52 65 73 65 74  20 63 6f 75 6e 74 65 72  |:. Reset counter|
00000420  73 0d 01 4a 37 66 73 79  73 6e 75 6d 25 3d 30 3a  |s..J7fsysnum%=0:|
00000430  66 73 79 73 24 3d 22 22  3a f4 20 4e 6f 74 20 63  |fsys$="":. Not c|
00000440  68 65 63 6b 65 64 20 66  69 6c 69 6e 67 20 73 79  |hecked filing sy|
00000450  73 74 65 6d 20 79 65 74  0d 01 54 2a 69 6e 6e 6f  |stem yet..T*inno|
00000460  63 25 3d a3 3a f4 20 4e  6f 74 20 69 6e 6e 6f 63  |c%=.:. Not innoc|
00000470  75 6c 61 74 69 6e 67 20  62 79 20 64 65 66 61 75  |ulating by defau|
00000480  6c 74 0d 01 5e 04 0d 01  68 1b f4 20 41 70 70 6c  |lt..^...h.. Appl|
00000490  69 63 61 74 69 6f 6e 20  43 6f 6e 73 74 61 6e 74  |ication Constant|
000004a0  73 0d 01 72 32 70 72 6f  67 24 3d 22 56 4b 69 6c  |s..r2prog$="VKil|
000004b0  6c 65 72 22 3a f4 20 45  6e 67 6c 69 73 68 20 74  |ler":. English t|
000004c0  65 78 74 20 6e 61 6d 65  20 6f 66 20 70 72 6f 67  |ext name of prog|
000004d0  72 61 6d 0d 01 7c 48 f4  20 43 68 61 6e 67 65 20  |ram..|H. Change |
000004e0  6e 65 78 74 20 6c 69 6e  65 20 74 6f 20 64 61 74  |next line to dat|
000004f0  65 24 3d 4d 49 44 24 28  54 49 4d 45 24 2c 35 2c  |e$=MID$(TIME$,5,|
00000500  31 31 29 20 74 6f 20 67  65 74 20 74 68 65 20 63  |11) to get the c|
00000510  75 72 72 65 6e 74 20 64  61 74 65 0d 01 86 38 64  |urrent date...8d|
00000520  61 74 65 24 3d 22 30 35  20 44 65 63 20 31 39 39  |ate$="05 Dec 199|
00000530  30 22 3a f4 20 43 75 72  72 65 6e 74 20 64 61 74  |0":. Current dat|
00000540  65 20 61 73 20 61 20 66  69 78 65 64 20 73 74 72  |e as a fixed str|
00000550  69 6e 67 0d 01 90 3e 76  6b 69 6c 6c 76 61 72 24  |ing...>vkillvar$|
00000560  3d 22 3c 56 4b 69 6c 6c  65 72 24 44 69 72 3e 22  |="<VKiller$Dir>"|
00000570  3a f4 20 56 4b 69 6c 6c  65 72 20 65 6e 76 69 72  |:. VKiller envir|
00000580  6f 6e 6d 65 6e 74 61 6c  20 76 61 72 69 61 62 6c  |onmental variabl|
00000590  65 0d 01 9a 4a 69 63 6f  6e 62 61 72 74 79 70 65  |e...Jiconbartype|
000005a0  25 3d 2d 31 3a f4 20 2d  31 20 3d 20 55 74 69 6c  |%=-1:. -1 = Util|
000005b0  69 74 79 20 28 52 48 53  20 6f 66 20 62 61 72 29  |ity (RHS of bar)|
000005c0  2c 20 2d 32 20 3d 20 53  65 72 76 69 63 65 20 28  |, -2 = Service (|
000005d0  4c 48 53 20 6f 66 20 62  61 72 29 0d 01 a4 3e 77  |LHS of bar)...>w|
000005e0  69 6e 64 6d 61 6e 25 3d  32 30 30 3a f4 20 45 78  |indman%=200:. Ex|
000005f0  70 65 63 74 20 61 74 20  4c 45 41 53 54 20 56 32  |pect at LEAST V2|
00000600  2e 30 30 20 6f 66 20 74  68 65 20 57 69 6e 64 6f  |.00 of the Windo|
00000610  77 20 4d 61 6e 61 67 65  72 0d 01 ae 32 62 6c 24  |w Manager...2bl$|
00000620  3d bd 28 30 29 3a f4 20  4e 55 4c 4c 20 63 68 61  |=.(0):. NULL cha|
00000630  72 20 75 73 65 64 20 74  6f 20 74 65 72 6d 69 6e  |r used to termin|
00000640  61 74 65 20 73 74 72 69  6e 67 73 0d 01 b8 32 64  |ate strings...2d|
00000650  69 72 73 63 61 6e 25 3d  31 36 3a f4 20 44 69 72  |irscan%=16:. Dir|
00000660  65 63 74 6f 72 79 20 73  70 65 63 20 67 6f 65 73  |ectory spec goes|
00000670  20 69 6e 20 74 68 69 73  20 69 63 6f 6e 0d 01 c2  | in this icon...|
00000680  30 73 74 61 74 75 73 25  3d 31 37 3a f4 20 53 74  |0status%=17:. St|
00000690  61 74 75 73 20 6d 65 73  73 61 67 65 73 20 67 6f  |atus messages go|
000006a0  20 69 6e 20 74 68 69 73  20 69 63 6f 6e 0d 01 cc  | in this icon...|
000006b0  04 0d 01 d6 1f f4 20 57  6f 72 6b 73 70 61 63 65  |...... Workspace|
000006c0  20 66 6f 72 20 61 70 70  6c 69 63 61 74 69 6f 6e  | for application|
000006d0  0d 01 e0 39 de 20 76 6b  69 6c 6c 77 69 6e 64 25  |...9. vkillwind%|
000006e0  20 26 45 30 30 2c 69 6e  66 6f 77 69 6e 64 25 20  | &E00,infowind% |
000006f0  26 45 30 30 3a f4 20 54  65 6d 70 6c 61 74 65 20  |&E00:. Template |
00000700  77 6f 72 6b 73 70 61 63  65 0d 01 ea 25 de 20 70  |workspace...%. p|
00000710  6f 6c 6c 25 20 32 35 36  3a f4 20 57 69 6d 70 5f  |oll% 256:. Wimp_|
00000720  50 6f 6c 6c 20 77 6f 72  6b 73 70 61 63 65 0d 01  |Poll workspace..|
00000730  f4 28 de 20 69 63 6f 6e  25 20 34 38 3a f4 20 49  |.(. icon% 48:. I|
00000740  63 6f 6e 20 62 61 72 20  69 63 6f 6e 20 77 6f 72  |con bar icon wor|
00000750  6b 73 70 61 63 65 0d 01  fe 2b de 20 6d 65 6e 75  |kspace...+. menu|
00000760  25 20 26 31 30 30 3a f4  20 4d 65 6e 75 20 73 74  |% &100:. Menu st|
00000770  72 75 63 74 75 72 65 20  77 6f 72 6b 73 70 61 63  |ructure workspac|
00000780  65 0d 02 08 40 de 20 74  61 73 6b 63 6f 6e 73 74  |e...@. taskconst|
00000790  25 20 38 3a 24 74 61 73  6b 63 6f 6e 73 74 25 3d  |% 8:$taskconst%=|
000007a0  22 54 41 53 4b 22 3a f4  20 53 74 6f 72 65 20 54  |"TASK":. Store T|
000007b0  61 73 6b 20 63 6f 6e 73  74 61 6e 74 20 68 65 72  |ask constant her|
000007c0  65 0d 02 12 39 de 20 69  63 6f 6e 64 61 74 61 25  |e...9. icondata%|
000007d0  20 32 35 36 3a f4 20 54  65 6d 70 20 77 6f 72 6b  | 256:. Temp work|
000007e0  73 70 61 63 65 20 74 6f  20 67 65 74 2f 70 75 74  |space to get/put|
000007f0  20 69 63 6f 6e 20 64 61  74 61 0d 02 1c 04 0d 02  | icon data......|
00000800  26 15 f4 20 49 6e 69 74  69 61 6c 69 73 65 20 57  |&.. Initialise W|
00000810  49 4d 50 0d 02 30 4a c8  99 20 22 58 57 69 6d 70  |IMP..0J.. "XWimp|
00000820  5f 49 6e 69 74 69 61 6c  69 73 65 22 2c 77 69 6e  |_Initialise",win|
00000830  64 6d 61 6e 25 2c 21 74  61 73 6b 63 6f 6e 73 74  |dman%,!taskconst|
00000840  25 2c 70 72 6f 67 24 2b  62 6c 24 20 b8 20 77 69  |%,prog$+bl$ . wi|
00000850  6e 64 76 65 72 73 25 2c  74 61 73 6b 25 0d 02 3a  |ndvers%,task%..:|
00000860  65 e7 20 77 69 6e 64 76  65 72 73 25 3c 77 69 6e  |e. windvers%<win|
00000870  64 6d 61 6e 25 20 8c 20  f2 66 61 74 61 6c 28 70  |dman% . .fatal(p|
00000880  72 6f 67 24 2b 22 20 72  65 71 75 69 72 65 73 20  |rog$+" requires |
00000890  57 69 6e 64 6f 77 20 4d  61 6e 61 67 65 72 20 56  |Window Manager V|
000008a0  22 2b a4 66 72 61 63 74  69 6f 6e 28 77 69 6e 64  |"+.fraction(wind|
000008b0  6d 61 6e 25 29 2b 22 20  6f 72 20 6c 61 74 65 72  |man%)+" or later|
000008c0  22 29 0d 02 44 04 0d 02  4e 42 f2 6d 61 6b 65 6d  |")..D...NB.makem|
000008d0  65 6e 75 3a f4 20 43 6f  6e 73 74 72 75 63 74 20  |enu:. Construct |
000008e0  6d 65 6e 75 20 28 73 68  6f 75 6c 64 20 62 65 20  |menu (should be |
000008f0  42 45 46 4f 52 45 20 74  65 6d 70 6c 61 74 65 20  |BEFORE template |
00000900  6c 6f 61 64 69 6e 67 29  0d 02 58 32 f2 67 65 74  |loading)..X2.get|
00000910  74 65 6d 70 6c 61 74 65  73 3a f4 20 47 65 74 20  |templates:. Get |
00000920  77 69 6e 64 6f 77 20 74  65 6d 70 6c 61 74 65 73  |window templates|
00000930  20 66 72 6f 6d 20 66 69  6c 65 0d 02 62 24 f2 6d  | from file..b$.m|
00000940  61 6b 65 69 63 6f 6e 3a  f4 20 43 72 65 61 74 65  |akeicon:. Create|
00000950  20 69 63 6f 6e 20 62 61  72 20 69 63 6f 6e 0d 02  | icon bar icon..|
00000960  6c 0b f2 6e 65 78 74 66  73 0d 02 76 0f f2 66 69  |l..nextfs..v..fi|
00000970  6e 69 73 68 73 63 61 6e  0d 02 80 1c f2 70 75 74  |nishscan.....put|
00000980  64 61 74 61 28 73 74 61  74 75 73 25 2c 22 49 64  |data(status%,"Id|
00000990  6c 65 22 29 0d 02 8a 22  f2 73 63 61 6e 6d 6f 64  |le")...".scanmod|
000009a0  75 6c 65 73 28 a4 67 65  74 74 61 73 6b 68 61 6e  |ules(.gettaskhan|
000009b0  64 28 22 22 29 29 0d 02  94 05 e1 0d 02 9e 04 0d  |d(""))..........|
000009c0  02 a8 1c dd a4 67 65 74  74 61 73 6b 68 61 6e 64  |.....gettaskhand|
000009d0  28 74 61 73 6b 6e 61 6d  65 24 29 0d 02 b2 2f f4  |(taskname$).../.|
000009e0  20 54 68 69 73 20 72 6f  75 74 69 6e 65 20 69 73  | This routine is|
000009f0  20 75 6e 69 6e 74 65 6e  74 69 6f 6e 61 6c 6c 79  | unintentionally|
00000a00  20 62 6c 61 6e 6b 20 3a  2d 28 0d 02 bc 49 f4 20  | blank :-(...I. |
00000a10  41 6c 74 68 6f 75 67 68  20 69 74 20 69 73 20 70  |Although it is p|
00000a20  6f 73 73 69 62 6c 65 20  74 6f 20 67 65 74 20 74  |ossible to get t|
00000a30  68 65 20 6e 61 6d 65 20  6f 66 20 61 20 74 61 73  |he name of a tas|
00000a40  6b 20 67 69 76 65 6e 20  69 74 73 20 68 61 6e 64  |k given its hand|
00000a50  6c 65 2c 0d 02 c6 4a f4  20 74 68 65 72 65 20 61  |le,...J. there a|
00000a60  70 70 65 61 72 73 20 74  6f 20 62 65 20 6e 6f 20  |ppears to be no |
00000a70  77 61 79 20 74 6f 20 67  65 74 20 74 68 65 20 72  |way to get the r|
00000a80  65 76 65 72 73 65 20 28  54 61 73 6b 20 4d 61 6e  |everse (Task Man|
00000a90  61 67 65 72 20 63 68 65  61 74 73 20 2d 0d 02 d0  |ager cheats -...|
00000aa0  47 f4 20 69 74 20 72 75  6e 73 20 66 69 72 73 74  |G. it runs first|
00000ab0  20 6f 66 20 61 6c 6c 20  61 6e 64 20 70 69 63 6b  | of all and pick|
00000ac0  73 20 75 70 20 57 69 6d  70 5f 49 6e 69 74 69 61  |s up Wimp_Initia|
00000ad0  6c 69 73 65 20 68 61 6e  64 6c 65 73 2f 6e 61 6d  |lise handles/nam|
00000ae0  65 73 29 2e 0d 02 da 48  f4 20 43 61 6e 20 61 6e  |es)....H. Can an|
00000af0  79 6f 6e 65 20 6f 75 74  20 74 68 65 72 65 20 63  |yone out there c|
00000b00  6f 6d 70 6c 65 74 65 20  74 68 69 73 20 72 6f 75  |omplete this rou|
00000b10  74 69 6e 65 20 74 6f 20  72 65 74 75 72 6e 20 61  |tine to return a|
00000b20  20 74 61 73 6b 20 68 61  6e 64 6c 65 0d 02 e4 26  | task handle...&|
00000b30  f4 20 67 69 76 65 6e 20  69 74 73 20 6e 61 6d 65  |. given its name|
00000b40  20 3f 20 50 72 65 74 74  79 20 70 6c 65 61 73 65  | ? Pretty please|
00000b50  20 3f 0d 02 ee 06 3d 30  0d 02 f8 04 0d 03 02 21  | ?....=0.......!|
00000b60  dd f2 63 68 65 63 6b 28  64 69 72 24 2c 6c 65 61  |..check(dir$,lea|
00000b70  66 64 69 72 24 2c 6c 65  76 65 6c 25 29 0d 03 0c  |fdir$,level%)...|
00000b80  45 ea 20 6f 66 66 25 2c  62 61 73 65 25 2c 6e 75  |E. off%,base%,nu|
00000b90  6d 25 2c 6c 6f 6f 70 25  2c 61 64 64 72 25 2c 6e  |m%,loop%,addr%,n|
00000ba0  61 6d 65 24 2c 66 75 6c  6c 6e 61 6d 65 24 2c 6c  |ame$,fullname$,l|
00000bb0  65 6e 25 2c 67 6f 74 62  6f 6f 74 25 2c 74 79 70  |en%,gotboot%,typ|
00000bc0  65 25 0d 03 16 0e f2 77  69 6d 70 5f 70 6f 6c 6c  |e%.....wimp_poll|
00000bd0  0d 03 20 1d e7 20 71 75  69 74 25 3d b9 20 84 20  |.. .. quit%=. . |
00000be0  73 63 61 6e 6e 69 6e 67  25 3d a3 3a e1 0d 03 2a  |scanning%=.:...*|
00000bf0  18 e7 20 6c 65 76 65 6c  25 3d 6d 61 78 6c 65 76  |.. level%=maxlev|
00000c00  65 6c 25 20 8c 0d 03 34  47 20 20 20 f2 70 75 74  |el% ...4G   .put|
00000c10  64 61 74 61 28 73 74 61  74 75 73 25 2c 22 44 69  |data(status%,"Di|
00000c20  72 20 6c 65 76 65 6c 20  22 2b c3 28 6d 61 78 6c  |r level "+.(maxl|
00000c30  65 76 65 6c 25 29 2b 22  20 2d 20 73 6b 69 70 70  |evel%)+" - skipp|
00000c40  69 6e 67 20 64 65 65 70  65 72 22 29 0d 03 3e 08  |ing deeper")..>.|
00000c50  20 20 20 e1 0d 03 48 05  cd 0d 03 52 1a 64 69 72  |   ...H....R.dir|
00000c60  24 3d 64 69 72 24 2b 22  2e 22 2b 6c 65 61 66 64  |$=dir$+"."+leafd|
00000c70  69 72 24 0d 03 5c 1b f2  70 75 74 64 61 74 61 28  |ir$..\..putdata(|
00000c80  64 69 72 73 63 61 6e 25  2c 64 69 72 24 29 0d 03  |dirscan%,dir$)..|
00000c90  66 2e 6f 66 66 25 3d 30  3a 67 6f 74 62 6f 6f 74  |f.off%=0:gotboot|
00000ca0  25 3d a3 3a 62 61 73 65  25 3d 69 6e 66 6f 25 2b  |%=.:base%=info%+|
00000cb0  6c 65 76 65 6c 25 2a 73  69 7a 65 25 0d 03 70 05  |level%*size%..p.|
00000cc0  f5 0d 03 7a 12 20 20 20  61 64 64 72 25 3d 62 61  |...z.   addr%=ba|
00000cd0  73 65 25 0d 03 84 4d 20  20 20 c8 99 20 22 58 4f  |se%...M   .. "XO|
00000ce0  53 5f 47 42 50 42 22 2c  31 30 2c 64 69 72 24 2b  |S_GBPB",10,dir$+|
00000cf0  bd 28 30 29 2c 61 64 64  72 25 2c 37 37 2c 6f 66  |.(0),addr%,77,of|
00000d00  66 25 2c 73 69 7a 65 25  2c 22 2a 22 2b bd 28 30  |f%,size%,"*"+.(0|
00000d10  29 20 b8 20 2c 2c 2c 6e  75 6d 25 2c 6f 66 66 25  |) . ,,,num%,off%|
00000d20  0d 03 8e 0f 20 20 20 e7  20 6e 75 6d 25 20 8c 0d  |....   . num% ..|
00000d30  03 98 1c 20 20 20 20 20  20 e3 20 6c 6f 6f 70 25  |...      . loop%|
00000d40  3d 30 20 b8 20 6e 75 6d  25 2d 31 0d 03 a2 1a 20  |=0 . num%-1.... |
00000d50  20 20 20 20 20 20 20 20  6f 62 6a 25 3d 61 64 64  |        obj%=add|
00000d60  72 25 21 31 36 0d 03 ac  33 20 20 20 20 20 20 20  |r%!16...3       |
00000d70  20 20 6c 65 6e 25 3d 61  64 64 72 25 21 38 3a 74  |  len%=addr%!8:t|
00000d80  79 70 65 25 3d 28 21 61  64 64 72 25 3e 3e 3e 38  |ype%=(!addr%>>>8|
00000d90  29 20 80 20 26 46 46 46  0d 03 b6 2e 20 20 20 20  |) . &FFF....    |
00000da0  20 20 20 20 20 61 64 64  72 25 2b 3d 32 30 3a 6e  |     addr%+=20:n|
00000db0  61 6d 65 24 3d a4 67 65  74 73 74 72 69 6e 67 28  |ame$=.getstring(|
00000dc0  61 64 64 72 25 29 0d 03  c0 37 20 20 20 20 20 20  |addr%)...7      |
00000dd0  20 20 20 61 64 64 72 25  3d 28 61 64 64 72 25 2b  |   addr%=(addr%+|
00000de0  34 29 20 81 20 34 2a 34  3a f4 20 41 6c 69 67 6e  |4) . 4*4:. Align|
00000df0  20 74 6f 20 6e 65 78 74  20 77 6f 72 64 0d 03 ca  | to next word...|
00000e00  17 20 20 20 20 20 20 20  20 20 e7 20 6f 62 6a 25  |.         . obj%|
00000e10  3d 32 20 8c 0d 03 d4 2b  20 20 20 20 20 20 20 20  |=2 ....+        |
00000e20  20 20 20 20 f2 63 68 65  63 6b 28 64 69 72 24 2c  |    .check(dir$,|
00000e30  6e 61 6d 65 24 2c 6c 65  76 65 6c 25 2b 31 29 0d  |name$,level%+1).|
00000e40  03 de 0e 20 20 20 20 20  20 20 20 20 cc 0d 03 e8  |...         ....|
00000e50  28 20 20 20 20 20 20 20  20 20 20 20 20 66 75 6c  |(            ful|
00000e60  6c 6e 61 6d 65 24 3d 64  69 72 24 2b 22 2e 22 2b  |lname$=dir$+"."+|
00000e70  6e 61 6d 65 24 0d 03 f2  22 20 20 20 20 20 20 20  |name$..."       |
00000e80  20 20 20 20 20 c8 8e 20  a4 6c 6f 77 65 72 28 6e  |     .. .lower(n|
00000e90  61 6d 65 24 29 20 ca 0d  03 fc 24 20 20 20 20 20  |ame$) ....$     |
00000ea0  20 20 20 20 20 20 20 c9  20 22 21 62 6f 6f 74 22  |       . "!boot"|
00000eb0  3a 67 6f 74 62 6f 6f 74  25 3d b9 0d 04 06 2b 20  |:gotboot%=....+ |
00000ec0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000ed0  20 20 20 20 20 20 20 20  e7 20 74 79 70 65 25 3d  |        . type%=|
00000ee0  26 46 45 42 20 8c 0d 04  10 3a 20 20 20 20 20 20  |&FEB ....:      |
00000ef0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000f00  20 20 20 20 20 20 f2 63  68 65 63 6b 62 6f 6f 74  |      .checkboot|
00000f10  28 66 75 6c 6c 6e 61 6d  65 24 2c 6c 65 6e 25 29  |(fullname$,len%)|
00000f20  0d 04 1a 1e 20 20 20 20  20 20 20 20 20 20 20 20  |....            |
00000f30  20 20 20 20 20 20 20 20  20 20 20 20 20 cd 0d 04  |             ...|
00000f40  24 65 20 20 20 20 20 20  20 20 20 20 20 20 c9 20  |$e            . |
00000f50  22 6d 6f 6e 69 74 6f 72  72 6d 22 2c 22 63 68 65  |"monitorrm","che|
00000f60  63 6b 6d 6f 64 22 2c 22  65 78 74 65 6e 64 72 6d  |ckmod","extendrm|
00000f70  22 2c 22 6f 73 65 78 74  65 6e 64 22 2c 22 63 6f  |","osextend","co|
00000f80  6c 6f 75 72 72 6d 22 2c  22 66 61 73 74 6d 6f 64  |lourrm","fastmod|
00000f90  22 2c 22 63 6f 64 65 72  6d 22 2c 22 6d 65 6d 72  |","coderm","memr|
00000fa0  6d 22 3a 0d 04 2e 2e 20  20 20 20 20 20 20 20 20  |m":....         |
00000fb0  20 20 20 20 20 20 20 20  e7 20 6c 65 6e 25 3d 39  |        . len%=9|
00000fc0  34 30 20 80 20 74 79 70  65 25 3d 26 46 46 41 20  |40 . type%=&FFA |
00000fd0  8c 0d 04 38 3e 20 20 20  20 20 20 20 20 20 20 20  |...8>           |
00000fe0  20 20 20 20 20 20 20 20  20 e7 20 a4 6f 73 63 6c  |         . .oscl|
00000ff0  69 28 22 4c 6f 61 64 22  2c 66 75 6c 6c 6e 61 6d  |i("Load",fullnam|
00001000  65 24 2c c3 7e 62 75 66  66 25 29 3d a3 20 8c 0d  |e$,.~buff%)=. ..|
00001010  04 42 43 20 20 20 20 20  20 20 20 20 20 20 20 20  |.BC             |
00001020  20 20 20 20 20 20 20 20  20 20 62 75 66 66 25 21  |          buff%!|
00001030  26 33 34 3d 30 3a f4 20  5a 65 72 6f 20 63 6f 75  |&34=0:. Zero cou|
00001040  6e 74 20 64 75 65 20 74  6f 20 62 61 64 20 6c 6f  |nt due to bad lo|
00001050  61 64 0d 04 4c 19 20 20  20 20 20 20 20 20 20 20  |ad..L.          |
00001060  20 20 20 20 20 20 20 20  20 20 cd 0d 04 56 34 20  |          ...V4 |
00001070  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001080  20 20 20 f2 65 78 74 65  6e 64 76 69 72 75 73 28  |   .extendvirus(|
00001090  22 6d 6f 64 75 6c 65 22  2c 62 75 66 66 25 29 0d  |"module",buff%).|
000010a0  04 60 2d 20 20 20 20 20  20 20 20 20 20 20 20 20  |.`-             |
000010b0  20 20 20 20 20 20 20 f2  64 65 6c 6d 6f 64 75 6c  |       .delmodul|
000010c0  65 28 66 75 6c 6c 6e 61  6d 65 24 29 0d 04 6a 16  |e(fullname$)..j.|
000010d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000010e0  20 cd 0d 04 74 11 20 20  20 20 20 20 20 20 20 20  | ...t.          |
000010f0  20 20 cb 0d 04 7e 0e 20  20 20 20 20 20 20 20 20  |  ...~.         |
00001100  cd 0d 04 88 0b 20 20 20  20 20 20 ed 0d 04 92 08  |.....      .....|
00001110  20 20 20 cd 0d 04 9c 25  fd 20 6f 66 66 25 3d 2d  |   ....%. off%=-|
00001120  31 20 84 20 71 75 69 74  25 3d b9 20 84 20 73 63  |1 . quit%=. . sc|
00001130  61 6e 6e 69 6e 67 25 3d  a3 0d 04 a6 46 e7 20 67  |anning%=....F. g|
00001140  6f 74 62 6f 6f 74 25 3d  a3 20 80 20 97 28 6c 65  |otboot%=. . .(le|
00001150  61 66 64 69 72 24 29 3d  33 33 20 80 20 69 6e 6e  |afdir$)=33 . inn|
00001160  6f 63 25 3d b9 20 80 20  71 75 69 74 25 3d a3 20  |oc%=. . quit%=. |
00001170  80 20 73 63 61 6e 6e 69  6e 67 25 3d b9 20 8c 0d  |. scanning%=. ..|
00001180  04 b0 4b 20 20 20 e7 20  a4 69 6e 6e 6f 63 62 6f  |..K   . .innocbo|
00001190  6f 74 28 64 69 72 24 2b  22 2e 21 42 6f 6f 74 22  |ot(dir$+".!Boot"|
000011a0  2c 62 61 73 65 25 2c 30  2c a4 65 78 69 73 74 73  |,base%,0,.exists|
000011b0  28 64 69 72 24 2b 22 2e  21 53 70 72 69 74 65 73  |(dir$+".!Sprites|
000011c0  22 2c 26 46 46 39 29 29  20 8c 0d 04 ba 3b 20 20  |",&FF9)) ....;  |
000011d0  20 20 20 20 f2 70 75 74  64 61 74 61 28 73 74 61  |    .putdata(sta|
000011e0  74 75 73 25 2c 22 4e 65  77 20 69 6e 6e 6f 63 75  |tus%,"New innocu|
000011f0  6c 61 74 65 64 20 21 42  6f 6f 74 20 63 72 65 61  |lated !Boot crea|
00001200  74 65 64 22 29 0d 04 c4  08 20 20 20 cd 0d 04 ce  |ted")....   ....|
00001210  05 cd 0d 04 d8 05 e1 0d  04 e2 04 0d 04 ec 19 dd  |................|
00001220  f2 63 68 65 63 6b 62 6f  6f 74 28 6e 61 6d 65 24  |.checkboot(name$|
00001230  2c 6c 25 29 0d 04 f6 0e  ea 20 64 6f 69 6e 6e 6f  |,l%)..... doinno|
00001240  63 25 0d 05 00 14 e7 20  6c 25 3e 3d 6d 61 78 62  |c%..... l%>=maxb|
00001250  6f 6f 74 25 20 8c 0d 05  0a 19 20 20 20 73 74 69  |oot% .....   sti|
00001260  6c 6c 25 3d b9 3a 69 6e  66 65 63 74 25 3d b9 0d  |ll%=.:infect%=..|
00001270  05 14 36 20 20 20 f2 70  75 74 64 61 74 61 28 73  |..6   .putdata(s|
00001280  74 61 74 75 73 25 2c 22  21 42 6f 6f 74 20 74 6f  |tatus%,"!Boot to|
00001290  6f 20 62 69 67 20 2d 20  6e 6f 74 20 73 63 61 6e  |o big - not scan|
000012a0  6e 65 64 22 29 0d 05 1e  08 20 20 20 e1 0d 05 28  |ned")....   ...(|
000012b0  05 cd 0d 05 32 13 64 6f  69 6e 6e 6f 63 25 3d 69  |....2.doinnoc%=i|
000012c0  6e 6e 6f 63 25 0d 05 3c  2a c8 99 20 22 58 4f 53  |nnoc%..<*.. "XOS|
000012d0  5f 43 4c 49 22 2c 22 4c  6f 61 64 20 22 2b 6e 61  |_CLI","Load "+na|
000012e0  6d 65 24 2b 22 20 22 2b  c3 7e 62 75 66 66 25 0d  |me$+" "+.~buff%.|
000012f0  05 46 15 c8 8e 20 62 75  66 66 25 3f 28 6c 25 2d  |.F... buff%?(l%-|
00001300  31 29 20 ca 0d 05 50 1b  c9 20 26 46 46 3a c8 8e  |1) ...P.. &FF:..|
00001310  20 62 75 66 66 25 3f 28  6c 25 2d 34 29 20 ca 0d  | buff%?(l%-4) ..|
00001320  05 5a 2c 20 20 20 20 20  20 20 20 20 c9 20 31 33  |.Z,         . 13|
00001330  3a f2 65 78 74 65 6e 64  76 69 72 75 73 28 22 69  |:.extendvirus("i|
00001340  6e 20 21 42 6f 6f 74 22  2c 30 29 0d 05 64 20 20  |n !Boot",0)..d  |
00001350  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001360  f2 64 69 73 6b 69 6e 66  65 63 74 0d 05 6e 27 20  |.diskinfect..n' |
00001370  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001380  6c 25 3d 6c 25 2d 34 3a  64 6f 69 6e 6e 6f 63 25  |l%=l%-4:doinnoc%|
00001390  3d b9 0d 05 78 2f 20 20  20 20 20 20 20 20 20 20  |=...x/          |
000013a0  20 20 20 20 20 20 20 c8  95 20 6c 25 3e 30 20 80  |       .. l%>0 .|
000013b0  20 62 75 66 66 25 3f 28  6c 25 2d 31 29 3c 3e 26  | buff%?(l%-1)<>&|
000013c0  44 0d 05 82 1f 20 20 20  20 20 20 20 20 20 20 20  |D....           |
000013d0  20 20 20 20 20 20 20 20  20 6c 25 3d 6c 25 2d 31  |         l%=l%-1|
000013e0  0d 05 8c 16 20 20 20 20  20 20 20 20 20 20 20 20  |....            |
000013f0  20 20 20 20 20 ce 0d 05  96 24 20 20 20 20 20 20  |     ....$      |
00001400  20 20 20 20 20 20 20 20  20 20 20 62 75 66 66 25  |           buff%|
00001410  3f 28 6c 25 2d 31 29 3d  26 41 0d 05 a0 1c 20 20  |?(l%-1)=&A....  |
00001420  20 20 20 20 20 20 20 c9  20 31 30 3a 64 6f 69 6e  |       . 10:doin|
00001430  6e 6f 63 25 3d a3 0d 05  aa 42 20 20 20 20 20 20  |noc%=....B      |
00001440  20 20 20 20 20 20 20 20  20 20 20 f2 70 75 74 64  |           .putd|
00001450  61 74 61 28 73 74 61 74  75 73 25 2c 22 21 42 6f  |ata(status%,"!Bo|
00001460  6f 74 20 61 6c 72 65 61  64 79 20 69 6e 6e 6f 63  |ot already innoc|
00001470  75 6c 61 74 65 64 22 29  0d 05 b4 19 20 20 20 20  |ulated")....    |
00001480  20 20 20 20 20 7f 20 64  6f 69 6e 6e 6f 63 25 3d  |     . doinnoc%=|
00001490  a3 0d 05 be 0e 20 20 20  20 20 20 20 20 20 cb 0d  |.....         ..|
000014a0  05 c8 1d c9 20 26 30 41  3a f4 20 4e 6f 72 6d 61  |.... &0A:. Norma|
000014b0  6c 20 74 65 72 6d 69 6e  61 74 6f 72 0d 05 d2 27  |l terminator...'|
000014c0  7f 20 62 75 66 66 25 3f  6c 25 3d 26 41 3a 6c 25  |. buff%?l%=&A:l%|
000014d0  2b 3d 31 3a f4 20 41 64  64 20 4c 46 20 6f 6e 20  |+=1:. Add LF on |
000014e0  65 6e 64 0d 05 dc 05 cb  0d 05 e6 10 e7 20 64 6f  |end.......... do|
000014f0  69 6e 6e 6f 63 25 20 8c  0d 05 f0 21 20 20 20 e7  |innoc% ....!   .|
00001500  20 6c 25 2b 70 72 6f 74  6c 65 6e 25 2b 31 3e 6d  | l%+protlen%+1>m|
00001510  61 78 62 6f 6f 74 25 20  8c 0d 05 fa 1c 20 20 20  |axboot% .....   |
00001520  20 20 20 73 74 69 6c 6c  25 3d b9 3a 69 6e 66 65  |   still%=.:infe|
00001530  63 74 25 3d b9 0d 06 04  3d 20 20 20 20 20 20 f2  |ct%=....=      .|
00001540  70 75 74 64 61 74 61 28  73 74 61 74 75 73 25 2c  |putdata(status%,|
00001550  22 21 42 6f 6f 74 20 74  6f 6f 20 62 69 67 20 2d  |"!Boot too big -|
00001560  20 6e 6f 74 20 69 6e 6e  6f 63 75 6c 61 74 65 64  | not innoculated|
00001570  22 29 0d 06 0e 0b 20 20  20 20 20 20 e1 0d 06 18  |")....      ....|
00001580  08 20 20 20 cd 0d 06 22  27 20 20 20 e7 20 a4 69  |.   ..."'   . .i|
00001590  6e 6e 6f 63 62 6f 6f 74  28 6e 61 6d 65 24 2c 62  |nnocboot(name$,b|
000015a0  75 66 66 25 2c 6c 25 2c  a3 29 20 8c 0d 06 2c 3c  |uff%,l%,.) ...,<|
000015b0  20 20 20 20 20 20 f2 70  75 74 64 61 74 61 28 73  |      .putdata(s|
000015c0  74 61 74 75 73 25 2c 22  21 42 6f 6f 74 20 68 61  |tatus%,"!Boot ha|
000015d0  73 20 6e 6f 77 20 62 65  65 6e 20 69 6e 6e 6f 63  |s now been innoc|
000015e0  75 6c 61 74 65 64 22 29  0d 06 36 08 20 20 20 cd  |ulated")..6.   .|
000015f0  0d 06 40 05 cd 0d 06 4a  05 e1 0d 06 54 04 0d 06  |..@....J....T...|
00001600  5e 24 dd a4 69 6e 6e 6f  63 62 6f 6f 74 28 6e 24  |^$..innocboot(n$|
00001610  2c 61 25 2c 6c 65 6e 25  2c 61 64 64 69 63 6f 6e  |,a%,len%,addicon|
00001620  25 29 0d 06 68 13 ea 20  67 6f 6f 64 25 3a 67 6f  |%)..h.. good%:go|
00001630  6f 64 25 3d a3 0d 06 72  10 e7 20 61 64 64 69 63  |od%=...r.. addic|
00001640  6f 6e 25 20 8c 0d 06 7c  16 20 20 24 28 61 25 2b  |on% ...|.  $(a%+|
00001650  6c 65 6e 25 29 3d 69 63  6f 6e 24 0d 06 86 14 20  |len%)=icon$.... |
00001660  20 6c 65 6e 25 2b 3d 69  63 6f 6e 6c 65 6e 25 0d  | len%+=iconlen%.|
00001670  06 90 05 cd 0d 06 9a 17  24 28 61 25 2b 6c 65 6e  |........$(a%+len|
00001680  25 29 3d 70 72 6f 74 65  63 74 24 0d 06 a4 37 e7  |%)=protect$...7.|
00001690  20 a4 6f 73 63 6c 69 28  22 53 61 76 65 22 2c 6e  | .oscli("Save",n|
000016a0  24 2c c3 7e 61 25 2b 22  20 22 2b c3 7e 28 61 25  |$,.~a%+" "+.~(a%|
000016b0  2b 6c 65 6e 25 2b 70 72  6f 74 6c 65 6e 25 29 29  |+len%+protlen%))|
000016c0  20 8c 0d 06 ae 26 20 20  20 e7 20 a4 6f 73 63 6c  | ....&   . .oscl|
000016d0  69 28 22 53 65 74 54 79  70 65 22 2c 6e 24 2c 22  |i("SetType",n$,"|
000016e0  4f 62 65 79 22 29 20 8c  0d 06 b8 38 20 20 20 20  |Obey") ....8    |
000016f0  20 20 6e 75 6d 69 6e 6e  6f 63 25 2b 3d 31 3a 67  |  numinnoc%+=1:g|
00001700  6f 6f 64 25 3d b9 3a f2  70 75 74 64 61 74 61 28  |ood%=.:.putdata(|
00001710  32 31 2c c3 28 6e 75 6d  69 6e 6e 6f 63 25 29 29  |21,.(numinnoc%))|
00001720  0d 06 c2 08 20 20 20 cd  0d 06 cc 05 cd 0d 06 d6  |....   .........|
00001730  0a 3d 67 6f 6f 64 25 0d  06 e0 04 0d 06 ea 1e dd  |.=good%.........|
00001740  f2 65 78 74 65 6e 64 76  69 72 75 73 28 6d 65 73  |.extendvirus(mes|
00001750  73 24 2c 61 64 64 72 25  29 0d 06 f4 08 ea 20 74  |s$,addr%)..... t|
00001760  25 0d 06 fe 3f e7 20 61  64 64 72 25 3a f2 70 75  |%...?. addr%:.pu|
00001770  74 64 61 74 61 28 64 69  72 73 63 61 6e 25 2c 22  |tdata(dirscan%,"|
00001780  45 78 65 63 75 74 69 6f  6e 20 43 6f 75 6e 74 3a  |Execution Count:|
00001790  20 22 2b c3 28 61 64 64  72 25 21 26 33 34 29 29  | "+.(addr%!&34))|
000017a0  0d 07 08 36 f2 70 75 74  64 61 74 61 28 73 74 61  |...6.putdata(sta|
000017b0  74 75 73 25 2c 22 45 78  74 65 6e 64 20 56 69 72  |tus%,"Extend Vir|
000017c0  75 73 20 22 2b 6d 65 73  73 24 2b 22 20 66 6f 75  |us "+mess$+" fou|
000017d0  6e 64 20 21 22 29 0d 07  12 19 69 6e 66 65 63 74  |nd !")....infect|
000017e0  25 3d b9 3a f2 6f 70 65  6e 77 69 6e 64 6f 77 0d  |%=.:.openwindow.|
000017f0  07 1c 23 74 25 3d 91 2b  32 30 30 3a f4 20 44 65  |..#t%=.+200:. De|
00001800  6c 61 79 20 74 6f 20 73  65 65 20 6d 65 73 73 61  |lay to see messa|
00001810  67 65 0d 07 26 05 f5 0d  07 30 11 20 20 20 f2 77  |ge..&....0.   .w|
00001820  69 6d 70 5f 70 6f 6c 6c  0d 07 3a 12 fd 20 91 3e  |imp_poll..:.. .>|
00001830  74 25 20 84 20 71 75 69  74 25 0d 07 44 05 e1 0d  |t% . quit%..D...|
00001840  07 4e 04 0d 07 58 13 dd  f2 64 65 6c 6d 6f 64 75  |.N...X...delmodu|
00001850  6c 65 28 6d 24 29 0d 07  62 0f f2 64 69 73 6b 69  |le(m$)..b..diski|
00001860  6e 66 65 63 74 0d 07 6c  1e e7 20 a4 6f 73 63 6c  |nfect..l.. .oscl|
00001870  69 28 22 44 65 6c 65 74  65 22 2c 6d 24 2c 22 22  |i("Delete",m$,""|
00001880  29 20 8c 0d 07 76 36 20  20 20 f2 70 75 74 64 61  |) ...v6   .putda|
00001890  74 61 28 73 74 61 74 75  73 25 2c 22 45 78 74 65  |ta(status%,"Exte|
000018a0  6e 64 20 56 69 72 75 73  20 6d 6f 64 75 6c 65 20  |nd Virus module |
000018b0  64 65 6c 65 74 65 64 22  29 0d 07 80 05 cd 0d 07  |deleted").......|
000018c0  8a 05 e1 0d 07 94 04 0d  07 9e 10 dd f2 64 69 73  |.............dis|
000018d0  6b 69 6e 66 65 63 74 0d  07 a8 28 6e 75 6d 64 69  |kinfect...(numdi|
000018e0  73 6b 25 2b 3d 31 3a f2  70 75 74 64 61 74 61 28  |sk%+=1:.putdata(|
000018f0  32 30 2c c3 28 6e 75 6d  64 69 73 6b 25 29 29 0d  |20,.(numdisk%)).|
00001900  07 b2 05 e1 0d 07 bc 04  0d 07 c6 15 dd a4 6f 73  |..............os|
00001910  63 6c 69 28 6c 24 2c 6d  24 2c 72 24 29 0d 07 d0  |cli(l$,m$,r$)...|
00001920  1b ea 20 66 6c 61 67 73  25 2c 61 67 61 69 6e 25  |.. flags%,again%|
00001930  2c 65 72 72 62 6c 6b 25  0d 07 da 05 f5 0d 07 e4  |,errblk%........|
00001940  16 20 20 20 e7 20 6c 24  3d 22 52 4d 4b 69 6c 6c  |.   . l$="RMKill|
00001950  22 20 8c 0d 07 ee 4f 20  20 20 20 20 20 c8 99 20  |" ....O      .. |
00001960  22 58 57 69 6d 70 5f 53  74 61 72 74 54 61 73 6b  |"XWimp_StartTask|
00001970  22 2c 6c 24 2b 22 20 22  2b 6d 24 2b 22 20 22 2b  |",l$+" "+m$+" "+|
00001980  72 24 2b 22 20 7b 20 3e  20 6e 75 6c 6c 3a 20 7d  |r$+" { > null: }|
00001990  22 20 b8 20 65 72 72 62  6c 6b 25 3b 66 6c 61 67  |" . errblk%;flag|
000019a0  73 25 0d 07 f8 08 20 20  20 cc 0d 08 02 47 20 20  |s%....   ....G  |
000019b0  20 20 20 20 c8 99 20 22  58 4f 53 5f 43 4c 49 22  |    .. "XOS_CLI"|
000019c0  2c 6c 24 2b 22 20 22 2b  6d 24 2b 22 20 22 2b 72  |,l$+" "+m$+" "+r|
000019d0  24 2b 22 20 7b 20 3e 20  6e 75 6c 6c 3a 20 7d 22  |$+" { > null: }"|
000019e0  20 b8 20 65 72 72 62 6c  6b 25 3b 66 6c 61 67 73  | . errblk%;flags|
000019f0  25 0d 08 0c 08 20 20 20  cd 0d 08 16 0f 20 20 20  |%....   .....   |
00001a00  61 67 61 69 6e 25 3d a3  0d 08 20 15 20 20 20 e7  |again%=... .   .|
00001a10  20 66 6c 61 67 73 25 20  80 20 31 20 8c 0d 08 2a  | flags% . 1 ...*|
00001a20  17 20 20 20 20 20 20 c8  8e 20 21 65 72 72 62 6c  |.      .. !errbl|
00001a30  6b 25 20 ca 0d 08 34 13  20 20 20 20 20 20 c9 20  |k% ...4.      . |
00001a40  26 31 30 38 43 39 3a 0d  08 3e 4f 20 20 20 20 20  |&108C9:..>O     |
00001a50  20 20 20 20 61 67 61 69  6e 25 3d a4 79 65 73 6e  |    again%=.yesn|
00001a60  6f 28 22 20 20 20 20 57  72 69 74 65 2d 70 72 6f  |o("    Write-pro|
00001a70  74 65 63 74 65 64 20 64  69 73 6b 20 21 20 20 20  |tected disk !   |
00001a80  20 20 52 65 74 72 79 20  64 69 73 6b 20 77 72 69  |  Retry disk wri|
00001a90  74 65 20 3f 22 29 0d 08  48 32 20 20 20 20 20 20  |te ?")..H2      |
00001aa0  c9 20 26 31 30 38 43 33  3a 61 67 61 69 6e 25 3d  |. &108C3:again%=|
00001ab0  a4 6f 73 63 6c 69 28 22  41 63 63 65 73 73 22 2c  |.oscli("Access",|
00001ac0  6d 24 2c 22 57 52 22 29  0d 08 52 0b 20 20 20 20  |m$,"WR")..R.    |
00001ad0  20 20 7f 0d 08 5c 20 20  20 20 20 20 20 20 20 20  |  ...\          |
00001ae0  e7 20 21 65 72 72 62 6c  6b 25 3e 26 31 30 30 30  |. !errblk%>&1000|
00001af0  30 20 8c 0d 08 66 3f 20  20 20 20 20 20 20 20 20  |0 ...f?         |
00001b00  20 20 20 f2 70 75 74 64  61 74 61 28 73 74 61 74  |   .putdata(stat|
00001b10  75 73 25 2c 22 43 6f 75  6c 64 6e 27 74 20 70 65  |us%,"Couldn't pe|
00001b20  72 66 6f 72 6d 20 64 69  73 6b 20 77 72 69 74 65  |rform disk write|
00001b30  22 29 0d 08 70 0e 20 20  20 20 20 20 20 20 20 cc  |")..p.         .|
00001b40  0d 08 7a 41 20 20 20 20  20 20 20 20 20 20 20 20  |..zA            |
00001b50  f2 70 75 74 64 61 74 61  28 73 74 61 74 75 73 25  |.putdata(status%|
00001b60  2c 22 43 6f 75 6c 64 6e  27 74 20 64 65 6c 65 74  |,"Couldn't delet|
00001b70  65 20 45 78 74 65 6e 64  20 6d 6f 64 75 6c 65 22  |e Extend module"|
00001b80  29 0d 08 84 0e 20 20 20  20 20 20 20 20 20 cd 0d  |)....         ..|
00001b90  08 8e 0b 20 20 20 20 20  20 cb 0d 08 98 1d 20 20  |...      .....  |
00001ba0  20 20 20 20 e7 20 61 67  61 69 6e 25 3d a3 3a 73  |    . again%=.:s|
00001bb0  74 69 6c 6c 25 3d b9 0d  08 a2 08 20 20 20 cd 0d  |till%=.....   ..|
00001bc0  08 ac 0e fd 20 61 67 61  69 6e 25 3d a3 0d 08 b6  |.... again%=....|
00001bd0  15 3d 28 28 66 6c 61 67  73 25 20 80 20 31 29 3d  |.=((flags% . 1)=|
00001be0  30 29 0d 08 c0 04 0d 08  ca 1c dd a4 77 69 6d 70  |0)..........wimp|
00001bf0  65 72 72 6f 72 28 6d 65  73 73 24 2c 6d 61 73 6b  |error(mess$,mask|
00001c00  25 29 0d 08 d4 0c ea 20  63 6c 69 63 6b 25 0d 08  |%)..... click%..|
00001c10  de 52 c8 99 20 22 58 57  69 6d 70 5f 52 65 70 6f  |.R.. "XWimp_Repo|
00001c20  72 74 45 72 72 6f 72 22  2c c4 34 2c 62 6c 24 29  |rtError",.4,bl$)|
00001c30  2b 6d 65 73 73 24 2b 62  6c 24 2c 6d 61 73 6b 25  |+mess$+bl$,mask%|
00001c40  2c 22 56 4b 69 6c 6c 65  72 20 57 61 72 6e 69 6e  |,"VKiller Warnin|
00001c50  67 22 2b 62 6c 24 20 b8  20 2c 63 6c 69 63 6b 25  |g"+bl$ . ,click%|
00001c60  0d 08 e8 0b 3d 63 6c 69  63 6b 25 0d 08 f2 04 0d  |....=click%.....|
00001c70  08 fc 2f dd a4 79 65 73  6e 6f 28 6d 65 73 73 24  |../..yesno(mess$|
00001c80  29 3d 28 a4 77 69 6d 70  65 72 72 6f 72 28 6d 65  |)=(.wimperror(me|
00001c90  73 73 24 2c 25 31 30 30  31 31 29 3d 31 29 0d 09  |ss$,%10011)=1)..|
00001ca0  06 04 0d 09 10 11 dd f2  77 61 72 6e 28 6d 65 73  |........warn(mes|
00001cb0  73 24 29 0d 09 1a 0c ea  20 63 6c 69 63 6b 25 0d  |s$)..... click%.|
00001cc0  09 24 23 63 6c 69 63 6b  25 3d a4 77 69 6d 70 65  |.$#click%=.wimpe|
00001cd0  72 72 6f 72 28 6d 65 73  73 24 2c 25 31 30 30 30  |rror(mess$,%1000|
00001ce0  31 29 0d 09 2e 05 e1 0d  09 38 04 0d 09 42 18 dd  |1).......8...B..|
00001cf0  f2 73 63 61 6e 6d 6f 64  75 6c 65 73 28 68 61 6e  |.scanmodules(han|
00001d00  64 25 29 0d 09 4c 26 ea  20 6d 6f 64 75 6c 65 25  |d%)..L&. module%|
00001d10  2c 73 75 62 25 2c 73 74  61 72 74 25 2c 66 6c 61  |,sub%,start%,fla|
00001d20  67 73 25 2c 68 65 6c 70  25 0d 09 56 05 f5 0d 09  |gs%,help%..V....|
00001d30  60 44 20 20 20 c8 99 20  22 58 4f 53 5f 4d 6f 64  |`D   .. "XOS_Mod|
00001d40  75 6c 65 22 2c 31 32 2c  6d 6f 64 75 6c 65 25 2c  |ule",12,module%,|
00001d50  73 75 62 25 20 b8 20 2c  6d 6f 64 75 6c 65 25 2c  |sub% . ,module%,|
00001d60  73 75 62 25 2c 73 74 61  72 74 25 3b 66 6c 61 67  |sub%,start%;flag|
00001d70  73 25 0d 09 6a 19 20 20  20 e7 20 28 66 6c 61 67  |s%..j.   . (flag|
00001d80  73 25 20 80 20 31 29 3d  30 20 8c 0d 09 74 21 20  |s% . 1)=0 ...t! |
00001d90  20 20 20 20 20 68 65 6c  70 25 3d 73 74 61 72 74  |     help%=start|
00001da0  25 2b 73 74 61 72 74 25  21 26 31 34 0d 09 7e 2b  |%+start%!&14..~+|
00001db0  20 20 20 20 20 20 e7 20  a4 67 65 74 73 74 72 69  |      . .getstri|
00001dc0  6e 67 28 68 65 6c 70 25  29 3d 65 78 74 65 6e 64  |ng(help%)=extend|
00001dd0  68 65 6c 70 24 20 8c 0d  09 88 21 20 20 20 20 20  |help$ ....!     |
00001de0  20 20 20 20 6e 75 6d 6d  65 6d 25 2b 3d 31 3a 69  |    nummem%+=1:i|
00001df0  6e 66 65 63 74 25 3d b9  0d 09 92 24 20 20 20 20  |nfect%=....$    |
00001e00  20 20 20 20 20 f2 70 75  74 64 61 74 61 28 31 39  |     .putdata(19|
00001e10  2c c3 28 6e 75 6d 6d 65  6d 25 29 29 0d 09 9c 16  |,.(nummem%))....|
00001e20  20 20 20 20 20 20 20 20  20 e7 20 68 61 6e 64 25  |         . hand%|
00001e30  20 8c 0d 09 a6 40 20 20  20 20 20 20 20 20 20 20  | ....@          |
00001e40  20 20 f4 20 54 68 69 73  20 69 73 20 61 20 62 75  |  . This is a bu|
00001e50  67 2d 66 69 78 20 3a 2d  29 20 49 74 20 61 6c 6c  |g-fix :-) It all|
00001e60  6f 77 73 20 74 68 65 20  76 69 72 75 73 20 74 61  |ows the virus ta|
00001e70  73 6b 0d 09 b0 48 20 20  20 20 20 20 20 20 20 20  |sk...H          |
00001e80  20 20 f4 20 74 6f 20 73  68 75 74 64 6f 77 6e 20  |  . to shutdown |
00001e90  70 72 6f 70 65 72 6c 79  20 77 69 74 68 6f 75 74  |properly without|
00001ea0  20 63 72 61 73 68 69 6e  67 20 74 68 65 20 54 61  | crashing the Ta|
00001eb0  73 6b 20 4d 61 6e 61 67  65 72 0d 09 ba 33 20 20  |sk Manager...3  |
00001ec0  20 20 20 20 20 20 20 20  20 20 73 74 61 72 74 25  |          start%|
00001ed0  21 26 34 30 3d 68 61 6e  64 25 3a f4 20 53 61 76  |!&40=hand%:. Sav|
00001ee0  65 20 74 61 73 6b 20 68  61 6e 64 6c 65 0d 09 c4  |e task handle...|
00001ef0  1d 20 20 20 20 20 20 20  20 20 20 20 20 50 25 3d  |.            P%=|
00001f00  73 74 61 72 74 25 2b 26  37 30 0d 09 ce 16 20 20  |start%+&70....  |
00001f10  20 20 20 20 20 20 20 20  20 20 5b 4f 50 54 20 30  |          [OPT 0|
00001f20  0d 09 d8 3e 20 20 20 20  20 20 20 20 20 20 20 20  |...>            |
00001f30  4c 44 52 20 52 32 2c 73  74 61 72 74 25 2b 26 36  |LDR R2,start%+&6|
00001f40  34 3a 43 4d 50 20 52 32  2c 23 31 3a 53 57 49 47  |4:CMP R2,#1:SWIG|
00001f50  54 20 22 58 4f 53 5f 4d  6f 64 75 6c 65 22 0d 09  |T "XOS_Module"..|
00001f60  e2 33 20 20 20 20 20 20  20 20 20 20 20 20 4c 44  |.3            LD|
00001f70  52 20 52 30 2c 73 74 61  72 74 25 2b 26 34 30 3a  |R R0,start%+&40:|
00001f80  4c 44 52 20 52 31 2c 73  74 61 72 74 25 2b 26 35  |LDR R1,start%+&5|
00001f90  34 0d 09 ec 11 20 20 20  20 20 20 20 20 20 20 20  |4....           |
00001fa0  20 5d 0d 09 f6 0e 20 20  20 20 20 20 20 20 20 cc  | ]....         .|
00001fb0  0d 0a 00 45 20 20 20 20  20 20 20 20 20 20 20 20  |...E            |
00001fc0  f2 77 61 72 6e 28 22 54  61 73 6b 20 4d 61 6e 61  |.warn("Task Mana|
00001fd0  67 65 72 20 69 73 20 75  6e 73 74 61 62 6c 65 20  |ger is unstable |
00001fe0  21 20 20 20 20 20 44 6f  20 6e 6f 74 20 75 73 65  |!     Do not use|
00001ff0  20 69 74 22 29 0d 0a 0a  0e 20 20 20 20 20 20 20  | it")....       |
00002000  20 20 cd 0d 0a 14 2a 20  20 20 20 20 20 20 20 20  |  ....*         |
00002010  f2 65 78 74 65 6e 64 76  69 72 75 73 28 22 69 6e  |.extendvirus("in|
00002020  20 52 4d 41 22 2c 73 74  61 72 74 25 29 0d 0a 1e  | RMA",start%)...|
00002030  2d 20 20 20 20 20 20 20  20 20 e7 20 a4 6f 73 63  |-         . .osc|
00002040  6c 69 28 22 52 4d 4b 69  6c 6c 22 2c 22 45 78 74  |li("RMKill","Ext|
00002050  65 6e 64 22 2c 22 22 29  20 8c 0d 0a 28 41 20 20  |end","") ...(A  |
00002060  20 20 20 20 20 20 20 20  20 20 20 f2 70 75 74 64  |           .putd|
00002070  61 74 61 28 73 74 61 74  75 73 25 2c 22 45 78 74  |ata(status%,"Ext|
00002080  65 6e 64 20 56 69 72 75  73 20 6b 69 6c 6c 65 64  |end Virus killed|
00002090  20 66 72 6f 6d 20 52 4d  41 22 29 0d 0a 32 0e 20  | from RMA")..2. |
000020a0  20 20 20 20 20 20 20 20  cc 0d 0a 3c 19 20 20 20  |        ...<.   |
000020b0  20 20 20 20 20 20 20 20  20 20 73 74 69 6c 6c 25  |          still%|
000020c0  3d b9 0d 0a 46 0e 20 20  20 20 20 20 20 20 20 cd  |=...F.         .|
000020d0  0d 0a 50 0b 20 20 20 20  20 20 cd 0d 0a 5a 08 20  |..P.      ...Z. |
000020e0  20 20 cd 0d 0a 64 10 fd  20 66 6c 61 67 73 25 20  |  ...d.. flags% |
000020f0  80 20 31 0d 0a 6e 05 e1  0d 0a 78 04 0d 0a 82 19  |. 1..n....x.....|
00002100  dd a4 65 78 69 73 74 73  28 66 69 6c 65 24 2c 74  |..exists(file$,t|
00002110  79 70 65 25 29 0d 0a 8c  13 ea 20 66 6f 75 6e 64  |ype%)..... found|
00002120  25 2c 66 74 79 70 65 25  0d 0a 96 2a c8 99 20 22  |%,ftype%...*.. "|
00002130  58 4f 53 5f 46 69 6c 65  22 2c 35 2c 66 69 6c 65  |XOS_File",5,file|
00002140  24 20 b8 20 66 6f 75 6e  64 25 2c 2c 66 74 79 70  |$ . found%,,ftyp|
00002150  65 25 0d 0a a0 1e 66 74  79 70 65 25 3d 28 66 74  |e%....ftype%=(ft|
00002160  79 70 65 25 3e 3e 3e 38  29 20 80 20 26 46 46 46  |ype%>>>8) . &FFF|
00002170  0d 0a aa 1e 3d 28 66 6f  75 6e 64 25 3d 31 20 80  |....=(found%=1 .|
00002180  20 74 79 70 65 25 3d 66  74 79 70 65 25 29 0d 0a  | type%=ftype%)..|
00002190  b4 04 0d 0a be 0f dd a4  75 70 70 65 72 28 73 24  |........upper(s$|
000021a0  29 0d 0a c8 17 ea 20 6c  6f 6f 70 25 2c 6e 24 2c  |)..... loop%,n$,|
000021b0  41 25 2c 43 25 2c 5a 25  0d 0a d2 13 41 25 3d 97  |A%,C%,Z%....A%=.|
000021c0  22 61 22 3a 5a 25 3d 97  22 7a 22 0d 0a dc 15 e3  |"a":Z%=."z".....|
000021d0  20 6c 6f 6f 70 25 3d 31  20 b8 20 a9 28 73 24 29  | loop%=1 . .(s$)|
000021e0  0d 0a e6 15 20 20 20 43  25 3d 97 c1 73 24 2c 6c  |....   C%=..s$,l|
000021f0  6f 6f 70 25 29 0d 0a f0  1f 20 20 20 e7 20 43 25  |oop%)....   . C%|
00002200  3e 3d 41 25 20 80 20 43  25 3c 3d 5a 25 20 43 25  |>=A% . C%<=Z% C%|
00002210  2d 3d 33 32 0d 0a fa 0e  20 20 20 6e 24 2b 3d bd  |-=32....   n$+=.|
00002220  43 25 0d 0b 04 05 ed 0d  0b 0e 07 3d 6e 24 0d 0b  |C%.........=n$..|
00002230  18 04 0d 0b 22 0f dd a4  6c 6f 77 65 72 28 73 24  |...."...lower(s$|
00002240  29 0d 0b 2c 17 ea 20 6c  6f 6f 70 25 2c 6e 24 2c  |)..,.. loop%,n$,|
00002250  41 25 2c 43 25 2c 5a 25  0d 0b 36 13 41 25 3d 97  |A%,C%,Z%..6.A%=.|
00002260  22 41 22 3a 5a 25 3d 97  22 5a 22 0d 0b 40 15 e3  |"A":Z%=."Z"..@..|
00002270  20 6c 6f 6f 70 25 3d 31  20 b8 20 a9 28 73 24 29  | loop%=1 . .(s$)|
00002280  0d 0b 4a 15 20 20 20 43  25 3d 97 c1 73 24 2c 6c  |..J.   C%=..s$,l|
00002290  6f 6f 70 25 29 0d 0b 54  1f 20 20 20 e7 20 43 25  |oop%)..T.   . C%|
000022a0  3e 3d 41 25 20 80 20 43  25 3c 3d 5a 25 20 43 25  |>=A% . C%<=Z% C%|
000022b0  2b 3d 33 32 0d 0b 5e 0e  20 20 20 6e 24 2b 3d bd  |+=32..^.   n$+=.|
000022c0  43 25 0d 0b 68 05 ed 0d  0b 72 07 3d 6e 24 0d 0b  |C%..h....r.=n$..|
000022d0  7c 04 0d 0b 86 18 dd a4  67 65 74 73 74 72 69 6e  ||.......getstrin|
000022e0  67 28 f8 20 61 64 64 72  25 29 0d 0b 90 0e ea 20  |g(. addr%)..... |
000022f0  73 24 3a 73 24 3d 22 22  0d 0b 9a 2b c8 95 20 3f  |s$:s$=""...+.. ?|
00002300  61 64 64 72 25 3e 33 31  3a 73 24 3d 73 24 2b bd  |addr%>31:s$=s$+.|
00002310  28 3f 61 64 64 72 25 29  3a 61 64 64 72 25 2b 3d  |(?addr%):addr%+=|
00002320  31 3a ce 0d 0b a4 07 3d  73 24 0d 0b ae 04 0d 0b  |1:.....=s$......|
00002330  b8 0f dd f2 77 69 6d 70  5f 70 6f 6c 6c 0d 0b c2  |....wimp_poll...|
00002340  0d ea 20 72 65 61 73 6f  6e 25 0d 0b cc 25 c8 99  |.. reason%...%..|
00002350  20 22 58 57 69 6d 70 5f  50 6f 6c 6c 22 2c 30 2c  | "XWimp_Poll",0,|
00002360  70 6f 6c 6c 25 20 b8 20  72 65 61 73 6f 6e 25 0d  |poll% . reason%.|
00002370  0b d6 10 c8 8e 20 72 65  61 73 6f 6e 25 20 ca 0d  |..... reason% ..|
00002380  0b e0 37 c9 20 32 3a c8  99 20 22 58 57 69 6d 70  |..7. 2:.. "XWimp|
00002390  5f 4f 70 65 6e 57 69 6e  64 6f 77 22 2c 2c 70 6f  |_OpenWindow",,po|
000023a0  6c 6c 25 3a f4 20 49 6e  66 6f 20 77 69 6e 64 6f  |ll%:. Info windo|
000023b0  77 20 64 72 61 67 0d 0b  ea 14 c9 20 33 3a f2 63  |w drag..... 3:.c|
000023c0  6c 6f 73 65 77 69 6e 64  6f 77 0d 0b f4 13 c9 20  |losewindow..... |
000023d0  36 3a f2 6d 6f 75 73 65  63 6c 69 63 6b 0d 0b fe  |6:.mouseclick...|
000023e0  13 c9 20 39 3a f2 6d 65  6e 75 73 65 6c 65 63 74  |.. 9:.menuselect|
000023f0  0d 0c 08 18 c9 20 31 37  2c 31 38 3a f2 77 69 6d  |..... 17,18:.wim|
00002400  70 6d 65 73 73 61 67 65  0d 0c 12 05 cb 0d 0c 1c  |pmessage........|
00002410  05 e1 0d 0c 26 04 0d 0c  30 11 dd f2 63 6c 6f 73  |....&...0...clos|
00002420  65 77 69 6e 64 6f 77 0d  0c 3a 37 c8 99 20 22 58  |ewindow..:7.. "X|
00002430  57 69 6d 70 5f 43 6c 6f  73 65 57 69 6e 64 6f 77  |Wimp_CloseWindow|
00002440  22 2c 2c 76 6b 69 6c 6c  77 69 6e 64 25 3a f4 20  |",,vkillwind%:. |
00002450  45 76 61 6c 20 63 6c 6f  73 65 20 62 6f 78 0d 0c  |Eval close box..|
00002460  44 05 e1 0d 0c 4e 04 0d  0c 58 10 dd f2 6d 6f 75  |D....N...X...mou|
00002470  73 65 63 6c 69 63 6b 0d  0c 62 10 c8 8e 20 70 6f  |seclick..b... po|
00002480  6c 6c 25 21 38 20 ca 0d  0c 6c 15 20 20 20 c9 20  |ll%!8 ...l.   . |
00002490  31 2c 34 3a f2 73 74 61  72 74 75 70 0d 0c 76 19  |1,4:.startup..v.|
000024a0  20 20 20 c9 20 20 20 32  3a f2 73 68 6f 77 6e 65  |   .   2:.showne|
000024b0  77 6d 65 6e 75 0d 0c 80  05 cb 0d 0c 8a 05 e1 0d  |wmenu...........|
000024c0  0c 94 04 0d 0c 9e 11 dd  f2 73 68 6f 77 6e 65 77  |.........shownew|
000024d0  6d 65 6e 75 0d 0c a8 08  ea 20 79 25 0d 0c b2 3a  |menu..... y%...:|
000024e0  e7 20 70 6f 6c 6c 25 21  31 32 3d 2d 32 3a 79 25  |. poll%!12=-2:y%|
000024f0  3d 39 36 2b 21 73 70 61  63 69 6e 67 2a 6e 75 6d  |=96+!spacing*num|
00002500  69 74 65 6d 73 25 20 8b  20 79 25 3d 70 6f 6c 6c  |items% . y%=poll|
00002510  25 21 34 2b 31 36 0d 0c  bc 1c 6f 6c 64 78 25 3d  |%!4+16....oldx%=|
00002520  21 70 6f 6c 6c 25 2d 36  34 3a 6f 6c 64 79 25 3d  |!poll%-64:oldy%=|
00002530  79 25 0d 0c c6 10 f2 73  68 6f 77 6f 6c 64 6d 65  |y%.....showoldme|
00002540  6e 75 0d 0c d0 05 e1 0d  0c da 04 0d 0c e4 11 dd  |nu..............|
00002550  f2 73 68 6f 77 6f 6c 64  6d 65 6e 75 0d 0c ee 2c  |.showoldmenu...,|
00002560  c8 99 20 22 58 57 69 6d  70 5f 43 72 65 61 74 65  |.. "XWimp_Create|
00002570  4d 65 6e 75 22 2c 2c 6d  65 6e 75 25 2c 6f 6c 64  |Menu",,menu%,old|
00002580  78 25 2c 6f 6c 64 79 25  0d 0c f8 05 e1 0d 0d 02  |x%,oldy%........|
00002590  04 0d 0d 0c 10 dd f2 6f  70 65 6e 77 69 6e 64 6f  |.......openwindo|
000025a0  77 0d 0d 16 33 76 6b 69  6c 6c 77 69 6e 64 25 21  |w...3vkillwind%!|
000025b0  32 38 3d 2d 31 3a f4 20  4f 70 65 6e 20 6f 6e 20  |28=-1:. Open on |
000025c0  74 6f 70 20 6f 66 20 65  76 65 72 79 6f 6e 65 20  |top of everyone |
000025d0  65 6c 73 65 0d 0d 20 25  c8 99 20 22 58 57 69 6d  |else.. %.. "XWim|
000025e0  70 5f 4f 70 65 6e 57 69  6e 64 6f 77 22 2c 2c 76  |p_OpenWindow",,v|
000025f0  6b 69 6c 6c 77 69 6e 64  25 0d 0d 2a 05 e1 0d 0d  |killwind%..*....|
00002600  34 04 0d 0d 3e 0d dd f2  73 74 61 72 74 75 70 0d  |4...>...startup.|
00002610  0d 48 11 c8 8e 20 70 6f  6c 6c 25 21 31 32 20 ca  |.H... poll%!12 .|
00002620  0d 0d 52 17 20 20 20 c9  20 2d 32 3a f2 6f 70 65  |..R.   . -2:.ope|
00002630  6e 77 69 6e 64 6f 77 0d  0d 5c 14 20 20 20 c9 20  |nwindow..\.   . |
00002640  76 6b 69 6c 6c 68 61 6e  64 25 3a 0d 0d 66 17 20  |vkillhand%:..f. |
00002650  20 20 20 20 20 c8 8e 20  70 6f 6c 6c 25 21 31 36  |     .. poll%!16|
00002660  20 ca 0d 0d 70 3a 20 20  20 20 20 20 c9 20 37 3a  | ...p:      . 7:|
00002670  e7 20 73 63 61 6e 6e 69  6e 67 25 3d a3 3a f2 6e  |. scanning%=.:.n|
00002680  65 78 74 66 73 3a f4 20  46 69 6c 69 6e 67 20 73  |extfs:. Filing s|
00002690  79 73 74 65 6d 20 63 68  61 6e 67 65 0d 0d 7a 50  |ystem change..zP|
000026a0  20 20 20 20 20 20 c9 20  38 2c 39 2c 31 30 2c 31  |      . 8,9,10,1|
000026b0  31 2c 31 32 2c 31 33 2c  31 34 2c 31 35 3a e7 20  |1,12,13,14,15:. |
000026c0  73 63 61 6e 6e 69 6e 67  25 3d a3 3a 64 72 69 76  |scanning%=.:driv|
000026d0  65 25 3d 70 6f 6c 6c 25  21 31 36 2d 38 3a f4 20  |e%=poll%!16-8:. |
000026e0  44 72 69 76 65 20 63 68  61 6e 67 65 0d 0d 84 33  |Drive change...3|
000026f0  20 20 20 20 20 20 c9 20  32 33 3a e7 20 73 63 61  |      . 23:. sca|
00002700  6e 6e 69 6e 67 25 3a f2  66 69 6e 69 73 68 73 63  |nning%:.finishsc|
00002710  61 6e 20 8b 20 f2 73 74  61 72 74 73 63 61 6e 0d  |an . .startscan.|
00002720  0d 8e 1e 20 20 20 20 20  20 c9 20 32 34 3a 69 6e  |...      . 24:in|
00002730  6e 6f 63 25 3d ac 20 69  6e 6e 6f 63 25 0d 0d 98  |noc%=. innoc%...|
00002740  0b 20 20 20 20 20 20 cb  0d 0d a2 05 cb 0d 0d ac  |.      .........|
00002750  05 e1 0d 0d b6 04 0d 0d  c0 10 dd f2 6d 65 6e 75  |............menu|
00002760  73 65 6c 65 63 74 0d 0d  ca 21 ea 20 6d 6f 75 73  |select...!. mous|
00002770  65 25 2c 69 74 65 6d 25  3a 69 74 65 6d 25 3d 21  |e%,item%:item%=!|
00002780  70 6f 6c 6c 25 2b 31 0d  0d d4 33 c8 99 20 22 58  |poll%+1...3.. "X|
00002790  57 69 6d 70 5f 47 65 74  50 6f 69 6e 74 65 72 49  |Wimp_GetPointerI|
000027a0  6e 66 6f 22 2c 2c 70 6f  6c 6c 25 3a 6d 6f 75 73  |nfo",,poll%:mous|
000027b0  65 25 3d 70 6f 6c 6c 25  21 38 0d 0d de 0e c8 8e  |e%=poll%!8......|
000027c0  20 69 74 65 6d 25 20 ca  0d 0d e8 2d 20 20 20 c9  | item% ....-   .|
000027d0  20 6e 75 6d 69 74 65 6d  73 25 3a 71 75 69 74 25  | numitems%:quit%|
000027e0  3d b9 3a f4 20 4c 61 73  74 20 49 74 65 6d 20 3d  |=.:. Last Item =|
000027f0  20 51 75 69 74 0d 0d f2  05 cb 0d 0d fc 1b e7 20  | Quit.......... |
00002800  6d 6f 75 73 65 25 3d 31  3a f2 73 68 6f 77 6f 6c  |mouse%=1:.showol|
00002810  64 6d 65 6e 75 0d 0e 06  05 e1 0d 0e 10 04 0d 0e  |dmenu...........|
00002820  1a 11 dd f2 77 69 6d 70  6d 65 73 73 61 67 65 0d  |....wimpmessage.|
00002830  0e 24 11 c8 8e 20 70 6f  6c 6c 25 21 31 36 20 ca  |.$... poll%!16 .|
00002840  0d 0e 2e 45 20 20 20 c9  20 20 20 20 20 20 30 3a  |...E   .      0:|
00002850  71 75 69 74 25 3d b9 3a  f4 20 53 68 75 74 20 64  |quit%=.:. Shut d|
00002860  6f 77 6e 20 28 44 65 73  6b 74 6f 70 20 45 78 69  |own (Desktop Exi|
00002870  74 2c 20 54 61 73 6b 20  4d 61 6e 61 67 65 72 20  |t, Task Manager |
00002880  51 75 69 74 29 0d 0e 38  19 20 20 20 c9 20 26 34  |Quit)..8.   . &4|
00002890  30 30 43 32 3a f2 61 70  70 73 74 61 72 74 0d 0e  |00C2:.appstart..|
000028a0  42 05 cb 0d 0e 4c 05 e1  0d 0e 56 04 0d 0e 60 0e  |B....L....V...`.|
000028b0  dd f2 61 70 70 73 74 61  72 74 0d 0e 6a 4a f4 20  |..appstart..jJ. |
000028c0  55 6e 6c 69 6b 65 2c 20  61 68 65 6d 2c 20 63 65  |Unlike, ahem, ce|
000028d0  72 74 61 69 6e 20 41 63  6f 72 6e 20 61 70 70 6c  |rtain Acorn appl|
000028e0  69 63 61 74 69 6f 6e 73  20 77 65 20 63 6f 75 6c  |ications we coul|
000028f0  64 20 6d 65 6e 74 69 6f  6e 2c 20 69 74 20 72 65  |d mention, it re|
00002900  61 6c 6c 79 0d 0e 74 46  f4 20 69 73 20 6e 69 63  |ally..tF. is nic|
00002910  65 20 74 6f 20 6d 61 6b  65 20 73 75 72 65 20 6f  |e to make sure o|
00002920  6e 6c 79 20 6f 6e 65 20  69 6e 76 6f 63 61 74 69  |nly one invocati|
00002930  6f 6e 20 6f 66 20 74 68  65 20 70 72 6f 67 72 61  |on of the progra|
00002940  6d 20 68 61 73 20 62 65  65 6e 0d 0e 7e 43 f4 20  |m has been..~C. |
00002950  61 63 74 69 76 61 74 65  64 20 2d 20 74 68 69 73  |activated - this|
00002960  20 69 73 20 64 6f 6e 65  20 62 79 20 63 68 65 63  | is done by chec|
00002970  6b 69 6e 67 20 61 20 6e  65 77 20 74 61 73 6b 27  |king a new task'|
00002980  73 20 6e 61 6d 65 2f 68  61 6e 64 6c 65 0d 0e 88  |s name/handle...|
00002990  11 ea 20 41 25 2c 42 25  2c 73 61 6d 65 25 0d 0e  |.. A%,B%,same%..|
000029a0  92 16 e7 20 70 6f 6c 6c  25 21 34 3c 3e 74 61 73  |... poll%!4<>tas|
000029b0  6b 25 20 8c 0d 0e 9c 18  20 20 20 41 25 3d 70 6f  |k% .....   A%=po|
000029c0  6c 6c 25 2b 32 38 3a 42  25 3d 2d 31 0d 0e a6 0e  |ll%+28:B%=-1....|
000029d0  20 20 20 e7 20 3f 41 25  20 8c 0d 0e b0 0b 20 20  |   . ?A% .....  |
000029e0  20 20 20 20 f5 0d 0e ba  34 20 20 20 20 20 20 20  |    ....4       |
000029f0  20 20 42 25 2b 3d 31 3a  73 61 6d 65 25 3d 28 41  |  B%+=1:same%=(A|
00002a00  25 3f 42 25 3d 97 28 c1  70 72 6f 67 24 2b 62 6c  |%?B%=.(.prog$+bl|
00002a10  24 2c 42 25 2b 31 29 29  29 0d 0e c4 1d 20 20 20  |$,B%+1)))....   |
00002a20  20 20 20 fd 20 41 25 3f  42 25 3d 30 20 84 20 ac  |   . A%?B%=0 . .|
00002a30  20 73 61 6d 65 25 0d 0e  ce 19 20 20 20 20 20 20  | same%....      |
00002a40  e7 20 73 61 6d 65 25 3a  71 75 69 74 25 3d b9 0d  |. same%:quit%=..|
00002a50  0e d8 08 20 20 20 cc 0d  0e e2 1f 20 20 20 20 20  |...   .....     |
00002a60  20 f2 73 63 61 6e 6d 6f  64 75 6c 65 73 28 70 6f  | .scanmodules(po|
00002a70  6c 6c 25 21 34 29 0d 0e  ec 08 20 20 20 cd 0d 0e  |ll%!4)....   ...|
00002a80  f6 05 cd 0d 0f 00 05 e1  0d 0f 0a 04 0d 0f 14 1a  |................|
00002a90  dd f2 70 75 74 64 61 74  61 28 69 63 6f 6e 25 2c  |..putdata(icon%,|
00002aa0  6d 65 73 73 24 29 0d 0f  1e 2d f4 20 43 68 61 6e  |mess$)...-. Chan|
00002ab0  67 65 20 69 63 6f 6e 20  27 69 63 6f 6e 25 27 20  |ge icon 'icon%' |
00002ac0  74 6f 20 74 68 65 20 73  74 72 69 6e 67 20 6d 65  |to the string me|
00002ad0  73 73 24 0d 0f 28 3b f4  20 4e 6f 74 65 20 74 68  |ss$..(;. Note th|
00002ae0  61 74 20 74 68 69 73 20  61 73 73 75 6d 65 73 20  |at this assumes |
00002af0  61 6e 20 69 6e 64 69 72  65 63 74 65 64 20 69 63  |an indirected ic|
00002b00  6f 6e 20 6f 66 20 63 6f  75 72 73 65 20 21 0d 0f  |on of course !..|
00002b10  32 2b 21 69 63 6f 6e 64  61 74 61 25 3d 76 6b 69  |2+!icondata%=vki|
00002b20  6c 6c 68 61 6e 64 25 3a  69 63 6f 6e 64 61 74 61  |llhand%:icondata|
00002b30  25 21 34 3d 69 63 6f 6e  25 0d 0f 3c 26 c8 99 20  |%!4=icon%..<&.. |
00002b40  22 58 57 69 6d 70 5f 47  65 74 49 63 6f 6e 53 74  |"XWimp_GetIconSt|
00002b50  61 74 65 22 2c 2c 69 63  6f 6e 64 61 74 61 25 0d  |ate",,icondata%.|
00002b60  0f 46 19 24 28 69 63 6f  6e 64 61 74 61 25 21 32  |.F.$(icondata%!2|
00002b70  38 29 3d 6d 65 73 73 24  0d 0f 50 58 c8 99 20 22  |8)=mess$..PX.. "|
00002b80  58 57 69 6d 70 5f 46 6f  72 63 65 52 65 64 72 61  |XWimp_ForceRedra|
00002b90  77 22 2c 76 6b 69 6c 6c  68 61 6e 64 25 2c 69 63  |w",vkillhand%,ic|
00002ba0  6f 6e 64 61 74 61 25 21  38 2c 69 63 6f 6e 64 61  |ondata%!8,iconda|
00002bb0  74 61 25 21 31 32 2c 69  63 6f 6e 64 61 74 61 25  |ta%!12,icondata%|
00002bc0  21 31 36 2c 69 63 6f 6e  64 61 74 61 25 21 32 30  |!16,icondata%!20|
00002bd0  0d 0f 5a 05 e1 0d 0f 64  04 0d 0f 6e 1a dd a4 67  |..Z....d...n...g|
00002be0  65 74 64 61 74 61 28 77  69 6e 64 25 2c 69 63 6f  |etdata(wind%,ico|
00002bf0  6e 25 29 0d 0f 78 36 f4  20 52 65 61 64 20 74 68  |n%)..x6. Read th|
00002c00  65 20 76 61 6c 75 65 20  6f 66 20 69 63 6f 6e 20  |e value of icon |
00002c10  27 69 63 6f 6e 25 27 20  69 6e 20 77 69 6e 64 6f  |'icon%' in windo|
00002c20  77 20 27 77 69 6e 64 25  27 0d 0f 82 3b f4 20 4e  |w 'wind%'...;. N|
00002c30  6f 74 65 20 74 68 61 74  20 74 68 69 73 20 61 73  |ote that this as|
00002c40  73 75 6d 65 73 20 61 6e  20 69 6e 64 69 72 65 63  |sumes an indirec|
00002c50  74 65 64 20 69 63 6f 6e  20 6f 66 20 63 6f 75 72  |ted icon of cour|
00002c60  73 65 20 21 0d 0f 8c 26  21 69 63 6f 6e 64 61 74  |se !...&!icondat|
00002c70  61 25 3d 77 69 6e 64 25  3a 69 63 6f 6e 64 61 74  |a%=wind%:icondat|
00002c80  61 25 21 34 3d 69 63 6f  6e 25 0d 0f 96 26 c8 99  |a%!4=icon%...&..|
00002c90  20 22 58 57 69 6d 70 5f  47 65 74 49 63 6f 6e 53  | "XWimp_GetIconS|
00002ca0  74 61 74 65 22 2c 2c 69  63 6f 6e 64 61 74 61 25  |tate",,icondata%|
00002cb0  0d 0f a0 14 3d 24 28 69  63 6f 6e 64 61 74 61 25  |....=$(icondata%|
00002cc0  21 32 38 29 0d 0f aa 04  0d 0f b4 0e dd f2 6d 61  |!28)..........ma|
00002cd0  6b 65 69 63 6f 6e 0d 0f  be 3f 50 25 3d 69 63 6f  |keicon...?P%=ico|
00002ce0  6e 25 3a f4 20 55 73 65  20 62 75 69 6c 74 20 69  |n%:. Use built i|
00002cf0  6e 20 61 73 73 65 6d 62  6c 65 72 20 2d 20 65 61  |n assembler - ea|
00002d00  73 69 65 72 20 74 6f 20  73 65 65 20 73 74 72 75  |sier to see stru|
00002d10  63 74 75 72 65 0d 0f c8  0a 5b 4f 50 54 20 30 0d  |cture....[OPT 0.|
00002d20  0f d2 45 20 20 20 20 20  20 20 20 20 20 20 20 20  |..E             |
00002d30  20 20 20 45 51 55 44 20  20 20 20 69 63 6f 6e 62  |   EQUD    iconb|
00002d40  61 72 74 79 70 65 25 20  20 20 20 3b 20 49 63 6f  |artype%    ; Ico|
00002d50  6e 20 62 61 72 20 27 75  74 69 6c 69 74 79 27 20  |n bar 'utility' |
00002d60  66 6c 61 67 0d 0f dc 3b  20 20 20 20 20 20 20 20  |flag...;        |
00002d70  20 20 20 20 20 20 20 20  45 51 55 44 20 20 20 20  |        EQUD    |
00002d80  30 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |0               |
00002d90  3b 20 42 6f 74 74 6f 6d  20 6c 65 66 74 20 58 0d  |; Bottom left X.|
00002da0  0f e6 3b 20 20 20 20 20  20 20 20 20 20 20 20 20  |..;             |
00002db0  20 20 20 45 51 55 44 20  20 20 20 30 20 20 20 20  |   EQUD    0    |
00002dc0  20 20 20 20 20 20 20 20  20 20 20 3b 20 42 6f 74  |           ; Bot|
00002dd0  74 6f 6d 20 6c 65 66 74  20 59 0d 0f f0 39 20 20  |tom left Y...9  |
00002de0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 45 51  |              EQ|
00002df0  55 44 20 20 20 20 36 39  20 20 20 20 20 20 20 20  |UD    69        |
00002e00  20 20 20 20 20 20 3b 20  54 6f 70 20 72 69 67 68  |      ; Top righ|
00002e10  74 20 58 0d 0f fa 39 20  20 20 20 20 20 20 20 20  |t X...9         |
00002e20  20 20 20 20 20 20 20 45  51 55 44 20 20 20 20 36  |       EQUD    6|
00002e30  38 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |8              ;|
00002e40  20 54 6f 70 20 72 69 67  68 74 20 59 0d 10 04 3e  | Top right Y...>|
00002e50  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002e60  45 51 55 42 20 20 20 20  25 30 30 30 30 30 30 31  |EQUB    %0000001|
00002e70  30 20 20 20 20 20 20 20  3b 20 49 63 6f 6e 20 69  |0       ; Icon i|
00002e80  73 20 61 20 73 70 72 69  74 65 0d 10 0e 47 20 20  |s a sprite...G  |
00002e90  20 20 20 20 20 20 20 20  20 20 20 20 20 20 45 51  |              EQ|
00002ea0  55 42 20 20 20 20 25 30  30 31 31 30 30 30 31 20  |UB    %00110001 |
00002eb0  20 20 20 20 20 20 3b 20  43 6c 69 63 6b 20 6e 6f  |      ; Click no|
00002ec0  74 69 66 69 65 73 2f 49  6e 64 69 72 65 63 74 65  |tifies/Indirecte|
00002ed0  64 0d 10 18 48 20 20 20  20 20 20 20 20 20 20 20  |d...H           |
00002ee0  20 20 20 20 20 45 51 55  42 20 20 20 20 25 30 30  |     EQUB    %00|
00002ef0  30 30 30 30 30 30 20 20  20 20 20 20 20 3b 20 4e  |000000       ; N|
00002f00  6f 74 68 69 6e 67 20 73  70 65 63 69 61 6c 20 61  |othing special a|
00002f10  62 6f 75 74 20 69 63 6f  6e 0d 10 22 46 20 20 20  |bout icon.."F   |
00002f20  20 20 20 20 20 20 20 20  20 20 20 20 20 45 51 55  |             EQU|
00002f30  42 20 20 20 20 25 30 30  30 30 30 30 30 31 20 20  |B    %00000001  |
00002f40  20 20 20 20 20 3b 20 46  6f 72 65 63 6f 6c 20 3d  |     ; Forecol =|
00002f50  20 31 2c 20 42 61 63 6b  63 6f 6c 20 3d 20 30 0d  | 1, Backcol = 0.|
00002f60  10 2c 44 2e 70 6f 6b 65  73 70 6e 61 6d 65 20 20  |.,D.pokespname  |
00002f70  20 20 20 45 51 55 44 20  20 20 20 70 6f 6b 65 73  |   EQUD    pokes|
00002f80  70 6e 61 6d 65 2b 31 32  20 20 20 3b 20 50 6f 69  |pname+12   ; Poi|
00002f90  6e 74 65 72 20 74 6f 20  73 70 72 69 74 65 20 6e  |nter to sprite n|
00002fa0  61 6d 65 0d 10 36 45 20  20 20 20 20 20 20 20 20  |ame..6E         |
00002fb0  20 20 20 20 20 20 20 45  51 55 44 20 20 20 20 31  |       EQUD    1|
00002fc0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00002fd0  20 50 6f 69 6e 74 65 72  20 74 6f 20 57 49 4d 50  | Pointer to WIMP|
00002fe0  20 73 70 72 69 74 65 73  0d 10 40 43 20 20 20 20  | sprites..@C    |
00002ff0  20 20 20 20 20 20 20 20  20 20 20 20 45 51 55 44  |            EQUD|
00003000  20 20 20 20 31 32 20 20  20 20 20 20 20 20 20 20  |    12          |
00003010  20 20 20 20 3b 20 4c 65  6e 67 74 68 20 6f 66 20  |    ; Length of |
00003020  73 70 72 69 74 65 20 6e  61 6d 65 0d 10 4a 3c 2e  |sprite name..J<.|
00003030  73 70 72 69 74 65 6e 61  6d 65 20 20 20 20 20 45  |spritename     E|
00003040  51 55 53 20 20 20 20 22  21 76 6b 69 6c 6c 65 72  |QUS    "!vkiller|
00003050  22 2b c4 34 2c 62 6c 24  29 20 3b 20 53 70 72 69  |"+.4,bl$) ; Spri|
00003060  74 65 20 6e 61 6d 65 0d  10 54 05 5d 0d 10 5e 2c  |te name..T.]..^,|
00003070  c8 99 20 22 58 57 69 6d  70 5f 43 72 65 61 74 65  |.. "XWimp_Create|
00003080  49 63 6f 6e 22 2c 2c 69  63 6f 6e 25 20 b8 20 69  |Icon",,icon% . i|
00003090  63 6f 6e 68 61 6e 64 25  0d 10 68 05 e1 0d 10 72  |conhand%..h....r|
000030a0  04 0d 10 7c 0e dd f2 6d  61 6b 65 6d 65 6e 75 0d  |...|...makemenu.|
000030b0  10 86 28 6e 75 6d 69 74  65 6d 73 25 3d 32 3a f4  |..(numitems%=2:.|
000030c0  20 43 68 61 6e 67 65 20  69 66 20 79 6f 75 20 61  | Change if you a|
000030d0  64 64 20 6d 6f 72 65 0d  10 90 1c 50 25 3d 6d 65  |dd more....P%=me|
000030e0  6e 75 25 3a f4 20 55 73  65 20 61 73 73 65 6d 62  |nu%:. Use assemb|
000030f0  6c 65 72 0d 10 9a 0a 5b  4f 50 54 20 30 0d 10 a4  |ler....[OPT 0...|
00003100  40 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |@               |
00003110  20 45 51 55 53 20 20 20  20 70 72 6f 67 24 2b c4  | EQUS    prog$+.|
00003120  31 32 2d a9 28 70 72 6f  67 24 29 2c 62 6c 24 29  |12-.(prog$),bl$)|
00003130  20 3b 20 4d 65 6e 75 20  74 69 74 6c 65 0d 10 ae  | ; Menu title...|
00003140  37 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |7               |
00003150  20 45 51 55 42 20 20 20  20 37 20 20 20 20 20 20  | EQUB    7      |
00003160  20 3b 20 46 6f 72 65 67  72 6f 75 6e 64 20 63 6f  | ; Foreground co|
00003170  6c 6f 75 72 0d 10 b8 37  20 20 20 20 20 20 20 20  |lour...7        |
00003180  20 20 20 20 20 20 20 20  45 51 55 42 20 20 20 20  |        EQUB    |
00003190  32 20 20 20 20 20 20 20  3b 20 42 61 63 6b 67 72  |2       ; Backgr|
000031a0  6f 75 6e 64 20 63 6f 6c  6f 75 72 0d 10 c2 39 20  |ound colour...9 |
000031b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 45  |               E|
000031c0  51 55 42 20 20 20 20 37  20 20 20 20 20 20 20 3b  |QUB    7       ;|
000031d0  20 57 6f 72 6b 20 66 6f  72 65 67 72 64 20 63 6f  | Work foregrd co|
000031e0  6c 6f 75 72 0d 10 cc 39  20 20 20 20 20 20 20 20  |lour...9        |
000031f0  20 20 20 20 20 20 20 20  45 51 55 42 20 20 20 20  |        EQUB    |
00003200  30 20 20 20 20 20 20 20  3b 20 57 6f 72 6b 20 62  |0       ; Work b|
00003210  61 63 6b 67 72 64 20 63  6f 6c 6f 75 72 0d 10 d6  |ackgrd colour...|
00003220  31 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |1               |
00003230  20 45 51 55 44 20 20 20  20 31 34 38 20 20 20 20  | EQUD    148    |
00003240  20 3b 20 54 6f 74 61 6c  20 77 69 64 74 68 0d 10  | ; Total width..|
00003250  e0 32 2e 73 70 61 63 69  6e 67 20 20 20 20 20 20  |.2.spacing      |
00003260  20 20 45 51 55 44 20 20  20 20 34 34 20 20 20 20  |  EQUD    44    |
00003270  20 20 3b 20 54 6f 74 61  6c 20 68 65 69 67 68 74  |  ; Total height|
00003280  0d 10 ea 32 20 20 20 20  20 20 20 20 20 20 20 20  |...2            |
00003290  20 20 20 20 45 51 55 44  20 20 20 20 30 20 20 20  |    EQUD    0   |
000032a0  20 20 20 20 3b 20 4c 69  6e 65 20 73 70 61 63 69  |    ; Line spaci|
000032b0  6e 67 0d 10 f4 0d 3b 20  49 74 65 6d 20 23 31 0d  |ng....; Item #1.|
000032c0  10 fe 35 20 20 20 20 20  20 20 20 20 20 20 20 20  |..5             |
000032d0  20 20 20 45 51 55 44 20  20 20 20 30 20 20 20 20  |   EQUD    0    |
000032e0  20 20 20 3b 20 4e 6f 74  68 69 6e 67 20 73 70 65  |   ; Nothing spe|
000032f0  63 69 61 6c 0d 11 08 41  2e 73 75 62 6d 65 6e 75  |cial...A.submenu|
00003300  70 6f 6b 65 20 20 20 20  45 51 55 44 20 20 20 20  |poke    EQUD    |
00003310  30 20 20 20 20 20 20 20  3b 20 53 75 62 2d 6d 65  |0       ; Sub-me|
00003320  6e 75 20 61 64 64 72 20  70 6f 6b 65 64 20 69 6e  |nu addr poked in|
00003330  20 68 65 72 65 0d 11 12  3e 20 20 20 20 20 20 20  | here...>       |
00003340  20 20 20 20 20 20 20 20  20 45 51 55 44 20 20 20  |         EQUD   |
00003350  20 28 37 3c 3c 32 34 29  20 84 20 31 20 3b 20 49  | (7<<24) . 1 ; I|
00003360  74 65 6d 20 69 73 20 74  65 78 74 20 26 20 62 6c  |tem is text & bl|
00003370  61 63 6b 0d 11 1c 2d 20  20 20 20 20 20 20 20 20  |ack...-         |
00003380  20 20 20 20 20 20 20 45  51 55 53 20 20 20 20 22  |       EQUS    "|
00003390  49 6e 66 6f 20 20 20 20  20 20 20 22 2b 62 6c 24  |Info       "+bl$|
000033a0  0d 11 26 0d 3b 20 49 74  65 6d 20 23 32 0d 11 30  |..&.; Item #2..0|
000033b0  34 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |4               |
000033c0  20 45 51 55 44 20 20 20  20 26 38 30 20 20 20 20  | EQUD    &80    |
000033d0  20 3b 20 4c 61 73 74 20  6d 65 6e 75 20 69 74 65  | ; Last menu ite|
000033e0  6d 0d 11 3a 31 20 20 20  20 20 20 20 20 20 20 20  |m..:1           |
000033f0  20 20 20 20 20 45 51 55  44 20 20 20 20 2d 31 20  |     EQUD    -1 |
00003400  20 20 20 20 20 3b 20 4e  6f 20 73 75 62 2d 6d 65  |     ; No sub-me|
00003410  6e 75 0d 11 44 3e 20 20  20 20 20 20 20 20 20 20  |nu..D>          |
00003420  20 20 20 20 20 20 45 51  55 44 20 20 20 20 28 37  |      EQUD    (7|
00003430  3c 3c 32 34 29 20 84 20  31 20 3b 20 49 74 65 6d  |<<24) . 1 ; Item|
00003440  20 69 73 20 74 65 78 74  20 26 20 62 6c 61 63 6b  | is text & black|
00003450  0d 11 4e 2d 20 20 20 20  20 20 20 20 20 20 20 20  |..N-            |
00003460  20 20 20 20 45 51 55 53  20 20 20 20 22 51 75 69  |    EQUS    "Qui|
00003470  74 20 20 20 20 20 20 20  22 2b 62 6c 24 0d 11 58  |t       "+bl$..X|
00003480  05 5d 0d 11 62 05 e1 0d  11 6c 04 0d 11 76 12 dd  |.]..b....l...v..|
00003490  f2 67 65 74 74 65 6d 70  6c 61 74 65 73 0d 11 80  |.gettemplates...|
000034a0  13 ea 20 66 6c 61 67 73  25 2c 64 75 6d 6d 79 25  |.. flags%,dummy%|
000034b0  0d 11 8a 3d c8 99 20 22  58 57 69 6d 70 5f 4f 70  |...=.. "XWimp_Op|
000034c0  65 6e 54 65 6d 70 6c 61  74 65 22 2c 2c 76 6b 69  |enTemplate",,vki|
000034d0  6c 6c 76 61 72 24 2b 22  2e 54 65 6d 70 6c 61 74  |llvar$+".Templat|
000034e0  65 73 22 20 b8 20 3b 66  6c 61 67 73 25 0d 11 94  |es" . ;flags%...|
000034f0  3c e7 20 66 6c 61 67 73  25 20 80 20 31 3a f2 66  |<. flags% . 1:.f|
00003500  61 74 61 6c 28 22 4d 69  73 73 69 6e 67 20 54 65  |atal("Missing Te|
00003510  6d 70 6c 61 74 65 73 20  66 69 6c 65 20 66 6f 72  |mplates file for|
00003520  20 22 2b 70 72 6f 67 24  29 0d 11 9e 36 76 6b 69  | "+prog$)...6vki|
00003530  6c 6c 68 61 6e 64 25 3d  a4 6c 6f 61 64 74 65 6d  |llhand%=.loadtem|
00003540  70 6c 61 74 65 28 76 6b  69 6c 6c 77 69 6e 64 25  |plate(vkillwind%|
00003550  2c 22 56 4b 69 6c 6c 57  69 6e 64 6f 77 22 29 0d  |,"VKillWindow").|
00003560  11 a8 30 21 73 75 62 6d  65 6e 75 70 6f 6b 65 3d  |..0!submenupoke=|
00003570  a4 6c 6f 61 64 74 65 6d  70 6c 61 74 65 28 69 6e  |.loadtemplate(in|
00003580  66 6f 77 69 6e 64 25 2c  22 49 6e 66 6f 22 29 0d  |fowind%,"Info").|
00003590  11 b2 1c c8 99 20 22 58  57 69 6d 70 5f 43 6c 6f  |..... "XWimp_Clo|
000035a0  73 65 54 65 6d 70 6c 61  74 65 22 0d 11 bc 05 e1  |seTemplate".....|
000035b0  0d 11 c6 04 0d 11 d0 1f  dd a4 6c 6f 61 64 74 65  |..........loadte|
000035c0  6d 70 6c 61 74 65 28 61  64 64 72 25 2c 77 69 6e  |mplate(addr%,win|
000035d0  64 24 29 0d 11 da 47 f4  20 4e 6f 74 65 20 74 68  |d$)...G. Note th|
000035e0  65 20 2b 34 20 6f 6e 20  74 68 65 20 61 64 64 72  |e +4 on the addr|
000035f0  65 73 73 20 2d 20 74 68  69 73 20 61 6c 6c 6f 77  |ess - this allow|
00003600  73 20 74 68 65 20 70 6f  6b 69 6e 67 20 6f 66 20  |s the poking of |
00003610  74 68 65 20 68 61 6e 64  6c 65 0d 11 e4 18 ea 20  |the handle..... |
00003620  77 69 6e 64 68 61 6e 64  25 2c 77 69 6e 64 70 74  |windhand%,windpt|
00003630  72 25 0d 11 ee 56 c8 99  20 22 58 57 69 6d 70 5f  |r%...V.. "XWimp_|
00003640  4c 6f 61 64 54 65 6d 70  6c 61 74 65 22 2c 2c 61  |LoadTemplate",,a|
00003650  64 64 72 25 2b 34 2c 61  64 64 72 25 2b 26 37 30  |ddr%+4,addr%+&70|
00003660  30 2c 61 64 64 72 25 2b  26 45 30 30 2c 2d 31 2c  |0,addr%+&E00,-1,|
00003670  77 69 6e 64 24 2c 30 20  b8 20 2c 2c 2c 2c 2c 2c  |wind$,0 . ,,,,,,|
00003680  77 69 6e 64 70 74 72 25  0d 11 f8 53 e7 20 77 69  |windptr%...S. wi|
00003690  6e 64 70 74 72 25 3d 30  3a f2 66 61 74 61 6c 28  |ndptr%=0:.fatal(|
000036a0  22 4d 69 73 73 69 6e 67  20 22 2b 77 69 6e 64 24  |"Missing "+wind$|
000036b0  2b 22 20 77 69 6e 64 6f  77 20 66 72 6f 6d 20 22  |+" window from "|
000036c0  2b 70 72 6f 67 24 2b 22  27 73 20 54 65 6d 70 6c  |+prog$+"'s Templ|
000036d0  61 74 65 73 20 66 69 6c  65 22 29 0d 12 02 30 c8  |ates file")...0.|
000036e0  99 20 22 58 57 69 6d 70  5f 43 72 65 61 74 65 57  |. "XWimp_CreateW|
000036f0  69 6e 64 6f 77 22 2c 2c  61 64 64 72 25 2b 34 20  |indow",,addr%+4 |
00003700  b8 20 77 69 6e 64 68 61  6e 64 25 0d 12 0c 48 21  |. windhand%...H!|
00003710  61 64 64 72 25 3d 77 69  6e 64 68 61 6e 64 25 3a  |addr%=windhand%:|
00003720  f4 20 53 74 6f 72 65 20  77 69 6e 64 6f 77 20 68  |. Store window h|
00003730  61 6e 64 6c 65 20 62 65  63 61 75 73 65 20 6e 65  |andle because ne|
00003740  65 64 65 64 20 62 79 20  6c 61 74 65 72 20 63 61  |eded by later ca|
00003750  6c 6c 73 0d 12 16 0e 3d  77 69 6e 64 68 61 6e 64  |lls....=windhand|
00003760  25 0d 12 20 04 0d 12 2a  11 dd f2 73 79 73 74 65  |%.. ...*...syste|
00003770  6d 65 72 72 6f 72 0d 12  34 41 f4 20 57 68 79 20  |merror..4A. Why |
00003780  64 6f 20 49 20 6e 65 65  64 20 74 68 69 73 20 70  |do I need this p|
00003790  72 6f 63 20 3f 20 57 65  6c 6c 2c 20 74 68 65 20  |roc ? Well, the |
000037a0  57 69 6d 70 20 64 6f 65  73 6e 27 74 20 72 65 70  |Wimp doesn't rep|
000037b0  6f 72 74 20 74 68 65 0d  12 3e 29 f4 20 6f 66 66  |ort the..>). off|
000037c0  65 6e 64 69 6e 67 20 6c  69 6e 65 20 6e 75 6d 62  |ending line numb|
000037d0  65 72 20 6f 66 20 61 6e  20 65 72 72 6f 72 20 21  |er of an error !|
000037e0  0d 12 48 0a ea 20 65 72  72 24 0d 12 52 27 e7 20  |..H.. err$..R'. |
000037f0  9f 3a 65 72 72 24 3d 22  20 61 74 20 6c 69 6e 65  |.:err$=" at line|
00003800  20 22 2b c3 28 9e 29 20  8b 20 65 72 72 24 3d 22  | "+.(.) . err$="|
00003810  22 0d 12 5c 09 ee 20 85  20 87 0d 12 66 13 f2 66  |"..\.. . ...f..f|
00003820  61 74 61 6c 28 f6 24 2b  65 72 72 24 29 0d 12 70  |atal(.$+err$)..p|
00003830  05 e1 0d 12 7a 04 0d 12  84 13 dd f2 66 61 74 61  |....z.......fata|
00003840  6c 28 65 72 72 6f 72 24  29 0d 12 8e 16 ff 22 45  |l(error$)....."E|
00003850  72 72 6f 72 20 30 20 22  2b 65 72 72 6f 72 24 0d  |rror 0 "+error$.|
00003860  12 98 05 e1 0d 12 a2 04  0d 12 ac 0c dd f2 6e 65  |..............ne|
00003870  78 74 66 73 0d 12 b6 3c  ea 20 66 73 6e 61 6d 65  |xtfs...<. fsname|
00003880  25 2c 6f 6c 64 66 73 79  73 24 2c 73 77 69 24 2c  |%,oldfsys$,swi$,|
00003890  73 77 69 6e 61 6d 65 24  2c 6e 75 6d 66 6c 6f 70  |swiname$,numflop|
000038a0  25 2c 6e 75 6d 68 61 72  64 25 2c 6c 6f 6f 70 25  |%,numhard%,loop%|
000038b0  0d 12 c0 1b 6f 6c 64 66  73 79 73 24 3d 66 73 79  |....oldfsys$=fsy|
000038c0  73 24 3a 66 73 79 73 24  3d 22 22 0d 12 ca 05 f5  |s$:fsys$="".....|
000038d0  0d 12 d4 2c 20 20 20 66  73 79 73 6e 75 6d 25 2b  |...,   fsysnum%+|
000038e0  3d 31 3a e7 20 66 73 79  73 6e 75 6d 25 3e 32 35  |=1:. fsysnum%>25|
000038f0  35 3a 66 73 79 73 6e 75  6d 25 3d 31 0d 12 de 3b  |5:fsysnum%=1...;|
00003900  20 20 20 c8 99 20 22 58  4f 53 5f 46 53 43 6f 6e  |   .. "XOS_FSCon|
00003910  74 72 6f 6c 22 2c 33 33  2c 66 73 79 73 6e 75 6d  |trol",33,fsysnum|
00003920  25 2c 66 62 75 66 66 25  2c 31 32 20 b8 20 2c 2c  |%,fbuff%,12 . ,,|
00003930  66 73 6e 61 6d 65 25 0d  12 e8 13 20 20 20 e7 20  |fsname%....   . |
00003940  3f 66 73 6e 61 6d 65 25  20 8c 0d 12 f2 23 20 20  |?fsname% ....#  |
00003950  20 20 20 20 66 73 79 73  24 3d a4 67 65 74 73 74  |    fsys$=.getst|
00003960  72 69 6e 67 28 66 73 6e  61 6d 65 25 29 0d 12 fc  |ring(fsname%)...|
00003970  14 20 20 20 20 20 20 c8  8e 20 66 73 79 73 24 20  |.      .. fsys$ |
00003980  ca 0d 13 06 6e 20 20 20  20 20 20 c9 20 22 6e 75  |....n      . "nu|
00003990  6c 6c 22 2c 22 70 72 69  6e 74 65 72 22 2c 22 73  |ll","printer","s|
000039a0  65 72 69 61 6c 22 2c 22  76 64 75 22 2c 22 72 61  |erial","vdu","ra|
000039b0  77 76 64 75 22 2c 22 6b  62 64 22 2c 22 72 61 77  |wvdu","kbd","raw|
000039c0  6b 62 64 22 2c 22 64 65  73 6b 66 73 22 2c 22 6d  |kbd","deskfs","m|
000039d0  73 64 6f 73 22 3a 66 73  79 73 24 3d 22 22 3a f4  |sdos":fsys$="":.|
000039e0  20 4e 6f 74 20 69 6e 66  65 63 74 61 62 6c 65 0d  | Not infectable.|
000039f0  13 10 0b 20 20 20 20 20  20 cb 0d 13 1a 08 20 20  |...      .....  |
00003a00  20 cd 0d 13 24 0f fd 20  66 73 79 73 24 3c 3e 22  | ...$.. fsys$<>"|
00003a10  22 0d 13 2e 17 e7 20 6f  6c 64 66 73 79 73 24 3c  |"..... oldfsys$<|
00003a20  3e 66 73 79 73 24 20 8c  0d 13 38 11 20 20 20 c8  |>fsys$ ...8.   .|
00003a30  8e 20 66 73 79 73 24 20  ca 0d 13 42 31 20 20 20  |. fsys$ ...B1   |
00003a40  c9 20 22 6e 65 74 22 3a  73 77 69 6e 61 6d 65 24  |. "net":swiname$|
00003a50  3d 22 4e 65 74 46 53 22  3a f4 20 49 73 20 74 68  |="NetFS":. Is th|
00003a60  69 73 20 72 69 67 68 74  20 3f 0d 13 4c 1f 20 20  |is right ?..L.  |
00003a70  20 7f 20 73 77 69 6e 61  6d 65 24 3d a4 75 70 70  | . swiname$=.upp|
00003a80  65 72 28 66 73 79 73 24  29 0d 13 56 08 20 20 20  |er(fsys$)..V.   |
00003a90  cb 0d 13 60 22 20 20 20  73 77 69 24 3d 22 58 22  |...`"   swi$="X"|
00003aa0  2b 73 77 69 6e 61 6d 65  24 2b 22 5f 44 72 69 76  |+swiname$+"_Driv|
00003ab0  65 73 22 0d 13 6a 1a 20  20 20 e7 20 a4 63 68 65  |es"..j.   . .che|
00003ac0  63 6b 73 77 69 28 73 77  69 24 29 20 8c 0d 13 74  |ckswi(swi$) ...t|
00003ad0  2c 20 20 20 20 20 20 c8  99 20 73 77 69 24 20 b8  |,      .. swi$ .|
00003ae0  20 64 72 69 76 65 25 2c  6e 75 6d 66 6c 6f 70 25  | drive%,numflop%|
00003af0  2c 6e 75 6d 68 61 72 64  25 0d 13 7e 47 20 20 20  |,numhard%..~G   |
00003b00  20 20 20 e7 20 64 72 69  76 65 25 3e 3d 6e 75 6d  |   . drive%>=num|
00003b10  66 6c 6f 70 25 20 80 20  6e 75 6d 68 61 72 64 25  |flop% . numhard%|
00003b20  3d 30 20 84 20 64 72 69  76 65 25 3e 3d 6e 75 6d  |=0 . drive%>=num|
00003b30  68 61 72 64 25 2b 34 3a  64 72 69 76 65 25 3d 30  |hard%+4:drive%=0|
00003b40  0d 13 88 08 20 20 20 cc  0d 13 92 28 20 20 20 20  |....   ....(    |
00003b50  20 20 6e 75 6d 66 6c 6f  70 25 3d 31 3a 6e 75 6d  |  numflop%=1:num|
00003b60  68 61 72 64 25 3d 30 3a  64 72 69 76 65 25 3d 30  |hard%=0:drive%=0|
00003b70  0d 13 9c 08 20 20 20 cd  0d 13 a6 18 20 20 20 f2  |....   .....   .|
00003b80  70 75 74 64 61 74 61 28  37 2c 66 73 79 73 24 29  |putdata(7,fsys$)|
00003b90  0d 13 b0 14 20 20 20 e3  20 6c 6f 6f 70 25 3d 30  |....   . loop%=0|
00003ba0  20 b8 20 37 0d 13 ba 65  20 20 20 20 20 20 f2 61  | . 7...e      .a|
00003bb0  6c 6c 6f 77 64 72 69 76  65 28 6c 6f 6f 70 25 2c  |llowdrive(loop%,|
00003bc0  28 6c 6f 6f 70 25 3c 34  20 80 20 6e 75 6d 66 6c  |(loop%<4 . numfl|
00003bd0  6f 70 25 3e 6c 6f 6f 70  25 29 20 84 20 28 6c 6f  |op%>loop%) . (lo|
00003be0  6f 70 25 3e 33 20 80 20  6e 75 6d 68 61 72 64 25  |op%>3 . numhard%|
00003bf0  2b 34 3e 6c 6f 6f 70 25  29 2c 28 6c 6f 6f 70 25  |+4>loop%),(loop%|
00003c00  3d 64 72 69 76 65 25 29  29 0d 13 c4 08 20 20 20  |=drive%))....   |
00003c10  ed 0d 13 ce 05 cd 0d 13  d8 05 e1 0d 13 e2 04 0d  |................|
00003c20  13 ec 14 dd a4 63 68 65  63 6b 73 77 69 28 73 77  |.....checkswi(sw|
00003c30  69 24 29 0d 13 f6 11 ea  20 73 77 69 25 2c 66 6c  |i$)..... swi%,fl|
00003c40  61 67 73 25 0d 14 00 34  c8 99 20 22 58 4f 53 5f  |ags%...4.. "XOS_|
00003c50  53 57 49 4e 75 6d 62 65  72 46 72 6f 6d 53 74 72  |SWINumberFromStr|
00003c60  69 6e 67 22 2c 2c 73 77  69 24 20 b8 20 73 77 69  |ing",,swi$ . swi|
00003c70  25 3b 66 6c 61 67 73 25  0d 14 0a 15 3d 28 28 66  |%;flags%....=((f|
00003c80  6c 61 67 73 25 20 80 20  31 29 3d 30 29 0d 14 14  |lags% . 1)=0)...|
00003c90  04 0d 14 1e 22 dd f2 68  61 63 6b 66 6c 61 67 73  |...."..hackflags|
00003ca0  28 69 63 6f 6e 25 2c 65  6f 72 25 2c 63 6c 65 61  |(icon%,eor%,clea|
00003cb0  72 25 29 0d 14 28 19 21  69 63 6f 6e 64 61 74 61  |r%)..(.!icondata|
00003cc0  25 3d 76 6b 69 6c 6c 68  61 6e 64 25 0d 14 32 15  |%=vkillhand%..2.|
00003cd0  69 63 6f 6e 64 61 74 61  25 21 34 3d 69 63 6f 6e  |icondata%!4=icon|
00003ce0  25 0d 14 3c 14 69 63 6f  6e 64 61 74 61 25 21 38  |%..<.icondata%!8|
00003cf0  3d 65 6f 72 25 0d 14 46  17 69 63 6f 6e 64 61 74  |=eor%..F.icondat|
00003d00  61 25 21 31 32 3d 63 6c  65 61 72 25 0d 14 50 26  |a%!12=clear%..P&|
00003d10  c8 99 20 22 58 57 69 6d  70 5f 53 65 74 49 63 6f  |.. "XWimp_SetIco|
00003d20  6e 53 74 61 74 65 22 2c  2c 69 63 6f 6e 64 61 74  |nState",,icondat|
00003d30  61 25 0d 14 5a 05 e1 0d  14 64 04 0d 14 6e 19 dd  |a%..Z....d...n..|
00003d40  f2 68 69 6c 69 74 65 28  69 63 6f 6e 25 2c 62 6f  |.hilite(icon%,bo|
00003d50  6f 6c 25 29 0d 14 78 2e  f2 68 61 63 6b 66 6c 61  |ol%)..x..hackfla|
00003d60  67 73 28 69 63 6f 6e 25  2c 28 28 2d 62 6f 6f 6c  |gs(icon%,((-bool|
00003d70  25 29 3c 3c 32 31 29 2c  26 30 30 32 30 30 30 30  |%)<<21),&0020000|
00003d80  30 29 0d 14 82 05 e1 0d  14 8c 04 0d 14 96 24 dd  |0)............$.|
00003d90  f2 61 6c 6c 6f 77 64 72  69 76 65 28 64 72 76 25  |.allowdrive(drv%|
00003da0  2c 62 6f 6f 6c 25 2c 68  69 6c 69 74 65 25 29 0d  |,bool%,hilite%).|
00003db0  14 a0 10 62 6f 6f 6c 25  3d 2d 62 6f 6f 6c 25 0d  |...bool%=-bool%.|
00003dc0  14 aa 4e f2 68 61 63 6b  66 6c 61 67 73 28 64 72  |..N.hackflags(dr|
00003dd0  76 25 2b 38 2c 28 62 6f  6f 6c 25 3c 3c 31 36 29  |v%+8,(bool%<<16)|
00003de0  2b 31 31 2a 28 62 6f 6f  6c 25 3c 3c 31 32 29 2b  |+11*(bool%<<12)+|
00003df0  28 28 31 35 2d 62 6f 6f  6c 25 2a 36 29 3c 3c 32  |((15-bool%*6)<<2|
00003e00  38 29 2c 26 46 30 31 46  46 30 30 30 29 0d 14 b4  |8),&F01FF000)...|
00003e10  1b f2 68 69 6c 69 74 65  28 64 72 76 25 2b 38 2c  |..hilite(drv%+8,|
00003e20  68 69 6c 69 74 65 25 29  0d 14 be 05 e1 0d 14 c8  |hilite%)........|
00003e30  04 0d 14 d2 10 dd f2 66  69 6e 69 73 68 73 63 61  |.......finishsca|
00003e40  6e 0d 14 dc 23 f2 70 75  74 64 61 74 61 28 32 33  |n...#.putdata(23|
00003e50  2c 22 53 74 61 72 74 20  44 72 69 76 65 20 53 63  |,"Start Drive Sc|
00003e60  61 6e 22 29 0d 14 e6 1d  f2 70 75 74 64 61 74 61  |an").....putdata|
00003e70  28 64 69 72 73 63 61 6e  25 2c 22 49 64 6c 65 22  |(dirscan%,"Idle"|
00003e80  29 0d 14 f0 0f 73 63 61  6e 6e 69 6e 67 25 3d a3  |)....scanning%=.|
00003e90  0d 14 fa 05 e1 0d 15 04  04 0d 15 0e 0f dd f2 73  |...............s|
00003ea0  74 61 72 74 73 63 61 6e  0d 15 18 0d ea 20 70 72  |tartscan..... pr|
00003eb0  65 66 69 78 24 0d 15 22  22 f2 70 75 74 64 61 74  |efix$.."".putdat|
00003ec0  61 28 32 33 2c 22 53 74  6f 70 20 44 72 69 76 65  |a(23,"Stop Drive|
00003ed0  20 53 63 61 6e 22 29 0d  15 2c 22 73 63 61 6e 6e  | Scan")..,"scann|
00003ee0  69 6e 67 25 3d b9 3a 69  6e 66 65 63 74 25 3d a3  |ing%=.:infect%=.|
00003ef0  3a 73 74 69 6c 6c 25 3d  a3 0d 15 36 20 70 72 65  |:still%=...6 pre|
00003f00  66 69 78 24 3d 66 73 79  73 24 2b 22 3a 3a 22 2b  |fix$=fsys$+"::"+|
00003f10  c3 28 64 72 69 76 65 25  29 0d 15 40 2a f2 70 75  |.(drive%)..@*.pu|
00003f20  74 64 61 74 61 28 73 74  61 74 75 73 25 2c 22 44  |tdata(status%,"D|
00003f30  72 69 76 65 20 53 63 61  6e 20 73 74 61 72 74 65  |rive Scan starte|
00003f40  64 22 29 0d 15 4a 19 f2  63 68 65 63 6b 28 70 72  |d")..J..check(pr|
00003f50  65 66 69 78 24 2c 22 24  22 2c 30 29 0d 15 54 11  |efix$,"$",0)..T.|
00003f60  e7 20 73 63 61 6e 6e 69  6e 67 25 20 8c 0d 15 5e  |. scanning% ...^|
00003f70  2d 20 20 20 6e 75 6d 73  63 61 6e 73 25 2b 3d 31  |-   numscans%+=1|
00003f80  3a f2 70 75 74 64 61 74  61 28 32 32 2c c3 28 6e  |:.putdata(22,.(n|
00003f90  75 6d 73 63 61 6e 73 25  29 29 0d 15 68 14 20 20  |umscans%))..h.  |
00003fa0  20 f2 68 69 6c 69 74 65  28 32 33 2c a3 29 0d 15  | .hilite(23,.)..|
00003fb0  72 12 20 20 20 e7 20 69  6e 66 65 63 74 25 20 8c  |r.   . infect% .|
00003fc0  0d 15 7c 14 20 20 20 20  20 20 e7 20 73 74 69 6c  |..|.      . stil|
00003fd0  6c 25 20 8c 0d 15 86 41  20 20 20 20 20 20 20 20  |l% ....A        |
00003fe0  20 f2 70 75 74 64 61 74  61 28 73 74 61 74 75 73  | .putdata(status|
00003ff0  25 2c 70 72 65 66 69 78  24 2b 22 20 6d 61 79 20  |%,prefix$+" may |
00004000  73 74 69 6c 6c 20 62 65  20 69 6e 66 65 63 74 65  |still be infecte|
00004010  64 20 21 22 29 0d 15 90  0b 20 20 20 20 20 20 cc  |d !")....      .|
00004020  0d 15 9a 45 20 20 20 20  20 20 20 20 20 f2 70 75  |...E         .pu|
00004030  74 64 61 74 61 28 73 74  61 74 75 73 25 2c 70 72  |tdata(status%,pr|
00004040  65 66 69 78 24 2b 22 20  77 61 73 20 69 6e 66 65  |efix$+" was infe|
00004050  63 74 65 64 2c 20 62 75  74 20 6e 6f 77 20 63 6c  |cted, but now cl|
00004060  65 61 6e 22 29 0d 15 a4  0b 20 20 20 20 20 20 cd  |ean")....      .|
00004070  0d 15 ae 08 20 20 20 cc  0d 15 b8 3f 20 20 20 20  |....   ....?    |
00004080  20 20 f2 70 75 74 64 61  74 61 28 73 74 61 74 75  |  .putdata(statu|
00004090  73 25 2c 70 72 65 66 69  78 24 2b 22 20 69 73 20  |s%,prefix$+" is |
000040a0  63 6c 65 61 6e 20 2d 20  6e 6f 20 69 6e 66 65 63  |clean - no infec|
000040b0  74 69 6f 6e 73 22 29 0d  15 c2 08 20 20 20 cd 0d  |tions")....   ..|
000040c0  15 cc 12 20 20 20 f2 6f  70 65 6e 77 69 6e 64 6f  |...   .openwindo|
000040d0  77 0d 15 d6 05 cc 0d 15  e0 36 20 20 20 f2 70 75  |w........6   .pu|
000040e0  74 64 61 74 61 28 73 74  61 74 75 73 25 2c 22 44  |tdata(status%,"D|
000040f0  72 69 76 65 20 53 63 61  6e 20 6d 61 6e 75 61 6c  |rive Scan manual|
00004100  6c 79 20 61 62 6f 72 74  65 64 22 29 0d 15 ea 05  |ly aborted")....|
00004110  cd 0d 15 f4 0f f2 66 69  6e 69 73 68 73 63 61 6e  |......finishscan|
00004120  0d 15 fe 05 e1 0d ff                              |.......|
00004127