Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199609.adf » Extras » PDScheme/!countdown/!RUNIMAGE

PDScheme/!countdown/!RUNIMAGE

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

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

Tape/disk: Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199609.adf » Extras
Filename: PDScheme/!countdown/!RUNIMAGE
Read OK:
File size: 4916 bytes
Load address: 0000
Exec address: 0000
File contents
   10PROCsetup
   20ONERRORPROCerror
   30quit%=FALSE
   40$block%="TASK"
   50SYS"Wimp_Initialise",200,!block%,"Countdown"TOversion%,task%
   60SYS"Wimp_OpenTemplate",,dir$+".Templates"
   70ifhandle%=FNload_template("PROGINFO")
   80logohandle%=FNload_template("logo")
   90helphandle%=FNload_template("HELPPAGE")
  100rollhandle%=FNload_template("HONOUR")
  110reshandle%=FNload_template("RESULTS"):
  120savehandle%=FNload_template("SAVEBOX")
  130chandle%=FNload_template("COUNTDOWN")::block%!24=-1
  140SYS"Wimp_CloseTemplate"
  150ibhandle%=FNicon(-2,0,0,68,68,&3002,"!COUNTDOWN",0,0,0)
  160logicon%=FNicon(chandle%,672,-556,314,244,&19A,"",sp%,-1,&FF)
  170PROCmenus
  180PROCopenwindow(chandle%)
  190REPEAT
  200SYS"OS_ReadMonotonicTime"TOearliest_time%
  210earliest_time%+=increment%
  220PROCpoll
  230UNTILquit%
  240PROCquit:IF quit%=FALSETHEN190
  250END
  260DEFPROCpoll
  270SYS"Wimp_PollIdle",0,block%,earliest_time%TOreason%
  280CASEreason%OF
  290WHEN0:PROCtime
  300WHEN1:PROCredraw
  310WHEN2:SYS"Wimp_OpenWindow",,block%
  320WHEN3:SYS"Wimp_CloseWindow",,block%
  330WHEN5:PROCpointer
  340WHEN6:PROCbuttons
  350WHEN7:PROCinitiatesave(handle%,iconn%)
  360WHEN8:PROCprocess
  370WHEN9:PROCmenuselect
  380WHEN17,18 :PROCreceive
  390WHEN19:SYS"OS_File",6,block%+44:ERROR 255,"Data Transfer Failed:receiver died"
  400ENDCASE:ENDPROC
  410:
  420DEFPROCbuttons:x%=!block%:y%=block%!4:click%=block%!8:handle%=block%!12:iconn%=block%!16
  430CASEhandle%OF
  440WHEN -2
  450IFclick%=2 THENPROCshowmenu(menu1%,x%,y%,FALSE,entries%)
  460WHENchandle%
  470IF click%=2 AND active%=0 AND iconn%=39THENiconn%=logicon%:PROCdeleteicon(handle%,iconn%):PROCredrawicon(handle%,iconn%):logo%=0
  480IFclick%=4 THEN
  490IFactive%=0 AND timer%=1 AND iconn%=31THENtimer%=0:PROCseticon(chandle%,31,"O F F",0):GOTO510
  500IFactive%=0 AND timer%=0 AND iconn%=31THENtimer%=1:PROCseticon(chandle%,31,"O N",0)
  510IFactive%=0 AND iconn%=29 THEN
  520difficulty%+=1:IF difficulty%=7 THENdifficulty%=1
  530PROCseticon(chandle%,29,STR$difficulty%,0)
  540ENDIF
  550IFactive%=0 AND iconn%=30 THEN
  560table%+=1:IF table%=13 THEN$tab%="A L L" ELSE $tab%=STR$table%
  570IF table%=14THEN table%=1: $tab%=STR$table%
  580PROCseticon(chandle%,30,$tab%,0)
  590ENDIF
  600IFiconn%=13 AND logo%=1THENPROCstart
  610IFiconn%=28 AND active%=0THEN
  620PROCseticon(chandle%,25,"typ1",0):SYS"Wimp_SetCaretPosition",chandle%,24,,,-1,LEN$name%
  630IF logo%=0THENlogicon%=FNicon(chandle%,672,-556,314,244,&19A,"",sp%,-1,&FF):PROCredrawicon(chandle%,logicon%):logo%=1
  640ENDIF
  650IF active%=0THEN
  660IFiconn%=36THENMOUSE TO 450,350:PROCopenwindow(reshandle%)
  670IFiconn%=37THENMOUSE TO 450,350:SYS"Wimp_CreateMenu",,rollhandle%,350,700
  680IFiconn%=35THENPROCletprint
  690ENDIF
  700ENDIF
  710WHENsavehandle%
  720IFiconn%=1 AND(click%AND&50)>0 THEN
  730PROCdragbox(handle%)
  740ELSEIFiconn%=2 AND(click%AND5)>0 THENPROCquicksave($savename%)
  750ENDIF
  751WHEN reshandle%
  752IF click%=4 AND iconn%=0THEN PROCclosewindow(reshandle%)
  760ENDCASE
  770ENDPROC
  780:
  790DEFPROCstart
  800*FX12,0
  810*FX11,0
  820MOUSE OFF:MOUSE RECTANGLE 0,0,0,0
  830IF$name%=""THENVDU7:GOTO930
  840IFactive%<>0THENVDU7:GOTO930
  850PROCseticon(chandle%,16,"",&1B00013D)
  860PROCseticon(chandle%,23,"",&800F159)
  870SYS"Wimp_SetCaretPosition",chandle%,23,,,-1,0
  880T+=1:$tab%=STR$table%:IFtable%=13THEN $tab%="A L L"
  890name$(T)=$name%:table%(T)=table%:level%(T)=difficulty%:IFtimer%=1THENO$(T)="ON" ELSE O$(T)="OFF"
  900PROCseticon(chandle%,25,"now",0):PROCbegin:PROCquestion:PROCscreen
  910IFtimer%=1THEN active%=1:seconds%=3000
  920IFtimer%=0THENactive%=2:number%=1:PROCdraw1
  930ENDPROC
  940************************WINDOW PROCS**********************************
  950DEFFNload_template(name$)
  960LOCALh%
  970SYS"Wimp_LoadTemplate",,block%,iblock%,iend%,font%,name$,0 TO,,iblock%
  980IFname$="COUNTDOWN"THEN
  990block%!12=1024:block%!(88+20+32*24)=name%:block%!(88+20+32*18)=yscore%:block%!(88+20+32*19)=cscore%:block%!(88+20+32*20)=acc%:block%!(88+20+32*23)=ico32%:block%!(88+20+32*12)=sec%
 1000ENDIF
 1010IFname$="LEVBOX"THEN
 1020block%!(88+20+32*2)=diff%:block%!(88+20+32*3)=tab%
 1030ENDIF
 1040IFname$="SAVEBOX"THEN
 1050block%!(88+20)=savename%
 1060ENDIF
 1070IFname$="logo"THEN
 1080ENDIF
 1090SYS"Wimp_CreateWindow",,block%TOh%
 1100=h%
 1110ENDPROC
 1120:
 1130DEFPROCchangewindowsize(handle%)
 1140!block%=handle%
 1150si%=-((CO(T)+YO(T)+8)*32)
 1160block%!0=0
 1170block%!4=si%
 1180block%!8=490
 1190block%!12=0
 1200SYS"Wimp_SetExtent",handle%,block%
 1210ENDPROC
 1220:
 1230DEFPROCredraw:
 1240SYS"Wimp_RedrawWindow",,block%TOmore%
 1250WHILEmore%
 1260x0%=block%!4-block%!20:y0%=block%!16-block%!24
 1270yscroll%=block%!24:maxy%=block%!16:graphy%=block%!40
 1280CASE!block%OF
 1290WHENrollhandle%:PROCredraw_1
 1300WHENreshandle%:PROCredraw_2
 1310WHENchandle%
 1320WHENlogohandle%:
 1330ENDCASE
 1340SYS"Wimp_GetRectangle",,block%TOmore%
 1350ENDWHILE
 1360ENDPROC
 1370:
 1380DEFPROCredraw_1
 1390y0%-=32:MOVE x0%+16,y0%
 1400FORN=1TO12
 1410y0%-=32:MOVE x0%+16,y0%
 1420PRINTSTR$N;".  ":MOVEx0%+64,y0%:PRINTroll$(N,1)
 1430MOVEx0%+336,y0%:PRINTroll$(N,2)
 1440MOVEx0%+408,y0%:PRINTroll$(N,3)
 1450NEXT
 1460y0%-=32:MOVE x0%+16,y0%
 1470ENDPROC
 1480:
 1490DEFPROCredraw_2
 1500y0%-=16:MOVE x0%+48,y0%
 1510SYS"Wimp_SetColour",7,14
 1520PRINT"Name: ";:SYS"Wimp_SetColour",15,14:PRINT name$(T):y0%-=32:MOVE x0%+48,y0%
 1530SYS"Wimp_SetColour",7,14
 1540PRINT"Table: ";:SYS"Wimp_SetColour",15,14:PRINT$tab%:y0%-=32:MOVE x0%+48,y0%
 1550SYS"Wimp_SetColour",7,14
 1560PRINT"Level: ";:SYS"Wimp_SetColour",15,14:PRINTSTR$difficulty%:y0%-=64:MOVE x0%+48,y0%
 1590SYS"Wimp_SetColour",10,14
 1600PRINT"CORRECT ANSWERS:":y0%-=32
 1610SYS"Wimp_SetColour",7,14
 1620FORN=1 TOYO(T)
 1630MOVEx0%+48,y0%
 1640IFN<10THENPRINT" "+STR$N+". "+R$(T,N) ELSEPRINTSTR$N+". "+R$(T,N)
 1650y0%-=32
 1660NEXT
 1661IFCO(T)=0THEN1770
 1670y0%-=32
 1680MOVEx0%+48,y0%
 1690SYS"Wimp_SetColour",11,14
 1700PRINT"WRONG ANSWERS:":y0%-=32
 1710SYS"Wimp_SetColour",7,14
 1720PRINT:FORN=1 TOCO(T)
 1730MOVEx0%+48,y0%
 1740IFN<10THENPRINT" "+STR$N+". "+W$(T,N) ELSEPRINTSTR$N+". "+W$(T,N)
 1750y0%-=32
 1760NEXT
 1770ENDPROC
 1780:
 1790DEFPROCdraw1
 1800IFnumber%>9THENnumber$=STR$number%ELSEnumber$=" "+STR$number%
 1810IFnumber%>10THENactive%=0:PROCALL:ENDPROC
 1820PROCseticon(chandle%,12,number$,0)
 1830ENDPROC
 1840:
 1850DEFPROCwindowstate(handle%)
 1860block%!0=handle%
 1870SYS"Wimp_GetWindowState",,block%
 1880ENDPROC
 1890:
 1900DEFPROCopenwindow(handle%)
 1910block%!0=handle%
 1920SYS"Wimp_GetWindowState",,block%
 1930SYS"Wimp_OpenWindow",,block%
 1940ENDPROC
 1950DEFPROCdirwindow(open%,d$)
 1960IFopen%=1 THENcommand$="Filer_OpenDir "ELSEcommand$="Filer_CloseDir "
 1970path$=command$+dir$+"."+d$
 1980OSCLIpath$
 1990ENDPROC
 2000************************MENU ROUTINES*********************************
 2010DEFPROCmenuselect
 2020choice%=!block%:choice2%=block%!4:choice3%=block%!8:choice4%=block%!12
 2030CASEhandle%OF
 2040WHEN -2
 2050IFchoice%=0 THENSYS"Wimp_CreateMenu",,-1
 2060IFchoice%=1 THEN:SYS"Wimp_CreateMenu",,-1
 2070IFchoice%=3THENquit%=TRUE:PROCquit
 2080ENDPROC
 2090:
 2100DEFPROCmenus
 2110PROCdrawmenu(menu1%,"COUNTDOWN,Info,Help,Save as Edit,Quit")
 2120menu1%!32=ifhandle%:menu1%!(32+48)=savehandle%:menu1%!(32+24)=helphandle%
 2130ENDPROC
 2140:
 2150DEFPROCshade(mblock%,item%,action%)
 2160byte%=mblock%+38+24*item%
 2170CASEaction%OF
 2180WHEN-1:?byte%=?byte%EOR64
 2190WHEN0:?byte%=?byte%AND&6F
 2200WHEN1:?byte%=?byte%OR64
 2210ENDCASE
 2220ENDPROC
 2230DEFPROCdrawmenu(menu%,menu$)
 2240maxitem$=""
 2250menu%?12=7:menu%?13=12
 2260menu%?14=7:menu%?15=0
 2270menu%!20=44
 2280menu%!24=0:ptr%=menu%+28
 2290$menu%=LEFT$(menu$,INSTR(menu$,",")-1)
 2300menu$+=","
 2310entries%=0:items%=0
 2320WHILEmenu$<>""
 2330menu$=MID$(menu$,INSTR(menu$,",")+1)
 2340IFmenu$<>""THEN
 2350ptr%!0=0:ptr%!4=-1
 2360ptr%!8=&7000021
 2370$(ptr%+12)=LEFT$(menu$,INSTR(menu$,",")-1)
 2380IFLEN$(ptr%+12)>LENmaxitem$THENmaxitem$=$(ptr%+12)
 2390ptr%+=24:items%+=20
 2400entries%+=1
 2410ENDIF
 2420IFLENmaxitem$>180 THENmenu%!16=(LENmaxitem$+1)*16+32 ELSEmenu%!16=200
 2430ENDWHILE
 2440ptr%!-24=ptr%!-24 OR&80
 2450ENDPROC
 2460DEFPROCshowmenu(menu%,x%,y%,oniconbar%,entries%)
 2470IFoniconbar%THENypos%=96+entries%+44 ELSEypos%=y%+20
 2480SYS"Wimp_CreateMenu",,menu%,x%-64,ypos%
 2490ENDPROC
 2500DEFPROCerrorm(message$,r%)
 2510$(block%+4)=message$
 2520IFr%=1 THENSYS"Wimp_ReportError",block%,3,"Countdown" TO,response%ELSESYS"Wimp_ReportError",block%,1,"Test Task"
 2530ENDPROC
 2540*******************************ICONPROCS**********************************
 2550DEFPROCseticon(handle%,icon%,text$,flag%)
 2560PROCdeleteicon(handle%,icon%)
 2570block%!4=handle%
 2580IFflag%<>0 THENblock%!24=flag%
 2590IF text$=""THEN2640
 2600CASE icon% OF
 2610WHEN 21,22,25,32,33:$(block%+28)=text$
 2620WHEN 12,23,29,30,31:$sname1%=text$:block%!28=sname1%
 2630ENDCASE
 2640SYS"Wimp_CreateIcon",,block%+4 TOicon%
 2650PROCredrawicon(handle%,icon%)
 2660ENDPROC
 2670:
 2680DEFPROCdeleteicon(handle%,icon%)
 2690!block%=handle%:block%!4=icon%
 2700SYS"Wimp_GetIconState",,block%
 2710SYS"Wimp_DeleteIcon",,block%
 2720ENDPROC
 2730:
 2740DEFPROCredrawicon(handle%,icon%)
 2750!block%=handle%:block%!4=icon%
 2760block%!8=0:block%!12=0
 2770SYS"Wimp_SetIconState",,block%
 2780ENDPROC
 2790:
 2800DEFPROCiconstate(handle%,icon%)
 2810block%!0=handle%
 2820block%!4=icon%
 2830SYS"Wimp_GetIconState",,block%
 2840ENDPROC
 2850*************************LOAD AND SAVE ROUTINES***************************
 2860DEFPROCsavehonour
 2870X=OPENOUT(dir$+".ROLL")
 2880M=0:PTR#X=M
 2890FORN=1TO12
 2900PRINT#X,roll$(N,1):M+=20:PTR#X=M
 2910PRINT#X,roll$(N,2):M+=5:PTR#X=M
 2920PRINT#X,roll$(N,3):M+=20:PTR#X=M
 2930NEXT
 2940CLOSE#X
 2950type%=&803
 2960path$="SETTYPE "+dir$+".ROLL "+STR$~type%:OSCLIpath$
 2970ENDPROC
 2980DEFPROCnamefile
 2990file$="SETTYPE "+name$+" "+STR$~type%
 3000OSCLIfile$
 3010ENDPROC
 3020DEFPROCloadhonour
 3030X=OPENIN(dir$+".ROLL")
 3040IFX=0THENPROCsavehonour:ENDPROC
 3050M=0:PTR#X=M
 3060FORN=1TO12
 3070INPUT#X,roll$(N,1):M+=20:PTR#X=M
 3080INPUT#X,roll$(N,2):M+=5:PTR#X=M
 3090INPUT#X,roll$(N,3):M+=20:PTR#X=M
 3100NEXT
 3110CLOSE#X
 3120ENDPROC
 3130************************UTILITY PROCS*************************************
 3140DEFPROCdirname
 3150DIMbuffer 256
 3160SYS"OS_ReadVarVal","Obey$Dir",buffer,256,0,3 TO,,length
 3170buffer?length=13
 3180dir$=$buffer
 3190ENDPROC
 3200DEFPROCquit
 3210VDU3
 3220PROCerrorm("Are you sure you really want to quit now?",1)
 3230IFresponse%<>1THENquit%=FALSE:ENDPROC
 3240PROCsavehonour
 3250MOUSE ON
 3260SYS"Wimp_CloseDown"
 3270*FX11,60
 3280END
 3290DEFPROCerror
 3300!block%=ERR
 3310$(block%+4)=REPORT$+" internal error code "+STR$ERL+")"+CHR$0
 3320SYS"Wimp_ReportError",block%,1,"COUNTDOWN"
 3330quit%=TRUE:PROCquit
 3340ENDPROC
 3350*************************COUNTDOWN PROG******************************
 3360DEFPROCtime
 3370SYS"OS_ReadMonotonicTime" TO newtime%
 3380WHILE (newtime%-earliest_time%>0)
 3390earliest_time%+=increment%
 3400ENDWHILE
 3410IFactive%=1ANDtimer%=1THEN
 3420seconds%-=increment%
 3430IFseconds%<100THENPROCALL:ENDPROC
 3440PROCseticon(chandle%,11,"",&1B00613D)
 3450$sec%=STR$(seconds%/100)
 3460PROCredrawicon(chandle%,12)
 3470SOUND1,-15,160,1
 3480ENDIF
 3490ENDPROC
 3500:
 3510DEFPROCchoose:CH$(YO(T)+CO(T))=STR$(Q)+STR$(AA)+STR$(answer%)
 3520IF answer%<>VAL$ico32%THENPROCwrong ELSEPROCcorrect
 3530CO$=STRING$(2-LENSTR$CO(T)," ")+STR$(CO(T))
 3540YO$=STRING$(2-LENSTR$YO(T)," ")+STR$(YO(T))
 3550$acc%=STRING$(3-LENSTR$(YO(T)-CO(T))," ")+STR$INT(YO(T)/(YO(T)+CO(T))*100)+"%"
 3560PROCredrawicon(chandle%,20)
 3570$yscore%=YO$:PROCredrawicon(chandle%,18)
 3580$cscore%=CO$:PROCredrawicon(chandle%,19)
 3590SIGN$=" ":PROCseticon(chandle%,32,SIGN$,0)
 3600ENDPROC
 3610:
 3620DEFPROCrand
 3630IFtable%(T)<13THENA=table%(T) ELSEA=RND(12)
 3640B=RND(12):C=A*B
 3650ENDPROC
 3660:
 3670DEFPROCquestion
 3680TIME=0
 3690PROCrand
 3700IFdifficulty%=6THEN
 3710IFtable%<>13 ANDB>7THEN3750
 3720IFtable%=13 ANDA<7 THEN3690
 3730IFB<8 THEN3690
 3740IFB=11THEN 3690
 3750ENDIF
 3760IFdifficulty%=5THEN
 3770IFtable%<>13 ANDB>5THEN3800
 3780IFtable%=13 ANDA<6 THEN3690
 3790IFB<6 THEN3690
 3800ENDIF
 3810IFdifficulty%=4THEN
 3820IFtable%<>13 ANDB>3THEN3850
 3830IFtable%=13 ANDA<5THEN3690
 3840IFB>7 ORB<4 THEN3690
 3850ENDIF
 3860IFdifficulty%=3THEN
 3870IFtable%<>13 ANDB>6THEN3900
 3880IFtable%=13 ANDA<4 THEN3690
 3890IFB>6THEN 3690
 3900ENDIF
 3910IFdifficulty%=2THEN
 3920IFtable%<>13 ANDB>4THEN3950
 3930IFtable%=13 ANDA>6THEN3690
 3940IFB>5 THEN3690
 3950ENDIF
 3960IFdifficulty%=1THEN
 3970IFtable%<>13 ANDB>2THEN4000
 3980IFtable%=13 ANDA>5THEN3690
 3990IFB>4 THEN3690
 4000ENDIF
 4010d%=RND(3)
 4020IFlevel%(T)<4 ANDd%=3THEN 4010
 4030IFd%=1 THENQ=A:AA=B:answer%=C:S$=" x ":SIGN$="x"
 4040IFd%=2THENQ=B:AA=A:answer%=C:S$=" x ":SIGN$="x"
 4050IFd%=3THEN S$=" "+CHR$247+" ":Q=C:answer%=B:AA=A:SIGN$=CHR$247
 4060X$=STRING$(3-LENSTR$Q," ")+STR$Q:
 4070Y$=STRING$(2-LENSTR$AA," ")+STR$AA:
 4080Z$=STRING$(3-LENSTR$answer%," ")+STR$answer%
 4090V$=STR$Q+STR$AA+STR$answer%:PROCCHECK:IF CH=1 THENCH=0:GOTO3690
 4100E$=" = ":ENDPROC
 4110:
 4120:
 4130DEFPROCwrong:CO(T)=CO(T)+1
 4140PROCseticon(chandle%,25,"wron",0)
 4150TIM%=TIME:REPEATUNTILTIME=TIM%+100
 4160IFd%=1THENW$(T,CO(T))="..?"+S$+Y$+E$+Z$
 4170IFd%=2THENW$(T,CO(T))=X$+S$+".?"+E$+Z$
 4180IFd%=3THENW$(T,CO(T))=X$+S$+Y$+E$+"..?"
 4190$ico32%=STR$answer%
 4200PROCseticon(chandle%,2,"",&CB00613D)
 4210PROCredrawicon(chandle%,23)
 4220PROCseticon(chandle%,25,"rig",0)
 4230TIM%=TIME:REPEATUNTILTIME=TIM%+150
 4240$ico32%=""
 4250PROCredrawicon(chandle%,23)
 4260PROCseticon(chandle%,25,"now",0)
 4270ENDPROC
 4280:
 4290DEFPROCcorrect:YO(T)=YO(T)+1:R$(T,YO(T))=X$+S$+Y$+E$+Z$
 4300PROCseticon(chandle%,2,"",&CB00613D)
 4310PROCseticon(chandle%,25,"rig",0)
 4320TIM%=TIME:REPEATUNTILTIME=TIM%+150
 4330PROCseticon(chandle%,25,"now",0)
 4340$ico32%=""
 4350ENDPROC
 4360:
 4370DEFPROCCHECK:IF CO(T)+YO(T)<1 THENENDPROC
 4380N=1:REPEAT
 4390IFV$=CH$(N) THENCH=1
 4400N+=1:UNTILN>(CO(T)+YO(T)) ORCH=1
 4410ENDPROC
 4420:
 4430DEFPROCALL
 4440SOUND1,-15,240,20:active%=0:$name%="N O  N A M E"
 4450PROCseticon(chandle%,24,"",&17006111)
 4460PROCseticon(chandle%,25,"new",0)
 4470SYS"Wimp_SetCaretPosition",chandle%,24,,,-1,LEN$name%
 4480PROCseticon(chandle%,0,"",&1B00613D)
 4490PROCseticon(chandle%,1,"",&1B00613D)
 4500PROCseticon(chandle%,2,"",&1B00613D)
 4510PROCseticon(chandle%,32," ",0)
 4520PROCseticon(chandle%,33," ",0)
 4530PROCseticon(chandle%,21," ",0):PROCseticon(chandle%,22," ",0)
 4540$sec%="":PROCredrawicon(chandle%,12)
 4550$ico32%="":PROCseticon(chandle%,23,"",&8006159)
 4560IFdifficulty%=6 ANDtimer%=1THEN PROCroll
 4570PROCchangewindowsize(reshandle%)
 4580MOUSE ON
 4590MOUSETO900,150
 4600ENDPROC
 4610:
 4620DEFPROCbegin:SYS"Wimp_CreateMenu",,-1:$name%="No Name"
 4630SIGN$=" "
 4640$acc%=" 0":PROCredrawicon(chandle%,20)
 4650$yscore%=" 0":PROCredrawicon(chandle%,18)
 4660$cscore%=" 0":PROCredrawicon(chandle%,19)
 4670PROCseticon(chandle%,0,"",&CB00613D)
 4680PROCseticon(chandle%,1,"",&CB00613D)
 4690PROCseticon(chandle%,2,"",&CB00613D)
 4700PROCseticon(chandle%,32,SIGN$,0)
 4710PROCseticon(chandle%,33,"=",0)
 4720ENDPROC
 4730:
 4740DEFPROCscreen:
 4750PROCseticon(chandle%,21,X$,0):PROCseticon(chandle%,22,Y$,0)
 4760PROCseticon(chandle%,32,SIGN$,0)
 4770PROCseticon(chandle%,33,"=",0)
 4780ENDPROC
 4790:
 4800DEFPROCkey1
 4810IFkey%<>13 THEN4990
 4820SYS"Wimp_GetCaretPosition",,block%
 4830ico%=block%!4:IF ico%=-1THEN5020
 4840IFico%=24THEN
 4850SYS"Wimp_SetCaretPosition",,-1
 4860IF$name%=""THENVDU7:ENDIF
 4870PROCseticon(chandle%,ico%,"",&17006111)
 4880PROCseticon(chandle%,25,"cstart",0)
 4890ENDIF
 4900IFico%=23THEN
 4910IF$ico32%=""THENVDU7:GOTO4980
 4920PROCchoose
 4930IFtimer%=0THENnumber%+=1
 4940IFactive%=2THENPROCdraw1
 4950SYS"Wimp_SetCaretPosition",chandle%,23,,,-1,0
 4960PROCseticon(chandle%,2,"",&1000613D)
 4970PROCquestion:PROCscreen
 4980ENDIF
 4990IFkey%=17THEN
 5000quit%=TRUE
 5010ENDIF
 5020ENDPROC
 5030:
 5040DEFPROCpointer
 5050SYS"Wimp_GetPointerInfo",,block%
 5060IFblock%!12=chandle%THENSYS"Wimp_CreateMenu",,-1
 5070ENDPROC
 5080:
 5090DEFPROCroll
 5100FORN=1TO12
 5110IFVALroll$(N,2)<YO(T)-CO(T)THEN
 5120FORM=12TON+1STEP-1
 5130roll$(M,1)=roll$(M-1,1):roll$(M,2)=roll$(M-1,2):roll$(M,3)=roll$(M-1,3)
 5140NEXT
 5150roll$(N,1)=name$(T):roll$(N,2)=STR$(YO(T)-CO(T)):roll$(N,3)=date$:N=12
 5160ENDIF
 5170NEXT
 5180ENDPROC
 5190:
 5200DEFFNicon(whandle%,ix%,iy%,iw%,ih%,flag%,text$,d1%,d2%,d3%)
 5210block%!0=whandle%
 5220block%!4=ix%:block%!8=iy%
 5230block%!12=ix%+iw%
 5240block%!16=iy%+ih%
 5250block%!20=flag%
 5260IF d1%=0 THEN
 5270$(block%+24)=text$
 5280ELSE
 5290block%!24=d1%:block%!28=d2%
 5300block%!32=d3%
 5310ENDIF
 5320SYS"Wimp_CreateIcon",,block% TO ihandle%
 5330=ihandle%
 5340***********************PRINT ROUTINES****************************
 5350DEFPROCdefine
 5360VDU2:VDU1,27,1,58,1,0,1,0,1,0:VDU1,27,1,38,1,0,1,246,1,246,1,139:VDU1,16,1,16,1,16,1,214,1,214,1,16,1,16,1,16,1,0,1,0,1,0:VDU1,27,1,37,1,1,1,0:ENDPROC
 5370DEFPROCletprint:VDU2:PROCdefine:VDU1,27,77:VDU1,27,1,87,1,1:VDU1,27,69
 5380PRINTTAB(3);:VDU1,27,1,45,1,1:PRINT"Name:";:VDU1,27,1,45,1,0:PRINT" ";name$(T)
 5390VDU1,10:PRINTTAB(3);:VDU1,27,1,45,1,1:PRINT"TABLE: ";:VDU1,27,1,45,1,0
 5400PRINT" ";table%(T);TAB(23);:VDU1,27,1,45,1,1:PRINT"LEVEL:";:VDU1,27,1,45,1,0:PRINT" ";level%(T)
 5410printtime$=MID$(TIME$,5,11)
 5420VDU1,10:PRINTTAB(3);:VDU1,27,1,45,1,1:PRINT"TIMER:";:VDU1,27,1,45,1,0:PRINT" ";O$(T);TAB(23);::VDU1,27,1,45,1,1:PRINT"DATE:";:VDU1,27,1,45,1,0:PRINT" ";printtime$
 5430VDU1,10:PRINTTAB(3);:VDU1,27,1,45,1,1:VDU1,10:PRINT"CORRECT ANSWERS:":VDU1,27,1,45,1,0:VDU1,10:FOR N=1 TOYO(T):IFYO(T)=0THEN5450
 5440L$=R$(T,N):PRINTN;" ";:PROCL:VDU1,10
 5450NEXT
 5460IFCO(T)=0THENPRINT:PRINT TAB(2);:VDU1,27,1,45,1,1:PRINT"A L L  C O R R E C T ! ....E X C E L L E N T !":VDU1,27,1,45,1,0:VDU1,10:VDU1,12:VDU3:ENDPROC
 5470PRINTTAB(3);:VDU1,27,1,45,1,1:VDU1,10:PRINT"WRONG ANSWERS:":VDU1,27,1,45,1,0:VDU1,10:FOR N=1 TOCO(T):IFCO(T)=0THEN5490
 5480L$=W$(T,N):PRINTN;" ";:PROCL:VDU1,10
 5490NEXT
 5500PRINTTAB(5);:VDU1,27,1,45,1,1:PRINT"Now work out the correct answers!"::VDU1,27,1,45,1,0:VDU1,10:VDU1,27,64:VDU1,12:VDU3:VDU26:ENDPROC
 5510DEFPROCL:FORNN=1TOLENL$:LL$=MID$(L$,NN,1):IF LL$=CHR$247 THENLL$=CHR$246
 5520PRINTLL$;:NEXT:ENDPROC
 5530DEFPROCclosewindow(handle%):block%!0=handle%:SYS"Wimp_CloseWindow",,block%:ENDPROC
 5540DEFPROCdragbox(handle%)
 5550!block%=handle%
 5560SYS"Wimp_GetWindowState",,block%
 5570ox%=block%!4-block%!20
 5580oy%=block%!16-block%!24
 5590block%!4=iconn%
 5600SYS"Wimp_GetIconState",,block%
 5610!block%=handle%
 5620block%!4=5
 5630block%!8=ox%+block%!8
 5640block%!12=oy%+block%!12
 5650block%!16=ox%+block%!16
 5660block%!20=oy%+block%!20
 5670block%!24=0:block%!28=0
 5680block%!32=&7FFFFFFF
 5690block%!36=&7FFFFFFF
 5700SYS"Wimp_DragBox",,block%
 5710ENDPROC
 5720DEFPROCquicksave(name$)
 5730IFINSTR(name$,".")THEN
 5740IFhandle%=savehandle%THENtype%=filetype%:PROCsavefile(name$)
 5750ELSE
 5760PROCerrorm("   To save, drag the icon to a directory viewer",0)
 5770PROCdirwindow(1,"FILES")
 5780ENDIF
 5790ENDPROC
 5800:
 5810DEFPROCinitiatesave(handle%,iconn%)
 5820PROCiconstate(handle%,iconn%)
 5830IF$savename%=""THENPROCerrorm("     Type in a file name!",0):ENDPROC
 5840SYS"Wimp_GetPointerInfo",,block%
 5850block%!20=block%!12:block%!24=block%!16:block%!28=block%!0:block%!32=block%!4:block%!36=255:block%!0=64:block%!12=0:block%!16=1:block%!40=filetype%:file$=$savename%:$(block%+44)=FNgetleaf($savename%)
 5860SYS"Wimp_SendMessage",17,block%,block%!20,block%!24
 5870ENDPROC
 5880DEFFNgetleaf(name$)
 5890WHILEINSTR(name$,".")
 5900name$=MID$(name$,INSTR(name$,".")+1)
 5910ENDWHILE
 5920=name$+CHR$0
 5930DEFPROCdatasave
 5940fullname$="":a%=0:b%=block%?(44+a%)
 5950WHILEb%<>0:fullname$=fullname$+CHR$b%:a%+=1:b%=block%?(44+a%):ENDWHILE
 5960messvar1%=block%:messvar2%=block%!20:messvar3%=block%!24
 5970ENDPROC
 5980DEFPROCsave1(name$)
 5990PROCsavefile(name$)
 6000IFblock%!36>-1THEN $savename%=name$
 6010block%!12=block%!8
 6020block%!16=3
 6030!block%=256
 6040SYS"Wimp_SendMessage",18,messvar1%,messvar2%,messvar3%
 6050SYS"Wimp_CreateMenu",,-1
 6060ENDPROC
 6070DEFPROCreceive
 6080CASEblock%!16 OF
 6090WHEN0: quit%=TRUE
 6100WHEN2:PROCdatasave:PROCsave1(fullname$)
 6110ENDCASE
 6120ENDPROC
 6130DEFPROCloadack
 6140block%!12=block%!8
 6150block%!16=4
 6160SYS"Wimp_SendMessage",17,block%,block%!4
 6170ENDPROC
 6180DEFPROCsavefile(name$)
 6190pointer%=0:printtime$=MID$(TIME$,5,11)
 6200store$="LIST OF PUPILS"+STRING$(25," ")+"DATE: "+printtime$
 6210FORL=1TOLENstore$:edittext%?pointer%=ASCMID$(store$,L,1):pointer%+=1:NEXT
 6220edittext%?pointer%=10:pointer%+=1
 6230store$=STRING$(5," ")+"NAME"+STRING$(13," ")+"TABLE"+STRING$(10," ")+"LEVEL"+STRING$(9," ")+"Correct[%]"+STRING$(6," ")+"TIMER"
 6240FORL=1TOLENstore$:edittext%?pointer%=ASCMID$(store$,L,1):pointer%+=1:NEXT
 6250edittext%?pointer%=10:pointer%+=1
 6260FORN=1TOT:
 6270store$=STRING$(2-LENSTR$N," ")+STR$N+". "+name$(N)+STRING$(20-LENname$(N)," ")
 6280IFtable%(N)=13 THENT$="ALL"ELSET$=STR$table%(N)
 6290store$+=T$+STRING$(15-LENT$," ")+STR$level%(N)+STRING$(14-LENSTR$level%(N)," ")
 6300IF YO(N)=0 AND CO(N)=0THENper%=0:GOTO6320
 6310per%=INT(YO(N)/(YO(N)+CO(N))*100)
 6320store$+=STR$per%+"%"+STRING$(3-LENSTR$(per%)," ")+STRING$(12-LENO$(N)," ")+O$(N)+CHR$10+"Items Incorrect: "
 6330FORM=1TOCO(N):store$=store$+W$(N,M)+" ":NEXT
 6340FORL=1TOLENstore$:edittext%?pointer%=ASCMID$(store$,L,1):pointer%+=1:NEXT
 6350edittext%?pointer%=10:pointer%+=1
 6360NEXT
 6370PROCsavetext(name$,edittext%,pointer%)
 6380ENDPROC
 6390DEFPROCsavetext(name$,start%,length%)
 6400SYS"OS_File",10,name$,&FFF,,start%,start%+length%
 6410ENDPROC
 6420:
 6430DEFPROCsetup
 6440DIMblock%&9900,iblock%&9900,menu1%&100,menu2% &100
 6450iend%=iblock%+&1000:PROCdirname
 6460DIMsbval%10: $sbval%="A~ ":DIMmessage%&FF:$message%="":
 6470DIMyscore%&20,cscore%&20,acc%&20,diff%&20, tab%&20:$yscore%="":$cscore%="":$acc%="":$diff%="6":$tab%="A L L"
 6480P%=0:paper%=25:T=0:CH=0:w%=0
 6490DIMCH$(35):DIM R$(35,25):DIM W$(35,25):DIMname$(35):DIMlevel%(35):DIMYO(35):DIMCO(35):DIMO%(35):DIM O$(35):DIM table%(35)
 6500difficulty%=6:table%=13:timer%=1:increment%=100:active%=0:DIM roll$(13,3):logo%=1:pointer%=0:filetype%=&FFF:quit%=0
 6510pupil%=0:group%=1:response%=1:SIGN$="":arrow%=1
 6520X$="":Y$="":date$=MID$(TIME$,5,LENTIME$-13):PROCloadhonour
 6530sprite$=dir$+".Sprites"
 6540DIMedittext%&4000:toggle%=0:DIM font% 256:FORf%=0TO255:font%?f%=0:NEXT
 6550DIMname%&20:$name%="No Name":DIMsavename%&FF: $savename%="GroupFile"
 6560DIMsname1%&20:$sname1%="":DIM ico32% &10:$ico32%="":DIM sec% &10: $sec%=""
 6570DIMsp% &FF: $sp%="log1"
 6580VDU23,240,0,24,24,0,255,0,24,24
 6590ENDPROC
 6600DEFPROCprocess
 6610handle%=!block%
 6620key%=block%!24
 6630IF key%=13THEN PROCkey1
 6640IF key%=17THEN PROCkey1
 6650IF key%<32 OR key%>122 THEN SYS"Wimp_ProcessKey",block%!24:ENDPROC
 6660ENDPROC
 6670:


