Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199610.adf » Features » MikeC/!PUP/RunPUP
MikeC/!PUP/RunPUP
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199610.adf » Features |
Filename: | MikeC/!PUP/RunPUP |
Read OK: | ✔ |
File size: | 2283 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM>Develop.!PUP.RunPUP 20REM Pseudo User Port, using serial port handshaking lines 30REM Version 1.0 By Mike Cook 40REM All rights reserved 50ON ERROR PROCerrorbox 60 70DIM taskid%4:$taskid%="TASK" 80DIM PORT%(3), Pin$(2,7),PinN$(2,7),PinIO$(2,7),intmess% 20 90intmess%!0=1:intmess%!4=2:intmess%!8=3:intmess%!12=&502:intmess%!16=0 100SYS "Wimp_Initialise",300,!taskid%,"PUP",intmess% TO version%,taskhand% 110DIM q% &300,qc% 80, Wn% &300,temp% 256,buffers% 512,menu% 128,SW% 256,cb% 18 120DIM IsName% 256, Wmenu% 512,Smenu% 256,Imenu% 256, TextWarn% 100, ww% 256 130SYS "Wimp_OpenTemplate",,"<PUP$Dir>.Templates" 140ON ERROR SYS "Wimp_CloseTemplate":PROCerrorbox 150SYS "Wimp_LoadTemplate",,q%,temp%,temp%+256,-1,"Info",0 160SYS "Wimp_CreateWindow",,q% TO info% 170SYS "Wimp_LoadTemplate",,Wn%+4,SW%,SW%+256,-1,"Pallette",0 180SYS "Wimp_CreateWindow",,Wn%+4 TO monW% 190Wn%!0=monW%:Wn%!28=-1 200 210SYS "Wimp_LoadTemplate",,q%,ww%,ww%+256,-1,"Warning",0 220q%!108=TextWarn%:q%!112=-1:q%!116=300 230XQ%=q%!8-q%!0:YQ%=q%!12-q%!4 240SYS "Wimp_CreateWindow",,q% TO warningW% 250SYS "Wimp_CloseTemplate" 260ref%=0 270cpL%=0:cpR%=0 280smpicon%=FNicon 290wopen%=FALSE:warnOn%=FALSE 300InWin%=FALSE 310LX%=-1:LY%=-1 320cr%=3:cb%=8 330LED=FALSE 340BiDi%=0 350MiTime%=0 360REM Enable the serial chip 370SYS"OS_SerialOp",0,&7,&FFFFFFF8 380*FX2,2 390 400ON ERROR PROCerrorbox 410 420PROCsetupmenu 430PROC_UpP(2,0,1) 440 450REPEAT 460 SYS "Wimp_Poll",0,q% TO A% 470 CASE A% OF 480 WHEN 0:PROC_Null 490 WHEN 1:PROC_doWindow 500 WHEN 2:SYS"OS_ReadModeVariable",-1,3 TO ,,Ncolours%: SYS "Wimp_OpenWindow",,q% 510 WHEN 3:PROC_close 520 WHEN 4:InWin%=FALSE:LX%=-1:LY%=-1 530 WHEN 5:InWin%=TRUE 540 WHEN 6:PROC_do_click(q%) 550 WHEN 7: 560 WHEN 8:PROC_KeyPress 570 WHEN 9:PROC_SORT_Menu 580 WHEN 17,18:PROCreceive(q%) 590 ENDCASE 600 UNTIL FALSE 610 620END 630 640DEF PROC_Null 650LOCAL A%,B%,C% 660IF TIME>MiTime% AND wopen% THEN 670PROC_Trans(monW%) 680B%=FN_HSr 690IF B%<>PORT%(2) THEN PORT%(2)=B%:PROC_UpP(2,PORT%(2),1) 700MiTime%=TIME+20 710ENDIF 720ENDPROC 730 740DEF FN_HSr 750LOCAL A%,B% 760SYS"OS_SerialOp",0,&A3,&FFFFFF54 770SYS"OS_SerialOp",0,0,&FFFFFFFF TO ,,A% 780A%=((A%>>18) AND &F) EOR &B 790SYS"OS_SerialOp",0,&23,&FFFFFF54 800SYS"OS_SerialOp",0,0,&FFFFFFFF TO ,,B% 810B%=((B%>>14) AND &F0) EOR &B0 820SYS"OS_SerialOp",0,&A3,&FFFFFF54 830=A% OR B% 840 850DEF FN_spath(n$) 860WHILE INSTR(n$,".") 870n$=RIGHT$(n$,LEN(n$)-1) 880ENDWHILE 890IF LEN(n$)>10 THEN n$=RIGHT$(n$,10) 900=n$ 910 920DEF PROC_GetName 930LOCAL T%,A%,F$ 940F$="":fn$="" 950q%!0=saveW%:q%!4=1 960SYS "Wimp_GetIconState",,q% 970T%=q%!28 980T%-=1 990REPEAT 1000T%+=1 1010F$=F$+CHR$(?T%) 1020UNTIL ?T%=0 1030fn$=MID$(F$,1,LEN(F$)-1) 1040ENDPROC 1050 1060DEF PROC_SORT_Menu 1070IF IconMenu% THEN 1080IF !q%=1 THEN menu%!52=1:menu%!76=0: LED=FALSE :SYS"Wimp_ForceRedraw",monW%,0,-300,700,0 1090IF !q%=2 THEN menu%!52=0:menu%!76=1:LED=TRUE :SYS"Wimp_ForceRedraw",monW%,0,-300,700,0 1100IF !q%=3 THEN PROCdie 1110ENDCASE 1120ENDIF 1130SYS"Wimp_GetPointerInfo",,q% 1140IF q%!8=1 THEN SYS"Wimp_CreateMenu",,Wmenu% 1150ENDPROC 1160 1170DEF PROC_close 1180IF q%!0=monW% THEN SYS"Wimp_GetWindowInfo",,Wn%:wopen%=FALSE 1190IF q%!0=warningW% THEN warnOn%=FALSE 1200SYS "Wimp_CloseWindow",,q% 1210ENDPROC 1220 1230DEF PROC_do_click(q%) 1240i%=q%!16 1250CASE q%!12 OF 1260WHEN warningW%: q%!0=warningW% :PROC_close 1270 1280WHEN -2: REM Look first at Icon Bar Click 1290 IF q%!16=smpicon% THEN 1300 IF q%!8=2 THEN IconMenu%=TRUE: SYS"Wimp_CreateMenu",,menu%,q%!0-94,270 1310 IF q%!8=4 THEN PROC_Open 1320 ENDIF 1330 1340WHEN monW%: 1350 IF q%!8=4 THEN PROC_MonClick 1360ENDCASE 1370ENDPROC 1380 1390 1400DEF PROC_MonClick 1410LOCAL D%,V%,B% 1420REM Do the action for a window click 1430PROC_Dp 1440IF cb%<8 AND cr%<3 THEN 1450 CASE cr% OF 1460 WHEN 2: PORT%(0)=PORT%(2) EOR 1<<(cb%) 1470 MiTime%=0 1480 ENDCASE 1490ENDIF 1500ENDPROC 1510 1520DEF PROC_Open 1530SYS"OS_ReadModeVariable",-1,3 TO ,,Ncolours% 1540REM OPEN UP WINDOW HERE 1550IF wopen% THEN 1560q%!0=monW% 1570SYS"Wimp_GetWindowState",,q% 1580 IF q%!28<>-1 THEN q%!28=-1: SYS "Wimp_OpenWindow",,q% 1590ELSE 1600SYS "Wimp_OpenWindow",,Wn% 1610wopen%=TRUE 1620ENDIF 1630ENDPROC 1640 1650DEF PROC_doWindow 1660 LOCAL A%,I%,L% 1670 1680 PROC_Trans(monW%) 1690 SYS "Wimp_RedrawWindow",,q% TO flag% 1700 WHILE flag% 1710 1720 PROC_Dmpw 1730 SYS "Wimp_GetRectangle",,q% TO flag% 1740 ENDWHILE 1750 1760 ENDPROC 1770 1780DEF FNpointSq 1790LOCAL X%,Y%,B%,R% 1800PROC_Trans(monW%) 1810MOUSE X%,Y%,B% 1820R%=0 1830IF (X%<(xo%+30) AND Y%<(yo%+30) ) THEN R%=1 1840IF (X%>(xo%+246*xs%) AND Y%<(yo%+30) ) THEN R%=2 1850=R% 1860 1870DEF PROC_Dmpw 1880LOCAL A%,B%,V% 1890PROC_Trans(monW%) 1900 1910REM test values 1920B%=2 1930 1940FOR A%=0 TO 7 1950V%=PORT%(B%) AND 1<<(7-A%) 1960PROC_WS(A%,B%,V%) 1970NEXT 1980PROC_Hex(PORT%(B%),B%) 1990VDU5 2000FOR A%=0 TO 7 2010MOVE xo%+52+A%*40,yo%+106 2020PRINT;7-A% 2030NEXT 2040MOVE xo%+120,yo%+274 2050PRINT"Input Bits" 2060VDU4 2070ENDPROC 2080 2090DEF PROC_Hex(V%,Y%) 2100LOCAL v$ 2110Y%+=1 2120IF LED THEN SYS"Wimp_SetColour",10 ELSE SYS"Wimp_SetColour",15 2130IF Ncolours%<4 THEN GCOL 0,0 2140 2150RECTANGLEFILL xo%+380,yo1%+40*Y%,54,40 2160SYS"Wimp_SetColour",7 2170RECTANGLE xo%+ 380,yo1%+Y%*40,54,40 2180VDU5 2190MOVE xo%+384,yo1%+Y%*40+32 2200IF V%<256 THEN v$=STR$~(V%) ELSE v$="XX" 2210IF LEN(v$)=1 THEN v$="0"+v$ 2220PRINT"&";v$ 2230VDU4 2240ENDPROC 2250 2260DEF PROC_WS(X%,Y%,V%) 2270LOCAL S% 2280S%=40 2290yo1%=yo%+Y%*S% 2300IF LED THEN 2310SYS"Wimp_SetColour",7 2320CIRCLEFILL 20+xo%+ S% + X%*S%,20+yo1%+S%+Y%*S%,16 2330 2340IF V%=0 AND Nw%=FALSE THEN SYS"Wimp_SetColour",4 2350IF V%<>0 AND Nw%=FALSE THEN SYS"Wimp_SetColour",11 2360IF Nw%=TRUE THEN SYS"Wimp_SetColour",7 2370 2380IF Ncolours%<4 AND V%=0 THEN GCOL 0,0 2390CIRCLEFILL 20+xo%+S% + X%*S%,20+yo1%+S%+S%*Y%,10 2400 2410ELSE 2420IF Ncolours%>15 THEN GCOL 0,45 ELSE SYS"Wimp_SetColour",0 2430RECTANGLEFILL xo%+S% + X%*S%,yo1%+S%+S%*Y%,S%,S% 2440SYS"Wimp_SetColour",7 2450RECTANGLE xo%+ S% + X%*S%,yo1%+S%+Y%*S%,S%,S% 2460VDU5 2470MOVE xo%+S%+X%*S%+12,yo1%+S%*2+Y%*S%-8 2480IF V%=0 AND Nw%=FALSE THEN PRINT"0" 2490IF V%<>0 AND Nw%=FALSE THEN PRINT"1" 2500IF Nw%=TRUE THEN PRINT"X" 2510VDU4 2520ENDIF 2530ENDPROC 2540 2550DEF PROC_UpP(P%,V%,M%) 2560LOCAL T%,A%,E%,Nw% 2570 q%!0=monW%:q%!4=0:q%!8=-400:q%!12=680:q%!16=0 2580 SYS"Wimp_UpdateWindow",,q% TO More% 2590 2600 WHILE More% 2610 2620 IF PORT%(1)>255 AND P%=1 THEN Nw%=TRUE ELSE Nw%=FALSE 2630 FOR A%=0 TO 7 2640 T%=V% AND 1<<(7-A%) 2650 E%=PORT%(P%) AND 1<<(7-A%) 2660 IF T%<>E% OR M%=1 THEN PROC_WS(A%,P%,T%) 2670 NEXT 2680 PROC_Hex(V%,P%) 2690 2700 SYS"Wimp_GetRectangle",,q% TO More% 2710 ENDWHILE 2720 2730ENDPROC 2740 2750DEF FN_Wr 2760LOCAL TY%,R% 2770 TY%=Y%-yo% 2780 R%=3 2790 IF TY%>=40 AND TY%<=80 THEN R%=0 2800 IF TY%>=120 AND TY%<=160 THEN R%=1 2810 IF TY%>=200 AND TY%<=240 THEN R%=2 2820=R% 2830DEF FN_Wb 2840LOCAL B% 2850B%=7-INT((X%-xo%)/40-1) 2860IF B%>7 OR B%<0 THEN B%=8 2870=B% 2880 2890DEF PROC_Dp 2900LOCAL X%,Y%,B%,nr%,nb% 2910MOUSE X%,Y%,B% 2920IF X%<>LX% OR Y%<>LY% THEN 2930 PROC_Trans(monW%) 2940 nr%=FN_Wr : nb%=FN_Wb 2950 IF nr%<>cr% OR nb%<>cb% THEN 2960 cr%=nr%:cb%=nb% 2970 ENDIF 2980 LX%=X%:LY%=Y% 2990ENDIF 3000ENDPROC 3010 3020DEF PROC_Trans(wh%) 3030!q%=wh% 3040SYS "Wimp_GetWindowState",,q% 3050xo%=q%!4-q%!20+8:yo%=q%!16-q%!24-290 3060XO%=q%!4:YO%=q%!16 3070ENDPROC 3080 3090DEFPROCsetupmenu 3100LOCAL m% 3110 3120$menu%="PUP" 3130menu%?12=7 3140menu%?13=2 3150menu%?14=7 3160menu%?15=0 3170menu%!16=128 3180menu%!20=40 3190menu%!24=0 3200m%=menu%+28 3210m%!0=0 3220m%!4=info% 3230m%!8=(7<<24)OR %10001 3240$(m%+12)="Info" 3250 3260m%+=24 3270m%!0=1 3280m%!4=0 3290m%!8=(7<<24)OR %10001 3300$(m%+12)="Binary" 3310 3320m%+=24 3330m%!0=0 3340m%!4=0 3350m%!8=(7<<24)OR %10001 3360$(m%+12)="LED" 3370 3380m%+=24 3390m%!0=&80 3400m%!4=0 3410m%!8=(7<<24)OR %10001 3420$(m%+12)="Quit" 3430 3440ENDPROC 3450 3460DEF PROCreceive(q%) 3470LOCAL A% 3480A%=q%!16 3490CASE A% OF 3500WHEN 0:PROCdie 3510WHEN &502: CASE TRUE OF 3520 WHEN q%!32=-2 AND q%!36=smpicon%:mes$="This is the PUP Monitor icon.|MObserve the signals on the serial port" 3530 OTHERWISE:mes$="" 3540 ENDCASE 3550 IF mes$<>"" THEN 3560 q%!12=q%!8 3570 $(q%+20)=mes$+CHR$0 3580 q%!0=(20+LENmes$+4)AND NOT 3 3590 q%!16=&503 3600 SYS "Wimp_SendMessage",18,q%,q%!4 3610ENDCASE 3620ENDPROC 3630 3640DEF PROC_Dack 3650sendth%=q%!4 3660myref%=q%!8 3670SYS "Wimp_GetPointerInfo",,q%+8 3680q%!28=q%!8 3690q%!32=q%!12 3700q%!0=(44+LENn$+4)AND NOT 3 3710q%!12=myref% 3720q%!16=4 3730q%!36=-1 3740q%!40=&FF9 3750$(q%+44)=n$+CHR$0 3760SYS "Wimp_SendMessage",17,q%,sendth% 3770ENDIF 3780ENDPROC 3790 3800DEFFNsget(x%) 3810LOCAL x$ 3820WHILE ?x% x$+=CHR$(?x%):x%+=1:ENDWHILE 3830=x$ 3840 3850DEFFNicon 3860q%!0=-1 3870q%!4=0 3880q%!8=10 : REM Y DIRECTION 3890q%!12=70 : REM X DIRECTION 3900q%!16=96 3910q%!20=&2002 3920$(q%+24)="!PUP" 3930SYS "Wimp_CreateIcon",,q% TO icon% 3940=icon% 3950 3960DEF PROC_setupW(t$) 3970!q%=warningW%:q%!4=200:q%!8=200:q%!12=200+XQ%:q%!16=200+YQ%:q%!20=0:q%!24=0:q%!28=-1 3980$TextWarn%=t$ 3990TextWarn%?LEN(t$)=0 4000VDU 7 4010warnOn%=TRUE 4020SYS "Wimp_OpenWindow",,q% 4030ENDPROC 4040 4050DEF PROCerrorbox 4060SYS "Wimp_DragBox",,-1 4070!buffers%=ERR:$(buffers%+4)=REPORT$+" at line "+STR$ERL+CHR$0 4080SYS "Wimp_ReportError",buffers%,1,"Port Monitor" 4090PROCdie 4100ENDPROC 4110 4120DEFPROCdie 4130SYS "Wimp_CloseDown",taskhand%,!taskid% 4140END 4150ENDPROC 4160 4170DEF PROCdragicon(mousex%,mousey%,handle%,icon%) 4180LOCAL bx%,by%,ix0%,iy0%,ix1%,iy1% 4190PROCgetw(handle%) 4200PROCgeti(handle%,icon%) 4210!q%=handle%:q%!4=5 4220q%!8=bx%+ix0%:q%!12=by%+iy0%:q%!16=bx%+ix1%:q%!20=by%+iy1% 4230q%!24=q%!8-mousex%:q%!28=q%!12-mousey% 4240SYS "Wimp_DragBox",,q% 4250SFLAG%=TRUE 4260ENDPROC 4270 4280DEF PROCgetw(handle%) 4290!q%=handle%:SYS "Wimp_GetWindowState",,q%:PROCinfo(q%+4) 4300ENDPROC 4310DEF PROCgeti(h%,i%) 4320!q%=h%:q%!4=i%:SYS "Wimp_GetIconState",,q% 4330ix0%=q%!8:iy0%=q%!12:ix1%=q%!16:iy1%=q%!20 4340iflags%=q%!24:idata%=q%+28 4350ENDPROC 4360 4370DEF PROCinfo(p%) 4380LOCAL x0%,y0% 4390x0%=!p%:y0%=p%!4:x1%=p%!8:y1%=p%!12 4400scx%=p%!16:scy%=p%!20:bhandle%=p%!24:flags%=p%!28 4410bx%=x0%-scx%:by%=y1%-scy% 4420ENDPROC 4430 4440DEF PROC_KeyPress 4450CASE q%!0 OF 4460REM OTHERWISE: SYS"Wimp_ProcessKey",q%!24 4470ENDCASE 4480ENDPROC 4490
�>Develop.!PUP.RunPUP ;� Pseudo User Port, using serial port handshaking lines � Version 1.0 By Mike Cook (� All rights reserved 2� � �errorbox < F� taskid%4:$taskid%="TASK" P<� PORT%(3), Pin$(2,7),PinN$(2,7),PinIO$(2,7),intmess% 20 ZIintmess%!0=1:intmess%!4=2:intmess%!8=3:intmess%!12=&502:intmess%!16=0 dIș "Wimp_Initialise",300,!taskid%,"PUP",intmess% � version%,taskhand% nN� q% &300,qc% 80, Wn% &300,temp% 256,buffers% 512,menu% 128,SW% 256,cb% 18 xK� IsName% 256, Wmenu% 512,Smenu% 256,Imenu% 256, TextWarn% 100, ww% 256 �1ș "Wimp_OpenTemplate",,"<PUP$Dir>.Templates" �)� � ș "Wimp_CloseTemplate":�errorbox �:ș "Wimp_LoadTemplate",,q%,temp%,temp%+256,-1,"Info",0 �&ș "Wimp_CreateWindow",,q% � info% �=ș "Wimp_LoadTemplate",,Wn%+4,SW%,SW%+256,-1,"Pallette",0 �)ș "Wimp_CreateWindow",,Wn%+4 � monW% �Wn%!0=monW%:Wn%!28=-1 � �9ș "Wimp_LoadTemplate",,q%,ww%,ww%+256,-1,"Warning",0 �)q%!108=TextWarn%:q%!112=-1:q%!116=300 � XQ%=q%!8-q%!0:YQ%=q%!12-q%!4 �*ș "Wimp_CreateWindow",,q% � warningW% �ș "Wimp_CloseTemplate" ref%=0 cpL%=0:cpR%=0 smpicon%=�icon "wopen%=�:warnOn%=� ,InWin%=� 6LX%=-1:LY%=-1 @cr%=3:cb%=8 J LED=� TBiDi%=0 ^ MiTime%=0 h� Enable the serial chip r"ș"OS_SerialOp",0,&7,&FFFFFFF8 | *FX2,2 � �� � �errorbox � ��setupmenu ��_UpP(2,0,1) � �� � ș "Wimp_Poll",0,q% � A% � Ȏ A% � � � 0:�_Null � � 1:�_doWindow �O � 2:ș"OS_ReadModeVariable",-1,3 � ,,Ncolours%: ș "Wimp_OpenWindow",,q% � � 3:�_close ! � 4:InWin%=�:LX%=-1:LY%=-1 � 5:InWin%=� � 6:�_do_click(q%) & � 7: 0 � 8:�_KeyPress : � 9:�_SORT_Menu D � 17,18:�receive(q%) N � X � � b l� v �� �_Null �� A%,B%,C% �� �>MiTime% � wopen% � ��_Trans(monW%) �B%=�_HSr �4� B%<>PORT%(2) � PORT%(2)=B%:�_UpP(2,PORT%(2),1) �MiTime%=�+20 �� �� � �� �_HSr �� A%,B% �#ș"OS_SerialOp",0,&A3,&FFFFFF54 (ș"OS_SerialOp",0,0,&FFFFFFFF � ,,A% A%=((A%>>18) � &F) � &B #ș"OS_SerialOp",0,&23,&FFFFFF54 (ș"OS_SerialOp",0,0,&FFFFFFFF � ,,B% *B%=((B%>>14) � &F0) � &B0 4#ș"OS_SerialOp",0,&A3,&FFFFFF54 >=A% � B% H R� �_spath(n$) \ȕ �n$,".") fn$=�n$,�(n$)-1) p� z� �(n$)>10 � n$=�n$,10) �=n$ � �� �_GetName �� T%,A%,F$ �F$="":fn$="" �q%!0=saveW%:q%!4=1 �ș "Wimp_GetIconState",,q% �T%=q%!28 � T%-=1 �� � T%+=1 �F$=F$+�(?T%) �� ?T%=0 fn$=�F$,1,�(F$)-1) � $� �_SORT_Menu .� IconMenu% � 8S� !q%=1 � menu%!52=1:menu%!76=0: LED=� :ș"Wimp_ForceRedraw",monW%,0,-300,700,0 BR� !q%=2 � menu%!52=0:menu%!76=1:LED=� :ș"Wimp_ForceRedraw",monW%,0,-300,700,0 L� !q%=3 � �die V� `� jș"Wimp_GetPointerInfo",,q% t*� q%!8=1 � ș"Wimp_CreateMenu",,Wmenu% ~� � � � �_close �7� q%!0=monW% � ș"Wimp_GetWindowInfo",,Wn%:wopen%=� � � q%!0=warningW% � warnOn%=� �ș "Wimp_CloseWindow",,q% �� � �� �_do_click(q%) �i%=q%!16 �Ȏ q%!12 � �(� warningW%: q%!0=warningW% :�_close � (� -2: � Look first at Icon Bar Click � q%!16=smpicon% � J � q%!8=2 � IconMenu%=�: ș"Wimp_CreateMenu",,menu%,q%!0-94,270 � q%!8=4 � �_Open ( � 2 <� monW%: F' � q%!8=4 � �_MonClick P� Z� d n x� �_MonClick �� D%,V%,B% �&� Do the action for a window click ��_Dp �� cb%<8 � cr%<3 � � Ȏ cr% � �' � 2: PORT%(0)=PORT%(2) � 1<<(cb%) � MiTime%=0 � � �� �� � �� �_Open �.ș"OS_ReadModeVariable",-1,3 � ,,Ncolours% � OPEN UP WINDOW HERE � wopen% � q%!0=monW% "ș"Wimp_GetWindowState",,q% ,6 � q%!28<>-1 � q%!28=-1: ș "Wimp_OpenWindow",,q% 6� @ș "Wimp_OpenWindow",,Wn% Jwopen%=� T� ^� h r� �_doWindow | � A%,I%,L% � � �_Trans(monW%) �) ș "Wimp_RedrawWindow",,q% � flag% � ȕ flag% � � �_Dmpw �+ ș "Wimp_GetRectangle",,q% � flag% � � � � � � �� �pointSq �� X%,Y%,B%,R% �_Trans(monW%) ȗ X%,Y%,B% R%=0 &)� (X%<(xo%+30) � Y%<(yo%+30) ) � R%=1 0.� (X%>(xo%+246*xs%) � Y%<(yo%+30) ) � R%=2 :=R% D N� �_Dmpw X� A%,B%,V% b�_Trans(monW%) l v� test values �B%=2 � �� A%=0 � 7 �V%=PORT%(B%) � 1<<(7-A%) ��_WS(A%,B%,V%) �� ��_Hex(PORT%(B%),B%) ��5 �� A%=0 � 7 �� xo%+52+A%*40,yo%+106 � �;7-A% �� �� xo%+120,yo%+274 �"Input Bits" �4 � *� �_Hex(V%,Y%) 4� v$ > Y%+=1 H9� LED � ș"Wimp_SetColour",10 � ș"Wimp_SetColour",15 R� Ncolours%<4 � � 0,0 \ f!ȓȐ xo%+380,yo1%+40*Y%,54,40 pș"Wimp_SetColour",7 z ȓ xo%+ 380,yo1%+Y%*40,54,40 ��5 �� xo%+384,yo1%+Y%*40+32 �"� V%<256 � v$=�~(V%) � v$="XX" �� �(v$)=1 � v$="0"+v$ ��"&";v$ ��4 �� � �� �_WS(X%,Y%,V%) �� S% � S%=40 �yo1%=yo%+Y%*S% �� LED � ș"Wimp_SetColour",7 /ȏȐ 20+xo%+ S% + X%*S%,20+yo1%+S%+Y%*S%,16 $)� V%=0 � Nw%=� � ș"Wimp_SetColour",4 .+� V%<>0 � Nw%=� � ș"Wimp_SetColour",11 8"� Nw%=� � ș"Wimp_SetColour",7 B L � Ncolours%<4 � V%=0 � � 0,0 V.ȏȐ 20+xo%+S% + X%*S%,20+yo1%+S%+S%*Y%,10 ` j� t2� Ncolours%>15 � � 0,45 � ș"Wimp_SetColour",0 ~+ȓȐ xo%+S% + X%*S%,yo1%+S%+S%*Y%,S%,S% �ș"Wimp_SetColour",7 �*ȓ xo%+ S% + X%*S%,yo1%+S%+Y%*S%,S%,S% ��5 �'� xo%+S%+X%*S%+12,yo1%+S%*2+Y%*S%-8 �� V%=0 � Nw%=� � �"0" �� V%<>0 � Nw%=� � �"1" �� Nw%=� � �"X" ��4 �� �� � �� �_UpP(P%,V%,M%) � T%,A%,E%,Nw% 3 q%!0=monW%:q%!4=0:q%!8=-400:q%!12=680:q%!16=0 ' ș"Wimp_UpdateWindow",,q% � More% ( ȕ More% 2 <+ � PORT%(1)>255 � P%=1 � Nw%=� � Nw%=� F � A%=0 � 7 P T%=V% � 1<<(7-A%) Z E%=PORT%(P%) � 1<<(7-A%) d& � T%<>E% � M%=1 � �_WS(A%,P%,T%) n � x �_Hex(V%,P%) � �' ș"Wimp_GetRectangle",,q% � More% � � � �� � � � �_Wr �� TY%,R% � TY%=Y%-yo% � R%=3 � � TY%>=40 � TY%<=80 � R%=0 �! � TY%>=120 � TY%<=160 � R%=1 �! � TY%>=200 � TY%<=240 � R%=2 =R% � �_Wb � B% "B%=7-�((X%-xo%)/40-1) ,� B%>7 � B%<0 � B%=8 6=B% @ J � �_Dp T� X%,Y%,B%,nr%,nb% ^ȗ X%,Y%,B% h� X%<>LX% � Y%<>LY% � r �_Trans(monW%) | nr%=�_Wr : nb%=�_Wb � � nr%<>cr% � nb%<>cb% � � cr%=nr%:cb%=nb% � � � LX%=X%:LY%=Y% �� �� � �� �_Trans(wh%) �!q%=wh% � ș "Wimp_GetWindowState",,q% �(xo%=q%!4-q%!20+8:yo%=q%!16-q%!24-290 �XO%=q%!4:YO%=q%!16 �� ��setupmenu � m% & 0$menu%="PUP" :menu%?12=7 Dmenu%?13=2 Nmenu%?14=7 Xmenu%?15=0 bmenu%!16=128 lmenu%!20=40 vmenu%!24=0 �m%=menu%+28 � m%!0=0 �m%!4=info% �m%!8=(7<<24)� %10001 �$(m%+12)="Info" � � m%+=24 � m%!0=1 � m%!4=0 �m%!8=(7<<24)� %10001 �$(m%+12)="Binary" � � m%+=24 m%!0=0 m%!4=0 m%!8=(7<<24)� %10001 $(m%+12)="LED" * 4 m%+=24 >m%!0=&80 H m%!4=0 Rm%!8=(7<<24)� %10001 \$(m%+12)="Quit" f p� z �� �receive(q%) �� A% �A%=q%!16 �Ȏ A% � �� 0:�die �� &502: Ȏ � � �y � q%!32=-2 � q%!36=smpicon%:mes$="This is the PUP Monitor icon.|MObserve the signals on the serial port" � :mes$="" � � � � mes$<>"" � � q%!12=q%!8 � $(q%+20)=mes$+�0 � q%!0=(20+�mes$+4)� � 3 q%!16=&503 ( ș "Wimp_SendMessage",18,q%,q%!4 � $� . 8� �_Dack Bsendth%=q%!4 Lmyref%=q%!8 V"ș "Wimp_GetPointerInfo",,q%+8 `q%!28=q%!8 jq%!32=q%!12 tq%!0=(44+�n$+4)� � 3 ~q%!12=myref% �q%!16=4 �q%!36=-1 �q%!40=&FF9 �$(q%+44)=n$+�0 �'ș "Wimp_SendMessage",17,q%,sendth% �� �� � �ݤsget(x%) �� x$ �ȕ ?x% x$+=�(?x%):x%+=1:� �=x$ ݤicon q%!0=-1 q%!4=0 (q%!8=10 : � Y DIRECTION 2q%!12=70 : � X DIRECTION <q%!16=96 Fq%!20=&2002 P$(q%+24)="!PUP" Z$ș "Wimp_CreateIcon",,q% � icon% d =icon% n x� �_setupW(t$) �X!q%=warningW%:q%!4=200:q%!8=200:q%!12=200+XQ%:q%!16=200+YQ%:q%!20=0:q%!24=0:q%!28=-1 �$TextWarn%=t$ �TextWarn%?�(t$)=0 �� 7 � warnOn%=� �ș "Wimp_OpenWindow",,q% �� � �� �errorbox �ș "Wimp_DragBox",,-1 �2!buffers%=�:$(buffers%+4)=�$+" at line "+Þ+�0 �3ș "Wimp_ReportError",buffers%,1,"Port Monitor" ��die � ��die "*ș "Wimp_CloseDown",taskhand%,!taskid% ,� 6� @ J.� �dragicon(mousex%,mousey%,handle%,icon%) T!� bx%,by%,ix0%,iy0%,ix1%,iy1% ^�getw(handle%) h�geti(handle%,icon%) r!q%=handle%:q%!4=5 |>q%!8=bx%+ix0%:q%!12=by%+iy0%:q%!16=bx%+ix1%:q%!20=by%+iy1% �*q%!24=q%!8-mousex%:q%!28=q%!12-mousey% �ș "Wimp_DragBox",,q% �SFLAG%=� �� � �� �getw(handle%) �8!q%=handle%:ș "Wimp_GetWindowState",,q%:�info(q%+4) �� �� �geti(h%,i%) �-!q%=h%:q%!4=i%:ș "Wimp_GetIconState",,q% �.ix0%=q%!8:iy0%=q%!12:ix1%=q%!16:iy1%=q%!20 �iflags%=q%!24:idata%=q%+28 �� � �info(p%) � x0%,y0% &'x0%=!p%:y0%=p%!4:x1%=p%!8:y1%=p%!12 05scx%=p%!16:scy%=p%!20:bhandle%=p%!24:flags%=p%!28 :bx%=x0%-scx%:by%=y1%-scy% D� N X� �_KeyPress b Ȏ q%!0 � l+� OTHERWISE: SYS"Wimp_ProcessKey",q%!24 v� �� � �
00000000 0d 00 0a 19 f4 3e 44 65 76 65 6c 6f 70 2e 21 50 |.....>Develop.!P| 00000010 55 50 2e 52 75 6e 50 55 50 0d 00 14 3b f4 20 50 |UP.RunPUP...;. P| 00000020 73 65 75 64 6f 20 55 73 65 72 20 50 6f 72 74 2c |seudo User Port,| 00000030 20 75 73 69 6e 67 20 73 65 72 69 61 6c 20 70 6f | using serial po| 00000040 72 74 20 68 61 6e 64 73 68 61 6b 69 6e 67 20 6c |rt handshaking l| 00000050 69 6e 65 73 0d 00 1e 1e f4 20 56 65 72 73 69 6f |ines..... Versio| 00000060 6e 20 31 2e 30 20 42 79 20 4d 69 6b 65 20 43 6f |n 1.0 By Mike Co| 00000070 6f 6b 0d 00 28 19 f4 20 41 6c 6c 20 72 69 67 68 |ok..(.. All righ| 00000080 74 73 20 72 65 73 65 72 76 65 64 0d 00 32 11 ee |ts reserved..2..| 00000090 20 85 20 f2 65 72 72 6f 72 62 6f 78 0d 00 3c 04 | . .errorbox..<.| 000000a0 0d 00 46 1e de 20 74 61 73 6b 69 64 25 34 3a 24 |..F.. taskid%4:$| 000000b0 74 61 73 6b 69 64 25 3d 22 54 41 53 4b 22 0d 00 |taskid%="TASK"..| 000000c0 50 3c de 20 50 4f 52 54 25 28 33 29 2c 20 50 69 |P<. PORT%(3), Pi| 000000d0 6e 24 28 32 2c 37 29 2c 50 69 6e 4e 24 28 32 2c |n$(2,7),PinN$(2,| 000000e0 37 29 2c 50 69 6e 49 4f 24 28 32 2c 37 29 2c 69 |7),PinIO$(2,7),i| 000000f0 6e 74 6d 65 73 73 25 20 32 30 0d 00 5a 49 69 6e |ntmess% 20..ZIin| 00000100 74 6d 65 73 73 25 21 30 3d 31 3a 69 6e 74 6d 65 |tmess%!0=1:intme| 00000110 73 73 25 21 34 3d 32 3a 69 6e 74 6d 65 73 73 25 |ss%!4=2:intmess%| 00000120 21 38 3d 33 3a 69 6e 74 6d 65 73 73 25 21 31 32 |!8=3:intmess%!12| 00000130 3d 26 35 30 32 3a 69 6e 74 6d 65 73 73 25 21 31 |=&502:intmess%!1| 00000140 36 3d 30 0d 00 64 49 c8 99 20 22 57 69 6d 70 5f |6=0..dI.. "Wimp_| 00000150 49 6e 69 74 69 61 6c 69 73 65 22 2c 33 30 30 2c |Initialise",300,| 00000160 21 74 61 73 6b 69 64 25 2c 22 50 55 50 22 2c 69 |!taskid%,"PUP",i| 00000170 6e 74 6d 65 73 73 25 20 b8 20 76 65 72 73 69 6f |ntmess% . versio| 00000180 6e 25 2c 74 61 73 6b 68 61 6e 64 25 0d 00 6e 4e |n%,taskhand%..nN| 00000190 de 20 71 25 20 26 33 30 30 2c 71 63 25 20 38 30 |. q% &300,qc% 80| 000001a0 2c 20 57 6e 25 20 26 33 30 30 2c 74 65 6d 70 25 |, Wn% &300,temp%| 000001b0 20 32 35 36 2c 62 75 66 66 65 72 73 25 20 35 31 | 256,buffers% 51| 000001c0 32 2c 6d 65 6e 75 25 20 31 32 38 2c 53 57 25 20 |2,menu% 128,SW% | 000001d0 32 35 36 2c 63 62 25 20 31 38 0d 00 78 4b de 20 |256,cb% 18..xK. | 000001e0 49 73 4e 61 6d 65 25 20 32 35 36 2c 20 57 6d 65 |IsName% 256, Wme| 000001f0 6e 75 25 20 35 31 32 2c 53 6d 65 6e 75 25 20 32 |nu% 512,Smenu% 2| 00000200 35 36 2c 49 6d 65 6e 75 25 20 32 35 36 2c 20 54 |56,Imenu% 256, T| 00000210 65 78 74 57 61 72 6e 25 20 31 30 30 2c 20 77 77 |extWarn% 100, ww| 00000220 25 20 32 35 36 0d 00 82 31 c8 99 20 22 57 69 6d |% 256...1.. "Wim| 00000230 70 5f 4f 70 65 6e 54 65 6d 70 6c 61 74 65 22 2c |p_OpenTemplate",| 00000240 2c 22 3c 50 55 50 24 44 69 72 3e 2e 54 65 6d 70 |,"<PUP$Dir>.Temp| 00000250 6c 61 74 65 73 22 0d 00 8c 29 ee 20 85 20 c8 99 |lates"...). . ..| 00000260 20 22 57 69 6d 70 5f 43 6c 6f 73 65 54 65 6d 70 | "Wimp_CloseTemp| 00000270 6c 61 74 65 22 3a f2 65 72 72 6f 72 62 6f 78 0d |late":.errorbox.| 00000280 00 96 3a c8 99 20 22 57 69 6d 70 5f 4c 6f 61 64 |..:.. "Wimp_Load| 00000290 54 65 6d 70 6c 61 74 65 22 2c 2c 71 25 2c 74 65 |Template",,q%,te| 000002a0 6d 70 25 2c 74 65 6d 70 25 2b 32 35 36 2c 2d 31 |mp%,temp%+256,-1| 000002b0 2c 22 49 6e 66 6f 22 2c 30 0d 00 a0 26 c8 99 20 |,"Info",0...&.. | 000002c0 22 57 69 6d 70 5f 43 72 65 61 74 65 57 69 6e 64 |"Wimp_CreateWind| 000002d0 6f 77 22 2c 2c 71 25 20 b8 20 69 6e 66 6f 25 0d |ow",,q% . info%.| 000002e0 00 aa 3d c8 99 20 22 57 69 6d 70 5f 4c 6f 61 64 |..=.. "Wimp_Load| 000002f0 54 65 6d 70 6c 61 74 65 22 2c 2c 57 6e 25 2b 34 |Template",,Wn%+4| 00000300 2c 53 57 25 2c 53 57 25 2b 32 35 36 2c 2d 31 2c |,SW%,SW%+256,-1,| 00000310 22 50 61 6c 6c 65 74 74 65 22 2c 30 0d 00 b4 29 |"Pallette",0...)| 00000320 c8 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 57 |.. "Wimp_CreateW| 00000330 69 6e 64 6f 77 22 2c 2c 57 6e 25 2b 34 20 b8 20 |indow",,Wn%+4 . | 00000340 6d 6f 6e 57 25 0d 00 be 19 57 6e 25 21 30 3d 6d |monW%....Wn%!0=m| 00000350 6f 6e 57 25 3a 57 6e 25 21 32 38 3d 2d 31 0d 00 |onW%:Wn%!28=-1..| 00000360 c8 04 0d 00 d2 39 c8 99 20 22 57 69 6d 70 5f 4c |.....9.. "Wimp_L| 00000370 6f 61 64 54 65 6d 70 6c 61 74 65 22 2c 2c 71 25 |oadTemplate",,q%| 00000380 2c 77 77 25 2c 77 77 25 2b 32 35 36 2c 2d 31 2c |,ww%,ww%+256,-1,| 00000390 22 57 61 72 6e 69 6e 67 22 2c 30 0d 00 dc 29 71 |"Warning",0...)q| 000003a0 25 21 31 30 38 3d 54 65 78 74 57 61 72 6e 25 3a |%!108=TextWarn%:| 000003b0 71 25 21 31 31 32 3d 2d 31 3a 71 25 21 31 31 36 |q%!112=-1:q%!116| 000003c0 3d 33 30 30 0d 00 e6 20 58 51 25 3d 71 25 21 38 |=300... XQ%=q%!8| 000003d0 2d 71 25 21 30 3a 59 51 25 3d 71 25 21 31 32 2d |-q%!0:YQ%=q%!12-| 000003e0 71 25 21 34 0d 00 f0 2a c8 99 20 22 57 69 6d 70 |q%!4...*.. "Wimp| 000003f0 5f 43 72 65 61 74 65 57 69 6e 64 6f 77 22 2c 2c |_CreateWindow",,| 00000400 71 25 20 b8 20 77 61 72 6e 69 6e 67 57 25 0d 00 |q% . warningW%..| 00000410 fa 1b c8 99 20 22 57 69 6d 70 5f 43 6c 6f 73 65 |.... "Wimp_Close| 00000420 54 65 6d 70 6c 61 74 65 22 0d 01 04 0a 72 65 66 |Template"....ref| 00000430 25 3d 30 0d 01 0e 11 63 70 4c 25 3d 30 3a 63 70 |%=0....cpL%=0:cp| 00000440 52 25 3d 30 0d 01 18 12 73 6d 70 69 63 6f 6e 25 |R%=0....smpicon%| 00000450 3d a4 69 63 6f 6e 0d 01 22 16 77 6f 70 65 6e 25 |=.icon..".wopen%| 00000460 3d a3 3a 77 61 72 6e 4f 6e 25 3d a3 0d 01 2c 0c |=.:warnOn%=...,.| 00000470 49 6e 57 69 6e 25 3d a3 0d 01 36 11 4c 58 25 3d |InWin%=...6.LX%=| 00000480 2d 31 3a 4c 59 25 3d 2d 31 0d 01 40 0f 63 72 25 |-1:LY%=-1..@.cr%| 00000490 3d 33 3a 63 62 25 3d 38 0d 01 4a 09 4c 45 44 3d |=3:cb%=8..J.LED=| 000004a0 a3 0d 01 54 0b 42 69 44 69 25 3d 30 0d 01 5e 0d |...T.BiDi%=0..^.| 000004b0 4d 69 54 69 6d 65 25 3d 30 0d 01 68 1c f4 20 45 |MiTime%=0..h.. E| 000004c0 6e 61 62 6c 65 20 74 68 65 20 73 65 72 69 61 6c |nable the serial| 000004d0 20 63 68 69 70 0d 01 72 22 c8 99 22 4f 53 5f 53 | chip..r".."OS_S| 000004e0 65 72 69 61 6c 4f 70 22 2c 30 2c 26 37 2c 26 46 |erialOp",0,&7,&F| 000004f0 46 46 46 46 46 46 38 0d 01 7c 0a 2a 46 58 32 2c |FFFFFF8..|.*FX2,| 00000500 32 0d 01 86 04 0d 01 90 11 ee 20 85 20 f2 65 72 |2......... . .er| 00000510 72 6f 72 62 6f 78 0d 01 9a 04 0d 01 a4 0e f2 73 |rorbox.........s| 00000520 65 74 75 70 6d 65 6e 75 0d 01 ae 10 f2 5f 55 70 |etupmenu....._Up| 00000530 50 28 32 2c 30 2c 31 29 0d 01 b8 04 0d 01 c2 05 |P(2,0,1)........| 00000540 f5 0d 01 cc 1d 20 c8 99 20 22 57 69 6d 70 5f 50 |..... .. "Wimp_P| 00000550 6f 6c 6c 22 2c 30 2c 71 25 20 b8 20 41 25 0d 01 |oll",0,q% . A%..| 00000560 d6 0d 20 20 c8 8e 20 41 25 20 ca 0d 01 e0 11 20 |.. .. A% ..... | 00000570 20 20 c9 20 30 3a f2 5f 4e 75 6c 6c 0d 01 ea 15 | . 0:._Null....| 00000580 20 20 20 c9 20 31 3a f2 5f 64 6f 57 69 6e 64 6f | . 1:._doWindo| 00000590 77 0d 01 f4 4f 20 20 20 c9 20 32 3a c8 99 22 4f |w...O . 2:.."O| 000005a0 53 5f 52 65 61 64 4d 6f 64 65 56 61 72 69 61 62 |S_ReadModeVariab| 000005b0 6c 65 22 2c 2d 31 2c 33 20 b8 20 2c 2c 4e 63 6f |le",-1,3 . ,,Nco| 000005c0 6c 6f 75 72 73 25 3a 20 c8 99 20 22 57 69 6d 70 |lours%: .. "Wimp| 000005d0 5f 4f 70 65 6e 57 69 6e 64 6f 77 22 2c 2c 71 25 |_OpenWindow",,q%| 000005e0 0d 01 fe 12 20 20 20 c9 20 33 3a f2 5f 63 6c 6f |.... . 3:._clo| 000005f0 73 65 0d 02 08 21 20 20 20 c9 20 34 3a 49 6e 57 |se...! . 4:InW| 00000600 69 6e 25 3d a3 3a 4c 58 25 3d 2d 31 3a 4c 59 25 |in%=.:LX%=-1:LY%| 00000610 3d 2d 31 0d 02 12 13 20 20 20 c9 20 35 3a 49 6e |=-1.... . 5:In| 00000620 57 69 6e 25 3d b9 0d 02 1c 19 20 20 20 c9 20 36 |Win%=..... . 6| 00000630 3a f2 5f 64 6f 5f 63 6c 69 63 6b 28 71 25 29 0d |:._do_click(q%).| 00000640 02 26 0b 20 20 20 c9 20 37 3a 0d 02 30 15 20 20 |.&. . 7:..0. | 00000650 20 c9 20 38 3a f2 5f 4b 65 79 50 72 65 73 73 0d | . 8:._KeyPress.| 00000660 02 3a 16 20 20 20 c9 20 39 3a f2 5f 53 4f 52 54 |.:. . 9:._SORT| 00000670 5f 4d 65 6e 75 0d 02 44 1b 20 20 20 c9 20 31 37 |_Menu..D. . 17| 00000680 2c 31 38 3a f2 72 65 63 65 69 76 65 28 71 25 29 |,18:.receive(q%)| 00000690 0d 02 4e 08 20 20 20 cb 0d 02 58 08 20 fd 20 a3 |..N. ...X. . .| 000006a0 0d 02 62 04 0d 02 6c 05 e0 0d 02 76 04 0d 02 80 |..b...l....v....| 000006b0 0c dd 20 f2 5f 4e 75 6c 6c 0d 02 8a 0e ea 20 41 |.. ._Null..... A| 000006c0 25 2c 42 25 2c 43 25 0d 02 94 1a e7 20 91 3e 4d |%,B%,C%..... .>M| 000006d0 69 54 69 6d 65 25 20 80 20 77 6f 70 65 6e 25 20 |iTime% . wopen% | 000006e0 8c 0d 02 9e 12 f2 5f 54 72 61 6e 73 28 6d 6f 6e |......_Trans(mon| 000006f0 57 25 29 0d 02 a8 0c 42 25 3d a4 5f 48 53 72 0d |W%)....B%=._HSr.| 00000700 02 b2 34 e7 20 42 25 3c 3e 50 4f 52 54 25 28 32 |..4. B%<>PORT%(2| 00000710 29 20 8c 20 50 4f 52 54 25 28 32 29 3d 42 25 3a |) . PORT%(2)=B%:| 00000720 f2 5f 55 70 50 28 32 2c 50 4f 52 54 25 28 32 29 |._UpP(2,PORT%(2)| 00000730 2c 31 29 0d 02 bc 10 4d 69 54 69 6d 65 25 3d 91 |,1)....MiTime%=.| 00000740 2b 32 30 0d 02 c6 05 cd 0d 02 d0 05 e1 0d 02 da |+20.............| 00000750 04 0d 02 e4 0b dd 20 a4 5f 48 53 72 0d 02 ee 0b |...... ._HSr....| 00000760 ea 20 41 25 2c 42 25 0d 02 f8 23 c8 99 22 4f 53 |. A%,B%...#.."OS| 00000770 5f 53 65 72 69 61 6c 4f 70 22 2c 30 2c 26 41 33 |_SerialOp",0,&A3| 00000780 2c 26 46 46 46 46 46 46 35 34 0d 03 02 28 c8 99 |,&FFFFFF54...(..| 00000790 22 4f 53 5f 53 65 72 69 61 6c 4f 70 22 2c 30 2c |"OS_SerialOp",0,| 000007a0 30 2c 26 46 46 46 46 46 46 46 46 20 b8 20 2c 2c |0,&FFFFFFFF . ,,| 000007b0 41 25 0d 03 0c 1b 41 25 3d 28 28 41 25 3e 3e 31 |A%....A%=((A%>>1| 000007c0 38 29 20 80 20 26 46 29 20 82 20 26 42 0d 03 16 |8) . &F) . &B...| 000007d0 23 c8 99 22 4f 53 5f 53 65 72 69 61 6c 4f 70 22 |#.."OS_SerialOp"| 000007e0 2c 30 2c 26 32 33 2c 26 46 46 46 46 46 46 35 34 |,0,&23,&FFFFFF54| 000007f0 0d 03 20 28 c8 99 22 4f 53 5f 53 65 72 69 61 6c |.. (.."OS_Serial| 00000800 4f 70 22 2c 30 2c 30 2c 26 46 46 46 46 46 46 46 |Op",0,0,&FFFFFFF| 00000810 46 20 b8 20 2c 2c 42 25 0d 03 2a 1d 42 25 3d 28 |F . ,,B%..*.B%=(| 00000820 28 42 25 3e 3e 31 34 29 20 80 20 26 46 30 29 20 |(B%>>14) . &F0) | 00000830 82 20 26 42 30 0d 03 34 23 c8 99 22 4f 53 5f 53 |. &B0..4#.."OS_S| 00000840 65 72 69 61 6c 4f 70 22 2c 30 2c 26 41 33 2c 26 |erialOp",0,&A3,&| 00000850 46 46 46 46 46 46 35 34 0d 03 3e 0c 3d 41 25 20 |FFFFFF54..>.=A% | 00000860 84 20 42 25 0d 03 48 04 0d 03 52 11 dd 20 a4 5f |. B%..H...R.. ._| 00000870 73 70 61 74 68 28 6e 24 29 0d 03 5c 0f c8 95 20 |spath(n$)..\... | 00000880 a7 6e 24 2c 22 2e 22 29 0d 03 66 13 6e 24 3d c2 |.n$,".")..f.n$=.| 00000890 6e 24 2c a9 28 6e 24 29 2d 31 29 0d 03 70 05 ce |n$,.(n$)-1)..p..| 000008a0 0d 03 7a 1b e7 20 a9 28 6e 24 29 3e 31 30 20 8c |..z.. .(n$)>10 .| 000008b0 20 6e 24 3d c2 6e 24 2c 31 30 29 0d 03 84 07 3d | n$=.n$,10)....=| 000008c0 6e 24 0d 03 8e 04 0d 03 98 0f dd 20 f2 5f 47 65 |n$......... ._Ge| 000008d0 74 4e 61 6d 65 0d 03 a2 0e ea 20 54 25 2c 41 25 |tName..... T%,A%| 000008e0 2c 46 24 0d 03 ac 10 46 24 3d 22 22 3a 66 6e 24 |,F$....F$="":fn$| 000008f0 3d 22 22 0d 03 b6 16 71 25 21 30 3d 73 61 76 65 |=""....q%!0=save| 00000900 57 25 3a 71 25 21 34 3d 31 0d 03 c0 1e c8 99 20 |W%:q%!4=1...... | 00000910 22 57 69 6d 70 5f 47 65 74 49 63 6f 6e 53 74 61 |"Wimp_GetIconSta| 00000920 74 65 22 2c 2c 71 25 0d 03 ca 0c 54 25 3d 71 25 |te",,q%....T%=q%| 00000930 21 32 38 0d 03 d4 09 54 25 2d 3d 31 0d 03 de 05 |!28....T%-=1....| 00000940 f5 0d 03 e8 09 54 25 2b 3d 31 0d 03 f2 10 46 24 |.....T%+=1....F$| 00000950 3d 46 24 2b bd 28 3f 54 25 29 0d 03 fc 0b fd 20 |=F$+.(?T%)..... | 00000960 3f 54 25 3d 30 0d 04 06 16 66 6e 24 3d c1 46 24 |?T%=0....fn$=.F$| 00000970 2c 31 2c a9 28 46 24 29 2d 31 29 0d 04 10 05 e1 |,1,.(F$)-1).....| 00000980 0d 04 1a 04 0d 04 24 11 dd 20 f2 5f 53 4f 52 54 |......$.. ._SORT| 00000990 5f 4d 65 6e 75 0d 04 2e 11 e7 20 49 63 6f 6e 4d |_Menu..... IconM| 000009a0 65 6e 75 25 20 8c 0d 04 38 53 e7 20 21 71 25 3d |enu% ...8S. !q%=| 000009b0 31 20 8c 20 6d 65 6e 75 25 21 35 32 3d 31 3a 6d |1 . menu%!52=1:m| 000009c0 65 6e 75 25 21 37 36 3d 30 3a 20 4c 45 44 3d a3 |enu%!76=0: LED=.| 000009d0 20 3a c8 99 22 57 69 6d 70 5f 46 6f 72 63 65 52 | :.."Wimp_ForceR| 000009e0 65 64 72 61 77 22 2c 6d 6f 6e 57 25 2c 30 2c 2d |edraw",monW%,0,-| 000009f0 33 30 30 2c 37 30 30 2c 30 0d 04 42 52 e7 20 21 |300,700,0..BR. !| 00000a00 71 25 3d 32 20 8c 20 6d 65 6e 75 25 21 35 32 3d |q%=2 . menu%!52=| 00000a10 30 3a 6d 65 6e 75 25 21 37 36 3d 31 3a 4c 45 44 |0:menu%!76=1:LED| 00000a20 3d b9 20 3a c8 99 22 57 69 6d 70 5f 46 6f 72 63 |=. :.."Wimp_Forc| 00000a30 65 52 65 64 72 61 77 22 2c 6d 6f 6e 57 25 2c 30 |eRedraw",monW%,0| 00000a40 2c 2d 33 30 30 2c 37 30 30 2c 30 0d 04 4c 12 e7 |,-300,700,0..L..| 00000a50 20 21 71 25 3d 33 20 8c 20 f2 64 69 65 0d 04 56 | !q%=3 . .die..V| 00000a60 05 cb 0d 04 60 05 cd 0d 04 6a 1f c8 99 22 57 69 |....`....j..."Wi| 00000a70 6d 70 5f 47 65 74 50 6f 69 6e 74 65 72 49 6e 66 |mp_GetPointerInf| 00000a80 6f 22 2c 2c 71 25 0d 04 74 2a e7 20 71 25 21 38 |o",,q%..t*. q%!8| 00000a90 3d 31 20 8c 20 c8 99 22 57 69 6d 70 5f 43 72 65 |=1 . .."Wimp_Cre| 00000aa0 61 74 65 4d 65 6e 75 22 2c 2c 57 6d 65 6e 75 25 |ateMenu",,Wmenu%| 00000ab0 0d 04 7e 05 e1 0d 04 88 04 0d 04 92 0d dd 20 f2 |..~........... .| 00000ac0 5f 63 6c 6f 73 65 0d 04 9c 37 e7 20 71 25 21 30 |_close...7. q%!0| 00000ad0 3d 6d 6f 6e 57 25 20 8c 20 c8 99 22 57 69 6d 70 |=monW% . .."Wimp| 00000ae0 5f 47 65 74 57 69 6e 64 6f 77 49 6e 66 6f 22 2c |_GetWindowInfo",| 00000af0 2c 57 6e 25 3a 77 6f 70 65 6e 25 3d a3 0d 04 a6 |,Wn%:wopen%=....| 00000b00 20 e7 20 71 25 21 30 3d 77 61 72 6e 69 6e 67 57 | . q%!0=warningW| 00000b10 25 20 8c 20 77 61 72 6e 4f 6e 25 3d a3 0d 04 b0 |% . warnOn%=....| 00000b20 1d c8 99 20 22 57 69 6d 70 5f 43 6c 6f 73 65 57 |... "Wimp_CloseW| 00000b30 69 6e 64 6f 77 22 2c 2c 71 25 0d 04 ba 05 e1 0d |indow",,q%......| 00000b40 04 c4 04 0d 04 ce 14 dd 20 f2 5f 64 6f 5f 63 6c |........ ._do_cl| 00000b50 69 63 6b 28 71 25 29 0d 04 d8 0c 69 25 3d 71 25 |ick(q%)....i%=q%| 00000b60 21 31 36 0d 04 e2 0e c8 8e 20 71 25 21 31 32 20 |!16...... q%!12 | 00000b70 ca 0d 04 ec 28 c9 20 77 61 72 6e 69 6e 67 57 25 |....(. warningW%| 00000b80 3a 20 71 25 21 30 3d 77 61 72 6e 69 6e 67 57 25 |: q%!0=warningW%| 00000b90 20 3a f2 5f 63 6c 6f 73 65 0d 04 f6 04 0d 05 00 | :._close.......| 00000ba0 28 c9 20 2d 32 3a 20 f4 20 4c 6f 6f 6b 20 66 69 |(. -2: . Look fi| 00000bb0 72 73 74 20 61 74 20 49 63 6f 6e 20 42 61 72 20 |rst at Icon Bar | 00000bc0 43 6c 69 63 6b 0d 05 0a 1e 20 20 20 20 20 20 20 |Click.... | 00000bd0 20 e7 20 71 25 21 31 36 3d 73 6d 70 69 63 6f 6e | . q%!16=smpicon| 00000be0 25 20 8c 0d 05 14 4a 20 20 20 20 20 20 20 20 e7 |% ....J .| 00000bf0 20 71 25 21 38 3d 32 20 8c 20 49 63 6f 6e 4d 65 | q%!8=2 . IconMe| 00000c00 6e 75 25 3d b9 3a 20 c8 99 22 57 69 6d 70 5f 43 |nu%=.: .."Wimp_C| 00000c10 72 65 61 74 65 4d 65 6e 75 22 2c 2c 6d 65 6e 75 |reateMenu",,menu| 00000c20 25 2c 71 25 21 30 2d 39 34 2c 32 37 30 0d 05 1e |%,q%!0-94,270...| 00000c30 1d 20 20 20 20 20 20 20 20 e7 20 71 25 21 38 3d |. . q%!8=| 00000c40 34 20 8c 20 f2 5f 4f 70 65 6e 0d 05 28 0d 20 20 |4 . ._Open..(. | 00000c50 20 20 20 20 20 20 cd 0d 05 32 04 0d 05 3c 0e c9 | ...2...<..| 00000c60 20 6d 6f 6e 57 25 3a 20 20 0d 05 46 27 20 20 20 | monW%: ..F' | 00000c70 20 20 20 20 20 20 20 20 20 20 20 e7 20 71 25 21 | . q%!| 00000c80 38 3d 34 20 8c 20 f2 5f 4d 6f 6e 43 6c 69 63 6b |8=4 . ._MonClick| 00000c90 0d 05 50 05 cb 0d 05 5a 05 e1 0d 05 64 04 0d 05 |..P....Z....d...| 00000ca0 6e 04 0d 05 78 10 dd 20 f2 5f 4d 6f 6e 43 6c 69 |n...x.. ._MonCli| 00000cb0 63 6b 0d 05 82 0e ea 20 44 25 2c 56 25 2c 42 25 |ck..... D%,V%,B%| 00000cc0 0d 05 8c 26 f4 20 44 6f 20 74 68 65 20 61 63 74 |...&. Do the act| 00000cd0 69 6f 6e 20 66 6f 72 20 61 20 77 69 6e 64 6f 77 |ion for a window| 00000ce0 20 63 6c 69 63 6b 0d 05 96 08 f2 5f 44 70 0d 05 | click....._Dp..| 00000cf0 a0 15 e7 20 63 62 25 3c 38 20 80 20 63 72 25 3c |... cb%<8 . cr%<| 00000d00 33 20 8c 0d 05 aa 0e 20 20 c8 8e 20 63 72 25 20 |3 ..... .. cr% | 00000d10 ca 0d 05 b4 27 20 20 c9 20 32 3a 20 50 4f 52 54 |....' . 2: PORT| 00000d20 25 28 30 29 3d 50 4f 52 54 25 28 32 29 20 82 20 |%(0)=PORT%(2) . | 00000d30 31 3c 3c 28 63 62 25 29 0d 05 be 17 20 20 20 20 |1<<(cb%).... | 00000d40 20 20 20 20 20 20 4d 69 54 69 6d 65 25 3d 30 0d | MiTime%=0.| 00000d50 05 c8 07 20 20 cb 0d 05 d2 05 cd 0d 05 dc 05 e1 |... ...........| 00000d60 0d 05 e6 04 0d 05 f0 0c dd 20 f2 5f 4f 70 65 6e |......... ._Open| 00000d70 0d 05 fa 2e c8 99 22 4f 53 5f 52 65 61 64 4d 6f |......"OS_ReadMo| 00000d80 64 65 56 61 72 69 61 62 6c 65 22 2c 2d 31 2c 33 |deVariable",-1,3| 00000d90 20 b8 20 2c 2c 4e 63 6f 6c 6f 75 72 73 25 0d 06 | . ,,Ncolours%..| 00000da0 04 19 f4 20 4f 50 45 4e 20 55 50 20 57 49 4e 44 |... OPEN UP WIND| 00000db0 4f 57 20 48 45 52 45 0d 06 0e 0e e7 20 77 6f 70 |OW HERE..... wop| 00000dc0 65 6e 25 20 8c 0d 06 18 0e 71 25 21 30 3d 6d 6f |en% .....q%!0=mo| 00000dd0 6e 57 25 0d 06 22 1f c8 99 22 57 69 6d 70 5f 47 |nW%.."..."Wimp_G| 00000de0 65 74 57 69 6e 64 6f 77 53 74 61 74 65 22 2c 2c |etWindowState",,| 00000df0 71 25 0d 06 2c 36 20 20 e7 20 71 25 21 32 38 3c |q%..,6 . q%!28<| 00000e00 3e 2d 31 20 8c 20 71 25 21 32 38 3d 2d 31 3a 20 |>-1 . q%!28=-1: | 00000e10 c8 99 20 22 57 69 6d 70 5f 4f 70 65 6e 57 69 6e |.. "Wimp_OpenWin| 00000e20 64 6f 77 22 2c 2c 71 25 0d 06 36 05 cc 0d 06 40 |dow",,q%..6....@| 00000e30 1d c8 99 20 22 57 69 6d 70 5f 4f 70 65 6e 57 69 |... "Wimp_OpenWi| 00000e40 6e 64 6f 77 22 2c 2c 57 6e 25 0d 06 4a 0c 77 6f |ndow",,Wn%..J.wo| 00000e50 70 65 6e 25 3d b9 0d 06 54 05 cd 0d 06 5e 05 e1 |pen%=...T....^..| 00000e60 0d 06 68 04 0d 06 72 10 dd 20 f2 5f 64 6f 57 69 |..h...r.. ._doWi| 00000e70 6e 64 6f 77 0d 06 7c 10 20 20 ea 20 41 25 2c 49 |ndow..|. . A%,I| 00000e80 25 2c 4c 25 0d 06 86 04 0d 06 90 15 20 20 20 f2 |%,L%........ .| 00000e90 5f 54 72 61 6e 73 28 6d 6f 6e 57 25 29 0d 06 9a |_Trans(monW%)...| 00000ea0 29 20 20 20 c8 99 20 22 57 69 6d 70 5f 52 65 64 |) .. "Wimp_Red| 00000eb0 72 61 77 57 69 6e 64 6f 77 22 2c 2c 71 25 20 b8 |rawWindow",,q% .| 00000ec0 20 66 6c 61 67 25 0d 06 a4 11 20 20 20 20 20 c8 | flag%.... .| 00000ed0 95 20 66 6c 61 67 25 0d 06 ae 04 0d 06 b8 0f 20 |. flag%........ | 00000ee0 20 20 20 20 f2 5f 44 6d 70 77 0d 06 c2 2b 20 20 | ._Dmpw...+ | 00000ef0 20 20 20 c8 99 20 22 57 69 6d 70 5f 47 65 74 52 | .. "Wimp_GetR| 00000f00 65 63 74 61 6e 67 6c 65 22 2c 2c 71 25 20 b8 20 |ectangle",,q% . | 00000f10 66 6c 61 67 25 0d 06 cc 0a 20 20 20 20 20 ce 0d |flag%.... ..| 00000f20 06 d6 06 20 20 0d 06 e0 07 20 20 e1 0d 06 ea 04 |... .... .....| 00000f30 0d 06 f4 0e dd 20 a4 70 6f 69 6e 74 53 71 0d 06 |..... .pointSq..| 00000f40 fe 11 ea 20 58 25 2c 59 25 2c 42 25 2c 52 25 0d |... X%,Y%,B%,R%.| 00000f50 07 08 12 f2 5f 54 72 61 6e 73 28 6d 6f 6e 57 25 |...._Trans(monW%| 00000f60 29 0d 07 12 0f c8 97 20 58 25 2c 59 25 2c 42 25 |)...... X%,Y%,B%| 00000f70 0d 07 1c 08 52 25 3d 30 0d 07 26 29 e7 20 28 58 |....R%=0..&). (X| 00000f80 25 3c 28 78 6f 25 2b 33 30 29 20 80 20 59 25 3c |%<(xo%+30) . Y%<| 00000f90 28 79 6f 25 2b 33 30 29 20 29 20 8c 20 52 25 3d |(yo%+30) ) . R%=| 00000fa0 31 0d 07 30 2e e7 20 28 58 25 3e 28 78 6f 25 2b |1..0.. (X%>(xo%+| 00000fb0 32 34 36 2a 78 73 25 29 20 80 20 59 25 3c 28 79 |246*xs%) . Y%<(y| 00000fc0 6f 25 2b 33 30 29 20 29 20 8c 20 52 25 3d 32 0d |o%+30) ) . R%=2.| 00000fd0 07 3a 07 3d 52 25 0d 07 44 04 0d 07 4e 0c dd 20 |.:.=R%..D...N.. | 00000fe0 f2 5f 44 6d 70 77 0d 07 58 0e ea 20 41 25 2c 42 |._Dmpw..X.. A%,B| 00000ff0 25 2c 56 25 0d 07 62 12 f2 5f 54 72 61 6e 73 28 |%,V%..b.._Trans(| 00001000 6d 6f 6e 57 25 29 0d 07 6c 04 0d 07 76 11 f4 20 |monW%)..l...v.. | 00001010 74 65 73 74 20 76 61 6c 75 65 73 0d 07 80 08 42 |test values....B| 00001020 25 3d 32 0d 07 8a 04 0d 07 94 0e e3 20 41 25 3d |%=2......... A%=| 00001030 30 20 b8 20 37 0d 07 9e 1c 56 25 3d 50 4f 52 54 |0 . 7....V%=PORT| 00001040 25 28 42 25 29 20 80 20 31 3c 3c 28 37 2d 41 25 |%(B%) . 1<<(7-A%| 00001050 29 0d 07 a8 12 f2 5f 57 53 28 41 25 2c 42 25 2c |)....._WS(A%,B%,| 00001060 56 25 29 0d 07 b2 05 ed 0d 07 bc 17 f2 5f 48 65 |V%).........._He| 00001070 78 28 50 4f 52 54 25 28 42 25 29 2c 42 25 29 0d |x(PORT%(B%),B%).| 00001080 07 c6 06 ef 35 0d 07 d0 0e e3 20 41 25 3d 30 20 |....5..... A%=0 | 00001090 b8 20 37 0d 07 da 1a ec 20 78 6f 25 2b 35 32 2b |. 7..... xo%+52+| 000010a0 41 25 2a 34 30 2c 79 6f 25 2b 31 30 36 0d 07 e4 |A%*40,yo%+106...| 000010b0 0a f1 3b 37 2d 41 25 0d 07 ee 05 ed 0d 07 f8 15 |..;7-A%.........| 000010c0 ec 20 78 6f 25 2b 31 32 30 2c 79 6f 25 2b 32 37 |. xo%+120,yo%+27| 000010d0 34 0d 08 02 11 f1 22 49 6e 70 75 74 20 42 69 74 |4....."Input Bit| 000010e0 73 22 0d 08 0c 06 ef 34 0d 08 16 05 e1 0d 08 20 |s".....4....... | 000010f0 04 0d 08 2a 12 dd 20 f2 5f 48 65 78 28 56 25 2c |...*.. ._Hex(V%,| 00001100 59 25 29 0d 08 34 08 ea 20 76 24 0d 08 3e 09 59 |Y%)..4.. v$..>.Y| 00001110 25 2b 3d 31 0d 08 48 39 e7 20 4c 45 44 20 8c 20 |%+=1..H9. LED . | 00001120 c8 99 22 57 69 6d 70 5f 53 65 74 43 6f 6c 6f 75 |.."Wimp_SetColou| 00001130 72 22 2c 31 30 20 8b 20 c8 99 22 57 69 6d 70 5f |r",10 . .."Wimp_| 00001140 53 65 74 43 6f 6c 6f 75 72 22 2c 31 35 0d 08 52 |SetColour",15..R| 00001150 19 e7 20 4e 63 6f 6c 6f 75 72 73 25 3c 34 20 8c |.. Ncolours%<4 .| 00001160 20 e6 20 30 2c 30 0d 08 5c 04 0d 08 66 21 c8 93 | . 0,0..\...f!..| 00001170 c8 90 20 78 6f 25 2b 33 38 30 2c 79 6f 31 25 2b |.. xo%+380,yo1%+| 00001180 34 30 2a 59 25 2c 35 34 2c 34 30 0d 08 70 18 c8 |40*Y%,54,40..p..| 00001190 99 22 57 69 6d 70 5f 53 65 74 43 6f 6c 6f 75 72 |."Wimp_SetColour| 000011a0 22 2c 37 0d 08 7a 20 c8 93 20 78 6f 25 2b 20 33 |",7..z .. xo%+ 3| 000011b0 38 30 2c 79 6f 31 25 2b 59 25 2a 34 30 2c 35 34 |80,yo1%+Y%*40,54| 000011c0 2c 34 30 0d 08 84 06 ef 35 0d 08 8e 1b ec 20 78 |,40.....5..... x| 000011d0 6f 25 2b 33 38 34 2c 79 6f 31 25 2b 59 25 2a 34 |o%+384,yo1%+Y%*4| 000011e0 30 2b 33 32 0d 08 98 22 e7 20 56 25 3c 32 35 36 |0+32...". V%<256| 000011f0 20 8c 20 76 24 3d c3 7e 28 56 25 29 20 8b 20 76 | . v$=.~(V%) . v| 00001200 24 3d 22 58 58 22 0d 08 a2 19 e7 20 a9 28 76 24 |$="XX"..... .(v$| 00001210 29 3d 31 20 8c 20 76 24 3d 22 30 22 2b 76 24 0d |)=1 . v$="0"+v$.| 00001220 08 ac 0b f1 22 26 22 3b 76 24 0d 08 b6 06 ef 34 |...."&";v$.....4| 00001230 0d 08 c0 05 e1 0d 08 ca 04 0d 08 d4 14 dd 20 f2 |.............. .| 00001240 5f 57 53 28 58 25 2c 59 25 2c 56 25 29 0d 08 de |_WS(X%,Y%,V%)...| 00001250 08 ea 20 53 25 0d 08 e8 09 53 25 3d 34 30 0d 08 |.. S%....S%=40..| 00001260 f2 12 79 6f 31 25 3d 79 6f 25 2b 59 25 2a 53 25 |..yo1%=yo%+Y%*S%| 00001270 0d 08 fc 0b e7 20 4c 45 44 20 8c 0d 09 06 18 c8 |..... LED ......| 00001280 99 22 57 69 6d 70 5f 53 65 74 43 6f 6c 6f 75 72 |."Wimp_SetColour| 00001290 22 2c 37 0d 09 10 2f c8 8f c8 90 20 32 30 2b 78 |",7.../.... 20+x| 000012a0 6f 25 2b 20 53 25 20 2b 20 58 25 2a 53 25 2c 32 |o%+ S% + X%*S%,2| 000012b0 30 2b 79 6f 31 25 2b 53 25 2b 59 25 2a 53 25 2c |0+yo1%+S%+Y%*S%,| 000012c0 31 36 0d 09 1a 04 0d 09 24 29 e7 20 56 25 3d 30 |16......$). V%=0| 000012d0 20 80 20 4e 77 25 3d a3 20 8c 20 c8 99 22 57 69 | . Nw%=. . .."Wi| 000012e0 6d 70 5f 53 65 74 43 6f 6c 6f 75 72 22 2c 34 0d |mp_SetColour",4.| 000012f0 09 2e 2b e7 20 56 25 3c 3e 30 20 80 20 4e 77 25 |..+. V%<>0 . Nw%| 00001300 3d a3 20 8c 20 c8 99 22 57 69 6d 70 5f 53 65 74 |=. . .."Wimp_Set| 00001310 43 6f 6c 6f 75 72 22 2c 31 31 0d 09 38 22 e7 20 |Colour",11..8". | 00001320 4e 77 25 3d b9 20 8c 20 c8 99 22 57 69 6d 70 5f |Nw%=. . .."Wimp_| 00001330 53 65 74 43 6f 6c 6f 75 72 22 2c 37 0d 09 42 04 |SetColour",7..B.| 00001340 0d 09 4c 20 e7 20 4e 63 6f 6c 6f 75 72 73 25 3c |..L . Ncolours%<| 00001350 34 20 80 20 56 25 3d 30 20 8c 20 e6 20 30 2c 30 |4 . V%=0 . . 0,0| 00001360 0d 09 56 2e c8 8f c8 90 20 32 30 2b 78 6f 25 2b |..V..... 20+xo%+| 00001370 53 25 20 2b 20 58 25 2a 53 25 2c 32 30 2b 79 6f |S% + X%*S%,20+yo| 00001380 31 25 2b 53 25 2b 53 25 2a 59 25 2c 31 30 0d 09 |1%+S%+S%*Y%,10..| 00001390 60 04 0d 09 6a 05 cc 0d 09 74 32 e7 20 4e 63 6f |`...j....t2. Nco| 000013a0 6c 6f 75 72 73 25 3e 31 35 20 8c 20 e6 20 30 2c |lours%>15 . . 0,| 000013b0 34 35 20 8b 20 c8 99 22 57 69 6d 70 5f 53 65 74 |45 . .."Wimp_Set| 000013c0 43 6f 6c 6f 75 72 22 2c 30 0d 09 7e 2b c8 93 c8 |Colour",0..~+...| 000013d0 90 20 78 6f 25 2b 53 25 20 2b 20 58 25 2a 53 25 |. xo%+S% + X%*S%| 000013e0 2c 79 6f 31 25 2b 53 25 2b 53 25 2a 59 25 2c 53 |,yo1%+S%+S%*Y%,S| 000013f0 25 2c 53 25 0d 09 88 18 c8 99 22 57 69 6d 70 5f |%,S%......"Wimp_| 00001400 53 65 74 43 6f 6c 6f 75 72 22 2c 37 0d 09 92 2a |SetColour",7...*| 00001410 c8 93 20 78 6f 25 2b 20 53 25 20 2b 20 58 25 2a |.. xo%+ S% + X%*| 00001420 53 25 2c 79 6f 31 25 2b 53 25 2b 59 25 2a 53 25 |S%,yo1%+S%+Y%*S%| 00001430 2c 53 25 2c 53 25 0d 09 9c 06 ef 35 0d 09 a6 27 |,S%,S%.....5...'| 00001440 ec 20 78 6f 25 2b 53 25 2b 58 25 2a 53 25 2b 31 |. xo%+S%+X%*S%+1| 00001450 32 2c 79 6f 31 25 2b 53 25 2a 32 2b 59 25 2a 53 |2,yo1%+S%*2+Y%*S| 00001460 25 2d 38 0d 09 b0 19 e7 20 56 25 3d 30 20 80 20 |%-8..... V%=0 . | 00001470 4e 77 25 3d a3 20 8c 20 f1 22 30 22 0d 09 ba 1a |Nw%=. . ."0"....| 00001480 e7 20 56 25 3c 3e 30 20 80 20 4e 77 25 3d a3 20 |. V%<>0 . Nw%=. | 00001490 8c 20 f1 22 31 22 0d 09 c4 12 e7 20 4e 77 25 3d |. ."1"..... Nw%=| 000014a0 b9 20 8c 20 f1 22 58 22 0d 09 ce 06 ef 34 0d 09 |. . ."X".....4..| 000014b0 d8 05 cd 0d 09 e2 05 e1 0d 09 ec 04 0d 09 f6 15 |................| 000014c0 dd 20 f2 5f 55 70 50 28 50 25 2c 56 25 2c 4d 25 |. ._UpP(P%,V%,M%| 000014d0 29 0d 0a 00 12 ea 20 54 25 2c 41 25 2c 45 25 2c |)..... T%,A%,E%,| 000014e0 4e 77 25 0d 0a 0a 33 20 20 71 25 21 30 3d 6d 6f |Nw%...3 q%!0=mo| 000014f0 6e 57 25 3a 71 25 21 34 3d 30 3a 71 25 21 38 3d |nW%:q%!4=0:q%!8=| 00001500 2d 34 30 30 3a 71 25 21 31 32 3d 36 38 30 3a 71 |-400:q%!12=680:q| 00001510 25 21 31 36 3d 30 0d 0a 14 27 20 20 c8 99 22 57 |%!16=0...' .."W| 00001520 69 6d 70 5f 55 70 64 61 74 65 57 69 6e 64 6f 77 |imp_UpdateWindow| 00001530 22 2c 2c 71 25 20 b8 20 4d 6f 72 65 25 0d 0a 1e |",,q% . More%...| 00001540 04 0d 0a 28 0d 20 c8 95 20 4d 6f 72 65 25 0d 0a |...(. .. More%..| 00001550 32 04 0d 0a 3c 2b 20 20 e7 20 50 4f 52 54 25 28 |2...<+ . PORT%(| 00001560 31 29 3e 32 35 35 20 80 20 50 25 3d 31 20 8c 20 |1)>255 . P%=1 . | 00001570 4e 77 25 3d b9 20 8b 20 4e 77 25 3d a3 0d 0a 46 |Nw%=. . Nw%=...F| 00001580 10 20 20 e3 20 41 25 3d 30 20 b8 20 37 0d 0a 50 |. . A%=0 . 7..P| 00001590 17 20 20 54 25 3d 56 25 20 80 20 31 3c 3c 28 37 |. T%=V% . 1<<(7| 000015a0 2d 41 25 29 0d 0a 5a 1e 20 20 45 25 3d 50 4f 52 |-A%)..Z. E%=POR| 000015b0 54 25 28 50 25 29 20 80 20 31 3c 3c 28 37 2d 41 |T%(P%) . 1<<(7-A| 000015c0 25 29 0d 0a 64 26 20 20 e7 20 54 25 3c 3e 45 25 |%)..d& . T%<>E%| 000015d0 20 84 20 4d 25 3d 31 20 8c 20 f2 5f 57 53 28 41 | . M%=1 . ._WS(A| 000015e0 25 2c 50 25 2c 54 25 29 0d 0a 6e 07 20 20 ed 0d |%,P%,T%)..n. ..| 000015f0 0a 78 12 20 20 f2 5f 48 65 78 28 56 25 2c 50 25 |.x. ._Hex(V%,P%| 00001600 29 0d 0a 82 06 20 20 0d 0a 8c 27 20 20 c8 99 22 |).... ...' .."| 00001610 57 69 6d 70 5f 47 65 74 52 65 63 74 61 6e 67 6c |Wimp_GetRectangl| 00001620 65 22 2c 2c 71 25 20 b8 20 4d 6f 72 65 25 0d 0a |e",,q% . More%..| 00001630 96 06 20 ce 0d 0a a0 04 0d 0a aa 05 e1 0d 0a b4 |.. .............| 00001640 04 0d 0a be 0a dd 20 a4 5f 57 72 0d 0a c8 0c ea |...... ._Wr.....| 00001650 20 54 59 25 2c 52 25 0d 0a d2 0f 20 54 59 25 3d | TY%,R%.... TY%=| 00001660 59 25 2d 79 6f 25 0d 0a dc 09 20 52 25 3d 33 0d |Y%-yo%.... R%=3.| 00001670 0a e6 1f 20 e7 20 54 59 25 3e 3d 34 30 20 80 20 |... . TY%>=40 . | 00001680 54 59 25 3c 3d 38 30 20 8c 20 52 25 3d 30 0d 0a |TY%<=80 . R%=0..| 00001690 f0 21 20 e7 20 54 59 25 3e 3d 31 32 30 20 80 20 |.! . TY%>=120 . | 000016a0 54 59 25 3c 3d 31 36 30 20 8c 20 52 25 3d 31 0d |TY%<=160 . R%=1.| 000016b0 0a fa 21 20 e7 20 54 59 25 3e 3d 32 30 30 20 80 |..! . TY%>=200 .| 000016c0 20 54 59 25 3c 3d 32 34 30 20 8c 20 52 25 3d 32 | TY%<=240 . R%=2| 000016d0 0d 0b 04 07 3d 52 25 0d 0b 0e 0a dd 20 a4 5f 57 |....=R%..... ._W| 000016e0 62 0d 0b 18 08 ea 20 42 25 0d 0b 22 19 42 25 3d |b..... B%..".B%=| 000016f0 37 2d a8 28 28 58 25 2d 78 6f 25 29 2f 34 30 2d |7-.((X%-xo%)/40-| 00001700 31 29 0d 0b 2c 18 e7 20 42 25 3e 37 20 84 20 42 |1)..,.. B%>7 . B| 00001710 25 3c 30 20 8c 20 42 25 3d 38 0d 0b 36 07 3d 42 |%<0 . B%=8..6.=B| 00001720 25 0d 0b 40 04 0d 0b 4a 0a dd 20 f2 5f 44 70 0d |%..@...J.. ._Dp.| 00001730 0b 54 16 ea 20 58 25 2c 59 25 2c 42 25 2c 6e 72 |.T.. X%,Y%,B%,nr| 00001740 25 2c 6e 62 25 0d 0b 5e 0f c8 97 20 58 25 2c 59 |%,nb%..^... X%,Y| 00001750 25 2c 42 25 0d 0b 68 19 e7 20 58 25 3c 3e 4c 58 |%,B%..h.. X%<>LX| 00001760 25 20 84 20 59 25 3c 3e 4c 59 25 20 8c 0d 0b 72 |% . Y%<>LY% ...r| 00001770 13 20 f2 5f 54 72 61 6e 73 28 6d 6f 6e 57 25 29 |. ._Trans(monW%)| 00001780 0d 0b 7c 18 20 6e 72 25 3d a4 5f 57 72 20 3a 20 |..|. nr%=._Wr : | 00001790 6e 62 25 3d a4 5f 57 62 0d 0b 86 1c 20 e7 20 6e |nb%=._Wb.... . n| 000017a0 72 25 3c 3e 63 72 25 20 84 20 6e 62 25 3c 3e 63 |r%<>cr% . nb%<>c| 000017b0 62 25 20 8c 0d 0b 90 16 20 20 20 63 72 25 3d 6e |b% ..... cr%=n| 000017c0 72 25 3a 63 62 25 3d 6e 62 25 0d 0b 9a 08 20 20 |r%:cb%=nb%.... | 000017d0 20 cd 0d 0b a4 12 20 4c 58 25 3d 58 25 3a 4c 59 | ..... LX%=X%:LY| 000017e0 25 3d 59 25 0d 0b ae 05 cd 0d 0b b8 05 e1 0d 0b |%=Y%............| 000017f0 c2 04 0d 0b cc 12 dd 20 f2 5f 54 72 61 6e 73 28 |....... ._Trans(| 00001800 77 68 25 29 0d 0b d6 0b 21 71 25 3d 77 68 25 0d |wh%)....!q%=wh%.| 00001810 0b e0 20 c8 99 20 22 57 69 6d 70 5f 47 65 74 57 |.. .. "Wimp_GetW| 00001820 69 6e 64 6f 77 53 74 61 74 65 22 2c 2c 71 25 0d |indowState",,q%.| 00001830 0b ea 28 78 6f 25 3d 71 25 21 34 2d 71 25 21 32 |..(xo%=q%!4-q%!2| 00001840 30 2b 38 3a 79 6f 25 3d 71 25 21 31 36 2d 71 25 |0+8:yo%=q%!16-q%| 00001850 21 32 34 2d 32 39 30 0d 0b f4 16 58 4f 25 3d 71 |!24-290....XO%=q| 00001860 25 21 34 3a 59 4f 25 3d 71 25 21 31 36 0d 0b fe |%!4:YO%=q%!16...| 00001870 05 e1 0d 0c 08 04 0d 0c 12 0f dd f2 73 65 74 75 |............setu| 00001880 70 6d 65 6e 75 0d 0c 1c 08 ea 20 6d 25 0d 0c 26 |pmenu..... m%..&| 00001890 04 0d 0c 30 10 24 6d 65 6e 75 25 3d 22 50 55 50 |...0.$menu%="PUP| 000018a0 22 0d 0c 3a 0e 6d 65 6e 75 25 3f 31 32 3d 37 0d |"..:.menu%?12=7.| 000018b0 0c 44 0e 6d 65 6e 75 25 3f 31 33 3d 32 0d 0c 4e |.D.menu%?13=2..N| 000018c0 0e 6d 65 6e 75 25 3f 31 34 3d 37 0d 0c 58 0e 6d |.menu%?14=7..X.m| 000018d0 65 6e 75 25 3f 31 35 3d 30 0d 0c 62 10 6d 65 6e |enu%?15=0..b.men| 000018e0 75 25 21 31 36 3d 31 32 38 0d 0c 6c 0f 6d 65 6e |u%!16=128..l.men| 000018f0 75 25 21 32 30 3d 34 30 0d 0c 76 0e 6d 65 6e 75 |u%!20=40..v.menu| 00001900 25 21 32 34 3d 30 0d 0c 80 0f 6d 25 3d 6d 65 6e |%!24=0....m%=men| 00001910 75 25 2b 32 38 0d 0c 8a 0a 6d 25 21 30 3d 30 0d |u%+28....m%!0=0.| 00001920 0c 94 0e 6d 25 21 34 3d 69 6e 66 6f 25 0d 0c 9e |...m%!4=info%...| 00001930 18 6d 25 21 38 3d 28 37 3c 3c 32 34 29 84 20 25 |.m%!8=(7<<24). %| 00001940 31 30 30 30 31 0d 0c a8 13 24 28 6d 25 2b 31 32 |10001....$(m%+12| 00001950 29 3d 22 49 6e 66 6f 22 0d 0c b2 04 0d 0c bc 0a |)="Info"........| 00001960 6d 25 2b 3d 32 34 0d 0c c6 0a 6d 25 21 30 3d 31 |m%+=24....m%!0=1| 00001970 0d 0c d0 0a 6d 25 21 34 3d 30 0d 0c da 18 6d 25 |....m%!4=0....m%| 00001980 21 38 3d 28 37 3c 3c 32 34 29 84 20 25 31 30 30 |!8=(7<<24). %100| 00001990 30 31 0d 0c e4 15 24 28 6d 25 2b 31 32 29 3d 22 |01....$(m%+12)="| 000019a0 42 69 6e 61 72 79 22 0d 0c ee 04 0d 0c f8 0a 6d |Binary"........m| 000019b0 25 2b 3d 32 34 0d 0d 02 0a 6d 25 21 30 3d 30 0d |%+=24....m%!0=0.| 000019c0 0d 0c 0a 6d 25 21 34 3d 30 0d 0d 16 18 6d 25 21 |...m%!4=0....m%!| 000019d0 38 3d 28 37 3c 3c 32 34 29 84 20 25 31 30 30 30 |8=(7<<24). %1000| 000019e0 31 0d 0d 20 12 24 28 6d 25 2b 31 32 29 3d 22 4c |1.. .$(m%+12)="L| 000019f0 45 44 22 0d 0d 2a 04 0d 0d 34 0a 6d 25 2b 3d 32 |ED"..*...4.m%+=2| 00001a00 34 0d 0d 3e 0c 6d 25 21 30 3d 26 38 30 0d 0d 48 |4..>.m%!0=&80..H| 00001a10 0a 6d 25 21 34 3d 30 0d 0d 52 18 6d 25 21 38 3d |.m%!4=0..R.m%!8=| 00001a20 28 37 3c 3c 32 34 29 84 20 25 31 30 30 30 31 0d |(7<<24). %10001.| 00001a30 0d 5c 13 24 28 6d 25 2b 31 32 29 3d 22 51 75 69 |.\.$(m%+12)="Qui| 00001a40 74 22 0d 0d 66 04 0d 0d 70 05 e1 0d 0d 7a 04 0d |t"..f...p....z..| 00001a50 0d 84 12 dd 20 f2 72 65 63 65 69 76 65 28 71 25 |.... .receive(q%| 00001a60 29 0d 0d 8e 08 ea 20 41 25 0d 0d 98 0c 41 25 3d |)..... A%....A%=| 00001a70 71 25 21 31 36 0d 0d a2 0b c8 8e 20 41 25 20 ca |q%!16...... A% .| 00001a80 0d 0d ac 0c c9 20 30 3a f2 64 69 65 0d 0d b6 14 |..... 0:.die....| 00001a90 c9 20 26 35 30 32 3a 20 20 20 c8 8e 20 b9 20 ca |. &502: .. . .| 00001aa0 0d 0d c0 79 20 20 20 20 20 20 20 20 20 20 20 20 |...y | 00001ab0 20 c9 20 71 25 21 33 32 3d 2d 32 20 80 20 71 25 | . q%!32=-2 . q%| 00001ac0 21 33 36 3d 73 6d 70 69 63 6f 6e 25 3a 6d 65 73 |!36=smpicon%:mes| 00001ad0 24 3d 22 54 68 69 73 20 69 73 20 74 68 65 20 50 |$="This is the P| 00001ae0 55 50 20 4d 6f 6e 69 74 6f 72 20 69 63 6f 6e 2e |UP Monitor icon.| 00001af0 7c 4d 4f 62 73 65 72 76 65 20 74 68 65 20 73 69 ||MObserve the si| 00001b00 67 6e 61 6c 73 20 6f 6e 20 74 68 65 20 73 65 72 |gnals on the ser| 00001b10 69 61 6c 20 70 6f 72 74 22 0d 0d ca 1a 20 20 20 |ial port".... | 00001b20 20 20 20 20 20 20 20 20 20 20 7f 3a 6d 65 73 24 | .:mes$| 00001b30 3d 22 22 0d 0d d4 12 20 20 20 20 20 20 20 20 20 |="".... | 00001b40 20 20 20 20 cb 0d 0d de 14 20 20 20 20 e7 20 6d | ..... . m| 00001b50 65 73 24 3c 3e 22 22 20 8c 0d 0d e8 12 20 20 20 |es$<>"" ..... | 00001b60 20 71 25 21 31 32 3d 71 25 21 38 0d 0d f2 18 20 | q%!12=q%!8.... | 00001b70 20 20 20 24 28 71 25 2b 32 30 29 3d 6d 65 73 24 | $(q%+20)=mes$| 00001b80 2b bd 30 0d 0d fc 1e 20 20 20 20 71 25 21 30 3d |+.0.... q%!0=| 00001b90 28 32 30 2b a9 6d 65 73 24 2b 34 29 80 20 ac 20 |(20+.mes$+4). . | 00001ba0 33 0d 0e 06 12 20 20 20 20 71 25 21 31 36 3d 26 |3.... q%!16=&| 00001bb0 35 30 33 0d 0e 10 28 20 20 20 20 c8 99 20 22 57 |503...( .. "W| 00001bc0 69 6d 70 5f 53 65 6e 64 4d 65 73 73 61 67 65 22 |imp_SendMessage"| 00001bd0 2c 31 38 2c 71 25 2c 71 25 21 34 0d 0e 1a 05 cb |,18,q%,q%!4.....| 00001be0 0d 0e 24 05 e1 0d 0e 2e 04 0d 0e 38 0c dd 20 f2 |..$........8.. .| 00001bf0 5f 44 61 63 6b 0d 0e 42 10 73 65 6e 64 74 68 25 |_Dack..B.sendth%| 00001c00 3d 71 25 21 34 0d 0e 4c 0f 6d 79 72 65 66 25 3d |=q%!4..L.myref%=| 00001c10 71 25 21 38 0d 0e 56 22 c8 99 20 22 57 69 6d 70 |q%!8..V".. "Wimp| 00001c20 5f 47 65 74 50 6f 69 6e 74 65 72 49 6e 66 6f 22 |_GetPointerInfo"| 00001c30 2c 2c 71 25 2b 38 0d 0e 60 0e 71 25 21 32 38 3d |,,q%+8..`.q%!28=| 00001c40 71 25 21 38 0d 0e 6a 0f 71 25 21 33 32 3d 71 25 |q%!8..j.q%!32=q%| 00001c50 21 31 32 0d 0e 74 18 71 25 21 30 3d 28 34 34 2b |!12..t.q%!0=(44+| 00001c60 a9 6e 24 2b 34 29 80 20 ac 20 33 0d 0e 7e 10 71 |.n$+4). . 3..~.q| 00001c70 25 21 31 32 3d 6d 79 72 65 66 25 0d 0e 88 0b 71 |%!12=myref%....q| 00001c80 25 21 31 36 3d 34 0d 0e 92 0c 71 25 21 33 36 3d |%!16=4....q%!36=| 00001c90 2d 31 0d 0e 9c 0e 71 25 21 34 30 3d 26 46 46 39 |-1....q%!40=&FF9| 00001ca0 0d 0e a6 12 24 28 71 25 2b 34 34 29 3d 6e 24 2b |....$(q%+44)=n$+| 00001cb0 bd 30 0d 0e b0 27 c8 99 20 22 57 69 6d 70 5f 53 |.0...'.. "Wimp_S| 00001cc0 65 6e 64 4d 65 73 73 61 67 65 22 2c 31 37 2c 71 |endMessage",17,q| 00001cd0 25 2c 73 65 6e 64 74 68 25 0d 0e ba 05 cd 0d 0e |%,sendth%.......| 00001ce0 c4 05 e1 0d 0e ce 04 0d 0e d8 0e dd a4 73 67 65 |.............sge| 00001cf0 74 28 78 25 29 0d 0e e2 08 ea 20 78 24 0d 0e ec |t(x%)..... x$...| 00001d00 1d c8 95 20 3f 78 25 20 78 24 2b 3d bd 28 3f 78 |... ?x% x$+=.(?x| 00001d10 25 29 3a 78 25 2b 3d 31 3a ce 0d 0e f6 07 3d 78 |%):x%+=1:.....=x| 00001d20 24 0d 0f 00 04 0d 0f 0a 0a dd a4 69 63 6f 6e 0d |$..........icon.| 00001d30 0f 14 0b 71 25 21 30 3d 2d 31 0d 0f 1e 0a 71 25 |...q%!0=-1....q%| 00001d40 21 34 3d 30 0d 0f 28 1b 71 25 21 38 3d 31 30 20 |!4=0..(.q%!8=10 | 00001d50 3a 20 f4 20 59 20 44 49 52 45 43 54 49 4f 4e 0d |: . Y DIRECTION.| 00001d60 0f 32 1c 71 25 21 31 32 3d 37 30 20 3a 20 f4 20 |.2.q%!12=70 : . | 00001d70 58 20 44 49 52 45 43 54 49 4f 4e 0d 0f 3c 0c 71 |X DIRECTION..<.q| 00001d80 25 21 31 36 3d 39 36 0d 0f 46 0f 71 25 21 32 30 |%!16=96..F.q%!20| 00001d90 3d 26 32 30 30 32 0d 0f 50 13 24 28 71 25 2b 32 |=&2002..P.$(q%+2| 00001da0 34 29 3d 22 21 50 55 50 22 0d 0f 5a 24 c8 99 20 |4)="!PUP"..Z$.. | 00001db0 22 57 69 6d 70 5f 43 72 65 61 74 65 49 63 6f 6e |"Wimp_CreateIcon| 00001dc0 22 2c 2c 71 25 20 b8 20 69 63 6f 6e 25 0d 0f 64 |",,q% . icon%..d| 00001dd0 0a 3d 69 63 6f 6e 25 0d 0f 6e 04 0d 0f 78 12 dd |.=icon%..n...x..| 00001de0 20 f2 5f 73 65 74 75 70 57 28 74 24 29 0d 0f 82 | ._setupW(t$)...| 00001df0 58 21 71 25 3d 77 61 72 6e 69 6e 67 57 25 3a 71 |X!q%=warningW%:q| 00001e00 25 21 34 3d 32 30 30 3a 71 25 21 38 3d 32 30 30 |%!4=200:q%!8=200| 00001e10 3a 71 25 21 31 32 3d 32 30 30 2b 58 51 25 3a 71 |:q%!12=200+XQ%:q| 00001e20 25 21 31 36 3d 32 30 30 2b 59 51 25 3a 71 25 21 |%!16=200+YQ%:q%!| 00001e30 32 30 3d 30 3a 71 25 21 32 34 3d 30 3a 71 25 21 |20=0:q%!24=0:q%!| 00001e40 32 38 3d 2d 31 0d 0f 8c 11 24 54 65 78 74 57 61 |28=-1....$TextWa| 00001e50 72 6e 25 3d 74 24 0d 0f 96 15 54 65 78 74 57 61 |rn%=t$....TextWa| 00001e60 72 6e 25 3f a9 28 74 24 29 3d 30 0d 0f a0 07 ef |rn%?.(t$)=0.....| 00001e70 20 37 0d 0f aa 0d 77 61 72 6e 4f 6e 25 3d b9 0d | 7....warnOn%=..| 00001e80 0f b4 1c c8 99 20 22 57 69 6d 70 5f 4f 70 65 6e |..... "Wimp_Open| 00001e90 57 69 6e 64 6f 77 22 2c 2c 71 25 0d 0f be 05 e1 |Window",,q%.....| 00001ea0 0d 0f c8 04 0d 0f d2 0f dd 20 f2 65 72 72 6f 72 |......... .error| 00001eb0 62 6f 78 0d 0f dc 19 c8 99 20 22 57 69 6d 70 5f |box...... "Wimp_| 00001ec0 44 72 61 67 42 6f 78 22 2c 2c 2d 31 0d 0f e6 32 |DragBox",,-1...2| 00001ed0 21 62 75 66 66 65 72 73 25 3d 9f 3a 24 28 62 75 |!buffers%=.:$(bu| 00001ee0 66 66 65 72 73 25 2b 34 29 3d f6 24 2b 22 20 61 |ffers%+4)=.$+" a| 00001ef0 74 20 6c 69 6e 65 20 22 2b c3 9e 2b bd 30 0d 0f |t line "+..+.0..| 00001f00 f0 33 c8 99 20 22 57 69 6d 70 5f 52 65 70 6f 72 |.3.. "Wimp_Repor| 00001f10 74 45 72 72 6f 72 22 2c 62 75 66 66 65 72 73 25 |tError",buffers%| 00001f20 2c 31 2c 22 50 6f 72 74 20 4d 6f 6e 69 74 6f 72 |,1,"Port Monitor| 00001f30 22 0d 0f fa 08 f2 64 69 65 0d 10 04 05 e1 0d 10 |".....die.......| 00001f40 0e 04 0d 10 18 09 dd f2 64 69 65 0d 10 22 2a c8 |........die.."*.| 00001f50 99 20 22 57 69 6d 70 5f 43 6c 6f 73 65 44 6f 77 |. "Wimp_CloseDow| 00001f60 6e 22 2c 74 61 73 6b 68 61 6e 64 25 2c 21 74 61 |n",taskhand%,!ta| 00001f70 73 6b 69 64 25 0d 10 2c 05 e0 0d 10 36 05 e1 0d |skid%..,....6...| 00001f80 10 40 04 0d 10 4a 2e dd 20 f2 64 72 61 67 69 63 |.@...J.. .dragic| 00001f90 6f 6e 28 6d 6f 75 73 65 78 25 2c 6d 6f 75 73 65 |on(mousex%,mouse| 00001fa0 79 25 2c 68 61 6e 64 6c 65 25 2c 69 63 6f 6e 25 |y%,handle%,icon%| 00001fb0 29 0d 10 54 21 ea 20 62 78 25 2c 62 79 25 2c 69 |)..T!. bx%,by%,i| 00001fc0 78 30 25 2c 69 79 30 25 2c 69 78 31 25 2c 69 79 |x0%,iy0%,ix1%,iy| 00001fd0 31 25 0d 10 5e 12 f2 67 65 74 77 28 68 61 6e 64 |1%..^..getw(hand| 00001fe0 6c 65 25 29 0d 10 68 18 f2 67 65 74 69 28 68 61 |le%)..h..geti(ha| 00001ff0 6e 64 6c 65 25 2c 69 63 6f 6e 25 29 0d 10 72 16 |ndle%,icon%)..r.| 00002000 21 71 25 3d 68 61 6e 64 6c 65 25 3a 71 25 21 34 |!q%=handle%:q%!4| 00002010 3d 35 0d 10 7c 3e 71 25 21 38 3d 62 78 25 2b 69 |=5..|>q%!8=bx%+i| 00002020 78 30 25 3a 71 25 21 31 32 3d 62 79 25 2b 69 79 |x0%:q%!12=by%+iy| 00002030 30 25 3a 71 25 21 31 36 3d 62 78 25 2b 69 78 31 |0%:q%!16=bx%+ix1| 00002040 25 3a 71 25 21 32 30 3d 62 79 25 2b 69 79 31 25 |%:q%!20=by%+iy1%| 00002050 0d 10 86 2a 71 25 21 32 34 3d 71 25 21 38 2d 6d |...*q%!24=q%!8-m| 00002060 6f 75 73 65 78 25 3a 71 25 21 32 38 3d 71 25 21 |ousex%:q%!28=q%!| 00002070 31 32 2d 6d 6f 75 73 65 79 25 0d 10 90 19 c8 99 |12-mousey%......| 00002080 20 22 57 69 6d 70 5f 44 72 61 67 42 6f 78 22 2c | "Wimp_DragBox",| 00002090 2c 71 25 0d 10 9a 0c 53 46 4c 41 47 25 3d b9 0d |,q%....SFLAG%=..| 000020a0 10 a4 05 e1 0d 10 ae 04 0d 10 b8 14 dd 20 f2 67 |............. .g| 000020b0 65 74 77 28 68 61 6e 64 6c 65 25 29 0d 10 c2 38 |etw(handle%)...8| 000020c0 21 71 25 3d 68 61 6e 64 6c 65 25 3a c8 99 20 22 |!q%=handle%:.. "| 000020d0 57 69 6d 70 5f 47 65 74 57 69 6e 64 6f 77 53 74 |Wimp_GetWindowSt| 000020e0 61 74 65 22 2c 2c 71 25 3a f2 69 6e 66 6f 28 71 |ate",,q%:.info(q| 000020f0 25 2b 34 29 0d 10 cc 05 e1 0d 10 d6 12 dd 20 f2 |%+4).......... .| 00002100 67 65 74 69 28 68 25 2c 69 25 29 0d 10 e0 2d 21 |geti(h%,i%)...-!| 00002110 71 25 3d 68 25 3a 71 25 21 34 3d 69 25 3a c8 99 |q%=h%:q%!4=i%:..| 00002120 20 22 57 69 6d 70 5f 47 65 74 49 63 6f 6e 53 74 | "Wimp_GetIconSt| 00002130 61 74 65 22 2c 2c 71 25 0d 10 ea 2e 69 78 30 25 |ate",,q%....ix0%| 00002140 3d 71 25 21 38 3a 69 79 30 25 3d 71 25 21 31 32 |=q%!8:iy0%=q%!12| 00002150 3a 69 78 31 25 3d 71 25 21 31 36 3a 69 79 31 25 |:ix1%=q%!16:iy1%| 00002160 3d 71 25 21 32 30 0d 10 f4 1e 69 66 6c 61 67 73 |=q%!20....iflags| 00002170 25 3d 71 25 21 32 34 3a 69 64 61 74 61 25 3d 71 |%=q%!24:idata%=q| 00002180 25 2b 32 38 0d 10 fe 05 e1 0d 11 08 04 0d 11 12 |%+28............| 00002190 0f dd 20 f2 69 6e 66 6f 28 70 25 29 0d 11 1c 0d |.. .info(p%)....| 000021a0 ea 20 78 30 25 2c 79 30 25 0d 11 26 27 78 30 25 |. x0%,y0%..&'x0%| 000021b0 3d 21 70 25 3a 79 30 25 3d 70 25 21 34 3a 78 31 |=!p%:y0%=p%!4:x1| 000021c0 25 3d 70 25 21 38 3a 79 31 25 3d 70 25 21 31 32 |%=p%!8:y1%=p%!12| 000021d0 0d 11 30 35 73 63 78 25 3d 70 25 21 31 36 3a 73 |..05scx%=p%!16:s| 000021e0 63 79 25 3d 70 25 21 32 30 3a 62 68 61 6e 64 6c |cy%=p%!20:bhandl| 000021f0 65 25 3d 70 25 21 32 34 3a 66 6c 61 67 73 25 3d |e%=p%!24:flags%=| 00002200 70 25 21 32 38 0d 11 3a 1d 62 78 25 3d 78 30 25 |p%!28..:.bx%=x0%| 00002210 2d 73 63 78 25 3a 62 79 25 3d 79 31 25 2d 73 63 |-scx%:by%=y1%-sc| 00002220 79 25 0d 11 44 05 e1 0d 11 4e 04 0d 11 58 10 dd |y%..D....N...X..| 00002230 20 f2 5f 4b 65 79 50 72 65 73 73 0d 11 62 0d c8 | ._KeyPress..b..| 00002240 8e 20 71 25 21 30 20 ca 0d 11 6c 2b f4 20 4f 54 |. q%!0 ...l+. OT| 00002250 48 45 52 57 49 53 45 3a 20 53 59 53 22 57 69 6d |HERWISE: SYS"Wim| 00002260 70 5f 50 72 6f 63 65 73 73 4b 65 79 22 2c 71 25 |p_ProcessKey",q%| 00002270 21 32 34 0d 11 76 05 cb 0d 11 80 05 e1 0d 11 8a |!24..v..........| 00002280 04 0d ff |...| 00002283