Home » Archimedes archive » Acorn User » AU 1996-Xmas.adf » Extras » Camboard/!ComCon/!RunImage

Camboard/!ComCon/!RunImage

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

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

Tape/disk: Home » Archimedes archive » Acorn User » AU 1996-Xmas.adf » Extras
Filename: Camboard/!ComCon/!RunImage
Read OK:
File size: 51DD bytes
Load address: 0000
Exec address: 0000
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
   10 PROCinit
   20 :
   30 WHILE NOT quit%
   40 PROCpoll
   50 ENDWHILE
   60 PROCclosedown
   70 END
   80 :
   90 DEF PROCinit
  100 SYS "Hourglass_On"
  110 SYS "OS_Byte",129,0,255 TO ,os%
  120 CASE os% OF
  130 WHEN &A1,&A2,&A3:ERROR 1,"Requires RISC OS 3.10, or higher"
  140 ENDCASE
  150 TIME = 30000
  160 DIM bok% 16000,imenu% 300,mmenu% 300,dmenu% 300
  170 DIM bk% 5000
  180 ta%=0
  190 lk% = 0
  200 VOICES 2
  210 DIM trans% 16,rect% 16,plotat% 8
  220 DIM menuind% 1500, menuname% 11
  230 DIM ws1ind% 1500, ws1name% 11
  240 DIM ws2ind% 1500, ws2name% 11
  250 DIM infoind% 1000, infoname% 11
  260 DIM wscind% 1500, wscname% 11
  270 DIM ws3ind% 1500, ws3name% 11
  280 DIM ws4ind% 1500, ws4name% 11
  290 DIM ws5ind% 1500, ws5name% 11
  300 DIM ws6ind% 1500, ws6name% 11
  310 DIM ws7ind% 1500, ws7name% 11
  320 DIM ite1ind% 1500, ite1name% 11
  330 DIM ite2ind% 1500, ite2name% 11
  340 DIM comind% 1000, comname% 11
  350 DIM proind% 1000, proname% 11
  360 DIM p1ind% 1000, p1name% 11
  370 DIM p2ind% 1000, p2name% 11
  380 DIM p3ind% 1000, p3name% 11
  390 DIM p4ind% 1000, p4name% 11
  400 DIM p5ind% 1000, p5name% 11
  410 DIM b1ind% 1500, b1name% 11
  420 DIM nind% 1500, nname% 11
  430 DIM intind% 1500, intname% 11
  440 quit%=FALSE:app$="Computer Control"
  450 SYS "Wimp_Initialise",310,&4B534154,app$
  460 ON ERROR PROCerror(REPORT$+"at line"+STR$ERL)
  470 file%=OPENIN"<!ComCon$Dir>.Sprites"
  480 size%=EXT#file%+4:CLOSE#file%
  490 DIM sparea% size%
  500 !sparea%=size%:sparea%!8=16
  510 SYS "OS_SpriteOp",&10A,sparea%,"<!ComCon$Dir>.Sprites"
  520 SYS "Font_FindFont",,"Trinity.Bold",480,480 TO X1%
  530 SYS "Font_FindFont",,"Trinity.Bold",224,224 TO f3%
  540 SYS "Font_FindFont",,"Trinity.Bold",180,180 TO f2%
  550 SYS "Font_FindFont",,"Trinity.Medium",180,180 TO f1%
  560 SYS "Wimp_OpenTemplate",,"<Obey$Dir>.Templates"
  570 $b1name%="Box1"
  580 SYS "Wimp_LoadTemplate",,bok%,b1ind%,b1ind%+1500,+1,b1name%,0
  590 bok%!64=sparea%
  600 SYS "Wimp_CreateWindow",,bok% TO b1handle%
  610 $intname%="INT"
  620 SYS "Wimp_LoadTemplate",,bok%,intind%,intind%+2000,f3%,intname%,0
  630 bok%!64=sparea%
  640 SYS "Wimp_CreateWindow",,bok% TO inthandle%
  650 $menuname%="MENU"
  660 SYS "Wimp_LoadTemplate",,bok%,menuind%,menuind%+2000,X1%,menuname%,0
  670 bok%!64=sparea%
  680 SYS "Wimp_CreateWindow",,bok% TO menuhandle%
  690 $wscname%="WSC"
  700 SYS "Wimp_LoadTemplate",,bok%,wscind%,wscind%+1500,f3%,wscname%,0
  710 bok%!64=sparea%
  720 SYS "Wimp_CreateWindow",,bok% TO wschandle%
  730 $infoname%="Info"
  740 SYS "Wimp_LoadTemplate",,bok%,infoind%,infoind%+1500,+1,infoname%,0
  750 bok%!64=sparea%
  760 SYS "Wimp_CreateWindow",,bok% TO infohandle%
  770 $ws4name%="WS4"
  780 SYS "Wimp_LoadTemplate",,bok%,ws4ind%,ws4ind%+1500,f3%,ws4name%,0
  790 bok%!64=sparea%
  800 SYS "Wimp_CreateWindow",,bok% TO ws4handle%
  810 $ws5name%="WS5"
  820 SYS "Wimp_LoadTemplate",,bok%,ws5ind%,ws5ind%+1500,f3%,ws5name%,0
  830 bok%!64=sparea%
  840 SYS "Wimp_CreateWindow",,bok% TO ws5handle%
  850 SYS "Hourglass_Off"
  860 !bok%=menuhandle%
  870 SYS "Wimp_GetWindowState",,bok%
  880 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
  890 SYS "Wimp_CloseTemplate"
  900 ibhandle%=FNcreate_icon(-1,0,0,68,68,&3002,"!ComCon",0,0,0)
  910 RESTORE 2930:PROCsetupmenu(imenu%)
  920 RESTORE 2940:PROCsetupmenu(mmenu%)
  930 RESTORE 2950:PROCsetupmenu(dmenu%)
  940 ENDPROC
  950 :
  960 DEF PROCpoll
  970 SYS "Wimp_Poll",&1,bok% TO reason%
  980 CASE reason% OF
  990 WHEN 1:PROCredraw(!bok%)
 1000 WHEN 2:SYS "Wimp_OpenWindow",,bok%
 1010 WHEN 3:PROCwindow(bok%)
 1020 WHEN 4:PROCrestore_pointer
 1030 WHEN 5:PROCpointer_in(bok%!0)
 1040 WHEN 6:PROCclick(bok%!12)
 1050 WHEN 9:PROCmenuselect
 1060 WHEN 8:PROCkeypress(bok%!0,bok%!4,bok%!24)
 1070 WHEN 17,18:PROCreceive
 1080 ENDCASE
 1090 ENDPROC
 1100 :
 1110 DEF PROCreceive
 1120 CASE bok%!16 OF
 1130 WHEN 0:quit%=TRUE
 1140 ENDCASE
 1150 ENDPROC
 1160 :
 1170 DEF PROCclick(win%)
 1180 CASE win% OF
 1190 WHEN -2:PROCibar(bok%!8)
 1200 WHEN menuhandle%:CASE bok%!16 OF
 1210 WHEN 1:!bok%=menuhandle%
 1220 SYS "Wimp_CloseWindow",,bok%
 1230 !bok%=inthandle%
 1240 SYS "Wimp_GetWindowState",,bok%
 1250 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 1260 ENDCASE
 1270 WHEN inthandle%:CASE bok%!16 OF
 1280 WHEN 67:!bok%=inthandle%:bok%!4=67
 1290 SYS "Wimp_GetIconState",,bok%
 1300 po_name$=$bok%!32
 1310 IF po_name$="Sc_pof":sname$="c_pon":PROCput_icon_sprite(inthandle%,67,sname$):pname$="slon":PROCput_icon_sprite(inthandle%,68,pname$):SOUND 1,-15,15,2
 1320 IF po_name$="Sc_pon":sname$="c_pof":PROCput_icon_sprite(inthandle%,67,sname$):pname$="slof":PROCput_icon_sprite(inthandle%,68,pname$)
 1330 ENDIF
 1340 WHEN 74:!bok%=inthandle%
 1350 SYS "Wimp_CloseWindow",,bok%
 1360 !bok%=wschandle%
 1370 SYS "Wimp_GetWindowState",,bok%
 1380 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 1390 PROCclose_win
 1400 WHEN bok%!16<99:IF bok%!8 AND 2:PROCshowmenu(mmenu%,!bok%-64,bok%!4)
 1410 WHEN 72:!bok%=inthandle%
 1420 SYS "Wimp_CloseWindow",,bok%
 1430 !bok%=ws5handle%
 1440 SYS "Wimp_GetWindowState",,bok%
 1450 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 1460 PROCclose_win
 1470 ENDCASE
 1480 WHEN wschandle%:CASE bok%!16 OF
 1490 WHEN 82:sname$="c_swon":PROCput_icon_sprite(wschandle%,82,sname$):pname$="glon":PROCput_icon_sprite(wschandle%,14,pname$)
 1500 *CHANNELVOICE 2 2
 1510 SOUND 2,-15,5,1
 1520 sname$="c_swof":PROCput_icon_sprite(wschandle%,82,sname$):pname$="glof":PROCput_icon_sprite(wschandle%,14,pname$)
 1530 WHEN 81:!bok%=wschandle%:bok%!4=81
 1540 SYS "Wimp_GetIconState",,bok%
 1550 po_name$=$bok%!32
 1560 IF po_name$="Stilt_si" THEN
 1570 sname$="tilt_up":PROCput_icon_sprite(wschandle%,81,sname$)
 1580 pname$="glon":PROCput_icon_sprite(wschandle%,17,pname$)
 1590 *CHANNELVOICE 2 2
 1600 SOUND 2,-15,5,2
 1610 ENDIF
 1620 IF po_name$="Stilt_up" THEN
 1630 sname$="tilt_si":PROCput_icon_sprite(wschandle%,81,sname$)
 1640 pname$="glof":PROCput_icon_sprite(wschandle%,17,pname$)
 1650 ENDIF
 1660 WHEN 80:!bok%=wschandle%
 1670 SYS "Wimp_CloseWindow",,bok%
 1680 !bok%=inthandle%
 1690 SYS "Wimp_GetWindowState",,bok%
 1700 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 1710 PROCclose_win
 1720 WHEN 1:!bok%=wschandle%
 1730 SYS "Wimp_CloseWindow",,bok%
 1740 !bok%=inthandle%
 1750 SYS "Wimp_GetWindowState",,bok%
 1760 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 1770 PROCclose_win
 1780 WHEN 73:!bok%=wschandle%
 1790 SYS "Wimp_CloseWindow",,bok%
 1800 !bok%=inthandle%
 1810 SYS "Wimp_GetWindowState",,bok%
 1820 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 1830 PROCclose_win
 1840 WHEN 74:!bok%=wschandle%
 1850 SYS "Wimp_CloseWindow",,bok%
 1860 !bok%=ws4handle%
 1870 SYS "Wimp_GetWindowState",,bok%
 1880 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 1890 PROCclose_win
 1900 WHEN 72:!bok%=wschandle%
 1910 SYS "Wimp_CloseWindow",,bok%
 1920 !bok%=ws5handle%
 1930 SYS "Wimp_GetWindowState",,bok%
 1940 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 1950 PROCclose_win
 1960 WHEN bok%!16<99:IF bok%!8 AND 2:PROCshowmenu(mmenu%,!bok%-64,bok%!4)
 1970 ENDCASE
 1980 WHEN ws4handle%:CASE bok%!16 OF
 1990 WHEN 10:!bok%=b1handle%
 2000 SYS "Wimp_GetWindowState",,bok%
 2010 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 2020 WHEN 4:!bok%=ws4handle%
 2030 SYS "Wimp_CloseWindow",,bok%
 2040 !bok%=ws5handle%
 2050 SYS "Wimp_GetWindowState",,bok%
 2060 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 2070 PROCclose_win
 2080 WHEN 1:!bok%=ws4handle%
 2090 SYS "Wimp_CloseWindow",,bok%
 2100 !bok%=wschandle%
 2110 SYS "Wimp_GetWindowState",,bok%
 2120 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 2130 PROCclose_win
 2140 WHEN 0:!bok%=ws4handle%
 2150 SYS "Wimp_CloseWindow",,bok%
 2160 !bok%=inthandle%
 2170 SYS "Wimp_GetWindowState",,bok%
 2180 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 2190 PROCclose_win
 2200 WHEN 3:!bok%=ws4handle%
 2210 SYS "Wimp_CloseWindow",,bok%
 2220 !bok%=ws5handle%
 2230 SYS "Wimp_GetWindowState",,bok%
 2240 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 2250 PROCclose_win
 2260 WHEN bok%!16<99: IF bok%!8 AND 2:PROCshowmenu(mmenu%,!bok%-64,bok%!4)
 2270 ENDCASE
 2280 ENDIF
 2290 WHEN ws5handle%:CASE bok%!16 OF
 2300 WHEN 0:!bok%=ws5handle%
 2310 SYS "Wimp_CloseWindow",,bok%
 2320 !bok%=inthandle%
 2330 SYS "Wimp_GetWindowState",,bok%
 2340 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 2350 WHEN 1:!bok%=ws5handle%
 2360 SYS "Wimp_CloseWindow",,bok%
 2370 !bok%=ws4handle%
 2380 SYS "Wimp_GetWindowState",,bok%
 2390 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 2400 PROCclose_win
 2410 WHEN bok%!16<99:IF bok%!8 AND 2:PROCshowmenu(mmenu%,!bok%-64,bok%!4)
 2420 ENDIF
 2430 ENDIF
 2440 ENDCASE
 2450 ENDCASE
 2460 ENDPROC
 2470 :
 2480 DEF FNcreate_icon(whan%,ix%,iy%,iw%,ih%,flag%,text$,ptr1%,ptr2%,ptr3%)
 2490 !bok%=whan%
 2500 bok%!4=ix%
 2510 bok%!8=iy%
 2520 bok%!12=ix%+iw%
 2530 bok%!16=iy%+ih%
 2540 bok%!20=flag%
 2550 IF ptr1%=0 THEN
 2560 $(bok%+24)=text$
 2570 ELSE
 2580 bok%!24=ptr1%
 2590 bok%!28=ptr2%
 2600 bok%!32=ptr3%
 2610 ENDIF
 2620 SYS "Wimp_CreateIcon",,bok% TO ibhandle%
 2630=ibhandle%
 2640 :
 2650 DEF PROCibar(button%)
 2660 CASE button% OF
 2670 WHEN 2:PROCshowmenu(imenu%,!bok%-64,228)
 2680 WHEN 1,4:!bok%=menuhandle%
 2690 SYS "Wimp_GetWindowState",,bok%
 2700 bok%!28=-1:SYS "Wimp_OpenWindow",,bok%
 2710 ENDCASE
 2720 ENDPROC
 2730 :
 2740 DEFPROCsetupmenu(menu%)
 2750 READ title$,num%:$menu%=title$
 2760 width%=(LEN(title$)-2)*16
 2770 menu%!12=&00070207:menu%!20=44:menu%!24=0
 2780 ptr%=menu%+28:FOR i%=1 TO num%
 2790 READ mflags%,subptr%,item$
 2800 !ptr%=mflags%:ptr%!4=subptr%
 2810 ptr%!8=&7000021:$(ptr%+12)=item$
 2820 a%=(LEN(item$)+1)*16
 2830 IF a%>width% width%=a%
 2840 ptr%+=24:NEXT
 2850 menu%!16=width%
 2860 ENDPROC
 2870 :
 2880 DEF PROCshowmenu(menu%,mx%,my%)
 2890 menuopen%=menu%
 2900 SYS "Wimp_CreateMenu",,menu%,mx%,my%
 2910 ENDPROC
 2920 :
 2930 DATA Control,2,0,infohandle%,Info,&80,-1,Quit
 2940 DATA Control,4,0,infohandle%,Info,0,dmenu%,Components,0,-1,Commands,&80,-1,Print
 2950 DATA Components,6,0,-1,Push swi.,0,-1,Proximity,&02,-1,Tilt,0,-1,Buzzer,0,-1,Motor,&80,-1,Bulb
 2960 :
 2970 DEF PROCmenuselect
 2980 sel1%=!bok%:sel2%=bok%!4
 2990 SYS "Wimp_GetPointerInfo",,bok%
 3000 button%=bok%!8
 3010 CASE menuopen% OF
 3020 WHEN imenu%:CASE sel1% OF
 3030 WHEN 1:PROCclosedown
 3040 ENDCASE
 3050 ENDCASE
 3060 ENDPROC
 3070 :
 3080 DEF PROCkeypress(window_handle%,icon_handle%,key%)
 3090 CASE key% OF
 3100 WHEN 13:PROCplace_caret(window_handle%,icon_handle%)
 3110 OTHERWISE:SYS "Wimp_ProcessKey",key%
 3120 ENDCASE
 3130 ENDPROC
 3140 :
 3150 DEFPROCplace_caret(window_handle%,icon_handle%)
 3160 CASE bok%!0 OF
 3170 WHEN ws4handle%:PROCws4_answer(window_handle%,icon_handle%)
 3180 ENDCASE
 3190 ENDPROC
 3200 :
 3210 DEF PROCws4_answer(window_handle%,icon_handle%)
 3220 CASE icon_handle% OF
 3230 WHEN 8:anshle%=8
 3240 !bok%=window_handle%:bok%!4=anshle%
 3250 SYS "Wimp_GetIconState",,bok%
 3260 text11$=$(bok%!28)
 3270 IF text11$="SWITCH ON 7" THEN
 3280 PROCicon_col(ws4handle%,8,9)
 3290 sname$="llon":PROCput_icon_sprite(b1handle%,36,sname$)
 3300 ELSE
 3310 PROCreport("We need to switch on line 7 !",18)
 3320 ENDIF
 3330 PROCicon_col(ws4handle%,8,0)
 3340 SYS "Wimp_SetCaretPosition",window_handle%,9,0,0,-1,0
 3350 WHEN 9:anshle%=9
 3360 !bok%=window_handle%:bok%!4=anshle%
 3370 SYS "Wimp_GetIconState",,bok%
 3380 text12$=$(bok%!28)
 3390 IF text12$="SWITCH ON 1,4,8" THEN
 3400 PROCicon_col(ws4handle%,9,9)
 3410 sname$="llon":PROCput_icon_sprite(b1handle%,42,sname$)
 3420 sname$="llon":PROCput_icon_sprite(b1handle%,39,sname$)
 3430 sname$="llon":PROCput_icon_sprite(b1handle%,35,sname$)
 3440 ELSE
 3450 PROCreport("We need to switch on lines 1,4,8 !",18)
 3460 ENDIF
 3470 PROCicon_col(ws4handle%,9,0)
 3480 SYS "Wimp_SetCaretPosition",window_handle%,6,0,0,-1,0
 3490 WHEN 6:anshle%=6
 3500 !bok%=window_handle%:bok%!4=anshle%
 3510 SYS "Wimp_GetIconState",,bok%
 3520 text13$=$(bok%!28)
 3530 IF text13$="SWITCH OFF 1,4,7,8" THEN
 3540 PROCicon_col(ws4handle%,6,9)
 3550 sname$="llof":PROCput_icon_sprite(b1handle%,42,sname$)
 3560 sname$="llof":PROCput_icon_sprite(b1handle%,39,sname$)
 3570 sname$="llof":PROCput_icon_sprite(b1handle%,36,sname$)
 3580 sname$="llof":PROCput_icon_sprite(b1handle%,35,sname$)
 3590 ELSE
 3600 PROCreport("We need to switch off lines 1,4,7,8 !",18)
 3610 ENDIF
 3620 PROCicon_col(ws4handle%,6,0)
 3630 SYS "Wimp_SetCaretPosition",window_handle%,5,0,0,-1,0
 3640 ENDIF
 3650 WHEN 5:anshle%=5
 3660 !bok%=window_handle%:bok%!4=anshle%
 3670 SYS "Wimp_GetIconState",,bok%
 3680 text14$=$(bok%!28)
 3690 IF text14$="SWITCH ON 1 TO 8" THEN
 3700 PROCicon_col(ws4handle%,5,9)
 3710 sname$="llon":PROCput_icon_sprite(b1handle%,42,sname$)
 3720 sname$="llon":PROCput_icon_sprite(b1handle%,41,sname$)
 3730 sname$="llon":PROCput_icon_sprite(b1handle%,40,sname$)
 3740 sname$="llon":PROCput_icon_sprite(b1handle%,39,sname$)
 3750 sname$="llon":PROCput_icon_sprite(b1handle%,38,sname$)
 3760 sname$="c_bulbon":PROCput_icon_sprite(b1handle%,70,sname$)
 3770 sname$="llon":PROCput_icon_sprite(b1handle%,37,sname$)
 3780 sname$="llon":PROCput_icon_sprite(b1handle%,36,sname$)
 3790 sname$="llon":PROCput_icon_sprite(b1handle%,35,sname$)
 3800 ELSE
 3810 PROCreport("We need to switch on lines 1 to 8 !",18)
 3820 ENDIF
 3830 PROCicon_col(ws4handle%,5,0)
 3840 SYS "Wimp_SetCaretPosition",window_handle%,7,0,0,-1,0
 3850 WHEN 7:anshle%=7
 3860 !bok%=window_handle%:bok%!4=anshle%
 3870 SYS "Wimp_GetIconState",,bok%
 3880 text15$=$(bok%!28)
 3890 IF text15$="SWITCH OFF 1 TO 8" THEN
 3900 PROCicon_col(ws4handle%,7,9)
 3910 sname$="llof":PROCput_icon_sprite(b1handle%,42,sname$)
 3920 sname$="llof":PROCput_icon_sprite(b1handle%,41,sname$)
 3930 sname$="llof":PROCput_icon_sprite(b1handle%,40,sname$)
 3940 sname$="llof":PROCput_icon_sprite(b1handle%,39,sname$)
 3950 sname$="llof":PROCput_icon_sprite(b1handle%,38,sname$)
 3960 sname$="c_bulbof":PROCput_icon_sprite(b1handle%,70,sname$)
 3970 sname$="llof":PROCput_icon_sprite(b1handle%,37,sname$)
 3980 sname$="llof":PROCput_icon_sprite(b1handle%,36,sname$)
 3990 sname$="llof":PROCput_icon_sprite(b1handle%,35,sname$)
 4000 PROCicon_col(ws4handle%,7,0)
 4010 ELSE
 4020 PROCreport("We need to switch off lines 1 to 8 !",18)
 4030 ENDIF
 4040 SYS "Wimp_SetCaretPosition",window_handle%,7,0,0,-1,0
 4050 ENDIF
 4060 ENDCASE
 4070 ENDPROC
 4080 :
 4090 DEF PROCreport(err$,flag%)
 4100 name$=app$
 4110 IF flag% AND 16 THEN name$="Message from " +name$
 4120 !bok%=255
 4130 $(bok%+4)=err$+CHR$0
 4140 SYS "Wimp_ReportError",bok%,flag%,name$ TO ,errclock%
 4150 ENDPROC
 4160 :
 4170 DEF PROCerror(a$)
 4180 PROCreport(a$,1)
 4190 PROCrestore_pointer
 4200 SYS "Wimp_CloseDown"
 4210 END
 4220 ENDPROC
 4230 :
 4240 DEF PROCredraw(window_handle%)
 4250 CASE window_handle% OF
 4260 WHEN ws4handle%:PROCl4draw
 4270 WHEN ws5handle%:PROCl5draw
 4280 WHEN inthandle%:PROCl21draw
 4290 WHEN menuhandle%:PROCl11draw
 4300 WHEN wschandle%:PROCwscdraw
 4310 ENDCASE
 4320 ENDCASE
 4330 ENDPROC
 4340 :
 4350 DEF PROCwscdraw
 4360 SYS "Wimp_RedrawWindow",,bok% TO more%
 4370 ox%=bok%!4-bok%!20
 4380 oy%=bok%!16-bok%!24
 4390 WHILE more%
 4400 SYS "Wimp_SetFontColours",,1,7
 4410 SYS "Font_SetFont",f3%
 4420 SYS "Font_Paint",,"The components are connected to the control box by  ",16,ox%+35,oy%-50
 4430 SYS "Font_Paint",,"leads which have a plug on the end of each wire.",16,ox%+35,oy%-95
 4440 SYS "Font_Paint",,"The plug goes into the socket on the box.",16,ox%+35,oy%-140
 4450 SYS "Wimp_SetFontColours",,1,8
 4460 SYS "Font_Paint",,"Input",16,ox%+35,oy%-242
 4470 SYS "Font_Paint",,"components",16,ox%+35,oy%-287
 4480 SYS "Font_Paint",,"Output",16,ox%+1030,oy%-130
 4490 SYS "Font_Paint",,"components",16,ox%+1030,oy%-178
 4500 SYS "Wimp_SetFontColours",,1,7
 4510 SYS "Font_Paint",,"Buzzer",16,ox%+1086,oy%-496
 4520 SYS "Font_Paint",,"Bulb",16,ox%+1088,oy%-712
 4530 SYS "Font_Paint",,"Tilt switch",16,ox%+35,oy%-674
 4540 SYS "Font_Paint",,"Push switch",16,ox%+35,oy%-480
 4550 SYS "Wimp_SetFontColours",,1,11
 4560 SYS "Font_Paint",,"Click on input components, to make them work.",16,ox%+35,oy%-760
 4570 SYS "Wimp_GetRectangle",,bok% TO more%
 4580 ENDWHILE
 4590 ENDPROC
 4600 :
 4610 DEF PROCl4draw
 4620 SYS "Wimp_RedrawWindow",,bok% TO more%
 4630 ox%=bok%!4-bok%!20
 4640 oy%=bok%!16-bok%!24
 4650 WHILE more%
 4660 SYS "Wimp_SetFontColours",,1,7
 4670 SYS "Font_SetFont",f3%
 4680 SYS "Font_Paint",,"Open the control box window.",16,ox%+35,oy%-50
 4690 SYS "Font_Paint",,"If you now type in",16,ox%+35,oy%-95
 4700 SYS "Font_Paint",,"output line 7 will switch on.",16,ox%+802,oy%-95
 4710 SYS "Wimp_SetFontColours",,1,11
 4720 SYS "Font_Paint",,"SWITCH ON 7",16,ox%+312,oy%-95
 4730 SYS "Wimp_SetFontColours",,1,7
 4740 SYS "Font_Paint",,"Now try this.",16,ox%+35,oy%-140
 4750 SYS "Wimp_SetFontColours",,1,11
 4760 SYS "Font_Paint",,"SWITCH ON 1,4,8",16,ox%+234,oy%-140
 4770 SYS "Wimp_SetFontColours",,1,7
 4780 SYS "Font_Paint",,"Output lines 1, 4 and 8 are switched on.",16,ox%+35,oy%-185
 4790 SYS "Font_Paint",,"With the output lines switched on, you will need to switch them off.",16,ox%+35,oy%-230
 4800 SYS "Font_Paint",,"To do this type in",16,ox%+35,oy%-275
 4810 SYS "Wimp_SetFontColours",,1,11
 4820 SYS "Font_Paint",,"SWITCH OFF 1,4,7,8",16,ox%+302,oy%-275
 4830 SYS "Wimp_SetFontColours",,1,7
 4840 SYS "Font_Paint",,"The red l.e.d next to lines 1, 4, 7 and 8 will be unlit i.e. off. But the bulb",16,ox%+35,oy%-320
 4850 SYS "Font_Paint",,"is still on !.You have now learnt how to program the computer to turn  ",16,ox%+35,oy%-365
 4860 SYS "Font_Paint",,"components on or off. Well done!",16,ox%+35,oy%-410
 4870 SYS "Font_Paint",,"We mentioned earlier that you could use different numbers from 1 to 8.",16,ox%+35,oy%-455
 4880 SYS "Font_Paint",,"We used the word to.This is a command word but needs to be typed ",16,ox%+35,oy%-500
 4890 SYS "Font_Paint",,"in capitals. The ",16,ox%+35,oy%-545
 4900 SYS "Font_Paint",,"command saves us time when we need to make a ",16,ox%+330,oy%-545
 4910 SYS "Wimp_SetFontColours",,1,11
 4920 SYS "Font_Paint",,"TO",16,ox%+270,oy%-545
 4930 SYS "Wimp_SetFontColours",,1,7
 4940 SYS "Font_Paint",,"whole group of output lines switch on or off altogether.",16,ox%+35,oy%-590
 4950 SYS "Font_Paint",,"Try this command line. ",16,ox%+35,oy%-635
 4960 SYS "Wimp_SetFontColours",,1,11
 4970 SYS "Font_Paint",,"SWITCH ON 1 TO 8",16,ox%+390,oy%-635
 4980 SYS "Wimp_SetFontColours",,1,7
 4990 SYS "Font_Paint",,"All the l.e.d's will be lit up on the output lines of the control box.",16,ox%+35,oy%-680
 5000 SYS "Font_Paint",,"Switching all of these off is simple! Just type in",16,ox%+35,oy%-725
 5010 SYS "Wimp_SetFontColours",,1,11
 5020 SYS "Font_Paint",,"SWITCH OFF 1 TO 8",16,ox%+35,oy%-770
 5030 SYS "Wimp_GetRectangle",,bok% TO more%
 5040 ENDWHILE
 5050 ENDPROC
 5060 :
 5070 DEF PROCl5draw
 5080 SYS "Wimp_RedrawWindow",,bok% TO more%
 5090 ox%=bok%!4-bok%!20
 5100 oy%=bok%!16-bok%!24
 5110 WHILE more%
 5120 SYS "Wimp_SetFontColours",,1,7
 5130 SYS "Font_SetFont",f3%
 5140 SYS "Font_Paint",,"Simple Control is the user friendly program for learning about control.",16,ox%+75,oy%-50
 5150 SYS "Font_Paint",,"Simple Control comes with four programs -",16,ox%+75,oy%-95
 5160 SYS "Font_Paint",,"Direct Control - Point and click control with inputs, ",16,ox%+75,oy%-140
 5170 SYS "Font_Paint",,"outputs and control box windows.",16,ox%+75,oy%-185
 5180 SYS "Font_Paint",,"Computer Control - Introduces programming the computer with",16,ox%+75,oy%-230
 5190 SYS "Font_Paint",,"LOGO style commands which interact with the simulated control box.",16,ox%+75,oy%-275
 5200 SYS "Font_Paint",,"Buggy - The control box is used to control a",16,ox%+75,oy%-320
 5210 SYS "Font_Paint",," simulated buggy.",16,ox%+75,oy%-365
 5220 SYS "Font_Paint",,"Control Simulations - Several examples of control systems.",16,ox%+75,oy%-410
 5230 SYS "Font_Paint",,"",16,ox%+200,oy%-410
 5240 SYS "Wimp_GetRectangle",,bok% TO more%
 5250 ENDWHILE
 5260 ENDPROC
 5270 :
 5280 DEF PROCl11draw
 5290 SYS "Wimp_RedrawWindow",,bok% TO more%
 5300 ox%=bok%!4-bok%!20
 5310 oy%=bok%!16-bok%!24
 5320 WHILE more%
 5330 SYS "Wimp_SetFontColours",,1,8
 5340 SYS "Font_SetFont",X1%
 5350 SYS "Font_Paint",,"Computer Control (Demo)",16,ox%+218,oy%-95
 5360 SYS "Wimp_SetFontColours",,1,7
 5370 SYS "Font_SetFont",f3%
 5380 SYS "Font_Paint",,"Click on icon to start",16,ox%+762,oy%-760
 5390 SYS "Font_Paint",,"A module from Simple Control",16,ox%+380,oy%-150
 5400 SYS "Wimp_GetRectangle",,bok% TO more%
 5410 ENDWHILE
 5420 ENDPROC
 5430 :
 5440 DEF PROCl21draw
 5450 SYS "Wimp_RedrawWindow",,bok% TO more%
 5460 ox%=bok%!4-bok%!20
 5470 oy%=bok%!16-bok%!24
 5480 WHILE more%
 5490 SYS "Wimp_SetFontColours",,1,7
 5500 SYS "Font_SetFont",f3%
 5510 SYS "Font_Paint",,"Our computer         controls components through a control box. ",16,ox%+35,oy%-50
 5520 SYS "Font_Paint",,"The control box is a special piece of equipment connected to the computer.",16,ox%+35,oy%-95
 5530 SYS "Wimp_SetFontColours",,1,8
 5540 SYS "Font_Paint",,"Mains lead",16,ox%+35,oy%-178
 5550 SYS "Font_Paint",,"To computer",16,ox%+1030,oy%-178
 5560 SYS "Wimp_SetFontColours",,1,7
 5570 SYS "Font_Paint",,"This lead",16,ox%+1030,oy%-305
 5580 SYS "Font_Paint",,"connects the",16,ox%+1030,oy%-350
 5590 SYS "Font_Paint",,"control box",16,ox%+1030,oy%-395
 5600 SYS "Font_Paint",,"to the",16,ox%+1030,oy%-440
 5610 SYS "Font_Paint",,"computer.",16,ox%+1030,oy%-485
 5620 SYS "Font_Paint",,"This lead",16,ox%+35,oy%-245
 5630 SYS "Font_Paint",,"connects the",16,ox%+35,oy%-290
 5640 SYS "Font_Paint",,"control box",16,ox%+35,oy%-335
 5650 SYS "Font_Paint",,"to mains",16,ox%+35,oy%-380
 5660 SYS "Font_Paint",,"electricity.",16,ox%+35,oy%-425
 5670 SYS "Wimp_SetFontColours",,1,11
 5680 SYS "Font_Paint",,"Click on the switch to turn on the control box.",16,ox%+35,oy%-760
 5690 SYS "Wimp_GetRectangle",,bok% TO more%
 5700 ENDWHILE
 5710 ENDPROC
 5720 :
 5730 DEF PROCclosedown
 5740 SYS "Font_LoseFont",X1%
 5750 SYS "Font_LoseFont",f3%
 5760 SYS "Font_LoseFont",f2%
 5770 SYS "Font_LoseFont",f1%
 5780 SYS "Wimp_CloseDown"
 5790 ENDPROC
 5800 :
 5810 DEF PROCput_icon_sprite(w_handle%,icon_handle%,spname$)
 5820 bk%!0=w_handle%
 5830 bk%!4=icon_handle%
 5840 SYS "Wimp_GetIconState",,bk%
 5850 CASE (bk%!24 AND &103) OF
 5860 WHEN &002,&003
 5870 $bk%!28=spname$
 5880 WHEN &102
 5890 IF bk%!36>0 $bk%!28=spname$:bk%!36=LENspname$
 5900 WHEN &103
 5910 $bk%!32="S"+spname$
 5920 ENDCASE
 5930 bk%!8=0
 5940 bk%!12=0
 5950 SYS "Wimp_SetIconState",,bk%
 5960 ENDPROC
 5970 :
 5980
 5990 DEF PROCdelay(n)
 6000 TIME = 0:REPEAT UNTIL TIME>=n*100
 6010 ENDPROC
 6020 :
 6030 DEF PROCicon_col(window_handle%,icon_handle%,col%)
 6040 bok%!0=window_handle%:bok%!4=icon_handle%
 6050 SYS "Wimp_GetIconState",,bok%
 6060 bok%!12=&F0000000:bok%!8=col%<<28
 6070 SYS "Wimp_SetIconState",,bok%
 6080 ENDPROC
 6090 :
 6100 DEF PROCclose_win
 6110 !bok%=b1handle%
 6120 SYS "Wimp_CloseWindow",,bok%
 6130 ENDPROC
 6140 :
 6150 DEF PROCrestore_pointer
 6160 *POINTER 1
 6170 ENDPROC
 6180 :
 6190 DEF PROCchange_pointer(sparea%,sprite_name$,x%,y%)
 6200 SYS "OS_SpriteOp",&124,sparea%,sprite_name$,2,x%,y%
 6210 bk%?0=0
 6220 bk%?1=25
 6230 bk%?2=&FF
 6240 bk%?3=&BB
 6250 bk%?4=&BB
 6260 SYS "OS_Word",12,bk%
 6270 bk%?0=3
 6280 bk%?2=&55
 6290 bk%?3=&55
 6300 bk%?4=&55
 6310 SYS "OS_Word",12,bk%
 6320 *POINTER 2
 6330 ENDPROC
 6340 :
 6350 DEF PROCpointer_in(w_handle%)
 6360 w_handle%=bok%!0
 6370 CASE w_handle% OF
 6380 WHEN b1handle%
 6390 PROCchange_pointer(sparea%,"hand_ptr",10,0)
 6400 WHEN wschandle%
 6410 PROCchange_pointer(sparea%,"hand_ptr",10,0)
 6420 WHEN inthandle%
 6430 PROCchange_pointer(sparea%,"hand_ptr",10,0)
 6440 ENDCASE
 6450 ENDPROC
 6460 :
 6470 DEF PROCwindow(window_handle%)
 6480 window_handle%=!bok%
 6490 SYS "Wimp_CloseWindow",,bok%
 6500 ENDPROC
 6510 :


 �init
 :
 ȕ � quit%