�setup
��error
quit%=�
($block%="TASK"
2>ș"Wimp_Initialise",200,!block%,"Countdown"�version%,task%
<,ș"Wimp_OpenTemplate",,dir$+".Templates"
F(ifhandle%=�load_template("PROGINFO")
P&logohandle%=�load_template("logo")
Z*helphandle%=�load_template("HELPPAGE")
d(rollhandle%=�load_template("HONOUR")
n)reshandle%=�load_template("RESULTS"):
x)savehandle%=�load_template("SAVEBOX")
�6chandle%=�load_template("COUNTDOWN")::block%!24=-1
�ș"Wimp_CloseTemplate"
�:ibhandle%=�icon(-2,0,0,68,68,&3002,"!COUNTDOWN",0,0,0)
�@logicon%=�icon(chandle%,672,-556,314,244,&19A,"",sp%,-1,&FF)
�
�menus
��openwindow(chandle%)
��
�+ș"OS_ReadMonotonicTime"�earliest_time%
�earliest_time%+=increment%
�	�poll
�
�quit%
��quit:� quit%=���t~@
��

��poll
5ș"Wimp_PollIdle",0,block%,earliest_time%�reason%
Ȏreason%�
"�0:�time
,�1:�redraw
6"�2:ș"Wimp_OpenWindow",,block%
@#�3:ș"Wimp_CloseWindow",,block%
J�5:�pointer
T�6:�buttons
^$�7:�initiatesave(handle%,iconn%)
h�8:�process
r�9:�menuselect
|�17,18 :�receive
�J�19:ș"OS_File",6,block%+44:� 255,"Data Transfer Failed:receiver died"
��:�
�:
�W��buttons:x%=!block%:y%=block%!4:click%=block%!8:handle%=block%!12:iconn%=block%!16
�Ȏhandle%�
�� -2
�1�click%=2 ��showmenu(menu1%,x%,y%,�,entries%)
�
�chandle%
�v� click%=2 � active%=0 � iconn%=39�iconn%=logicon%:�deleteicon(handle%,iconn%):�redrawicon(handle%,iconn%):logo%=0
��click%=4 �
�T�active%=0 � timer%=1 � iconn%=31�timer%=0:�seticon(chandle%,31,"O F F",0):�d~A
�L�active%=0 � timer%=0 � iconn%=31�timer%=1:�seticon(chandle%,31,"O N",0)
��active%=0 � iconn%=29 �
1difficulty%+=1:� difficulty%=7 �difficulty%=1
(�seticon(chandle%,29,�difficulty%,0)
�
&�active%=0 � iconn%=30 �
08table%+=1:� table%=13 �$tab%="A L L" � $tab%=�table%
:(� table%=14� table%=1: $tab%=�table%
D!�seticon(chandle%,30,$tab%,0)
N�
X�iconn%=13 � logo%=1��start
b�iconn%=28 � active%=0�
lU�seticon(chandle%,25,"typ1",0):ș"Wimp_SetCaretPosition",chandle%,24,,,-1,�$name%
vq� logo%=0�logicon%=�icon(chandle%,672,-556,314,244,&19A,"",sp%,-1,&FF):�redrawicon(chandle%,logicon%):logo%=1
��
�� active%=0�
�3�iconn%=36�ȗ � 450,350:�openwindow(reshandle%)
�D�iconn%=37�ȗ � 450,350:ș"Wimp_CreateMenu",,rollhandle%,350,700
��iconn%=35��letprint
��
��
��savehandle%
��iconn%=1 �(click%�&50)>0 �
��dragbox(handle%)
�4��iconn%=2 �(click%�5)>0 ��quicksave($savename%)
��
�� reshandle%
�3� click%=4 � iconn%=0� �closewindow(reshandle%)
��
�
:
��start
 *FX12,0
**FX11,0
4ȗ �:ȗ ȓ 0,0,0,0
>�$name%=""��7:�tbC
H�active%<>0��7:�tbC
R&�seticon(chandle%,16,"",&1B00013D)
\%�seticon(chandle%,23,"",&800F159)
f0ș"Wimp_SetCaretPosition",chandle%,23,,,-1,0
p0T+=1:$tab%=�table%:�table%=13� $tab%="A L L"
z]name$(T)=$name%:table%(T)=table%:level%(T)=difficulty%:�timer%=1�O$(T)="ON" � O$(T)="OFF"
�:�seticon(chandle%,25,"now",0):�begin:�question:�screen
�&�timer%=1� active%=1:seconds%=3000
�(�timer%=0�active%=2:number%=1:�draw1
��
�J************************WINDOW PROCS**********************************
�ݤload_template(name$)
��h%
�Hș"Wimp_LoadTemplate",,block%,iblock%,iend%,font%,name$,0 �,,iblock%
��name$="COUNTDOWN"�
޷block%!12=1024:block%!(88+20+32*24)=name%:block%!(88+20+32*18)=yscore%:block%!(88+20+32*19)=cscore%:block%!(88+20+32*20)=acc%:block%!(88+20+32*23)=ico32%:block%!(88+20+32*12)=sec%
��
��name$="LEVBOX"�
�6block%!(88+20+32*2)=diff%:block%!(88+20+32*3)=tab%
�
�name$="SAVEBOX"�
block%!(88+20)=savename%
$�
.�name$="logo"�
8�
B$ș"Wimp_CreateWindow",,block%�h%
L=h%
V�
`:
j��changewindowsize(handle%)
t!block%=handle%
~si%=-((CO(T)+YO(T)+8)*32)
�block%!0=0
�block%!4=si%
�block%!8=490
�block%!12=0
�%ș"Wimp_SetExtent",handle%,block%
��
�:
�
��redraw:
�'ș"Wimp_RedrawWindow",,block%�more%
�ȕmore%
�2x0%=block%!4-block%!20:y0%=block%!16-block%!24
�8yscroll%=block%!24:maxy%=block%!16:graphy%=block%!40
Ȏ!block%�

�rollhandle%:�redraw_1
�reshandle%:�redraw_2

�chandle%
(�logohandle%:
2�
<'ș"Wimp_GetRectangle",,block%�more%
F�
P�
Z:
d��redraw_1
ny0%-=32:� x0%+16,y0%
x�N=1�12
�y0%-=32:� x0%+16,y0%
�%��N;".  ":�x0%+64,y0%:�roll$(N,1)
��x0%+336,y0%:�roll$(N,2)
��x0%+408,y0%:�roll$(N,3)
��
�y0%-=32:� x0%+16,y0%
��
�:
���redraw_2
�y0%-=16:� x0%+48,y0%
�ș"Wimp_SetColour",7,14
�G�"Name: ";:ș"Wimp_SetColour",15,14:� name$(T):y0%-=32:� x0%+48,y0%
�ș"Wimp_SetColour",7,14
D�"Table: ";:ș"Wimp_SetColour",15,14:�$tab%:y0%-=32:� x0%+48,y0%
ș"Wimp_SetColour",7,14
K�"Level: ";:ș"Wimp_SetColour",15,14:��difficulty%:y0%-=64:� x0%+48,y0%
6ș"Wimp_SetColour",10,14
@�"CORRECT ANSWERS:":y0%-=32
Jș"Wimp_SetColour",7,14
T�N=1 �YO(T)
^�x0%+48,y0%
h0�N<10��" "+�N+". "+R$(T,N) ���N+". "+R$(T,N)
ry0%-=32
|�
}�CO(T)=0��djF
�y0%-=32
��x0%+48,y0%
�ș"Wimp_SetColour",11,14
��"WRONG ANSWERS:":y0%-=32
�ș"Wimp_SetColour",7,14
��:�N=1 �CO(T)
��x0%+48,y0%
�0�N<10��" "+�N+". "+W$(T,N) ���N+". "+W$(T,N)
�y0%-=32
��
��
�:
���draw1
4�number%>9�number$=�number%�number$=" "+�number%
 �number%>10�active%=0:�ALL:�
#�seticon(chandle%,12,number$,0)
&�
0:
:��windowstate(handle%)
Dblock%!0=handle%
N#ș"Wimp_GetWindowState",,block%
X�
b:
l��openwindow(handle%)
vblock%!0=handle%
�#ș"Wimp_GetWindowState",,block%
�ș"Wimp_OpenWindow",,block%
��
���dirwindow(open%,d$)
�B�open%=1 �command$="Filer_OpenDir "�command$="Filer_CloseDir "
�path$=command$+dir$+"."+d$
�
�path$
��
�J************************MENU ROUTINES*********************************
���menuselect
�Jchoice%=!block%:choice2%=block%!4:choice3%=block%!8:choice4%=block%!12
�Ȏhandle%�
�� -2
'�choice%=0 �ș"Wimp_CreateMenu",,-1
(�choice%=1 �:ș"Wimp_CreateMenu",,-1
�choice%=3�quit%=�:�quit
 �
*:
4��menus
>=�drawmenu(menu1%,"COUNTDOWN,Info,Help,Save as Edit,Quit")
HMmenu1%!32=ifhandle%:menu1%!(32+48)=savehandle%:menu1%!(32+24)=helphandle%
R�
\:
f"��shade(mblock%,item%,action%)
pbyte%=mblock%+38+24*item%
zȎaction%�
��-1:?byte%=?byte%�64
��0:?byte%=?byte%�&6F
��1:?byte%=?byte%�64
��
��
���drawmenu(menu%,menu$)
�maxitem$=""
�menu%?12=7:menu%?13=12
�menu%?14=7:menu%?15=0
�menu%!20=44
�menu%!24=0:ptr%=menu%+28
� $menu%=�menu$,�menu$,",")-1)
�menu$+=","
	entries%=0:items%=0
	ȕmenu$<>""
	menu$=�menu$,�menu$,",")+1)
	$�menu$<>""�
	.ptr%!0=0:ptr%!4=-1
	8ptr%!8=&7000021
	B$$(ptr%+12)=�menu$,�menu$,",")-1)
	L.�$(ptr%+12)>�maxitem$�maxitem$=$(ptr%+12)
	Vptr%+=24:items%+=20
	`entries%+=1
	j�
	t>�maxitem$>180 �menu%!16=(�maxitem$+1)*16+32 �menu%!16=200
	~�
	�ptr%!-24=ptr%!-24 �&80
	��
	�/��showmenu(menu%,x%,y%,oniconbar%,entries%)
	�1�oniconbar%�ypos%=96+entries%+44 �ypos%=y%+20
	�*ș"Wimp_CreateMenu",,menu%,x%-64,ypos%
	��
	���errorm(message$,r%)
	�$(block%+4)=message$
	�j�r%=1 �ș"Wimp_ReportError",block%,3,"Countdown" �,response%�ș"Wimp_ReportError",block%,1,"Test Task"
	��
	�N*******************************ICONPROCS**********************************
	�(��seticon(handle%,icon%,text$,flag%)
�deleteicon(handle%,icon%)

block%!4=handle%
�flag%<>0 �block%!24=flag%
� text$=""��DPJ
(Ȏ icon% �
2'� 21,22,25,32,33:$(block%+28)=text$
<5� 12,23,29,30,31:$sname1%=text$:block%!28=sname1%
F�
P(ș"Wimp_CreateIcon",,block%+4 �icon%
Z�redrawicon(handle%,icon%)
d�
n:
x��deleteicon(handle%,icon%)
�"!block%=handle%:block%!4=icon%
�!ș"Wimp_GetIconState",,block%
�ș"Wimp_DeleteIcon",,block%
��
�:
���redrawicon(handle%,icon%)
�"!block%=handle%:block%!4=icon%
�block%!8=0:block%!12=0
�!ș"Wimp_SetIconState",,block%
��
�:
���iconstate(handle%,icon%)
�block%!0=handle%
block%!4=icon%
!ș"Wimp_GetIconState",,block%
�
"N*************************LOAD AND SAVE ROUTINES***************************
,��savehonour
6X=�(dir$+".ROLL")
@
M=0:�#X=M
J�N=1�12
T�#X,roll$(N,1):M+=20:�#X=M
^�#X,roll$(N,2):M+=5:�#X=M
h�#X,roll$(N,3):M+=20:�#X=M
r�
|�#X
�type%=&803
�1path$="SETTYPE "+dir$+".ROLL "+�~type%:�path$
��
���namefile
�&file$="SETTYPE "+name$+" "+�~type%
�
�file$
��
���loadhonour
�X=�(dir$+".ROLL")
��X=0��savehonour:�
�
M=0:�#X=M
��N=1�12
��#X,roll$(N,1):M+=20:�#X=M
�#X,roll$(N,2):M+=5:�#X=M
�#X,roll$(N,3):M+=20:�#X=M
�
&�#X
0�
:N************************UTILITY PROCS*************************************
D
��dirname
N�buffer 256
X9ș"OS_ReadVarVal","Obey$Dir",buffer,256,0,3 �,,length
bbuffer?length=13
ldir$=$buffer
v�
�
��quit
��3
�:�errorm("Are you sure you really want to quit now?",1)
��response%<>1�quit%=�:�
��savehonour
�ȗ �
�ș"Wimp_CloseDown"
�*FX11,60
��
���error
�
!block%=�
�4$(block%+4)=�$+" internal error code "+Þ+")"+�0
�-ș"Wimp_ReportError",block%,1,"COUNTDOWN"

quit%=�:�quit

�

I*************************COUNTDOWN PROG******************************

 
��time

*'ș"OS_ReadMonotonicTime" � newtime%

4"ȕ (newtime%-earliest_time%>0)

>earliest_time%+=increment%

H�

R�active%=1�timer%=1�

\seconds%-=increment%

f�seconds%<100��ALL:�

p&�seticon(chandle%,11,"",&1B00613D)

z$sec%=�(seconds%/100)

��redrawicon(chandle%,12)

��1,-15,160,1

��

��

�:

�3��choose:CH$(YO(T)+CO(T))=�(Q)+�(AA)+�(answer%)

�(� answer%<>�$ico32%��wrong ��correct

� CO$=�2-��CO(T)," ")+�(CO(T))

� YO$=�2-��YO(T)," ")+�(YO(T))

�A$acc%=�3-��(YO(T)-CO(T))," ")+è(YO(T)/(YO(T)+CO(T))*100)+"%"

��redrawicon(chandle%,20)

�)$yscore%=YO$:�redrawicon(chandle%,18)

�)$cscore%=CO$:�redrawicon(chandle%,19)
+SIGN$=" ":�seticon(chandle%,32,SIGN$,0)
�
:
$
��rand
.&�table%(T)<13�A=table%(T) �A=�(12)
8B=�(12):C=A*B
B�
L:
V��question
`�=0
j	�rand
t�difficulty%=6�
~�table%<>13 �B>7��tfN
��table%=13 �A<7 ��DjN
��B<8 ��DjN
��B=11� �DjN
��
��difficulty%=5�
��table%<>13 �B>5��dXN
��table%=13 �A<6 ��DjN
��B<6 ��DjN
��
��difficulty%=4�
��table%<>13 �B>3��TJO
��table%=13 �A<5��DjN
�B>7 �B<4 ��DjN

�
�difficulty%=3�
�table%<>13 �B>6��T|O
(�table%=13 �A<4 ��DjN
2�B>6� �DjN
<�
F�difficulty%=2�
P�table%<>13 �B>4��DnO
Z�table%=13 �A>6��DjN
d�B>5 ��DjN
n�
x�difficulty%=1�
��table%<>13 �B>2��t`O
��table%=13 �A>5��DjN
��B>4 ��DjN
��
�d%=�(3)
��level%(T)<4 �d%=3� �tjO
�0�d%=1 �Q=A:AA=B:answer%=C:S$=" x ":SIGN$="x"
�/�d%=2�Q=B:AA=A:answer%=C:S$=" x ":SIGN$="x"
�8�d%=3� S$=" "+�247+" ":Q=C:answer%=B:AA=A:SIGN$=�247
�X$=�3-��Q," ")+�Q:
�Y$=�2-��AA," ")+�AA:
�!Z$=�3-��answer%," ")+�answer%
�0V$=�Q+�AA+�answer%:�CHECK:� CH=1 �CH=0:�DjN
E$=" = ":�
:
:
"��wrong:CO(T)=CO(T)+1
,"�seticon(chandle%,25,"wron",0)
6TIM%=�:���=TIM%+100
@'�d%=1�W$(T,CO(T))="..?"+S$+Y$+E$+Z$
J&�d%=2�W$(T,CO(T))=X$+S$+".?"+E$+Z$
T'�d%=3�W$(T,CO(T))=X$+S$+Y$+E$+"..?"
^$ico32%=�answer%
h%�seticon(chandle%,2,"",&CB00613D)
r�redrawicon(chandle%,23)
|!�seticon(chandle%,25,"rig",0)
�TIM%=�:���=TIM%+150
�$ico32%=""
��redrawicon(chandle%,23)
�!�seticon(chandle%,25,"now",0)
��
�:
�6��correct:YO(T)=YO(T)+1:R$(T,YO(T))=X$+S$+Y$+E$+Z$
�%�seticon(chandle%,2,"",&CB00613D)
�!�seticon(chandle%,25,"rig",0)
�TIM%=�:���=TIM%+150
�!�seticon(chandle%,25,"now",0)
�$ico32%=""
��
:
��CHECK:� CO(T)+YO(T)<1 ��
	N=1:�
&�V$=CH$(N) �CH=1
0N+=1:�N>(CO(T)+YO(T)) �CH=1
:�
D:
N	��ALL
X1�1,-15,240,20:active%=0:$name%="N O  N A M E"
b&�seticon(chandle%,24,"",&17006111)
l!�seticon(chandle%,25,"new",0)
v6ș"Wimp_SetCaretPosition",chandle%,24,,,-1,�$name%
�%�seticon(chandle%,0,"",&1B00613D)
�%�seticon(chandle%,1,"",&1B00613D)
�%�seticon(chandle%,2,"",&1B00613D)
��seticon(chandle%,32," ",0)
��seticon(chandle%,33," ",0)
�;�seticon(chandle%,21," ",0):�seticon(chandle%,22," ",0)
�%$sec%="":�redrawicon(chandle%,12)
�0$ico32%="":�seticon(chandle%,23,"",&8006159)
�#�difficulty%=6 �timer%=1� �roll
�!�changewindowsize(reshandle%)
�ȗ �
�ȗ�900,150
��
:
4��begin:ș"Wimp_CreateMenu",,-1:$name%="No Name"

SIGN$=" "
 '$acc%=" 0":�redrawicon(chandle%,20)
**$yscore%=" 0":�redrawicon(chandle%,18)
4*$cscore%=" 0":�redrawicon(chandle%,19)
>%�seticon(chandle%,0,"",&CB00613D)
H%�seticon(chandle%,1,"",&CB00613D)
R%�seticon(chandle%,2,"",&CB00613D)
\!�seticon(chandle%,32,SIGN$,0)
f�seticon(chandle%,33,"=",0)
p�
z:
�
��screen:
�9�seticon(chandle%,21,X$,0):�seticon(chandle%,22,Y$,0)
�!�seticon(chandle%,32,SIGN$,0)
��seticon(chandle%,33,"=",0)
��
�:
�
��key1
��key%<>13 ��D~S
�%ș"Wimp_GetCaretPosition",,block%
� ico%=block%!4:� ico%=-1��t\S
�
�ico%=24�
�!ș"Wimp_SetCaretPosition",,-1
��$name%=""��7:�
(�seticon(chandle%,ico%,"",&17006111)
$�seticon(chandle%,25,"cstart",0)
�
$
�ico%=23�
.�$ico32%=""��7:�DtS
8�choose
B�timer%=0�number%+=1
L�active%=2��draw1
V0ș"Wimp_SetCaretPosition",chandle%,23,,,-1,0
`%�seticon(chandle%,2,"",&1000613D)
j�question:�screen
t�
~
�key%=17�
�quit%=�
��
��
�:
�
��pointer
�#ș"Wimp_GetPointerInfo",,block%
�/�block%!12=chandle%�ș"Wimp_CreateMenu",,-1
��
�:
�
��roll
��N=1�12
��roll$(N,2)<YO(T)-CO(T)�
�M=12�N+1�-1

Kroll$(M,1)=roll$(M-1,1):roll$(M,2)=roll$(M-1,2):roll$(M,3)=roll$(M-1,3)
�
Groll$(N,1)=name$(T):roll$(N,2)=�(YO(T)-CO(T)):roll$(N,3)=date$:N=12
(�
2�
<�
F:
P<ݤicon(whandle%,ix%,iy%,iw%,ih%,flag%,text$,d1%,d2%,d3%)
Zblock%!0=whandle%
dblock%!4=ix%:block%!8=iy%
nblock%!12=ix%+iw%
xblock%!16=iy%+ih%
�block%!20=flag%
�
� d1%=0 �
�$(block%+24)=text$
��
�block%!24=d1%:block%!28=d2%
�block%!32=d3%
��
�*ș"Wimp_CreateIcon",,block% � ihandle%
�
=ihandle%
�E***********************PRINT ROUTINES****************************
���define
��2:�1,27,1,58,1,0,1,0,1,0:�1,27,1,38,1,0,1,246,1,246,1,139:�1,16,1,16,1,16,1,214,1,214,1,16,1,16,1,16,1,0,1,0,1,0:�1,27,1,37,1,1,1,0:�
�:��letprint:�2:�define:�1,27,77:�1,27,1,87,1,1:�1,27,69
?�3);:�1,27,1,45,1,1:�"Name:";:�1,27,1,45,1,0:�" ";name$(T)
9�1,10:�3);:�1,27,1,45,1,1:�"TABLE: ";:�1,27,1,45,1,0
P�" ";table%(T);�23);:�1,27,1,45,1,1:�"LEVEL:";:�1,27,1,45,1,0:�" ";level%(T)
"printtime$=��$,5,11)
,��1,10:�3);:�1,27,1,45,1,1:�"TIMER:";:�1,27,1,45,1,0:�" ";O$(T);�23);::�1,27,1,45,1,1:�"DATE:";:�1,27,1,45,1,0:�" ";printtime$
6h�1,10:�3);:�1,27,1,45,1,1:�1,10:�"CORRECT ANSWERS:":�1,27,1,45,1,0:�1,10:� N=1 �YO(T):�YO(T)=0��DJU
@L$=R$(T,N):�N;" ";:�L:�1,10
J�
Tv�CO(T)=0��:� �2);:�1,27,1,45,1,1:�"A L L  C O R R E C T ! ....E X C E L L E N T !":�1,27,1,45,1,0:�1,10:�1,12:�3:�
^`�3);:�1,27,1,45,1,1:�1,10:�"WRONG ANSWERS:":�1,27,1,45,1,0:�1,10:� N=1 �CO(T):�CO(T)=0��DrU
hL$=W$(T,N):�N;" ";:�L:�1,10
r�
|k�5);:�1,27,1,45,1,1:�"Now work out the correct answers!"::�1,27,1,45,1,0:�1,10:�1,27,64:�1,12:�3:�26:�
�4��L:�NN=1��L$:LL$=�L$,NN,1):� LL$=�247 �LL$=�246
�
�LL$;:�:�
�J��closewindow(handle%):block%!0=handle%:ș"Wimp_CloseWindow",,block%:�
���dragbox(handle%)
�!block%=handle%
�#ș"Wimp_GetWindowState",,block%
�ox%=block%!4-block%!20
�oy%=block%!16-block%!24
�block%!4=iconn%
�!ș"Wimp_GetIconState",,block%
�!block%=handle%
�block%!4=5
�block%!8=ox%+block%!8
block%!12=oy%+block%!12
block%!16=ox%+block%!16
block%!20=oy%+block%!20
&block%!24=0:block%!28=0
0block%!32=&7FFFFFFF
:block%!36=&7FFFFFFF
Dș"Wimp_DragBox",,block%
N�
X��quicksave(name$)
b�name$,".")�
l9�handle%=savehandle%�type%=filetype%:�savefile(name$)
v�
�@�errorm("   To save, drag the icon to a directory viewer",0)
��dirwindow(1,"FILES")
��
��
�:
�"��initiatesave(handle%,iconn%)
��iconstate(handle%,iconn%)
�;�$savename%=""��errorm("     Type in a file name!",0):�
�#ș"Wimp_GetPointerInfo",,block%
��block%!20=block%!12:block%!24=block%!16:block%!28=block%!0:block%!32=block%!4:block%!36=255:block%!0=64:block%!12=0:block%!16=1:block%!40=filetype%:file$=$savename%:$(block%+44)=�getleaf($savename%)
�6ș"Wimp_SendMessage",17,block%,block%!20,block%!24
��
�ݤgetleaf(name$)
ȕ�name$,".")
name$=�name$,�name$,".")+1)
�
 
=name$+�0
*��datasave
4'fullname$="":a%=0:b%=block%?(44+a%)
>=ȕb%<>0:fullname$=fullname$+�b%:a%+=1:b%=block%?(44+a%):�
H<messvar1%=block%:messvar2%=block%!20:messvar3%=block%!24
R�
\��save1(name$)
f�savefile(name$)
p#�block%!36>-1� $savename%=name$
zblock%!12=block%!8
�block%!16=3
�!block%=256
�9ș"Wimp_SendMessage",18,messvar1%,messvar2%,messvar3%
�ș"Wimp_CreateMenu",,-1
��
�
��receive
�Ȏblock%!16 �
��0: quit%=�
�"�2:�datasave:�save1(fullname$)
��
��
�
��loadack
�block%!12=block%!8
block%!16=4
+ș"Wimp_SendMessage",17,block%,block%!4
�
$��savefile(name$)
.#pointer%=0:printtime$=��$,5,11)
88store$="LIST OF PUPILS"+�25," ")+"DATE: "+printtime$
B?�L=1��store$:edittext%?pointer%=��store$,L,1):pointer%+=1:�
L%edittext%?pointer%=10:pointer%+=1
V`store$=�5," ")+"NAME"+�13," ")+"TABLE"+�10," ")+"LEVEL"+�9," ")+"Correct[%]"+�6," ")+"TIMER"
`?�L=1��store$:edittext%?pointer%=��store$,L,1):pointer%+=1:�
j%edittext%?pointer%=10:pointer%+=1
t�N=1�T:
~:store$=�2-��N," ")+�N+". "+name$(N)+�20-�name$(N)," ")
�)�table%(N)=13 �T$="ALL"�T$=�table%(N)
�;store$+=T$+�15-�T$," ")+�level%(N)+�14-��level%(N)," ")
�$� YO(N)=0 � CO(N)=0�per%=0:�tpX
�#per%=�(YO(N)/(YO(N)+CO(N))*100)
�Tstore$+=�per%+"%"+�3-��(per%)," ")+�12-�O$(N)," ")+O$(N)+�10+"Items Incorrect: "
�*�M=1�CO(N):store$=store$+W$(N,M)+" ":�
�?�L=1��store$:edittext%?pointer%=��store$,L,1):pointer%+=1:�
�%edittext%?pointer%=10:pointer%+=1
��
�'�savetext(name$,edittext%,pointer%)
��
�$��savetext(name$,start%,length%)
4ș"OS_File",10,name$,&FFF,,start%,start%+length%