(
 �poll
2 �
< �closedown
F �
P :
Z � �init
d ș "Hourglass_On"
n" ș "OS_Byte",129,0,255 � ,os%
x
 Ȏ os% �
�9 � &A1,&A2,&A3:� 1,"Requires RISC OS 3.10, or higher"
� �
� � = 30000
�2 � bok% 16000,imenu% 300,mmenu% 300,dmenu% 300
� � bk% 5000
�
 ta%=0
� lk% = 0
�	 Ƞ 2
�# � trans% 16,rect% 16,plotat% 8
�" � menuind% 1500, menuname% 11
�  � ws1ind% 1500, ws1name% 11
�  � ws2ind% 1500, ws2name% 11
�" � infoind% 1000, infoname% 11
  � wscind% 1500, wscname% 11
  � ws3ind% 1500, ws3name% 11
  � ws4ind% 1500, ws4name% 11
"  � ws5ind% 1500, ws5name% 11
,  � ws6ind% 1500, ws6name% 11
6  � ws7ind% 1500, ws7name% 11
@" � ite1ind% 1500, ite1name% 11
J" � ite2ind% 1500, ite2name% 11
T  � comind% 1000, comname% 11
^  � proind% 1000, proname% 11
h � p1ind% 1000, p1name% 11
r � p2ind% 1000, p2name% 11
| � p3ind% 1000, p3name% 11
� � p4ind% 1000, p4name% 11
� � p5ind% 1000, p5name% 11
� � b1ind% 1500, b1name% 11
� � nind% 1500, nname% 11
�  � intind% 1500, intname% 11
�$ quit%=�:app$="Computer Control"
�, ș "Wimp_Initialise",310,&4B534154,app$
�  � � �error(�$+"at line"+Þ)
�# file%=�"<!ComCon$Dir>.Sprites"
� size%=�#file%+4:�#file%
� � sparea% size%
�  !sparea%=size%:sparea%!8=16
�: ș "OS_SpriteOp",&10A,sparea%,"<!ComCon$Dir>.Sprites"
5 ș "Font_FindFont",,"Trinity.Bold",480,480 � X1%
5 ș "Font_FindFont",,"Trinity.Bold",224,224 � f3%
5 ș "Font_FindFont",,"Trinity.Bold",180,180 � f2%
&7 ș "Font_FindFont",,"Trinity.Medium",180,180 � f1%
03 ș "Wimp_OpenTemplate",,"<Obey$Dir>.Templates"
: $b1name%="Box1"
DA ș "Wimp_LoadTemplate",,bok%,b1ind%,b1ind%+1500,+1,b1name%,0
N bok%!64=sparea%
X- ș "Wimp_CreateWindow",,bok% � b1handle%
b $intname%="INT"
lE ș "Wimp_LoadTemplate",,bok%,intind%,intind%+2000,f3%,intname%,0
v bok%!64=sparea%
�. ș "Wimp_CreateWindow",,bok% � inthandle%
� $menuname%="MENU"
�H ș "Wimp_LoadTemplate",,bok%,menuind%,menuind%+2000,X1%,menuname%,0
� bok%!64=sparea%
�/ ș "Wimp_CreateWindow",,bok% � menuhandle%
� $wscname%="WSC"
�E ș "Wimp_LoadTemplate",,bok%,wscind%,wscind%+1500,f3%,wscname%,0
� bok%!64=sparea%
�. ș "Wimp_CreateWindow",,bok% � wschandle%
� $infoname%="Info"
�G ș "Wimp_LoadTemplate",,bok%,infoind%,infoind%+1500,+1,infoname%,0
� bok%!64=sparea%
�/ ș "Wimp_CreateWindow",,bok% � infohandle%
 $ws4name%="WS4"
E ș "Wimp_LoadTemplate",,bok%,ws4ind%,ws4ind%+1500,f3%,ws4name%,0
 bok%!64=sparea%
 . ș "Wimp_CreateWindow",,bok% � ws4handle%
* $ws5name%="WS5"
4E ș "Wimp_LoadTemplate",,bok%,ws5ind%,ws5ind%+1500,f3%,ws5name%,0
> bok%!64=sparea%
H. ș "Wimp_CreateWindow",,bok% � ws5handle%
R ș "Hourglass_Off"
\ !bok%=menuhandle%
f# ș "Wimp_GetWindowState",,bok%
p* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
z ș "Wimp_CloseTemplate"
�? ibhandle%=�create_icon(-1,0,0,68,68,&3002,"!ComCon",0,0,0)
� � �DrK:�setupmenu(imenu%)
� � �D|K:�setupmenu(mmenu%)
� � �tFK:�setupmenu(dmenu%)
� �
� :
� � �poll
�% ș "Wimp_Poll",&1,bok% � reason%
� Ȏ reason% �
� � 1:�redraw(!bok%)
�# � 2:ș "Wimp_OpenWindow",,bok%
� � 3:�window(bok%)
� � 4:�restore_pointer
 � 5:�pointer_in(bok%!0)
 � 6:�click(bok%!12)
 � 9:�menuselect
$) � 8:�keypress(bok%!0,bok%!4,bok%!24)
. � 17,18:�receive
8 �
B �
L :
V � �receive
` Ȏ bok%!16 �
j � 0:quit%=�
t �
~ �
� :
� � �click(win%)
� Ȏ win% �
� � -2:�ibar(bok%!8)
� � menuhandle%:Ȏ bok%!16 �
� � 1:!bok%=menuhandle%
�  ș "Wimp_CloseWindow",,bok%
� !bok%=inthandle%
�# ș "Wimp_GetWindowState",,bok%
�* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
� �
� � inthandle%:Ȏ bok%!16 �
$ � 67:!bok%=inthandle%:bok%!4=67

! ș "Wimp_GetIconState",,bok%
 po_name$=$bok%!32
� � po_name$="Sc_pof":sname$="c_pon":�put_icon_sprite(inthandle%,67,sname$):pname$="slon":�put_icon_sprite(inthandle%,68,pname$):� 1,-15,15,2
(� � po_name$="Sc_pon":sname$="c_pof":�put_icon_sprite(inthandle%,67,sname$):pname$="slof":�put_icon_sprite(inthandle%,68,pname$)
2 �
< � 74:!bok%=inthandle%
F  ș "Wimp_CloseWindow",,bok%
P !bok%=wschandle%
Z# ș "Wimp_GetWindowState",,bok%
d* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
n �close_win
x@ � bok%!16<99:� bok%!8 � 2:�showmenu(mmenu%,!bok%-64,bok%!4)
� � 72:!bok%=inthandle%
�  ș "Wimp_CloseWindow",,bok%
� !bok%=ws5handle%
�# ș "Wimp_GetWindowState",,bok%
�* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
� �close_win
� �
� � wschandle%:Ȏ bok%!16 �
�u � 82:sname$="c_swon":�put_icon_sprite(wschandle%,82,sname$):pname$="glon":�put_icon_sprite(wschandle%,14,pname$)
� *CHANNELVOICE 2 2
� � 2,-15,5,1
�p sname$="c_swof":�put_icon_sprite(wschandle%,82,sname$):pname$="glof":�put_icon_sprite(wschandle%,14,pname$)
�$ � 81:!bok%=wschandle%:bok%!4=81
! ș "Wimp_GetIconState",,bok%
 po_name$=$bok%!32
 � po_name$="Stilt_si" �
"< sname$="tilt_up":�put_icon_sprite(wschandle%,81,sname$)
,9 pname$="glon":�put_icon_sprite(wschandle%,17,pname$)
6 *CHANNELVOICE 2 2
@ � 2,-15,5,2
J �
T � po_name$="Stilt_up" �
^< sname$="tilt_si":�put_icon_sprite(wschandle%,81,sname$)
h9 pname$="glof":�put_icon_sprite(wschandle%,17,pname$)
r �
| � 80:!bok%=wschandle%
�  ș "Wimp_CloseWindow",,bok%
� !bok%=inthandle%
�# ș "Wimp_GetWindowState",,bok%
�* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
� �close_win
� � 1:!bok%=wschandle%
�  ș "Wimp_CloseWindow",,bok%
� !bok%=inthandle%
�# ș "Wimp_GetWindowState",,bok%
�* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
� �close_win
� � 73:!bok%=wschandle%
�  ș "Wimp_CloseWindow",,bok%
 !bok%=inthandle%
# ș "Wimp_GetWindowState",,bok%
* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
& �close_win
0 � 74:!bok%=wschandle%
:  ș "Wimp_CloseWindow",,bok%
D !bok%=ws4handle%
N# ș "Wimp_GetWindowState",,bok%
X* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
b �close_win
l � 72:!bok%=wschandle%
v  ș "Wimp_CloseWindow",,bok%
� !bok%=ws5handle%
�# ș "Wimp_GetWindowState",,bok%
�* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
� �close_win
�@ � bok%!16<99:� bok%!8 � 2:�showmenu(mmenu%,!bok%-64,bok%!4)
� �
� � ws4handle%:Ȏ bok%!16 �
� � 10:!bok%=b1handle%
�# ș "Wimp_GetWindowState",,bok%
�* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
� � 4:!bok%=ws4handle%
�  ș "Wimp_CloseWindow",,bok%
� !bok%=ws5handle%
# ș "Wimp_GetWindowState",,bok%
* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
 �close_win
  � 1:!bok%=ws4handle%
*  ș "Wimp_CloseWindow",,bok%
4 !bok%=wschandle%
># ș "Wimp_GetWindowState",,bok%
H* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
R �close_win
\ � 0:!bok%=ws4handle%
f  ș "Wimp_CloseWindow",,bok%
p !bok%=inthandle%
z# ș "Wimp_GetWindowState",,bok%
�* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
� �close_win
� � 3:!bok%=ws4handle%
�  ș "Wimp_CloseWindow",,bok%
� !bok%=ws5handle%
�# ș "Wimp_GetWindowState",,bok%
�* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
� �close_win
�A � bok%!16<99: � bok%!8 � 2:�showmenu(mmenu%,!bok%-64,bok%!4)
� �
� �
� � ws5handle%:Ȏ bok%!16 �
� � 0:!bok%=ws5handle%
	  ș "Wimp_CloseWindow",,bok%
	 !bok%=inthandle%
	# ș "Wimp_GetWindowState",,bok%
	$* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
	. � 1:!bok%=ws5handle%
	8  ș "Wimp_CloseWindow",,bok%
	B !bok%=ws4handle%
	L# ș "Wimp_GetWindowState",,bok%
	V* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
	` �close_win
	j@ � bok%!16<99:� bok%!8 � 2:�showmenu(mmenu%,!bok%-64,bok%!4)
	t �
	~ �
	� �
	� �
	� �
	� :
	�H � �create_icon(whan%,ix%,iy%,iw%,ih%,flag%,text$,ptr1%,ptr2%,ptr3%)
	� !bok%=whan%
	� bok%!4=ix%
	� bok%!8=iy%
	� bok%!12=ix%+iw%
	� bok%!16=iy%+ih%
	� bok%!20=flag%
	� � ptr1%=0 �
 $(bok%+24)=text$

 �
 bok%!24=ptr1%
 bok%!28=ptr2%
( bok%!32=ptr3%
2 �
<+ ș "Wimp_CreateIcon",,bok% � ibhandle%
F=ibhandle%
P :
Z � �ibar(button%)
d Ȏ button% �
n' � 2:�showmenu(imenu%,!bok%-64,228)
x � 1,4:!bok%=menuhandle%
�# ș "Wimp_GetWindowState",,bok%
�* bok%!28=-1:ș "Wimp_OpenWindow",,bok%
� �
� �
� :
� ��setupmenu(menu%)
�  � title$,num%:$menu%=title$
� width%=(�(title$)-2)*16
�. menu%!12=&00070207:menu%!20=44:menu%!24=0
�  ptr%=menu%+28:� i%=1 � num%
� � mflags%,subptr%,item$
�! !ptr%=mflags%:ptr%!4=subptr%
�% ptr%!8=&7000021:$(ptr%+12)=item$
 a%=(�(item$)+1)*16
 � a%>width% width%=a%
 ptr%+=24:�
" menu%!16=width%
, �
6 :
@ � �showmenu(menu%,mx%,my%)
J menuopen%=menu%
T( ș "Wimp_CreateMenu",,menu%,mx%,my%
^ �
h :
r/ � Control,2,0,infohandle%,Info,&80,-1,Quit
|R � Control,4,0,infohandle%,Info,0,dmenu%,Components,0,-1,Commands,&80,-1,Print
�` � Components,6,0,-1,Push swi.,0,-1,Proximity,&02,-1,Tilt,0,-1,Buzzer,0,-1,Motor,&80,-1,Bulb
� :
� � �menuselect
� sel1%=!bok%:sel2%=bok%!4
�# ș "Wimp_GetPointerInfo",,bok%
� button%=bok%!8
� Ȏ menuopen% �
� � imenu%:Ȏ sel1% �
� � 1:�closedown
� �
� �
� �
� :
2 � �keypress(window_handle%,icon_handle%,key%)
 Ȏ key% �
3 � 13:�place_caret(window_handle%,icon_handle%)
&  :ș "Wimp_ProcessKey",key%
0 �
: �
D :
N/ ��place_caret(window_handle%,icon_handle%)
X Ȏ bok%!0 �
b: � ws4handle%:�ws4_answer(window_handle%,icon_handle%)
l �
v �
� :
�/ � �ws4_answer(window_handle%,icon_handle%)
� Ȏ icon_handle% �
� � 8:anshle%=8
�( !bok%=window_handle%:bok%!4=anshle%
�! ș "Wimp_GetIconState",,bok%
� text11$=$(bok%!28)
� � text11$="SWITCH ON 7" �
� �icon_col(ws4handle%,8,9)
�8 sname$="llon":�put_icon_sprite(b1handle%,36,sname$)
� �
�0 �report("We need to switch on line 7 !",18)
� �

 �icon_col(ws4handle%,8,0)

9 ș "Wimp_SetCaretPosition",window_handle%,9,0,0,-1,0

 � 9:anshle%=9

 ( !bok%=window_handle%:bok%!4=anshle%

*! ș "Wimp_GetIconState",,bok%

4 text12$=$(bok%!28)

>" � text12$="SWITCH ON 1,4,8" �

H �icon_col(ws4handle%,9,9)

R8 sname$="llon":�put_icon_sprite(b1handle%,42,sname$)

\8 sname$="llon":�put_icon_sprite(b1handle%,39,sname$)

f8 sname$="llon":�put_icon_sprite(b1handle%,35,sname$)

p �

z5 �report("We need to switch on lines 1,4,8 !",18)

� �

� �icon_col(ws4handle%,9,0)

�9 ș "Wimp_SetCaretPosition",window_handle%,6,0,0,-1,0

� � 6:anshle%=6

�( !bok%=window_handle%:bok%!4=anshle%

�! ș "Wimp_GetIconState",,bok%

� text13$=$(bok%!28)

�% � text13$="SWITCH OFF 1,4,7,8" �

� �icon_col(ws4handle%,6,9)

�8 sname$="llof":�put_icon_sprite(b1handle%,42,sname$)

�8 sname$="llof":�put_icon_sprite(b1handle%,39,sname$)

�8 sname$="llof":�put_icon_sprite(b1handle%,36,sname$)

�8 sname$="llof":�put_icon_sprite(b1handle%,35,sname$)
 �
8 �report("We need to switch off lines 1,4,7,8 !",18)
 �
$ �icon_col(ws4handle%,6,0)
.9 ș "Wimp_SetCaretPosition",window_handle%,5,0,0,-1,0
8 �
B � 5:anshle%=5
L( !bok%=window_handle%:bok%!4=anshle%
V! ș "Wimp_GetIconState",,bok%
` text14$=$(bok%!28)
j# � text14$="SWITCH ON 1 TO 8" �
t �icon_col(ws4handle%,5,9)
~8 sname$="llon":�put_icon_sprite(b1handle%,42,sname$)
�8 sname$="llon":�put_icon_sprite(b1handle%,41,sname$)
�8 sname$="llon":�put_icon_sprite(b1handle%,40,sname$)
�8 sname$="llon":�put_icon_sprite(b1handle%,39,sname$)
�8 sname$="llon":�put_icon_sprite(b1handle%,38,sname$)
�< sname$="c_bulbon":�put_icon_sprite(b1handle%,70,sname$)
�8 sname$="llon":�put_icon_sprite(b1handle%,37,sname$)
�8 sname$="llon":�put_icon_sprite(b1handle%,36,sname$)
�8 sname$="llon":�put_icon_sprite(b1handle%,35,sname$)
� �
�6 �report("We need to switch on lines 1 to 8 !",18)
� �
� �icon_col(ws4handle%,5,0)
9 ș "Wimp_SetCaretPosition",window_handle%,7,0,0,-1,0

 � 7:anshle%=7
( !bok%=window_handle%:bok%!4=anshle%
! ș "Wimp_GetIconState",,bok%
( text15$=$(bok%!28)
2$ � text15$="SWITCH OFF 1 TO 8" �
< �icon_col(ws4handle%,7,9)
F8 sname$="llof":�put_icon_sprite(b1handle%,42,sname$)
P8 sname$="llof":�put_icon_sprite(b1handle%,41,sname$)
Z8 sname$="llof":�put_icon_sprite(b1handle%,40,sname$)
d8 sname$="llof":�put_icon_sprite(b1handle%,39,sname$)
n8 sname$="llof":�put_icon_sprite(b1handle%,38,sname$)
x< sname$="c_bulbof":�put_icon_sprite(b1handle%,70,sname$)
�8 sname$="llof":�put_icon_sprite(b1handle%,37,sname$)
�8 sname$="llof":�put_icon_sprite(b1handle%,36,sname$)
�8 sname$="llof":�put_icon_sprite(b1handle%,35,sname$)
� �icon_col(ws4handle%,7,0)
� �
�7 �report("We need to switch off lines 1 to 8 !",18)
� �
�9 ș "Wimp_SetCaretPosition",window_handle%,7,0,0,-1,0
� �
� �
� �
� :
� � �report(err$,flag%)
 name$=app$
0 � flag% � 16 � name$="Message from " +name$
 !bok%=255
" $(bok%+4)=err$+�0
,8 ș "Wimp_ReportError",bok%,flag%,name$ � ,errclock%
6 �
@ :
J � �error(a$)
T �report(a$,1)
^ �restore_pointer
h ș "Wimp_CloseDown"
r �
| �
� :
� � �redraw(window_handle%)
� Ȏ window_handle% �
� � ws4handle%:�l4draw
� � ws5handle%:�l5draw
� � inthandle%:�l21draw
� � menuhandle%:�l11draw
� � wschandle%:�wscdraw
� �
� �
� �
� :
� � �wscdraw
) ș "Wimp_RedrawWindow",,bok% � more%
 ox%=bok%!4-bok%!20
 oy%=bok%!16-bok%!24
&
 ȕ more%
0" ș "Wimp_SetFontColours",,1,7
: ș "Font_SetFont",f3%
D] ș "Font_Paint",,"The components are connected to the control box by  ",16,ox%+35,oy%-50
NY ș "Font_Paint",,"leads which have a plug on the end of each wire.",16,ox%+35,oy%-95
XS ș "Font_Paint",,"The plug goes into the socket on the box.",16,ox%+35,oy%-140
b" ș "Wimp_SetFontColours",,1,8
l/ ș "Font_Paint",,"Input",16,ox%+35,oy%-242
v4 ș "Font_Paint",,"components",16,ox%+35,oy%-287
�2 ș "Font_Paint",,"Output",16,ox%+1030,oy%-130
�6 ș "Font_Paint",,"components",16,ox%+1030,oy%-178
�" ș "Wimp_SetFontColours",,1,7
�2 ș "Font_Paint",,"Buzzer",16,ox%+1086,oy%-496
�0 ș "Font_Paint",,"Bulb",16,ox%+1088,oy%-712
�5 ș "Font_Paint",,"Tilt switch",16,ox%+35,oy%-674
�5 ș "Font_Paint",,"Push switch",16,ox%+35,oy%-480
�# ș "Wimp_SetFontColours",,1,11
�W ș "Font_Paint",,"Click on input components, to make them work.",16,ox%+35,oy%-760
�) ș "Wimp_GetRectangle",,bok% � more%
� �
� �
� :
 � �l4draw
) ș "Wimp_RedrawWindow",,bok% � more%
 ox%=bok%!4-bok%!20
  oy%=bok%!16-bok%!24
*
 ȕ more%
4" ș "Wimp_SetFontColours",,1,7
> ș "Font_SetFont",f3%
HE ș "Font_Paint",,"Open the control box window.",16,ox%+35,oy%-50
R; ș "Font_Paint",,"If you now type in",16,ox%+35,oy%-95
\G ș "Font_Paint",,"output line 7 will switch on.",16,ox%+802,oy%-95
f# ș "Wimp_SetFontColours",,1,11
p5 ș "Font_Paint",,"SWITCH ON 7",16,ox%+312,oy%-95
z" ș "Wimp_SetFontColours",,1,7
�7 ș "Font_Paint",,"Now try this.",16,ox%+35,oy%-140
�# ș "Wimp_SetFontColours",,1,11
�: ș "Font_Paint",,"SWITCH ON 1,4,8",16,ox%+234,oy%-140
�" ș "Wimp_SetFontColours",,1,7
�R ș "Font_Paint",,"Output lines 1, 4 and 8 are switched on.",16,ox%+35,oy%-185
�n ș "Font_Paint",,"With the output lines switched on, you will need to switch them off.",16,ox%+35,oy%-230
�< ș "Font_Paint",,"To do this type in",16,ox%+35,oy%-275
�# ș "Wimp_SetFontColours",,1,11
�= ș "Font_Paint",,"SWITCH OFF 1,4,7,8",16,ox%+302,oy%-275
�" ș "Wimp_SetFontColours",,1,7
�x ș "Font_Paint",,"The red l.e.d next to lines 1, 4, 7 and 8 will be unlit i.e. off. But the bulb",16,ox%+35,oy%-320
�q ș "Font_Paint",,"is still on !.You have now learnt how to program the computer to turn  ",16,ox%+35,oy%-365
�J ș "Font_Paint",,"components on or off. Well done!",16,ox%+35,oy%-410
p ș "Font_Paint",,"We mentioned earlier that you could use different numbers from 1 to 8.",16,ox%+35,oy%-455
k ș "Font_Paint",,"We used the word to.This is a command word but needs to be typed ",16,ox%+35,oy%-500
; ș "Font_Paint",,"in capitals. The ",16,ox%+35,oy%-545
$X ș "Font_Paint",,"command saves us time when we need to make a ",16,ox%+330,oy%-545
.# ș "Wimp_SetFontColours",,1,11
8- ș "Font_Paint",,"TO",16,ox%+270,oy%-545
B" ș "Wimp_SetFontColours",,1,7
Lb ș "Font_Paint",,"whole group of output lines switch on or off altogether.",16,ox%+35,oy%-590
VA ș "Font_Paint",,"Try this command line. ",16,ox%+35,oy%-635
`# ș "Wimp_SetFontColours",,1,11
j; ș "Font_Paint",,"SWITCH ON 1 TO 8",16,ox%+390,oy%-635
t" ș "Wimp_SetFontColours",,1,7
~p ș "Font_Paint",,"All the l.e.d's will be lit up on the output lines of the control box.",16,ox%+35,oy%-680
�\ ș "Font_Paint",,"Switching all of these off is simple! Just type in",16,ox%+35,oy%-725
�# ș "Wimp_SetFontColours",,1,11
�; ș "Font_Paint",,"SWITCH OFF 1 TO 8",16,ox%+35,oy%-770
�) ș "Wimp_GetRectangle",,bok% � more%
� �
� �
� :
� � �l5draw
�) ș "Wimp_RedrawWindow",,bok% � more%
� ox%=bok%!4-bok%!20
� oy%=bok%!16-bok%!24
�
 ȕ more%
" ș "Wimp_SetFontColours",,1,7

 ș "Font_SetFont",f3%
p ș "Font_Paint",,"Simple Control is the user friendly program for learning about control.",16,ox%+75,oy%-50
R ș "Font_Paint",,"Simple Control comes with four programs -",16,ox%+75,oy%-95
(` ș "Font_Paint",,"Direct Control - Point and click control with inputs, ",16,ox%+75,oy%-140
2J ș "Font_Paint",,"outputs and control box windows.",16,ox%+75,oy%-185
<e ș "Font_Paint",,"Computer Control - Introduces programming the computer with",16,ox%+75,oy%-230
Fl ș "Font_Paint",,"LOGO style commands which interact with the simulated control box.",16,ox%+75,oy%-275
PV ș "Font_Paint",,"Buggy - The control box is used to control a",16,ox%+75,oy%-320
Z; ș "Font_Paint",," simulated buggy.",16,ox%+75,oy%-365
dd ș "Font_Paint",,"Control Simulations - Several examples of control systems.",16,ox%+75,oy%-410
n+ ș "Font_Paint",,"",16,ox%+200,oy%-410
x) ș "Wimp_GetRectangle",,bok% � more%
� �
� �
� :
� � �l11draw
�) ș "Wimp_RedrawWindow",,bok% � more%
� ox%=bok%!4-bok%!20
� oy%=bok%!16-bok%!24
�
 ȕ more%