�
:
��setup
(4�block%&9900,iblock%&9900,menu1%&100,menu2% &100
2 iend%=iblock%+&1000:�dirname
<7�sbval%10: $sbval%="A~ ":�message%&FF:$message%="":
Fn�yscore%&20,cscore%&20,acc%&20,diff%&20, tab%&20:$yscore%="":$cscore%="":$acc%="":$diff%="6":$tab%="A L L"
P P%=0:paper%=25:T=0:CH=0:w%=0
Zi�CH$(35):� R$(35,25):� W$(35,25):�name$(35):�level%(35):�YO(35):�CO(35):�O%(35):� O$(35):� table%(35)
dudifficulty%=6:table%=13:timer%=1:increment%=100:active%=0:� roll$(13,3):logo%=1:pointer%=0:filetype%=&FFF:quit%=0
n3pupil%=0:group%=1:response%=1:SIGN$="":arrow%=1
x/X$="":Y$="":date$=��$,5,��$-13):�loadhonour
�sprite$=dir$+".Sprites"
�@�edittext%&4000:toggle%=0:� font% 256:�f%=0�255:font%?f%=0:�
�D�name%&20:$name%="No Name":�savename%&FF: $savename%="GroupFile"
�H�sname1%&20:$sname1%="":� ico32% &10:$ico32%="":� sec% &10: $sec%=""
��sp% &FF: $sp%="log1"
�!�23,240,0,24,24,0,255,0,24,24
��
�
��process
�handle%=!block%
�key%=block%!24
�� key%=13� �key1
�� key%=17� �key1
�:� key%<32 � key%>122 � ș"Wimp_ProcessKey",block%!24:�
�
:
�
00000000  0d 00 0a 0a f2 73 65 74  75 70 0d 00 14 0c ee 85  |.....setup......|
00000010  f2 65 72 72 6f 72 0d 00  1e 0b 71 75 69 74 25 3d  |.error....quit%=|
00000020  a3 0d 00 28 12 24 62 6c  6f 63 6b 25 3d 22 54 41  |...(.$block%="TA|
00000030  53 4b 22 0d 00 32 3e c8  99 22 57 69 6d 70 5f 49  |SK"..2>.."Wimp_I|
00000040  6e 69 74 69 61 6c 69 73  65 22 2c 32 30 30 2c 21  |nitialise",200,!|
00000050  62 6c 6f 63 6b 25 2c 22  43 6f 75 6e 74 64 6f 77  |block%,"Countdow|
00000060  6e 22 b8 76 65 72 73 69  6f 6e 25 2c 74 61 73 6b  |n".version%,task|
00000070  25 0d 00 3c 2c c8 99 22  57 69 6d 70 5f 4f 70 65  |%..<,.."Wimp_Ope|
00000080  6e 54 65 6d 70 6c 61 74  65 22 2c 2c 64 69 72 24  |nTemplate",,dir$|
00000090  2b 22 2e 54 65 6d 70 6c  61 74 65 73 22 0d 00 46  |+".Templates"..F|
000000a0  28 69 66 68 61 6e 64 6c  65 25 3d a4 6c 6f 61 64  |(ifhandle%=.load|
000000b0  5f 74 65 6d 70 6c 61 74  65 28 22 50 52 4f 47 49  |_template("PROGI|
000000c0  4e 46 4f 22 29 0d 00 50  26 6c 6f 67 6f 68 61 6e  |NFO")..P&logohan|
000000d0  64 6c 65 25 3d a4 6c 6f  61 64 5f 74 65 6d 70 6c  |dle%=.load_templ|
000000e0  61 74 65 28 22 6c 6f 67  6f 22 29 0d 00 5a 2a 68  |ate("logo")..Z*h|
000000f0  65 6c 70 68 61 6e 64 6c  65 25 3d a4 6c 6f 61 64  |elphandle%=.load|
00000100  5f 74 65 6d 70 6c 61 74  65 28 22 48 45 4c 50 50  |_template("HELPP|
00000110  41 47 45 22 29 0d 00 64  28 72 6f 6c 6c 68 61 6e  |AGE")..d(rollhan|
00000120  64 6c 65 25 3d a4 6c 6f  61 64 5f 74 65 6d 70 6c  |dle%=.load_templ|
00000130  61 74 65 28 22 48 4f 4e  4f 55 52 22 29 0d 00 6e  |ate("HONOUR")..n|
00000140  29 72 65 73 68 61 6e 64  6c 65 25 3d a4 6c 6f 61  |)reshandle%=.loa|
00000150  64 5f 74 65 6d 70 6c 61  74 65 28 22 52 45 53 55  |d_template("RESU|
00000160  4c 54 53 22 29 3a 0d 00  78 29 73 61 76 65 68 61  |LTS"):..x)saveha|
00000170  6e 64 6c 65 25 3d a4 6c  6f 61 64 5f 74 65 6d 70  |ndle%=.load_temp|
00000180  6c 61 74 65 28 22 53 41  56 45 42 4f 58 22 29 0d  |late("SAVEBOX").|
00000190  00 82 36 63 68 61 6e 64  6c 65 25 3d a4 6c 6f 61  |..6chandle%=.loa|
000001a0  64 5f 74 65 6d 70 6c 61  74 65 28 22 43 4f 55 4e  |d_template("COUN|
000001b0  54 44 4f 57 4e 22 29 3a  3a 62 6c 6f 63 6b 25 21  |TDOWN")::block%!|
000001c0  32 34 3d 2d 31 0d 00 8c  1a c8 99 22 57 69 6d 70  |24=-1......"Wimp|
000001d0  5f 43 6c 6f 73 65 54 65  6d 70 6c 61 74 65 22 0d  |_CloseTemplate".|
000001e0  00 96 3a 69 62 68 61 6e  64 6c 65 25 3d a4 69 63  |..:ibhandle%=.ic|
000001f0  6f 6e 28 2d 32 2c 30 2c  30 2c 36 38 2c 36 38 2c  |on(-2,0,0,68,68,|
00000200  26 33 30 30 32 2c 22 21  43 4f 55 4e 54 44 4f 57  |&3002,"!COUNTDOW|
00000210  4e 22 2c 30 2c 30 2c 30  29 0d 00 a0 40 6c 6f 67  |N",0,0,0)...@log|
00000220  69 63 6f 6e 25 3d a4 69  63 6f 6e 28 63 68 61 6e  |icon%=.icon(chan|
00000230  64 6c 65 25 2c 36 37 32  2c 2d 35 35 36 2c 33 31  |dle%,672,-556,31|
00000240  34 2c 32 34 34 2c 26 31  39 41 2c 22 22 2c 73 70  |4,244,&19A,"",sp|
00000250  25 2c 2d 31 2c 26 46 46  29 0d 00 aa 0a f2 6d 65  |%,-1,&FF).....me|
00000260  6e 75 73 0d 00 b4 19 f2  6f 70 65 6e 77 69 6e 64  |nus.....openwind|
00000270  6f 77 28 63 68 61 6e 64  6c 65 25 29 0d 00 be 05  |ow(chandle%)....|
00000280  f5 0d 00 c8 2b c8 99 22  4f 53 5f 52 65 61 64 4d  |....+.."OS_ReadM|
00000290  6f 6e 6f 74 6f 6e 69 63  54 69 6d 65 22 b8 65 61  |onotonicTime".ea|
000002a0  72 6c 69 65 73 74 5f 74  69 6d 65 25 0d 00 d2 1e  |rliest_time%....|
000002b0  65 61 72 6c 69 65 73 74  5f 74 69 6d 65 25 2b 3d  |earliest_time%+=|
000002c0  69 6e 63 72 65 6d 65 6e  74 25 0d 00 dc 09 f2 70  |increment%.....p|
000002d0  6f 6c 6c 0d 00 e6 0a fd  71 75 69 74 25 0d 00 f0  |oll.....quit%...|
000002e0  18 f2 71 75 69 74 3a e7  20 71 75 69 74 25 3d a3  |..quit:. quit%=.|
000002f0  8c 8d 74 7e 40 0d 00 fa  05 e0 0d 01 04 0a dd f2  |..t~@...........|
00000300  70 6f 6c 6c 0d 01 0e 35  c8 99 22 57 69 6d 70 5f  |poll...5.."Wimp_|
00000310  50 6f 6c 6c 49 64 6c 65  22 2c 30 2c 62 6c 6f 63  |PollIdle",0,bloc|
00000320  6b 25 2c 65 61 72 6c 69  65 73 74 5f 74 69 6d 65  |k%,earliest_time|
00000330  25 b8 72 65 61 73 6f 6e  25 0d 01 18 0e c8 8e 72  |%.reason%......r|
00000340  65 61 73 6f 6e 25 ca 0d  01 22 0c c9 30 3a f2 74  |eason%..."..0:.t|
00000350  69 6d 65 0d 01 2c 0e c9  31 3a f2 72 65 64 72 61  |ime..,..1:.redra|
00000360  77 0d 01 36 22 c9 32 3a  c8 99 22 57 69 6d 70 5f  |w..6".2:.."Wimp_|
00000370  4f 70 65 6e 57 69 6e 64  6f 77 22 2c 2c 62 6c 6f  |OpenWindow",,blo|
00000380  63 6b 25 0d 01 40 23 c9  33 3a c8 99 22 57 69 6d  |ck%..@#.3:.."Wim|
00000390  70 5f 43 6c 6f 73 65 57  69 6e 64 6f 77 22 2c 2c  |p_CloseWindow",,|
000003a0  62 6c 6f 63 6b 25 0d 01  4a 0f c9 35 3a f2 70 6f  |block%..J..5:.po|
000003b0  69 6e 74 65 72 0d 01 54  0f c9 36 3a f2 62 75 74  |inter..T..6:.but|
000003c0  74 6f 6e 73 0d 01 5e 24  c9 37 3a f2 69 6e 69 74  |tons..^$.7:.init|
000003d0  69 61 74 65 73 61 76 65  28 68 61 6e 64 6c 65 25  |iatesave(handle%|
000003e0  2c 69 63 6f 6e 6e 25 29  0d 01 68 0f c9 38 3a f2  |,iconn%)..h..8:.|
000003f0  70 72 6f 63 65 73 73 0d  01 72 12 c9 39 3a f2 6d  |process..r..9:.m|
00000400  65 6e 75 73 65 6c 65 63  74 0d 01 7c 14 c9 31 37  |enuselect..|..17|
00000410  2c 31 38 20 3a f2 72 65  63 65 69 76 65 0d 01 86  |,18 :.receive...|
00000420  4a c9 31 39 3a c8 99 22  4f 53 5f 46 69 6c 65 22  |J.19:.."OS_File"|
00000430  2c 36 2c 62 6c 6f 63 6b  25 2b 34 34 3a 85 20 32  |,6,block%+44:. 2|
00000440  35 35 2c 22 44 61 74 61  20 54 72 61 6e 73 66 65  |55,"Data Transfe|
00000450  72 20 46 61 69 6c 65 64  3a 72 65 63 65 69 76 65  |r Failed:receive|
00000460  72 20 64 69 65 64 22 0d  01 90 07 cb 3a e1 0d 01  |r died".....:...|
00000470  9a 05 3a 0d 01 a4 57 dd  f2 62 75 74 74 6f 6e 73  |..:...W..buttons|
00000480  3a 78 25 3d 21 62 6c 6f  63 6b 25 3a 79 25 3d 62  |:x%=!block%:y%=b|
00000490  6c 6f 63 6b 25 21 34 3a  63 6c 69 63 6b 25 3d 62  |lock%!4:click%=b|
000004a0  6c 6f 63 6b 25 21 38 3a  68 61 6e 64 6c 65 25 3d  |lock%!8:handle%=|
000004b0  62 6c 6f 63 6b 25 21 31  32 3a 69 63 6f 6e 6e 25  |block%!12:iconn%|
000004c0  3d 62 6c 6f 63 6b 25 21  31 36 0d 01 ae 0e c8 8e  |=block%!16......|
000004d0  68 61 6e 64 6c 65 25 ca  0d 01 b8 08 c9 20 2d 32  |handle%...... -2|
000004e0  0d 01 c2 31 e7 63 6c 69  63 6b 25 3d 32 20 8c f2  |...1.click%=2 ..|
000004f0  73 68 6f 77 6d 65 6e 75  28 6d 65 6e 75 31 25 2c  |showmenu(menu1%,|
00000500  78 25 2c 79 25 2c a3 2c  65 6e 74 72 69 65 73 25  |x%,y%,.,entries%|
00000510  29 0d 01 cc 0d c9 63 68  61 6e 64 6c 65 25 0d 01  |).....chandle%..|
00000520  d6 76 e7 20 63 6c 69 63  6b 25 3d 32 20 80 20 61  |.v. click%=2 . a|
00000530  63 74 69 76 65 25 3d 30  20 80 20 69 63 6f 6e 6e  |ctive%=0 . iconn|
00000540  25 3d 33 39 8c 69 63 6f  6e 6e 25 3d 6c 6f 67 69  |%=39.iconn%=logi|
00000550  63 6f 6e 25 3a f2 64 65  6c 65 74 65 69 63 6f 6e  |con%:.deleteicon|
00000560  28 68 61 6e 64 6c 65 25  2c 69 63 6f 6e 6e 25 29  |(handle%,iconn%)|
00000570  3a f2 72 65 64 72 61 77  69 63 6f 6e 28 68 61 6e  |:.redrawicon(han|
00000580  64 6c 65 25 2c 69 63 6f  6e 6e 25 29 3a 6c 6f 67  |dle%,iconn%):log|
00000590  6f 25 3d 30 0d 01 e0 0f  e7 63 6c 69 63 6b 25 3d  |o%=0.....click%=|
000005a0  34 20 8c 0d 01 ea 54 e7  61 63 74 69 76 65 25 3d  |4 ....T.active%=|
000005b0  30 20 80 20 74 69 6d 65  72 25 3d 31 20 80 20 69  |0 . timer%=1 . i|
000005c0  63 6f 6e 6e 25 3d 33 31  8c 74 69 6d 65 72 25 3d  |conn%=31.timer%=|
000005d0  30 3a f2 73 65 74 69 63  6f 6e 28 63 68 61 6e 64  |0:.seticon(chand|
000005e0  6c 65 25 2c 33 31 2c 22  4f 20 46 20 46 22 2c 30  |le%,31,"O F F",0|
000005f0  29 3a e5 8d 64 7e 41 0d  01 f4 4c e7 61 63 74 69  |):..d~A...L.acti|
00000600  76 65 25 3d 30 20 80 20  74 69 6d 65 72 25 3d 30  |ve%=0 . timer%=0|
00000610  20 80 20 69 63 6f 6e 6e  25 3d 33 31 8c 74 69 6d  | . iconn%=31.tim|
00000620  65 72 25 3d 31 3a f2 73  65 74 69 63 6f 6e 28 63  |er%=1:.seticon(c|
00000630  68 61 6e 64 6c 65 25 2c  33 31 2c 22 4f 20 4e 22  |handle%,31,"O N"|
00000640  2c 30 29 0d 01 fe 1c e7  61 63 74 69 76 65 25 3d  |,0).....active%=|
00000650  30 20 80 20 69 63 6f 6e  6e 25 3d 32 39 20 8c 0d  |0 . iconn%=29 ..|
00000660  02 08 31 64 69 66 66 69  63 75 6c 74 79 25 2b 3d  |..1difficulty%+=|
00000670  31 3a e7 20 64 69 66 66  69 63 75 6c 74 79 25 3d  |1:. difficulty%=|
00000680  37 20 8c 64 69 66 66 69  63 75 6c 74 79 25 3d 31  |7 .difficulty%=1|
00000690  0d 02 12 28 f2 73 65 74  69 63 6f 6e 28 63 68 61  |...(.seticon(cha|
000006a0  6e 64 6c 65 25 2c 32 39  2c c3 64 69 66 66 69 63  |ndle%,29,.diffic|
000006b0  75 6c 74 79 25 2c 30 29  0d 02 1c 05 cd 0d 02 26  |ulty%,0).......&|
000006c0  1c e7 61 63 74 69 76 65  25 3d 30 20 80 20 69 63  |..active%=0 . ic|
000006d0  6f 6e 6e 25 3d 33 30 20  8c 0d 02 30 38 74 61 62  |onn%=30 ...08tab|
000006e0  6c 65 25 2b 3d 31 3a e7  20 74 61 62 6c 65 25 3d  |le%+=1:. table%=|
000006f0  31 33 20 8c 24 74 61 62  25 3d 22 41 20 4c 20 4c  |13 .$tab%="A L L|
00000700  22 20 8b 20 24 74 61 62  25 3d c3 74 61 62 6c 65  |" . $tab%=.table|
00000710  25 0d 02 3a 28 e7 20 74  61 62 6c 65 25 3d 31 34  |%..:(. table%=14|
00000720  8c 20 74 61 62 6c 65 25  3d 31 3a 20 24 74 61 62  |. table%=1: $tab|
00000730  25 3d c3 74 61 62 6c 65  25 0d 02 44 21 f2 73 65  |%=.table%..D!.se|
00000740  74 69 63 6f 6e 28 63 68  61 6e 64 6c 65 25 2c 33  |ticon(chandle%,3|
00000750  30 2c 24 74 61 62 25 2c  30 29 0d 02 4e 05 cd 0d  |0,$tab%,0)..N...|
00000760  02 58 1f e7 69 63 6f 6e  6e 25 3d 31 33 20 80 20  |.X..iconn%=13 . |
00000770  6c 6f 67 6f 25 3d 31 8c  f2 73 74 61 72 74 0d 02  |logo%=1..start..|
00000780  62 1b e7 69 63 6f 6e 6e  25 3d 32 38 20 80 20 61  |b..iconn%=28 . a|
00000790  63 74 69 76 65 25 3d 30  8c 0d 02 6c 55 f2 73 65  |ctive%=0...lU.se|
000007a0  74 69 63 6f 6e 28 63 68  61 6e 64 6c 65 25 2c 32  |ticon(chandle%,2|
000007b0  35 2c 22 74 79 70 31 22  2c 30 29 3a c8 99 22 57  |5,"typ1",0):.."W|
000007c0  69 6d 70 5f 53 65 74 43  61 72 65 74 50 6f 73 69  |imp_SetCaretPosi|
000007d0  74 69 6f 6e 22 2c 63 68  61 6e 64 6c 65 25 2c 32  |tion",chandle%,2|
000007e0  34 2c 2c 2c 2d 31 2c a9  24 6e 61 6d 65 25 0d 02  |4,,,-1,.$name%..|
000007f0  76 71 e7 20 6c 6f 67 6f  25 3d 30 8c 6c 6f 67 69  |vq. logo%=0.logi|
00000800  63 6f 6e 25 3d a4 69 63  6f 6e 28 63 68 61 6e 64  |con%=.icon(chand|
00000810  6c 65 25 2c 36 37 32 2c  2d 35 35 36 2c 33 31 34  |le%,672,-556,314|
00000820  2c 32 34 34 2c 26 31 39  41 2c 22 22 2c 73 70 25  |,244,&19A,"",sp%|
00000830  2c 2d 31 2c 26 46 46 29  3a f2 72 65 64 72 61 77  |,-1,&FF):.redraw|
00000840  69 63 6f 6e 28 63 68 61  6e 64 6c 65 25 2c 6c 6f  |icon(chandle%,lo|
00000850  67 69 63 6f 6e 25 29 3a  6c 6f 67 6f 25 3d 31 0d  |gicon%):logo%=1.|
00000860  02 80 05 cd 0d 02 8a 10  e7 20 61 63 74 69 76 65  |......... active|
00000870  25 3d 30 8c 0d 02 94 33  e7 69 63 6f 6e 6e 25 3d  |%=0....3.iconn%=|
00000880  33 36 8c c8 97 20 b8 20  34 35 30 2c 33 35 30 3a  |36... . 450,350:|
00000890  f2 6f 70 65 6e 77 69 6e  64 6f 77 28 72 65 73 68  |.openwindow(resh|
000008a0  61 6e 64 6c 65 25 29 0d  02 9e 44 e7 69 63 6f 6e  |andle%)...D.icon|
000008b0  6e 25 3d 33 37 8c c8 97  20 b8 20 34 35 30 2c 33  |n%=37... . 450,3|
000008c0  35 30 3a c8 99 22 57 69  6d 70 5f 43 72 65 61 74  |50:.."Wimp_Creat|
000008d0  65 4d 65 6e 75 22 2c 2c  72 6f 6c 6c 68 61 6e 64  |eMenu",,rollhand|
000008e0  6c 65 25 2c 33 35 30 2c  37 30 30 0d 02 a8 18 e7  |le%,350,700.....|
000008f0  69 63 6f 6e 6e 25 3d 33  35 8c f2 6c 65 74 70 72  |iconn%=35..letpr|
00000900  69 6e 74 0d 02 b2 05 cd  0d 02 bc 05 cd 0d 02 c6  |int.............|
00000910  10 c9 73 61 76 65 68 61  6e 64 6c 65 25 0d 02 d0  |..savehandle%...|
00000920  1f e7 69 63 6f 6e 6e 25  3d 31 20 80 28 63 6c 69  |..iconn%=1 .(cli|
00000930  63 6b 25 80 26 35 30 29  3e 30 20 8c 0d 02 da 15  |ck%.&50)>0 .....|
00000940  f2 64 72 61 67 62 6f 78  28 68 61 6e 64 6c 65 25  |.dragbox(handle%|
00000950  29 0d 02 e4 34 cc e7 69  63 6f 6e 6e 25 3d 32 20  |)...4..iconn%=2 |
00000960  80 28 63 6c 69 63 6b 25  80 35 29 3e 30 20 8c f2  |.(click%.5)>0 ..|
00000970  71 75 69 63 6b 73 61 76  65 28 24 73 61 76 65 6e  |quicksave($saven|
00000980  61 6d 65 25 29 0d 02 ee  05 cd 0d 02 ef 10 c9 20  |ame%).......... |
00000990  72 65 73 68 61 6e 64 6c  65 25 0d 02 f0 33 e7 20  |reshandle%...3. |
000009a0  63 6c 69 63 6b 25 3d 34  20 80 20 69 63 6f 6e 6e  |click%=4 . iconn|
000009b0  25 3d 30 8c 20 f2 63 6c  6f 73 65 77 69 6e 64 6f  |%=0. .closewindo|
000009c0  77 28 72 65 73 68 61 6e  64 6c 65 25 29 0d 02 f8  |w(reshandle%)...|
000009d0  05 cb 0d 03 02 05 e1 0d  03 0c 05 3a 0d 03 16 0b  |...........:....|
000009e0  dd f2 73 74 61 72 74 0d  03 20 0b 2a 46 58 31 32  |..start.. .*FX12|
000009f0  2c 30 0d 03 2a 0b 2a 46  58 31 31 2c 30 0d 03 34  |,0..*.*FX11,0..4|
00000a00  16 c8 97 20 87 3a c8 97  20 c8 93 20 30 2c 30 2c  |... .:.. .. 0,0,|
00000a10  30 2c 30 0d 03 3e 17 e7  24 6e 61 6d 65 25 3d 22  |0,0..>..$name%="|
00000a20  22 8c ef 37 3a e5 8d 74  62 43 0d 03 48 18 e7 61  |"..7:..tbC..H..a|
00000a30  63 74 69 76 65 25 3c 3e  30 8c ef 37 3a e5 8d 74  |ctive%<>0..7:..t|
00000a40  62 43 0d 03 52 26 f2 73  65 74 69 63 6f 6e 28 63  |bC..R&.seticon(c|
00000a50  68 61 6e 64 6c 65 25 2c  31 36 2c 22 22 2c 26 31  |handle%,16,"",&1|
00000a60  42 30 30 30 31 33 44 29  0d 03 5c 25 f2 73 65 74  |B00013D)..\%.set|
00000a70  69 63 6f 6e 28 63 68 61  6e 64 6c 65 25 2c 32 33  |icon(chandle%,23|
00000a80  2c 22 22 2c 26 38 30 30  46 31 35 39 29 0d 03 66  |,"",&800F159)..f|
00000a90  30 c8 99 22 57 69 6d 70  5f 53 65 74 43 61 72 65  |0.."Wimp_SetCare|
00000aa0  74 50 6f 73 69 74 69 6f  6e 22 2c 63 68 61 6e 64  |tPosition",chand|
00000ab0  6c 65 25 2c 32 33 2c 2c  2c 2d 31 2c 30 0d 03 70  |le%,23,,,-1,0..p|
00000ac0  30 54 2b 3d 31 3a 24 74  61 62 25 3d c3 74 61 62  |0T+=1:$tab%=.tab|
00000ad0  6c 65 25 3a e7 74 61 62  6c 65 25 3d 31 33 8c 20  |le%:.table%=13. |
00000ae0  24 74 61 62 25 3d 22 41  20 4c 20 4c 22 0d 03 7a  |$tab%="A L L"..z|
00000af0  5d 6e 61 6d 65 24 28 54  29 3d 24 6e 61 6d 65 25  |]name$(T)=$name%|
00000b00  3a 74 61 62 6c 65 25 28  54 29 3d 74 61 62 6c 65  |:table%(T)=table|
00000b10  25 3a 6c 65 76 65 6c 25  28 54 29 3d 64 69 66 66  |%:level%(T)=diff|
00000b20  69 63 75 6c 74 79 25 3a  e7 74 69 6d 65 72 25 3d  |iculty%:.timer%=|
00000b30  31 8c 4f 24 28 54 29 3d  22 4f 4e 22 20 8b 20 4f  |1.O$(T)="ON" . O|
00000b40  24 28 54 29 3d 22 4f 46  46 22 0d 03 84 3a f2 73  |$(T)="OFF"...:.s|
00000b50  65 74 69 63 6f 6e 28 63  68 61 6e 64 6c 65 25 2c  |eticon(chandle%,|
00000b60  32 35 2c 22 6e 6f 77 22  2c 30 29 3a f2 62 65 67  |25,"now",0):.beg|
00000b70  69 6e 3a f2 71 75 65 73  74 69 6f 6e 3a f2 73 63  |in:.question:.sc|
00000b80  72 65 65 6e 0d 03 8e 26  e7 74 69 6d 65 72 25 3d  |reen...&.timer%=|
00000b90  31 8c 20 61 63 74 69 76  65 25 3d 31 3a 73 65 63  |1. active%=1:sec|
00000ba0  6f 6e 64 73 25 3d 33 30  30 30 0d 03 98 28 e7 74  |onds%=3000...(.t|
00000bb0  69 6d 65 72 25 3d 30 8c  61 63 74 69 76 65 25 3d  |imer%=0.active%=|
00000bc0  32 3a 6e 75 6d 62 65 72  25 3d 31 3a f2 64 72 61  |2:number%=1:.dra|
00000bd0  77 31 0d 03 a2 05 e1 0d  03 ac 4a 2a 2a 2a 2a 2a  |w1........J*****|
00000be0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00000bf0  2a 2a 2a 57 49 4e 44 4f  57 20 50 52 4f 43 53 2a  |***WINDOW PROCS*|
00000c00  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000c20  2a 0d 03 b6 1a dd a4 6c  6f 61 64 5f 74 65 6d 70  |*......load_temp|
00000c30  6c 61 74 65 28 6e 61 6d  65 24 29 0d 03 c0 07 ea  |late(name$).....|
00000c40  68 25 0d 03 ca 48 c8 99  22 57 69 6d 70 5f 4c 6f  |h%...H.."Wimp_Lo|
00000c50  61 64 54 65 6d 70 6c 61  74 65 22 2c 2c 62 6c 6f  |adTemplate",,blo|
00000c60  63 6b 25 2c 69 62 6c 6f  63 6b 25 2c 69 65 6e 64  |ck%,iblock%,iend|
00000c70  25 2c 66 6f 6e 74 25 2c  6e 61 6d 65 24 2c 30 20  |%,font%,name$,0 |
00000c80  b8 2c 2c 69 62 6c 6f 63  6b 25 0d 03 d4 17 e7 6e  |.,,iblock%.....n|
00000c90  61 6d 65 24 3d 22 43 4f  55 4e 54 44 4f 57 4e 22  |ame$="COUNTDOWN"|
00000ca0  8c 0d 03 de b7 62 6c 6f  63 6b 25 21 31 32 3d 31  |.....block%!12=1|
00000cb0  30 32 34 3a 62 6c 6f 63  6b 25 21 28 38 38 2b 32  |024:block%!(88+2|
00000cc0  30 2b 33 32 2a 32 34 29  3d 6e 61 6d 65 25 3a 62  |0+32*24)=name%:b|
00000cd0  6c 6f 63 6b 25 21 28 38  38 2b 32 30 2b 33 32 2a  |lock%!(88+20+32*|
00000ce0  31 38 29 3d 79 73 63 6f  72 65 25 3a 62 6c 6f 63  |18)=yscore%:bloc|
00000cf0  6b 25 21 28 38 38 2b 32  30 2b 33 32 2a 31 39 29  |k%!(88+20+32*19)|
00000d00  3d 63 73 63 6f 72 65 25  3a 62 6c 6f 63 6b 25 21  |=cscore%:block%!|
00000d10  28 38 38 2b 32 30 2b 33  32 2a 32 30 29 3d 61 63  |(88+20+32*20)=ac|
00000d20  63 25 3a 62 6c 6f 63 6b  25 21 28 38 38 2b 32 30  |c%:block%!(88+20|
00000d30  2b 33 32 2a 32 33 29 3d  69 63 6f 33 32 25 3a 62  |+32*23)=ico32%:b|
00000d40  6c 6f 63 6b 25 21 28 38  38 2b 32 30 2b 33 32 2a  |lock%!(88+20+32*|
00000d50  31 32 29 3d 73 65 63 25  0d 03 e8 05 cd 0d 03 f2  |12)=sec%........|
00000d60  14 e7 6e 61 6d 65 24 3d  22 4c 45 56 42 4f 58 22  |..name$="LEVBOX"|
00000d70  8c 0d 03 fc 36 62 6c 6f  63 6b 25 21 28 38 38 2b  |....6block%!(88+|
00000d80  32 30 2b 33 32 2a 32 29  3d 64 69 66 66 25 3a 62  |20+32*2)=diff%:b|
00000d90  6c 6f 63 6b 25 21 28 38  38 2b 32 30 2b 33 32 2a  |lock%!(88+20+32*|
00000da0  33 29 3d 74 61 62 25 0d  04 06 05 cd 0d 04 10 15  |3)=tab%.........|
00000db0  e7 6e 61 6d 65 24 3d 22  53 41 56 45 42 4f 58 22  |.name$="SAVEBOX"|
00000dc0  8c 0d 04 1a 1c 62 6c 6f  63 6b 25 21 28 38 38 2b  |.....block%!(88+|
00000dd0  32 30 29 3d 73 61 76 65  6e 61 6d 65 25 0d 04 24  |20)=savename%..$|
00000de0  05 cd 0d 04 2e 12 e7 6e  61 6d 65 24 3d 22 6c 6f  |.......name$="lo|
00000df0  67 6f 22 8c 0d 04 38 05  cd 0d 04 42 24 c8 99 22  |go"...8....B$.."|
00000e00  57 69 6d 70 5f 43 72 65  61 74 65 57 69 6e 64 6f  |Wimp_CreateWindo|
00000e10  77 22 2c 2c 62 6c 6f 63  6b 25 b8 68 25 0d 04 4c  |w",,block%.h%..L|
00000e20  07 3d 68 25 0d 04 56 05  e1 0d 04 60 05 3a 0d 04  |.=h%..V....`.:..|
00000e30  6a 1f dd f2 63 68 61 6e  67 65 77 69 6e 64 6f 77  |j...changewindow|
00000e40  73 69 7a 65 28 68 61 6e  64 6c 65 25 29 0d 04 74  |size(handle%)..t|
00000e50  13 21 62 6c 6f 63 6b 25  3d 68 61 6e 64 6c 65 25  |.!block%=handle%|
00000e60  0d 04 7e 1d 73 69 25 3d  2d 28 28 43 4f 28 54 29  |..~.si%=-((CO(T)|
00000e70  2b 59 4f 28 54 29 2b 38  29 2a 33 32 29 0d 04 88  |+YO(T)+8)*32)...|
00000e80  0e 62 6c 6f 63 6b 25 21  30 3d 30 0d 04 92 10 62  |.block%!0=0....b|
00000e90  6c 6f 63 6b 25 21 34 3d  73 69 25 0d 04 9c 10 62  |lock%!4=si%....b|
00000ea0  6c 6f 63 6b 25 21 38 3d  34 39 30 0d 04 a6 0f 62  |lock%!8=490....b|
00000eb0  6c 6f 63 6b 25 21 31 32  3d 30 0d 04 b0 25 c8 99  |lock%!12=0...%..|
00000ec0  22 57 69 6d 70 5f 53 65  74 45 78 74 65 6e 74 22  |"Wimp_SetExtent"|
00000ed0  2c 68 61 6e 64 6c 65 25  2c 62 6c 6f 63 6b 25 0d  |,handle%,block%.|
00000ee0  04 ba 05 e1 0d 04 c4 05  3a 0d 04 ce 0d dd f2 72  |........:......r|
00000ef0  65 64 72 61 77 3a 0d 04  d8 27 c8 99 22 57 69 6d  |edraw:...'.."Wim|
00000f00  70 5f 52 65 64 72 61 77  57 69 6e 64 6f 77 22 2c  |p_RedrawWindow",|
00000f10  2c 62 6c 6f 63 6b 25 b8  6d 6f 72 65 25 0d 04 e2  |,block%.more%...|
00000f20  0b c8 95 6d 6f 72 65 25  0d 04 ec 32 78 30 25 3d  |...more%...2x0%=|
00000f30  62 6c 6f 63 6b 25 21 34  2d 62 6c 6f 63 6b 25 21  |block%!4-block%!|
00000f40  32 30 3a 79 30 25 3d 62  6c 6f 63 6b 25 21 31 36  |20:y0%=block%!16|
00000f50  2d 62 6c 6f 63 6b 25 21  32 34 0d 04 f6 38 79 73  |-block%!24...8ys|
00000f60  63 72 6f 6c 6c 25 3d 62  6c 6f 63 6b 25 21 32 34  |croll%=block%!24|
00000f70  3a 6d 61 78 79 25 3d 62  6c 6f 63 6b 25 21 31 36  |:maxy%=block%!16|
00000f80  3a 67 72 61 70 68 79 25  3d 62 6c 6f 63 6b 25 21  |:graphy%=block%!|
00000f90  34 30 0d 05 00 0e c8 8e  21 62 6c 6f 63 6b 25 ca  |40......!block%.|
00000fa0  0d 05 0a 1a c9 72 6f 6c  6c 68 61 6e 64 6c 65 25  |.....rollhandle%|
00000fb0  3a f2 72 65 64 72 61 77  5f 31 0d 05 14 19 c9 72  |:.redraw_1.....r|
00000fc0  65 73 68 61 6e 64 6c 65  25 3a f2 72 65 64 72 61  |eshandle%:.redra|
00000fd0  77 5f 32 0d 05 1e 0d c9  63 68 61 6e 64 6c 65 25  |w_2.....chandle%|
00000fe0  0d 05 28 11 c9 6c 6f 67  6f 68 61 6e 64 6c 65 25  |..(..logohandle%|
00000ff0  3a 0d 05 32 05 cb 0d 05  3c 27 c8 99 22 57 69 6d  |:..2....<'.."Wim|
00001000  70 5f 47 65 74 52 65 63  74 61 6e 67 6c 65 22 2c  |p_GetRectangle",|
00001010  2c 62 6c 6f 63 6b 25 b8  6d 6f 72 65 25 0d 05 46  |,block%.more%..F|
00001020  05 ce 0d 05 50 05 e1 0d  05 5a 05 3a 0d 05 64 0e  |....P....Z.:..d.|
00001030  dd f2 72 65 64 72 61 77  5f 31 0d 05 6e 18 79 30  |..redraw_1..n.y0|
00001040  25 2d 3d 33 32 3a ec 20  78 30 25 2b 31 36 2c 79  |%-=32:. x0%+16,y|
00001050  30 25 0d 05 78 0b e3 4e  3d 31 b8 31 32 0d 05 82  |0%..x..N=1.12...|
00001060  18 79 30 25 2d 3d 33 32  3a ec 20 78 30 25 2b 31  |.y0%-=32:. x0%+1|
00001070  36 2c 79 30 25 0d 05 8c  25 f1 c3 4e 3b 22 2e 20  |6,y0%...%..N;". |
00001080  20 22 3a ec 78 30 25 2b  36 34 2c 79 30 25 3a f1  | ":.x0%+64,y0%:.|
00001090  72 6f 6c 6c 24 28 4e 2c  31 29 0d 05 96 1c ec 78  |roll$(N,1).....x|
000010a0  30 25 2b 33 33 36 2c 79  30 25 3a f1 72 6f 6c 6c  |0%+336,y0%:.roll|
000010b0  24 28 4e 2c 32 29 0d 05  a0 1c ec 78 30 25 2b 34  |$(N,2).....x0%+4|
000010c0  30 38 2c 79 30 25 3a f1  72 6f 6c 6c 24 28 4e 2c  |08,y0%:.roll$(N,|
000010d0  33 29 0d 05 aa 05 ed 0d  05 b4 18 79 30 25 2d 3d  |3).........y0%-=|
000010e0  33 32 3a ec 20 78 30 25  2b 31 36 2c 79 30 25 0d  |32:. x0%+16,y0%.|
000010f0  05 be 05 e1 0d 05 c8 05  3a 0d 05 d2 0e dd f2 72  |........:......r|
00001100  65 64 72 61 77 5f 32 0d  05 dc 18 79 30 25 2d 3d  |edraw_2....y0%-=|
00001110  31 36 3a ec 20 78 30 25  2b 34 38 2c 79 30 25 0d  |16:. x0%+48,y0%.|
00001120  05 e6 1b c8 99 22 57 69  6d 70 5f 53 65 74 43 6f  |....."Wimp_SetCo|
00001130  6c 6f 75 72 22 2c 37 2c  31 34 0d 05 f0 47 f1 22  |lour",7,14...G."|
00001140  4e 61 6d 65 3a 20 22 3b  3a c8 99 22 57 69 6d 70  |Name: ";:.."Wimp|
00001150  5f 53 65 74 43 6f 6c 6f  75 72 22 2c 31 35 2c 31  |_SetColour",15,1|
00001160  34 3a f1 20 6e 61 6d 65  24 28 54 29 3a 79 30 25  |4:. name$(T):y0%|
00001170  2d 3d 33 32 3a ec 20 78  30 25 2b 34 38 2c 79 30  |-=32:. x0%+48,y0|
00001180  25 0d 05 fa 1b c8 99 22  57 69 6d 70 5f 53 65 74  |%......"Wimp_Set|
00001190  43 6f 6c 6f 75 72 22 2c  37 2c 31 34 0d 06 04 44  |Colour",7,14...D|
000011a0  f1 22 54 61 62 6c 65 3a  20 22 3b 3a c8 99 22 57  |."Table: ";:.."W|
000011b0  69 6d 70 5f 53 65 74 43  6f 6c 6f 75 72 22 2c 31  |imp_SetColour",1|
000011c0  35 2c 31 34 3a f1 24 74  61 62 25 3a 79 30 25 2d  |5,14:.$tab%:y0%-|
000011d0  3d 33 32 3a ec 20 78 30  25 2b 34 38 2c 79 30 25  |=32:. x0%+48,y0%|
000011e0  0d 06 0e 1b c8 99 22 57  69 6d 70 5f 53 65 74 43  |......"Wimp_SetC|
000011f0  6f 6c 6f 75 72 22 2c 37  2c 31 34 0d 06 18 4b f1  |olour",7,14...K.|
00001200  22 4c 65 76 65 6c 3a 20  22 3b 3a c8 99 22 57 69  |"Level: ";:.."Wi|
00001210  6d 70 5f 53 65 74 43 6f  6c 6f 75 72 22 2c 31 35  |mp_SetColour",15|
00001220  2c 31 34 3a f1 c3 64 69  66 66 69 63 75 6c 74 79  |,14:..difficulty|
00001230  25 3a 79 30 25 2d 3d 36  34 3a ec 20 78 30 25 2b  |%:y0%-=64:. x0%+|
00001240  34 38 2c 79 30 25 0d 06  36 1c c8 99 22 57 69 6d  |48,y0%..6..."Wim|
00001250  70 5f 53 65 74 43 6f 6c  6f 75 72 22 2c 31 30 2c  |p_SetColour",10,|
00001260  31 34 0d 06 40 1f f1 22  43 4f 52 52 45 43 54 20  |14..@.."CORRECT |
00001270  41 4e 53 57 45 52 53 3a  22 3a 79 30 25 2d 3d 33  |ANSWERS:":y0%-=3|
00001280  32 0d 06 4a 1b c8 99 22  57 69 6d 70 5f 53 65 74  |2..J..."Wimp_Set|
00001290  43 6f 6c 6f 75 72 22 2c  37 2c 31 34 0d 06 54 0f  |Colour",7,14..T.|
000012a0  e3 4e 3d 31 20 b8 59 4f  28 54 29 0d 06 5e 0f ec  |.N=1 .YO(T)..^..|
000012b0  78 30 25 2b 34 38 2c 79  30 25 0d 06 68 30 e7 4e  |x0%+48,y0%..h0.N|
000012c0  3c 31 30 8c f1 22 20 22  2b c3 4e 2b 22 2e 20 22  |<10.." "+.N+". "|
000012d0  2b 52 24 28 54 2c 4e 29  20 8b f1 c3 4e 2b 22 2e  |+R$(T,N) ...N+".|
000012e0  20 22 2b 52 24 28 54 2c  4e 29 0d 06 72 0b 79 30  | "+R$(T,N)..r.y0|
000012f0  25 2d 3d 33 32 0d 06 7c  05 ed 0d 06 7d 11 e7 43  |%-=32..|....}..C|
00001300  4f 28 54 29 3d 30 8c 8d  64 6a 46 0d 06 86 0b 79  |O(T)=0..djF....y|
00001310  30 25 2d 3d 33 32 0d 06  90 0f ec 78 30 25 2b 34  |0%-=32.....x0%+4|
00001320  38 2c 79 30 25 0d 06 9a  1c c8 99 22 57 69 6d 70  |8,y0%......"Wimp|
00001330  5f 53 65 74 43 6f 6c 6f  75 72 22 2c 31 31 2c 31  |_SetColour",11,1|
00001340  34 0d 06 a4 1d f1 22 57  52 4f 4e 47 20 41 4e 53  |4....."WRONG ANS|
00001350  57 45 52 53 3a 22 3a 79  30 25 2d 3d 33 32 0d 06  |WERS:":y0%-=32..|
00001360  ae 1b c8 99 22 57 69 6d  70 5f 53 65 74 43 6f 6c  |...."Wimp_SetCol|
00001370  6f 75 72 22 2c 37 2c 31  34 0d 06 b8 11 f1 3a e3  |our",7,14.....:.|
00001380  4e 3d 31 20 b8 43 4f 28  54 29 0d 06 c2 0f ec 78  |N=1 .CO(T).....x|
00001390  30 25 2b 34 38 2c 79 30  25 0d 06 cc 30 e7 4e 3c  |0%+48,y0%...0.N<|
000013a0  31 30 8c f1 22 20 22 2b  c3 4e 2b 22 2e 20 22 2b  |10.." "+.N+". "+|
000013b0  57 24 28 54 2c 4e 29 20  8b f1 c3 4e 2b 22 2e 20  |W$(T,N) ...N+". |
000013c0  22 2b 57 24 28 54 2c 4e  29 0d 06 d6 0b 79 30 25  |"+W$(T,N)....y0%|
000013d0  2d 3d 33 32 0d 06 e0 05  ed 0d 06 ea 05 e1 0d 06  |-=32............|
000013e0  f4 05 3a 0d 06 fe 0b dd  f2 64 72 61 77 31 0d 07  |..:......draw1..|
000013f0  08 34 e7 6e 75 6d 62 65  72 25 3e 39 8c 6e 75 6d  |.4.number%>9.num|
00001400  62 65 72 24 3d c3 6e 75  6d 62 65 72 25 8b 6e 75  |ber$=.number%.nu|
00001410  6d 62 65 72 24 3d 22 20  22 2b c3 6e 75 6d 62 65  |mber$=" "+.numbe|
00001420  72 25 0d 07 12 20 e7 6e  75 6d 62 65 72 25 3e 31  |r%... .number%>1|
00001430  30 8c 61 63 74 69 76 65  25 3d 30 3a f2 41 4c 4c  |0.active%=0:.ALL|
00001440  3a e1 0d 07 1c 23 f2 73  65 74 69 63 6f 6e 28 63  |:....#.seticon(c|
00001450  68 61 6e 64 6c 65 25 2c  31 32 2c 6e 75 6d 62 65  |handle%,12,numbe|
00001460  72 24 2c 30 29 0d 07 26  05 e1 0d 07 30 05 3a 0d  |r$,0)..&....0.:.|
00001470  07 3a 1a dd f2 77 69 6e  64 6f 77 73 74 61 74 65  |.:...windowstate|
00001480  28 68 61 6e 64 6c 65 25  29 0d 07 44 14 62 6c 6f  |(handle%)..D.blo|
00001490  63 6b 25 21 30 3d 68 61  6e 64 6c 65 25 0d 07 4e  |ck%!0=handle%..N|
000014a0  23 c8 99 22 57 69 6d 70  5f 47 65 74 57 69 6e 64  |#.."Wimp_GetWind|
000014b0  6f 77 53 74 61 74 65 22  2c 2c 62 6c 6f 63 6b 25  |owState",,block%|
000014c0  0d 07 58 05 e1 0d 07 62  05 3a 0d 07 6c 19 dd f2  |..X....b.:..l...|
000014d0  6f 70 65 6e 77 69 6e 64  6f 77 28 68 61 6e 64 6c  |openwindow(handl|
000014e0  65 25 29 0d 07 76 14 62  6c 6f 63 6b 25 21 30 3d  |e%)..v.block%!0=|
000014f0  68 61 6e 64 6c 65 25 0d  07 80 23 c8 99 22 57 69  |handle%...#.."Wi|
00001500  6d 70 5f 47 65 74 57 69  6e 64 6f 77 53 74 61 74  |mp_GetWindowStat|
00001510  65 22 2c 2c 62 6c 6f 63  6b 25 0d 07 8a 1f c8 99  |e",,block%......|
00001520  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
00001530  22 2c 2c 62 6c 6f 63 6b  25 0d 07 94 05 e1 0d 07  |",,block%.......|
00001540  9e 19 dd f2 64 69 72 77  69 6e 64 6f 77 28 6f 70  |....dirwindow(op|
00001550  65 6e 25 2c 64 24 29 0d  07 a8 42 e7 6f 70 65 6e  |en%,d$)...B.open|
00001560  25 3d 31 20 8c 63 6f 6d  6d 61 6e 64 24 3d 22 46  |%=1 .command$="F|
00001570  69 6c 65 72 5f 4f 70 65  6e 44 69 72 20 22 8b 63  |iler_OpenDir ".c|
00001580  6f 6d 6d 61 6e 64 24 3d  22 46 69 6c 65 72 5f 43  |ommand$="Filer_C|
00001590  6c 6f 73 65 44 69 72 20  22 0d 07 b2 1e 70 61 74  |loseDir "....pat|
000015a0  68 24 3d 63 6f 6d 6d 61  6e 64 24 2b 64 69 72 24  |h$=command$+dir$|
000015b0  2b 22 2e 22 2b 64 24 0d  07 bc 0a ff 70 61 74 68  |+"."+d$.....path|
000015c0  24 0d 07 c6 05 e1 0d 07  d0 4a 2a 2a 2a 2a 2a 2a  |$........J******|
000015d0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
000015e0  2a 2a 4d 45 4e 55 20 52  4f 55 54 49 4e 45 53 2a  |**MENU ROUTINES*|
000015f0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00001610  0d 07 da 10 dd f2 6d 65  6e 75 73 65 6c 65 63 74  |......menuselect|
00001620  0d 07 e4 4a 63 68 6f 69  63 65 25 3d 21 62 6c 6f  |...Jchoice%=!blo|
00001630  63 6b 25 3a 63 68 6f 69  63 65 32 25 3d 62 6c 6f  |ck%:choice2%=blo|
00001640  63 6b 25 21 34 3a 63 68  6f 69 63 65 33 25 3d 62  |ck%!4:choice3%=b|
00001650  6c 6f 63 6b 25 21 38 3a  63 68 6f 69 63 65 34 25  |lock%!8:choice4%|
00001660  3d 62 6c 6f 63 6b 25 21  31 32 0d 07 ee 0e c8 8e  |=block%!12......|
00001670  68 61 6e 64 6c 65 25 ca  0d 07 f8 08 c9 20 2d 32  |handle%...... -2|
00001680  0d 08 02 27 e7 63 68 6f  69 63 65 25 3d 30 20 8c  |...'.choice%=0 .|
00001690  c8 99 22 57 69 6d 70 5f  43 72 65 61 74 65 4d 65  |.."Wimp_CreateMe|
000016a0  6e 75 22 2c 2c 2d 31 0d  08 0c 28 e7 63 68 6f 69  |nu",,-1...(.choi|
000016b0  63 65 25 3d 31 20 8c 3a  c8 99 22 57 69 6d 70 5f  |ce%=1 .:.."Wimp_|
000016c0  43 72 65 61 74 65 4d 65  6e 75 22 2c 2c 2d 31 0d  |CreateMenu",,-1.|
000016d0  08 16 1c e7 63 68 6f 69  63 65 25 3d 33 8c 71 75  |....choice%=3.qu|
000016e0  69 74 25 3d b9 3a f2 71  75 69 74 0d 08 20 05 e1  |it%=.:.quit.. ..|
000016f0  0d 08 2a 05 3a 0d 08 34  0b dd f2 6d 65 6e 75 73  |..*.:..4...menus|
00001700  0d 08 3e 3d f2 64 72 61  77 6d 65 6e 75 28 6d 65  |..>=.drawmenu(me|
00001710  6e 75 31 25 2c 22 43 4f  55 4e 54 44 4f 57 4e 2c  |nu1%,"COUNTDOWN,|
00001720  49 6e 66 6f 2c 48 65 6c  70 2c 53 61 76 65 20 61  |Info,Help,Save a|
00001730  73 20 45 64 69 74 2c 51  75 69 74 22 29 0d 08 48  |s Edit,Quit")..H|
00001740  4d 6d 65 6e 75 31 25 21  33 32 3d 69 66 68 61 6e  |Mmenu1%!32=ifhan|
00001750  64 6c 65 25 3a 6d 65 6e  75 31 25 21 28 33 32 2b  |dle%:menu1%!(32+|
00001760  34 38 29 3d 73 61 76 65  68 61 6e 64 6c 65 25 3a  |48)=savehandle%:|
00001770  6d 65 6e 75 31 25 21 28  33 32 2b 32 34 29 3d 68  |menu1%!(32+24)=h|
00001780  65 6c 70 68 61 6e 64 6c  65 25 0d 08 52 05 e1 0d  |elphandle%..R...|
00001790  08 5c 05 3a 0d 08 66 22  dd f2 73 68 61 64 65 28  |.\.:..f"..shade(|
000017a0  6d 62 6c 6f 63 6b 25 2c  69 74 65 6d 25 2c 61 63  |mblock%,item%,ac|
000017b0  74 69 6f 6e 25 29 0d 08  70 1d 62 79 74 65 25 3d  |tion%)..p.byte%=|
000017c0  6d 62 6c 6f 63 6b 25 2b  33 38 2b 32 34 2a 69 74  |mblock%+38+24*it|
000017d0  65 6d 25 0d 08 7a 0e c8  8e 61 63 74 69 6f 6e 25  |em%..z...action%|
000017e0  ca 0d 08 84 18 c9 2d 31  3a 3f 62 79 74 65 25 3d  |......-1:?byte%=|
000017f0  3f 62 79 74 65 25 82 36  34 0d 08 8e 18 c9 30 3a  |?byte%.64.....0:|
00001800  3f 62 79 74 65 25 3d 3f  62 79 74 65 25 80 26 36  |?byte%=?byte%.&6|
00001810  46 0d 08 98 17 c9 31 3a  3f 62 79 74 65 25 3d 3f  |F.....1:?byte%=?|
00001820  62 79 74 65 25 84 36 34  0d 08 a2 05 cb 0d 08 ac  |byte%.64........|
00001830  05 e1 0d 08 b6 1b dd f2  64 72 61 77 6d 65 6e 75  |........drawmenu|
00001840  28 6d 65 6e 75 25 2c 6d  65 6e 75 24 29 0d 08 c0  |(menu%,menu$)...|
00001850  0f 6d 61 78 69 74 65 6d  24 3d 22 22 0d 08 ca 1a  |.maxitem$=""....|
00001860  6d 65 6e 75 25 3f 31 32  3d 37 3a 6d 65 6e 75 25  |menu%?12=7:menu%|
00001870  3f 31 33 3d 31 32 0d 08  d4 19 6d 65 6e 75 25 3f  |?13=12....menu%?|
00001880  31 34 3d 37 3a 6d 65 6e  75 25 3f 31 35 3d 30 0d  |14=7:menu%?15=0.|
00001890  08 de 0f 6d 65 6e 75 25  21 32 30 3d 34 34 0d 08  |...menu%!20=44..|
000018a0  e8 1c 6d 65 6e 75 25 21  32 34 3d 30 3a 70 74 72  |..menu%!24=0:ptr|
000018b0  25 3d 6d 65 6e 75 25 2b  32 38 0d 08 f2 20 24 6d  |%=menu%+28... $m|
000018c0  65 6e 75 25 3d c0 6d 65  6e 75 24 2c a7 6d 65 6e  |enu%=.menu$,.men|
000018d0  75 24 2c 22 2c 22 29 2d  31 29 0d 08 fc 0e 6d 65  |u$,",")-1)....me|
000018e0  6e 75 24 2b 3d 22 2c 22  0d 09 06 17 65 6e 74 72  |nu$+=","....entr|
000018f0  69 65 73 25 3d 30 3a 69  74 65 6d 73 25 3d 30 0d  |ies%=0:items%=0.|
00001900  09 10 0f c8 95 6d 65 6e  75 24 3c 3e 22 22 0d 09  |.....menu$<>""..|
00001910  1a 1f 6d 65 6e 75 24 3d  c1 6d 65 6e 75 24 2c a7  |..menu$=.menu$,.|
00001920  6d 65 6e 75 24 2c 22 2c  22 29 2b 31 29 0d 09 24  |menu$,",")+1)..$|
00001930  0f e7 6d 65 6e 75 24 3c  3e 22 22 8c 0d 09 2e 16  |..menu$<>"".....|
00001940  70 74 72 25 21 30 3d 30  3a 70 74 72 25 21 34 3d  |ptr%!0=0:ptr%!4=|
00001950  2d 31 0d 09 38 13 70 74  72 25 21 38 3d 26 37 30  |-1..8.ptr%!8=&70|
00001960  30 30 30 32 31 0d 09 42  24 24 28 70 74 72 25 2b  |00021..B$$(ptr%+|
00001970  31 32 29 3d c0 6d 65 6e  75 24 2c a7 6d 65 6e 75  |12)=.menu$,.menu|
00001980  24 2c 22 2c 22 29 2d 31  29 0d 09 4c 2e e7 a9 24  |$,",")-1)..L...$|
00001990  28 70 74 72 25 2b 31 32  29 3e a9 6d 61 78 69 74  |(ptr%+12)>.maxit|
000019a0  65 6d 24 8c 6d 61 78 69  74 65 6d 24 3d 24 28 70  |em$.maxitem$=$(p|
000019b0  74 72 25 2b 31 32 29 0d  09 56 17 70 74 72 25 2b  |tr%+12)..V.ptr%+|
000019c0  3d 32 34 3a 69 74 65 6d  73 25 2b 3d 32 30 0d 09  |=24:items%+=20..|
000019d0  60 0f 65 6e 74 72 69 65  73 25 2b 3d 31 0d 09 6a  |`.entries%+=1..j|
000019e0  05 cd 0d 09 74 3e e7 a9  6d 61 78 69 74 65 6d 24  |....t>..maxitem$|
000019f0  3e 31 38 30 20 8c 6d 65  6e 75 25 21 31 36 3d 28  |>180 .menu%!16=(|
00001a00  a9 6d 61 78 69 74 65 6d  24 2b 31 29 2a 31 36 2b  |.maxitem$+1)*16+|
00001a10  33 32 20 8b 6d 65 6e 75  25 21 31 36 3d 32 30 30  |32 .menu%!16=200|
00001a20  0d 09 7e 05 ce 0d 09 88  1a 70 74 72 25 21 2d 32  |..~......ptr%!-2|
00001a30  34 3d 70 74 72 25 21 2d  32 34 20 84 26 38 30 0d  |4=ptr%!-24 .&80.|
00001a40  09 92 05 e1 0d 09 9c 2f  dd f2 73 68 6f 77 6d 65  |......./..showme|
00001a50  6e 75 28 6d 65 6e 75 25  2c 78 25 2c 79 25 2c 6f  |nu(menu%,x%,y%,o|
00001a60  6e 69 63 6f 6e 62 61 72  25 2c 65 6e 74 72 69 65  |niconbar%,entrie|
00001a70  73 25 29 0d 09 a6 31 e7  6f 6e 69 63 6f 6e 62 61  |s%)...1.oniconba|
00001a80  72 25 8c 79 70 6f 73 25  3d 39 36 2b 65 6e 74 72  |r%.ypos%=96+entr|
00001a90  69 65 73 25 2b 34 34 20  8b 79 70 6f 73 25 3d 79  |ies%+44 .ypos%=y|
00001aa0  25 2b 32 30 0d 09 b0 2a  c8 99 22 57 69 6d 70 5f  |%+20...*.."Wimp_|
00001ab0  43 72 65 61 74 65 4d 65  6e 75 22 2c 2c 6d 65 6e  |CreateMenu",,men|
00001ac0  75 25 2c 78 25 2d 36 34  2c 79 70 6f 73 25 0d 09  |u%,x%-64,ypos%..|
00001ad0  ba 05 e1 0d 09 c4 19 dd  f2 65 72 72 6f 72 6d 28  |.........errorm(|
00001ae0  6d 65 73 73 61 67 65 24  2c 72 25 29 0d 09 ce 18  |message$,r%)....|
00001af0  24 28 62 6c 6f 63 6b 25  2b 34 29 3d 6d 65 73 73  |$(block%+4)=mess|
00001b00  61 67 65 24 0d 09 d8 6a  e7 72 25 3d 31 20 8c c8  |age$...j.r%=1 ..|
00001b10  99 22 57 69 6d 70 5f 52  65 70 6f 72 74 45 72 72  |."Wimp_ReportErr|
00001b20  6f 72 22 2c 62 6c 6f 63  6b 25 2c 33 2c 22 43 6f  |or",block%,3,"Co|
00001b30  75 6e 74 64 6f 77 6e 22  20 b8 2c 72 65 73 70 6f  |untdown" .,respo|
00001b40  6e 73 65 25 8b c8 99 22  57 69 6d 70 5f 52 65 70  |nse%..."Wimp_Rep|
00001b50  6f 72 74 45 72 72 6f 72  22 2c 62 6c 6f 63 6b 25  |ortError",block%|
00001b60  2c 31 2c 22 54 65 73 74  20 54 61 73 6b 22 0d 09  |,1,"Test Task"..|
00001b70  e2 05 e1 0d 09 ec 4e 2a  2a 2a 2a 2a 2a 2a 2a 2a  |......N*********|
00001b80  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00001b90  2a 2a 2a 2a 2a 2a 49 43  4f 4e 50 52 4f 43 53 2a  |******ICONPROCS*|
00001ba0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00001bc0  2a 0d 09 f6 28 dd f2 73  65 74 69 63 6f 6e 28 68  |*...(..seticon(h|
00001bd0  61 6e 64 6c 65 25 2c 69  63 6f 6e 25 2c 74 65 78  |andle%,icon%,tex|
00001be0  74 24 2c 66 6c 61 67 25  29 0d 0a 00 1e f2 64 65  |t$,flag%).....de|
00001bf0  6c 65 74 65 69 63 6f 6e  28 68 61 6e 64 6c 65 25  |leteicon(handle%|
00001c00  2c 69 63 6f 6e 25 29 0d  0a 0a 14 62 6c 6f 63 6b  |,icon%)....block|
00001c10  25 21 34 3d 68 61 6e 64  6c 65 25 0d 0a 14 1e e7  |%!4=handle%.....|
00001c20  66 6c 61 67 25 3c 3e 30  20 8c 62 6c 6f 63 6b 25  |flag%<>0 .block%|
00001c30  21 32 34 3d 66 6c 61 67  25 0d 0a 1e 13 e7 20 74  |!24=flag%..... t|
00001c40  65 78 74 24 3d 22 22 8c  8d 44 50 4a 0d 0a 28 0e  |ext$=""..DPJ..(.|
00001c50  c8 8e 20 69 63 6f 6e 25  20 ca 0d 0a 32 27 c9 20  |.. icon% ...2'. |
00001c60  32 31 2c 32 32 2c 32 35  2c 33 32 2c 33 33 3a 24  |21,22,25,32,33:$|
00001c70  28 62 6c 6f 63 6b 25 2b  32 38 29 3d 74 65 78 74  |(block%+28)=text|
00001c80  24 0d 0a 3c 35 c9 20 31  32 2c 32 33 2c 32 39 2c  |$..<5. 12,23,29,|
00001c90  33 30 2c 33 31 3a 24 73  6e 61 6d 65 31 25 3d 74  |30,31:$sname1%=t|
00001ca0  65 78 74 24 3a 62 6c 6f  63 6b 25 21 32 38 3d 73  |ext$:block%!28=s|
00001cb0  6e 61 6d 65 31 25 0d 0a  46 05 cb 0d 0a 50 28 c8  |name1%..F....P(.|
00001cc0  99 22 57 69 6d 70 5f 43  72 65 61 74 65 49 63 6f  |."Wimp_CreateIco|
00001cd0  6e 22 2c 2c 62 6c 6f 63  6b 25 2b 34 20 b8 69 63  |n",,block%+4 .ic|
00001ce0  6f 6e 25 0d 0a 5a 1e f2  72 65 64 72 61 77 69 63  |on%..Z..redrawic|
00001cf0  6f 6e 28 68 61 6e 64 6c  65 25 2c 69 63 6f 6e 25  |on(handle%,icon%|
00001d00  29 0d 0a 64 05 e1 0d 0a  6e 05 3a 0d 0a 78 1f dd  |)..d....n.:..x..|
00001d10  f2 64 65 6c 65 74 65 69  63 6f 6e 28 68 61 6e 64  |.deleteicon(hand|
00001d20  6c 65 25 2c 69 63 6f 6e  25 29 0d 0a 82 22 21 62  |le%,icon%)..."!b|
00001d30  6c 6f 63 6b 25 3d 68 61  6e 64 6c 65 25 3a 62 6c  |lock%=handle%:bl|
00001d40  6f 63 6b 25 21 34 3d 69  63 6f 6e 25 0d 0a 8c 21  |ock%!4=icon%...!|
00001d50  c8 99 22 57 69 6d 70 5f  47 65 74 49 63 6f 6e 53  |.."Wimp_GetIconS|
00001d60  74 61 74 65 22 2c 2c 62  6c 6f 63 6b 25 0d 0a 96  |tate",,block%...|
00001d70  1f c8 99 22 57 69 6d 70  5f 44 65 6c 65 74 65 49  |..."Wimp_DeleteI|
00001d80  63 6f 6e 22 2c 2c 62 6c  6f 63 6b 25 0d 0a a0 05  |con",,block%....|
00001d90  e1 0d 0a aa 05 3a 0d 0a  b4 1f dd f2 72 65 64 72  |.....:......redr|
00001da0  61 77 69 63 6f 6e 28 68  61 6e 64 6c 65 25 2c 69  |awicon(handle%,i|
00001db0  63 6f 6e 25 29 0d 0a be  22 21 62 6c 6f 63 6b 25  |con%)..."!block%|
00001dc0  3d 68 61 6e 64 6c 65 25  3a 62 6c 6f 63 6b 25 21  |=handle%:block%!|
00001dd0  34 3d 69 63 6f 6e 25 0d  0a c8 1a 62 6c 6f 63 6b  |4=icon%....block|
00001de0  25 21 38 3d 30 3a 62 6c  6f 63 6b 25 21 31 32 3d  |%!8=0:block%!12=|
00001df0  30 0d 0a d2 21 c8 99 22  57 69 6d 70 5f 53 65 74  |0...!.."Wimp_Set|
00001e00  49 63 6f 6e 53 74 61 74  65 22 2c 2c 62 6c 6f 63  |IconState",,bloc|
00001e10  6b 25 0d 0a dc 05 e1 0d  0a e6 05 3a 0d 0a f0 1e  |k%.........:....|
00001e20  dd f2 69 63 6f 6e 73 74  61 74 65 28 68 61 6e 64  |..iconstate(hand|
00001e30  6c 65 25 2c 69 63 6f 6e  25 29 0d 0a fa 14 62 6c  |le%,icon%)....bl|
00001e40  6f 63 6b 25 21 30 3d 68  61 6e 64 6c 65 25 0d 0b  |ock%!0=handle%..|
00001e50  04 12 62 6c 6f 63 6b 25  21 34 3d 69 63 6f 6e 25  |..block%!4=icon%|
00001e60  0d 0b 0e 21 c8 99 22 57  69 6d 70 5f 47 65 74 49  |...!.."Wimp_GetI|
00001e70  63 6f 6e 53 74 61 74 65  22 2c 2c 62 6c 6f 63 6b  |conState",,block|
00001e80  25 0d 0b 18 05 e1 0d 0b  22 4e 2a 2a 2a 2a 2a 2a  |%......."N******|
00001e90  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00001ea0  2a 2a 2a 4c 4f 41 44 20  41 4e 44 20 53 41 56 45  |***LOAD AND SAVE|
00001eb0  20 52 4f 55 54 49 4e 45  53 2a 2a 2a 2a 2a 2a 2a  | ROUTINES*******|
00001ec0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00001ed0  2a 2a 2a 2a 0d 0b 2c 10  dd f2 73 61 76 65 68 6f  |****..,...saveho|
00001ee0  6e 6f 75 72 0d 0b 36 15  58 3d ae 28 64 69 72 24  |nour..6.X=.(dir$|
00001ef0  2b 22 2e 52 4f 4c 4c 22  29 0d 0b 40 0d 4d 3d 30  |+".ROLL")..@.M=0|
00001f00  3a cf 23 58 3d 4d 0d 0b  4a 0b e3 4e 3d 31 b8 31  |:.#X=M..J..N=1.1|
00001f10  32 0d 0b 54 1e f1 23 58  2c 72 6f 6c 6c 24 28 4e  |2..T..#X,roll$(N|
00001f20  2c 31 29 3a 4d 2b 3d 32  30 3a cf 23 58 3d 4d 0d  |,1):M+=20:.#X=M.|
00001f30  0b 5e 1d f1 23 58 2c 72  6f 6c 6c 24 28 4e 2c 32  |.^..#X,roll$(N,2|
00001f40  29 3a 4d 2b 3d 35 3a cf  23 58 3d 4d 0d 0b 68 1e  |):M+=5:.#X=M..h.|
00001f50  f1 23 58 2c 72 6f 6c 6c  24 28 4e 2c 33 29 3a 4d  |.#X,roll$(N,3):M|
00001f60  2b 3d 32 30 3a cf 23 58  3d 4d 0d 0b 72 05 ed 0d  |+=20:.#X=M..r...|
00001f70  0b 7c 07 d9 23 58 0d 0b  86 0e 74 79 70 65 25 3d  |.|..#X....type%=|
00001f80  26 38 30 33 0d 0b 90 31  70 61 74 68 24 3d 22 53  |&803...1path$="S|
00001f90  45 54 54 59 50 45 20 22  2b 64 69 72 24 2b 22 2e  |ETTYPE "+dir$+".|
00001fa0  52 4f 4c 4c 20 22 2b c3  7e 74 79 70 65 25 3a ff  |ROLL "+.~type%:.|
00001fb0  70 61 74 68 24 0d 0b 9a  05 e1 0d 0b a4 0e dd f2  |path$...........|
00001fc0  6e 61 6d 65 66 69 6c 65  0d 0b ae 26 66 69 6c 65  |namefile...&file|
00001fd0  24 3d 22 53 45 54 54 59  50 45 20 22 2b 6e 61 6d  |$="SETTYPE "+nam|
00001fe0  65 24 2b 22 20 22 2b c3  7e 74 79 70 65 25 0d 0b  |e$+" "+.~type%..|
00001ff0  b8 0a ff 66 69 6c 65 24  0d 0b c2 05 e1 0d 0b cc  |...file$........|
00002000  10 dd f2 6c 6f 61 64 68  6f 6e 6f 75 72 0d 0b d6  |...loadhonour...|
00002010  15 58 3d 8e 28 64 69 72  24 2b 22 2e 52 4f 4c 4c  |.X=.(dir$+".ROLL|
00002020  22 29 0d 0b e0 16 e7 58  3d 30 8c f2 73 61 76 65  |").....X=0..save|
00002030  68 6f 6e 6f 75 72 3a e1  0d 0b ea 0d 4d 3d 30 3a  |honour:.....M=0:|
00002040  cf 23 58 3d 4d 0d 0b f4  0b e3 4e 3d 31 b8 31 32  |.#X=M.....N=1.12|
00002050  0d 0b fe 1e e8 23 58 2c  72 6f 6c 6c 24 28 4e 2c  |.....#X,roll$(N,|
00002060  31 29 3a 4d 2b 3d 32 30  3a cf 23 58 3d 4d 0d 0c  |1):M+=20:.#X=M..|
00002070  08 1d e8 23 58 2c 72 6f  6c 6c 24 28 4e 2c 32 29  |...#X,roll$(N,2)|
00002080  3a 4d 2b 3d 35 3a cf 23  58 3d 4d 0d 0c 12 1e e8  |:M+=5:.#X=M.....|
00002090  23 58 2c 72 6f 6c 6c 24  28 4e 2c 33 29 3a 4d 2b  |#X,roll$(N,3):M+|
000020a0  3d 32 30 3a cf 23 58 3d  4d 0d 0c 1c 05 ed 0d 0c  |=20:.#X=M.......|
000020b0  26 07 d9 23 58 0d 0c 30  05 e1 0d 0c 3a 4e 2a 2a  |&..#X..0....:N**|
000020c0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
000020d0  2a 2a 2a 2a 2a 2a 55 54  49 4c 49 54 59 20 50 52  |******UTILITY PR|
000020e0  4f 43 53 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |OCS*************|
000020f0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00002100  2a 2a 2a 2a 2a 2a 2a 2a  0d 0c 44 0d dd f2 64 69  |********..D...di|
00002110  72 6e 61 6d 65 0d 0c 4e  0f de 62 75 66 66 65 72  |rname..N..buffer|
00002120  20 32 35 36 0d 0c 58 39  c8 99 22 4f 53 5f 52 65  | 256..X9.."OS_Re|
00002130  61 64 56 61 72 56 61 6c  22 2c 22 4f 62 65 79 24  |adVarVal","Obey$|
00002140  44 69 72 22 2c 62 75 66  66 65 72 2c 32 35 36 2c  |Dir",buffer,256,|
00002150  30 2c 33 20 b8 2c 2c 6c  65 6e 67 74 68 0d 0c 62  |0,3 .,,length..b|
00002160  14 62 75 66 66 65 72 3f  6c 65 6e 67 74 68 3d 31  |.buffer?length=1|
00002170  33 0d 0c 6c 10 64 69 72  24 3d 24 62 75 66 66 65  |3..l.dir$=$buffe|
00002180  72 0d 0c 76 05 e1 0d 0c  80 0a dd f2 71 75 69 74  |r..v........quit|
00002190  0d 0c 8a 06 ef 33 0d 0c  94 3a f2 65 72 72 6f 72  |.....3...:.error|
000021a0  6d 28 22 41 72 65 20 79  6f 75 20 73 75 72 65 20  |m("Are you sure |
000021b0  79 6f 75 20 72 65 61 6c  6c 79 20 77 61 6e 74 20  |you really want |
000021c0  74 6f 20 71 75 69 74 20  6e 6f 77 3f 22 2c 31 29  |to quit now?",1)|
000021d0  0d 0c 9e 1b e7 72 65 73  70 6f 6e 73 65 25 3c 3e  |.....response%<>|
000021e0  31 8c 71 75 69 74 25 3d  a3 3a e1 0d 0c a8 0f f2  |1.quit%=.:......|
000021f0  73 61 76 65 68 6f 6e 6f  75 72 0d 0c b2 08 c8 97  |savehonour......|
00002200  20 ee 0d 0c bc 16 c8 99  22 57 69 6d 70 5f 43 6c  | ......."Wimp_Cl|
00002210  6f 73 65 44 6f 77 6e 22  0d 0c c6 0c 2a 46 58 31  |oseDown"....*FX1|
00002220  31 2c 36 30 0d 0c d0 05  e0 0d 0c da 0b dd f2 65  |1,60...........e|
00002230  72 72 6f 72 0d 0c e4 0d  21 62 6c 6f 63 6b 25 3d  |rror....!block%=|
00002240  9f 0d 0c ee 34 24 28 62  6c 6f 63 6b 25 2b 34 29  |....4$(block%+4)|
00002250  3d f6 24 2b 22 20 69 6e  74 65 72 6e 61 6c 20 65  |=.$+" internal e|
00002260  72 72 6f 72 20 63 6f 64  65 20 22 2b c3 9e 2b 22  |rror code "+..+"|
00002270  29 22 2b bd 30 0d 0c f8  2d c8 99 22 57 69 6d 70  |)"+.0...-.."Wimp|
00002280  5f 52 65 70 6f 72 74 45  72 72 6f 72 22 2c 62 6c  |_ReportError",bl|
00002290  6f 63 6b 25 2c 31 2c 22  43 4f 55 4e 54 44 4f 57  |ock%,1,"COUNTDOW|
000022a0  4e 22 0d 0d 02 11 71 75  69 74 25 3d b9 3a f2 71  |N"....quit%=.:.q|
000022b0  75 69 74 0d 0d 0c 05 e1  0d 0d 16 49 2a 2a 2a 2a  |uit........I****|
000022c0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
000022d0  2a 2a 2a 2a 2a 43 4f 55  4e 54 44 4f 57 4e 20 50  |*****COUNTDOWN P|
000022e0  52 4f 47 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |ROG*************|
000022f0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00002300  2a 0d 0d 20 0a dd f2 74  69 6d 65 0d 0d 2a 27 c8  |*.. ...time..*'.|
00002310  99 22 4f 53 5f 52 65 61  64 4d 6f 6e 6f 74 6f 6e  |."OS_ReadMonoton|
00002320  69 63 54 69 6d 65 22 20  b8 20 6e 65 77 74 69 6d  |icTime" . newtim|
00002330  65 25 0d 0d 34 22 c8 95  20 28 6e 65 77 74 69 6d  |e%..4".. (newtim|
00002340  65 25 2d 65 61 72 6c 69  65 73 74 5f 74 69 6d 65  |e%-earliest_time|
00002350  25 3e 30 29 0d 0d 3e 1e  65 61 72 6c 69 65 73 74  |%>0)..>.earliest|
00002360  5f 74 69 6d 65 25 2b 3d  69 6e 63 72 65 6d 65 6e  |_time%+=incremen|
00002370  74 25 0d 0d 48 05 ce 0d  0d 52 18 e7 61 63 74 69  |t%..H....R..acti|
00002380  76 65 25 3d 31 80 74 69  6d 65 72 25 3d 31 8c 0d  |ve%=1.timer%=1..|
00002390  0d 5c 18 73 65 63 6f 6e  64 73 25 2d 3d 69 6e 63  |.\.seconds%-=inc|
000023a0  72 65 6d 65 6e 74 25 0d  0d 66 18 e7 73 65 63 6f  |rement%..f..seco|
000023b0  6e 64 73 25 3c 31 30 30  8c f2 41 4c 4c 3a e1 0d  |nds%<100..ALL:..|
000023c0  0d 70 26 f2 73 65 74 69  63 6f 6e 28 63 68 61 6e  |.p&.seticon(chan|
000023d0  64 6c 65 25 2c 31 31 2c  22 22 2c 26 31 42 30 30  |dle%,11,"",&1B00|
000023e0  36 31 33 44 29 0d 0d 7a  19 24 73 65 63 25 3d c3  |613D)..z.$sec%=.|
000023f0  28 73 65 63 6f 6e 64 73  25 2f 31 30 30 29 0d 0d  |(seconds%/100)..|
00002400  84 1c f2 72 65 64 72 61  77 69 63 6f 6e 28 63 68  |...redrawicon(ch|
00002410  61 6e 64 6c 65 25 2c 31  32 29 0d 0d 8e 10 d4 31  |andle%,12).....1|
00002420  2c 2d 31 35 2c 31 36 30  2c 31 0d 0d 98 05 cd 0d  |,-15,160,1......|
00002430  0d a2 05 e1 0d 0d ac 05  3a 0d 0d b6 33 dd f2 63  |........:...3..c|
00002440  68 6f 6f 73 65 3a 43 48  24 28 59 4f 28 54 29 2b  |hoose:CH$(YO(T)+|
00002450  43 4f 28 54 29 29 3d c3  28 51 29 2b c3 28 41 41  |CO(T))=.(Q)+.(AA|
00002460  29 2b c3 28 61 6e 73 77  65 72 25 29 0d 0d c0 28  |)+.(answer%)...(|
00002470  e7 20 61 6e 73 77 65 72  25 3c 3e bb 24 69 63 6f  |. answer%<>.$ico|
00002480  33 32 25 8c f2 77 72 6f  6e 67 20 8b f2 63 6f 72  |32%..wrong ..cor|
00002490  72 65 63 74 0d 0d ca 20  43 4f 24 3d c4 32 2d a9  |rect... CO$=.2-.|
000024a0  c3 43 4f 28 54 29 2c 22  20 22 29 2b c3 28 43 4f  |.CO(T)," ")+.(CO|
000024b0  28 54 29 29 0d 0d d4 20  59 4f 24 3d c4 32 2d a9  |(T))... YO$=.2-.|
000024c0  c3 59 4f 28 54 29 2c 22  20 22 29 2b c3 28 59 4f  |.YO(T)," ")+.(YO|
000024d0  28 54 29 29 0d 0d de 41  24 61 63 63 25 3d c4 33  |(T))...A$acc%=.3|
000024e0  2d a9 c3 28 59 4f 28 54  29 2d 43 4f 28 54 29 29  |-..(YO(T)-CO(T))|
000024f0  2c 22 20 22 29 2b c3 a8  28 59 4f 28 54 29 2f 28  |," ")+..(YO(T)/(|
00002500  59 4f 28 54 29 2b 43 4f  28 54 29 29 2a 31 30 30  |YO(T)+CO(T))*100|
00002510  29 2b 22 25 22 0d 0d e8  1c f2 72 65 64 72 61 77  |)+"%".....redraw|
00002520  69 63 6f 6e 28 63 68 61  6e 64 6c 65 25 2c 32 30  |icon(chandle%,20|
00002530  29 0d 0d f2 29 24 79 73  63 6f 72 65 25 3d 59 4f  |)...)$yscore%=YO|
00002540  24 3a f2 72 65 64 72 61  77 69 63 6f 6e 28 63 68  |$:.redrawicon(ch|
00002550  61 6e 64 6c 65 25 2c 31  38 29 0d 0d fc 29 24 63  |andle%,18)...)$c|
00002560  73 63 6f 72 65 25 3d 43  4f 24 3a f2 72 65 64 72  |score%=CO$:.redr|
00002570  61 77 69 63 6f 6e 28 63  68 61 6e 64 6c 65 25 2c  |awicon(chandle%,|
00002580  31 39 29 0d 0e 06 2b 53  49 47 4e 24 3d 22 20 22  |19)...+SIGN$=" "|
00002590  3a f2 73 65 74 69 63 6f  6e 28 63 68 61 6e 64 6c  |:.seticon(chandl|
000025a0  65 25 2c 33 32 2c 53 49  47 4e 24 2c 30 29 0d 0e  |e%,32,SIGN$,0)..|
000025b0  10 05 e1 0d 0e 1a 05 3a  0d 0e 24 0a dd f2 72 61  |.......:..$...ra|
000025c0  6e 64 0d 0e 2e 26 e7 74  61 62 6c 65 25 28 54 29  |nd...&.table%(T)|
000025d0  3c 31 33 8c 41 3d 74 61  62 6c 65 25 28 54 29 20  |<13.A=table%(T) |
000025e0  8b 41 3d b3 28 31 32 29  0d 0e 38 11 42 3d b3 28  |.A=.(12)..8.B=.(|
000025f0  31 32 29 3a 43 3d 41 2a  42 0d 0e 42 05 e1 0d 0e  |12):C=A*B..B....|
00002600  4c 05 3a 0d 0e 56 0e dd  f2 71 75 65 73 74 69 6f  |L.:..V...questio|
00002610  6e 0d 0e 60 07 d1 3d 30  0d 0e 6a 09 f2 72 61 6e  |n..`..=0..j..ran|
00002620  64 0d 0e 74 13 e7 64 69  66 66 69 63 75 6c 74 79  |d..t..difficulty|
00002630  25 3d 36 8c 0d 0e 7e 19  e7 74 61 62 6c 65 25 3c  |%=6...~..table%<|
00002640  3e 31 33 20 80 42 3e 37  8c 8d 74 66 4e 0d 0e 88  |>13 .B>7..tfN...|
00002650  19 e7 74 61 62 6c 65 25  3d 31 33 20 80 41 3c 37  |..table%=13 .A<7|
00002660  20 8c 8d 44 6a 4e 0d 0e  92 0e e7 42 3c 38 20 8c  | ..DjN.....B<8 .|
00002670  8d 44 6a 4e 0d 0e 9c 0f  e7 42 3d 31 31 8c 20 8d  |.DjN.....B=11. .|
00002680  44 6a 4e 0d 0e a6 05 cd  0d 0e b0 13 e7 64 69 66  |DjN..........dif|
00002690  66 69 63 75 6c 74 79 25  3d 35 8c 0d 0e ba 19 e7  |ficulty%=5......|
000026a0  74 61 62 6c 65 25 3c 3e  31 33 20 80 42 3e 35 8c  |table%<>13 .B>5.|
000026b0  8d 64 58 4e 0d 0e c4 19  e7 74 61 62 6c 65 25 3d  |.dXN.....table%=|
000026c0  31 33 20 80 41 3c 36 20  8c 8d 44 6a 4e 0d 0e ce  |13 .A<6 ..DjN...|
000026d0  0e e7 42 3c 36 20 8c 8d  44 6a 4e 0d 0e d8 05 cd  |..B<6 ..DjN.....|
000026e0  0d 0e e2 13 e7 64 69 66  66 69 63 75 6c 74 79 25  |.....difficulty%|
000026f0  3d 34 8c 0d 0e ec 19 e7  74 61 62 6c 65 25 3c 3e  |=4......table%<>|
00002700  31 33 20 80 42 3e 33 8c  8d 54 4a 4f 0d 0e f6 18  |13 .B>3..TJO....|
00002710  e7 74 61 62 6c 65 25 3d  31 33 20 80 41 3c 35 8c  |.table%=13 .A<5.|
00002720  8d 44 6a 4e 0d 0f 00 13  e7 42 3e 37 20 84 42 3c  |.DjN.....B>7 .B<|
00002730  34 20 8c 8d 44 6a 4e 0d  0f 0a 05 cd 0d 0f 14 13  |4 ..DjN.........|
00002740  e7 64 69 66 66 69 63 75  6c 74 79 25 3d 33 8c 0d  |.difficulty%=3..|
00002750  0f 1e 19 e7 74 61 62 6c  65 25 3c 3e 31 33 20 80  |....table%<>13 .|
00002760  42 3e 36 8c 8d 54 7c 4f  0d 0f 28 19 e7 74 61 62  |B>6..T|O..(..tab|
00002770  6c 65 25 3d 31 33 20 80  41 3c 34 20 8c 8d 44 6a  |le%=13 .A<4 ..Dj|
00002780  4e 0d 0f 32 0e e7 42 3e  36 8c 20 8d 44 6a 4e 0d  |N..2..B>6. .DjN.|
00002790  0f 3c 05 cd 0d 0f 46 13  e7 64 69 66 66 69 63 75  |.<....F..difficu|
000027a0  6c 74 79 25 3d 32 8c 0d  0f 50 19 e7 74 61 62 6c  |lty%=2...P..tabl|
000027b0  65 25 3c 3e 31 33 20 80  42 3e 34 8c 8d 44 6e 4f  |e%<>13 .B>4..DnO|
000027c0  0d 0f 5a 18 e7 74 61 62  6c 65 25 3d 31 33 20 80  |..Z..table%=13 .|
000027d0  41 3e 36 8c 8d 44 6a 4e  0d 0f 64 0e e7 42 3e 35  |A>6..DjN..d..B>5|
000027e0  20 8c 8d 44 6a 4e 0d 0f  6e 05 cd 0d 0f 78 13 e7  | ..DjN..n....x..|
000027f0  64 69 66 66 69 63 75 6c  74 79 25 3d 31 8c 0d 0f  |difficulty%=1...|
00002800  82 19 e7 74 61 62 6c 65  25 3c 3e 31 33 20 80 42  |...table%<>13 .B|
00002810  3e 32 8c 8d 74 60 4f 0d  0f 8c 18 e7 74 61 62 6c  |>2..t`O.....tabl|
00002820  65 25 3d 31 33 20 80 41  3e 35 8c 8d 44 6a 4e 0d  |e%=13 .A>5..DjN.|
00002830  0f 96 0e e7 42 3e 34 20  8c 8d 44 6a 4e 0d 0f a0  |....B>4 ..DjN...|
00002840  05 cd 0d 0f aa 0b 64 25  3d b3 28 33 29 0d 0f b4  |......d%=.(3)...|
00002850  1c e7 6c 65 76 65 6c 25  28 54 29 3c 34 20 80 64  |..level%(T)<4 .d|
00002860  25 3d 33 8c 20 8d 74 6a  4f 0d 0f be 30 e7 64 25  |%=3. .tjO...0.d%|
00002870  3d 31 20 8c 51 3d 41 3a  41 41 3d 42 3a 61 6e 73  |=1 .Q=A:AA=B:ans|
00002880  77 65 72 25 3d 43 3a 53  24 3d 22 20 78 20 22 3a  |wer%=C:S$=" x ":|
00002890  53 49 47 4e 24 3d 22 78  22 0d 0f c8 2f e7 64 25  |SIGN$="x".../.d%|
000028a0  3d 32 8c 51 3d 42 3a 41  41 3d 41 3a 61 6e 73 77  |=2.Q=B:AA=A:answ|
000028b0  65 72 25 3d 43 3a 53 24  3d 22 20 78 20 22 3a 53  |er%=C:S$=" x ":S|
000028c0  49 47 4e 24 3d 22 78 22  0d 0f d2 38 e7 64 25 3d  |IGN$="x"...8.d%=|
000028d0  33 8c 20 53 24 3d 22 20  22 2b bd 32 34 37 2b 22  |3. S$=" "+.247+"|
000028e0  20 22 3a 51 3d 43 3a 61  6e 73 77 65 72 25 3d 42  | ":Q=C:answer%=B|
000028f0  3a 41 41 3d 41 3a 53 49  47 4e 24 3d bd 32 34 37  |:AA=A:SIGN$=.247|
00002900  0d 0f dc 16 58 24 3d c4  33 2d a9 c3 51 2c 22 20  |....X$=.3-..Q," |
00002910  22 29 2b c3 51 3a 0d 0f  e6 18 59 24 3d c4 32 2d  |")+.Q:....Y$=.2-|
00002920  a9 c3 41 41 2c 22 20 22  29 2b c3 41 41 3a 0d 0f  |..AA," ")+.AA:..|
00002930  f0 21 5a 24 3d c4 33 2d  a9 c3 61 6e 73 77 65 72  |.!Z$=.3-..answer|
00002940  25 2c 22 20 22 29 2b c3  61 6e 73 77 65 72 25 0d  |%," ")+.answer%.|
00002950  0f fa 30 56 24 3d c3 51  2b c3 41 41 2b c3 61 6e  |..0V$=.Q+.AA+.an|
00002960  73 77 65 72 25 3a f2 43  48 45 43 4b 3a e7 20 43  |swer%:.CHECK:. C|
00002970  48 3d 31 20 8c 43 48 3d  30 3a e5 8d 44 6a 4e 0d  |H=1 .CH=0:..DjN.|
00002980  10 04 0e 45 24 3d 22 20  3d 20 22 3a e1 0d 10 0e  |...E$=" = ":....|
00002990  05 3a 0d 10 18 05 3a 0d  10 22 19 dd f2 77 72 6f  |.:....:.."...wro|
000029a0  6e 67 3a 43 4f 28 54 29  3d 43 4f 28 54 29 2b 31  |ng:CO(T)=CO(T)+1|
000029b0  0d 10 2c 22 f2 73 65 74  69 63 6f 6e 28 63 68 61  |..,".seticon(cha|
000029c0  6e 64 6c 65 25 2c 32 35  2c 22 77 72 6f 6e 22 2c  |ndle%,25,"wron",|
000029d0  30 29 0d 10 36 17 54 49  4d 25 3d 91 3a f5 fd 91  |0)..6.TIM%=.:...|
000029e0  3d 54 49 4d 25 2b 31 30  30 0d 10 40 27 e7 64 25  |=TIM%+100..@'.d%|
000029f0  3d 31 8c 57 24 28 54 2c  43 4f 28 54 29 29 3d 22  |=1.W$(T,CO(T))="|
00002a00  2e 2e 3f 22 2b 53 24 2b  59 24 2b 45 24 2b 5a 24  |..?"+S$+Y$+E$+Z$|
00002a10  0d 10 4a 26 e7 64 25 3d  32 8c 57 24 28 54 2c 43  |..J&.d%=2.W$(T,C|
00002a20  4f 28 54 29 29 3d 58 24  2b 53 24 2b 22 2e 3f 22  |O(T))=X$+S$+".?"|
00002a30  2b 45 24 2b 5a 24 0d 10  54 27 e7 64 25 3d 33 8c  |+E$+Z$..T'.d%=3.|
00002a40  57 24 28 54 2c 43 4f 28  54 29 29 3d 58 24 2b 53  |W$(T,CO(T))=X$+S|
00002a50  24 2b 59 24 2b 45 24 2b  22 2e 2e 3f 22 0d 10 5e  |$+Y$+E$+"..?"..^|
00002a60  14 24 69 63 6f 33 32 25  3d c3 61 6e 73 77 65 72  |.$ico32%=.answer|
00002a70  25 0d 10 68 25 f2 73 65  74 69 63 6f 6e 28 63 68  |%..h%.seticon(ch|
00002a80  61 6e 64 6c 65 25 2c 32  2c 22 22 2c 26 43 42 30  |andle%,2,"",&CB0|
00002a90  30 36 31 33 44 29 0d 10  72 1c f2 72 65 64 72 61  |0613D)..r..redra|
00002aa0  77 69 63 6f 6e 28 63 68  61 6e 64 6c 65 25 2c 32  |wicon(chandle%,2|
00002ab0  33 29 0d 10 7c 21 f2 73  65 74 69 63 6f 6e 28 63  |3)..|!.seticon(c|
00002ac0  68 61 6e 64 6c 65 25 2c  32 35 2c 22 72 69 67 22  |handle%,25,"rig"|
00002ad0  2c 30 29 0d 10 86 17 54  49 4d 25 3d 91 3a f5 fd  |,0)....TIM%=.:..|
00002ae0  91 3d 54 49 4d 25 2b 31  35 30 0d 10 90 0e 24 69  |.=TIM%+150....$i|
00002af0  63 6f 33 32 25 3d 22 22  0d 10 9a 1c f2 72 65 64  |co32%="".....red|
00002b00  72 61 77 69 63 6f 6e 28  63 68 61 6e 64 6c 65 25  |rawicon(chandle%|
00002b10  2c 32 33 29 0d 10 a4 21  f2 73 65 74 69 63 6f 6e  |,23)...!.seticon|
00002b20  28 63 68 61 6e 64 6c 65  25 2c 32 35 2c 22 6e 6f  |(chandle%,25,"no|
00002b30  77 22 2c 30 29 0d 10 ae  05 e1 0d 10 b8 05 3a 0d  |w",0).........:.|
00002b40  10 c2 36 dd f2 63 6f 72  72 65 63 74 3a 59 4f 28  |..6..correct:YO(|
00002b50  54 29 3d 59 4f 28 54 29  2b 31 3a 52 24 28 54 2c  |T)=YO(T)+1:R$(T,|
00002b60  59 4f 28 54 29 29 3d 58  24 2b 53 24 2b 59 24 2b  |YO(T))=X$+S$+Y$+|
00002b70  45 24 2b 5a 24 0d 10 cc  25 f2 73 65 74 69 63 6f  |E$+Z$...%.setico|
00002b80  6e 28 63 68 61 6e 64 6c  65 25 2c 32 2c 22 22 2c  |n(chandle%,2,"",|
00002b90  26 43 42 30 30 36 31 33  44 29 0d 10 d6 21 f2 73  |&CB00613D)...!.s|
00002ba0  65 74 69 63 6f 6e 28 63  68 61 6e 64 6c 65 25 2c  |eticon(chandle%,|
00002bb0  32 35 2c 22 72 69 67 22  2c 30 29 0d 10 e0 17 54  |25,"rig",0)....T|
00002bc0  49 4d 25 3d 91 3a f5 fd  91 3d 54 49 4d 25 2b 31  |IM%=.:...=TIM%+1|
00002bd0  35 30 0d 10 ea 21 f2 73  65 74 69 63 6f 6e 28 63  |50...!.seticon(c|
00002be0  68 61 6e 64 6c 65 25 2c  32 35 2c 22 6e 6f 77 22  |handle%,25,"now"|
00002bf0  2c 30 29 0d 10 f4 0e 24  69 63 6f 33 32 25 3d 22  |,0)....$ico32%="|
00002c00  22 0d 10 fe 05 e1 0d 11  08 05 3a 0d 11 12 1e dd  |".........:.....|
00002c10  f2 43 48 45 43 4b 3a e7  20 43 4f 28 54 29 2b 59  |.CHECK:. CO(T)+Y|
00002c20  4f 28 54 29 3c 31 20 8c  e1 0d 11 1c 09 4e 3d 31  |O(T)<1 ......N=1|
00002c30  3a f5 0d 11 26 14 e7 56  24 3d 43 48 24 28 4e 29  |:...&..V$=CH$(N)|
00002c40  20 8c 43 48 3d 31 0d 11  30 1f 4e 2b 3d 31 3a fd  | .CH=1..0.N+=1:.|
00002c50  4e 3e 28 43 4f 28 54 29  2b 59 4f 28 54 29 29 20  |N>(CO(T)+YO(T)) |
00002c60  84 43 48 3d 31 0d 11 3a  05 e1 0d 11 44 05 3a 0d  |.CH=1..:....D.:.|
00002c70  11 4e 09 dd f2 41 4c 4c  0d 11 58 31 d4 31 2c 2d  |.N...ALL..X1.1,-|
00002c80  31 35 2c 32 34 30 2c 32  30 3a 61 63 74 69 76 65  |15,240,20:active|
00002c90  25 3d 30 3a 24 6e 61 6d  65 25 3d 22 4e 20 4f 20  |%=0:$name%="N O |
00002ca0  20 4e 20 41 20 4d 20 45  22 0d 11 62 26 f2 73 65  | N A M E"..b&.se|
00002cb0  74 69 63 6f 6e 28 63 68  61 6e 64 6c 65 25 2c 32  |ticon(chandle%,2|
00002cc0  34 2c 22 22 2c 26 31 37  30 30 36 31 31 31 29 0d  |4,"",&17006111).|
00002cd0  11 6c 21 f2 73 65 74 69  63 6f 6e 28 63 68 61 6e  |.l!.seticon(chan|
00002ce0  64 6c 65 25 2c 32 35 2c  22 6e 65 77 22 2c 30 29  |dle%,25,"new",0)|
00002cf0  0d 11 76 36 c8 99 22 57  69 6d 70 5f 53 65 74 43  |..v6.."Wimp_SetC|
00002d00  61 72 65 74 50 6f 73 69  74 69 6f 6e 22 2c 63 68  |aretPosition",ch|
00002d10  61 6e 64 6c 65 25 2c 32  34 2c 2c 2c 2d 31 2c a9  |andle%,24,,,-1,.|
00002d20  24 6e 61 6d 65 25 0d 11  80 25 f2 73 65 74 69 63  |$name%...%.setic|
00002d30  6f 6e 28 63 68 61 6e 64  6c 65 25 2c 30 2c 22 22  |on(chandle%,0,""|
00002d40  2c 26 31 42 30 30 36 31  33 44 29 0d 11 8a 25 f2  |,&1B00613D)...%.|
00002d50  73 65 74 69 63 6f 6e 28  63 68 61 6e 64 6c 65 25  |seticon(chandle%|
00002d60  2c 31 2c 22 22 2c 26 31  42 30 30 36 31 33 44 29  |,1,"",&1B00613D)|
00002d70  0d 11 94 25 f2 73 65 74  69 63 6f 6e 28 63 68 61  |...%.seticon(cha|
00002d80  6e 64 6c 65 25 2c 32 2c  22 22 2c 26 31 42 30 30  |ndle%,2,"",&1B00|
00002d90  36 31 33 44 29 0d 11 9e  1f f2 73 65 74 69 63 6f  |613D).....setico|
00002da0  6e 28 63 68 61 6e 64 6c  65 25 2c 33 32 2c 22 20  |n(chandle%,32," |
00002db0  22 2c 30 29 0d 11 a8 1f  f2 73 65 74 69 63 6f 6e  |",0).....seticon|
00002dc0  28 63 68 61 6e 64 6c 65  25 2c 33 33 2c 22 20 22  |(chandle%,33," "|
00002dd0  2c 30 29 0d 11 b2 3b f2  73 65 74 69 63 6f 6e 28  |,0)...;.seticon(|
00002de0  63 68 61 6e 64 6c 65 25  2c 32 31 2c 22 20 22 2c  |chandle%,21," ",|
00002df0  30 29 3a f2 73 65 74 69  63 6f 6e 28 63 68 61 6e  |0):.seticon(chan|
00002e00  64 6c 65 25 2c 32 32 2c  22 20 22 2c 30 29 0d 11  |dle%,22," ",0)..|
00002e10  bc 25 24 73 65 63 25 3d  22 22 3a f2 72 65 64 72  |.%$sec%="":.redr|
00002e20  61 77 69 63 6f 6e 28 63  68 61 6e 64 6c 65 25 2c  |awicon(chandle%,|
00002e30  31 32 29 0d 11 c6 30 24  69 63 6f 33 32 25 3d 22  |12)...0$ico32%="|
00002e40  22 3a f2 73 65 74 69 63  6f 6e 28 63 68 61 6e 64  |":.seticon(chand|
00002e50  6c 65 25 2c 32 33 2c 22  22 2c 26 38 30 30 36 31  |le%,23,"",&80061|
00002e60  35 39 29 0d 11 d0 23 e7  64 69 66 66 69 63 75 6c  |59)...#.difficul|
00002e70  74 79 25 3d 36 20 80 74  69 6d 65 72 25 3d 31 8c  |ty%=6 .timer%=1.|
00002e80  20 f2 72 6f 6c 6c 0d 11  da 21 f2 63 68 61 6e 67  | .roll...!.chang|
00002e90  65 77 69 6e 64 6f 77 73  69 7a 65 28 72 65 73 68  |ewindowsize(resh|
00002ea0  61 6e 64 6c 65 25 29 0d  11 e4 08 c8 97 20 ee 0d  |andle%)...... ..|
00002eb0  11 ee 0e c8 97 b8 39 30  30 2c 31 35 30 0d 11 f8  |......900,150...|
00002ec0  05 e1 0d 12 02 05 3a 0d  12 0c 34 dd f2 62 65 67  |......:...4..beg|
00002ed0  69 6e 3a c8 99 22 57 69  6d 70 5f 43 72 65 61 74  |in:.."Wimp_Creat|
00002ee0  65 4d 65 6e 75 22 2c 2c  2d 31 3a 24 6e 61 6d 65  |eMenu",,-1:$name|
00002ef0  25 3d 22 4e 6f 20 4e 61  6d 65 22 0d 12 16 0d 53  |%="No Name"....S|
00002f00  49 47 4e 24 3d 22 20 22  0d 12 20 27 24 61 63 63  |IGN$=" ".. '$acc|
00002f10  25 3d 22 20 30 22 3a f2  72 65 64 72 61 77 69 63  |%=" 0":.redrawic|
00002f20  6f 6e 28 63 68 61 6e 64  6c 65 25 2c 32 30 29 0d  |on(chandle%,20).|
00002f30  12 2a 2a 24 79 73 63 6f  72 65 25 3d 22 20 30 22  |.**$yscore%=" 0"|
00002f40  3a f2 72 65 64 72 61 77  69 63 6f 6e 28 63 68 61  |:.redrawicon(cha|
00002f50  6e 64 6c 65 25 2c 31 38  29 0d 12 34 2a 24 63 73  |ndle%,18)..4*$cs|
00002f60  63 6f 72 65 25 3d 22 20  30 22 3a f2 72 65 64 72  |core%=" 0":.redr|
00002f70  61 77 69 63 6f 6e 28 63  68 61 6e 64 6c 65 25 2c  |awicon(chandle%,|
00002f80  31 39 29 0d 12 3e 25 f2  73 65 74 69 63 6f 6e 28  |19)..>%.seticon(|
00002f90  63 68 61 6e 64 6c 65 25  2c 30 2c 22 22 2c 26 43  |chandle%,0,"",&C|
00002fa0  42 30 30 36 31 33 44 29  0d 12 48 25 f2 73 65 74  |B00613D)..H%.set|
00002fb0  69 63 6f 6e 28 63 68 61  6e 64 6c 65 25 2c 31 2c  |icon(chandle%,1,|
00002fc0  22 22 2c 26 43 42 30 30  36 31 33 44 29 0d 12 52  |"",&CB00613D)..R|
00002fd0  25 f2 73 65 74 69 63 6f  6e 28 63 68 61 6e 64 6c  |%.seticon(chandl|
00002fe0  65 25 2c 32 2c 22 22 2c  26 43 42 30 30 36 31 33  |e%,2,"",&CB00613|
00002ff0  44 29 0d 12 5c 21 f2 73  65 74 69 63 6f 6e 28 63  |D)..\!.seticon(c|
00003000  68 61 6e 64 6c 65 25 2c  33 32 2c 53 49 47 4e 24  |handle%,32,SIGN$|
00003010  2c 30 29 0d 12 66 1f f2  73 65 74 69 63 6f 6e 28  |,0)..f..seticon(|
00003020  63 68 61 6e 64 6c 65 25  2c 33 33 2c 22 3d 22 2c  |chandle%,33,"=",|
00003030  30 29 0d 12 70 05 e1 0d  12 7a 05 3a 0d 12 84 0d  |0)..p....z.:....|
00003040  dd f2 73 63 72 65 65 6e  3a 0d 12 8e 39 f2 73 65  |..screen:...9.se|
00003050  74 69 63 6f 6e 28 63 68  61 6e 64 6c 65 25 2c 32  |ticon(chandle%,2|
00003060  31 2c 58 24 2c 30 29 3a  f2 73 65 74 69 63 6f 6e  |1,X$,0):.seticon|
00003070  28 63 68 61 6e 64 6c 65  25 2c 32 32 2c 59 24 2c  |(chandle%,22,Y$,|
00003080  30 29 0d 12 98 21 f2 73  65 74 69 63 6f 6e 28 63  |0)...!.seticon(c|
00003090  68 61 6e 64 6c 65 25 2c  33 32 2c 53 49 47 4e 24  |handle%,32,SIGN$|
000030a0  2c 30 29 0d 12 a2 1f f2  73 65 74 69 63 6f 6e 28  |,0).....seticon(|
000030b0  63 68 61 6e 64 6c 65 25  2c 33 33 2c 22 3d 22 2c  |chandle%,33,"=",|
000030c0  30 29 0d 12 ac 05 e1 0d  12 b6 05 3a 0d 12 c0 0a  |0).........:....|
000030d0  dd f2 6b 65 79 31 0d 12  ca 13 e7 6b 65 79 25 3c  |..key1.....key%<|
000030e0  3e 31 33 20 8c 8d 44 7e  53 0d 12 d4 25 c8 99 22  |>13 ..D~S...%.."|
000030f0  57 69 6d 70 5f 47 65 74  43 61 72 65 74 50 6f 73  |Wimp_GetCaretPos|
00003100  69 74 69 6f 6e 22 2c 2c  62 6c 6f 63 6b 25 0d 12  |ition",,block%..|
00003110  de 20 69 63 6f 25 3d 62  6c 6f 63 6b 25 21 34 3a  |. ico%=block%!4:|
00003120  e7 20 69 63 6f 25 3d 2d  31 8c 8d 74 5c 53 0d 12  |. ico%=-1..t\S..|
00003130  e8 0d e7 69 63 6f 25 3d  32 34 8c 0d 12 f2 21 c8  |...ico%=24....!.|
00003140  99 22 57 69 6d 70 5f 53  65 74 43 61 72 65 74 50  |."Wimp_SetCaretP|
00003150  6f 73 69 74 69 6f 6e 22  2c 2c 2d 31 0d 12 fc 13  |osition",,-1....|
00003160  e7 24 6e 61 6d 65 25 3d  22 22 8c ef 37 3a cd 0d  |.$name%=""..7:..|
00003170  13 06 28 f2 73 65 74 69  63 6f 6e 28 63 68 61 6e  |..(.seticon(chan|
00003180  64 6c 65 25 2c 69 63 6f  25 2c 22 22 2c 26 31 37  |dle%,ico%,"",&17|
00003190  30 30 36 31 31 31 29 0d  13 10 24 f2 73 65 74 69  |006111)...$.seti|
000031a0  63 6f 6e 28 63 68 61 6e  64 6c 65 25 2c 32 35 2c  |con(chandle%,25,|
000031b0  22 63 73 74 61 72 74 22  2c 30 29 0d 13 1a 05 cd  |"cstart",0).....|
000031c0  0d 13 24 0d e7 69 63 6f  25 3d 32 33 8c 0d 13 2e  |..$..ico%=23....|
000031d0  18 e7 24 69 63 6f 33 32  25 3d 22 22 8c ef 37 3a  |..$ico32%=""..7:|
000031e0  e5 8d 44 74 53 0d 13 38  0b f2 63 68 6f 6f 73 65  |..DtS..8..choose|
000031f0  0d 13 42 18 e7 74 69 6d  65 72 25 3d 30 8c 6e 75  |..B..timer%=0.nu|
00003200  6d 62 65 72 25 2b 3d 31  0d 13 4c 15 e7 61 63 74  |mber%+=1..L..act|
00003210  69 76 65 25 3d 32 8c f2  64 72 61 77 31 0d 13 56  |ive%=2..draw1..V|
00003220  30 c8 99 22 57 69 6d 70  5f 53 65 74 43 61 72 65  |0.."Wimp_SetCare|
00003230  74 50 6f 73 69 74 69 6f  6e 22 2c 63 68 61 6e 64  |tPosition",chand|
00003240  6c 65 25 2c 32 33 2c 2c  2c 2d 31 2c 30 0d 13 60  |le%,23,,,-1,0..`|
00003250  25 f2 73 65 74 69 63 6f  6e 28 63 68 61 6e 64 6c  |%.seticon(chandl|
00003260  65 25 2c 32 2c 22 22 2c  26 31 30 30 30 36 31 33  |e%,2,"",&1000613|
00003270  44 29 0d 13 6a 15 f2 71  75 65 73 74 69 6f 6e 3a  |D)..j..question:|
00003280  f2 73 63 72 65 65 6e 0d  13 74 05 cd 0d 13 7e 0d  |.screen..t....~.|
00003290  e7 6b 65 79 25 3d 31 37  8c 0d 13 88 0b 71 75 69  |.key%=17.....qui|
000032a0  74 25 3d b9 0d 13 92 05  cd 0d 13 9c 05 e1 0d 13  |t%=.............|
000032b0  a6 05 3a 0d 13 b0 0d dd  f2 70 6f 69 6e 74 65 72  |..:......pointer|
000032c0  0d 13 ba 23 c8 99 22 57  69 6d 70 5f 47 65 74 50  |...#.."Wimp_GetP|
000032d0  6f 69 6e 74 65 72 49 6e  66 6f 22 2c 2c 62 6c 6f  |ointerInfo",,blo|
000032e0  63 6b 25 0d 13 c4 2f e7  62 6c 6f 63 6b 25 21 31  |ck%.../.block%!1|
000032f0  32 3d 63 68 61 6e 64 6c  65 25 8c c8 99 22 57 69  |2=chandle%..."Wi|
00003300  6d 70 5f 43 72 65 61 74  65 4d 65 6e 75 22 2c 2c  |mp_CreateMenu",,|
00003310  2d 31 0d 13 ce 05 e1 0d  13 d8 05 3a 0d 13 e2 0a  |-1.........:....|
00003320  dd f2 72 6f 6c 6c 0d 13  ec 0b e3 4e 3d 31 b8 31  |..roll.....N=1.1|
00003330  32 0d 13 f6 1d e7 bb 72  6f 6c 6c 24 28 4e 2c 32  |2......roll$(N,2|
00003340  29 3c 59 4f 28 54 29 2d  43 4f 28 54 29 8c 0d 14  |)<YO(T)-CO(T)...|
00003350  00 10 e3 4d 3d 31 32 b8  4e 2b 31 88 2d 31 0d 14  |...M=12.N+1.-1..|
00003360  0a 4b 72 6f 6c 6c 24 28  4d 2c 31 29 3d 72 6f 6c  |.Kroll$(M,1)=rol|
00003370  6c 24 28 4d 2d 31 2c 31  29 3a 72 6f 6c 6c 24 28  |l$(M-1,1):roll$(|
00003380  4d 2c 32 29 3d 72 6f 6c  6c 24 28 4d 2d 31 2c 32  |M,2)=roll$(M-1,2|
00003390  29 3a 72 6f 6c 6c 24 28  4d 2c 33 29 3d 72 6f 6c  |):roll$(M,3)=rol|
000033a0  6c 24 28 4d 2d 31 2c 33  29 0d 14 14 05 ed 0d 14  |l$(M-1,3).......|
000033b0  1e 47 72 6f 6c 6c 24 28  4e 2c 31 29 3d 6e 61 6d  |.Groll$(N,1)=nam|
000033c0  65 24 28 54 29 3a 72 6f  6c 6c 24 28 4e 2c 32 29  |e$(T):roll$(N,2)|
000033d0  3d c3 28 59 4f 28 54 29  2d 43 4f 28 54 29 29 3a  |=.(YO(T)-CO(T)):|
000033e0  72 6f 6c 6c 24 28 4e 2c  33 29 3d 64 61 74 65 24  |roll$(N,3)=date$|
000033f0  3a 4e 3d 31 32 0d 14 28  05 cd 0d 14 32 05 ed 0d  |:N=12..(....2...|
00003400  14 3c 05 e1 0d 14 46 05  3a 0d 14 50 3c dd a4 69  |.<....F.:..P<..i|
00003410  63 6f 6e 28 77 68 61 6e  64 6c 65 25 2c 69 78 25  |con(whandle%,ix%|
00003420  2c 69 79 25 2c 69 77 25  2c 69 68 25 2c 66 6c 61  |,iy%,iw%,ih%,fla|
00003430  67 25 2c 74 65 78 74 24  2c 64 31 25 2c 64 32 25  |g%,text$,d1%,d2%|
00003440  2c 64 33 25 29 0d 14 5a  15 62 6c 6f 63 6b 25 21  |,d3%)..Z.block%!|
00003450  30 3d 77 68 61 6e 64 6c  65 25 0d 14 64 1d 62 6c  |0=whandle%..d.bl|
00003460  6f 63 6b 25 21 34 3d 69  78 25 3a 62 6c 6f 63 6b  |ock%!4=ix%:block|
00003470  25 21 38 3d 69 79 25 0d  14 6e 15 62 6c 6f 63 6b  |%!8=iy%..n.block|
00003480  25 21 31 32 3d 69 78 25  2b 69 77 25 0d 14 78 15  |%!12=ix%+iw%..x.|
00003490  62 6c 6f 63 6b 25 21 31  36 3d 69 79 25 2b 69 68  |block%!16=iy%+ih|
000034a0  25 0d 14 82 13 62 6c 6f  63 6b 25 21 32 30 3d 66  |%....block%!20=f|
000034b0  6c 61 67 25 0d 14 8c 0d  e7 20 64 31 25 3d 30 20  |lag%..... d1%=0 |
000034c0  8c 0d 14 96 16 24 28 62  6c 6f 63 6b 25 2b 32 34  |.....$(block%+24|
000034d0  29 3d 74 65 78 74 24 0d  14 a0 05 cc 0d 14 aa 1f  |)=text$.........|
000034e0  62 6c 6f 63 6b 25 21 32  34 3d 64 31 25 3a 62 6c  |block%!24=d1%:bl|
000034f0  6f 63 6b 25 21 32 38 3d  64 32 25 0d 14 b4 11 62  |ock%!28=d2%....b|
00003500  6c 6f 63 6b 25 21 33 32  3d 64 33 25 0d 14 be 05  |lock%!32=d3%....|
00003510  cd 0d 14 c8 2a c8 99 22  57 69 6d 70 5f 43 72 65  |....*.."Wimp_Cre|
00003520  61 74 65 49 63 6f 6e 22  2c 2c 62 6c 6f 63 6b 25  |ateIcon",,block%|
00003530  20 b8 20 69 68 61 6e 64  6c 65 25 0d 14 d2 0d 3d  | . ihandle%....=|
00003540  69 68 61 6e 64 6c 65 25  0d 14 dc 45 2a 2a 2a 2a  |ihandle%...E****|
00003550  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00003560  2a 2a 2a 50 52 49 4e 54  20 52 4f 55 54 49 4e 45  |***PRINT ROUTINE|
00003570  53 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |S***************|
00003580  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 0d 14 e6  |*************...|
00003590  0c dd f2 64 65 66 69 6e  65 0d 14 f0 8a ef 32 3a  |...define.....2:|
000035a0  ef 31 2c 32 37 2c 31 2c  35 38 2c 31 2c 30 2c 31  |.1,27,1,58,1,0,1|
000035b0  2c 30 2c 31 2c 30 3a ef  31 2c 32 37 2c 31 2c 33  |,0,1,0:.1,27,1,3|
000035c0  38 2c 31 2c 30 2c 31 2c  32 34 36 2c 31 2c 32 34  |8,1,0,1,246,1,24|
000035d0  36 2c 31 2c 31 33 39 3a  ef 31 2c 31 36 2c 31 2c  |6,1,139:.1,16,1,|
000035e0  31 36 2c 31 2c 31 36 2c  31 2c 32 31 34 2c 31 2c  |16,1,16,1,214,1,|
000035f0  32 31 34 2c 31 2c 31 36  2c 31 2c 31 36 2c 31 2c  |214,1,16,1,16,1,|
00003600  31 36 2c 31 2c 30 2c 31  2c 30 2c 31 2c 30 3a ef  |16,1,0,1,0,1,0:.|
00003610  31 2c 32 37 2c 31 2c 33  37 2c 31 2c 31 2c 31 2c  |1,27,1,37,1,1,1,|
00003620  30 3a e1 0d 14 fa 3a dd  f2 6c 65 74 70 72 69 6e  |0:....:..letprin|
00003630  74 3a ef 32 3a f2 64 65  66 69 6e 65 3a ef 31 2c  |t:.2:.define:.1,|
00003640  32 37 2c 37 37 3a ef 31  2c 32 37 2c 31 2c 38 37  |27,77:.1,27,1,87|
00003650  2c 31 2c 31 3a ef 31 2c  32 37 2c 36 39 0d 15 04  |,1,1:.1,27,69...|
00003660  3f f1 8a 33 29 3b 3a ef  31 2c 32 37 2c 31 2c 34  |?..3);:.1,27,1,4|
00003670  35 2c 31 2c 31 3a f1 22  4e 61 6d 65 3a 22 3b 3a  |5,1,1:."Name:";:|
00003680  ef 31 2c 32 37 2c 31 2c  34 35 2c 31 2c 30 3a f1  |.1,27,1,45,1,0:.|
00003690  22 20 22 3b 6e 61 6d 65  24 28 54 29 0d 15 0e 39  |" ";name$(T)...9|
000036a0  ef 31 2c 31 30 3a f1 8a  33 29 3b 3a ef 31 2c 32  |.1,10:..3);:.1,2|
000036b0  37 2c 31 2c 34 35 2c 31  2c 31 3a f1 22 54 41 42  |7,1,45,1,1:."TAB|
000036c0  4c 45 3a 20 22 3b 3a ef  31 2c 32 37 2c 31 2c 34  |LE: ";:.1,27,1,4|
000036d0  35 2c 31 2c 30 0d 15 18  50 f1 22 20 22 3b 74 61  |5,1,0...P." ";ta|
000036e0  62 6c 65 25 28 54 29 3b  8a 32 33 29 3b 3a ef 31  |ble%(T);.23);:.1|
000036f0  2c 32 37 2c 31 2c 34 35  2c 31 2c 31 3a f1 22 4c  |,27,1,45,1,1:."L|
00003700  45 56 45 4c 3a 22 3b 3a  ef 31 2c 32 37 2c 31 2c  |EVEL:";:.1,27,1,|
00003710  34 35 2c 31 2c 30 3a f1  22 20 22 3b 6c 65 76 65  |45,1,0:." ";leve|
00003720  6c 25 28 54 29 0d 15 22  18 70 72 69 6e 74 74 69  |l%(T)..".printti|
00003730  6d 65 24 3d c1 91 24 2c  35 2c 31 31 29 0d 15 2c  |me$=..$,5,11)..,|
00003740  82 ef 31 2c 31 30 3a f1  8a 33 29 3b 3a ef 31 2c  |..1,10:..3);:.1,|
00003750  32 37 2c 31 2c 34 35 2c  31 2c 31 3a f1 22 54 49  |27,1,45,1,1:."TI|
00003760  4d 45 52 3a 22 3b 3a ef  31 2c 32 37 2c 31 2c 34  |MER:";:.1,27,1,4|
00003770  35 2c 31 2c 30 3a f1 22  20 22 3b 4f 24 28 54 29  |5,1,0:." ";O$(T)|
00003780  3b 8a 32 33 29 3b 3a 3a  ef 31 2c 32 37 2c 31 2c  |;.23);::.1,27,1,|
00003790  34 35 2c 31 2c 31 3a f1  22 44 41 54 45 3a 22 3b  |45,1,1:."DATE:";|
000037a0  3a ef 31 2c 32 37 2c 31  2c 34 35 2c 31 2c 30 3a  |:.1,27,1,45,1,0:|
000037b0  f1 22 20 22 3b 70 72 69  6e 74 74 69 6d 65 24 0d  |." ";printtime$.|
000037c0  15 36 68 ef 31 2c 31 30  3a f1 8a 33 29 3b 3a ef  |.6h.1,10:..3);:.|
000037d0  31 2c 32 37 2c 31 2c 34  35 2c 31 2c 31 3a ef 31  |1,27,1,45,1,1:.1|
000037e0  2c 31 30 3a f1 22 43 4f  52 52 45 43 54 20 41 4e  |,10:."CORRECT AN|
000037f0  53 57 45 52 53 3a 22 3a  ef 31 2c 32 37 2c 31 2c  |SWERS:":.1,27,1,|
00003800  34 35 2c 31 2c 30 3a ef  31 2c 31 30 3a e3 20 4e  |45,1,0:.1,10:. N|
00003810  3d 31 20 b8 59 4f 28 54  29 3a e7 59 4f 28 54 29  |=1 .YO(T):.YO(T)|
00003820  3d 30 8c 8d 44 4a 55 0d  15 40 1f 4c 24 3d 52 24  |=0..DJU..@.L$=R$|
00003830  28 54 2c 4e 29 3a f1 4e  3b 22 20 22 3b 3a f2 4c  |(T,N):.N;" ";:.L|
00003840  3a ef 31 2c 31 30 0d 15  4a 05 ed 0d 15 54 76 e7  |:.1,10..J....Tv.|
00003850  43 4f 28 54 29 3d 30 8c  f1 3a f1 20 8a 32 29 3b  |CO(T)=0..:. .2);|
00003860  3a ef 31 2c 32 37 2c 31  2c 34 35 2c 31 2c 31 3a  |:.1,27,1,45,1,1:|
00003870  f1 22 41 20 4c 20 4c 20  20 43 20 4f 20 52 20 52  |."A L L  C O R R|
00003880  20 45 20 43 20 54 20 21  20 2e 2e 2e 2e 45 20 58  | E C T ! ....E X|
00003890  20 43 20 45 20 4c 20 4c  20 45 20 4e 20 54 20 21  | C E L L E N T !|
000038a0  22 3a ef 31 2c 32 37 2c  31 2c 34 35 2c 31 2c 30  |":.1,27,1,45,1,0|
000038b0  3a ef 31 2c 31 30 3a ef  31 2c 31 32 3a ef 33 3a  |:.1,10:.1,12:.3:|
000038c0  e1 0d 15 5e 60 f1 8a 33  29 3b 3a ef 31 2c 32 37  |...^`..3);:.1,27|
000038d0  2c 31 2c 34 35 2c 31 2c  31 3a ef 31 2c 31 30 3a  |,1,45,1,1:.1,10:|
000038e0  f1 22 57 52 4f 4e 47 20  41 4e 53 57 45 52 53 3a  |."WRONG ANSWERS:|
000038f0  22 3a ef 31 2c 32 37 2c  31 2c 34 35 2c 31 2c 30  |":.1,27,1,45,1,0|
00003900  3a ef 31 2c 31 30 3a e3  20 4e 3d 31 20 b8 43 4f  |:.1,10:. N=1 .CO|
00003910  28 54 29 3a e7 43 4f 28  54 29 3d 30 8c 8d 44 72  |(T):.CO(T)=0..Dr|
00003920  55 0d 15 68 1f 4c 24 3d  57 24 28 54 2c 4e 29 3a  |U..h.L$=W$(T,N):|
00003930  f1 4e 3b 22 20 22 3b 3a  f2 4c 3a ef 31 2c 31 30  |.N;" ";:.L:.1,10|
00003940  0d 15 72 05 ed 0d 15 7c  6b f1 8a 35 29 3b 3a ef  |..r....|k..5);:.|
00003950  31 2c 32 37 2c 31 2c 34  35 2c 31 2c 31 3a f1 22  |1,27,1,45,1,1:."|
00003960  4e 6f 77 20 77 6f 72 6b  20 6f 75 74 20 74 68 65  |Now work out the|
00003970  20 63 6f 72 72 65 63 74  20 61 6e 73 77 65 72 73  | correct answers|
00003980  21 22 3a 3a ef 31 2c 32  37 2c 31 2c 34 35 2c 31  |!"::.1,27,1,45,1|
00003990  2c 30 3a ef 31 2c 31 30  3a ef 31 2c 32 37 2c 36  |,0:.1,10:.1,27,6|
000039a0  34 3a ef 31 2c 31 32 3a  ef 33 3a ef 32 36 3a e1  |4:.1,12:.3:.26:.|
000039b0  0d 15 86 34 dd f2 4c 3a  e3 4e 4e 3d 31 b8 a9 4c  |...4..L:.NN=1..L|
000039c0  24 3a 4c 4c 24 3d c1 4c  24 2c 4e 4e 2c 31 29 3a  |$:LL$=.L$,NN,1):|
000039d0  e7 20 4c 4c 24 3d bd 32  34 37 20 8c 4c 4c 24 3d  |. LL$=.247 .LL$=|
000039e0  bd 32 34 36 0d 15 90 0d  f1 4c 4c 24 3b 3a ed 3a  |.246.....LL$;:.:|
000039f0  e1 0d 15 9a 4a dd f2 63  6c 6f 73 65 77 69 6e 64  |....J..closewind|
00003a00  6f 77 28 68 61 6e 64 6c  65 25 29 3a 62 6c 6f 63  |ow(handle%):bloc|
00003a10  6b 25 21 30 3d 68 61 6e  64 6c 65 25 3a c8 99 22  |k%!0=handle%:.."|
00003a20  57 69 6d 70 5f 43 6c 6f  73 65 57 69 6e 64 6f 77  |Wimp_CloseWindow|
00003a30  22 2c 2c 62 6c 6f 63 6b  25 3a e1 0d 15 a4 16 dd  |",,block%:......|
00003a40  f2 64 72 61 67 62 6f 78  28 68 61 6e 64 6c 65 25  |.dragbox(handle%|
00003a50  29 0d 15 ae 13 21 62 6c  6f 63 6b 25 3d 68 61 6e  |)....!block%=han|
00003a60  64 6c 65 25 0d 15 b8 23  c8 99 22 57 69 6d 70 5f  |dle%...#.."Wimp_|
00003a70  47 65 74 57 69 6e 64 6f  77 53 74 61 74 65 22 2c  |GetWindowState",|
00003a80  2c 62 6c 6f 63 6b 25 0d  15 c2 1a 6f 78 25 3d 62  |,block%....ox%=b|
00003a90  6c 6f 63 6b 25 21 34 2d  62 6c 6f 63 6b 25 21 32  |lock%!4-block%!2|
00003aa0  30 0d 15 cc 1b 6f 79 25  3d 62 6c 6f 63 6b 25 21  |0....oy%=block%!|
00003ab0  31 36 2d 62 6c 6f 63 6b  25 21 32 34 0d 15 d6 13  |16-block%!24....|
00003ac0  62 6c 6f 63 6b 25 21 34  3d 69 63 6f 6e 6e 25 0d  |block%!4=iconn%.|
00003ad0  15 e0 21 c8 99 22 57 69  6d 70 5f 47 65 74 49 63  |..!.."Wimp_GetIc|
00003ae0  6f 6e 53 74 61 74 65 22  2c 2c 62 6c 6f 63 6b 25  |onState",,block%|
00003af0  0d 15 ea 13 21 62 6c 6f  63 6b 25 3d 68 61 6e 64  |....!block%=hand|
00003b00  6c 65 25 0d 15 f4 0e 62  6c 6f 63 6b 25 21 34 3d  |le%....block%!4=|
00003b10  35 0d 15 fe 19 62 6c 6f  63 6b 25 21 38 3d 6f 78  |5....block%!8=ox|
00003b20  25 2b 62 6c 6f 63 6b 25  21 38 0d 16 08 1b 62 6c  |%+block%!8....bl|
00003b30  6f 63 6b 25 21 31 32 3d  6f 79 25 2b 62 6c 6f 63  |ock%!12=oy%+bloc|
00003b40  6b 25 21 31 32 0d 16 12  1b 62 6c 6f 63 6b 25 21  |k%!12....block%!|
00003b50  31 36 3d 6f 78 25 2b 62  6c 6f 63 6b 25 21 31 36  |16=ox%+block%!16|
00003b60  0d 16 1c 1b 62 6c 6f 63  6b 25 21 32 30 3d 6f 79  |....block%!20=oy|
00003b70  25 2b 62 6c 6f 63 6b 25  21 32 30 0d 16 26 1b 62  |%+block%!20..&.b|
00003b80  6c 6f 63 6b 25 21 32 34  3d 30 3a 62 6c 6f 63 6b  |lock%!24=0:block|
00003b90  25 21 32 38 3d 30 0d 16  30 17 62 6c 6f 63 6b 25  |%!28=0..0.block%|
00003ba0  21 33 32 3d 26 37 46 46  46 46 46 46 46 0d 16 3a  |!32=&7FFFFFFF..:|
00003bb0  17 62 6c 6f 63 6b 25 21  33 36 3d 26 37 46 46 46  |.block%!36=&7FFF|
00003bc0  46 46 46 46 0d 16 44 1c  c8 99 22 57 69 6d 70 5f  |FFFF..D..."Wimp_|
00003bd0  44 72 61 67 42 6f 78 22  2c 2c 62 6c 6f 63 6b 25  |DragBox",,block%|
00003be0  0d 16 4e 05 e1 0d 16 58  16 dd f2 71 75 69 63 6b  |..N....X...quick|
00003bf0  73 61 76 65 28 6e 61 6d  65 24 29 0d 16 62 11 e7  |save(name$)..b..|
00003c00  a7 6e 61 6d 65 24 2c 22  2e 22 29 8c 0d 16 6c 39  |.name$,".")...l9|
00003c10  e7 68 61 6e 64 6c 65 25  3d 73 61 76 65 68 61 6e  |.handle%=savehan|
00003c20  64 6c 65 25 8c 74 79 70  65 25 3d 66 69 6c 65 74  |dle%.type%=filet|
00003c30  79 70 65 25 3a f2 73 61  76 65 66 69 6c 65 28 6e  |ype%:.savefile(n|
00003c40  61 6d 65 24 29 0d 16 76  05 cc 0d 16 80 40 f2 65  |ame$)..v.....@.e|
00003c50  72 72 6f 72 6d 28 22 20  20 20 54 6f 20 73 61 76  |rrorm("   To sav|
00003c60  65 2c 20 64 72 61 67 20  74 68 65 20 69 63 6f 6e  |e, drag the icon|
00003c70  20 74 6f 20 61 20 64 69  72 65 63 74 6f 72 79 20  | to a directory |
00003c80  76 69 65 77 65 72 22 2c  30 29 0d 16 8a 19 f2 64  |viewer",0).....d|
00003c90  69 72 77 69 6e 64 6f 77  28 31 2c 22 46 49 4c 45  |irwindow(1,"FILE|
00003ca0  53 22 29 0d 16 94 05 cd  0d 16 9e 05 e1 0d 16 a8  |S").............|
00003cb0  05 3a 0d 16 b2 22 dd f2  69 6e 69 74 69 61 74 65  |.:..."..initiate|
00003cc0  73 61 76 65 28 68 61 6e  64 6c 65 25 2c 69 63 6f  |save(handle%,ico|
00003cd0  6e 6e 25 29 0d 16 bc 1e  f2 69 63 6f 6e 73 74 61  |nn%).....iconsta|
00003ce0  74 65 28 68 61 6e 64 6c  65 25 2c 69 63 6f 6e 6e  |te(handle%,iconn|
00003cf0  25 29 0d 16 c6 3b e7 24  73 61 76 65 6e 61 6d 65  |%)...;.$savename|
00003d00  25 3d 22 22 8c f2 65 72  72 6f 72 6d 28 22 20 20  |%=""..errorm("  |
00003d10  20 20 20 54 79 70 65 20  69 6e 20 61 20 66 69 6c  |   Type in a fil|
00003d20  65 20 6e 61 6d 65 21 22  2c 30 29 3a e1 0d 16 d0  |e name!",0):....|
00003d30  23 c8 99 22 57 69 6d 70  5f 47 65 74 50 6f 69 6e  |#.."Wimp_GetPoin|
00003d40  74 65 72 49 6e 66 6f 22  2c 2c 62 6c 6f 63 6b 25  |terInfo",,block%|
00003d50  0d 16 da ca 62 6c 6f 63  6b 25 21 32 30 3d 62 6c  |....block%!20=bl|
00003d60  6f 63 6b 25 21 31 32 3a  62 6c 6f 63 6b 25 21 32  |ock%!12:block%!2|
00003d70  34 3d 62 6c 6f 63 6b 25  21 31 36 3a 62 6c 6f 63  |4=block%!16:bloc|
00003d80  6b 25 21 32 38 3d 62 6c  6f 63 6b 25 21 30 3a 62  |k%!28=block%!0:b|
00003d90  6c 6f 63 6b 25 21 33 32  3d 62 6c 6f 63 6b 25 21  |lock%!32=block%!|
00003da0  34 3a 62 6c 6f 63 6b 25  21 33 36 3d 32 35 35 3a  |4:block%!36=255:|
00003db0  62 6c 6f 63 6b 25 21 30  3d 36 34 3a 62 6c 6f 63  |block%!0=64:bloc|
00003dc0  6b 25 21 31 32 3d 30 3a  62 6c 6f 63 6b 25 21 31  |k%!12=0:block%!1|
00003dd0  36 3d 31 3a 62 6c 6f 63  6b 25 21 34 30 3d 66 69  |6=1:block%!40=fi|
00003de0  6c 65 74 79 70 65 25 3a  66 69 6c 65 24 3d 24 73  |letype%:file$=$s|
00003df0  61 76 65 6e 61 6d 65 25  3a 24 28 62 6c 6f 63 6b  |avename%:$(block|
00003e00  25 2b 34 34 29 3d a4 67  65 74 6c 65 61 66 28 24  |%+44)=.getleaf($|
00003e10  73 61 76 65 6e 61 6d 65  25 29 0d 16 e4 36 c8 99  |savename%)...6..|
00003e20  22 57 69 6d 70 5f 53 65  6e 64 4d 65 73 73 61 67  |"Wimp_SendMessag|
00003e30  65 22 2c 31 37 2c 62 6c  6f 63 6b 25 2c 62 6c 6f  |e",17,block%,blo|
00003e40  63 6b 25 21 32 30 2c 62  6c 6f 63 6b 25 21 32 34  |ck%!20,block%!24|
00003e50  0d 16 ee 05 e1 0d 16 f8  14 dd a4 67 65 74 6c 65  |...........getle|
00003e60  61 66 28 6e 61 6d 65 24  29 0d 17 02 11 c8 95 a7  |af(name$).......|
00003e70  6e 61 6d 65 24 2c 22 2e  22 29 0d 17 0c 1f 6e 61  |name$,".")....na|
00003e80  6d 65 24 3d c1 6e 61 6d  65 24 2c a7 6e 61 6d 65  |me$=.name$,.name|
00003e90  24 2c 22 2e 22 29 2b 31  29 0d 17 16 05 ce 0d 17  |$,".")+1).......|
00003ea0  20 0d 3d 6e 61 6d 65 24  2b bd 30 0d 17 2a 0e dd  | .=name$+.0..*..|
00003eb0  f2 64 61 74 61 73 61 76  65 0d 17 34 27 66 75 6c  |.datasave..4'ful|
00003ec0  6c 6e 61 6d 65 24 3d 22  22 3a 61 25 3d 30 3a 62  |lname$="":a%=0:b|
00003ed0  25 3d 62 6c 6f 63 6b 25  3f 28 34 34 2b 61 25 29  |%=block%?(44+a%)|
00003ee0  0d 17 3e 3d c8 95 62 25  3c 3e 30 3a 66 75 6c 6c  |..>=..b%<>0:full|
00003ef0  6e 61 6d 65 24 3d 66 75  6c 6c 6e 61 6d 65 24 2b  |name$=fullname$+|
00003f00  bd 62 25 3a 61 25 2b 3d  31 3a 62 25 3d 62 6c 6f  |.b%:a%+=1:b%=blo|
00003f10  63 6b 25 3f 28 34 34 2b  61 25 29 3a ce 0d 17 48  |ck%?(44+a%):...H|
00003f20  3c 6d 65 73 73 76 61 72  31 25 3d 62 6c 6f 63 6b  |<messvar1%=block|
00003f30  25 3a 6d 65 73 73 76 61  72 32 25 3d 62 6c 6f 63  |%:messvar2%=bloc|
00003f40  6b 25 21 32 30 3a 6d 65  73 73 76 61 72 33 25 3d  |k%!20:messvar3%=|
00003f50  62 6c 6f 63 6b 25 21 32  34 0d 17 52 05 e1 0d 17  |block%!24..R....|
00003f60  5c 12 dd f2 73 61 76 65  31 28 6e 61 6d 65 24 29  |\...save1(name$)|
00003f70  0d 17 66 14 f2 73 61 76  65 66 69 6c 65 28 6e 61  |..f..savefile(na|
00003f80  6d 65 24 29 0d 17 70 23  e7 62 6c 6f 63 6b 25 21  |me$)..p#.block%!|
00003f90  33 36 3e 2d 31 8c 20 24  73 61 76 65 6e 61 6d 65  |36>-1. $savename|
00003fa0  25 3d 6e 61 6d 65 24 0d  17 7a 16 62 6c 6f 63 6b  |%=name$..z.block|
00003fb0  25 21 31 32 3d 62 6c 6f  63 6b 25 21 38 0d 17 84  |%!12=block%!8...|
00003fc0  0f 62 6c 6f 63 6b 25 21  31 36 3d 33 0d 17 8e 0f  |.block%!16=3....|
00003fd0  21 62 6c 6f 63 6b 25 3d  32 35 36 0d 17 98 39 c8  |!block%=256...9.|
00003fe0  99 22 57 69 6d 70 5f 53  65 6e 64 4d 65 73 73 61  |."Wimp_SendMessa|
00003ff0  67 65 22 2c 31 38 2c 6d  65 73 73 76 61 72 31 25  |ge",18,messvar1%|
00004000  2c 6d 65 73 73 76 61 72  32 25 2c 6d 65 73 73 76  |,messvar2%,messv|
00004010  61 72 33 25 0d 17 a2 1b  c8 99 22 57 69 6d 70 5f  |ar3%......"Wimp_|
00004020  43 72 65 61 74 65 4d 65  6e 75 22 2c 2c 2d 31 0d  |CreateMenu",,-1.|
00004030  17 ac 05 e1 0d 17 b6 0d  dd f2 72 65 63 65 69 76  |..........receiv|
00004040  65 0d 17 c0 11 c8 8e 62  6c 6f 63 6b 25 21 31 36  |e......block%!16|
00004050  20 ca 0d 17 ca 0f c9 30  3a 20 71 75 69 74 25 3d  | ......0: quit%=|
00004060  b9 0d 17 d4 22 c9 32 3a  f2 64 61 74 61 73 61 76  |....".2:.datasav|
00004070  65 3a f2 73 61 76 65 31  28 66 75 6c 6c 6e 61 6d  |e:.save1(fullnam|
00004080  65 24 29 0d 17 de 05 cb  0d 17 e8 05 e1 0d 17 f2  |e$).............|
00004090  0d dd f2 6c 6f 61 64 61  63 6b 0d 17 fc 16 62 6c  |...loadack....bl|
000040a0  6f 63 6b 25 21 31 32 3d  62 6c 6f 63 6b 25 21 38  |ock%!12=block%!8|
000040b0  0d 18 06 0f 62 6c 6f 63  6b 25 21 31 36 3d 34 0d  |....block%!16=4.|
000040c0  18 10 2b c8 99 22 57 69  6d 70 5f 53 65 6e 64 4d  |..+.."Wimp_SendM|
000040d0  65 73 73 61 67 65 22 2c  31 37 2c 62 6c 6f 63 6b  |essage",17,block|
000040e0  25 2c 62 6c 6f 63 6b 25  21 34 0d 18 1a 05 e1 0d  |%,block%!4......|
000040f0  18 24 15 dd f2 73 61 76  65 66 69 6c 65 28 6e 61  |.$...savefile(na|
00004100  6d 65 24 29 0d 18 2e 23  70 6f 69 6e 74 65 72 25  |me$)...#pointer%|
00004110  3d 30 3a 70 72 69 6e 74  74 69 6d 65 24 3d c1 91  |=0:printtime$=..|
00004120  24 2c 35 2c 31 31 29 0d  18 38 38 73 74 6f 72 65  |$,5,11)..88store|
00004130  24 3d 22 4c 49 53 54 20  4f 46 20 50 55 50 49 4c  |$="LIST OF PUPIL|
00004140  53 22 2b c4 32 35 2c 22  20 22 29 2b 22 44 41 54  |S"+.25," ")+"DAT|
00004150  45 3a 20 22 2b 70 72 69  6e 74 74 69 6d 65 24 0d  |E: "+printtime$.|
00004160  18 42 3f e3 4c 3d 31 b8  a9 73 74 6f 72 65 24 3a  |.B?.L=1..store$:|
00004170  65 64 69 74 74 65 78 74  25 3f 70 6f 69 6e 74 65  |edittext%?pointe|
00004180  72 25 3d 97 c1 73 74 6f  72 65 24 2c 4c 2c 31 29  |r%=..store$,L,1)|
00004190  3a 70 6f 69 6e 74 65 72  25 2b 3d 31 3a ed 0d 18  |:pointer%+=1:...|
000041a0  4c 25 65 64 69 74 74 65  78 74 25 3f 70 6f 69 6e  |L%edittext%?poin|
000041b0  74 65 72 25 3d 31 30 3a  70 6f 69 6e 74 65 72 25  |ter%=10:pointer%|
000041c0  2b 3d 31 0d 18 56 60 73  74 6f 72 65 24 3d c4 35  |+=1..V`store$=.5|
000041d0  2c 22 20 22 29 2b 22 4e  41 4d 45 22 2b c4 31 33  |," ")+"NAME"+.13|
000041e0  2c 22 20 22 29 2b 22 54  41 42 4c 45 22 2b c4 31  |," ")+"TABLE"+.1|
000041f0  30 2c 22 20 22 29 2b 22  4c 45 56 45 4c 22 2b c4  |0," ")+"LEVEL"+.|
00004200  39 2c 22 20 22 29 2b 22  43 6f 72 72 65 63 74 5b  |9," ")+"Correct[|
00004210  25 5d 22 2b c4 36 2c 22  20 22 29 2b 22 54 49 4d  |%]"+.6," ")+"TIM|
00004220  45 52 22 0d 18 60 3f e3  4c 3d 31 b8 a9 73 74 6f  |ER"..`?.L=1..sto|
00004230  72 65 24 3a 65 64 69 74  74 65 78 74 25 3f 70 6f  |re$:edittext%?po|
00004240  69 6e 74 65 72 25 3d 97  c1 73 74 6f 72 65 24 2c  |inter%=..store$,|
00004250  4c 2c 31 29 3a 70 6f 69  6e 74 65 72 25 2b 3d 31  |L,1):pointer%+=1|
00004260  3a ed 0d 18 6a 25 65 64  69 74 74 65 78 74 25 3f  |:...j%edittext%?|
00004270  70 6f 69 6e 74 65 72 25  3d 31 30 3a 70 6f 69 6e  |pointer%=10:poin|
00004280  74 65 72 25 2b 3d 31 0d  18 74 0b e3 4e 3d 31 b8  |ter%+=1..t..N=1.|
00004290  54 3a 0d 18 7e 3a 73 74  6f 72 65 24 3d c4 32 2d  |T:..~:store$=.2-|
000042a0  a9 c3 4e 2c 22 20 22 29  2b c3 4e 2b 22 2e 20 22  |..N," ")+.N+". "|
000042b0  2b 6e 61 6d 65 24 28 4e  29 2b c4 32 30 2d a9 6e  |+name$(N)+.20-.n|
000042c0  61 6d 65 24 28 4e 29 2c  22 20 22 29 0d 18 88 29  |ame$(N)," ")...)|
000042d0  e7 74 61 62 6c 65 25 28  4e 29 3d 31 33 20 8c 54  |.table%(N)=13 .T|
000042e0  24 3d 22 41 4c 4c 22 8b  54 24 3d c3 74 61 62 6c  |$="ALL".T$=.tabl|
000042f0  65 25 28 4e 29 0d 18 92  3b 73 74 6f 72 65 24 2b  |e%(N)...;store$+|
00004300  3d 54 24 2b c4 31 35 2d  a9 54 24 2c 22 20 22 29  |=T$+.15-.T$," ")|
00004310  2b c3 6c 65 76 65 6c 25  28 4e 29 2b c4 31 34 2d  |+.level%(N)+.14-|
00004320  a9 c3 6c 65 76 65 6c 25  28 4e 29 2c 22 20 22 29  |..level%(N)," ")|
00004330  0d 18 9c 24 e7 20 59 4f  28 4e 29 3d 30 20 80 20  |...$. YO(N)=0 . |
00004340  43 4f 28 4e 29 3d 30 8c  70 65 72 25 3d 30 3a e5  |CO(N)=0.per%=0:.|
00004350  8d 74 70 58 0d 18 a6 23  70 65 72 25 3d a8 28 59  |.tpX...#per%=.(Y|
00004360  4f 28 4e 29 2f 28 59 4f  28 4e 29 2b 43 4f 28 4e  |O(N)/(YO(N)+CO(N|
00004370  29 29 2a 31 30 30 29 0d  18 b0 54 73 74 6f 72 65  |))*100)...Tstore|
00004380  24 2b 3d c3 70 65 72 25  2b 22 25 22 2b c4 33 2d  |$+=.per%+"%"+.3-|
00004390  a9 c3 28 70 65 72 25 29  2c 22 20 22 29 2b c4 31  |..(per%)," ")+.1|
000043a0  32 2d a9 4f 24 28 4e 29  2c 22 20 22 29 2b 4f 24  |2-.O$(N)," ")+O$|
000043b0  28 4e 29 2b bd 31 30 2b  22 49 74 65 6d 73 20 49  |(N)+.10+"Items I|
000043c0  6e 63 6f 72 72 65 63 74  3a 20 22 0d 18 ba 2a e3  |ncorrect: "...*.|
000043d0  4d 3d 31 b8 43 4f 28 4e  29 3a 73 74 6f 72 65 24  |M=1.CO(N):store$|
000043e0  3d 73 74 6f 72 65 24 2b  57 24 28 4e 2c 4d 29 2b  |=store$+W$(N,M)+|
000043f0  22 20 22 3a ed 0d 18 c4  3f e3 4c 3d 31 b8 a9 73  |" ":....?.L=1..s|
00004400  74 6f 72 65 24 3a 65 64  69 74 74 65 78 74 25 3f  |tore$:edittext%?|
00004410  70 6f 69 6e 74 65 72 25  3d 97 c1 73 74 6f 72 65  |pointer%=..store|
00004420  24 2c 4c 2c 31 29 3a 70  6f 69 6e 74 65 72 25 2b  |$,L,1):pointer%+|
00004430  3d 31 3a ed 0d 18 ce 25  65 64 69 74 74 65 78 74  |=1:....%edittext|
00004440  25 3f 70 6f 69 6e 74 65  72 25 3d 31 30 3a 70 6f  |%?pointer%=10:po|
00004450  69 6e 74 65 72 25 2b 3d  31 0d 18 d8 05 ed 0d 18  |inter%+=1.......|
00004460  e2 27 f2 73 61 76 65 74  65 78 74 28 6e 61 6d 65  |.'.savetext(name|
00004470  24 2c 65 64 69 74 74 65  78 74 25 2c 70 6f 69 6e  |$,edittext%,poin|
00004480  74 65 72 25 29 0d 18 ec  05 e1 0d 18 f6 24 dd f2  |ter%)........$..|
00004490  73 61 76 65 74 65 78 74  28 6e 61 6d 65 24 2c 73  |savetext(name$,s|
000044a0  74 61 72 74 25 2c 6c 65  6e 67 74 68 25 29 0d 19  |tart%,length%)..|
000044b0  00 34 c8 99 22 4f 53 5f  46 69 6c 65 22 2c 31 30  |.4.."OS_File",10|
000044c0  2c 6e 61 6d 65 24 2c 26  46 46 46 2c 2c 73 74 61  |,name$,&FFF,,sta|
000044d0  72 74 25 2c 73 74 61 72  74 25 2b 6c 65 6e 67 74  |rt%,start%+lengt|
000044e0  68 25 0d 19 0a 05 e1 0d  19 14 05 3a 0d 19 1e 0b  |h%.........:....|
000044f0  dd f2 73 65 74 75 70 0d  19 28 34 de 62 6c 6f 63  |..setup..(4.bloc|
00004500  6b 25 26 39 39 30 30 2c  69 62 6c 6f 63 6b 25 26  |k%&9900,iblock%&|
00004510  39 39 30 30 2c 6d 65 6e  75 31 25 26 31 30 30 2c  |9900,menu1%&100,|
00004520  6d 65 6e 75 32 25 20 26  31 30 30 0d 19 32 20 69  |menu2% &100..2 i|
00004530  65 6e 64 25 3d 69 62 6c  6f 63 6b 25 2b 26 31 30  |end%=iblock%+&10|
00004540  30 30 3a f2 64 69 72 6e  61 6d 65 0d 19 3c 37 de  |00:.dirname..<7.|
00004550  73 62 76 61 6c 25 31 30  3a 20 24 73 62 76 61 6c  |sbval%10: $sbval|
00004560  25 3d 22 41 7e 20 22 3a  de 6d 65 73 73 61 67 65  |%="A~ ":.message|
00004570  25 26 46 46 3a 24 6d 65  73 73 61 67 65 25 3d 22  |%&FF:$message%="|
00004580  22 3a 0d 19 46 6e de 79  73 63 6f 72 65 25 26 32  |":..Fn.yscore%&2|
00004590  30 2c 63 73 63 6f 72 65  25 26 32 30 2c 61 63 63  |0,cscore%&20,acc|
000045a0  25 26 32 30 2c 64 69 66  66 25 26 32 30 2c 20 74  |%&20,diff%&20, t|
000045b0  61 62 25 26 32 30 3a 24  79 73 63 6f 72 65 25 3d  |ab%&20:$yscore%=|
000045c0  22 22 3a 24 63 73 63 6f  72 65 25 3d 22 22 3a 24  |"":$cscore%="":$|
000045d0  61 63 63 25 3d 22 22 3a  24 64 69 66 66 25 3d 22  |acc%="":$diff%="|
000045e0  36 22 3a 24 74 61 62 25  3d 22 41 20 4c 20 4c 22  |6":$tab%="A L L"|
000045f0  0d 19 50 20 50 25 3d 30  3a 70 61 70 65 72 25 3d  |..P P%=0:paper%=|
00004600  32 35 3a 54 3d 30 3a 43  48 3d 30 3a 77 25 3d 30  |25:T=0:CH=0:w%=0|
00004610  0d 19 5a 69 de 43 48 24  28 33 35 29 3a de 20 52  |..Zi.CH$(35):. R|
00004620  24 28 33 35 2c 32 35 29  3a de 20 57 24 28 33 35  |$(35,25):. W$(35|
00004630  2c 32 35 29 3a de 6e 61  6d 65 24 28 33 35 29 3a  |,25):.name$(35):|
00004640  de 6c 65 76 65 6c 25 28  33 35 29 3a de 59 4f 28  |.level%(35):.YO(|
00004650  33 35 29 3a de 43 4f 28  33 35 29 3a de 4f 25 28  |35):.CO(35):.O%(|
00004660  33 35 29 3a de 20 4f 24  28 33 35 29 3a de 20 74  |35):. O$(35):. t|
00004670  61 62 6c 65 25 28 33 35  29 0d 19 64 75 64 69 66  |able%(35)..dudif|
00004680  66 69 63 75 6c 74 79 25  3d 36 3a 74 61 62 6c 65  |ficulty%=6:table|
00004690  25 3d 31 33 3a 74 69 6d  65 72 25 3d 31 3a 69 6e  |%=13:timer%=1:in|
000046a0  63 72 65 6d 65 6e 74 25  3d 31 30 30 3a 61 63 74  |crement%=100:act|
000046b0  69 76 65 25 3d 30 3a de  20 72 6f 6c 6c 24 28 31  |ive%=0:. roll$(1|
000046c0  33 2c 33 29 3a 6c 6f 67  6f 25 3d 31 3a 70 6f 69  |3,3):logo%=1:poi|
000046d0  6e 74 65 72 25 3d 30 3a  66 69 6c 65 74 79 70 65  |nter%=0:filetype|
000046e0  25 3d 26 46 46 46 3a 71  75 69 74 25 3d 30 0d 19  |%=&FFF:quit%=0..|
000046f0  6e 33 70 75 70 69 6c 25  3d 30 3a 67 72 6f 75 70  |n3pupil%=0:group|
00004700  25 3d 31 3a 72 65 73 70  6f 6e 73 65 25 3d 31 3a  |%=1:response%=1:|
00004710  53 49 47 4e 24 3d 22 22  3a 61 72 72 6f 77 25 3d  |SIGN$="":arrow%=|
00004720  31 0d 19 78 2f 58 24 3d  22 22 3a 59 24 3d 22 22  |1..x/X$="":Y$=""|
00004730  3a 64 61 74 65 24 3d c1  91 24 2c 35 2c a9 91 24  |:date$=..$,5,..$|
00004740  2d 31 33 29 3a f2 6c 6f  61 64 68 6f 6e 6f 75 72  |-13):.loadhonour|
00004750  0d 19 82 1b 73 70 72 69  74 65 24 3d 64 69 72 24  |....sprite$=dir$|
00004760  2b 22 2e 53 70 72 69 74  65 73 22 0d 19 8c 40 de  |+".Sprites"...@.|
00004770  65 64 69 74 74 65 78 74  25 26 34 30 30 30 3a 74  |edittext%&4000:t|
00004780  6f 67 67 6c 65 25 3d 30  3a de 20 66 6f 6e 74 25  |oggle%=0:. font%|
00004790  20 32 35 36 3a e3 66 25  3d 30 b8 32 35 35 3a 66  | 256:.f%=0.255:f|
000047a0  6f 6e 74 25 3f 66 25 3d  30 3a ed 0d 19 96 44 de  |ont%?f%=0:....D.|
000047b0  6e 61 6d 65 25 26 32 30  3a 24 6e 61 6d 65 25 3d  |name%&20:$name%=|
000047c0  22 4e 6f 20 4e 61 6d 65  22 3a de 73 61 76 65 6e  |"No Name":.saven|
000047d0  61 6d 65 25 26 46 46 3a  20 24 73 61 76 65 6e 61  |ame%&FF: $savena|
000047e0  6d 65 25 3d 22 47 72 6f  75 70 46 69 6c 65 22 0d  |me%="GroupFile".|
000047f0  19 a0 48 de 73 6e 61 6d  65 31 25 26 32 30 3a 24  |..H.sname1%&20:$|
00004800  73 6e 61 6d 65 31 25 3d  22 22 3a de 20 69 63 6f  |sname1%="":. ico|
00004810  33 32 25 20 26 31 30 3a  24 69 63 6f 33 32 25 3d  |32% &10:$ico32%=|
00004820  22 22 3a de 20 73 65 63  25 20 26 31 30 3a 20 24  |"":. sec% &10: $|
00004830  73 65 63 25 3d 22 22 0d  19 aa 19 de 73 70 25 20  |sec%="".....sp% |
00004840  26 46 46 3a 20 24 73 70  25 3d 22 6c 6f 67 31 22  |&FF: $sp%="log1"|
00004850  0d 19 b4 21 ef 32 33 2c  32 34 30 2c 30 2c 32 34  |...!.23,240,0,24|
00004860  2c 32 34 2c 30 2c 32 35  35 2c 30 2c 32 34 2c 32  |,24,0,255,0,24,2|
00004870  34 0d 19 be 05 e1 0d 19  c8 0d dd f2 70 72 6f 63  |4...........proc|
00004880  65 73 73 0d 19 d2 13 68  61 6e 64 6c 65 25 3d 21  |ess....handle%=!|
00004890  62 6c 6f 63 6b 25 0d 19  dc 12 6b 65 79 25 3d 62  |block%....key%=b|
000048a0  6c 6f 63 6b 25 21 32 34  0d 19 e6 14 e7 20 6b 65  |lock%!24..... ke|
000048b0  79 25 3d 31 33 8c 20 f2  6b 65 79 31 0d 19 f0 14  |y%=13. .key1....|
000048c0  e7 20 6b 65 79 25 3d 31  37 8c 20 f2 6b 65 79 31  |. key%=17. .key1|
000048d0  0d 19 fa 3a e7 20 6b 65  79 25 3c 33 32 20 84 20  |...:. key%<32 . |
000048e0  6b 65 79 25 3e 31 32 32  20 8c 20 c8 99 22 57 69  |key%>122 . .."Wi|
000048f0  6d 70 5f 50 72 6f 63 65  73 73 4b 65 79 22 2c 62  |mp_ProcessKey",b|
00004900  6c 6f 63 6b 25 21 32 34  3a e1 0d 1a 04 05 e1 0d  |lock%!24:.......|
00004910  1a 0e 05 3a 0d ff                                 |...:..|
00004916