�" ș "Wimp_SetFontColours",,1,8
� ș "Font_SetFont",X1%
�A ș "Font_Paint",,"Computer Control (Demo)",16,ox%+218,oy%-95
�" ș "Wimp_SetFontColours",,1,7
� ș "Font_SetFont",f3%
A ș "Font_Paint",,"Click on icon to start",16,ox%+762,oy%-760
G ș "Font_Paint",,"A module from Simple Control",16,ox%+380,oy%-150
) ș "Wimp_GetRectangle",,bok% � more%
" �
, �
6 :
@ � �l21draw
J) ș "Wimp_RedrawWindow",,bok% � more%
T ox%=bok%!4-bok%!20
^ oy%=bok%!16-bok%!24
h
 ȕ more%
r" ș "Wimp_SetFontColours",,1,7
| ș "Font_SetFont",f3%
�i ș "Font_Paint",,"Our computer         controls components through a control box. ",16,ox%+35,oy%-50
�s ș "Font_Paint",,"The control box is a special piece of equipment connected to the computer.",16,ox%+35,oy%-95
�" ș "Wimp_SetFontColours",,1,8
�4 ș "Font_Paint",,"Mains lead",16,ox%+35,oy%-178
�7 ș "Font_Paint",,"To computer",16,ox%+1030,oy%-178
�" ș "Wimp_SetFontColours",,1,7
�5 ș "Font_Paint",,"This lead",16,ox%+1030,oy%-305
�8 ș "Font_Paint",,"connects the",16,ox%+1030,oy%-350
�7 ș "Font_Paint",,"control box",16,ox%+1030,oy%-395
�2 ș "Font_Paint",,"to the",16,ox%+1030,oy%-440
�5 ș "Font_Paint",,"computer.",16,ox%+1030,oy%-485
�3 ș "Font_Paint",,"This lead",16,ox%+35,oy%-245
�6 ș "Font_Paint",,"connects the",16,ox%+35,oy%-290
5 ș "Font_Paint",,"control box",16,ox%+35,oy%-335
2 ș "Font_Paint",,"to mains",16,ox%+35,oy%-380
6 ș "Font_Paint",,"electricity.",16,ox%+35,oy%-425
&# ș "Wimp_SetFontColours",,1,11
0Y ș "Font_Paint",,"Click on the switch to turn on the control box.",16,ox%+35,oy%-760
:) ș "Wimp_GetRectangle",,bok% � more%
D �
N �
X :
b � �closedown
l ș "Font_LoseFont",X1%
v ș "Font_LoseFont",f3%
� ș "Font_LoseFont",f2%
� ș "Font_LoseFont",f1%
� ș "Wimp_CloseDown"
� �
� :
�7 � �put_icon_sprite(w_handle%,icon_handle%,spname$)
� bk%!0=w_handle%
� bk%!4=icon_handle%
�  ș "Wimp_GetIconState",,bk%
� Ȏ (bk%!24 � &103) �
� � &002,&003
� $bk%!28=spname$
� � &102
/ � bk%!36>0 $bk%!28=spname$:bk%!36=�spname$
 � &103
 $bk%!32="S"+spname$
  �
* bk%!8=0
4
 bk%!12=0
>  ș "Wimp_SetIconState",,bk%
H �
R :
\
f � �delay(n)
p � = 0:� � �>=n*100
z �
� :
�2 � �icon_col(window_handle%,icon_handle%,col%)
�. bok%!0=window_handle%:bok%!4=icon_handle%
�! ș "Wimp_GetIconState",,bok%
�& bok%!12=&F0000000:bok%!8=col%<<28
�! ș "Wimp_SetIconState",,bok%
� �
� :
� � �close_win
� !bok%=b1handle%
�  ș "Wimp_CloseWindow",,bok%
� �
� :
 � �restore_pointer
 *POINTER 1
 �
$ :
.2 � �change_pointer(sparea%,sprite_name$,x%,y%)
87 ș "OS_SpriteOp",&124,sparea%,sprite_name$,2,x%,y%
B bk%?0=0
L
 bk%?1=25
V bk%?2=&FF
` bk%?3=&BB
j bk%?4=&BB
t ș "OS_Word",12,bk%
~ bk%?0=3
� bk%?2=&55
� bk%?3=&55
� bk%?4=&55
� ș "OS_Word",12,bk%
� *POINTER 2
� �
� :
� � �pointer_in(w_handle%)
� w_handle%=bok%!0
� Ȏ w_handle% �
� � b1handle%
�- �change_pointer(sparea%,"hand_ptr",10,0)
 � wschandle%

- �change_pointer(sparea%,"hand_ptr",10,0)
 � inthandle%
- �change_pointer(sparea%,"hand_ptr",10,0)
( �
2 �
< :
F � �window(window_handle%)
P window_handle%=!bok%
Z  ș "Wimp_CloseWindow",,bok%
d �
n :
�
00000000  0d 00 0a 0a 20 f2 69 6e  69 74 0d 00 14 06 20 3a  |.... .init.... :|
00000010  0d 00 1e 0f 20 c8 95 20  ac 20 71 75 69 74 25 0d  |.... .. . quit%.|
00000020  00 28 0a 20 f2 70 6f 6c  6c 0d 00 32 06 20 ce 0d  |.(. .poll..2. ..|
00000030  00 3c 0f 20 f2 63 6c 6f  73 65 64 6f 77 6e 0d 00  |.<. .closedown..|
00000040  46 06 20 e0 0d 00 50 06  20 3a 0d 00 5a 0c 20 dd  |F. ...P. :..Z. .|
00000050  20 f2 69 6e 69 74 0d 00  64 16 20 c8 99 20 22 48  | .init..d. .. "H|
00000060  6f 75 72 67 6c 61 73 73  5f 4f 6e 22 0d 00 6e 22  |ourglass_On"..n"|
00000070  20 c8 99 20 22 4f 53 5f  42 79 74 65 22 2c 31 32  | .. "OS_Byte",12|
00000080  39 2c 30 2c 32 35 35 20  b8 20 2c 6f 73 25 0d 00  |9,0,255 . ,os%..|
00000090  78 0d 20 c8 8e 20 6f 73  25 20 ca 0d 00 82 39 20  |x. .. os% ....9 |
000000a0  c9 20 26 41 31 2c 26 41  32 2c 26 41 33 3a 85 20  |. &A1,&A2,&A3:. |
000000b0  31 2c 22 52 65 71 75 69  72 65 73 20 52 49 53 43  |1,"Requires RISC|
000000c0  20 4f 53 20 33 2e 31 30  2c 20 6f 72 20 68 69 67  | OS 3.10, or hig|
000000d0  68 65 72 22 0d 00 8c 06  20 cb 0d 00 96 0e 20 d1  |her".... ..... .|
000000e0  20 3d 20 33 30 30 30 30  0d 00 a0 32 20 de 20 62  | = 30000...2 . b|
000000f0  6f 6b 25 20 31 36 30 30  30 2c 69 6d 65 6e 75 25  |ok% 16000,imenu%|
00000100  20 33 30 30 2c 6d 6d 65  6e 75 25 20 33 30 30 2c  | 300,mmenu% 300,|
00000110  64 6d 65 6e 75 25 20 33  30 30 0d 00 aa 0f 20 de  |dmenu% 300.... .|
00000120  20 62 6b 25 20 35 30 30  30 0d 00 b4 0a 20 74 61  | bk% 5000.... ta|
00000130  25 3d 30 0d 00 be 0c 20  6c 6b 25 20 3d 20 30 0d  |%=0.... lk% = 0.|
00000140  00 c8 09 20 c8 a0 20 32  0d 00 d2 23 20 de 20 74  |... .. 2...# . t|
00000150  72 61 6e 73 25 20 31 36  2c 72 65 63 74 25 20 31  |rans% 16,rect% 1|
00000160  36 2c 70 6c 6f 74 61 74  25 20 38 0d 00 dc 22 20  |6,plotat% 8..." |
00000170  de 20 6d 65 6e 75 69 6e  64 25 20 31 35 30 30 2c  |. menuind% 1500,|
00000180  20 6d 65 6e 75 6e 61 6d  65 25 20 31 31 0d 00 e6  | menuname% 11...|
00000190  20 20 de 20 77 73 31 69  6e 64 25 20 31 35 30 30  |  . ws1ind% 1500|
000001a0  2c 20 77 73 31 6e 61 6d  65 25 20 31 31 0d 00 f0  |, ws1name% 11...|
000001b0  20 20 de 20 77 73 32 69  6e 64 25 20 31 35 30 30  |  . ws2ind% 1500|
000001c0  2c 20 77 73 32 6e 61 6d  65 25 20 31 31 0d 00 fa  |, ws2name% 11...|
000001d0  22 20 de 20 69 6e 66 6f  69 6e 64 25 20 31 30 30  |" . infoind% 100|
000001e0  30 2c 20 69 6e 66 6f 6e  61 6d 65 25 20 31 31 0d  |0, infoname% 11.|
000001f0  01 04 20 20 de 20 77 73  63 69 6e 64 25 20 31 35  |..  . wscind% 15|
00000200  30 30 2c 20 77 73 63 6e  61 6d 65 25 20 31 31 0d  |00, wscname% 11.|
00000210  01 0e 20 20 de 20 77 73  33 69 6e 64 25 20 31 35  |..  . ws3ind% 15|
00000220  30 30 2c 20 77 73 33 6e  61 6d 65 25 20 31 31 0d  |00, ws3name% 11.|
00000230  01 18 20 20 de 20 77 73  34 69 6e 64 25 20 31 35  |..  . ws4ind% 15|
00000240  30 30 2c 20 77 73 34 6e  61 6d 65 25 20 31 31 0d  |00, ws4name% 11.|
00000250  01 22 20 20 de 20 77 73  35 69 6e 64 25 20 31 35  |."  . ws5ind% 15|
00000260  30 30 2c 20 77 73 35 6e  61 6d 65 25 20 31 31 0d  |00, ws5name% 11.|
00000270  01 2c 20 20 de 20 77 73  36 69 6e 64 25 20 31 35  |.,  . ws6ind% 15|
00000280  30 30 2c 20 77 73 36 6e  61 6d 65 25 20 31 31 0d  |00, ws6name% 11.|
00000290  01 36 20 20 de 20 77 73  37 69 6e 64 25 20 31 35  |.6  . ws7ind% 15|
000002a0  30 30 2c 20 77 73 37 6e  61 6d 65 25 20 31 31 0d  |00, ws7name% 11.|
000002b0  01 40 22 20 de 20 69 74  65 31 69 6e 64 25 20 31  |.@" . ite1ind% 1|
000002c0  35 30 30 2c 20 69 74 65  31 6e 61 6d 65 25 20 31  |500, ite1name% 1|
000002d0  31 0d 01 4a 22 20 de 20  69 74 65 32 69 6e 64 25  |1..J" . ite2ind%|
000002e0  20 31 35 30 30 2c 20 69  74 65 32 6e 61 6d 65 25  | 1500, ite2name%|
000002f0  20 31 31 0d 01 54 20 20  de 20 63 6f 6d 69 6e 64  | 11..T  . comind|
00000300  25 20 31 30 30 30 2c 20  63 6f 6d 6e 61 6d 65 25  |% 1000, comname%|
00000310  20 31 31 0d 01 5e 20 20  de 20 70 72 6f 69 6e 64  | 11..^  . proind|
00000320  25 20 31 30 30 30 2c 20  70 72 6f 6e 61 6d 65 25  |% 1000, proname%|
00000330  20 31 31 0d 01 68 1e 20  de 20 70 31 69 6e 64 25  | 11..h. . p1ind%|
00000340  20 31 30 30 30 2c 20 70  31 6e 61 6d 65 25 20 31  | 1000, p1name% 1|
00000350  31 0d 01 72 1e 20 de 20  70 32 69 6e 64 25 20 31  |1..r. . p2ind% 1|
00000360  30 30 30 2c 20 70 32 6e  61 6d 65 25 20 31 31 0d  |000, p2name% 11.|
00000370  01 7c 1e 20 de 20 70 33  69 6e 64 25 20 31 30 30  |.|. . p3ind% 100|
00000380  30 2c 20 70 33 6e 61 6d  65 25 20 31 31 0d 01 86  |0, p3name% 11...|
00000390  1e 20 de 20 70 34 69 6e  64 25 20 31 30 30 30 2c  |. . p4ind% 1000,|
000003a0  20 70 34 6e 61 6d 65 25  20 31 31 0d 01 90 1e 20  | p4name% 11.... |
000003b0  de 20 70 35 69 6e 64 25  20 31 30 30 30 2c 20 70  |. p5ind% 1000, p|
000003c0  35 6e 61 6d 65 25 20 31  31 0d 01 9a 1e 20 de 20  |5name% 11.... . |
000003d0  62 31 69 6e 64 25 20 31  35 30 30 2c 20 62 31 6e  |b1ind% 1500, b1n|
000003e0  61 6d 65 25 20 31 31 0d  01 a4 1c 20 de 20 6e 69  |ame% 11.... . ni|
000003f0  6e 64 25 20 31 35 30 30  2c 20 6e 6e 61 6d 65 25  |nd% 1500, nname%|
00000400  20 31 31 0d 01 ae 20 20  de 20 69 6e 74 69 6e 64  | 11...  . intind|
00000410  25 20 31 35 30 30 2c 20  69 6e 74 6e 61 6d 65 25  |% 1500, intname%|
00000420  20 31 31 0d 01 b8 24 20  71 75 69 74 25 3d a3 3a  | 11...$ quit%=.:|
00000430  61 70 70 24 3d 22 43 6f  6d 70 75 74 65 72 20 43  |app$="Computer C|
00000440  6f 6e 74 72 6f 6c 22 0d  01 c2 2c 20 c8 99 20 22  |ontrol"..., .. "|
00000450  57 69 6d 70 5f 49 6e 69  74 69 61 6c 69 73 65 22  |Wimp_Initialise"|
00000460  2c 33 31 30 2c 26 34 42  35 33 34 31 35 34 2c 61  |,310,&4B534154,a|
00000470  70 70 24 0d 01 cc 20 20  ee 20 85 20 f2 65 72 72  |pp$...  . . .err|
00000480  6f 72 28 f6 24 2b 22 61  74 20 6c 69 6e 65 22 2b  |or(.$+"at line"+|
00000490  c3 9e 29 0d 01 d6 23 20  66 69 6c 65 25 3d 8e 22  |..)...# file%=."|
000004a0  3c 21 43 6f 6d 43 6f 6e  24 44 69 72 3e 2e 53 70  |<!ComCon$Dir>.Sp|
000004b0  72 69 74 65 73 22 0d 01  e0 1c 20 73 69 7a 65 25  |rites".... size%|
000004c0  3d a2 23 66 69 6c 65 25  2b 34 3a d9 23 66 69 6c  |=.#file%+4:.#fil|
000004d0  65 25 0d 01 ea 14 20 de  20 73 70 61 72 65 61 25  |e%.... . sparea%|
000004e0  20 73 69 7a 65 25 0d 01  f4 20 20 21 73 70 61 72  | size%...  !spar|
000004f0  65 61 25 3d 73 69 7a 65  25 3a 73 70 61 72 65 61  |ea%=size%:sparea|
00000500  25 21 38 3d 31 36 0d 01  fe 3a 20 c8 99 20 22 4f  |%!8=16...: .. "O|
00000510  53 5f 53 70 72 69 74 65  4f 70 22 2c 26 31 30 41  |S_SpriteOp",&10A|
00000520  2c 73 70 61 72 65 61 25  2c 22 3c 21 43 6f 6d 43  |,sparea%,"<!ComC|
00000530  6f 6e 24 44 69 72 3e 2e  53 70 72 69 74 65 73 22  |on$Dir>.Sprites"|
00000540  0d 02 08 35 20 c8 99 20  22 46 6f 6e 74 5f 46 69  |...5 .. "Font_Fi|
00000550  6e 64 46 6f 6e 74 22 2c  2c 22 54 72 69 6e 69 74  |ndFont",,"Trinit|
00000560  79 2e 42 6f 6c 64 22 2c  34 38 30 2c 34 38 30 20  |y.Bold",480,480 |
00000570  b8 20 58 31 25 0d 02 12  35 20 c8 99 20 22 46 6f  |. X1%...5 .. "Fo|
00000580  6e 74 5f 46 69 6e 64 46  6f 6e 74 22 2c 2c 22 54  |nt_FindFont",,"T|
00000590  72 69 6e 69 74 79 2e 42  6f 6c 64 22 2c 32 32 34  |rinity.Bold",224|
000005a0  2c 32 32 34 20 b8 20 66  33 25 0d 02 1c 35 20 c8  |,224 . f3%...5 .|
000005b0  99 20 22 46 6f 6e 74 5f  46 69 6e 64 46 6f 6e 74  |. "Font_FindFont|
000005c0  22 2c 2c 22 54 72 69 6e  69 74 79 2e 42 6f 6c 64  |",,"Trinity.Bold|
000005d0  22 2c 31 38 30 2c 31 38  30 20 b8 20 66 32 25 0d  |",180,180 . f2%.|
000005e0  02 26 37 20 c8 99 20 22  46 6f 6e 74 5f 46 69 6e  |.&7 .. "Font_Fin|
000005f0  64 46 6f 6e 74 22 2c 2c  22 54 72 69 6e 69 74 79  |dFont",,"Trinity|
00000600  2e 4d 65 64 69 75 6d 22  2c 31 38 30 2c 31 38 30  |.Medium",180,180|
00000610  20 b8 20 66 31 25 0d 02  30 33 20 c8 99 20 22 57  | . f1%..03 .. "W|
00000620  69 6d 70 5f 4f 70 65 6e  54 65 6d 70 6c 61 74 65  |imp_OpenTemplate|
00000630  22 2c 2c 22 3c 4f 62 65  79 24 44 69 72 3e 2e 54  |",,"<Obey$Dir>.T|
00000640  65 6d 70 6c 61 74 65 73  22 0d 02 3a 14 20 24 62  |emplates"..:. $b|
00000650  31 6e 61 6d 65 25 3d 22  42 6f 78 31 22 0d 02 44  |1name%="Box1"..D|
00000660  41 20 c8 99 20 22 57 69  6d 70 5f 4c 6f 61 64 54  |A .. "Wimp_LoadT|
00000670  65 6d 70 6c 61 74 65 22  2c 2c 62 6f 6b 25 2c 62  |emplate",,bok%,b|
00000680  31 69 6e 64 25 2c 62 31  69 6e 64 25 2b 31 35 30  |1ind%,b1ind%+150|
00000690  30 2c 2b 31 2c 62 31 6e  61 6d 65 25 2c 30 0d 02  |0,+1,b1name%,0..|
000006a0  4e 14 20 62 6f 6b 25 21  36 34 3d 73 70 61 72 65  |N. bok%!64=spare|
000006b0  61 25 0d 02 58 2d 20 c8  99 20 22 57 69 6d 70 5f  |a%..X- .. "Wimp_|
000006c0  43 72 65 61 74 65 57 69  6e 64 6f 77 22 2c 2c 62  |CreateWindow",,b|
000006d0  6f 6b 25 20 b8 20 62 31  68 61 6e 64 6c 65 25 0d  |ok% . b1handle%.|
000006e0  02 62 14 20 24 69 6e 74  6e 61 6d 65 25 3d 22 49  |.b. $intname%="I|
000006f0  4e 54 22 0d 02 6c 45 20  c8 99 20 22 57 69 6d 70  |NT"..lE .. "Wimp|
00000700  5f 4c 6f 61 64 54 65 6d  70 6c 61 74 65 22 2c 2c  |_LoadTemplate",,|
00000710  62 6f 6b 25 2c 69 6e 74  69 6e 64 25 2c 69 6e 74  |bok%,intind%,int|
00000720  69 6e 64 25 2b 32 30 30  30 2c 66 33 25 2c 69 6e  |ind%+2000,f3%,in|
00000730  74 6e 61 6d 65 25 2c 30  0d 02 76 14 20 62 6f 6b  |tname%,0..v. bok|
00000740  25 21 36 34 3d 73 70 61  72 65 61 25 0d 02 80 2e  |%!64=sparea%....|
00000750  20 c8 99 20 22 57 69 6d  70 5f 43 72 65 61 74 65  | .. "Wimp_Create|
00000760  57 69 6e 64 6f 77 22 2c  2c 62 6f 6b 25 20 b8 20  |Window",,bok% . |
00000770  69 6e 74 68 61 6e 64 6c  65 25 0d 02 8a 16 20 24  |inthandle%.... $|
00000780  6d 65 6e 75 6e 61 6d 65  25 3d 22 4d 45 4e 55 22  |menuname%="MENU"|
00000790  0d 02 94 48 20 c8 99 20  22 57 69 6d 70 5f 4c 6f  |...H .. "Wimp_Lo|
000007a0  61 64 54 65 6d 70 6c 61  74 65 22 2c 2c 62 6f 6b  |adTemplate",,bok|
000007b0  25 2c 6d 65 6e 75 69 6e  64 25 2c 6d 65 6e 75 69  |%,menuind%,menui|
000007c0  6e 64 25 2b 32 30 30 30  2c 58 31 25 2c 6d 65 6e  |nd%+2000,X1%,men|
000007d0  75 6e 61 6d 65 25 2c 30  0d 02 9e 14 20 62 6f 6b  |uname%,0.... bok|
000007e0  25 21 36 34 3d 73 70 61  72 65 61 25 0d 02 a8 2f  |%!64=sparea%.../|
000007f0  20 c8 99 20 22 57 69 6d  70 5f 43 72 65 61 74 65  | .. "Wimp_Create|
00000800  57 69 6e 64 6f 77 22 2c  2c 62 6f 6b 25 20 b8 20  |Window",,bok% . |
00000810  6d 65 6e 75 68 61 6e 64  6c 65 25 0d 02 b2 14 20  |menuhandle%.... |
00000820  24 77 73 63 6e 61 6d 65  25 3d 22 57 53 43 22 0d  |$wscname%="WSC".|
00000830  02 bc 45 20 c8 99 20 22  57 69 6d 70 5f 4c 6f 61  |..E .. "Wimp_Loa|
00000840  64 54 65 6d 70 6c 61 74  65 22 2c 2c 62 6f 6b 25  |dTemplate",,bok%|
00000850  2c 77 73 63 69 6e 64 25  2c 77 73 63 69 6e 64 25  |,wscind%,wscind%|
00000860  2b 31 35 30 30 2c 66 33  25 2c 77 73 63 6e 61 6d  |+1500,f3%,wscnam|
00000870  65 25 2c 30 0d 02 c6 14  20 62 6f 6b 25 21 36 34  |e%,0.... bok%!64|
00000880  3d 73 70 61 72 65 61 25  0d 02 d0 2e 20 c8 99 20  |=sparea%.... .. |
00000890  22 57 69 6d 70 5f 43 72  65 61 74 65 57 69 6e 64  |"Wimp_CreateWind|
000008a0  6f 77 22 2c 2c 62 6f 6b  25 20 b8 20 77 73 63 68  |ow",,bok% . wsch|
000008b0  61 6e 64 6c 65 25 0d 02  da 16 20 24 69 6e 66 6f  |andle%.... $info|
000008c0  6e 61 6d 65 25 3d 22 49  6e 66 6f 22 0d 02 e4 47  |name%="Info"...G|
000008d0  20 c8 99 20 22 57 69 6d  70 5f 4c 6f 61 64 54 65  | .. "Wimp_LoadTe|
000008e0  6d 70 6c 61 74 65 22 2c  2c 62 6f 6b 25 2c 69 6e  |mplate",,bok%,in|
000008f0  66 6f 69 6e 64 25 2c 69  6e 66 6f 69 6e 64 25 2b  |foind%,infoind%+|
00000900  31 35 30 30 2c 2b 31 2c  69 6e 66 6f 6e 61 6d 65  |1500,+1,infoname|
00000910  25 2c 30 0d 02 ee 14 20  62 6f 6b 25 21 36 34 3d  |%,0.... bok%!64=|
00000920  73 70 61 72 65 61 25 0d  02 f8 2f 20 c8 99 20 22  |sparea%.../ .. "|
00000930  57 69 6d 70 5f 43 72 65  61 74 65 57 69 6e 64 6f  |Wimp_CreateWindo|
00000940  77 22 2c 2c 62 6f 6b 25  20 b8 20 69 6e 66 6f 68  |w",,bok% . infoh|
00000950  61 6e 64 6c 65 25 0d 03  02 14 20 24 77 73 34 6e  |andle%.... $ws4n|
00000960  61 6d 65 25 3d 22 57 53  34 22 0d 03 0c 45 20 c8  |ame%="WS4"...E .|
00000970  99 20 22 57 69 6d 70 5f  4c 6f 61 64 54 65 6d 70  |. "Wimp_LoadTemp|
00000980  6c 61 74 65 22 2c 2c 62  6f 6b 25 2c 77 73 34 69  |late",,bok%,ws4i|
00000990  6e 64 25 2c 77 73 34 69  6e 64 25 2b 31 35 30 30  |nd%,ws4ind%+1500|
000009a0  2c 66 33 25 2c 77 73 34  6e 61 6d 65 25 2c 30 0d  |,f3%,ws4name%,0.|
000009b0  03 16 14 20 62 6f 6b 25  21 36 34 3d 73 70 61 72  |... bok%!64=spar|
000009c0  65 61 25 0d 03 20 2e 20  c8 99 20 22 57 69 6d 70  |ea%.. . .. "Wimp|
000009d0  5f 43 72 65 61 74 65 57  69 6e 64 6f 77 22 2c 2c  |_CreateWindow",,|
000009e0  62 6f 6b 25 20 b8 20 77  73 34 68 61 6e 64 6c 65  |bok% . ws4handle|
000009f0  25 0d 03 2a 14 20 24 77  73 35 6e 61 6d 65 25 3d  |%..*. $ws5name%=|
00000a00  22 57 53 35 22 0d 03 34  45 20 c8 99 20 22 57 69  |"WS5"..4E .. "Wi|
00000a10  6d 70 5f 4c 6f 61 64 54  65 6d 70 6c 61 74 65 22  |mp_LoadTemplate"|
00000a20  2c 2c 62 6f 6b 25 2c 77  73 35 69 6e 64 25 2c 77  |,,bok%,ws5ind%,w|
00000a30  73 35 69 6e 64 25 2b 31  35 30 30 2c 66 33 25 2c  |s5ind%+1500,f3%,|
00000a40  77 73 35 6e 61 6d 65 25  2c 30 0d 03 3e 14 20 62  |ws5name%,0..>. b|
00000a50  6f 6b 25 21 36 34 3d 73  70 61 72 65 61 25 0d 03  |ok%!64=sparea%..|
00000a60  48 2e 20 c8 99 20 22 57  69 6d 70 5f 43 72 65 61  |H. .. "Wimp_Crea|
00000a70  74 65 57 69 6e 64 6f 77  22 2c 2c 62 6f 6b 25 20  |teWindow",,bok% |
00000a80  b8 20 77 73 35 68 61 6e  64 6c 65 25 0d 03 52 17  |. ws5handle%..R.|
00000a90  20 c8 99 20 22 48 6f 75  72 67 6c 61 73 73 5f 4f  | .. "Hourglass_O|
00000aa0  66 66 22 0d 03 5c 16 20  21 62 6f 6b 25 3d 6d 65  |ff"..\. !bok%=me|
00000ab0  6e 75 68 61 6e 64 6c 65  25 0d 03 66 23 20 c8 99  |nuhandle%..f# ..|
00000ac0  20 22 57 69 6d 70 5f 47  65 74 57 69 6e 64 6f 77  | "Wimp_GetWindow|
00000ad0  53 74 61 74 65 22 2c 2c  62 6f 6b 25 0d 03 70 2a  |State",,bok%..p*|
00000ae0  20 62 6f 6b 25 21 32 38  3d 2d 31 3a c8 99 20 22  | bok%!28=-1:.. "|
00000af0  57 69 6d 70 5f 4f 70 65  6e 57 69 6e 64 6f 77 22  |Wimp_OpenWindow"|
00000b00  2c 2c 62 6f 6b 25 0d 03  7a 1c 20 c8 99 20 22 57  |,,bok%..z. .. "W|
00000b10  69 6d 70 5f 43 6c 6f 73  65 54 65 6d 70 6c 61 74  |imp_CloseTemplat|
00000b20  65 22 0d 03 84 3f 20 69  62 68 61 6e 64 6c 65 25  |e"...? ibhandle%|
00000b30  3d a4 63 72 65 61 74 65  5f 69 63 6f 6e 28 2d 31  |=.create_icon(-1|
00000b40  2c 30 2c 30 2c 36 38 2c  36 38 2c 26 33 30 30 32  |,0,0,68,68,&3002|
00000b50  2c 22 21 43 6f 6d 43 6f  6e 22 2c 30 2c 30 2c 30  |,"!ComCon",0,0,0|
00000b60  29 0d 03 8e 1e 20 f7 20  8d 44 72 4b 3a f2 73 65  |).... . .DrK:.se|
00000b70  74 75 70 6d 65 6e 75 28  69 6d 65 6e 75 25 29 0d  |tupmenu(imenu%).|
00000b80  03 98 1e 20 f7 20 8d 44  7c 4b 3a f2 73 65 74 75  |... . .D|K:.setu|
00000b90  70 6d 65 6e 75 28 6d 6d  65 6e 75 25 29 0d 03 a2  |pmenu(mmenu%)...|
00000ba0  1e 20 f7 20 8d 74 46 4b  3a f2 73 65 74 75 70 6d  |. . .tFK:.setupm|
00000bb0  65 6e 75 28 64 6d 65 6e  75 25 29 0d 03 ac 06 20  |enu(dmenu%).... |
00000bc0  e1 0d 03 b6 06 20 3a 0d  03 c0 0c 20 dd 20 f2 70  |..... :.... . .p|
00000bd0  6f 6c 6c 0d 03 ca 25 20  c8 99 20 22 57 69 6d 70  |oll...% .. "Wimp|
00000be0  5f 50 6f 6c 6c 22 2c 26  31 2c 62 6f 6b 25 20 b8  |_Poll",&1,bok% .|
00000bf0  20 72 65 61 73 6f 6e 25  0d 03 d4 11 20 c8 8e 20  | reason%.... .. |
00000c00  72 65 61 73 6f 6e 25 20  ca 0d 03 de 17 20 c9 20  |reason% ..... . |
00000c10  31 3a f2 72 65 64 72 61  77 28 21 62 6f 6b 25 29  |1:.redraw(!bok%)|
00000c20  0d 03 e8 23 20 c9 20 32  3a c8 99 20 22 57 69 6d  |...# . 2:.. "Wim|
00000c30  70 5f 4f 70 65 6e 57 69  6e 64 6f 77 22 2c 2c 62  |p_OpenWindow",,b|
00000c40  6f 6b 25 0d 03 f2 16 20  c9 20 33 3a f2 77 69 6e  |ok%.... . 3:.win|
00000c50  64 6f 77 28 62 6f 6b 25  29 0d 03 fc 19 20 c9 20  |dow(bok%).... . |
00000c60  34 3a f2 72 65 73 74 6f  72 65 5f 70 6f 69 6e 74  |4:.restore_point|
00000c70  65 72 0d 04 06 1c 20 c9  20 35 3a f2 70 6f 69 6e  |er.... . 5:.poin|
00000c80  74 65 72 5f 69 6e 28 62  6f 6b 25 21 30 29 0d 04  |ter_in(bok%!0)..|
00000c90  10 18 20 c9 20 36 3a f2  63 6c 69 63 6b 28 62 6f  |.. . 6:.click(bo|
00000ca0  6b 25 21 31 32 29 0d 04  1a 14 20 c9 20 39 3a f2  |k%!12).... . 9:.|
00000cb0  6d 65 6e 75 73 65 6c 65  63 74 0d 04 24 29 20 c9  |menuselect..$) .|
00000cc0  20 38 3a f2 6b 65 79 70  72 65 73 73 28 62 6f 6b  | 8:.keypress(bok|
00000cd0  25 21 30 2c 62 6f 6b 25  21 34 2c 62 6f 6b 25 21  |%!0,bok%!4,bok%!|
00000ce0  32 34 29 0d 04 2e 15 20  c9 20 31 37 2c 31 38 3a  |24).... . 17,18:|
00000cf0  f2 72 65 63 65 69 76 65  0d 04 38 06 20 cb 0d 04  |.receive..8. ...|
00000d00  42 06 20 e1 0d 04 4c 06  20 3a 0d 04 56 0f 20 dd  |B. ...L. :..V. .|
00000d10  20 f2 72 65 63 65 69 76  65 0d 04 60 11 20 c8 8e  | .receive..`. ..|
00000d20  20 62 6f 6b 25 21 31 36  20 ca 0d 04 6a 10 20 c9  | bok%!16 ...j. .|
00000d30  20 30 3a 71 75 69 74 25  3d b9 0d 04 74 06 20 cb  | 0:quit%=...t. .|
00000d40  0d 04 7e 06 20 e1 0d 04  88 06 20 3a 0d 04 92 13  |..~. ..... :....|
00000d50  20 dd 20 f2 63 6c 69 63  6b 28 77 69 6e 25 29 0d  | . .click(win%).|
00000d60  04 9c 0e 20 c8 8e 20 77  69 6e 25 20 ca 0d 04 a6  |... .. win% ....|
00000d70  17 20 c9 20 2d 32 3a f2  69 62 61 72 28 62 6f 6b  |. . -2:.ibar(bok|
00000d80  25 21 38 29 0d 04 b0 1f  20 c9 20 6d 65 6e 75 68  |%!8).... . menuh|
00000d90  61 6e 64 6c 65 25 3a c8  8e 20 62 6f 6b 25 21 31  |andle%:.. bok%!1|
00000da0  36 20 ca 0d 04 ba 1a 20  c9 20 31 3a 21 62 6f 6b  |6 ..... . 1:!bok|
00000db0  25 3d 6d 65 6e 75 68 61  6e 64 6c 65 25 0d 04 c4  |%=menuhandle%...|
00000dc0  20 20 c8 99 20 22 57 69  6d 70 5f 43 6c 6f 73 65  |  .. "Wimp_Close|
00000dd0  57 69 6e 64 6f 77 22 2c  2c 62 6f 6b 25 0d 04 ce  |Window",,bok%...|
00000de0  15 20 21 62 6f 6b 25 3d  69 6e 74 68 61 6e 64 6c  |. !bok%=inthandl|
00000df0  65 25 0d 04 d8 23 20 c8  99 20 22 57 69 6d 70 5f  |e%...# .. "Wimp_|
00000e00  47 65 74 57 69 6e 64 6f  77 53 74 61 74 65 22 2c  |GetWindowState",|
00000e10  2c 62 6f 6b 25 0d 04 e2  2a 20 62 6f 6b 25 21 32  |,bok%...* bok%!2|
00000e20  38 3d 2d 31 3a c8 99 20  22 57 69 6d 70 5f 4f 70  |8=-1:.. "Wimp_Op|
00000e30  65 6e 57 69 6e 64 6f 77  22 2c 2c 62 6f 6b 25 0d  |enWindow",,bok%.|
00000e40  04 ec 06 20 cb 0d 04 f6  1e 20 c9 20 69 6e 74 68  |... ..... . inth|
00000e50  61 6e 64 6c 65 25 3a c8  8e 20 62 6f 6b 25 21 31  |andle%:.. bok%!1|
00000e60  36 20 ca 0d 05 00 24 20  c9 20 36 37 3a 21 62 6f  |6 ....$ . 67:!bo|
00000e70  6b 25 3d 69 6e 74 68 61  6e 64 6c 65 25 3a 62 6f  |k%=inthandle%:bo|
00000e80  6b 25 21 34 3d 36 37 0d  05 0a 21 20 c8 99 20 22  |k%!4=67...! .. "|
00000e90  57 69 6d 70 5f 47 65 74  49 63 6f 6e 53 74 61 74  |Wimp_GetIconStat|
00000ea0  65 22 2c 2c 62 6f 6b 25  0d 05 14 16 20 70 6f 5f  |e",,bok%.... po_|
00000eb0  6e 61 6d 65 24 3d 24 62  6f 6b 25 21 33 32 0d 05  |name$=$bok%!32..|
00000ec0  1e 90 20 e7 20 70 6f 5f  6e 61 6d 65 24 3d 22 53  |.. . po_name$="S|
00000ed0  63 5f 70 6f 66 22 3a 73  6e 61 6d 65 24 3d 22 63  |c_pof":sname$="c|
00000ee0  5f 70 6f 6e 22 3a f2 70  75 74 5f 69 63 6f 6e 5f  |_pon":.put_icon_|
00000ef0  73 70 72 69 74 65 28 69  6e 74 68 61 6e 64 6c 65  |sprite(inthandle|
00000f00  25 2c 36 37 2c 73 6e 61  6d 65 24 29 3a 70 6e 61  |%,67,sname$):pna|
00000f10  6d 65 24 3d 22 73 6c 6f  6e 22 3a f2 70 75 74 5f  |me$="slon":.put_|
00000f20  69 63 6f 6e 5f 73 70 72  69 74 65 28 69 6e 74 68  |icon_sprite(inth|
00000f30  61 6e 64 6c 65 25 2c 36  38 2c 70 6e 61 6d 65 24  |andle%,68,pname$|
00000f40  29 3a d4 20 31 2c 2d 31  35 2c 31 35 2c 32 0d 05  |):. 1,-15,15,2..|
00000f50  28 83 20 e7 20 70 6f 5f  6e 61 6d 65 24 3d 22 53  |(. . po_name$="S|
00000f60  63 5f 70 6f 6e 22 3a 73  6e 61 6d 65 24 3d 22 63  |c_pon":sname$="c|
00000f70  5f 70 6f 66 22 3a f2 70  75 74 5f 69 63 6f 6e 5f  |_pof":.put_icon_|
00000f80  73 70 72 69 74 65 28 69  6e 74 68 61 6e 64 6c 65  |sprite(inthandle|
00000f90  25 2c 36 37 2c 73 6e 61  6d 65 24 29 3a 70 6e 61  |%,67,sname$):pna|
00000fa0  6d 65 24 3d 22 73 6c 6f  66 22 3a f2 70 75 74 5f  |me$="slof":.put_|
00000fb0  69 63 6f 6e 5f 73 70 72  69 74 65 28 69 6e 74 68  |icon_sprite(inth|
00000fc0  61 6e 64 6c 65 25 2c 36  38 2c 70 6e 61 6d 65 24  |andle%,68,pname$|
00000fd0  29 0d 05 32 06 20 cd 0d  05 3c 1a 20 c9 20 37 34  |)..2. ...<. . 74|
00000fe0  3a 21 62 6f 6b 25 3d 69  6e 74 68 61 6e 64 6c 65  |:!bok%=inthandle|
00000ff0  25 0d 05 46 20 20 c8 99  20 22 57 69 6d 70 5f 43  |%..F  .. "Wimp_C|
00001000  6c 6f 73 65 57 69 6e 64  6f 77 22 2c 2c 62 6f 6b  |loseWindow",,bok|
00001010  25 0d 05 50 15 20 21 62  6f 6b 25 3d 77 73 63 68  |%..P. !bok%=wsch|
00001020  61 6e 64 6c 65 25 0d 05  5a 23 20 c8 99 20 22 57  |andle%..Z# .. "W|
00001030  69 6d 70 5f 47 65 74 57  69 6e 64 6f 77 53 74 61  |imp_GetWindowSta|
00001040  74 65 22 2c 2c 62 6f 6b  25 0d 05 64 2a 20 62 6f  |te",,bok%..d* bo|
00001050  6b 25 21 32 38 3d 2d 31  3a c8 99 20 22 57 69 6d  |k%!28=-1:.. "Wim|
00001060  70 5f 4f 70 65 6e 57 69  6e 64 6f 77 22 2c 2c 62  |p_OpenWindow",,b|
00001070  6f 6b 25 0d 05 6e 0f 20  f2 63 6c 6f 73 65 5f 77  |ok%..n. .close_w|
00001080  69 6e 0d 05 78 40 20 c9  20 62 6f 6b 25 21 31 36  |in..x@ . bok%!16|
00001090  3c 39 39 3a e7 20 62 6f  6b 25 21 38 20 80 20 32  |<99:. bok%!8 . 2|
000010a0  3a f2 73 68 6f 77 6d 65  6e 75 28 6d 6d 65 6e 75  |:.showmenu(mmenu|
000010b0  25 2c 21 62 6f 6b 25 2d  36 34 2c 62 6f 6b 25 21  |%,!bok%-64,bok%!|
000010c0  34 29 0d 05 82 1a 20 c9  20 37 32 3a 21 62 6f 6b  |4).... . 72:!bok|
000010d0  25 3d 69 6e 74 68 61 6e  64 6c 65 25 0d 05 8c 20  |%=inthandle%... |
000010e0  20 c8 99 20 22 57 69 6d  70 5f 43 6c 6f 73 65 57  | .. "Wimp_CloseW|
000010f0  69 6e 64 6f 77 22 2c 2c  62 6f 6b 25 0d 05 96 15  |indow",,bok%....|
00001100  20 21 62 6f 6b 25 3d 77  73 35 68 61 6e 64 6c 65  | !bok%=ws5handle|
00001110  25 0d 05 a0 23 20 c8 99  20 22 57 69 6d 70 5f 47  |%...# .. "Wimp_G|
00001120  65 74 57 69 6e 64 6f 77  53 74 61 74 65 22 2c 2c  |etWindowState",,|
00001130  62 6f 6b 25 0d 05 aa 2a  20 62 6f 6b 25 21 32 38  |bok%...* bok%!28|
00001140  3d 2d 31 3a c8 99 20 22  57 69 6d 70 5f 4f 70 65  |=-1:.. "Wimp_Ope|
00001150  6e 57 69 6e 64 6f 77 22  2c 2c 62 6f 6b 25 0d 05  |nWindow",,bok%..|
00001160  b4 0f 20 f2 63 6c 6f 73  65 5f 77 69 6e 0d 05 be  |.. .close_win...|
00001170  06 20 cb 0d 05 c8 1e 20  c9 20 77 73 63 68 61 6e  |. ..... . wschan|
00001180  64 6c 65 25 3a c8 8e 20  62 6f 6b 25 21 31 36 20  |dle%:.. bok%!16 |
00001190  ca 0d 05 d2 75 20 c9 20  38 32 3a 73 6e 61 6d 65  |....u . 82:sname|
000011a0  24 3d 22 63 5f 73 77 6f  6e 22 3a f2 70 75 74 5f  |$="c_swon":.put_|
000011b0  69 63 6f 6e 5f 73 70 72  69 74 65 28 77 73 63 68  |icon_sprite(wsch|
000011c0  61 6e 64 6c 65 25 2c 38  32 2c 73 6e 61 6d 65 24  |andle%,82,sname$|
000011d0  29 3a 70 6e 61 6d 65 24  3d 22 67 6c 6f 6e 22 3a  |):pname$="glon":|
000011e0  f2 70 75 74 5f 69 63 6f  6e 5f 73 70 72 69 74 65  |.put_icon_sprite|
000011f0  28 77 73 63 68 61 6e 64  6c 65 25 2c 31 34 2c 70  |(wschandle%,14,p|
00001200  6e 61 6d 65 24 29 0d 05  dc 16 20 2a 43 48 41 4e  |name$).... *CHAN|
00001210  4e 45 4c 56 4f 49 43 45  20 32 20 32 0d 05 e6 10  |NELVOICE 2 2....|
00001220  20 d4 20 32 2c 2d 31 35  2c 35 2c 31 0d 05 f0 70  | . 2,-15,5,1...p|
00001230  20 73 6e 61 6d 65 24 3d  22 63 5f 73 77 6f 66 22  | sname$="c_swof"|
00001240  3a f2 70 75 74 5f 69 63  6f 6e 5f 73 70 72 69 74  |:.put_icon_sprit|
00001250  65 28 77 73 63 68 61 6e  64 6c 65 25 2c 38 32 2c  |e(wschandle%,82,|
00001260  73 6e 61 6d 65 24 29 3a  70 6e 61 6d 65 24 3d 22  |sname$):pname$="|
00001270  67 6c 6f 66 22 3a f2 70  75 74 5f 69 63 6f 6e 5f  |glof":.put_icon_|
00001280  73 70 72 69 74 65 28 77  73 63 68 61 6e 64 6c 65  |sprite(wschandle|
00001290  25 2c 31 34 2c 70 6e 61  6d 65 24 29 0d 05 fa 24  |%,14,pname$)...$|
000012a0  20 c9 20 38 31 3a 21 62  6f 6b 25 3d 77 73 63 68  | . 81:!bok%=wsch|
000012b0  61 6e 64 6c 65 25 3a 62  6f 6b 25 21 34 3d 38 31  |andle%:bok%!4=81|
000012c0  0d 06 04 21 20 c8 99 20  22 57 69 6d 70 5f 47 65  |...! .. "Wimp_Ge|
000012d0  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 62 6f 6b  |tIconState",,bok|
000012e0  25 0d 06 0e 16 20 70 6f  5f 6e 61 6d 65 24 3d 24  |%.... po_name$=$|
000012f0  62 6f 6b 25 21 33 32 0d  06 18 1c 20 e7 20 70 6f  |bok%!32.... . po|
00001300  5f 6e 61 6d 65 24 3d 22  53 74 69 6c 74 5f 73 69  |_name$="Stilt_si|
00001310  22 20 8c 0d 06 22 3c 20  73 6e 61 6d 65 24 3d 22  |" ..."< sname$="|
00001320  74 69 6c 74 5f 75 70 22  3a f2 70 75 74 5f 69 63  |tilt_up":.put_ic|
00001330  6f 6e 5f 73 70 72 69 74  65 28 77 73 63 68 61 6e  |on_sprite(wschan|
00001340  64 6c 65 25 2c 38 31 2c  73 6e 61 6d 65 24 29 0d  |dle%,81,sname$).|
00001350  06 2c 39 20 70 6e 61 6d  65 24 3d 22 67 6c 6f 6e  |.,9 pname$="glon|
00001360  22 3a f2 70 75 74 5f 69  63 6f 6e 5f 73 70 72 69  |":.put_icon_spri|
00001370  74 65 28 77 73 63 68 61  6e 64 6c 65 25 2c 31 37  |te(wschandle%,17|
00001380  2c 70 6e 61 6d 65 24 29  0d 06 36 16 20 2a 43 48  |,pname$)..6. *CH|
00001390  41 4e 4e 45 4c 56 4f 49  43 45 20 32 20 32 0d 06  |ANNELVOICE 2 2..|
000013a0  40 10 20 d4 20 32 2c 2d  31 35 2c 35 2c 32 0d 06  |@. . 2,-15,5,2..|
000013b0  4a 06 20 cd 0d 06 54 1c  20 e7 20 70 6f 5f 6e 61  |J. ...T. . po_na|
000013c0  6d 65 24 3d 22 53 74 69  6c 74 5f 75 70 22 20 8c  |me$="Stilt_up" .|
000013d0  0d 06 5e 3c 20 73 6e 61  6d 65 24 3d 22 74 69 6c  |..^< sname$="til|
000013e0  74 5f 73 69 22 3a f2 70  75 74 5f 69 63 6f 6e 5f  |t_si":.put_icon_|
000013f0  73 70 72 69 74 65 28 77  73 63 68 61 6e 64 6c 65  |sprite(wschandle|
00001400  25 2c 38 31 2c 73 6e 61  6d 65 24 29 0d 06 68 39  |%,81,sname$)..h9|
00001410  20 70 6e 61 6d 65 24 3d  22 67 6c 6f 66 22 3a f2  | pname$="glof":.|
00001420  70 75 74 5f 69 63 6f 6e  5f 73 70 72 69 74 65 28  |put_icon_sprite(|
00001430  77 73 63 68 61 6e 64 6c  65 25 2c 31 37 2c 70 6e  |wschandle%,17,pn|
00001440  61 6d 65 24 29 0d 06 72  06 20 cd 0d 06 7c 1a 20  |ame$)..r. ...|. |
00001450  c9 20 38 30 3a 21 62 6f  6b 25 3d 77 73 63 68 61  |. 80:!bok%=wscha|
00001460  6e 64 6c 65 25 0d 06 86  20 20 c8 99 20 22 57 69  |ndle%...  .. "Wi|
00001470  6d 70 5f 43 6c 6f 73 65  57 69 6e 64 6f 77 22 2c  |mp_CloseWindow",|
00001480  2c 62 6f 6b 25 0d 06 90  15 20 21 62 6f 6b 25 3d  |,bok%.... !bok%=|
00001490  69 6e 74 68 61 6e 64 6c  65 25 0d 06 9a 23 20 c8  |inthandle%...# .|
000014a0  99 20 22 57 69 6d 70 5f  47 65 74 57 69 6e 64 6f  |. "Wimp_GetWindo|
000014b0  77 53 74 61 74 65 22 2c  2c 62 6f 6b 25 0d 06 a4  |wState",,bok%...|
000014c0  2a 20 62 6f 6b 25 21 32  38 3d 2d 31 3a c8 99 20  |* bok%!28=-1:.. |
000014d0  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
000014e0  22 2c 2c 62 6f 6b 25 0d  06 ae 0f 20 f2 63 6c 6f  |",,bok%.... .clo|
000014f0  73 65 5f 77 69 6e 0d 06  b8 19 20 c9 20 31 3a 21  |se_win.... . 1:!|
00001500  62 6f 6b 25 3d 77 73 63  68 61 6e 64 6c 65 25 0d  |bok%=wschandle%.|
00001510  06 c2 20 20 c8 99 20 22  57 69 6d 70 5f 43 6c 6f  |..  .. "Wimp_Clo|
00001520  73 65 57 69 6e 64 6f 77  22 2c 2c 62 6f 6b 25 0d  |seWindow",,bok%.|
00001530  06 cc 15 20 21 62 6f 6b  25 3d 69 6e 74 68 61 6e  |... !bok%=inthan|
00001540  64 6c 65 25 0d 06 d6 23  20 c8 99 20 22 57 69 6d  |dle%...# .. "Wim|
00001550  70 5f 47 65 74 57 69 6e  64 6f 77 53 74 61 74 65  |p_GetWindowState|
00001560  22 2c 2c 62 6f 6b 25 0d  06 e0 2a 20 62 6f 6b 25  |",,bok%...* bok%|
00001570  21 32 38 3d 2d 31 3a c8  99 20 22 57 69 6d 70 5f  |!28=-1:.. "Wimp_|
00001580  4f 70 65 6e 57 69 6e 64  6f 77 22 2c 2c 62 6f 6b  |OpenWindow",,bok|
00001590  25 0d 06 ea 0f 20 f2 63  6c 6f 73 65 5f 77 69 6e  |%.... .close_win|
000015a0  0d 06 f4 1a 20 c9 20 37  33 3a 21 62 6f 6b 25 3d  |.... . 73:!bok%=|
000015b0  77 73 63 68 61 6e 64 6c  65 25 0d 06 fe 20 20 c8  |wschandle%...  .|
000015c0  99 20 22 57 69 6d 70 5f  43 6c 6f 73 65 57 69 6e  |. "Wimp_CloseWin|
000015d0  64 6f 77 22 2c 2c 62 6f  6b 25 0d 07 08 15 20 21  |dow",,bok%.... !|
000015e0  62 6f 6b 25 3d 69 6e 74  68 61 6e 64 6c 65 25 0d  |bok%=inthandle%.|
000015f0  07 12 23 20 c8 99 20 22  57 69 6d 70 5f 47 65 74  |..# .. "Wimp_Get|
00001600  57 69 6e 64 6f 77 53 74  61 74 65 22 2c 2c 62 6f  |WindowState",,bo|
00001610  6b 25 0d 07 1c 2a 20 62  6f 6b 25 21 32 38 3d 2d  |k%...* bok%!28=-|
00001620  31 3a c8 99 20 22 57 69  6d 70 5f 4f 70 65 6e 57  |1:.. "Wimp_OpenW|
00001630  69 6e 64 6f 77 22 2c 2c  62 6f 6b 25 0d 07 26 0f  |indow",,bok%..&.|
00001640  20 f2 63 6c 6f 73 65 5f  77 69 6e 0d 07 30 1a 20  | .close_win..0. |
00001650  c9 20 37 34 3a 21 62 6f  6b 25 3d 77 73 63 68 61  |. 74:!bok%=wscha|
00001660  6e 64 6c 65 25 0d 07 3a  20 20 c8 99 20 22 57 69  |ndle%..:  .. "Wi|
00001670  6d 70 5f 43 6c 6f 73 65  57 69 6e 64 6f 77 22 2c  |mp_CloseWindow",|
00001680  2c 62 6f 6b 25 0d 07 44  15 20 21 62 6f 6b 25 3d  |,bok%..D. !bok%=|
00001690  77 73 34 68 61 6e 64 6c  65 25 0d 07 4e 23 20 c8  |ws4handle%..N# .|
000016a0  99 20 22 57 69 6d 70 5f  47 65 74 57 69 6e 64 6f  |. "Wimp_GetWindo|
000016b0  77 53 74 61 74 65 22 2c  2c 62 6f 6b 25 0d 07 58  |wState",,bok%..X|
000016c0  2a 20 62 6f 6b 25 21 32  38 3d 2d 31 3a c8 99 20  |* bok%!28=-1:.. |
000016d0  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
000016e0  22 2c 2c 62 6f 6b 25 0d  07 62 0f 20 f2 63 6c 6f  |",,bok%..b. .clo|
000016f0  73 65 5f 77 69 6e 0d 07  6c 1a 20 c9 20 37 32 3a  |se_win..l. . 72:|
00001700  21 62 6f 6b 25 3d 77 73  63 68 61 6e 64 6c 65 25  |!bok%=wschandle%|
00001710  0d 07 76 20 20 c8 99 20  22 57 69 6d 70 5f 43 6c  |..v  .. "Wimp_Cl|
00001720  6f 73 65 57 69 6e 64 6f  77 22 2c 2c 62 6f 6b 25  |oseWindow",,bok%|
00001730  0d 07 80 15 20 21 62 6f  6b 25 3d 77 73 35 68 61  |.... !bok%=ws5ha|
00001740  6e 64 6c 65 25 0d 07 8a  23 20 c8 99 20 22 57 69  |ndle%...# .. "Wi|
00001750  6d 70 5f 47 65 74 57 69  6e 64 6f 77 53 74 61 74  |mp_GetWindowStat|
00001760  65 22 2c 2c 62 6f 6b 25  0d 07 94 2a 20 62 6f 6b  |e",,bok%...* bok|
00001770  25 21 32 38 3d 2d 31 3a  c8 99 20 22 57 69 6d 70  |%!28=-1:.. "Wimp|
00001780  5f 4f 70 65 6e 57 69 6e  64 6f 77 22 2c 2c 62 6f  |_OpenWindow",,bo|
00001790  6b 25 0d 07 9e 0f 20 f2  63 6c 6f 73 65 5f 77 69  |k%.... .close_wi|
000017a0  6e 0d 07 a8 40 20 c9 20  62 6f 6b 25 21 31 36 3c  |n...@ . bok%!16<|
000017b0  39 39 3a e7 20 62 6f 6b  25 21 38 20 80 20 32 3a  |99:. bok%!8 . 2:|
000017c0  f2 73 68 6f 77 6d 65 6e  75 28 6d 6d 65 6e 75 25  |.showmenu(mmenu%|
000017d0  2c 21 62 6f 6b 25 2d 36  34 2c 62 6f 6b 25 21 34  |,!bok%-64,bok%!4|
000017e0  29 0d 07 b2 06 20 cb 0d  07 bc 1e 20 c9 20 77 73  |).... ..... . ws|
000017f0  34 68 61 6e 64 6c 65 25  3a c8 8e 20 62 6f 6b 25  |4handle%:.. bok%|
00001800  21 31 36 20 ca 0d 07 c6  19 20 c9 20 31 30 3a 21  |!16 ..... . 10:!|
00001810  62 6f 6b 25 3d 62 31 68  61 6e 64 6c 65 25 0d 07  |bok%=b1handle%..|
00001820  d0 23 20 c8 99 20 22 57  69 6d 70 5f 47 65 74 57  |.# .. "Wimp_GetW|
00001830  69 6e 64 6f 77 53 74 61  74 65 22 2c 2c 62 6f 6b  |indowState",,bok|
00001840  25 0d 07 da 2a 20 62 6f  6b 25 21 32 38 3d 2d 31  |%...* bok%!28=-1|
00001850  3a c8 99 20 22 57 69 6d  70 5f 4f 70 65 6e 57 69  |:.. "Wimp_OpenWi|
00001860  6e 64 6f 77 22 2c 2c 62  6f 6b 25 0d 07 e4 19 20  |ndow",,bok%.... |
00001870  c9 20 34 3a 21 62 6f 6b  25 3d 77 73 34 68 61 6e  |. 4:!bok%=ws4han|
00001880  64 6c 65 25 0d 07 ee 20  20 c8 99 20 22 57 69 6d  |dle%...  .. "Wim|
00001890  70 5f 43 6c 6f 73 65 57  69 6e 64 6f 77 22 2c 2c  |p_CloseWindow",,|
000018a0  62 6f 6b 25 0d 07 f8 15  20 21 62 6f 6b 25 3d 77  |bok%.... !bok%=w|
000018b0  73 35 68 61 6e 64 6c 65  25 0d 08 02 23 20 c8 99  |s5handle%...# ..|
000018c0  20 22 57 69 6d 70 5f 47  65 74 57 69 6e 64 6f 77  | "Wimp_GetWindow|
000018d0  53 74 61 74 65 22 2c 2c  62 6f 6b 25 0d 08 0c 2a  |State",,bok%...*|
000018e0  20 62 6f 6b 25 21 32 38  3d 2d 31 3a c8 99 20 22  | bok%!28=-1:.. "|
000018f0  57 69 6d 70 5f 4f 70 65  6e 57 69 6e 64 6f 77 22  |Wimp_OpenWindow"|
00001900  2c 2c 62 6f 6b 25 0d 08  16 0f 20 f2 63 6c 6f 73  |,,bok%.... .clos|
00001910  65 5f 77 69 6e 0d 08 20  19 20 c9 20 31 3a 21 62  |e_win.. . . 1:!b|
00001920  6f 6b 25 3d 77 73 34 68  61 6e 64 6c 65 25 0d 08  |ok%=ws4handle%..|
00001930  2a 20 20 c8 99 20 22 57  69 6d 70 5f 43 6c 6f 73  |*  .. "Wimp_Clos|
00001940  65 57 69 6e 64 6f 77 22  2c 2c 62 6f 6b 25 0d 08  |eWindow",,bok%..|
00001950  34 15 20 21 62 6f 6b 25  3d 77 73 63 68 61 6e 64  |4. !bok%=wschand|
00001960  6c 65 25 0d 08 3e 23 20  c8 99 20 22 57 69 6d 70  |le%..># .. "Wimp|
00001970  5f 47 65 74 57 69 6e 64  6f 77 53 74 61 74 65 22  |_GetWindowState"|
00001980  2c 2c 62 6f 6b 25 0d 08  48 2a 20 62 6f 6b 25 21  |,,bok%..H* bok%!|
00001990  32 38 3d 2d 31 3a c8 99  20 22 57 69 6d 70 5f 4f  |28=-1:.. "Wimp_O|
000019a0  70 65 6e 57 69 6e 64 6f  77 22 2c 2c 62 6f 6b 25  |penWindow",,bok%|
000019b0  0d 08 52 0f 20 f2 63 6c  6f 73 65 5f 77 69 6e 0d  |..R. .close_win.|
000019c0  08 5c 19 20 c9 20 30 3a  21 62 6f 6b 25 3d 77 73  |.\. . 0:!bok%=ws|
000019d0  34 68 61 6e 64 6c 65 25  0d 08 66 20 20 c8 99 20  |4handle%..f  .. |
000019e0  22 57 69 6d 70 5f 43 6c  6f 73 65 57 69 6e 64 6f  |"Wimp_CloseWindo|
000019f0  77 22 2c 2c 62 6f 6b 25  0d 08 70 15 20 21 62 6f  |w",,bok%..p. !bo|
00001a00  6b 25 3d 69 6e 74 68 61  6e 64 6c 65 25 0d 08 7a  |k%=inthandle%..z|
00001a10  23 20 c8 99 20 22 57 69  6d 70 5f 47 65 74 57 69  |# .. "Wimp_GetWi|
00001a20  6e 64 6f 77 53 74 61 74  65 22 2c 2c 62 6f 6b 25  |ndowState",,bok%|
00001a30  0d 08 84 2a 20 62 6f 6b  25 21 32 38 3d 2d 31 3a  |...* bok%!28=-1:|
00001a40  c8 99 20 22 57 69 6d 70  5f 4f 70 65 6e 57 69 6e  |.. "Wimp_OpenWin|
00001a50  64 6f 77 22 2c 2c 62 6f  6b 25 0d 08 8e 0f 20 f2  |dow",,bok%.... .|
00001a60  63 6c 6f 73 65 5f 77 69  6e 0d 08 98 19 20 c9 20  |close_win.... . |
00001a70  33 3a 21 62 6f 6b 25 3d  77 73 34 68 61 6e 64 6c  |3:!bok%=ws4handl|
00001a80  65 25 0d 08 a2 20 20 c8  99 20 22 57 69 6d 70 5f  |e%...  .. "Wimp_|
00001a90  43 6c 6f 73 65 57 69 6e  64 6f 77 22 2c 2c 62 6f  |CloseWindow",,bo|
00001aa0  6b 25 0d 08 ac 15 20 21  62 6f 6b 25 3d 77 73 35  |k%.... !bok%=ws5|
00001ab0  68 61 6e 64 6c 65 25 0d  08 b6 23 20 c8 99 20 22  |handle%...# .. "|
00001ac0  57 69 6d 70 5f 47 65 74  57 69 6e 64 6f 77 53 74  |Wimp_GetWindowSt|
00001ad0  61 74 65 22 2c 2c 62 6f  6b 25 0d 08 c0 2a 20 62  |ate",,bok%...* b|
00001ae0  6f 6b 25 21 32 38 3d 2d  31 3a c8 99 20 22 57 69  |ok%!28=-1:.. "Wi|
00001af0  6d 70 5f 4f 70 65 6e 57  69 6e 64 6f 77 22 2c 2c  |mp_OpenWindow",,|
00001b00  62 6f 6b 25 0d 08 ca 0f  20 f2 63 6c 6f 73 65 5f  |bok%.... .close_|
00001b10  77 69 6e 0d 08 d4 41 20  c9 20 62 6f 6b 25 21 31  |win...A . bok%!1|
00001b20  36 3c 39 39 3a 20 e7 20  62 6f 6b 25 21 38 20 80  |6<99: . bok%!8 .|
00001b30  20 32 3a f2 73 68 6f 77  6d 65 6e 75 28 6d 6d 65  | 2:.showmenu(mme|
00001b40  6e 75 25 2c 21 62 6f 6b  25 2d 36 34 2c 62 6f 6b  |nu%,!bok%-64,bok|
00001b50  25 21 34 29 0d 08 de 06  20 cb 0d 08 e8 06 20 cd  |%!4).... ..... .|
00001b60  0d 08 f2 1e 20 c9 20 77  73 35 68 61 6e 64 6c 65  |.... . ws5handle|
00001b70  25 3a c8 8e 20 62 6f 6b  25 21 31 36 20 ca 0d 08  |%:.. bok%!16 ...|
00001b80  fc 19 20 c9 20 30 3a 21  62 6f 6b 25 3d 77 73 35  |.. . 0:!bok%=ws5|
00001b90  68 61 6e 64 6c 65 25 0d  09 06 20 20 c8 99 20 22  |handle%...  .. "|
00001ba0  57 69 6d 70 5f 43 6c 6f  73 65 57 69 6e 64 6f 77  |Wimp_CloseWindow|
00001bb0  22 2c 2c 62 6f 6b 25 0d  09 10 15 20 21 62 6f 6b  |",,bok%.... !bok|
00001bc0  25 3d 69 6e 74 68 61 6e  64 6c 65 25 0d 09 1a 23  |%=inthandle%...#|
00001bd0  20 c8 99 20 22 57 69 6d  70 5f 47 65 74 57 69 6e  | .. "Wimp_GetWin|
00001be0  64 6f 77 53 74 61 74 65  22 2c 2c 62 6f 6b 25 0d  |dowState",,bok%.|
00001bf0  09 24 2a 20 62 6f 6b 25  21 32 38 3d 2d 31 3a c8  |.$* bok%!28=-1:.|
00001c00  99 20 22 57 69 6d 70 5f  4f 70 65 6e 57 69 6e 64  |. "Wimp_OpenWind|
00001c10  6f 77 22 2c 2c 62 6f 6b  25 0d 09 2e 19 20 c9 20  |ow",,bok%.... . |
00001c20  31 3a 21 62 6f 6b 25 3d  77 73 35 68 61 6e 64 6c  |1:!bok%=ws5handl|
00001c30  65 25 0d 09 38 20 20 c8  99 20 22 57 69 6d 70 5f  |e%..8  .. "Wimp_|
00001c40  43 6c 6f 73 65 57 69 6e  64 6f 77 22 2c 2c 62 6f  |CloseWindow",,bo|
00001c50  6b 25 0d 09 42 15 20 21  62 6f 6b 25 3d 77 73 34  |k%..B. !bok%=ws4|
00001c60  68 61 6e 64 6c 65 25 0d  09 4c 23 20 c8 99 20 22  |handle%..L# .. "|
00001c70  57 69 6d 70 5f 47 65 74  57 69 6e 64 6f 77 53 74  |Wimp_GetWindowSt|
00001c80  61 74 65 22 2c 2c 62 6f  6b 25 0d 09 56 2a 20 62  |ate",,bok%..V* b|
00001c90  6f 6b 25 21 32 38 3d 2d  31 3a c8 99 20 22 57 69  |ok%!28=-1:.. "Wi|
00001ca0  6d 70 5f 4f 70 65 6e 57  69 6e 64 6f 77 22 2c 2c  |mp_OpenWindow",,|
00001cb0  62 6f 6b 25 0d 09 60 0f  20 f2 63 6c 6f 73 65 5f  |bok%..`. .close_|
00001cc0  77 69 6e 0d 09 6a 40 20  c9 20 62 6f 6b 25 21 31  |win..j@ . bok%!1|
00001cd0  36 3c 39 39 3a e7 20 62  6f 6b 25 21 38 20 80 20  |6<99:. bok%!8 . |
00001ce0  32 3a f2 73 68 6f 77 6d  65 6e 75 28 6d 6d 65 6e  |2:.showmenu(mmen|
00001cf0  75 25 2c 21 62 6f 6b 25  2d 36 34 2c 62 6f 6b 25  |u%,!bok%-64,bok%|
00001d00  21 34 29 0d 09 74 06 20  cd 0d 09 7e 06 20 cd 0d  |!4)..t. ...~. ..|
00001d10  09 88 06 20 cb 0d 09 92  06 20 cb 0d 09 9c 06 20  |... ..... ..... |
00001d20  e1 0d 09 a6 06 20 3a 0d  09 b0 48 20 dd 20 a4 63  |..... :...H . .c|
00001d30  72 65 61 74 65 5f 69 63  6f 6e 28 77 68 61 6e 25  |reate_icon(whan%|
00001d40  2c 69 78 25 2c 69 79 25  2c 69 77 25 2c 69 68 25  |,ix%,iy%,iw%,ih%|
00001d50  2c 66 6c 61 67 25 2c 74  65 78 74 24 2c 70 74 72  |,flag%,text$,ptr|
00001d60  31 25 2c 70 74 72 32 25  2c 70 74 72 33 25 29 0d  |1%,ptr2%,ptr3%).|
00001d70  09 ba 10 20 21 62 6f 6b  25 3d 77 68 61 6e 25 0d  |... !bok%=whan%.|
00001d80  09 c4 0f 20 62 6f 6b 25  21 34 3d 69 78 25 0d 09  |... bok%!4=ix%..|
00001d90  ce 0f 20 62 6f 6b 25 21  38 3d 69 79 25 0d 09 d8  |.. bok%!8=iy%...|
00001da0  14 20 62 6f 6b 25 21 31  32 3d 69 78 25 2b 69 77  |. bok%!12=ix%+iw|
00001db0  25 0d 09 e2 14 20 62 6f  6b 25 21 31 36 3d 69 79  |%.... bok%!16=iy|
00001dc0  25 2b 69 68 25 0d 09 ec  12 20 62 6f 6b 25 21 32  |%+ih%.... bok%!2|
00001dd0  30 3d 66 6c 61 67 25 0d  09 f6 10 20 e7 20 70 74  |0=flag%.... . pt|
00001de0  72 31 25 3d 30 20 8c 0d  0a 00 15 20 24 28 62 6f  |r1%=0 ..... $(bo|
00001df0  6b 25 2b 32 34 29 3d 74  65 78 74 24 0d 0a 0a 06  |k%+24)=text$....|
00001e00  20 cc 0d 0a 14 12 20 62  6f 6b 25 21 32 34 3d 70  | ..... bok%!24=p|
00001e10  74 72 31 25 0d 0a 1e 12  20 62 6f 6b 25 21 32 38  |tr1%.... bok%!28|
00001e20  3d 70 74 72 32 25 0d 0a  28 12 20 62 6f 6b 25 21  |=ptr2%..(. bok%!|
00001e30  33 32 3d 70 74 72 33 25  0d 0a 32 06 20 cd 0d 0a  |32=ptr3%..2. ...|
00001e40  3c 2b 20 c8 99 20 22 57  69 6d 70 5f 43 72 65 61  |<+ .. "Wimp_Crea|
00001e50  74 65 49 63 6f 6e 22 2c  2c 62 6f 6b 25 20 b8 20  |teIcon",,bok% . |
00001e60  69 62 68 61 6e 64 6c 65  25 0d 0a 46 0e 3d 69 62  |ibhandle%..F.=ib|
00001e70  68 61 6e 64 6c 65 25 0d  0a 50 06 20 3a 0d 0a 5a  |handle%..P. :..Z|
00001e80  15 20 dd 20 f2 69 62 61  72 28 62 75 74 74 6f 6e  |. . .ibar(button|
00001e90  25 29 0d 0a 64 11 20 c8  8e 20 62 75 74 74 6f 6e  |%)..d. .. button|
00001ea0  25 20 ca 0d 0a 6e 27 20  c9 20 32 3a f2 73 68 6f  |% ...n' . 2:.sho|
00001eb0  77 6d 65 6e 75 28 69 6d  65 6e 75 25 2c 21 62 6f  |wmenu(imenu%,!bo|
00001ec0  6b 25 2d 36 34 2c 32 32  38 29 0d 0a 78 1c 20 c9  |k%-64,228)..x. .|
00001ed0  20 31 2c 34 3a 21 62 6f  6b 25 3d 6d 65 6e 75 68  | 1,4:!bok%=menuh|
00001ee0  61 6e 64 6c 65 25 0d 0a  82 23 20 c8 99 20 22 57  |andle%...# .. "W|
00001ef0  69 6d 70 5f 47 65 74 57  69 6e 64 6f 77 53 74 61  |imp_GetWindowSta|
00001f00  74 65 22 2c 2c 62 6f 6b  25 0d 0a 8c 2a 20 62 6f  |te",,bok%...* bo|
00001f10  6b 25 21 32 38 3d 2d 31  3a c8 99 20 22 57 69 6d  |k%!28=-1:.. "Wim|
00001f20  70 5f 4f 70 65 6e 57 69  6e 64 6f 77 22 2c 2c 62  |p_OpenWindow",,b|
00001f30  6f 6b 25 0d 0a 96 06 20  cb 0d 0a a0 06 20 e1 0d  |ok%.... ..... ..|
00001f40  0a aa 06 20 3a 0d 0a b4  17 20 dd f2 73 65 74 75  |... :.... ..setu|
00001f50  70 6d 65 6e 75 28 6d 65  6e 75 25 29 0d 0a be 20  |pmenu(menu%)... |
00001f60  20 f3 20 74 69 74 6c 65  24 2c 6e 75 6d 25 3a 24  | . title$,num%:$|
00001f70  6d 65 6e 75 25 3d 74 69  74 6c 65 24 0d 0a c8 1c  |menu%=title$....|
00001f80  20 77 69 64 74 68 25 3d  28 a9 28 74 69 74 6c 65  | width%=(.(title|
00001f90  24 29 2d 32 29 2a 31 36  0d 0a d2 2e 20 6d 65 6e  |$)-2)*16.... men|
00001fa0  75 25 21 31 32 3d 26 30  30 30 37 30 32 30 37 3a  |u%!12=&00070207:|
00001fb0  6d 65 6e 75 25 21 32 30  3d 34 34 3a 6d 65 6e 75  |menu%!20=44:menu|
00001fc0  25 21 32 34 3d 30 0d 0a  dc 20 20 70 74 72 25 3d  |%!24=0...  ptr%=|
00001fd0  6d 65 6e 75 25 2b 32 38  3a e3 20 69 25 3d 31 20  |menu%+28:. i%=1 |
00001fe0  b8 20 6e 75 6d 25 0d 0a  e6 1c 20 f3 20 6d 66 6c  |. num%.... . mfl|
00001ff0  61 67 73 25 2c 73 75 62  70 74 72 25 2c 69 74 65  |ags%,subptr%,ite|
00002000  6d 24 0d 0a f0 21 20 21  70 74 72 25 3d 6d 66 6c  |m$...! !ptr%=mfl|
00002010  61 67 73 25 3a 70 74 72  25 21 34 3d 73 75 62 70  |ags%:ptr%!4=subp|
00002020  74 72 25 0d 0a fa 25 20  70 74 72 25 21 38 3d 26  |tr%...% ptr%!8=&|
00002030  37 30 30 30 30 32 31 3a  24 28 70 74 72 25 2b 31  |7000021:$(ptr%+1|
00002040  32 29 3d 69 74 65 6d 24  0d 0b 04 17 20 61 25 3d  |2)=item$.... a%=|
00002050  28 a9 28 69 74 65 6d 24  29 2b 31 29 2a 31 36 0d  |(.(item$)+1)*16.|
00002060  0b 0e 1a 20 e7 20 61 25  3e 77 69 64 74 68 25 20  |... . a%>width% |
00002070  77 69 64 74 68 25 3d 61  25 0d 0b 18 0f 20 70 74  |width%=a%.... pt|
00002080  72 25 2b 3d 32 34 3a ed  0d 0b 22 14 20 6d 65 6e  |r%+=24:...". men|
00002090  75 25 21 31 36 3d 77 69  64 74 68 25 0d 0b 2c 06  |u%!16=width%..,.|
000020a0  20 e1 0d 0b 36 06 20 3a  0d 0b 40 1f 20 dd 20 f2  | ...6. :..@. . .|
000020b0  73 68 6f 77 6d 65 6e 75  28 6d 65 6e 75 25 2c 6d  |showmenu(menu%,m|
000020c0  78 25 2c 6d 79 25 29 0d  0b 4a 14 20 6d 65 6e 75  |x%,my%)..J. menu|
000020d0  6f 70 65 6e 25 3d 6d 65  6e 75 25 0d 0b 54 28 20  |open%=menu%..T( |
000020e0  c8 99 20 22 57 69 6d 70  5f 43 72 65 61 74 65 4d  |.. "Wimp_CreateM|
000020f0  65 6e 75 22 2c 2c 6d 65  6e 75 25 2c 6d 78 25 2c  |enu",,menu%,mx%,|
00002100  6d 79 25 0d 0b 5e 06 20  e1 0d 0b 68 06 20 3a 0d  |my%..^. ...h. :.|
00002110  0b 72 2f 20 dc 20 43 6f  6e 74 72 6f 6c 2c 32 2c  |.r/ . Control,2,|
00002120  30 2c 69 6e 66 6f 68 61  6e 64 6c 65 25 2c 49 6e  |0,infohandle%,In|
00002130  66 6f 2c 26 38 30 2c 2d  31 2c 51 75 69 74 0d 0b  |fo,&80,-1,Quit..|
00002140  7c 52 20 dc 20 43 6f 6e  74 72 6f 6c 2c 34 2c 30  ||R . Control,4,0|
00002150  2c 69 6e 66 6f 68 61 6e  64 6c 65 25 2c 49 6e 66  |,infohandle%,Inf|
00002160  6f 2c 30 2c 64 6d 65 6e  75 25 2c 43 6f 6d 70 6f  |o,0,dmenu%,Compo|
00002170  6e 65 6e 74 73 2c 30 2c  2d 31 2c 43 6f 6d 6d 61  |nents,0,-1,Comma|
00002180  6e 64 73 2c 26 38 30 2c  2d 31 2c 50 72 69 6e 74  |nds,&80,-1,Print|
00002190  0d 0b 86 60 20 dc 20 43  6f 6d 70 6f 6e 65 6e 74  |...` . Component|
000021a0  73 2c 36 2c 30 2c 2d 31  2c 50 75 73 68 20 73 77  |s,6,0,-1,Push sw|
000021b0  69 2e 2c 30 2c 2d 31 2c  50 72 6f 78 69 6d 69 74  |i.,0,-1,Proximit|
000021c0  79 2c 26 30 32 2c 2d 31  2c 54 69 6c 74 2c 30 2c  |y,&02,-1,Tilt,0,|
000021d0  2d 31 2c 42 75 7a 7a 65  72 2c 30 2c 2d 31 2c 4d  |-1,Buzzer,0,-1,M|
000021e0  6f 74 6f 72 2c 26 38 30  2c 2d 31 2c 42 75 6c 62  |otor,&80,-1,Bulb|
000021f0  0d 0b 90 06 20 3a 0d 0b  9a 12 20 dd 20 f2 6d 65  |.... :.... . .me|
00002200  6e 75 73 65 6c 65 63 74  0d 0b a4 1d 20 73 65 6c  |nuselect.... sel|
00002210  31 25 3d 21 62 6f 6b 25  3a 73 65 6c 32 25 3d 62  |1%=!bok%:sel2%=b|
00002220  6f 6b 25 21 34 0d 0b ae  23 20 c8 99 20 22 57 69  |ok%!4...# .. "Wi|
00002230  6d 70 5f 47 65 74 50 6f  69 6e 74 65 72 49 6e 66  |mp_GetPointerInf|
00002240  6f 22 2c 2c 62 6f 6b 25  0d 0b b8 13 20 62 75 74  |o",,bok%.... but|
00002250  74 6f 6e 25 3d 62 6f 6b  25 21 38 0d 0b c2 13 20  |ton%=bok%!8.... |
00002260  c8 8e 20 6d 65 6e 75 6f  70 65 6e 25 20 ca 0d 0b  |.. menuopen% ...|
00002270  cc 18 20 c9 20 69 6d 65  6e 75 25 3a c8 8e 20 73  |.. . imenu%:.. s|
00002280  65 6c 31 25 20 ca 0d 0b  d6 13 20 c9 20 31 3a f2  |el1% ..... . 1:.|
00002290  63 6c 6f 73 65 64 6f 77  6e 0d 0b e0 06 20 cb 0d  |closedown.... ..|
000022a0  0b ea 06 20 cb 0d 0b f4  06 20 e1 0d 0b fe 06 20  |... ..... ..... |
000022b0  3a 0d 0c 08 32 20 dd 20  f2 6b 65 79 70 72 65 73  |:...2 . .keypres|
000022c0  73 28 77 69 6e 64 6f 77  5f 68 61 6e 64 6c 65 25  |s(window_handle%|
000022d0  2c 69 63 6f 6e 5f 68 61  6e 64 6c 65 25 2c 6b 65  |,icon_handle%,ke|
000022e0  79 25 29 0d 0c 12 0e 20  c8 8e 20 6b 65 79 25 20  |y%).... .. key% |
000022f0  ca 0d 0c 1c 33 20 c9 20  31 33 3a f2 70 6c 61 63  |....3 . 13:.plac|
00002300  65 5f 63 61 72 65 74 28  77 69 6e 64 6f 77 5f 68  |e_caret(window_h|
00002310  61 6e 64 6c 65 25 2c 69  63 6f 6e 5f 68 61 6e 64  |andle%,icon_hand|
00002320  6c 65 25 29 0d 0c 26 20  20 7f 3a c8 99 20 22 57  |le%)..&  .:.. "W|
00002330  69 6d 70 5f 50 72 6f 63  65 73 73 4b 65 79 22 2c  |imp_ProcessKey",|
00002340  6b 65 79 25 0d 0c 30 06  20 cb 0d 0c 3a 06 20 e1  |key%..0. ...:. .|
00002350  0d 0c 44 06 20 3a 0d 0c  4e 2f 20 dd f2 70 6c 61  |..D. :..N/ ..pla|
00002360  63 65 5f 63 61 72 65 74  28 77 69 6e 64 6f 77 5f  |ce_caret(window_|
00002370  68 61 6e 64 6c 65 25 2c  69 63 6f 6e 5f 68 61 6e  |handle%,icon_han|
00002380  64 6c 65 25 29 0d 0c 58  10 20 c8 8e 20 62 6f 6b  |dle%)..X. .. bok|
00002390  25 21 30 20 ca 0d 0c 62  3a 20 c9 20 77 73 34 68  |%!0 ...b: . ws4h|
000023a0  61 6e 64 6c 65 25 3a f2  77 73 34 5f 61 6e 73 77  |andle%:.ws4_answ|
000023b0  65 72 28 77 69 6e 64 6f  77 5f 68 61 6e 64 6c 65  |er(window_handle|
000023c0  25 2c 69 63 6f 6e 5f 68  61 6e 64 6c 65 25 29 0d  |%,icon_handle%).|
000023d0  0c 6c 06 20 cb 0d 0c 76  06 20 e1 0d 0c 80 06 20  |.l. ...v. ..... |
000023e0  3a 0d 0c 8a 2f 20 dd 20  f2 77 73 34 5f 61 6e 73  |:.../ . .ws4_ans|
000023f0  77 65 72 28 77 69 6e 64  6f 77 5f 68 61 6e 64 6c  |wer(window_handl|
00002400  65 25 2c 69 63 6f 6e 5f  68 61 6e 64 6c 65 25 29  |e%,icon_handle%)|
00002410  0d 0c 94 16 20 c8 8e 20  69 63 6f 6e 5f 68 61 6e  |.... .. icon_han|
00002420  64 6c 65 25 20 ca 0d 0c  9e 12 20 c9 20 38 3a 61  |dle% ..... . 8:a|
00002430  6e 73 68 6c 65 25 3d 38  0d 0c a8 28 20 21 62 6f  |nshle%=8...( !bo|
00002440  6b 25 3d 77 69 6e 64 6f  77 5f 68 61 6e 64 6c 65  |k%=window_handle|
00002450  25 3a 62 6f 6b 25 21 34  3d 61 6e 73 68 6c 65 25  |%:bok%!4=anshle%|
00002460  0d 0c b2 21 20 c8 99 20  22 57 69 6d 70 5f 47 65  |...! .. "Wimp_Ge|
00002470  74 49 63 6f 6e 53 74 61  74 65 22 2c 2c 62 6f 6b  |tIconState",,bok|
00002480  25 0d 0c bc 17 20 74 65  78 74 31 31 24 3d 24 28  |%.... text11$=$(|
00002490  62 6f 6b 25 21 32 38 29  0d 0c c6 1e 20 e7 20 74  |bok%!28).... . t|
000024a0  65 78 74 31 31 24 3d 22  53 57 49 54 43 48 20 4f  |ext11$="SWITCH O|
000024b0  4e 20 37 22 20 8c 0d 0c  d0 1e 20 f2 69 63 6f 6e  |N 7" ..... .icon|
000024c0  5f 63 6f 6c 28 77 73 34  68 61 6e 64 6c 65 25 2c  |_col(ws4handle%,|
000024d0  38 2c 39 29 0d 0c da 38  20 73 6e 61 6d 65 24 3d  |8,9)...8 sname$=|
000024e0  22 6c 6c 6f 6e 22 3a f2  70 75 74 5f 69 63 6f 6e  |"llon":.put_icon|
000024f0  5f 73 70 72 69 74 65 28  62 31 68 61 6e 64 6c 65  |_sprite(b1handle|
00002500  25 2c 33 36 2c 73 6e 61  6d 65 24 29 0d 0c e4 06  |%,36,sname$)....|
00002510  20 cc 0d 0c ee 30 20 f2  72 65 70 6f 72 74 28 22  | ....0 .report("|
00002520  57 65 20 6e 65 65 64 20  74 6f 20 73 77 69 74 63  |We need to switc|
00002530  68 20 6f 6e 20 6c 69 6e  65 20 37 20 21 22 2c 31  |h on line 7 !",1|
00002540  38 29 0d 0c f8 06 20 cd  0d 0d 02 1e 20 f2 69 63  |8).... ..... .ic|
00002550  6f 6e 5f 63 6f 6c 28 77  73 34 68 61 6e 64 6c 65  |on_col(ws4handle|
00002560  25 2c 38 2c 30 29 0d 0d  0c 39 20 c8 99 20 22 57  |%,8,0)...9 .. "W|
00002570  69 6d 70 5f 53 65 74 43  61 72 65 74 50 6f 73 69  |imp_SetCaretPosi|
00002580  74 69 6f 6e 22 2c 77 69  6e 64 6f 77 5f 68 61 6e  |tion",window_han|
00002590  64 6c 65 25 2c 39 2c 30  2c 30 2c 2d 31 2c 30 0d  |dle%,9,0,0,-1,0.|
000025a0  0d 16 12 20 c9 20 39 3a  61 6e 73 68 6c 65 25 3d  |... . 9:anshle%=|
000025b0  39 0d 0d 20 28 20 21 62  6f 6b 25 3d 77 69 6e 64  |9.. ( !bok%=wind|
000025c0  6f 77 5f 68 61 6e 64 6c  65 25 3a 62 6f 6b 25 21  |ow_handle%:bok%!|
000025d0  34 3d 61 6e 73 68 6c 65  25 0d 0d 2a 21 20 c8 99  |4=anshle%..*! ..|
000025e0  20 22 57 69 6d 70 5f 47  65 74 49 63 6f 6e 53 74  | "Wimp_GetIconSt|
000025f0  61 74 65 22 2c 2c 62 6f  6b 25 0d 0d 34 17 20 74  |ate",,bok%..4. t|
00002600  65 78 74 31 32 24 3d 24  28 62 6f 6b 25 21 32 38  |ext12$=$(bok%!28|
00002610  29 0d 0d 3e 22 20 e7 20  74 65 78 74 31 32 24 3d  |)..>" . text12$=|
00002620  22 53 57 49 54 43 48 20  4f 4e 20 31 2c 34 2c 38  |"SWITCH ON 1,4,8|
00002630  22 20 8c 0d 0d 48 1e 20  f2 69 63 6f 6e 5f 63 6f  |" ...H. .icon_co|
00002640  6c 28 77 73 34 68 61 6e  64 6c 65 25 2c 39 2c 39  |l(ws4handle%,9,9|
00002650  29 0d 0d 52 38 20 73 6e  61 6d 65 24 3d 22 6c 6c  |)..R8 sname$="ll|
00002660  6f 6e 22 3a f2 70 75 74  5f 69 63 6f 6e 5f 73 70  |on":.put_icon_sp|
00002670  72 69 74 65 28 62 31 68  61 6e 64 6c 65 25 2c 34  |rite(b1handle%,4|
00002680  32 2c 73 6e 61 6d 65 24  29 0d 0d 5c 38 20 73 6e  |2,sname$)..\8 sn|
00002690  61 6d 65 24 3d 22 6c 6c  6f 6e 22 3a f2 70 75 74  |ame$="llon":.put|
000026a0  5f 69 63 6f 6e 5f 73 70  72 69 74 65 28 62 31 68  |_icon_sprite(b1h|
000026b0  61 6e 64 6c 65 25 2c 33  39 2c 73 6e 61 6d 65 24  |andle%,39,sname$|
000026c0  29 0d 0d 66 38 20 73 6e  61 6d 65 24 3d 22 6c 6c  |)..f8 sname$="ll|
000026d0  6f 6e 22 3a f2 70 75 74  5f 69 63 6f 6e 5f 73 70  |on":.put_icon_sp|
000026e0  72 69 74 65 28 62 31 68  61 6e 64 6c 65 25 2c 33  |rite(b1handle%,3|
000026f0  35 2c 73 6e 61 6d 65 24  29 0d 0d 70 06 20 cc 0d  |5,sname$)..p. ..|
00002700  0d 7a 35 20 f2 72 65 70  6f 72 74 28 22 57 65 20  |.z5 .report("We |
00002710  6e 65 65 64 20 74 6f 20  73 77 69 74 63 68 20 6f  |need to switch o|
00002720  6e 20 6c 69 6e 65 73 20  31 2c 34 2c 38 20 21 22  |n lines 1,4,8 !"|
00002730  2c 31 38 29 0d 0d 84 06  20 cd 0d 0d 8e 1e 20 f2  |,18).... ..... .|
00002740  69 63 6f 6e 5f 63 6f 6c  28 77 73 34 68 61 6e 64  |icon_col(ws4hand|
00002750  6c 65 25 2c 39 2c 30 29  0d 0d 98 39 20 c8 99 20  |le%,9,0)...9 .. |
00002760  22 57 69 6d 70 5f 53 65  74 43 61 72 65 74 50 6f  |"Wimp_SetCaretPo|
00002770  73 69 74 69 6f 6e 22 2c  77 69 6e 64 6f 77 5f 68  |sition",window_h|
00002780  61 6e 64 6c 65 25 2c 36  2c 30 2c 30 2c 2d 31 2c  |andle%,6,0,0,-1,|
00002790  30 0d 0d a2 12 20 c9 20  36 3a 61 6e 73 68 6c 65  |0.... . 6:anshle|
000027a0  25 3d 36 0d 0d ac 28 20  21 62 6f 6b 25 3d 77 69  |%=6...( !bok%=wi|
000027b0  6e 64 6f 77 5f 68 61 6e  64 6c 65 25 3a 62 6f 6b  |ndow_handle%:bok|
000027c0  25 21 34 3d 61 6e 73 68  6c 65 25 0d 0d b6 21 20  |%!4=anshle%...! |
000027d0  c8 99 20 22 57 69 6d 70  5f 47 65 74 49 63 6f 6e  |.. "Wimp_GetIcon|
000027e0  53 74 61 74 65 22 2c 2c  62 6f 6b 25 0d 0d c0 17  |State",,bok%....|
000027f0  20 74 65 78 74 31 33 24  3d 24 28 62 6f 6b 25 21  | text13$=$(bok%!|
00002800  32 38 29 0d 0d ca 25 20  e7 20 74 65 78 74 31 33  |28)...% . text13|
00002810  24 3d 22 53 57 49 54 43  48 20 4f 46 46 20 31 2c  |$="SWITCH OFF 1,|
00002820  34 2c 37 2c 38 22 20 8c  0d 0d d4 1e 20 f2 69 63  |4,7,8" ..... .ic|
00002830  6f 6e 5f 63 6f 6c 28 77  73 34 68 61 6e 64 6c 65  |on_col(ws4handle|
00002840  25 2c 36 2c 39 29 0d 0d  de 38 20 73 6e 61 6d 65  |%,6,9)...8 sname|
00002850  24 3d 22 6c 6c 6f 66 22  3a f2 70 75 74 5f 69 63  |$="llof":.put_ic|
00002860  6f 6e 5f 73 70 72 69 74  65 28 62 31 68 61 6e 64  |on_sprite(b1hand|
00002870  6c 65 25 2c 34 32 2c 73  6e 61 6d 65 24 29 0d 0d  |le%,42,sname$)..|
00002880  e8 38 20 73 6e 61 6d 65  24 3d 22 6c 6c 6f 66 22  |.8 sname$="llof"|
00002890  3a f2 70 75 74 5f 69 63  6f 6e 5f 73 70 72 69 74  |:.put_icon_sprit|
000028a0  65 28 62 31 68 61 6e 64  6c 65 25 2c 33 39 2c 73  |e(b1handle%,39,s|
000028b0  6e 61 6d 65 24 29 0d 0d  f2 38 20 73 6e 61 6d 65  |name$)...8 sname|
000028c0  24 3d 22 6c 6c 6f 66 22  3a f2 70 75 74 5f 69 63  |$="llof":.put_ic|
000028d0  6f 6e 5f 73 70 72 69 74  65 28 62 31 68 61 6e 64  |on_sprite(b1hand|
000028e0  6c 65 25 2c 33 36 2c 73  6e 61 6d 65 24 29 0d 0d  |le%,36,sname$)..|
000028f0  fc 38 20 73 6e 61 6d 65  24 3d 22 6c 6c 6f 66 22  |.8 sname$="llof"|
00002900  3a f2 70 75 74 5f 69 63  6f 6e 5f 73 70 72 69 74  |:.put_icon_sprit|
00002910  65 28 62 31 68 61 6e 64  6c 65 25 2c 33 35 2c 73  |e(b1handle%,35,s|
00002920  6e 61 6d 65 24 29 0d 0e  06 06 20 cc 0d 0e 10 38  |name$).... ....8|
00002930  20 f2 72 65 70 6f 72 74  28 22 57 65 20 6e 65 65  | .report("We nee|
00002940  64 20 74 6f 20 73 77 69  74 63 68 20 6f 66 66 20  |d to switch off |
00002950  6c 69 6e 65 73 20 31 2c  34 2c 37 2c 38 20 21 22  |lines 1,4,7,8 !"|
00002960  2c 31 38 29 0d 0e 1a 06  20 cd 0d 0e 24 1e 20 f2  |,18).... ...$. .|
00002970  69 63 6f 6e 5f 63 6f 6c  28 77 73 34 68 61 6e 64  |icon_col(ws4hand|
00002980  6c 65 25 2c 36 2c 30 29  0d 0e 2e 39 20 c8 99 20  |le%,6,0)...9 .. |
00002990  22 57 69 6d 70 5f 53 65  74 43 61 72 65 74 50 6f  |"Wimp_SetCaretPo|
000029a0  73 69 74 69 6f 6e 22 2c  77 69 6e 64 6f 77 5f 68  |sition",window_h|
000029b0  61 6e 64 6c 65 25 2c 35  2c 30 2c 30 2c 2d 31 2c  |andle%,5,0,0,-1,|
000029c0  30 0d 0e 38 06 20 cd 0d  0e 42 12 20 c9 20 35 3a  |0..8. ...B. . 5:|
000029d0  61 6e 73 68 6c 65 25 3d  35 0d 0e 4c 28 20 21 62  |anshle%=5..L( !b|
000029e0  6f 6b 25 3d 77 69 6e 64  6f 77 5f 68 61 6e 64 6c  |ok%=window_handl|
000029f0  65 25 3a 62 6f 6b 25 21  34 3d 61 6e 73 68 6c 65  |e%:bok%!4=anshle|
00002a00  25 0d 0e 56 21 20 c8 99  20 22 57 69 6d 70 5f 47  |%..V! .. "Wimp_G|
00002a10  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 62 6f  |etIconState",,bo|
00002a20  6b 25 0d 0e 60 17 20 74  65 78 74 31 34 24 3d 24  |k%..`. text14$=$|
00002a30  28 62 6f 6b 25 21 32 38  29 0d 0e 6a 23 20 e7 20  |(bok%!28)..j# . |
00002a40  74 65 78 74 31 34 24 3d  22 53 57 49 54 43 48 20  |text14$="SWITCH |
00002a50  4f 4e 20 31 20 54 4f 20  38 22 20 8c 0d 0e 74 1e  |ON 1 TO 8" ...t.|
00002a60  20 f2 69 63 6f 6e 5f 63  6f 6c 28 77 73 34 68 61  | .icon_col(ws4ha|
00002a70  6e 64 6c 65 25 2c 35 2c  39 29 0d 0e 7e 38 20 73  |ndle%,5,9)..~8 s|
00002a80  6e 61 6d 65 24 3d 22 6c  6c 6f 6e 22 3a f2 70 75  |name$="llon":.pu|
00002a90  74 5f 69 63 6f 6e 5f 73  70 72 69 74 65 28 62 31  |t_icon_sprite(b1|
00002aa0  68 61 6e 64 6c 65 25 2c  34 32 2c 73 6e 61 6d 65  |handle%,42,sname|
00002ab0  24 29 0d 0e 88 38 20 73  6e 61 6d 65 24 3d 22 6c  |$)...8 sname$="l|
00002ac0  6c 6f 6e 22 3a f2 70 75  74 5f 69 63 6f 6e 5f 73  |lon":.put_icon_s|
00002ad0  70 72 69 74 65 28 62 31  68 61 6e 64 6c 65 25 2c  |prite(b1handle%,|
00002ae0  34 31 2c 73 6e 61 6d 65  24 29 0d 0e 92 38 20 73  |41,sname$)...8 s|
00002af0  6e 61 6d 65 24 3d 22 6c  6c 6f 6e 22 3a f2 70 75  |name$="llon":.pu|
00002b00  74 5f 69 63 6f 6e 5f 73  70 72 69 74 65 28 62 31  |t_icon_sprite(b1|
00002b10  68 61 6e 64 6c 65 25 2c  34 30 2c 73 6e 61 6d 65  |handle%,40,sname|
00002b20  24 29 0d 0e 9c 38 20 73  6e 61 6d 65 24 3d 22 6c  |$)...8 sname$="l|
00002b30  6c 6f 6e 22 3a f2 70 75  74 5f 69 63 6f 6e 5f 73  |lon":.put_icon_s|
00002b40  70 72 69 74 65 28 62 31  68 61 6e 64 6c 65 25 2c  |prite(b1handle%,|
00002b50  33 39 2c 73 6e 61 6d 65  24 29 0d 0e a6 38 20 73  |39,sname$)...8 s|
00002b60  6e 61 6d 65 24 3d 22 6c  6c 6f 6e 22 3a f2 70 75  |name$="llon":.pu|
00002b70  74 5f 69 63 6f 6e 5f 73  70 72 69 74 65 28 62 31  |t_icon_sprite(b1|
00002b80  68 61 6e 64 6c 65 25 2c  33 38 2c 73 6e 61 6d 65  |handle%,38,sname|
00002b90  24 29 0d 0e b0 3c 20 73  6e 61 6d 65 24 3d 22 63  |$)...< sname$="c|
00002ba0  5f 62 75 6c 62 6f 6e 22  3a f2 70 75 74 5f 69 63  |_bulbon":.put_ic|
00002bb0  6f 6e 5f 73 70 72 69 74  65 28 62 31 68 61 6e 64  |on_sprite(b1hand|
00002bc0  6c 65 25 2c 37 30 2c 73  6e 61 6d 65 24 29 0d 0e  |le%,70,sname$)..|
00002bd0  ba 38 20 73 6e 61 6d 65  24 3d 22 6c 6c 6f 6e 22  |.8 sname$="llon"|
00002be0  3a f2 70 75 74 5f 69 63  6f 6e 5f 73 70 72 69 74  |:.put_icon_sprit|
00002bf0  65 28 62 31 68 61 6e 64  6c 65 25 2c 33 37 2c 73  |e(b1handle%,37,s|
00002c00  6e 61 6d 65 24 29 0d 0e  c4 38 20 73 6e 61 6d 65  |name$)...8 sname|
00002c10  24 3d 22 6c 6c 6f 6e 22  3a f2 70 75 74 5f 69 63  |$="llon":.put_ic|
00002c20  6f 6e 5f 73 70 72 69 74  65 28 62 31 68 61 6e 64  |on_sprite(b1hand|
00002c30  6c 65 25 2c 33 36 2c 73  6e 61 6d 65 24 29 0d 0e  |le%,36,sname$)..|
00002c40  ce 38 20 73 6e 61 6d 65  24 3d 22 6c 6c 6f 6e 22  |.8 sname$="llon"|
00002c50  3a f2 70 75 74 5f 69 63  6f 6e 5f 73 70 72 69 74  |:.put_icon_sprit|
00002c60  65 28 62 31 68 61 6e 64  6c 65 25 2c 33 35 2c 73  |e(b1handle%,35,s|
00002c70  6e 61 6d 65 24 29 0d 0e  d8 06 20 cc 0d 0e e2 36  |name$).... ....6|
00002c80  20 f2 72 65 70 6f 72 74  28 22 57 65 20 6e 65 65  | .report("We nee|
00002c90  64 20 74 6f 20 73 77 69  74 63 68 20 6f 6e 20 6c  |d to switch on l|
00002ca0  69 6e 65 73 20 31 20 74  6f 20 38 20 21 22 2c 31  |ines 1 to 8 !",1|
00002cb0  38 29 0d 0e ec 06 20 cd  0d 0e f6 1e 20 f2 69 63  |8).... ..... .ic|
00002cc0  6f 6e 5f 63 6f 6c 28 77  73 34 68 61 6e 64 6c 65  |on_col(ws4handle|
00002cd0  25 2c 35 2c 30 29 0d 0f  00 39 20 c8 99 20 22 57  |%,5,0)...9 .. "W|
00002ce0  69 6d 70 5f 53 65 74 43  61 72 65 74 50 6f 73 69  |imp_SetCaretPosi|
00002cf0  74 69 6f 6e 22 2c 77 69  6e 64 6f 77 5f 68 61 6e  |tion",window_han|
00002d00  64 6c 65 25 2c 37 2c 30  2c 30 2c 2d 31 2c 30 0d  |dle%,7,0,0,-1,0.|
00002d10  0f 0a 12 20 c9 20 37 3a  61 6e 73 68 6c 65 25 3d  |... . 7:anshle%=|
00002d20  37 0d 0f 14 28 20 21 62  6f 6b 25 3d 77 69 6e 64  |7...( !bok%=wind|
00002d30  6f 77 5f 68 61 6e 64 6c  65 25 3a 62 6f 6b 25 21  |ow_handle%:bok%!|
00002d40  34 3d 61 6e 73 68 6c 65  25 0d 0f 1e 21 20 c8 99  |4=anshle%...! ..|
00002d50  20 22 57 69 6d 70 5f 47  65 74 49 63 6f 6e 53 74  | "Wimp_GetIconSt|
00002d60  61 74 65 22 2c 2c 62 6f  6b 25 0d 0f 28 17 20 74  |ate",,bok%..(. t|
00002d70  65 78 74 31 35 24 3d 24  28 62 6f 6b 25 21 32 38  |ext15$=$(bok%!28|
00002d80  29 0d 0f 32 24 20 e7 20  74 65 78 74 31 35 24 3d  |)..2$ . text15$=|
00002d90  22 53 57 49 54 43 48 20  4f 46 46 20 31 20 54 4f  |"SWITCH OFF 1 TO|
00002da0  20 38 22 20 8c 0d 0f 3c  1e 20 f2 69 63 6f 6e 5f  | 8" ...<. .icon_|
00002db0  63 6f 6c 28 77 73 34 68  61 6e 64 6c 65 25 2c 37  |col(ws4handle%,7|
00002dc0  2c 39 29 0d 0f 46 38 20  73 6e 61 6d 65 24 3d 22  |,9)..F8 sname$="|
00002dd0  6c 6c 6f 66 22 3a f2 70  75 74 5f 69 63 6f 6e 5f  |llof":.put_icon_|
00002de0  73 70 72 69 74 65 28 62  31 68 61 6e 64 6c 65 25  |sprite(b1handle%|
00002df0  2c 34 32 2c 73 6e 61 6d  65 24 29 0d 0f 50 38 20  |,42,sname$)..P8 |
00002e00  73 6e 61 6d 65 24 3d 22  6c 6c 6f 66 22 3a f2 70  |sname$="llof":.p|
00002e10  75 74 5f 69 63 6f 6e 5f  73 70 72 69 74 65 28 62  |ut_icon_sprite(b|
00002e20  31 68 61 6e 64 6c 65 25  2c 34 31 2c 73 6e 61 6d  |1handle%,41,snam|
00002e30  65 24 29 0d 0f 5a 38 20  73 6e 61 6d 65 24 3d 22  |e$)..Z8 sname$="|
00002e40  6c 6c 6f 66 22 3a f2 70  75 74 5f 69 63 6f 6e 5f  |llof":.put_icon_|
00002e50  73 70 72 69 74 65 28 62  31 68 61 6e 64 6c 65 25  |sprite(b1handle%|
00002e60  2c 34 30 2c 73 6e 61 6d  65 24 29 0d 0f 64 38 20  |,40,sname$)..d8 |
00002e70  73 6e 61 6d 65 24 3d 22  6c 6c 6f 66 22 3a f2 70  |sname$="llof":.p|
00002e80  75 74 5f 69 63 6f 6e 5f  73 70 72 69 74 65 28 62  |ut_icon_sprite(b|
00002e90  31 68 61 6e 64 6c 65 25  2c 33 39 2c 73 6e 61 6d  |1handle%,39,snam|
00002ea0  65 24 29 0d 0f 6e 38 20  73 6e 61 6d 65 24 3d 22  |e$)..n8 sname$="|
00002eb0  6c 6c 6f 66 22 3a f2 70  75 74 5f 69 63 6f 6e 5f  |llof":.put_icon_|
00002ec0  73 70 72 69 74 65 28 62  31 68 61 6e 64 6c 65 25  |sprite(b1handle%|
00002ed0  2c 33 38 2c 73 6e 61 6d  65 24 29 0d 0f 78 3c 20  |,38,sname$)..x< |
00002ee0  73 6e 61 6d 65 24 3d 22  63 5f 62 75 6c 62 6f 66  |sname$="c_bulbof|
00002ef0  22 3a f2 70 75 74 5f 69  63 6f 6e 5f 73 70 72 69  |":.put_icon_spri|
00002f00  74 65 28 62 31 68 61 6e  64 6c 65 25 2c 37 30 2c  |te(b1handle%,70,|
00002f10  73 6e 61 6d 65 24 29 0d  0f 82 38 20 73 6e 61 6d  |sname$)...8 snam|
00002f20  65 24 3d 22 6c 6c 6f 66  22 3a f2 70 75 74 5f 69  |e$="llof":.put_i|
00002f30  63 6f 6e 5f 73 70 72 69  74 65 28 62 31 68 61 6e  |con_sprite(b1han|
00002f40  64 6c 65 25 2c 33 37 2c  73 6e 61 6d 65 24 29 0d  |dle%,37,sname$).|
00002f50  0f 8c 38 20 73 6e 61 6d  65 24 3d 22 6c 6c 6f 66  |..8 sname$="llof|
00002f60  22 3a f2 70 75 74 5f 69  63 6f 6e 5f 73 70 72 69  |":.put_icon_spri|
00002f70  74 65 28 62 31 68 61 6e  64 6c 65 25 2c 33 36 2c  |te(b1handle%,36,|
00002f80  73 6e 61 6d 65 24 29 0d  0f 96 38 20 73 6e 61 6d  |sname$)...8 snam|
00002f90  65 24 3d 22 6c 6c 6f 66  22 3a f2 70 75 74 5f 69  |e$="llof":.put_i|
00002fa0  63 6f 6e 5f 73 70 72 69  74 65 28 62 31 68 61 6e  |con_sprite(b1han|
00002fb0  64 6c 65 25 2c 33 35 2c  73 6e 61 6d 65 24 29 0d  |dle%,35,sname$).|
00002fc0  0f a0 1e 20 f2 69 63 6f  6e 5f 63 6f 6c 28 77 73  |... .icon_col(ws|
00002fd0  34 68 61 6e 64 6c 65 25  2c 37 2c 30 29 0d 0f aa  |4handle%,7,0)...|
00002fe0  06 20 cc 0d 0f b4 37 20  f2 72 65 70 6f 72 74 28  |. ....7 .report(|
00002ff0  22 57 65 20 6e 65 65 64  20 74 6f 20 73 77 69 74  |"We need to swit|
00003000  63 68 20 6f 66 66 20 6c  69 6e 65 73 20 31 20 74  |ch off lines 1 t|
00003010  6f 20 38 20 21 22 2c 31  38 29 0d 0f be 06 20 cd  |o 8 !",18).... .|
00003020  0d 0f c8 39 20 c8 99 20  22 57 69 6d 70 5f 53 65  |...9 .. "Wimp_Se|
00003030  74 43 61 72 65 74 50 6f  73 69 74 69 6f 6e 22 2c  |tCaretPosition",|
00003040  77 69 6e 64 6f 77 5f 68  61 6e 64 6c 65 25 2c 37  |window_handle%,7|
00003050  2c 30 2c 30 2c 2d 31 2c  30 0d 0f d2 06 20 cd 0d  |,0,0,-1,0.... ..|
00003060  0f dc 06 20 cb 0d 0f e6  06 20 e1 0d 0f f0 06 20  |... ..... ..... |
00003070  3a 0d 0f fa 1a 20 dd 20  f2 72 65 70 6f 72 74 28  |:.... . .report(|
00003080  65 72 72 24 2c 66 6c 61  67 25 29 0d 10 04 0f 20  |err$,flag%).... |
00003090  6e 61 6d 65 24 3d 61 70  70 24 0d 10 0e 30 20 e7  |name$=app$...0 .|
000030a0  20 66 6c 61 67 25 20 80  20 31 36 20 8c 20 6e 61  | flag% . 16 . na|
000030b0  6d 65 24 3d 22 4d 65 73  73 61 67 65 20 66 72 6f  |me$="Message fro|
000030c0  6d 20 22 20 2b 6e 61 6d  65 24 0d 10 18 0e 20 21  |m " +name$.... !|
000030d0  62 6f 6b 25 3d 32 35 35  0d 10 22 16 20 24 28 62  |bok%=255..". $(b|
000030e0  6f 6b 25 2b 34 29 3d 65  72 72 24 2b bd 30 0d 10  |ok%+4)=err$+.0..|
000030f0  2c 38 20 c8 99 20 22 57  69 6d 70 5f 52 65 70 6f  |,8 .. "Wimp_Repo|
00003100  72 74 45 72 72 6f 72 22  2c 62 6f 6b 25 2c 66 6c  |rtError",bok%,fl|
00003110  61 67 25 2c 6e 61 6d 65  24 20 b8 20 2c 65 72 72  |ag%,name$ . ,err|
00003120  63 6c 6f 63 6b 25 0d 10  36 06 20 e1 0d 10 40 06  |clock%..6. ...@.|
00003130  20 3a 0d 10 4a 11 20 dd  20 f2 65 72 72 6f 72 28  | :..J. . .error(|
00003140  61 24 29 0d 10 54 12 20  f2 72 65 70 6f 72 74 28  |a$)..T. .report(|
00003150  61 24 2c 31 29 0d 10 5e  15 20 f2 72 65 73 74 6f  |a$,1)..^. .resto|
00003160  72 65 5f 70 6f 69 6e 74  65 72 0d 10 68 18 20 c8  |re_pointer..h. .|
00003170  99 20 22 57 69 6d 70 5f  43 6c 6f 73 65 44 6f 77  |. "Wimp_CloseDow|
00003180  6e 22 0d 10 72 06 20 e0  0d 10 7c 06 20 e1 0d 10  |n"..r. ...|. ...|
00003190  86 06 20 3a 0d 10 90 1e  20 dd 20 f2 72 65 64 72  |.. :.... . .redr|
000031a0  61 77 28 77 69 6e 64 6f  77 5f 68 61 6e 64 6c 65  |aw(window_handle|
000031b0  25 29 0d 10 9a 18 20 c8  8e 20 77 69 6e 64 6f 77  |%).... .. window|
000031c0  5f 68 61 6e 64 6c 65 25  20 ca 0d 10 a4 19 20 c9  |_handle% ..... .|
000031d0  20 77 73 34 68 61 6e 64  6c 65 25 3a f2 6c 34 64  | ws4handle%:.l4d|
000031e0  72 61 77 0d 10 ae 19 20  c9 20 77 73 35 68 61 6e  |raw.... . ws5han|
000031f0  64 6c 65 25 3a f2 6c 35  64 72 61 77 0d 10 b8 1a  |dle%:.l5draw....|
00003200  20 c9 20 69 6e 74 68 61  6e 64 6c 65 25 3a f2 6c  | . inthandle%:.l|
00003210  32 31 64 72 61 77 0d 10  c2 1b 20 c9 20 6d 65 6e  |21draw.... . men|
00003220  75 68 61 6e 64 6c 65 25  3a f2 6c 31 31 64 72 61  |uhandle%:.l11dra|
00003230  77 0d 10 cc 1a 20 c9 20  77 73 63 68 61 6e 64 6c  |w.... . wschandl|
00003240  65 25 3a f2 77 73 63 64  72 61 77 0d 10 d6 06 20  |e%:.wscdraw.... |
00003250  cb 0d 10 e0 06 20 cb 0d  10 ea 06 20 e1 0d 10 f4  |..... ..... ....|
00003260  06 20 3a 0d 10 fe 0f 20  dd 20 f2 77 73 63 64 72  |. :.... . .wscdr|
00003270  61 77 0d 11 08 29 20 c8  99 20 22 57 69 6d 70 5f  |aw...) .. "Wimp_|
00003280  52 65 64 72 61 77 57 69  6e 64 6f 77 22 2c 2c 62  |RedrawWindow",,b|
00003290  6f 6b 25 20 b8 20 6d 6f  72 65 25 0d 11 12 17 20  |ok% . more%.... |
000032a0  6f 78 25 3d 62 6f 6b 25  21 34 2d 62 6f 6b 25 21  |ox%=bok%!4-bok%!|
000032b0  32 30 0d 11 1c 18 20 6f  79 25 3d 62 6f 6b 25 21  |20.... oy%=bok%!|
000032c0  31 36 2d 62 6f 6b 25 21  32 34 0d 11 26 0d 20 c8  |16-bok%!24..&. .|
000032d0  95 20 6d 6f 72 65 25 0d  11 30 22 20 c8 99 20 22  |. more%..0" .. "|
000032e0  57 69 6d 70 5f 53 65 74  46 6f 6e 74 43 6f 6c 6f  |Wimp_SetFontColo|
000032f0  75 72 73 22 2c 2c 31 2c  37 0d 11 3a 1a 20 c8 99  |urs",,1,7..:. ..|
00003300  20 22 46 6f 6e 74 5f 53  65 74 46 6f 6e 74 22 2c  | "Font_SetFont",|
00003310  66 33 25 0d 11 44 5d 20  c8 99 20 22 46 6f 6e 74  |f3%..D] .. "Font|
00003320  5f 50 61 69 6e 74 22 2c  2c 22 54 68 65 20 63 6f  |_Paint",,"The co|
00003330  6d 70 6f 6e 65 6e 74 73  20 61 72 65 20 63 6f 6e  |mponents are con|
00003340  6e 65 63 74 65 64 20 74  6f 20 74 68 65 20 63 6f  |nected to the co|
00003350  6e 74 72 6f 6c 20 62 6f  78 20 62 79 20 20 22 2c  |ntrol box by  ",|
00003360  31 36 2c 6f 78 25 2b 33  35 2c 6f 79 25 2d 35 30  |16,ox%+35,oy%-50|
00003370  0d 11 4e 59 20 c8 99 20  22 46 6f 6e 74 5f 50 61  |..NY .. "Font_Pa|
00003380  69 6e 74 22 2c 2c 22 6c  65 61 64 73 20 77 68 69  |int",,"leads whi|
00003390  63 68 20 68 61 76 65 20  61 20 70 6c 75 67 20 6f  |ch have a plug o|
000033a0  6e 20 74 68 65 20 65 6e  64 20 6f 66 20 65 61 63  |n the end of eac|
000033b0  68 20 77 69 72 65 2e 22  2c 31 36 2c 6f 78 25 2b  |h wire.",16,ox%+|
000033c0  33 35 2c 6f 79 25 2d 39  35 0d 11 58 53 20 c8 99  |35,oy%-95..XS ..|
000033d0  20 22 46 6f 6e 74 5f 50  61 69 6e 74 22 2c 2c 22  | "Font_Paint",,"|
000033e0  54 68 65 20 70 6c 75 67  20 67 6f 65 73 20 69 6e  |The plug goes in|
000033f0  74 6f 20 74 68 65 20 73  6f 63 6b 65 74 20 6f 6e  |to the socket on|
00003400  20 74 68 65 20 62 6f 78  2e 22 2c 31 36 2c 6f 78  | the box.",16,ox|
00003410  25 2b 33 35 2c 6f 79 25  2d 31 34 30 0d 11 62 22  |%+35,oy%-140..b"|
00003420  20 c8 99 20 22 57 69 6d  70 5f 53 65 74 46 6f 6e  | .. "Wimp_SetFon|
00003430  74 43 6f 6c 6f 75 72 73  22 2c 2c 31 2c 38 0d 11  |tColours",,1,8..|
00003440  6c 2f 20 c8 99 20 22 46  6f 6e 74 5f 50 61 69 6e  |l/ .. "Font_Pain|
00003450  74 22 2c 2c 22 49 6e 70  75 74 22 2c 31 36 2c 6f  |t",,"Input",16,o|
00003460  78 25 2b 33 35 2c 6f 79  25 2d 32 34 32 0d 11 76  |x%+35,oy%-242..v|
00003470  34 20 c8 99 20 22 46 6f  6e 74 5f 50 61 69 6e 74  |4 .. "Font_Paint|
00003480  22 2c 2c 22 63 6f 6d 70  6f 6e 65 6e 74 73 22 2c  |",,"components",|
00003490  31 36 2c 6f 78 25 2b 33  35 2c 6f 79 25 2d 32 38  |16,ox%+35,oy%-28|
000034a0  37 0d 11 80 32 20 c8 99  20 22 46 6f 6e 74 5f 50  |7...2 .. "Font_P|
000034b0  61 69 6e 74 22 2c 2c 22  4f 75 74 70 75 74 22 2c  |aint",,"Output",|
000034c0  31 36 2c 6f 78 25 2b 31  30 33 30 2c 6f 79 25 2d  |16,ox%+1030,oy%-|
000034d0  31 33 30 0d 11 8a 36 20  c8 99 20 22 46 6f 6e 74  |130...6 .. "Font|
000034e0  5f 50 61 69 6e 74 22 2c  2c 22 63 6f 6d 70 6f 6e  |_Paint",,"compon|
000034f0  65 6e 74 73 22 2c 31 36  2c 6f 78 25 2b 31 30 33  |ents",16,ox%+103|
00003500  30 2c 6f 79 25 2d 31 37  38 0d 11 94 22 20 c8 99  |0,oy%-178..." ..|
00003510  20 22 57 69 6d 70 5f 53  65 74 46 6f 6e 74 43 6f  | "Wimp_SetFontCo|
00003520  6c 6f 75 72 73 22 2c 2c  31 2c 37 0d 11 9e 32 20  |lours",,1,7...2 |
00003530  c8 99 20 22 46 6f 6e 74  5f 50 61 69 6e 74 22 2c  |.. "Font_Paint",|
00003540  2c 22 42 75 7a 7a 65 72  22 2c 31 36 2c 6f 78 25  |,"Buzzer",16,ox%|
00003550  2b 31 30 38 36 2c 6f 79  25 2d 34 39 36 0d 11 a8  |+1086,oy%-496...|
00003560  30 20 c8 99 20 22 46 6f  6e 74 5f 50 61 69 6e 74  |0 .. "Font_Paint|
00003570  22 2c 2c 22 42 75 6c 62  22 2c 31 36 2c 6f 78 25  |",,"Bulb",16,ox%|
00003580  2b 31 30 38 38 2c 6f 79  25 2d 37 31 32 0d 11 b2  |+1088,oy%-712...|
00003590  35 20 c8 99 20 22 46 6f  6e 74 5f 50 61 69 6e 74  |5 .. "Font_Paint|
000035a0  22 2c 2c 22 54 69 6c 74  20 73 77 69 74 63 68 22  |",,"Tilt switch"|
000035b0  2c 31 36 2c 6f 78 25 2b  33 35 2c 6f 79 25 2d 36  |,16,ox%+35,oy%-6|
000035c0  37 34 0d 11 bc 35 20 c8  99 20 22 46 6f 6e 74 5f  |74...5 .. "Font_|
000035d0  50 61 69 6e 74 22 2c 2c  22 50 75 73 68 20 73 77  |Paint",,"Push sw|
000035e0  69 74 63 68 22 2c 31 36  2c 6f 78 25 2b 33 35 2c  |itch",16,ox%+35,|
000035f0  6f 79 25 2d 34 38 30 0d  11 c6 23 20 c8 99 20 22  |oy%-480...# .. "|
00003600  57 69 6d 70 5f 53 65 74  46 6f 6e 74 43 6f 6c 6f  |Wimp_SetFontColo|
00003610  75 72 73 22 2c 2c 31 2c  31 31 0d 11 d0 57 20 c8  |urs",,1,11...W .|
00003620  99 20 22 46 6f 6e 74 5f  50 61 69 6e 74 22 2c 2c  |. "Font_Paint",,|
00003630  22 43 6c 69 63 6b 20 6f  6e 20 69 6e 70 75 74 20  |"Click on input |
00003640  63 6f 6d 70 6f 6e 65 6e  74 73 2c 20 74 6f 20 6d  |components, to m|
00003650  61 6b 65 20 74 68 65 6d  20 77 6f 72 6b 2e 22 2c  |ake them work.",|
00003660  31 36 2c 6f 78 25 2b 33  35 2c 6f 79 25 2d 37 36  |16,ox%+35,oy%-76|
00003670  30 0d 11 da 29 20 c8 99  20 22 57 69 6d 70 5f 47  |0...) .. "Wimp_G|
00003680  65 74 52 65 63 74 61 6e  67 6c 65 22 2c 2c 62 6f  |etRectangle",,bo|
00003690  6b 25 20 b8 20 6d 6f 72  65 25 0d 11 e4 06 20 ce  |k% . more%.... .|
000036a0  0d 11 ee 06 20 e1 0d 11  f8 06 20 3a 0d 12 02 0e  |.... ..... :....|
000036b0  20 dd 20 f2 6c 34 64 72  61 77 0d 12 0c 29 20 c8  | . .l4draw...) .|
000036c0  99 20 22 57 69 6d 70 5f  52 65 64 72 61 77 57 69  |. "Wimp_RedrawWi|
000036d0  6e 64 6f 77 22 2c 2c 62  6f 6b 25 20 b8 20 6d 6f  |ndow",,bok% . mo|
000036e0  72 65 25 0d 12 16 17 20  6f 78 25 3d 62 6f 6b 25  |re%.... ox%=bok%|
000036f0  21 34 2d 62 6f 6b 25 21  32 30 0d 12 20 18 20 6f  |!4-bok%!20.. . o|
00003700  79 25 3d 62 6f 6b 25 21  31 36 2d 62 6f 6b 25 21  |y%=bok%!16-bok%!|
00003710  32 34 0d 12 2a 0d 20 c8  95 20 6d 6f 72 65 25 0d  |24..*. .. more%.|
00003720  12 34 22 20 c8 99 20 22  57 69 6d 70 5f 53 65 74  |.4" .. "Wimp_Set|
00003730  46 6f 6e 74 43 6f 6c 6f  75 72 73 22 2c 2c 31 2c  |FontColours",,1,|
00003740  37 0d 12 3e 1a 20 c8 99  20 22 46 6f 6e 74 5f 53  |7..>. .. "Font_S|
00003750  65 74 46 6f 6e 74 22 2c  66 33 25 0d 12 48 45 20  |etFont",f3%..HE |
00003760  c8 99 20 22 46 6f 6e 74  5f 50 61 69 6e 74 22 2c  |.. "Font_Paint",|
00003770  2c 22 4f 70 65 6e 20 74  68 65 20 63 6f 6e 74 72  |,"Open the contr|
00003780  6f 6c 20 62 6f 78 20 77  69 6e 64 6f 77 2e 22 2c  |ol box window.",|
00003790  31 36 2c 6f 78 25 2b 33  35 2c 6f 79 25 2d 35 30  |16,ox%+35,oy%-50|
000037a0  0d 12 52 3b 20 c8 99 20  22 46 6f 6e 74 5f 50 61  |..R; .. "Font_Pa|
000037b0  69 6e 74 22 2c 2c 22 49  66 20 79 6f 75 20 6e 6f  |int",,"If you no|
000037c0  77 20 74 79 70 65 20 69  6e 22 2c 31 36 2c 6f 78  |w type in",16,ox|
000037d0  25 2b 33 35 2c 6f 79 25  2d 39 35 0d 12 5c 47 20  |%+35,oy%-95..\G |
000037e0  c8 99 20 22 46 6f 6e 74  5f 50 61 69 6e 74 22 2c  |.. "Font_Paint",|
000037f0  2c 22 6f 75 74 70 75 74  20 6c 69 6e 65 20 37 20  |,"output line 7 |
00003800  77 69 6c 6c 20 73 77 69  74 63 68 20 6f 6e 2e 22  |will switch on."|
00003810  2c 31 36 2c 6f 78 25 2b  38 30 32 2c 6f 79 25 2d  |,16,ox%+802,oy%-|
00003820  39 35 0d 12 66 23 20 c8  99 20 22 57 69 6d 70 5f  |95..f# .. "Wimp_|
00003830  53 65 74 46 6f 6e 74 43  6f 6c 6f 75 72 73 22 2c  |SetFontColours",|
00003840  2c 31 2c 31 31 0d 12 70  35 20 c8 99 20 22 46 6f  |,1,11..p5 .. "Fo|
00003850  6e 74 5f 50 61 69 6e 74  22 2c 2c 22 53 57 49 54  |nt_Paint",,"SWIT|
00003860  43 48 20 4f 4e 20 37 22  2c 31 36 2c 6f 78 25 2b  |CH ON 7",16,ox%+|
00003870  33 31 32 2c 6f 79 25 2d  39 35 0d 12 7a 22 20 c8  |312,oy%-95..z" .|
00003880  99 20 22 57 69 6d 70 5f  53 65 74 46 6f 6e 74 43  |. "Wimp_SetFontC|
00003890  6f 6c 6f 75 72 73 22 2c  2c 31 2c 37 0d 12 84 37  |olours",,1,7...7|
000038a0  20 c8 99 20 22 46 6f 6e  74 5f 50 61 69 6e 74 22  | .. "Font_Paint"|
000038b0  2c 2c 22 4e 6f 77 20 74  72 79 20 74 68 69 73 2e  |,,"Now try this.|
000038c0  22 2c 31 36 2c 6f 78 25  2b 33 35 2c 6f 79 25 2d  |",16,ox%+35,oy%-|
000038d0  31 34 30 0d 12 8e 23 20  c8 99 20 22 57 69 6d 70  |140...# .. "Wimp|
000038e0  5f 53 65 74 46 6f 6e 74  43 6f 6c 6f 75 72 73 22  |_SetFontColours"|
000038f0  2c 2c 31 2c 31 31 0d 12  98 3a 20 c8 99 20 22 46  |,,1,11...: .. "F|
00003900  6f 6e 74 5f 50 61 69 6e  74 22 2c 2c 22 53 57 49  |ont_Paint",,"SWI|
00003910  54 43 48 20 4f 4e 20 31  2c 34 2c 38 22 2c 31 36  |TCH ON 1,4,8",16|
00003920  2c 6f 78 25 2b 32 33 34  2c 6f 79 25 2d 31 34 30  |,ox%+234,oy%-140|
00003930  0d 12 a2 22 20 c8 99 20  22 57 69 6d 70 5f 53 65  |..." .. "Wimp_Se|
00003940  74 46 6f 6e 74 43 6f 6c  6f 75 72 73 22 2c 2c 31  |tFontColours",,1|
00003950  2c 37 0d 12 ac 52 20 c8  99 20 22 46 6f 6e 74 5f  |,7...R .. "Font_|
00003960  50 61 69 6e 74 22 2c 2c  22 4f 75 74 70 75 74 20  |Paint",,"Output |
00003970  6c 69 6e 65 73 20 31 2c  20 34 20 61 6e 64 20 38  |lines 1, 4 and 8|
00003980  20 61 72 65 20 73 77 69  74 63 68 65 64 20 6f 6e  | are switched on|
00003990  2e 22 2c 31 36 2c 6f 78  25 2b 33 35 2c 6f 79 25  |.",16,ox%+35,oy%|
000039a0  2d 31 38 35 0d 12 b6 6e  20 c8 99 20 22 46 6f 6e  |-185...n .. "Fon|
000039b0  74 5f 50 61 69 6e 74 22  2c 2c 22 57 69 74 68 20  |t_Paint",,"With |
000039c0  74 68 65 20 6f 75 74 70  75 74 20 6c 69 6e 65 73  |the output lines|
000039d0  20 73 77 69 74 63 68 65  64 20 6f 6e 2c 20 79 6f  | switched on, yo|
000039e0  75 20 77 69 6c 6c 20 6e  65 65 64 20 74 6f 20 73  |u will need to s|
000039f0  77 69 74 63 68 20 74 68  65 6d 20 6f 66 66 2e 22  |witch them off."|
00003a00  2c 31 36 2c 6f 78 25 2b  33 35 2c 6f 79 25 2d 32  |,16,ox%+35,oy%-2|
00003a10  33 30 0d 12 c0 3c 20 c8  99 20 22 46 6f 6e 74 5f  |30...< .. "Font_|
00003a20  50 61 69 6e 74 22 2c 2c  22 54 6f 20 64 6f 20 74  |Paint",,"To do t|
00003a30  68 69 73 20 74 79 70 65  20 69 6e 22 2c 31 36 2c  |his type in",16,|
00003a40  6f 78 25 2b 33 35 2c 6f  79 25 2d 32 37 35 0d 12  |ox%+35,oy%-275..|
00003a50  ca 23 20 c8 99 20 22 57  69 6d 70 5f 53 65 74 46  |.# .. "Wimp_SetF|
00003a60  6f 6e 74 43 6f 6c 6f 75  72 73 22 2c 2c 31 2c 31  |ontColours",,1,1|
00003a70  31 0d 12 d4 3d 20 c8 99  20 22 46 6f 6e 74 5f 50  |1...= .. "Font_P|
00003a80  61 69 6e 74 22 2c 2c 22  53 57 49 54 43 48 20 4f  |aint",,"SWITCH O|
00003a90  46 46 20 31 2c 34 2c 37  2c 38 22 2c 31 36 2c 6f  |FF 1,4,7,8",16,o|
00003aa0  78 25 2b 33 30 32 2c 6f  79 25 2d 32 37 35 0d 12  |x%+302,oy%-275..|
00003ab0  de 22 20 c8 99 20 22 57  69 6d 70 5f 53 65 74 46  |." .. "Wimp_SetF|
00003ac0  6f 6e 74 43 6f 6c 6f 75  72 73 22 2c 2c 31 2c 37  |ontColours",,1,7|
00003ad0  0d 12 e8 78 20 c8 99 20  22 46 6f 6e 74 5f 50 61  |...x .. "Font_Pa|
00003ae0  69 6e 74 22 2c 2c 22 54  68 65 20 72 65 64 20 6c  |int",,"The red l|
00003af0  2e 65 2e 64 20 6e 65 78  74 20 74 6f 20 6c 69 6e  |.e.d next to lin|
00003b00  65 73 20 31 2c 20 34 2c  20 37 20 61 6e 64 20 38  |es 1, 4, 7 and 8|
00003b10  20 77 69 6c 6c 20 62 65  20 75 6e 6c 69 74 20 69  | will be unlit i|
00003b20  2e 65 2e 20 6f 66 66 2e  20 42 75 74 20 74 68 65  |.e. off. But the|
00003b30  20 62 75 6c 62 22 2c 31  36 2c 6f 78 25 2b 33 35  | bulb",16,ox%+35|
00003b40  2c 6f 79 25 2d 33 32 30  0d 12 f2 71 20 c8 99 20  |,oy%-320...q .. |
00003b50  22 46 6f 6e 74 5f 50 61  69 6e 74 22 2c 2c 22 69  |"Font_Paint",,"i|
00003b60  73 20 73 74 69 6c 6c 20  6f 6e 20 21 2e 59 6f 75  |s still on !.You|
00003b70  20 68 61 76 65 20 6e 6f  77 20 6c 65 61 72 6e 74  | have now learnt|
00003b80  20 68 6f 77 20 74 6f 20  70 72 6f 67 72 61 6d 20  | how to program |
00003b90  74 68 65 20 63 6f 6d 70  75 74 65 72 20 74 6f 20  |the computer to |
00003ba0  74 75 72 6e 20 20 22 2c  31 36 2c 6f 78 25 2b 33  |turn  ",16,ox%+3|
00003bb0  35 2c 6f 79 25 2d 33 36  35 0d 12 fc 4a 20 c8 99  |5,oy%-365...J ..|
00003bc0  20 22 46 6f 6e 74 5f 50  61 69 6e 74 22 2c 2c 22  | "Font_Paint",,"|
00003bd0  63 6f 6d 70 6f 6e 65 6e  74 73 20 6f 6e 20 6f 72  |components on or|
00003be0  20 6f 66 66 2e 20 57 65  6c 6c 20 64 6f 6e 65 21  | off. Well done!|
00003bf0  22 2c 31 36 2c 6f 78 25  2b 33 35 2c 6f 79 25 2d  |",16,ox%+35,oy%-|
00003c00  34 31 30 0d 13 06 70 20  c8 99 20 22 46 6f 6e 74  |410...p .. "Font|
00003c10  5f 50 61 69 6e 74 22 2c  2c 22 57 65 20 6d 65 6e  |_Paint",,"We men|
00003c20  74 69 6f 6e 65 64 20 65  61 72 6c 69 65 72 20 74  |tioned earlier t|
00003c30  68 61 74 20 79 6f 75 20  63 6f 75 6c 64 20 75 73  |hat you could us|
00003c40  65 20 64 69 66 66 65 72  65 6e 74 20 6e 75 6d 62  |e different numb|
00003c50  65 72 73 20 66 72 6f 6d  20 31 20 74 6f 20 38 2e  |ers from 1 to 8.|
00003c60  22 2c 31 36 2c 6f 78 25  2b 33 35 2c 6f 79 25 2d  |",16,ox%+35,oy%-|
00003c70  34 35 35 0d 13 10 6b 20  c8 99 20 22 46 6f 6e 74  |455...k .. "Font|
00003c80  5f 50 61 69 6e 74 22 2c  2c 22 57 65 20 75 73 65  |_Paint",,"We use|
00003c90  64 20 74 68 65 20 77 6f  72 64 20 74 6f 2e 54 68  |d the word to.Th|
00003ca0  69 73 20 69 73 20 61 20  63 6f 6d 6d 61 6e 64 20  |is is a command |
00003cb0  77 6f 72 64 20 62 75 74  20 6e 65 65 64 73 20 74  |word but needs t|
00003cc0  6f 20 62 65 20 74 79 70  65 64 20 22 2c 31 36 2c  |o be typed ",16,|
00003cd0  6f 78 25 2b 33 35 2c 6f  79 25 2d 35 30 30 0d 13  |ox%+35,oy%-500..|
00003ce0  1a 3b 20 c8 99 20 22 46  6f 6e 74 5f 50 61 69 6e  |.; .. "Font_Pain|
00003cf0  74 22 2c 2c 22 69 6e 20  63 61 70 69 74 61 6c 73  |t",,"in capitals|
00003d00  2e 20 54 68 65 20 22 2c  31 36 2c 6f 78 25 2b 33  |. The ",16,ox%+3|
00003d10  35 2c 6f 79 25 2d 35 34  35 0d 13 24 58 20 c8 99  |5,oy%-545..$X ..|
00003d20  20 22 46 6f 6e 74 5f 50  61 69 6e 74 22 2c 2c 22  | "Font_Paint",,"|
00003d30  63 6f 6d 6d 61 6e 64 20  73 61 76 65 73 20 75 73  |command saves us|
00003d40  20 74 69 6d 65 20 77 68  65 6e 20 77 65 20 6e 65  | time when we ne|
00003d50  65 64 20 74 6f 20 6d 61  6b 65 20 61 20 22 2c 31  |ed to make a ",1|
00003d60  36 2c 6f 78 25 2b 33 33  30 2c 6f 79 25 2d 35 34  |6,ox%+330,oy%-54|
00003d70  35 0d 13 2e 23 20 c8 99  20 22 57 69 6d 70 5f 53  |5...# .. "Wimp_S|
00003d80  65 74 46 6f 6e 74 43 6f  6c 6f 75 72 73 22 2c 2c  |etFontColours",,|
00003d90  31 2c 31 31 0d 13 38 2d  20 c8 99 20 22 46 6f 6e  |1,11..8- .. "Fon|
00003da0  74 5f 50 61 69 6e 74 22  2c 2c 22 54 4f 22 2c 31  |t_Paint",,"TO",1|
00003db0  36 2c 6f 78 25 2b 32 37  30 2c 6f 79 25 2d 35 34  |6,ox%+270,oy%-54|
00003dc0  35 0d 13 42 22 20 c8 99  20 22 57 69 6d 70 5f 53  |5..B" .. "Wimp_S|
00003dd0  65 74 46 6f 6e 74 43 6f  6c 6f 75 72 73 22 2c 2c  |etFontColours",,|
00003de0  31 2c 37 0d 13 4c 62 20  c8 99 20 22 46 6f 6e 74  |1,7..Lb .. "Font|
00003df0  5f 50 61 69 6e 74 22 2c  2c 22 77 68 6f 6c 65 20  |_Paint",,"whole |
00003e00  67 72 6f 75 70 20 6f 66  20 6f 75 74 70 75 74 20  |group of output |
00003e10  6c 69 6e 65 73 20 73 77  69 74 63 68 20 6f 6e 20  |lines switch on |
00003e20  6f 72 20 6f 66 66 20 61  6c 74 6f 67 65 74 68 65  |or off altogethe|
00003e30  72 2e 22 2c 31 36 2c 6f  78 25 2b 33 35 2c 6f 79  |r.",16,ox%+35,oy|
00003e40  25 2d 35 39 30 0d 13 56  41 20 c8 99 20 22 46 6f  |%-590..VA .. "Fo|
00003e50  6e 74 5f 50 61 69 6e 74  22 2c 2c 22 54 72 79 20  |nt_Paint",,"Try |
00003e60  74 68 69 73 20 63 6f 6d  6d 61 6e 64 20 6c 69 6e  |this command lin|
00003e70  65 2e 20 22 2c 31 36 2c  6f 78 25 2b 33 35 2c 6f  |e. ",16,ox%+35,o|
00003e80  79 25 2d 36 33 35 0d 13  60 23 20 c8 99 20 22 57  |y%-635..`# .. "W|
00003e90  69 6d 70 5f 53 65 74 46  6f 6e 74 43 6f 6c 6f 75  |imp_SetFontColou|
00003ea0  72 73 22 2c 2c 31 2c 31  31 0d 13 6a 3b 20 c8 99  |rs",,1,11..j; ..|
00003eb0  20 22 46 6f 6e 74 5f 50  61 69 6e 74 22 2c 2c 22  | "Font_Paint",,"|
00003ec0  53 57 49 54 43 48 20 4f  4e 20 31 20 54 4f 20 38  |SWITCH ON 1 TO 8|
00003ed0  22 2c 31 36 2c 6f 78 25  2b 33 39 30 2c 6f 79 25  |",16,ox%+390,oy%|
00003ee0  2d 36 33 35 0d 13 74 22  20 c8 99 20 22 57 69 6d  |-635..t" .. "Wim|
00003ef0  70 5f 53 65 74 46 6f 6e  74 43 6f 6c 6f 75 72 73  |p_SetFontColours|
00003f00  22 2c 2c 31 2c 37 0d 13  7e 70 20 c8 99 20 22 46  |",,1,7..~p .. "F|
00003f10  6f 6e 74 5f 50 61 69 6e  74 22 2c 2c 22 41 6c 6c  |ont_Paint",,"All|
00003f20  20 74 68 65 20 6c 2e 65  2e 64 27 73 20 77 69 6c  | the l.e.d's wil|
00003f30  6c 20 62 65 20 6c 69 74  20 75 70 20 6f 6e 20 74  |l be lit up on t|
00003f40  68 65 20 6f 75 74 70 75  74 20 6c 69 6e 65 73 20  |he output lines |
00003f50  6f 66 20 74 68 65 20 63  6f 6e 74 72 6f 6c 20 62  |of the control b|
00003f60  6f 78 2e 22 2c 31 36 2c  6f 78 25 2b 33 35 2c 6f  |ox.",16,ox%+35,o|
00003f70  79 25 2d 36 38 30 0d 13  88 5c 20 c8 99 20 22 46  |y%-680...\ .. "F|
00003f80  6f 6e 74 5f 50 61 69 6e  74 22 2c 2c 22 53 77 69  |ont_Paint",,"Swi|
00003f90  74 63 68 69 6e 67 20 61  6c 6c 20 6f 66 20 74 68  |tching all of th|
00003fa0  65 73 65 20 6f 66 66 20  69 73 20 73 69 6d 70 6c  |ese off is simpl|
00003fb0  65 21 20 4a 75 73 74 20  74 79 70 65 20 69 6e 22  |e! Just type in"|
00003fc0  2c 31 36 2c 6f 78 25 2b  33 35 2c 6f 79 25 2d 37  |,16,ox%+35,oy%-7|
00003fd0  32 35 0d 13 92 23 20 c8  99 20 22 57 69 6d 70 5f  |25...# .. "Wimp_|
00003fe0  53 65 74 46 6f 6e 74 43  6f 6c 6f 75 72 73 22 2c  |SetFontColours",|
00003ff0  2c 31 2c 31 31 0d 13 9c  3b 20 c8 99 20 22 46 6f  |,1,11...; .. "Fo|
00004000  6e 74 5f 50 61 69 6e 74  22 2c 2c 22 53 57 49 54  |nt_Paint",,"SWIT|
00004010  43 48 20 4f 46 46 20 31  20 54 4f 20 38 22 2c 31  |CH OFF 1 TO 8",1|
00004020  36 2c 6f 78 25 2b 33 35  2c 6f 79 25 2d 37 37 30  |6,ox%+35,oy%-770|
00004030  0d 13 a6 29 20 c8 99 20  22 57 69 6d 70 5f 47 65  |...) .. "Wimp_Ge|
00004040  74 52 65 63 74 61 6e 67  6c 65 22 2c 2c 62 6f 6b  |tRectangle",,bok|
00004050  25 20 b8 20 6d 6f 72 65  25 0d 13 b0 06 20 ce 0d  |% . more%.... ..|
00004060  13 ba 06 20 e1 0d 13 c4  06 20 3a 0d 13 ce 0e 20  |... ..... :.... |
00004070  dd 20 f2 6c 35 64 72 61  77 0d 13 d8 29 20 c8 99  |. .l5draw...) ..|
00004080  20 22 57 69 6d 70 5f 52  65 64 72 61 77 57 69 6e  | "Wimp_RedrawWin|
00004090  64 6f 77 22 2c 2c 62 6f  6b 25 20 b8 20 6d 6f 72  |dow",,bok% . mor|
000040a0  65 25 0d 13 e2 17 20 6f  78 25 3d 62 6f 6b 25 21  |e%.... ox%=bok%!|
000040b0  34 2d 62 6f 6b 25 21 32  30 0d 13 ec 18 20 6f 79  |4-bok%!20.... oy|
000040c0  25 3d 62 6f 6b 25 21 31  36 2d 62 6f 6b 25 21 32  |%=bok%!16-bok%!2|
000040d0  34 0d 13 f6 0d 20 c8 95  20 6d 6f 72 65 25 0d 14  |4.... .. more%..|
000040e0  00 22 20 c8 99 20 22 57  69 6d 70 5f 53 65 74 46  |." .. "Wimp_SetF|
000040f0  6f 6e 74 43 6f 6c 6f 75  72 73 22 2c 2c 31 2c 37  |ontColours",,1,7|
00004100  0d 14 0a 1a 20 c8 99 20  22 46 6f 6e 74 5f 53 65  |.... .. "Font_Se|
00004110  74 46 6f 6e 74 22 2c 66  33 25 0d 14 14 70 20 c8  |tFont",f3%...p .|
00004120  99 20 22 46 6f 6e 74 5f  50 61 69 6e 74 22 2c 2c  |. "Font_Paint",,|
00004130  22 53 69 6d 70 6c 65 20  43 6f 6e 74 72 6f 6c 20  |"Simple Control |
00004140  69 73 20 74 68 65 20 75  73 65 72 20 66 72 69 65  |is the user frie|
00004150  6e 64 6c 79 20 70 72 6f  67 72 61 6d 20 66 6f 72  |ndly program for|
00004160  20 6c 65 61 72 6e 69 6e  67 20 61 62 6f 75 74 20  | learning about |
00004170  63 6f 6e 74 72 6f 6c 2e  22 2c 31 36 2c 6f 78 25  |control.",16,ox%|
00004180  2b 37 35 2c 6f 79 25 2d  35 30 0d 14 1e 52 20 c8  |+75,oy%-50...R .|
00004190  99 20 22 46 6f 6e 74 5f  50 61 69 6e 74 22 2c 2c  |. "Font_Paint",,|
000041a0  22 53 69 6d 70 6c 65 20  43 6f 6e 74 72 6f 6c 20  |"Simple Control |
000041b0  63 6f 6d 65 73 20 77 69  74 68 20 66 6f 75 72 20  |comes with four |
000041c0  70 72 6f 67 72 61 6d 73  20 2d 22 2c 31 36 2c 6f  |programs -",16,o|
000041d0  78 25 2b 37 35 2c 6f 79  25 2d 39 35 0d 14 28 60  |x%+75,oy%-95..(`|
000041e0  20 c8 99 20 22 46 6f 6e  74 5f 50 61 69 6e 74 22  | .. "Font_Paint"|
000041f0  2c 2c 22 44 69 72 65 63  74 20 43 6f 6e 74 72 6f  |,,"Direct Contro|
00004200  6c 20 2d 20 50 6f 69 6e  74 20 61 6e 64 20 63 6c  |l - Point and cl|
00004210  69 63 6b 20 63 6f 6e 74  72 6f 6c 20 77 69 74 68  |ick control with|
00004220  20 69 6e 70 75 74 73 2c  20 22 2c 31 36 2c 6f 78  | inputs, ",16,ox|
00004230  25 2b 37 35 2c 6f 79 25  2d 31 34 30 0d 14 32 4a  |%+75,oy%-140..2J|
00004240  20 c8 99 20 22 46 6f 6e  74 5f 50 61 69 6e 74 22  | .. "Font_Paint"|
00004250  2c 2c 22 6f 75 74 70 75  74 73 20 61 6e 64 20 63  |,,"outputs and c|
00004260  6f 6e 74 72 6f 6c 20 62  6f 78 20 77 69 6e 64 6f  |ontrol box windo|
00004270  77 73 2e 22 2c 31 36 2c  6f 78 25 2b 37 35 2c 6f  |ws.",16,ox%+75,o|
00004280  79 25 2d 31 38 35 0d 14  3c 65 20 c8 99 20 22 46  |y%-185..<e .. "F|
00004290  6f 6e 74 5f 50 61 69 6e  74 22 2c 2c 22 43 6f 6d  |ont_Paint",,"Com|
000042a0  70 75 74 65 72 20 43 6f  6e 74 72 6f 6c 20 2d 20  |puter Control - |
000042b0  49 6e 74 72 6f 64 75 63  65 73 20 70 72 6f 67 72  |Introduces progr|
000042c0  61 6d 6d 69 6e 67 20 74  68 65 20 63 6f 6d 70 75  |amming the compu|
000042d0  74 65 72 20 77 69 74 68  22 2c 31 36 2c 6f 78 25  |ter with",16,ox%|
000042e0  2b 37 35 2c 6f 79 25 2d  32 33 30 0d 14 46 6c 20  |+75,oy%-230..Fl |
000042f0  c8 99 20 22 46 6f 6e 74  5f 50 61 69 6e 74 22 2c  |.. "Font_Paint",|
00004300  2c 22 4c 4f 47 4f 20 73  74 79 6c 65 20 63 6f 6d  |,"LOGO style com|
00004310  6d 61 6e 64 73 20 77 68  69 63 68 20 69 6e 74 65  |mands which inte|
00004320  72 61 63 74 20 77 69 74  68 20 74 68 65 20 73 69  |ract with the si|
00004330  6d 75 6c 61 74 65 64 20  63 6f 6e 74 72 6f 6c 20  |mulated control |
00004340  62 6f 78 2e 22 2c 31 36  2c 6f 78 25 2b 37 35 2c  |box.",16,ox%+75,|
00004350  6f 79 25 2d 32 37 35 0d  14 50 56 20 c8 99 20 22  |oy%-275..PV .. "|
00004360  46 6f 6e 74 5f 50 61 69  6e 74 22 2c 2c 22 42 75  |Font_Paint",,"Bu|
00004370  67 67 79 20 2d 20 54 68  65 20 63 6f 6e 74 72 6f  |ggy - The contro|
00004380  6c 20 62 6f 78 20 69 73  20 75 73 65 64 20 74 6f  |l box is used to|
00004390  20 63 6f 6e 74 72 6f 6c  20 61 22 2c 31 36 2c 6f  | control a",16,o|
000043a0  78 25 2b 37 35 2c 6f 79  25 2d 33 32 30 0d 14 5a  |x%+75,oy%-320..Z|
000043b0  3b 20 c8 99 20 22 46 6f  6e 74 5f 50 61 69 6e 74  |; .. "Font_Paint|
000043c0  22 2c 2c 22 20 73 69 6d  75 6c 61 74 65 64 20 62  |",," simulated b|
000043d0  75 67 67 79 2e 22 2c 31  36 2c 6f 78 25 2b 37 35  |uggy.",16,ox%+75|
000043e0  2c 6f 79 25 2d 33 36 35  0d 14 64 64 20 c8 99 20  |,oy%-365..dd .. |
000043f0  22 46 6f 6e 74 5f 50 61  69 6e 74 22 2c 2c 22 43  |"Font_Paint",,"C|
00004400  6f 6e 74 72 6f 6c 20 53  69 6d 75 6c 61 74 69 6f  |ontrol Simulatio|
00004410  6e 73 20 2d 20 53 65 76  65 72 61 6c 20 65 78 61  |ns - Several exa|
00004420  6d 70 6c 65 73 20 6f 66  20 63 6f 6e 74 72 6f 6c  |mples of control|
00004430  20 73 79 73 74 65 6d 73  2e 22 2c 31 36 2c 6f 78  | systems.",16,ox|
00004440  25 2b 37 35 2c 6f 79 25  2d 34 31 30 0d 14 6e 2b  |%+75,oy%-410..n+|
00004450  20 c8 99 20 22 46 6f 6e  74 5f 50 61 69 6e 74 22  | .. "Font_Paint"|
00004460  2c 2c 22 22 2c 31 36 2c  6f 78 25 2b 32 30 30 2c  |,,"",16,ox%+200,|
00004470  6f 79 25 2d 34 31 30 0d  14 78 29 20 c8 99 20 22  |oy%-410..x) .. "|
00004480  57 69 6d 70 5f 47 65 74  52 65 63 74 61 6e 67 6c  |Wimp_GetRectangl|
00004490  65 22 2c 2c 62 6f 6b 25  20 b8 20 6d 6f 72 65 25  |e",,bok% . more%|
000044a0  0d 14 82 06 20 ce 0d 14  8c 06 20 e1 0d 14 96 06  |.... ..... .....|
000044b0  20 3a 0d 14 a0 0f 20 dd  20 f2 6c 31 31 64 72 61  | :.... . .l11dra|
000044c0  77 0d 14 aa 29 20 c8 99  20 22 57 69 6d 70 5f 52  |w...) .. "Wimp_R|
000044d0  65 64 72 61 77 57 69 6e  64 6f 77 22 2c 2c 62 6f  |edrawWindow",,bo|
000044e0  6b 25 20 b8 20 6d 6f 72  65 25 0d 14 b4 17 20 6f  |k% . more%.... o|
000044f0  78 25 3d 62 6f 6b 25 21  34 2d 62 6f 6b 25 21 32  |x%=bok%!4-bok%!2|
00004500  30 0d 14 be 18 20 6f 79  25 3d 62 6f 6b 25 21 31  |0.... oy%=bok%!1|
00004510  36 2d 62 6f 6b 25 21 32  34 0d 14 c8 0d 20 c8 95  |6-bok%!24.... ..|
00004520  20 6d 6f 72 65 25 0d 14  d2 22 20 c8 99 20 22 57  | more%..." .. "W|
00004530  69 6d 70 5f 53 65 74 46  6f 6e 74 43 6f 6c 6f 75  |imp_SetFontColou|
00004540  72 73 22 2c 2c 31 2c 38  0d 14 dc 1a 20 c8 99 20  |rs",,1,8.... .. |
00004550  22 46 6f 6e 74 5f 53 65  74 46 6f 6e 74 22 2c 58  |"Font_SetFont",X|
00004560  31 25 0d 14 e6 41 20 c8  99 20 22 46 6f 6e 74 5f  |1%...A .. "Font_|
00004570  50 61 69 6e 74 22 2c 2c  22 43 6f 6d 70 75 74 65  |Paint",,"Compute|
00004580  72 20 43 6f 6e 74 72 6f  6c 20 28 44 65 6d 6f 29  |r Control (Demo)|
00004590  22 2c 31 36 2c 6f 78 25  2b 32 31 38 2c 6f 79 25  |",16,ox%+218,oy%|
000045a0  2d 39 35 0d 14 f0 22 20  c8 99 20 22 57 69 6d 70  |-95..." .. "Wimp|
000045b0  5f 53 65 74 46 6f 6e 74  43 6f 6c 6f 75 72 73 22  |_SetFontColours"|
000045c0  2c 2c 31 2c 37 0d 14 fa  1a 20 c8 99 20 22 46 6f  |,,1,7.... .. "Fo|
000045d0  6e 74 5f 53 65 74 46 6f  6e 74 22 2c 66 33 25 0d  |nt_SetFont",f3%.|
000045e0  15 04 41 20 c8 99 20 22  46 6f 6e 74 5f 50 61 69  |..A .. "Font_Pai|
000045f0  6e 74 22 2c 2c 22 43 6c  69 63 6b 20 6f 6e 20 69  |nt",,"Click on i|
00004600  63 6f 6e 20 74 6f 20 73  74 61 72 74 22 2c 31 36  |con to start",16|
00004610  2c 6f 78 25 2b 37 36 32  2c 6f 79 25 2d 37 36 30  |,ox%+762,oy%-760|
00004620  0d 15 0e 47 20 c8 99 20  22 46 6f 6e 74 5f 50 61  |...G .. "Font_Pa|
00004630  69 6e 74 22 2c 2c 22 41  20 6d 6f 64 75 6c 65 20  |int",,"A module |
00004640  66 72 6f 6d 20 53 69 6d  70 6c 65 20 43 6f 6e 74  |from Simple Cont|
00004650  72 6f 6c 22 2c 31 36 2c  6f 78 25 2b 33 38 30 2c  |rol",16,ox%+380,|
00004660  6f 79 25 2d 31 35 30 0d  15 18 29 20 c8 99 20 22  |oy%-150...) .. "|
00004670  57 69 6d 70 5f 47 65 74  52 65 63 74 61 6e 67 6c  |Wimp_GetRectangl|
00004680  65 22 2c 2c 62 6f 6b 25  20 b8 20 6d 6f 72 65 25  |e",,bok% . more%|
00004690  0d 15 22 06 20 ce 0d 15  2c 06 20 e1 0d 15 36 06  |..". ...,. ...6.|
000046a0  20 3a 0d 15 40 0f 20 dd  20 f2 6c 32 31 64 72 61  | :..@. . .l21dra|
000046b0  77 0d 15 4a 29 20 c8 99  20 22 57 69 6d 70 5f 52  |w..J) .. "Wimp_R|
000046c0  65 64 72 61 77 57 69 6e  64 6f 77 22 2c 2c 62 6f  |edrawWindow",,bo|
000046d0  6b 25 20 b8 20 6d 6f 72  65 25 0d 15 54 17 20 6f  |k% . more%..T. o|
000046e0  78 25 3d 62 6f 6b 25 21  34 2d 62 6f 6b 25 21 32  |x%=bok%!4-bok%!2|
000046f0  30 0d 15 5e 18 20 6f 79  25 3d 62 6f 6b 25 21 31  |0..^. oy%=bok%!1|
00004700  36 2d 62 6f 6b 25 21 32  34 0d 15 68 0d 20 c8 95  |6-bok%!24..h. ..|
00004710  20 6d 6f 72 65 25 0d 15  72 22 20 c8 99 20 22 57  | more%..r" .. "W|
00004720  69 6d 70 5f 53 65 74 46  6f 6e 74 43 6f 6c 6f 75  |imp_SetFontColou|
00004730  72 73 22 2c 2c 31 2c 37  0d 15 7c 1a 20 c8 99 20  |rs",,1,7..|. .. |
00004740  22 46 6f 6e 74 5f 53 65  74 46 6f 6e 74 22 2c 66  |"Font_SetFont",f|
00004750  33 25 0d 15 86 69 20 c8  99 20 22 46 6f 6e 74 5f  |3%...i .. "Font_|
00004760  50 61 69 6e 74 22 2c 2c  22 4f 75 72 20 63 6f 6d  |Paint",,"Our com|
00004770  70 75 74 65 72 20 20 20  20 20 20 20 20 20 63 6f  |puter         co|
00004780  6e 74 72 6f 6c 73 20 63  6f 6d 70 6f 6e 65 6e 74  |ntrols component|
00004790  73 20 74 68 72 6f 75 67  68 20 61 20 63 6f 6e 74  |s through a cont|
000047a0  72 6f 6c 20 62 6f 78 2e  20 22 2c 31 36 2c 6f 78  |rol box. ",16,ox|
000047b0  25 2b 33 35 2c 6f 79 25  2d 35 30 0d 15 90 73 20  |%+35,oy%-50...s |
000047c0  c8 99 20 22 46 6f 6e 74  5f 50 61 69 6e 74 22 2c  |.. "Font_Paint",|
000047d0  2c 22 54 68 65 20 63 6f  6e 74 72 6f 6c 20 62 6f  |,"The control bo|
000047e0  78 20 69 73 20 61 20 73  70 65 63 69 61 6c 20 70  |x is a special p|
000047f0  69 65 63 65 20 6f 66 20  65 71 75 69 70 6d 65 6e  |iece of equipmen|
00004800  74 20 63 6f 6e 6e 65 63  74 65 64 20 74 6f 20 74  |t connected to t|
00004810  68 65 20 63 6f 6d 70 75  74 65 72 2e 22 2c 31 36  |he computer.",16|
00004820  2c 6f 78 25 2b 33 35 2c  6f 79 25 2d 39 35 0d 15  |,ox%+35,oy%-95..|
00004830  9a 22 20 c8 99 20 22 57  69 6d 70 5f 53 65 74 46  |." .. "Wimp_SetF|
00004840  6f 6e 74 43 6f 6c 6f 75  72 73 22 2c 2c 31 2c 38  |ontColours",,1,8|
00004850  0d 15 a4 34 20 c8 99 20  22 46 6f 6e 74 5f 50 61  |...4 .. "Font_Pa|
00004860  69 6e 74 22 2c 2c 22 4d  61 69 6e 73 20 6c 65 61  |int",,"Mains lea|
00004870  64 22 2c 31 36 2c 6f 78  25 2b 33 35 2c 6f 79 25  |d",16,ox%+35,oy%|
00004880  2d 31 37 38 0d 15 ae 37  20 c8 99 20 22 46 6f 6e  |-178...7 .. "Fon|
00004890  74 5f 50 61 69 6e 74 22  2c 2c 22 54 6f 20 63 6f  |t_Paint",,"To co|
000048a0  6d 70 75 74 65 72 22 2c  31 36 2c 6f 78 25 2b 31  |mputer",16,ox%+1|
000048b0  30 33 30 2c 6f 79 25 2d  31 37 38 0d 15 b8 22 20  |030,oy%-178..." |
000048c0  c8 99 20 22 57 69 6d 70  5f 53 65 74 46 6f 6e 74  |.. "Wimp_SetFont|
000048d0  43 6f 6c 6f 75 72 73 22  2c 2c 31 2c 37 0d 15 c2  |Colours",,1,7...|
000048e0  35 20 c8 99 20 22 46 6f  6e 74 5f 50 61 69 6e 74  |5 .. "Font_Paint|
000048f0  22 2c 2c 22 54 68 69 73  20 6c 65 61 64 22 2c 31  |",,"This lead",1|
00004900  36 2c 6f 78 25 2b 31 30  33 30 2c 6f 79 25 2d 33  |6,ox%+1030,oy%-3|
00004910  30 35 0d 15 cc 38 20 c8  99 20 22 46 6f 6e 74 5f  |05...8 .. "Font_|
00004920  50 61 69 6e 74 22 2c 2c  22 63 6f 6e 6e 65 63 74  |Paint",,"connect|
00004930  73 20 74 68 65 22 2c 31  36 2c 6f 78 25 2b 31 30  |s the",16,ox%+10|
00004940  33 30 2c 6f 79 25 2d 33  35 30 0d 15 d6 37 20 c8  |30,oy%-350...7 .|
00004950  99 20 22 46 6f 6e 74 5f  50 61 69 6e 74 22 2c 2c  |. "Font_Paint",,|
00004960  22 63 6f 6e 74 72 6f 6c  20 62 6f 78 22 2c 31 36  |"control box",16|
00004970  2c 6f 78 25 2b 31 30 33  30 2c 6f 79 25 2d 33 39  |,ox%+1030,oy%-39|
00004980  35 0d 15 e0 32 20 c8 99  20 22 46 6f 6e 74 5f 50  |5...2 .. "Font_P|
00004990  61 69 6e 74 22 2c 2c 22  74 6f 20 74 68 65 22 2c  |aint",,"to the",|
000049a0  31 36 2c 6f 78 25 2b 31  30 33 30 2c 6f 79 25 2d  |16,ox%+1030,oy%-|
000049b0  34 34 30 0d 15 ea 35 20  c8 99 20 22 46 6f 6e 74  |440...5 .. "Font|
000049c0  5f 50 61 69 6e 74 22 2c  2c 22 63 6f 6d 70 75 74  |_Paint",,"comput|
000049d0  65 72 2e 22 2c 31 36 2c  6f 78 25 2b 31 30 33 30  |er.",16,ox%+1030|
000049e0  2c 6f 79 25 2d 34 38 35  0d 15 f4 33 20 c8 99 20  |,oy%-485...3 .. |
000049f0  22 46 6f 6e 74 5f 50 61  69 6e 74 22 2c 2c 22 54  |"Font_Paint",,"T|
00004a00  68 69 73 20 6c 65 61 64  22 2c 31 36 2c 6f 78 25  |his lead",16,ox%|
00004a10  2b 33 35 2c 6f 79 25 2d  32 34 35 0d 15 fe 36 20  |+35,oy%-245...6 |
00004a20  c8 99 20 22 46 6f 6e 74  5f 50 61 69 6e 74 22 2c  |.. "Font_Paint",|
00004a30  2c 22 63 6f 6e 6e 65 63  74 73 20 74 68 65 22 2c  |,"connects the",|
00004a40  31 36 2c 6f 78 25 2b 33  35 2c 6f 79 25 2d 32 39  |16,ox%+35,oy%-29|
00004a50  30 0d 16 08 35 20 c8 99  20 22 46 6f 6e 74 5f 50  |0...5 .. "Font_P|
00004a60  61 69 6e 74 22 2c 2c 22  63 6f 6e 74 72 6f 6c 20  |aint",,"control |
00004a70  62 6f 78 22 2c 31 36 2c  6f 78 25 2b 33 35 2c 6f  |box",16,ox%+35,o|
00004a80  79 25 2d 33 33 35 0d 16  12 32 20 c8 99 20 22 46  |y%-335...2 .. "F|
00004a90  6f 6e 74 5f 50 61 69 6e  74 22 2c 2c 22 74 6f 20  |ont_Paint",,"to |
00004aa0  6d 61 69 6e 73 22 2c 31  36 2c 6f 78 25 2b 33 35  |mains",16,ox%+35|
00004ab0  2c 6f 79 25 2d 33 38 30  0d 16 1c 36 20 c8 99 20  |,oy%-380...6 .. |
00004ac0  22 46 6f 6e 74 5f 50 61  69 6e 74 22 2c 2c 22 65  |"Font_Paint",,"e|
00004ad0  6c 65 63 74 72 69 63 69  74 79 2e 22 2c 31 36 2c  |lectricity.",16,|
00004ae0  6f 78 25 2b 33 35 2c 6f  79 25 2d 34 32 35 0d 16  |ox%+35,oy%-425..|
00004af0  26 23 20 c8 99 20 22 57  69 6d 70 5f 53 65 74 46  |&# .. "Wimp_SetF|
00004b00  6f 6e 74 43 6f 6c 6f 75  72 73 22 2c 2c 31 2c 31  |ontColours",,1,1|
00004b10  31 0d 16 30 59 20 c8 99  20 22 46 6f 6e 74 5f 50  |1..0Y .. "Font_P|
00004b20  61 69 6e 74 22 2c 2c 22  43 6c 69 63 6b 20 6f 6e  |aint",,"Click on|
00004b30  20 74 68 65 20 73 77 69  74 63 68 20 74 6f 20 74  | the switch to t|
00004b40  75 72 6e 20 6f 6e 20 74  68 65 20 63 6f 6e 74 72  |urn on the contr|
00004b50  6f 6c 20 62 6f 78 2e 22  2c 31 36 2c 6f 78 25 2b  |ol box.",16,ox%+|
00004b60  33 35 2c 6f 79 25 2d 37  36 30 0d 16 3a 29 20 c8  |35,oy%-760..:) .|
00004b70  99 20 22 57 69 6d 70 5f  47 65 74 52 65 63 74 61  |. "Wimp_GetRecta|
00004b80  6e 67 6c 65 22 2c 2c 62  6f 6b 25 20 b8 20 6d 6f  |ngle",,bok% . mo|
00004b90  72 65 25 0d 16 44 06 20  ce 0d 16 4e 06 20 e1 0d  |re%..D. ...N. ..|
00004ba0  16 58 06 20 3a 0d 16 62  11 20 dd 20 f2 63 6c 6f  |.X. :..b. . .clo|
00004bb0  73 65 64 6f 77 6e 0d 16  6c 1b 20 c8 99 20 22 46  |sedown..l. .. "F|
00004bc0  6f 6e 74 5f 4c 6f 73 65  46 6f 6e 74 22 2c 58 31  |ont_LoseFont",X1|
00004bd0  25 0d 16 76 1b 20 c8 99  20 22 46 6f 6e 74 5f 4c  |%..v. .. "Font_L|
00004be0  6f 73 65 46 6f 6e 74 22  2c 66 33 25 0d 16 80 1b  |oseFont",f3%....|
00004bf0  20 c8 99 20 22 46 6f 6e  74 5f 4c 6f 73 65 46 6f  | .. "Font_LoseFo|
00004c00  6e 74 22 2c 66 32 25 0d  16 8a 1b 20 c8 99 20 22  |nt",f2%.... .. "|
00004c10  46 6f 6e 74 5f 4c 6f 73  65 46 6f 6e 74 22 2c 66  |Font_LoseFont",f|
00004c20  31 25 0d 16 94 18 20 c8  99 20 22 57 69 6d 70 5f  |1%.... .. "Wimp_|
00004c30  43 6c 6f 73 65 44 6f 77  6e 22 0d 16 9e 06 20 e1  |CloseDown".... .|
00004c40  0d 16 a8 06 20 3a 0d 16  b2 37 20 dd 20 f2 70 75  |.... :...7 . .pu|
00004c50  74 5f 69 63 6f 6e 5f 73  70 72 69 74 65 28 77 5f  |t_icon_sprite(w_|
00004c60  68 61 6e 64 6c 65 25 2c  69 63 6f 6e 5f 68 61 6e  |handle%,icon_han|
00004c70  64 6c 65 25 2c 73 70 6e  61 6d 65 24 29 0d 16 bc  |dle%,spname$)...|
00004c80  14 20 62 6b 25 21 30 3d  77 5f 68 61 6e 64 6c 65  |. bk%!0=w_handle|
00004c90  25 0d 16 c6 17 20 62 6b  25 21 34 3d 69 63 6f 6e  |%.... bk%!4=icon|
00004ca0  5f 68 61 6e 64 6c 65 25  0d 16 d0 20 20 c8 99 20  |_handle%...  .. |
00004cb0  22 57 69 6d 70 5f 47 65  74 49 63 6f 6e 53 74 61  |"Wimp_GetIconSta|
00004cc0  74 65 22 2c 2c 62 6b 25  0d 16 da 19 20 c8 8e 20  |te",,bk%.... .. |
00004cd0  28 62 6b 25 21 32 34 20  80 20 26 31 30 33 29 20  |(bk%!24 . &103) |
00004ce0  ca 0d 16 e4 10 20 c9 20  26 30 30 32 2c 26 30 30  |..... . &002,&00|
00004cf0  33 0d 16 ee 14 20 24 62  6b 25 21 32 38 3d 73 70  |3.... $bk%!28=sp|
00004d00  6e 61 6d 65 24 0d 16 f8  0b 20 c9 20 26 31 30 32  |name$.... . &102|
00004d10  0d 17 02 2f 20 e7 20 62  6b 25 21 33 36 3e 30 20  |.../ . bk%!36>0 |
00004d20  24 62 6b 25 21 32 38 3d  73 70 6e 61 6d 65 24 3a  |$bk%!28=spname$:|
00004d30  62 6b 25 21 33 36 3d a9  73 70 6e 61 6d 65 24 0d  |bk%!36=.spname$.|
00004d40  17 0c 0b 20 c9 20 26 31  30 33 0d 17 16 18 20 24  |... . &103.... $|
00004d50  62 6b 25 21 33 32 3d 22  53 22 2b 73 70 6e 61 6d  |bk%!32="S"+spnam|
00004d60  65 24 0d 17 20 06 20 cb  0d 17 2a 0c 20 62 6b 25  |e$.. . ...*. bk%|
00004d70  21 38 3d 30 0d 17 34 0d  20 62 6b 25 21 31 32 3d  |!8=0..4. bk%!12=|
00004d80  30 0d 17 3e 20 20 c8 99  20 22 57 69 6d 70 5f 53  |0..>  .. "Wimp_S|
00004d90  65 74 49 63 6f 6e 53 74  61 74 65 22 2c 2c 62 6b  |etIconState",,bk|
00004da0  25 0d 17 48 06 20 e1 0d  17 52 06 20 3a 0d 17 5c  |%..H. ...R. :..\|
00004db0  04 0d 17 66 10 20 dd 20  f2 64 65 6c 61 79 28 6e  |...f. . .delay(n|
00004dc0  29 0d 17 70 17 20 d1 20  3d 20 30 3a f5 20 fd 20  |)..p. . = 0:. . |
00004dd0  91 3e 3d 6e 2a 31 30 30  0d 17 7a 06 20 e1 0d 17  |.>=n*100..z. ...|
00004de0  84 06 20 3a 0d 17 8e 32  20 dd 20 f2 69 63 6f 6e  |.. :...2 . .icon|
00004df0  5f 63 6f 6c 28 77 69 6e  64 6f 77 5f 68 61 6e 64  |_col(window_hand|
00004e00  6c 65 25 2c 69 63 6f 6e  5f 68 61 6e 64 6c 65 25  |le%,icon_handle%|
00004e10  2c 63 6f 6c 25 29 0d 17  98 2e 20 62 6f 6b 25 21  |,col%).... bok%!|
00004e20  30 3d 77 69 6e 64 6f 77  5f 68 61 6e 64 6c 65 25  |0=window_handle%|
00004e30  3a 62 6f 6b 25 21 34 3d  69 63 6f 6e 5f 68 61 6e  |:bok%!4=icon_han|
00004e40  64 6c 65 25 0d 17 a2 21  20 c8 99 20 22 57 69 6d  |dle%...! .. "Wim|
00004e50  70 5f 47 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_GetIconState",|
00004e60  2c 62 6f 6b 25 0d 17 ac  26 20 62 6f 6b 25 21 31  |,bok%...& bok%!1|
00004e70  32 3d 26 46 30 30 30 30  30 30 30 3a 62 6f 6b 25  |2=&F0000000:bok%|
00004e80  21 38 3d 63 6f 6c 25 3c  3c 32 38 0d 17 b6 21 20  |!8=col%<<28...! |
00004e90  c8 99 20 22 57 69 6d 70  5f 53 65 74 49 63 6f 6e  |.. "Wimp_SetIcon|
00004ea0  53 74 61 74 65 22 2c 2c  62 6f 6b 25 0d 17 c0 06  |State",,bok%....|
00004eb0  20 e1 0d 17 ca 06 20 3a  0d 17 d4 11 20 dd 20 f2  | ..... :.... . .|
00004ec0  63 6c 6f 73 65 5f 77 69  6e 0d 17 de 14 20 21 62  |close_win.... !b|
00004ed0  6f 6b 25 3d 62 31 68 61  6e 64 6c 65 25 0d 17 e8  |ok%=b1handle%...|
00004ee0  20 20 c8 99 20 22 57 69  6d 70 5f 43 6c 6f 73 65  |  .. "Wimp_Close|
00004ef0  57 69 6e 64 6f 77 22 2c  2c 62 6f 6b 25 0d 17 f2  |Window",,bok%...|
00004f00  06 20 e1 0d 17 fc 06 20  3a 0d 18 06 17 20 dd 20  |. ..... :.... . |
00004f10  f2 72 65 73 74 6f 72 65  5f 70 6f 69 6e 74 65 72  |.restore_pointer|
00004f20  0d 18 10 0f 20 2a 50 4f  49 4e 54 45 52 20 31 0d  |.... *POINTER 1.|
00004f30  18 1a 06 20 e1 0d 18 24  06 20 3a 0d 18 2e 32 20  |... ...$. :...2 |
00004f40  dd 20 f2 63 68 61 6e 67  65 5f 70 6f 69 6e 74 65  |. .change_pointe|
00004f50  72 28 73 70 61 72 65 61  25 2c 73 70 72 69 74 65  |r(sparea%,sprite|
00004f60  5f 6e 61 6d 65 24 2c 78  25 2c 79 25 29 0d 18 38  |_name$,x%,y%)..8|
00004f70  37 20 c8 99 20 22 4f 53  5f 53 70 72 69 74 65 4f  |7 .. "OS_SpriteO|
00004f80  70 22 2c 26 31 32 34 2c  73 70 61 72 65 61 25 2c  |p",&124,sparea%,|
00004f90  73 70 72 69 74 65 5f 6e  61 6d 65 24 2c 32 2c 78  |sprite_name$,2,x|
00004fa0  25 2c 79 25 0d 18 42 0c  20 62 6b 25 3f 30 3d 30  |%,y%..B. bk%?0=0|
00004fb0  0d 18 4c 0d 20 62 6b 25  3f 31 3d 32 35 0d 18 56  |..L. bk%?1=25..V|
00004fc0  0e 20 62 6b 25 3f 32 3d  26 46 46 0d 18 60 0e 20  |. bk%?2=&FF..`. |
00004fd0  62 6b 25 3f 33 3d 26 42  42 0d 18 6a 0e 20 62 6b  |bk%?3=&BB..j. bk|
00004fe0  25 3f 34 3d 26 42 42 0d  18 74 18 20 c8 99 20 22  |%?4=&BB..t. .. "|
00004ff0  4f 53 5f 57 6f 72 64 22  2c 31 32 2c 62 6b 25 0d  |OS_Word",12,bk%.|
00005000  18 7e 0c 20 62 6b 25 3f  30 3d 33 0d 18 88 0e 20  |.~. bk%?0=3.... |
00005010  62 6b 25 3f 32 3d 26 35  35 0d 18 92 0e 20 62 6b  |bk%?2=&55.... bk|
00005020  25 3f 33 3d 26 35 35 0d  18 9c 0e 20 62 6b 25 3f  |%?3=&55.... bk%?|
00005030  34 3d 26 35 35 0d 18 a6  18 20 c8 99 20 22 4f 53  |4=&55.... .. "OS|
00005040  5f 57 6f 72 64 22 2c 31  32 2c 62 6b 25 0d 18 b0  |_Word",12,bk%...|
00005050  0f 20 2a 50 4f 49 4e 54  45 52 20 32 0d 18 ba 06  |. *POINTER 2....|
00005060  20 e1 0d 18 c4 06 20 3a  0d 18 ce 1d 20 dd 20 f2  | ..... :.... . .|
00005070  70 6f 69 6e 74 65 72 5f  69 6e 28 77 5f 68 61 6e  |pointer_in(w_han|
00005080  64 6c 65 25 29 0d 18 d8  15 20 77 5f 68 61 6e 64  |dle%).... w_hand|
00005090  6c 65 25 3d 62 6f 6b 25  21 30 0d 18 e2 13 20 c8  |le%=bok%!0.... .|
000050a0  8e 20 77 5f 68 61 6e 64  6c 65 25 20 ca 0d 18 ec  |. w_handle% ....|
000050b0  10 20 c9 20 62 31 68 61  6e 64 6c 65 25 0d 18 f6  |. . b1handle%...|
000050c0  2d 20 f2 63 68 61 6e 67  65 5f 70 6f 69 6e 74 65  |- .change_pointe|
000050d0  72 28 73 70 61 72 65 61  25 2c 22 68 61 6e 64 5f  |r(sparea%,"hand_|
000050e0  70 74 72 22 2c 31 30 2c  30 29 0d 19 00 11 20 c9  |ptr",10,0).... .|
000050f0  20 77 73 63 68 61 6e 64  6c 65 25 0d 19 0a 2d 20  | wschandle%...- |
00005100  f2 63 68 61 6e 67 65 5f  70 6f 69 6e 74 65 72 28  |.change_pointer(|
00005110  73 70 61 72 65 61 25 2c  22 68 61 6e 64 5f 70 74  |sparea%,"hand_pt|
00005120  72 22 2c 31 30 2c 30 29  0d 19 14 11 20 c9 20 69  |r",10,0).... . i|
00005130  6e 74 68 61 6e 64 6c 65  25 0d 19 1e 2d 20 f2 63  |nthandle%...- .c|
00005140  68 61 6e 67 65 5f 70 6f  69 6e 74 65 72 28 73 70  |hange_pointer(sp|
00005150  61 72 65 61 25 2c 22 68  61 6e 64 5f 70 74 72 22  |area%,"hand_ptr"|
00005160  2c 31 30 2c 30 29 0d 19  28 06 20 cb 0d 19 32 06  |,10,0)..(. ...2.|
00005170  20 e1 0d 19 3c 06 20 3a  0d 19 46 1e 20 dd 20 f2  | ...<. :..F. . .|
00005180  77 69 6e 64 6f 77 28 77  69 6e 64 6f 77 5f 68 61  |window(window_ha|
00005190  6e 64 6c 65 25 29 0d 19  50 19 20 77 69 6e 64 6f  |ndle%)..P. windo|
000051a0  77 5f 68 61 6e 64 6c 65  25 3d 21 62 6f 6b 25 0d  |w_handle%=!bok%.|
000051b0  19 5a 20 20 c8 99 20 22  57 69 6d 70 5f 43 6c 6f  |.Z  .. "Wimp_Clo|
000051c0  73 65 57 69 6e 64 6f 77  22 2c 2c 62 6f 6b 25 0d  |seWindow",,bok%.|
000051d0  19 64 06 20 e1 0d 19 6e  06 20 3a 0d ff           |.d. ...n. :..|
000051dd