Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199801_2.adf » Regulars2 » StarInfo/Fletcher/!Setup/Files/Disc1/Program/Games/!NetOxo/!RunImageU

StarInfo/Fletcher/!Setup/Files/Disc1/Program/Games/!NetOxo/!RunImageU

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_199801_2.adf » Regulars2
Filename: StarInfo/Fletcher/!Setup/Files/Disc1/Program/Games/!NetOxo/!RunImageU
Read OK:
File size: 2A4F bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >!RunImage
   20testing%=FALSE
   30LIBRARY "<HeapLibrary$File>"
   40LIBRARY "<BasicLibrary$File>":PROCinitlibrary
   50LIBRARY "<HeapLibrary$File>":PROCinitheap
   60LIBRARY "<SocketLibrary$File>":PROCinitsockets
   70ON ERROR PROCclosemessages:PROCeerror:IF testing%=TRUE THENOSCLI("Spool"):END ELSE END
   80IF testing%=TRUE THEN*Spool Spooled
   90IF testing%=TRUE THENTRACE ON
  100REM Appname$ is used for task manager & Appname$Dir
  110REM shortname$ is used for iconbar name and should usually be null
  120REM longname$ is used for info window
  130REM AppURL$ is used to for clicks on the version icon
  140Appname$="NetOXO":version$="1.04 (25 Jan 1997)"
  150shortname$="":longname$="O's and X's (port xxxx)"
  160Appdir$=FNsystemvar(Appname$+"$Dir")
  170AppURL$="http://users.essex.ac.uk/users/gerph/acorn/internet.html#netoxo"
  180PROCinitwimp:PROCinitprog
  190quit%=FALSE
  200ON ERROR PROCerror
  210WHILE quit%=FALSE
  220 PROCPoll
  230ENDWHILE
  240SYS "Wimp_CloseDown"
  250PROCclosemessages
  260PROCclosesockets
  270IF testing%=TRUE THEN*SPOOL
  280END
  290REM quit%=-1 for user quit, -2 for taskmanager quit
  300:
  310DEFPROCPoll
  320SYS "Wimp_Poll",0,b% TO reason%
  330CASE reason% OF
  340 WHEN 0:PROCchecksockets
  350 REM 1 = Redraw window
  360 WHEN 2:SYS "Wimp_OpenWindow",,b%
  370 WHEN 3
  380  IF !b%=sendwin% THENPROCclosesend ELSEIF !b%=msgwin% THENPROCclosemsg ELSESYS "Wimp_CloseWindow",,b%
  390 WHEN 6:PROCmouseclick(b%!8,b%!12,b%!16)
  400 REM 7 = Drag box dropped on another task
  410 WHEN 8:PROCprocesskey(b%!0,b%!4,b%!24)
  420 WHEN 9:PROCmenuchoice
  430 WHEN 17,18:PROCreceive(b%!16)
  440 WHEN 19:PROCreceiveack(b%!16)
  450ENDCASE
  460ENDPROC
  470:
  480REM Buttons : 1 = Adjust, 2 = Menu, 4 = Select
  490DEFPROCmouseclick(but,win,icon)
  500CASE win OF
  510 WHEN -2
  520  CASE but OF
  530   WHEN 2:PROCibmenu
  540   WHEN 1,4
  550    IF connect$="" THEN
  560     PROCopenwincentre(connectwin%)
  570     PROCsetcaretend(connectwin%,1)
  580    ELSE
  590     PROCopenwin(oxowin%)
  600    ENDIF
  610  ENDCASE
  620 WHEN infobox%
  630  CASE icon OF
  640   WHEN 1:PROCshowfree
  650   WHEN 3:PROCFetchPage("http://users.essex.ac.uk/users/gerph/")
  660   WHEN 4:PROCFetchPage(AppURL$)
  670  ENDCASE
  680 WHEN connectwin%
  690  CASE icon OF
  700   WHEN 4:PROCdoconnect
  710  ENDCASE
  720 WHEN oxowin%
  730  CASE but OF
  740   WHEN 1,4
  750    CASE icon OF
  760     WHEN 16:PROCopensend
  770     OTHERWISE:PROCclickonicon(icon)
  780    ENDCASE
  790   WHEN 2:PROCmenu(mainmenu%,-1,-1)
  800  ENDCASE
  810 WHEN sendwin%
  820  CASE icon OF
  830   WHEN 1:PROCdosend
  840   WHEN 2:PROCclosesend
  850  ENDCASE
  860 WHEN msgwin%
  870  CASE icon OF
  880   WHEN 1:PROCclosemsg
  890   WHEN 2:PROCclosemsg:PROCopensend
  900  ENDCASE
  910ENDCASE
  920ENDPROC
  930:
  940DEFPROCprocesskey(win,icon,key)
  950LOCAL keydone:keydone=FALSE
  960CASE win OF
  970 WHEN connectwin%
  980  IF icon=3 AND key=13 THENPROCdoconnect:keydone=TRUE
  990 WHEN sendwin%
 1000  IF key=13 THENPROCdosend:keydone=TRUE
 1010  IF key=27 THENPROCclosesend
 1020 WHEN msgwin%
 1030  IF key=13 OR key=27 THENPROCclosemsg:keydone=TRUE
 1040  IF key=ASC("R") OR key=ASC("r") THENPROCclosemsg:PROCopensend
 1050ENDCASE
 1060IF NOT keydone THENSYS "Wimp_ProcessKey",key
 1070ENDPROC
 1080:
 1090DEFPROCmenuchoice
 1100SYS"Wimp_GetPointerInfo",,message_buffer%:mbut%=message_buffer%!8
 1110m$=FNdecodemenu(curmenu%)
 1120CASE m$ OF
 1130 WHEN "Quit":quit%=TRUE
 1140 WHEN "Clear board"
 1150  IF won$<>"" THEN
 1160   PROCclearboard
 1170   IF connect$<>"" THEN
 1180    ?b%=ASC("C")
 1190    PROCsocket_senddata(sock,b%,3)
 1200   ENDIF
 1210  ENDIF
 1220 WHEN "Disconnect"
 1230  IF connect$<>"" THEN
 1240   ?b%=ASC("Q")
 1250   PROCsocket_senddata(sock,b%,3)
 1260   PROCdisconnect
 1270  ENDIF
 1280 WHEN "Message...":PROCopensend
 1290ENDCASE
 1300IF (mbut%AND1)=1 THENPROCrecreatemenu ELSEcurmenu%=-1
 1310ENDPROC
 1320:
 1330DEFPROCreceive(mess)
 1340CASE mess OF
 1350 REM &400C1 = mode change
 1360 REM &400C2 = task start up
 1370 REM &400C3 = task shut down
 1380 WHEN 0:quit%=TRUE*2
 1390 WHEN 3,5:type=b%!40
 1400  IF type = &8888 THEN
 1410   b%!12=b%!8:b%!16=4
 1420   SYS"Wimp_SendMessage",17,b%,b%!4
 1430   PROCloadfile(FNstring0(b%+44),b%!40)
 1440  ENDIF
 1450 WHEN &502:PROCHelp(b%!32,b%!36,b%!4)
 1460 WHEN 10:PROCdesktopsave(b%!20)
 1470 WHEN &4A266:REM ArcWeb fetch done (error/ok)
 1480  SYS "OS_File",6,"<Wimp$ScrapDir>."+STR$b%!20
 1490ENDCASE
 1500ENDPROC
 1510:
 1520DEFPROCreceiveack(mess)
 1530CASE mess OF
 1540 WHEN &4A265:REM ArcWeb fetch failed
 1550  CLOSE#(b%!28):SYS "OS_File",6,"<Wimp$ScrapDir>."+STR$b%!20
 1560ENDCASE
 1570ENDPROC
 1580:
 1590DEFPROCdesktopsave(file%)
 1600LOCAL ERROR
 1610ON ERROR LOCAL b%!12=b%!8:SYS "Wimp_SendMessage",19,b%,b%!4:RESTORE ERROR:ENDPROC
 1620REM The above line acknowledges the message if an error occurs
 1630REM aborting the desktop save.
 1640BPUT#file%,"Run "+Appdir$
 1650ENDPROC
 1660:
 1670DEFPROCloadfile(file$,type)
 1680CASE type OF
 1690ENDCASE
 1700ENDPROC
 1710:
 1720REM Any messages to be received MUST be noted
 1730DEFPROCinitwimp
 1740DIM messagelist% 256:messptr%=0
 1750PROCnotemessage(&502):PROCnotemessage(10)
 1760PROCnotemessage(0)
 1770SYS "Wimp_Initialise",310,&4B534154,Appname$,messagelist% TO wimpversion,handle
 1780indl%=1024:menul%=1024:DIM b% 2048,ind% indl%,menu% menul%,wspc% &800
 1790curmenu%=-1
 1800PROCopenmessages
 1810sprites%=FNloadsprites(Appdir$+".Sprites")
 1820infobox%=FNloadtemplate("Info",1)
 1830oxowin%=FNloadtemplate("oxo",sprites%)
 1840connectwin%=FNloadtemplate("connect",1)
 1850sendwin%=FNloadtemplate("send",1)
 1860msgwin%=FNloadtemplate("message",1)
 1870PROCseticontext(infobox%,1,Appname$)
 1880PROCseticontext(infobox%,2,longname$)
 1890PROCseticontext(infobox%,4,version$)
 1900ibhandle=FNCreateIconBarIcon("!"+Appname$,shortname$,1)
 1910mainmenu%=FNcreatemenu(Appname$+"|Clear board|Disconnect|Message...")
 1920ibmenu%=FNcreatemenu(Appname$+"|Info]>infobox%|Quit")
 1930iboptions%=options%
 1940DIM lastcaret% 24
 1950ENDPROC
 1960:
 1970DEFPROCinitprog
 1980listener=FNsocket_createinet
 1990port=FNsocket_findlisten(listener,0,1976,15)
 2000PROCseticontext(infobox%,2,FNmsgtext(">Info:"+STR$port))
 2010DIM board$(3,3)
 2020player$="x":won$=""
 2030connect$="":weare$=""
 2040wewon=-1:theywon=-1
 2050REM States
 2060_Initial=0
 2070_Move=1
 2080state=_Initial
 2090PROCclearboard
 2100ENDPROC
 2110:
 2120DEFPROCHelp(win,icon,to)
 2130RESTORE +1:PROCreadhelp(win,icon,to)
 2140ENDPROC
 2150REM Windows
 2160DATA infobox%,">HInfobox"
 2170DATA 3,">HInfobox3"
 2180DATA -2,">HIconbar"
 2190DATA -1,-1
 2200REM Menus
 2210DATA -2,-2,-2,-2
 2220:
 2230DEFPROCFetchPage(f$)
 2240IF FNsystemvar("Wimp$ScrapDir")<>"" THEN
 2250 f%=0:WHILE FNfilelength("<Wimp$ScrapDir>."+STR$f%)<>-1:f%+=1:ENDWHILE
 2260 o%=OPENOUT("<Wimp$ScrapDir>."+STR$f%)
 2270 BPUT#o%,f$:PTR#o%=0
 2280 !b%=32:b%!8=0:b%!12=0:b%!16=&4A265:b%!20=f%
 2290 b%!24=(1<<22):b%!28=o%:SYS "Wimp_SendMessage",18,b%,0
 2300ENDIF
 2310ENDPROC
 2320:
 2330DEFPROCclearboard
 2340FORI=4TO12
 2350 PROCseticonvalid(oxowin%,I,"")
 2360NEXT
 2370board$()="":won$="":PROCupdatetitle
 2380PROCmenushade(mainmenu%,0,1)
 2390ENDPROC
 2400:
 2410DEFPROCupdatetitle
 2420IF weare$="" THEN
 2430 PROCwindowtitle(oxowin%,">NotConnected")
 2440ELSE
 2450 IF weare$=player$ THEN
 2460  PROCwindowtitle(oxowin%,">Us:"+player$)
 2470 ELSE
 2480  PROCwindowtitle(oxowin%,">Them:"+player$)
 2490 ENDIF
 2500ENDIF
 2510ENDPROC
 2520:
 2530DEFPROCupdatescore
 2540IF wewon=-1 THENw$="-" ELSEw$=LEFT$(STR$wewon,3)
 2550IF theywon=-1 THENt$="-" ELSEt$=LEFT$(STR$theywon,3)
 2560PROCseticontext(oxowin%,15,w$)
 2570PROCseticontext(oxowin%,17,t$)
 2580ENDPROC
 2590:
 2600DEFPROCplacepiece(x,y,c$)
 2610LOCAL I:I=x+y*3
 2620board$(x,y)=LEFT$(c$+" ",1)
 2630PROCseticonvalid(oxowin%,I,"S"+board$(x,y))
 2640won$=FNwinner
 2650IF won$<>"" THEN
 2660 CASE won$ OF
 2670  WHEN weare$
 2680   reply=FNerrorbox(">Message",">WinUs:"+won$,%10001)
 2690   wewon+=1
 2700  WHEN "n"
 2710   reply=FNerrorbox(">Message",">WinNone",%10001)
 2720  OTHERWISE
 2730   reply=FNerrorbox(">Message",">WinThem:"+won$,%10001)
 2740   theywon+=1
 2750 ENDCASE
 2760 PROCupdatescore
 2770 PROCmenushade(mainmenu%,0,0)
 2780ENDIF
 2790CASE player$ OF
 2800 WHEN "x":player$="o"
 2810 WHEN "o":player$="x"
 2820ENDCASE
 2830PROCupdatetitle
 2840ENDPROC
 2850:
 2860DEFPROCclickonicon(icon)
 2870IF icon>=4 AND icon<=12 AND won$="" THEN
 2880 IF player$=weare$ THEN
 2890  x=((icon-4) MOD 3)+1
 2900  y=((icon-4) DIV 3)+1
 2910  IF board$(x,y)="" THEN
 2920   ?b%=ASC("M"):b%?1=x:b%?2=y
 2930   PROCsocket_senddata(sock,b%,3)
 2940   PROCplacepiece(x,y,player$)
 2950  ENDIF
 2960 ENDIF
 2970ENDIF
 2980ENDPROC
 2990:
 3000DEFFNwinner
 3010LOCAL x,y,w$,a$:w$="":a$=""
 3020FORx=1TO3
 3030 IF board$(x,1)=board$(x,2) AND board$(x,2)=board$(x,3) AND board$(x,1)<>"" THENw$=board$(x,3)
 3040 a$+=board$(x,1)+board$(x,2)+board$(x,3)
 3050NEXT
 3060FORy=1TO3
 3070 IF board$(1,y)=board$(2,y) AND board$(2,y)=board$(3,y) AND board$(1,y)<>"" THENw$=board$(3,y)
 3080NEXT
 3090IF board$(1,1)=board$(2,2) AND board$(2,2)=board$(3,3) AND board$(1,1)<>"" THENw$=board$(3,3)
 3100IF board$(3,1)=board$(2,2) AND board$(2,2)=board$(1,3) AND board$(3,1)<>"" THENw$=board$(3,1)
 3110IF w$="" AND LEN(a$)=9 THENw$="n"
 3120=w$
 3130:
 3140DEFPROCchecksockets
 3150IF connect$="" THEN
 3160 sock=FNsocket_accept(listener)
 3170 IF sock<>-1 THEN
 3180  connect$=FNsocket_getpeername(sock)
 3190  PROCseticontext(oxowin%,13,connect$)
 3200  PROCreset("x")
 3210 ENDIF
 3220ELSE
 3230 s=FNsocket_accept(listener)
 3240 IF s<>-1 THEN
 3250  PROCsocket_sendline(s,"All connections are taken")
 3260  PROCsocket_close(s)
 3270 ENDIF
 3280 IF FNsocket_inbuffer(sock)>0 THEN
 3290  buf%=FNclaim(2048)
 3300  len=FNsocket_readdata(sock,buf%)
 3310  type=buf%?0
 3320  CASE state OF
 3330   WHEN _Initial
 3340    IF type=ASC("o") AND buf%?1=ASC("x") AND buf%?2=ASC("o") THEN
 3350     state=_Move:PROCopenwin(oxowin%)
 3360    ELSE
 3370     PROCsocket_sendline(sock,"Invalid response")
 3380     PROCsocket_close(sock)
 3390     connect$=""
 3400    ENDIF
 3410   WHEN _Move
 3420    CASE CHR$(type) OF
 3430     WHEN "M":PROCplacepiece(buf%?1,buf%?2,player$)
 3440     WHEN "C":PROCclearboard
 3450     WHEN "Q"
 3460      reply=FNerrorbox(">Message",">GameOver",%10010)
 3470      PROCdisconnect
 3480     WHEN "T"
 3490      buf%?len=0
 3500      m$=LEFT$(FNstring0(buf%+1),39)
 3510      PROCseticontext(msgwin%,0,m$)
 3520      PROCopenmsg
 3530     OTHERWISE
 3540      PROCsocket_sendline(sock,"Imposter !")
 3550    ENDCASE
 3560  ENDCASE
 3570  PROCrelease(buf%)
 3580 ELSE
 3590  IF FNsocket_eof(sock) THEN
 3600   PROCdisconnect
 3610   reply=FNerrorbox(">Message",">Closed",%10010)
 3620  ENDIF
 3630 ENDIF
 3640ENDIF
 3650ENDPROC
 3660:
 3670DEFPROCdoconnect
 3680host$=FNgeticontext(connectwin%,1)
 3690port$=FNgeticontext(connectwin%,3)
 3700ip=FNinet_gethostbyname(host$)
 3710port=FNinet_getservbyname(port$,"tcp")
 3720sock=FNsocket_createinet
 3730ok=FNsocket_connect(sock,ip,port)
 3740IF NOT ok THEN
 3750 PROCsocket_close(sock)
 3760 reply=FNerrorbox(">Message",">NoConnect",%10010)
 3770ELSE
 3780 connect$=FNsocket_getpeername(sock)
 3790 PROCseticontext(oxowin%,13,connect$)
 3800 PROCreset("o")
 3810ENDIF
 3820ENDPROC
 3830:
 3840DEFPROCdisconnect
 3850PROCsocket_close(sock)
 3860connect$="":weare$=""
 3870PROCupdatetitle
 3880PROCclosemsg
 3890PROCclosesend
 3900PROCmenushade(mainmenu%,0,1):REM Shade 'clear'
 3910PROCmenushade(mainmenu%,1,1):REM Shade 'disconnect'
 3920PROCmenushade(mainmenu%,2,1):REM Shade 'message'
 3930PROCiconshade(oxowin%,16,1):REM Shade 'message' button
 3940ENDPROC
 3950:
 3960DEFPROCreset(x$)
 3970?b%=ASC("o"):b%?1=ASC("x"):b%?2=ASC("o")
 3980PROCsocket_senddata(sock,b%,3)
 3990weare$=x$:player$="x":PROCclearboard
 4000wewon=0:theywon=0:state=_Initial
 4010PROCupdatetitle
 4020PROCupdatescore
 4030PROCclosewin(connectwin%)
 4040PROCclosewin(oxowin%)
 4050PROCmenushade(mainmenu%,0,1):REM Shade 'clear'
 4060PROCmenushade(mainmenu%,1,0):REM Unshade 'disconnect'
 4070PROCmenushade(mainmenu%,2,0):REM Unshade 'message'
 4080PROCiconshade(oxowin%,16,0):REM Unshade 'message' button
 4090ENDPROC
 4100:
 4110DEFPROCdosend
 4120PROCclosesend
 4130m$=FNgeticontext(sendwin%,0):$(b%)="T":$(b%+1)=m$+CHR$13
 4140PROCsocket_senddata(sock,b%,3+LEN(m$))
 4150ENDPROC
 4160:
 4170DEFPROCopensend
 4180PROCgetcaretpos(win,icon,chars)
 4190IF win<>sendwin% THEN
 4200 SYS "Wimp_GetCaretPosition",,lastcaret%
 4210ENDIF
 4220PROCseticontext(sendwin%,0,"")
 4230PROCopenwin(sendwin%)
 4240PROCsetcaretpos(sendwin%,0,-1)
 4250ENDPROC
 4260:
 4270DEFPROCclosesend
 4280PROCgetcaretpos(win,icon,chars)
 4290IF win=sendwin% THEN
 4300 SYS "XWimp_SetCaretPosition",lastcaret%!0,lastcaret%!4,lastcaret%!8,lastcaret%!12,lastcaret%!16,lastcaret%!20
 4310ENDIF
 4320PROCclosewin(sendwin%)
 4330ENDPROC
 4340:
 4350DEFPROCopenmsg
 4360PROCgetcaretpos(win,icon,chars)
 4370IF win<>msgwin% THEN
 4380 SYS "Wimp_GetCaretPosition",,lastcaret%
 4390ENDIF
 4400PROCopenwin(msgwin%)
 4410PROCsetcaretpos(msgwin%,-1,-1)
 4420ENDPROC
 4430:
 4440DEFPROCclosemsg
 4450IF win=msgwin% THEN
 4460 SYS "XWimp_SetCaretPosition",lastcaret%!0,lastcaret%!4,lastcaret%!8,lastcaret%!12,lastcaret%!16,lastcaret%!20
 4470ENDIF
 4480PROCclosewin(msgwin%)
 4490ENDPROC

� >!RunImage
testing%=�
ț "<HeapLibrary$File>"
()ț "<BasicLibrary$File>":�initlibrary
2%ț "<HeapLibrary$File>":�initheap
<*ț "<SocketLibrary$File>":�initsockets
F=� � �closemessages:�eerror:� testing%=� ��("Spool"):� � �
P � testing%=� �*Spool Spooled
Z� testing%=� �� �
d5� Appname$ is used for task manager & Appname$Dir
nD� shortname$ is used for iconbar name and should usually be null
x'� longname$ is used for info window
�7� AppURL$ is used to for clicks on the version icon
�3Appname$="NetOXO":version$="1.04 (25 Jan 1997)"
�5shortname$="":longname$="O's and X's (port xxxx)"
�'Appdir$=�systemvar(Appname$+"$Dir")
�MAppURL$="http://users.essex.ac.uk/users/gerph/acorn/internet.html#netoxo"
��initwimp:�initprog
�quit%=�
�� � �error
�ȕ quit%=�
�
 �Poll
��
�ș "Wimp_CloseDown"
��closemessages
�closesockets
� testing%=� �*SPOOL
�
"5� quit%=-1 for user quit, -2 for taskmanager quit
,:
6
��Poll
@!ș "Wimp_Poll",0,b% � reason%
JȎ reason% �
T � 0:�checksockets
^ � 1 = Redraw window
h! � 2:ș "Wimp_OpenWindow",,b%
r � 3
|U  � !b%=sendwin% ��closesend �� !b%=msgwin% ��closemsg �ș "Wimp_CloseWindow",,b%
�& � 6:�mouseclick(b%!8,b%!12,b%!16)
�+ � 7 = Drag box dropped on another task
�% � 8:�processkey(b%!0,b%!4,b%!24)
� � 9:�menuchoice
� � 17,18:�receive(b%!16)
� � 19:�receiveack(b%!16)
��
��
�:
�0� Buttons : 1 = Adjust, 2 = Menu, 4 = Select
���mouseclick(but,win,icon)
�Ȏ win �
�	 � -2
  Ȏ but �
   � 2:�ibmenu
   � 1,4
&    � connect$="" �
0$     �openwincentre(connectwin%)
:$     �setcaretend(connectwin%,1)
D	    �
N     �openwin(oxowin%)
X	    �
b  �
l � infobox%
v  Ȏ icon �
�   � 1:�showfree
�>   � 3:�FetchPage("http://users.essex.ac.uk/users/gerph/")
�   � 4:�FetchPage(AppURL$)
�  �
� � connectwin%
�  Ȏ icon �
�   � 4:�doconnect
�  �
� � oxowin%
�  Ȏ but �
�   � 1,4
�    Ȏ icon �
�     � 16:�opensend
     :�clickonicon(icon)
	    �
!   � 2:�menu(mainmenu%,-1,-1)
   �
* � sendwin%
4  Ȏ icon �
>   � 1:�dosend
H   � 2:�closesend
R  �
\ � msgwin%
f  Ȏ icon �
p   � 1:�closemsg
z   � 2:�closemsg:�opensend
�  �
��
��
�:
���processkey(win,icon,key)
�� keydone:keydone=�
�Ȏ win �
� � connectwin%
�-  � icon=3 � key=13 ��doconnect:keydone=�
� � sendwin%
�!  � key=13 ��dosend:keydone=�
�  � key=27 ��closesend
� � msgwin%
,  � key=13 � key=27 ��closemsg:keydone=�
4  � key=�("R") � key=�("r") ��closemsg:�opensend
�
$)� � keydone �ș "Wimp_ProcessKey",key
.�
8:
B��menuchoice
LDș"Wimp_GetPointerInfo",,message_buffer%:mbut%=message_buffer%!8
Vm$=�decodemenu(curmenu%)
`Ȏ m$ �
j � "Quit":quit%=�
t � "Clear board"
~  � won$<>"" �
�   �clearboard
�   � connect$<>"" �
�    ?b%=�("C")
�#    �socket_senddata(sock,b%,3)
�   �
�  �
� � "Disconnect"
�  � connect$<>"" �
�   ?b%=�("Q")
�"   �socket_senddata(sock,b%,3)
�   �disconnect
�  �
 � "Message...":�opensend

�
-� (mbut%�1)=1 ��recreatemenu �curmenu%=-1
�
(:
2��receive(mess)
<
Ȏ mess �
F � &400C1 = mode change
P � &400C2 = task start up
Z � &400C3 = task shut down
d � 0:quit%=�*2
n � 3,5:type=b%!40
x  � type = &8888 �
�   b%!12=b%!8:b%!16=4
�&   ș"Wimp_SendMessage",17,b%,b%!4
�'   �loadfile(�string0(b%+44),b%!40)
�  �
�# � &502:�Help(b%!32,b%!36,b%!4)
� � 10:�desktopsave(b%!20)
�, � &4A266:� ArcWeb fetch done (error/ok)
�.  ș "OS_File",6,"<Wimp$ScrapDir>."+�b%!20
��
��
�:
���receiveack(mess)
�
Ȏ mess �
# � &4A265:� ArcWeb fetch failed
8  �#(b%!28):ș "OS_File",6,"<Wimp$ScrapDir>."+�b%!20
�
"�
,:
6��desktopsave(file%)
@� �
J;� � � b%!12=b%!8:ș "Wimp_SendMessage",19,b%,b%!4:� �:�
T@� The above line acknowledges the message if an error occurs
^ � aborting the desktop save.
h�#file%,"Run "+Appdir$
r�
|:
���loadfile(file$,type)
�
Ȏ type �
��
��
�:
�/� Any messages to be received MUST be noted
���initwimp
�!� messagelist% 256:messptr%=0
�'�notemessage(&502):�notemessage(10)
��notemessage(0)
�Qș "Wimp_Initialise",310,&4B534154,Appname$,messagelist% � wimpversion,handle
�Gindl%=1024:menul%=1024:� b% 2048,ind% indl%,menu% menul%,wspc% &800
�curmenu%=-1
�openmessages
-sprites%=�loadsprites(Appdir$+".Sprites")
$infobox%=�loadtemplate("Info",1)
&)oxowin%=�loadtemplate("oxo",sprites%)
0*connectwin%=�loadtemplate("connect",1)
:$sendwin%=�loadtemplate("send",1)
D&msgwin%=�loadtemplate("message",1)
N%�seticontext(infobox%,1,Appname$)
X&�seticontext(infobox%,2,longname$)
b%�seticontext(infobox%,4,version$)
l:ibhandle=�CreateIconBarIcon("!"+Appname$,shortname$,1)
vHmainmenu%=�createmenu(Appname$+"|Clear board|Disconnect|Message...")
�8ibmenu%=�createmenu(Appname$+"|Info]>infobox%|Quit")
�iboptions%=options%
�� lastcaret% 24
��
�:
���initprog
�listener=�socket_createinet
�/port=�socket_findlisten(listener,0,1976,15)
�5�seticontext(infobox%,2,�msgtext(">Info:"+�port))
�� board$(3,3)
�player$="x":won$=""
�connect$="":weare$=""
�wewon=-1:theywon=-1
� States
_Initial=0
_Move=1
 state=_Initial
*�clearboard
4�
>:
H��Help(win,icon,to)
R� +1:�readhelp(win,icon,to)
\�
f
� Windows
p� infobox%,">HInfobox"
z� 3,">HInfobox3"
�� -2,">HIconbar"
�� -1,-1
�� Menus
�� -2,-2,-2,-2
�:
���FetchPage(f$)
�'� �systemvar("Wimp$ScrapDir")<>"" �
�< f%=0:ȕ �filelength("<Wimp$ScrapDir>."+�f%)<>-1:f%+=1:�
�! o%=�("<Wimp$ScrapDir>."+�f%)
� �#o%,f$:�#o%=0
�0 !b%=32:b%!8=0:b%!12=0:b%!16=&4A265:b%!20=f%
�9 b%!24=(1<<22):b%!28=o%:ș "Wimp_SendMessage",18,b%,0
��
	�
	:
	��clearboard
	$�I=4�12
	.  �seticonvalid(oxowin%,I,"")
	8�
	B$board$()="":won$="":�updatetitle
	L�menushade(mainmenu%,0,1)
	V�
	`:
	j��updatetitle
	t� weare$="" �
	~* �windowtitle(oxowin%,">NotConnected")
	��
	� � weare$=player$ �
	�*  �windowtitle(oxowin%,">Us:"+player$)
	� �
	�,  �windowtitle(oxowin%,">Them:"+player$)
	� �
	��
	��
	�:
	���updatescore
	�%� wewon=-1 �w$="-" �w$=��wewon,3)
	�)� theywon=-1 �t$="-" �t$=��theywon,3)
�seticontext(oxowin%,15,w$)

�seticontext(oxowin%,17,t$)
�
:
(��placepiece(x,y,c$)
2� I:I=x+y*3
<board$(x,y)=�c$+" ",1)
F,�seticonvalid(oxowin%,I,"S"+board$(x,y))
Pwon$=�winner
Z� won$<>"" �
d Ȏ won$ �
n  � weare$
x8   reply=�errorbox(">Message",">WinUs:"+won$,%10001)
�   wewon+=1
�  � "n"
�4   reply=�errorbox(">Message",">WinNone",%10001)
�  
�:   reply=�errorbox(">Message",">WinThem:"+won$,%10001)
�   theywon+=1
� �
� �updatescore
� �menushade(mainmenu%,0,0)
��
�Ȏ player$ �
� � "x":player$="o"
� � "o":player$="x"
�
�updatetitle
�
":
,��clickonicon(icon)
6$� icon>=4 � icon<=12 � won$="" �
@ � player$=weare$ �
J  x=((icon-4) � 3)+1
T  y=((icon-4) � 3)+1
^  � board$(x,y)="" �
h   ?b%=�("M"):b%?1=x:b%?2=y
r"   �socket_senddata(sock,b%,3)
|   �placepiece(x,y,player$)
�  �
� �
��
��
�:
�ݤwinner
�� x,y,w$,a$:w$="":a$=""
�
�x=1�3
�Z � board$(x,1)=board$(x,2) � board$(x,2)=board$(x,3) � board$(x,1)<>"" �w$=board$(x,3)
�, a$+=board$(x,1)+board$(x,2)+board$(x,3)
��
�
�y=1�3
�Z � board$(1,y)=board$(2,y) � board$(2,y)=board$(3,y) � board$(1,y)<>"" �w$=board$(3,y)
�
Y� board$(1,1)=board$(2,2) � board$(2,2)=board$(3,3) � board$(1,1)<>"" �w$=board$(3,3)
Y� board$(3,1)=board$(2,2) � board$(2,2)=board$(1,3) � board$(3,1)<>"" �w$=board$(3,1)
&� w$="" � �(a$)=9 �w$="n"
0=w$
::
D��checksockets
N� connect$="" �
X" sock=�socket_accept(listener)
b � sock<>-1 �
l(  connect$=�socket_getpeername(sock)
v'  �seticontext(oxowin%,13,connect$)
�  �reset("x")
� �
��
� s=�socket_accept(listener)
� � s<>-1 �
�5  �socket_sendline(s,"All connections are taken")
�  �socket_close(s)
� �
�! � �socket_inbuffer(sock)>0 �
�  buf%=�claim(2048)
�%  len=�socket_readdata(sock,buf%)
�  type=buf%?0
�  Ȏ state �

   � _Initial

7    � type=�("o") � buf%?1=�("x") � buf%?2=�("o") �

&     state=_Move:�openwin(oxowin%)

 	    �

*2     �socket_sendline(sock,"Invalid response")

4     �socket_close(sock)

>     connect$=""

H	    �

R   � _Move

\    Ȏ �(type) �

f1     � "M":�placepiece(buf%?1,buf%?2,player$)

p     � "C":�clearboard

z     � "Q"

�8      reply=�errorbox(">Message",">GameOver",%10010)

�      �disconnect

�     � "T"

�      buf%?len=0

�"      m$=��string0(buf%+1),39)

�$      �seticontext(msgwin%,0,m$)

�      �openmsg

�
     

�-      �socket_sendline(sock,"Imposter !")

�	    �

�  �

�  �release(buf%)

� �
  � �socket_eof(sock) �
   �disconnect
3   reply=�errorbox(">Message",">Closed",%10010)
$  �
. �
8�
B�
L:
V��doconnect
`%host$=�geticontext(connectwin%,1)
j%port$=�geticontext(connectwin%,3)
t!ip=�inet_gethostbyname(host$)
~)port=�inet_getservbyname(port$,"tcp")
�sock=�socket_createinet
�$ok=�socket_connect(sock,ip,port)
�� � ok �
� �socket_close(sock)
�4 reply=�errorbox(">Message",">NoConnect",%10010)
��
�' connect$=�socket_getpeername(sock)
�& �seticontext(oxowin%,13,connect$)
� �reset("o")
��
��
�:
��disconnect

�socket_close(sock)
connect$="":weare$=""
�updatetitle
(
�closemsg
2�closesend
<-�menushade(mainmenu%,0,1):� Shade 'clear'
F2�menushade(mainmenu%,1,1):� Shade 'disconnect'
P/�menushade(mainmenu%,2,1):� Shade 'message'
Z5�iconshade(oxowin%,16,1):� Shade 'message' button
d�
n:
x��reset(x$)
�&?b%=�("o"):b%?1=�("x"):b%?2=�("o")
��socket_senddata(sock,b%,3)
�%weare$=x$:player$="x":�clearboard
�$wewon=0:theywon=0:state=_Initial
��updatetitle
��updatescore
��closewin(connectwin%)
��closewin(oxowin%)
�-�menushade(mainmenu%,0,1):� Shade 'clear'
�4�menushade(mainmenu%,1,0):� Unshade 'disconnect'
�1�menushade(mainmenu%,2,0):� Unshade 'message'
�7�iconshade(oxowin%,16,0):� Unshade 'message' button
��
:
��dosend
�closesend
"8m$=�geticontext(sendwin%,0):$(b%)="T":$(b%+1)=m$+�13
,%�socket_senddata(sock,b%,3+�(m$))
6�
@:
J��opensend
T �getcaretpos(win,icon,chars)
^� win<>sendwin% �
h+ ș "Wimp_GetCaretPosition",,lastcaret%
r�
|�seticontext(sendwin%,0,"")
��openwin(sendwin%)
��setcaretpos(sendwin%,0,-1)
��
�:
���closesend
� �getcaretpos(win,icon,chars)
�� win=sendwin% �
�q ș "XWimp_SetCaretPosition",lastcaret%!0,lastcaret%!4,lastcaret%!8,lastcaret%!12,lastcaret%!16,lastcaret%!20
��
��closewin(sendwin%)
��
�:
�
��openmsg
 �getcaretpos(win,icon,chars)
� win<>msgwin% �
+ ș "Wimp_GetCaretPosition",,lastcaret%
&�
0�openwin(msgwin%)
:�setcaretpos(msgwin%,-1,-1)
D�
N:
X��closemsg
b� win=msgwin% �
lq ș "XWimp_SetCaretPosition",lastcaret%!0,lastcaret%!4,lastcaret%!8,lastcaret%!12,lastcaret%!16,lastcaret%!20
v�
��closewin(msgwin%)
��
�
00000000  0d 00 0a 10 f4 20 3e 21  52 75 6e 49 6d 61 67 65  |..... >!RunImage|
00000010  0d 00 14 0e 74 65 73 74  69 6e 67 25 3d a3 0d 00  |....testing%=...|
00000020  1e 1b c8 9b 20 22 3c 48  65 61 70 4c 69 62 72 61  |.... "<HeapLibra|
00000030  72 79 24 46 69 6c 65 3e  22 0d 00 28 29 c8 9b 20  |ry$File>"..().. |
00000040  22 3c 42 61 73 69 63 4c  69 62 72 61 72 79 24 46  |"<BasicLibrary$F|
00000050  69 6c 65 3e 22 3a f2 69  6e 69 74 6c 69 62 72 61  |ile>":.initlibra|
00000060  72 79 0d 00 32 25 c8 9b  20 22 3c 48 65 61 70 4c  |ry..2%.. "<HeapL|
00000070  69 62 72 61 72 79 24 46  69 6c 65 3e 22 3a f2 69  |ibrary$File>":.i|
00000080  6e 69 74 68 65 61 70 0d  00 3c 2a c8 9b 20 22 3c  |nitheap..<*.. "<|
00000090  53 6f 63 6b 65 74 4c 69  62 72 61 72 79 24 46 69  |SocketLibrary$Fi|
000000a0  6c 65 3e 22 3a f2 69 6e  69 74 73 6f 63 6b 65 74  |le>":.initsocket|
000000b0  73 0d 00 46 3d ee 20 85  20 f2 63 6c 6f 73 65 6d  |s..F=. . .closem|
000000c0  65 73 73 61 67 65 73 3a  f2 65 65 72 72 6f 72 3a  |essages:.eerror:|
000000d0  e7 20 74 65 73 74 69 6e  67 25 3d b9 20 8c ff 28  |. testing%=. ..(|
000000e0  22 53 70 6f 6f 6c 22 29  3a e0 20 8b 20 e0 0d 00  |"Spool"):. . ...|
000000f0  50 20 e7 20 74 65 73 74  69 6e 67 25 3d b9 20 8c  |P . testing%=. .|
00000100  2a 53 70 6f 6f 6c 20 53  70 6f 6f 6c 65 64 0d 00  |*Spool Spooled..|
00000110  5a 15 e7 20 74 65 73 74  69 6e 67 25 3d b9 20 8c  |Z.. testing%=. .|
00000120  fc 20 ee 0d 00 64 35 f4  20 41 70 70 6e 61 6d 65  |. ...d5. Appname|
00000130  24 20 69 73 20 75 73 65  64 20 66 6f 72 20 74 61  |$ is used for ta|
00000140  73 6b 20 6d 61 6e 61 67  65 72 20 26 20 41 70 70  |sk manager & App|
00000150  6e 61 6d 65 24 44 69 72  0d 00 6e 44 f4 20 73 68  |name$Dir..nD. sh|
00000160  6f 72 74 6e 61 6d 65 24  20 69 73 20 75 73 65 64  |ortname$ is used|
00000170  20 66 6f 72 20 69 63 6f  6e 62 61 72 20 6e 61 6d  | for iconbar nam|
00000180  65 20 61 6e 64 20 73 68  6f 75 6c 64 20 75 73 75  |e and should usu|
00000190  61 6c 6c 79 20 62 65 20  6e 75 6c 6c 0d 00 78 27  |ally be null..x'|
000001a0  f4 20 6c 6f 6e 67 6e 61  6d 65 24 20 69 73 20 75  |. longname$ is u|
000001b0  73 65 64 20 66 6f 72 20  69 6e 66 6f 20 77 69 6e  |sed for info win|
000001c0  64 6f 77 0d 00 82 37 f4  20 41 70 70 55 52 4c 24  |dow...7. AppURL$|
000001d0  20 69 73 20 75 73 65 64  20 74 6f 20 66 6f 72 20  | is used to for |
000001e0  63 6c 69 63 6b 73 20 6f  6e 20 74 68 65 20 76 65  |clicks on the ve|
000001f0  72 73 69 6f 6e 20 69 63  6f 6e 0d 00 8c 33 41 70  |rsion icon...3Ap|
00000200  70 6e 61 6d 65 24 3d 22  4e 65 74 4f 58 4f 22 3a  |pname$="NetOXO":|
00000210  76 65 72 73 69 6f 6e 24  3d 22 31 2e 30 34 20 28  |version$="1.04 (|
00000220  32 35 20 4a 61 6e 20 31  39 39 37 29 22 0d 00 96  |25 Jan 1997)"...|
00000230  35 73 68 6f 72 74 6e 61  6d 65 24 3d 22 22 3a 6c  |5shortname$="":l|
00000240  6f 6e 67 6e 61 6d 65 24  3d 22 4f 27 73 20 61 6e  |ongname$="O's an|
00000250  64 20 58 27 73 20 28 70  6f 72 74 20 78 78 78 78  |d X's (port xxxx|
00000260  29 22 0d 00 a0 27 41 70  70 64 69 72 24 3d a4 73  |)"...'Appdir$=.s|
00000270  79 73 74 65 6d 76 61 72  28 41 70 70 6e 61 6d 65  |ystemvar(Appname|
00000280  24 2b 22 24 44 69 72 22  29 0d 00 aa 4d 41 70 70  |$+"$Dir")...MApp|
00000290  55 52 4c 24 3d 22 68 74  74 70 3a 2f 2f 75 73 65  |URL$="http://use|
000002a0  72 73 2e 65 73 73 65 78  2e 61 63 2e 75 6b 2f 75  |rs.essex.ac.uk/u|
000002b0  73 65 72 73 2f 67 65 72  70 68 2f 61 63 6f 72 6e  |sers/gerph/acorn|
000002c0  2f 69 6e 74 65 72 6e 65  74 2e 68 74 6d 6c 23 6e  |/internet.html#n|
000002d0  65 74 6f 78 6f 22 0d 00  b4 17 f2 69 6e 69 74 77  |etoxo".....initw|
000002e0  69 6d 70 3a f2 69 6e 69  74 70 72 6f 67 0d 00 be  |imp:.initprog...|
000002f0  0b 71 75 69 74 25 3d a3  0d 00 c8 0e ee 20 85 20  |.quit%=...... . |
00000300  f2 65 72 72 6f 72 0d 00  d2 0e c8 95 20 71 75 69  |.error...... qui|
00000310  74 25 3d a3 0d 00 dc 0a  20 f2 50 6f 6c 6c 0d 00  |t%=..... .Poll..|
00000320  e6 05 ce 0d 00 f0 17 c8  99 20 22 57 69 6d 70 5f  |......... "Wimp_|
00000330  43 6c 6f 73 65 44 6f 77  6e 22 0d 00 fa 12 f2 63  |CloseDown".....c|
00000340  6c 6f 73 65 6d 65 73 73  61 67 65 73 0d 01 04 11  |losemessages....|
00000350  f2 63 6c 6f 73 65 73 6f  63 6b 65 74 73 0d 01 0e  |.closesockets...|
00000360  18 e7 20 74 65 73 74 69  6e 67 25 3d b9 20 8c 2a  |.. testing%=. .*|
00000370  53 50 4f 4f 4c 0d 01 18  05 e0 0d 01 22 35 f4 20  |SPOOL......."5. |
00000380  71 75 69 74 25 3d 2d 31  20 66 6f 72 20 75 73 65  |quit%=-1 for use|
00000390  72 20 71 75 69 74 2c 20  2d 32 20 66 6f 72 20 74  |r quit, -2 for t|
000003a0  61 73 6b 6d 61 6e 61 67  65 72 20 71 75 69 74 0d  |askmanager quit.|
000003b0  01 2c 05 3a 0d 01 36 0a  dd f2 50 6f 6c 6c 0d 01  |.,.:..6...Poll..|
000003c0  40 21 c8 99 20 22 57 69  6d 70 5f 50 6f 6c 6c 22  |@!.. "Wimp_Poll"|
000003d0  2c 30 2c 62 25 20 b8 20  72 65 61 73 6f 6e 25 0d  |,0,b% . reason%.|
000003e0  01 4a 10 c8 8e 20 72 65  61 73 6f 6e 25 20 ca 0d  |.J... reason% ..|
000003f0  01 54 16 20 c9 20 30 3a  f2 63 68 65 63 6b 73 6f  |.T. . 0:.checkso|
00000400  63 6b 65 74 73 0d 01 5e  18 20 f4 20 31 20 3d 20  |ckets..^. . 1 = |
00000410  52 65 64 72 61 77 20 77  69 6e 64 6f 77 0d 01 68  |Redraw window..h|
00000420  21 20 c9 20 32 3a c8 99  20 22 57 69 6d 70 5f 4f  |! . 2:.. "Wimp_O|
00000430  70 65 6e 57 69 6e 64 6f  77 22 2c 2c 62 25 0d 01  |penWindow",,b%..|
00000440  72 08 20 c9 20 33 0d 01  7c 55 20 20 e7 20 21 62  |r. . 3..|U  . !b|
00000450  25 3d 73 65 6e 64 77 69  6e 25 20 8c f2 63 6c 6f  |%=sendwin% ..clo|
00000460  73 65 73 65 6e 64 20 8b  e7 20 21 62 25 3d 6d 73  |sesend .. !b%=ms|
00000470  67 77 69 6e 25 20 8c f2  63 6c 6f 73 65 6d 73 67  |gwin% ..closemsg|
00000480  20 8b c8 99 20 22 57 69  6d 70 5f 43 6c 6f 73 65  | ... "Wimp_Close|
00000490  57 69 6e 64 6f 77 22 2c  2c 62 25 0d 01 86 26 20  |Window",,b%...& |
000004a0  c9 20 36 3a f2 6d 6f 75  73 65 63 6c 69 63 6b 28  |. 6:.mouseclick(|
000004b0  62 25 21 38 2c 62 25 21  31 32 2c 62 25 21 31 36  |b%!8,b%!12,b%!16|
000004c0  29 0d 01 90 2b 20 f4 20  37 20 3d 20 44 72 61 67  |)...+ . 7 = Drag|
000004d0  20 62 6f 78 20 64 72 6f  70 70 65 64 20 6f 6e 20  | box dropped on |
000004e0  61 6e 6f 74 68 65 72 20  74 61 73 6b 0d 01 9a 25  |another task...%|
000004f0  20 c9 20 38 3a f2 70 72  6f 63 65 73 73 6b 65 79  | . 8:.processkey|
00000500  28 62 25 21 30 2c 62 25  21 34 2c 62 25 21 32 34  |(b%!0,b%!4,b%!24|
00000510  29 0d 01 a4 14 20 c9 20  39 3a f2 6d 65 6e 75 63  |).... . 9:.menuc|
00000520  68 6f 69 63 65 0d 01 ae  1c 20 c9 20 31 37 2c 31  |hoice.... . 17,1|
00000530  38 3a f2 72 65 63 65 69  76 65 28 62 25 21 31 36  |8:.receive(b%!16|
00000540  29 0d 01 b8 1c 20 c9 20  31 39 3a f2 72 65 63 65  |).... . 19:.rece|
00000550  69 76 65 61 63 6b 28 62  25 21 31 36 29 0d 01 c2  |iveack(b%!16)...|
00000560  05 cb 0d 01 cc 05 e1 0d  01 d6 05 3a 0d 01 e0 30  |...........:...0|
00000570  f4 20 42 75 74 74 6f 6e  73 20 3a 20 31 20 3d 20  |. Buttons : 1 = |
00000580  41 64 6a 75 73 74 2c 20  32 20 3d 20 4d 65 6e 75  |Adjust, 2 = Menu|
00000590  2c 20 34 20 3d 20 53 65  6c 65 63 74 0d 01 ea 1e  |, 4 = Select....|
000005a0  dd f2 6d 6f 75 73 65 63  6c 69 63 6b 28 62 75 74  |..mouseclick(but|
000005b0  2c 77 69 6e 2c 69 63 6f  6e 29 0d 01 f4 0c c8 8e  |,win,icon)......|
000005c0  20 77 69 6e 20 ca 0d 01  fe 09 20 c9 20 2d 32 0d  | win ..... . -2.|
000005d0  02 08 0e 20 20 c8 8e 20  62 75 74 20 ca 0d 02 12  |...  .. but ....|
000005e0  12 20 20 20 c9 20 32 3a  f2 69 62 6d 65 6e 75 0d  |.   . 2:.ibmenu.|
000005f0  02 1c 0c 20 20 20 c9 20  31 2c 34 0d 02 26 17 20  |...   . 1,4..&. |
00000600  20 20 20 e7 20 63 6f 6e  6e 65 63 74 24 3d 22 22  |   . connect$=""|
00000610  20 8c 0d 02 30 24 20 20  20 20 20 f2 6f 70 65 6e  | ...0$     .open|
00000620  77 69 6e 63 65 6e 74 72  65 28 63 6f 6e 6e 65 63  |wincentre(connec|
00000630  74 77 69 6e 25 29 0d 02  3a 24 20 20 20 20 20 f2  |twin%)..:$     .|
00000640  73 65 74 63 61 72 65 74  65 6e 64 28 63 6f 6e 6e  |setcaretend(conn|
00000650  65 63 74 77 69 6e 25 2c  31 29 0d 02 44 09 20 20  |ectwin%,1)..D.  |
00000660  20 20 cc 0d 02 4e 1a 20  20 20 20 20 f2 6f 70 65  |  ...N.     .ope|
00000670  6e 77 69 6e 28 6f 78 6f  77 69 6e 25 29 0d 02 58  |nwin(oxowin%)..X|
00000680  09 20 20 20 20 cd 0d 02  62 07 20 20 cb 0d 02 6c  |.    ...b.  ...l|
00000690  0f 20 c9 20 69 6e 66 6f  62 6f 78 25 0d 02 76 0f  |. . infobox%..v.|
000006a0  20 20 c8 8e 20 69 63 6f  6e 20 ca 0d 02 80 14 20  |  .. icon ..... |
000006b0  20 20 c9 20 31 3a f2 73  68 6f 77 66 72 65 65 0d  |  . 1:.showfree.|
000006c0  02 8a 3e 20 20 20 c9 20  33 3a f2 46 65 74 63 68  |..>   . 3:.Fetch|
000006d0  50 61 67 65 28 22 68 74  74 70 3a 2f 2f 75 73 65  |Page("http://use|
000006e0  72 73 2e 65 73 73 65 78  2e 61 63 2e 75 6b 2f 75  |rs.essex.ac.uk/u|
000006f0  73 65 72 73 2f 67 65 72  70 68 2f 22 29 0d 02 94  |sers/gerph/")...|
00000700  1e 20 20 20 c9 20 34 3a  f2 46 65 74 63 68 50 61  |.   . 4:.FetchPa|
00000710  67 65 28 41 70 70 55 52  4c 24 29 0d 02 9e 07 20  |ge(AppURL$).... |
00000720  20 cb 0d 02 a8 12 20 c9  20 63 6f 6e 6e 65 63 74  | ..... . connect|
00000730  77 69 6e 25 0d 02 b2 0f  20 20 c8 8e 20 69 63 6f  |win%....  .. ico|
00000740  6e 20 ca 0d 02 bc 15 20  20 20 c9 20 34 3a f2 64  |n .....   . 4:.d|
00000750  6f 63 6f 6e 6e 65 63 74  0d 02 c6 07 20 20 cb 0d  |oconnect....  ..|
00000760  02 d0 0e 20 c9 20 6f 78  6f 77 69 6e 25 0d 02 da  |... . oxowin%...|
00000770  0e 20 20 c8 8e 20 62 75  74 20 ca 0d 02 e4 0c 20  |.  .. but ..... |
00000780  20 20 c9 20 31 2c 34 0d  02 ee 11 20 20 20 20 c8  |  . 1,4....    .|
00000790  8e 20 69 63 6f 6e 20 ca  0d 02 f8 17 20 20 20 20  |. icon .....    |
000007a0  20 c9 20 31 36 3a f2 6f  70 65 6e 73 65 6e 64 0d  | . 16:.opensend.|
000007b0  03 02 1d 20 20 20 20 20  7f 3a f2 63 6c 69 63 6b  |...     .:.click|
000007c0  6f 6e 69 63 6f 6e 28 69  63 6f 6e 29 0d 03 0c 09  |onicon(icon)....|
000007d0  20 20 20 20 cb 0d 03 16  21 20 20 20 c9 20 32 3a  |    ....!   . 2:|
000007e0  f2 6d 65 6e 75 28 6d 61  69 6e 6d 65 6e 75 25 2c  |.menu(mainmenu%,|
000007f0  2d 31 2c 2d 31 29 0d 03  20 07 20 20 cb 0d 03 2a  |-1,-1).. .  ...*|
00000800  0f 20 c9 20 73 65 6e 64  77 69 6e 25 0d 03 34 0f  |. . sendwin%..4.|
00000810  20 20 c8 8e 20 69 63 6f  6e 20 ca 0d 03 3e 12 20  |  .. icon ...>. |
00000820  20 20 c9 20 31 3a f2 64  6f 73 65 6e 64 0d 03 48  |  . 1:.dosend..H|
00000830  15 20 20 20 c9 20 32 3a  f2 63 6c 6f 73 65 73 65  |.   . 2:.closese|
00000840  6e 64 0d 03 52 07 20 20  cb 0d 03 5c 0e 20 c9 20  |nd..R.  ...\. . |
00000850  6d 73 67 77 69 6e 25 0d  03 66 0f 20 20 c8 8e 20  |msgwin%..f.  .. |
00000860  69 63 6f 6e 20 ca 0d 03  70 14 20 20 20 c9 20 31  |icon ...p.   . 1|
00000870  3a f2 63 6c 6f 73 65 6d  73 67 0d 03 7a 1e 20 20  |:.closemsg..z.  |
00000880  20 c9 20 32 3a f2 63 6c  6f 73 65 6d 73 67 3a f2  | . 2:.closemsg:.|
00000890  6f 70 65 6e 73 65 6e 64  0d 03 84 07 20 20 cb 0d  |opensend....  ..|
000008a0  03 8e 05 cb 0d 03 98 05  e1 0d 03 a2 05 3a 0d 03  |.............:..|
000008b0  ac 1e dd f2 70 72 6f 63  65 73 73 6b 65 79 28 77  |....processkey(w|
000008c0  69 6e 2c 69 63 6f 6e 2c  6b 65 79 29 0d 03 b6 17  |in,icon,key)....|
000008d0  ea 20 6b 65 79 64 6f 6e  65 3a 6b 65 79 64 6f 6e  |. keydone:keydon|
000008e0  65 3d a3 0d 03 c0 0c c8  8e 20 77 69 6e 20 ca 0d  |e=....... win ..|
000008f0  03 ca 12 20 c9 20 63 6f  6e 6e 65 63 74 77 69 6e  |... . connectwin|
00000900  25 0d 03 d4 2d 20 20 e7  20 69 63 6f 6e 3d 33 20  |%...-  . icon=3 |
00000910  80 20 6b 65 79 3d 31 33  20 8c f2 64 6f 63 6f 6e  |. key=13 ..docon|
00000920  6e 65 63 74 3a 6b 65 79  64 6f 6e 65 3d b9 0d 03  |nect:keydone=...|
00000930  de 0f 20 c9 20 73 65 6e  64 77 69 6e 25 0d 03 e8  |.. . sendwin%...|
00000940  21 20 20 e7 20 6b 65 79  3d 31 33 20 8c f2 64 6f  |!  . key=13 ..do|
00000950  73 65 6e 64 3a 6b 65 79  64 6f 6e 65 3d b9 0d 03  |send:keydone=...|
00000960  f2 1a 20 20 e7 20 6b 65  79 3d 32 37 20 8c f2 63  |..  . key=27 ..c|
00000970  6c 6f 73 65 73 65 6e 64  0d 03 fc 0e 20 c9 20 6d  |losesend.... . m|
00000980  73 67 77 69 6e 25 0d 04  06 2c 20 20 e7 20 6b 65  |sgwin%...,  . ke|
00000990  79 3d 31 33 20 84 20 6b  65 79 3d 32 37 20 8c f2  |y=13 . key=27 ..|
000009a0  63 6c 6f 73 65 6d 73 67  3a 6b 65 79 64 6f 6e 65  |closemsg:keydone|
000009b0  3d b9 0d 04 10 34 20 20  e7 20 6b 65 79 3d 97 28  |=....4  . key=.(|
000009c0  22 52 22 29 20 84 20 6b  65 79 3d 97 28 22 72 22  |"R") . key=.("r"|
000009d0  29 20 8c f2 63 6c 6f 73  65 6d 73 67 3a f2 6f 70  |) ..closemsg:.op|
000009e0  65 6e 73 65 6e 64 0d 04  1a 05 cb 0d 04 24 29 e7  |ensend.......$).|
000009f0  20 ac 20 6b 65 79 64 6f  6e 65 20 8c c8 99 20 22  | . keydone ... "|
00000a00  57 69 6d 70 5f 50 72 6f  63 65 73 73 4b 65 79 22  |Wimp_ProcessKey"|
00000a10  2c 6b 65 79 0d 04 2e 05  e1 0d 04 38 05 3a 0d 04  |,key.......8.:..|
00000a20  42 10 dd f2 6d 65 6e 75  63 68 6f 69 63 65 0d 04  |B...menuchoice..|
00000a30  4c 44 c8 99 22 57 69 6d  70 5f 47 65 74 50 6f 69  |LD.."Wimp_GetPoi|
00000a40  6e 74 65 72 49 6e 66 6f  22 2c 2c 6d 65 73 73 61  |nterInfo",,messa|
00000a50  67 65 5f 62 75 66 66 65  72 25 3a 6d 62 75 74 25  |ge_buffer%:mbut%|
00000a60  3d 6d 65 73 73 61 67 65  5f 62 75 66 66 65 72 25  |=message_buffer%|
00000a70  21 38 0d 04 56 1c 6d 24  3d a4 64 65 63 6f 64 65  |!8..V.m$=.decode|
00000a80  6d 65 6e 75 28 63 75 72  6d 65 6e 75 25 29 0d 04  |menu(curmenu%)..|
00000a90  60 0b c8 8e 20 6d 24 20  ca 0d 04 6a 15 20 c9 20  |`... m$ ...j. . |
00000aa0  22 51 75 69 74 22 3a 71  75 69 74 25 3d b9 0d 04  |"Quit":quit%=...|
00000ab0  74 14 20 c9 20 22 43 6c  65 61 72 20 62 6f 61 72  |t. . "Clear boar|
00000ac0  64 22 0d 04 7e 12 20 20  e7 20 77 6f 6e 24 3c 3e  |d"..~.  . won$<>|
00000ad0  22 22 20 8c 0d 04 88 12  20 20 20 f2 63 6c 65 61  |"" .....   .clea|
00000ae0  72 62 6f 61 72 64 0d 04  92 17 20 20 20 e7 20 63  |rboard....   . c|
00000af0  6f 6e 6e 65 63 74 24 3c  3e 22 22 20 8c 0d 04 9c  |onnect$<>"" ....|
00000b00  12 20 20 20 20 3f 62 25  3d 97 28 22 43 22 29 0d  |.    ?b%=.("C").|
00000b10  04 a6 23 20 20 20 20 f2  73 6f 63 6b 65 74 5f 73  |..#    .socket_s|
00000b20  65 6e 64 64 61 74 61 28  73 6f 63 6b 2c 62 25 2c  |enddata(sock,b%,|
00000b30  33 29 0d 04 b0 08 20 20  20 cd 0d 04 ba 07 20 20  |3)....   .....  |
00000b40  cd 0d 04 c4 13 20 c9 20  22 44 69 73 63 6f 6e 6e  |..... . "Disconn|
00000b50  65 63 74 22 0d 04 ce 16  20 20 e7 20 63 6f 6e 6e  |ect"....  . conn|
00000b60  65 63 74 24 3c 3e 22 22  20 8c 0d 04 d8 11 20 20  |ect$<>"" .....  |
00000b70  20 3f 62 25 3d 97 28 22  51 22 29 0d 04 e2 22 20  | ?b%=.("Q")..." |
00000b80  20 20 f2 73 6f 63 6b 65  74 5f 73 65 6e 64 64 61  |  .socket_sendda|
00000b90  74 61 28 73 6f 63 6b 2c  62 25 2c 33 29 0d 04 ec  |ta(sock,b%,3)...|
00000ba0  12 20 20 20 f2 64 69 73  63 6f 6e 6e 65 63 74 0d  |.   .disconnect.|
00000bb0  04 f6 07 20 20 cd 0d 05  00 1d 20 c9 20 22 4d 65  |...  ..... . "Me|
00000bc0  73 73 61 67 65 2e 2e 2e  22 3a f2 6f 70 65 6e 73  |ssage...":.opens|
00000bd0  65 6e 64 0d 05 0a 05 cb  0d 05 14 2d e7 20 28 6d  |end........-. (m|
00000be0  62 75 74 25 80 31 29 3d  31 20 8c f2 72 65 63 72  |but%.1)=1 ..recr|
00000bf0  65 61 74 65 6d 65 6e 75  20 8b 63 75 72 6d 65 6e  |eatemenu .curmen|
00000c00  75 25 3d 2d 31 0d 05 1e  05 e1 0d 05 28 05 3a 0d  |u%=-1.......(.:.|
00000c10  05 32 13 dd f2 72 65 63  65 69 76 65 28 6d 65 73  |.2...receive(mes|
00000c20  73 29 0d 05 3c 0d c8 8e  20 6d 65 73 73 20 ca 0d  |s)..<... mess ..|
00000c30  05 46 1b 20 f4 20 26 34  30 30 43 31 20 3d 20 6d  |.F. . &400C1 = m|
00000c40  6f 64 65 20 63 68 61 6e  67 65 0d 05 50 1d 20 f4  |ode change..P. .|
00000c50  20 26 34 30 30 43 32 20  3d 20 74 61 73 6b 20 73  | &400C2 = task s|
00000c60  74 61 72 74 20 75 70 0d  05 5a 1e 20 f4 20 26 34  |tart up..Z. . &4|
00000c70  30 30 43 33 20 3d 20 74  61 73 6b 20 73 68 75 74  |00C3 = task shut|
00000c80  20 64 6f 77 6e 0d 05 64  12 20 c9 20 30 3a 71 75  | down..d. . 0:qu|
00000c90  69 74 25 3d b9 2a 32 0d  05 6e 15 20 c9 20 33 2c  |it%=.*2..n. . 3,|
00000ca0  35 3a 74 79 70 65 3d 62  25 21 34 30 0d 05 78 16  |5:type=b%!40..x.|
00000cb0  20 20 e7 20 74 79 70 65  20 3d 20 26 38 38 38 38  |  . type = &8888|
00000cc0  20 8c 0d 05 82 19 20 20  20 62 25 21 31 32 3d 62  | .....   b%!12=b|
00000cd0  25 21 38 3a 62 25 21 31  36 3d 34 0d 05 8c 26 20  |%!8:b%!16=4...& |
00000ce0  20 20 c8 99 22 57 69 6d  70 5f 53 65 6e 64 4d 65  |  .."Wimp_SendMe|
00000cf0  73 73 61 67 65 22 2c 31  37 2c 62 25 2c 62 25 21  |ssage",17,b%,b%!|
00000d00  34 0d 05 96 27 20 20 20  f2 6c 6f 61 64 66 69 6c  |4...'   .loadfil|
00000d10  65 28 a4 73 74 72 69 6e  67 30 28 62 25 2b 34 34  |e(.string0(b%+44|
00000d20  29 2c 62 25 21 34 30 29  0d 05 a0 07 20 20 cd 0d  |),b%!40)....  ..|
00000d30  05 aa 23 20 c9 20 26 35  30 32 3a f2 48 65 6c 70  |..# . &502:.Help|
00000d40  28 62 25 21 33 32 2c 62  25 21 33 36 2c 62 25 21  |(b%!32,b%!36,b%!|
00000d50  34 29 0d 05 b4 1d 20 c9  20 31 30 3a f2 64 65 73  |4).... . 10:.des|
00000d60  6b 74 6f 70 73 61 76 65  28 62 25 21 32 30 29 0d  |ktopsave(b%!20).|
00000d70  05 be 2c 20 c9 20 26 34  41 32 36 36 3a f4 20 41  |.., . &4A266:. A|
00000d80  72 63 57 65 62 20 66 65  74 63 68 20 64 6f 6e 65  |rcWeb fetch done|
00000d90  20 28 65 72 72 6f 72 2f  6f 6b 29 0d 05 c8 2e 20  | (error/ok).... |
00000da0  20 c8 99 20 22 4f 53 5f  46 69 6c 65 22 2c 36 2c  | .. "OS_File",6,|
00000db0  22 3c 57 69 6d 70 24 53  63 72 61 70 44 69 72 3e  |"<Wimp$ScrapDir>|
00000dc0  2e 22 2b c3 62 25 21 32  30 0d 05 d2 05 cb 0d 05  |."+.b%!20.......|
00000dd0  dc 05 e1 0d 05 e6 05 3a  0d 05 f0 16 dd f2 72 65  |.......:......re|
00000de0  63 65 69 76 65 61 63 6b  28 6d 65 73 73 29 0d 05  |ceiveack(mess)..|
00000df0  fa 0d c8 8e 20 6d 65 73  73 20 ca 0d 06 04 23 20  |.... mess ....# |
00000e00  c9 20 26 34 41 32 36 35  3a f4 20 41 72 63 57 65  |. &4A265:. ArcWe|
00000e10  62 20 66 65 74 63 68 20  66 61 69 6c 65 64 0d 06  |b fetch failed..|
00000e20  0e 38 20 20 d9 23 28 62  25 21 32 38 29 3a c8 99  |.8  .#(b%!28):..|
00000e30  20 22 4f 53 5f 46 69 6c  65 22 2c 36 2c 22 3c 57  | "OS_File",6,"<W|
00000e40  69 6d 70 24 53 63 72 61  70 44 69 72 3e 2e 22 2b  |imp$ScrapDir>."+|
00000e50  c3 62 25 21 32 30 0d 06  18 05 cb 0d 06 22 05 e1  |.b%!20......."..|
00000e60  0d 06 2c 05 3a 0d 06 36  18 dd f2 64 65 73 6b 74  |..,.:..6...deskt|
00000e70  6f 70 73 61 76 65 28 66  69 6c 65 25 29 0d 06 40  |opsave(file%)..@|
00000e80  07 ea 20 85 0d 06 4a 3b  ee 20 85 20 ea 20 62 25  |.. ...J;. . . b%|
00000e90  21 31 32 3d 62 25 21 38  3a c8 99 20 22 57 69 6d  |!12=b%!8:.. "Wim|
00000ea0  70 5f 53 65 6e 64 4d 65  73 73 61 67 65 22 2c 31  |p_SendMessage",1|
00000eb0  39 2c 62 25 2c 62 25 21  34 3a f7 20 85 3a e1 0d  |9,b%,b%!4:. .:..|
00000ec0  06 54 40 f4 20 54 68 65  20 61 62 6f 76 65 20 6c  |.T@. The above l|
00000ed0  69 6e 65 20 61 63 6b 6e  6f 77 6c 65 64 67 65 73  |ine acknowledges|
00000ee0  20 74 68 65 20 6d 65 73  73 61 67 65 20 69 66 20  | the message if |
00000ef0  61 6e 20 65 72 72 6f 72  20 6f 63 63 75 72 73 0d  |an error occurs.|
00000f00  06 5e 20 f4 20 61 62 6f  72 74 69 6e 67 20 74 68  |.^ . aborting th|
00000f10  65 20 64 65 73 6b 74 6f  70 20 73 61 76 65 2e 0d  |e desktop save..|
00000f20  06 68 1a d5 23 66 69 6c  65 25 2c 22 52 75 6e 20  |.h..#file%,"Run |
00000f30  22 2b 41 70 70 64 69 72  24 0d 06 72 05 e1 0d 06  |"+Appdir$..r....|
00000f40  7c 05 3a 0d 06 86 1a dd  f2 6c 6f 61 64 66 69 6c  ||.:......loadfil|
00000f50  65 28 66 69 6c 65 24 2c  74 79 70 65 29 0d 06 90  |e(file$,type)...|
00000f60  0d c8 8e 20 74 79 70 65  20 ca 0d 06 9a 05 cb 0d  |... type .......|
00000f70  06 a4 05 e1 0d 06 ae 05  3a 0d 06 b8 2f f4 20 41  |........:.../. A|
00000f80  6e 79 20 6d 65 73 73 61  67 65 73 20 74 6f 20 62  |ny messages to b|
00000f90  65 20 72 65 63 65 69 76  65 64 20 4d 55 53 54 20  |e received MUST |
00000fa0  62 65 20 6e 6f 74 65 64  0d 06 c2 0e dd f2 69 6e  |be noted......in|
00000fb0  69 74 77 69 6d 70 0d 06  cc 21 de 20 6d 65 73 73  |itwimp...!. mess|
00000fc0  61 67 65 6c 69 73 74 25  20 32 35 36 3a 6d 65 73  |agelist% 256:mes|
00000fd0  73 70 74 72 25 3d 30 0d  06 d6 27 f2 6e 6f 74 65  |sptr%=0...'.note|
00000fe0  6d 65 73 73 61 67 65 28  26 35 30 32 29 3a f2 6e  |message(&502):.n|
00000ff0  6f 74 65 6d 65 73 73 61  67 65 28 31 30 29 0d 06  |otemessage(10)..|
00001000  e0 13 f2 6e 6f 74 65 6d  65 73 73 61 67 65 28 30  |...notemessage(0|
00001010  29 0d 06 ea 51 c8 99 20  22 57 69 6d 70 5f 49 6e  |)...Q.. "Wimp_In|
00001020  69 74 69 61 6c 69 73 65  22 2c 33 31 30 2c 26 34  |itialise",310,&4|
00001030  42 35 33 34 31 35 34 2c  41 70 70 6e 61 6d 65 24  |B534154,Appname$|
00001040  2c 6d 65 73 73 61 67 65  6c 69 73 74 25 20 b8 20  |,messagelist% . |
00001050  77 69 6d 70 76 65 72 73  69 6f 6e 2c 68 61 6e 64  |wimpversion,hand|
00001060  6c 65 0d 06 f4 47 69 6e  64 6c 25 3d 31 30 32 34  |le...Gindl%=1024|
00001070  3a 6d 65 6e 75 6c 25 3d  31 30 32 34 3a de 20 62  |:menul%=1024:. b|
00001080  25 20 32 30 34 38 2c 69  6e 64 25 20 69 6e 64 6c  |% 2048,ind% indl|
00001090  25 2c 6d 65 6e 75 25 20  6d 65 6e 75 6c 25 2c 77  |%,menu% menul%,w|
000010a0  73 70 63 25 20 26 38 30  30 0d 06 fe 0f 63 75 72  |spc% &800....cur|
000010b0  6d 65 6e 75 25 3d 2d 31  0d 07 08 11 f2 6f 70 65  |menu%=-1.....ope|
000010c0  6e 6d 65 73 73 61 67 65  73 0d 07 12 2d 73 70 72  |nmessages...-spr|
000010d0  69 74 65 73 25 3d a4 6c  6f 61 64 73 70 72 69 74  |ites%=.loadsprit|
000010e0  65 73 28 41 70 70 64 69  72 24 2b 22 2e 53 70 72  |es(Appdir$+".Spr|
000010f0  69 74 65 73 22 29 0d 07  1c 24 69 6e 66 6f 62 6f  |ites")...$infobo|
00001100  78 25 3d a4 6c 6f 61 64  74 65 6d 70 6c 61 74 65  |x%=.loadtemplate|
00001110  28 22 49 6e 66 6f 22 2c  31 29 0d 07 26 29 6f 78  |("Info",1)..&)ox|
00001120  6f 77 69 6e 25 3d a4 6c  6f 61 64 74 65 6d 70 6c  |owin%=.loadtempl|
00001130  61 74 65 28 22 6f 78 6f  22 2c 73 70 72 69 74 65  |ate("oxo",sprite|
00001140  73 25 29 0d 07 30 2a 63  6f 6e 6e 65 63 74 77 69  |s%)..0*connectwi|
00001150  6e 25 3d a4 6c 6f 61 64  74 65 6d 70 6c 61 74 65  |n%=.loadtemplate|
00001160  28 22 63 6f 6e 6e 65 63  74 22 2c 31 29 0d 07 3a  |("connect",1)..:|
00001170  24 73 65 6e 64 77 69 6e  25 3d a4 6c 6f 61 64 74  |$sendwin%=.loadt|
00001180  65 6d 70 6c 61 74 65 28  22 73 65 6e 64 22 2c 31  |emplate("send",1|
00001190  29 0d 07 44 26 6d 73 67  77 69 6e 25 3d a4 6c 6f  |)..D&msgwin%=.lo|
000011a0  61 64 74 65 6d 70 6c 61  74 65 28 22 6d 65 73 73  |adtemplate("mess|
000011b0  61 67 65 22 2c 31 29 0d  07 4e 25 f2 73 65 74 69  |age",1)..N%.seti|
000011c0  63 6f 6e 74 65 78 74 28  69 6e 66 6f 62 6f 78 25  |context(infobox%|
000011d0  2c 31 2c 41 70 70 6e 61  6d 65 24 29 0d 07 58 26  |,1,Appname$)..X&|
000011e0  f2 73 65 74 69 63 6f 6e  74 65 78 74 28 69 6e 66  |.seticontext(inf|
000011f0  6f 62 6f 78 25 2c 32 2c  6c 6f 6e 67 6e 61 6d 65  |obox%,2,longname|
00001200  24 29 0d 07 62 25 f2 73  65 74 69 63 6f 6e 74 65  |$)..b%.seticonte|
00001210  78 74 28 69 6e 66 6f 62  6f 78 25 2c 34 2c 76 65  |xt(infobox%,4,ve|
00001220  72 73 69 6f 6e 24 29 0d  07 6c 3a 69 62 68 61 6e  |rsion$)..l:ibhan|
00001230  64 6c 65 3d a4 43 72 65  61 74 65 49 63 6f 6e 42  |dle=.CreateIconB|
00001240  61 72 49 63 6f 6e 28 22  21 22 2b 41 70 70 6e 61  |arIcon("!"+Appna|
00001250  6d 65 24 2c 73 68 6f 72  74 6e 61 6d 65 24 2c 31  |me$,shortname$,1|
00001260  29 0d 07 76 48 6d 61 69  6e 6d 65 6e 75 25 3d a4  |)..vHmainmenu%=.|
00001270  63 72 65 61 74 65 6d 65  6e 75 28 41 70 70 6e 61  |createmenu(Appna|
00001280  6d 65 24 2b 22 7c 43 6c  65 61 72 20 62 6f 61 72  |me$+"|Clear boar|
00001290  64 7c 44 69 73 63 6f 6e  6e 65 63 74 7c 4d 65 73  |d|Disconnect|Mes|
000012a0  73 61 67 65 2e 2e 2e 22  29 0d 07 80 38 69 62 6d  |sage...")...8ibm|
000012b0  65 6e 75 25 3d a4 63 72  65 61 74 65 6d 65 6e 75  |enu%=.createmenu|
000012c0  28 41 70 70 6e 61 6d 65  24 2b 22 7c 49 6e 66 6f  |(Appname$+"|Info|
000012d0  5d 3e 69 6e 66 6f 62 6f  78 25 7c 51 75 69 74 22  |]>infobox%|Quit"|
000012e0  29 0d 07 8a 17 69 62 6f  70 74 69 6f 6e 73 25 3d  |)....iboptions%=|
000012f0  6f 70 74 69 6f 6e 73 25  0d 07 94 13 de 20 6c 61  |options%..... la|
00001300  73 74 63 61 72 65 74 25  20 32 34 0d 07 9e 05 e1  |stcaret% 24.....|
00001310  0d 07 a8 05 3a 0d 07 b2  0e dd f2 69 6e 69 74 70  |....:......initp|
00001320  72 6f 67 0d 07 bc 1f 6c  69 73 74 65 6e 65 72 3d  |rog....listener=|
00001330  a4 73 6f 63 6b 65 74 5f  63 72 65 61 74 65 69 6e  |.socket_createin|
00001340  65 74 0d 07 c6 2f 70 6f  72 74 3d a4 73 6f 63 6b  |et.../port=.sock|
00001350  65 74 5f 66 69 6e 64 6c  69 73 74 65 6e 28 6c 69  |et_findlisten(li|
00001360  73 74 65 6e 65 72 2c 30  2c 31 39 37 36 2c 31 35  |stener,0,1976,15|
00001370  29 0d 07 d0 35 f2 73 65  74 69 63 6f 6e 74 65 78  |)...5.seticontex|
00001380  74 28 69 6e 66 6f 62 6f  78 25 2c 32 2c a4 6d 73  |t(infobox%,2,.ms|
00001390  67 74 65 78 74 28 22 3e  49 6e 66 6f 3a 22 2b c3  |gtext(">Info:"+.|
000013a0  70 6f 72 74 29 29 0d 07  da 11 de 20 62 6f 61 72  |port))..... boar|
000013b0  64 24 28 33 2c 33 29 0d  07 e4 17 70 6c 61 79 65  |d$(3,3)....playe|
000013c0  72 24 3d 22 78 22 3a 77  6f 6e 24 3d 22 22 0d 07  |r$="x":won$=""..|
000013d0  ee 19 63 6f 6e 6e 65 63  74 24 3d 22 22 3a 77 65  |..connect$="":we|
000013e0  61 72 65 24 3d 22 22 0d  07 f8 17 77 65 77 6f 6e  |are$=""....wewon|
000013f0  3d 2d 31 3a 74 68 65 79  77 6f 6e 3d 2d 31 0d 08  |=-1:theywon=-1..|
00001400  02 0c f4 20 53 74 61 74  65 73 0d 08 0c 0e 5f 49  |... States...._I|
00001410  6e 69 74 69 61 6c 3d 30  0d 08 16 0b 5f 4d 6f 76  |nitial=0...._Mov|
00001420  65 3d 31 0d 08 20 12 73  74 61 74 65 3d 5f 49 6e  |e=1.. .state=_In|
00001430  69 74 69 61 6c 0d 08 2a  0f f2 63 6c 65 61 72 62  |itial..*..clearb|
00001440  6f 61 72 64 0d 08 34 05  e1 0d 08 3e 05 3a 0d 08  |oard..4....>.:..|
00001450  48 17 dd f2 48 65 6c 70  28 77 69 6e 2c 69 63 6f  |H...Help(win,ico|
00001460  6e 2c 74 6f 29 0d 08 52  1f f7 20 2b 31 3a f2 72  |n,to)..R.. +1:.r|
00001470  65 61 64 68 65 6c 70 28  77 69 6e 2c 69 63 6f 6e  |eadhelp(win,icon|
00001480  2c 74 6f 29 0d 08 5c 05  e1 0d 08 66 0d f4 20 57  |,to)..\....f.. W|
00001490  69 6e 64 6f 77 73 0d 08  70 1a dc 20 69 6e 66 6f  |indows..p.. info|
000014a0  62 6f 78 25 2c 22 3e 48  49 6e 66 6f 62 6f 78 22  |box%,">HInfobox"|
000014b0  0d 08 7a 14 dc 20 33 2c  22 3e 48 49 6e 66 6f 62  |..z.. 3,">HInfob|
000014c0  6f 78 33 22 0d 08 84 14  dc 20 2d 32 2c 22 3e 48  |ox3"..... -2,">H|
000014d0  49 63 6f 6e 62 61 72 22  0d 08 8e 0b dc 20 2d 31  |Iconbar"..... -1|
000014e0  2c 2d 31 0d 08 98 0b f4  20 4d 65 6e 75 73 0d 08  |,-1..... Menus..|
000014f0  a2 11 dc 20 2d 32 2c 2d  32 2c 2d 32 2c 2d 32 0d  |... -2,-2,-2,-2.|
00001500  08 ac 05 3a 0d 08 b6 13  dd f2 46 65 74 63 68 50  |...:......FetchP|
00001510  61 67 65 28 66 24 29 0d  08 c0 27 e7 20 a4 73 79  |age(f$)...'. .sy|
00001520  73 74 65 6d 76 61 72 28  22 57 69 6d 70 24 53 63  |stemvar("Wimp$Sc|
00001530  72 61 70 44 69 72 22 29  3c 3e 22 22 20 8c 0d 08  |rapDir")<>"" ...|
00001540  ca 3c 20 66 25 3d 30 3a  c8 95 20 a4 66 69 6c 65  |.< f%=0:.. .file|
00001550  6c 65 6e 67 74 68 28 22  3c 57 69 6d 70 24 53 63  |length("<Wimp$Sc|
00001560  72 61 70 44 69 72 3e 2e  22 2b c3 66 25 29 3c 3e  |rapDir>."+.f%)<>|
00001570  2d 31 3a 66 25 2b 3d 31  3a ce 0d 08 d4 21 20 6f  |-1:f%+=1:....! o|
00001580  25 3d ae 28 22 3c 57 69  6d 70 24 53 63 72 61 70  |%=.("<Wimp$Scrap|
00001590  44 69 72 3e 2e 22 2b c3  66 25 29 0d 08 de 13 20  |Dir>."+.f%).... |
000015a0  d5 23 6f 25 2c 66 24 3a  cf 23 6f 25 3d 30 0d 08  |.#o%,f$:.#o%=0..|
000015b0  e8 30 20 21 62 25 3d 33  32 3a 62 25 21 38 3d 30  |.0 !b%=32:b%!8=0|
000015c0  3a 62 25 21 31 32 3d 30  3a 62 25 21 31 36 3d 26  |:b%!12=0:b%!16=&|
000015d0  34 41 32 36 35 3a 62 25  21 32 30 3d 66 25 0d 08  |4A265:b%!20=f%..|
000015e0  f2 39 20 62 25 21 32 34  3d 28 31 3c 3c 32 32 29  |.9 b%!24=(1<<22)|
000015f0  3a 62 25 21 32 38 3d 6f  25 3a c8 99 20 22 57 69  |:b%!28=o%:.. "Wi|
00001600  6d 70 5f 53 65 6e 64 4d  65 73 73 61 67 65 22 2c  |mp_SendMessage",|
00001610  31 38 2c 62 25 2c 30 0d  08 fc 05 cd 0d 09 06 05  |18,b%,0.........|
00001620  e1 0d 09 10 05 3a 0d 09  1a 10 dd f2 63 6c 65 61  |.....:......clea|
00001630  72 62 6f 61 72 64 0d 09  24 0b e3 49 3d 34 b8 31  |rboard..$..I=4.1|
00001640  32 0d 09 2e 20 20 f2 73  65 74 69 63 6f 6e 76 61  |2...  .seticonva|
00001650  6c 69 64 28 6f 78 6f 77  69 6e 25 2c 49 2c 22 22  |lid(oxowin%,I,""|
00001660  29 0d 09 38 05 ed 0d 09  42 24 62 6f 61 72 64 24  |)..8....B$board$|
00001670  28 29 3d 22 22 3a 77 6f  6e 24 3d 22 22 3a f2 75  |()="":won$="":.u|
00001680  70 64 61 74 65 74 69 74  6c 65 0d 09 4c 1d f2 6d  |pdatetitle..L..m|
00001690  65 6e 75 73 68 61 64 65  28 6d 61 69 6e 6d 65 6e  |enushade(mainmen|
000016a0  75 25 2c 30 2c 31 29 0d  09 56 05 e1 0d 09 60 05  |u%,0,1)..V....`.|
000016b0  3a 0d 09 6a 11 dd f2 75  70 64 61 74 65 74 69 74  |:..j...updatetit|
000016c0  6c 65 0d 09 74 11 e7 20  77 65 61 72 65 24 3d 22  |le..t.. weare$="|
000016d0  22 20 8c 0d 09 7e 2a 20  f2 77 69 6e 64 6f 77 74  |" ...~* .windowt|
000016e0  69 74 6c 65 28 6f 78 6f  77 69 6e 25 2c 22 3e 4e  |itle(oxowin%,">N|
000016f0  6f 74 43 6f 6e 6e 65 63  74 65 64 22 29 0d 09 88  |otConnected")...|
00001700  05 cc 0d 09 92 17 20 e7  20 77 65 61 72 65 24 3d  |...... . weare$=|
00001710  70 6c 61 79 65 72 24 20  8c 0d 09 9c 2a 20 20 f2  |player$ ....*  .|
00001720  77 69 6e 64 6f 77 74 69  74 6c 65 28 6f 78 6f 77  |windowtitle(oxow|
00001730  69 6e 25 2c 22 3e 55 73  3a 22 2b 70 6c 61 79 65  |in%,">Us:"+playe|
00001740  72 24 29 0d 09 a6 06 20  cc 0d 09 b0 2c 20 20 f2  |r$).... ....,  .|
00001750  77 69 6e 64 6f 77 74 69  74 6c 65 28 6f 78 6f 77  |windowtitle(oxow|
00001760  69 6e 25 2c 22 3e 54 68  65 6d 3a 22 2b 70 6c 61  |in%,">Them:"+pla|
00001770  79 65 72 24 29 0d 09 ba  06 20 cd 0d 09 c4 05 cd  |yer$).... ......|
00001780  0d 09 ce 05 e1 0d 09 d8  05 3a 0d 09 e2 11 dd f2  |.........:......|
00001790  75 70 64 61 74 65 73 63  6f 72 65 0d 09 ec 25 e7  |updatescore...%.|
000017a0  20 77 65 77 6f 6e 3d 2d  31 20 8c 77 24 3d 22 2d  | wewon=-1 .w$="-|
000017b0  22 20 8b 77 24 3d c0 c3  77 65 77 6f 6e 2c 33 29  |" .w$=..wewon,3)|
000017c0  0d 09 f6 29 e7 20 74 68  65 79 77 6f 6e 3d 2d 31  |...). theywon=-1|
000017d0  20 8c 74 24 3d 22 2d 22  20 8b 74 24 3d c0 c3 74  | .t$="-" .t$=..t|
000017e0  68 65 79 77 6f 6e 2c 33  29 0d 0a 00 1f f2 73 65  |heywon,3).....se|
000017f0  74 69 63 6f 6e 74 65 78  74 28 6f 78 6f 77 69 6e  |ticontext(oxowin|
00001800  25 2c 31 35 2c 77 24 29  0d 0a 0a 1f f2 73 65 74  |%,15,w$).....set|
00001810  69 63 6f 6e 74 65 78 74  28 6f 78 6f 77 69 6e 25  |icontext(oxowin%|
00001820  2c 31 37 2c 74 24 29 0d  0a 14 05 e1 0d 0a 1e 05  |,17,t$).........|
00001830  3a 0d 0a 28 18 dd f2 70  6c 61 63 65 70 69 65 63  |:..(...placepiec|
00001840  65 28 78 2c 79 2c 63 24  29 0d 0a 32 0f ea 20 49  |e(x,y,c$)..2.. I|
00001850  3a 49 3d 78 2b 79 2a 33  0d 0a 3c 1a 62 6f 61 72  |:I=x+y*3..<.boar|
00001860  64 24 28 78 2c 79 29 3d  c0 63 24 2b 22 20 22 2c  |d$(x,y)=.c$+" ",|
00001870  31 29 0d 0a 46 2c f2 73  65 74 69 63 6f 6e 76 61  |1)..F,.seticonva|
00001880  6c 69 64 28 6f 78 6f 77  69 6e 25 2c 49 2c 22 53  |lid(oxowin%,I,"S|
00001890  22 2b 62 6f 61 72 64 24  28 78 2c 79 29 29 0d 0a  |"+board$(x,y))..|
000018a0  50 10 77 6f 6e 24 3d a4  77 69 6e 6e 65 72 0d 0a  |P.won$=.winner..|
000018b0  5a 10 e7 20 77 6f 6e 24  3c 3e 22 22 20 8c 0d 0a  |Z.. won$<>"" ...|
000018c0  64 0e 20 c8 8e 20 77 6f  6e 24 20 ca 0d 0a 6e 0e  |d. .. won$ ...n.|
000018d0  20 20 c9 20 77 65 61 72  65 24 0d 0a 78 38 20 20  |  . weare$..x8  |
000018e0  20 72 65 70 6c 79 3d a4  65 72 72 6f 72 62 6f 78  | reply=.errorbox|
000018f0  28 22 3e 4d 65 73 73 61  67 65 22 2c 22 3e 57 69  |(">Message",">Wi|
00001900  6e 55 73 3a 22 2b 77 6f  6e 24 2c 25 31 30 30 30  |nUs:"+won$,%1000|
00001910  31 29 0d 0a 82 0f 20 20  20 77 65 77 6f 6e 2b 3d  |1)....   wewon+=|
00001920  31 0d 0a 8c 0b 20 20 c9  20 22 6e 22 0d 0a 96 34  |1....  . "n"...4|
00001930  20 20 20 72 65 70 6c 79  3d a4 65 72 72 6f 72 62  |   reply=.errorb|
00001940  6f 78 28 22 3e 4d 65 73  73 61 67 65 22 2c 22 3e  |ox(">Message",">|
00001950  57 69 6e 4e 6f 6e 65 22  2c 25 31 30 30 30 31 29  |WinNone",%10001)|
00001960  0d 0a a0 07 20 20 7f 0d  0a aa 3a 20 20 20 72 65  |....  ....:   re|
00001970  70 6c 79 3d a4 65 72 72  6f 72 62 6f 78 28 22 3e  |ply=.errorbox(">|
00001980  4d 65 73 73 61 67 65 22  2c 22 3e 57 69 6e 54 68  |Message",">WinTh|
00001990  65 6d 3a 22 2b 77 6f 6e  24 2c 25 31 30 30 30 31  |em:"+won$,%10001|
000019a0  29 0d 0a b4 11 20 20 20  74 68 65 79 77 6f 6e 2b  |)....   theywon+|
000019b0  3d 31 0d 0a be 06 20 cb  0d 0a c8 11 20 f2 75 70  |=1.... ..... .up|
000019c0  64 61 74 65 73 63 6f 72  65 0d 0a d2 1e 20 f2 6d  |datescore.... .m|
000019d0  65 6e 75 73 68 61 64 65  28 6d 61 69 6e 6d 65 6e  |enushade(mainmen|
000019e0  75 25 2c 30 2c 30 29 0d  0a dc 05 cd 0d 0a e6 10  |u%,0,0).........|
000019f0  c8 8e 20 70 6c 61 79 65  72 24 20 ca 0d 0a f0 16  |.. player$ .....|
00001a00  20 c9 20 22 78 22 3a 70  6c 61 79 65 72 24 3d 22  | . "x":player$="|
00001a10  6f 22 0d 0a fa 16 20 c9  20 22 6f 22 3a 70 6c 61  |o".... . "o":pla|
00001a20  79 65 72 24 3d 22 78 22  0d 0b 04 05 cb 0d 0b 0e  |yer$="x"........|
00001a30  10 f2 75 70 64 61 74 65  74 69 74 6c 65 0d 0b 18  |..updatetitle...|
00001a40  05 e1 0d 0b 22 05 3a 0d  0b 2c 17 dd f2 63 6c 69  |....".:..,...cli|
00001a50  63 6b 6f 6e 69 63 6f 6e  28 69 63 6f 6e 29 0d 0b  |ckonicon(icon)..|
00001a60  36 24 e7 20 69 63 6f 6e  3e 3d 34 20 80 20 69 63  |6$. icon>=4 . ic|
00001a70  6f 6e 3c 3d 31 32 20 80  20 77 6f 6e 24 3d 22 22  |on<=12 . won$=""|
00001a80  20 8c 0d 0b 40 17 20 e7  20 70 6c 61 79 65 72 24  | ...@. . player$|
00001a90  3d 77 65 61 72 65 24 20  8c 0d 0b 4a 18 20 20 78  |=weare$ ...J.  x|
00001aa0  3d 28 28 69 63 6f 6e 2d  34 29 20 83 20 33 29 2b  |=((icon-4) . 3)+|
00001ab0  31 0d 0b 54 18 20 20 79  3d 28 28 69 63 6f 6e 2d  |1..T.  y=((icon-|
00001ac0  34 29 20 81 20 33 29 2b  31 0d 0b 5e 18 20 20 e7  |4) . 3)+1..^.  .|
00001ad0  20 62 6f 61 72 64 24 28  78 2c 79 29 3d 22 22 20  | board$(x,y)="" |
00001ae0  8c 0d 0b 68 1f 20 20 20  3f 62 25 3d 97 28 22 4d  |...h.   ?b%=.("M|
00001af0  22 29 3a 62 25 3f 31 3d  78 3a 62 25 3f 32 3d 79  |"):b%?1=x:b%?2=y|
00001b00  0d 0b 72 22 20 20 20 f2  73 6f 63 6b 65 74 5f 73  |..r"   .socket_s|
00001b10  65 6e 64 64 61 74 61 28  73 6f 63 6b 2c 62 25 2c  |enddata(sock,b%,|
00001b20  33 29 0d 0b 7c 1f 20 20  20 f2 70 6c 61 63 65 70  |3)..|.   .placep|
00001b30  69 65 63 65 28 78 2c 79  2c 70 6c 61 79 65 72 24  |iece(x,y,player$|
00001b40  29 0d 0b 86 07 20 20 cd  0d 0b 90 06 20 cd 0d 0b  |)....  ..... ...|
00001b50  9a 05 cd 0d 0b a4 05 e1  0d 0b ae 05 3a 0d 0b b8  |............:...|
00001b60  0c dd a4 77 69 6e 6e 65  72 0d 0b c2 1b ea 20 78  |...winner..... x|
00001b70  2c 79 2c 77 24 2c 61 24  3a 77 24 3d 22 22 3a 61  |,y,w$,a$:w$="":a|
00001b80  24 3d 22 22 0d 0b cc 0a  e3 78 3d 31 b8 33 0d 0b  |$="".....x=1.3..|
00001b90  d6 5a 20 e7 20 62 6f 61  72 64 24 28 78 2c 31 29  |.Z . board$(x,1)|
00001ba0  3d 62 6f 61 72 64 24 28  78 2c 32 29 20 80 20 62  |=board$(x,2) . b|
00001bb0  6f 61 72 64 24 28 78 2c  32 29 3d 62 6f 61 72 64  |oard$(x,2)=board|
00001bc0  24 28 78 2c 33 29 20 80  20 62 6f 61 72 64 24 28  |$(x,3) . board$(|
00001bd0  78 2c 31 29 3c 3e 22 22  20 8c 77 24 3d 62 6f 61  |x,1)<>"" .w$=boa|
00001be0  72 64 24 28 78 2c 33 29  0d 0b e0 2c 20 61 24 2b  |rd$(x,3)..., a$+|
00001bf0  3d 62 6f 61 72 64 24 28  78 2c 31 29 2b 62 6f 61  |=board$(x,1)+boa|
00001c00  72 64 24 28 78 2c 32 29  2b 62 6f 61 72 64 24 28  |rd$(x,2)+board$(|
00001c10  78 2c 33 29 0d 0b ea 05  ed 0d 0b f4 0a e3 79 3d  |x,3)..........y=|
00001c20  31 b8 33 0d 0b fe 5a 20  e7 20 62 6f 61 72 64 24  |1.3...Z . board$|
00001c30  28 31 2c 79 29 3d 62 6f  61 72 64 24 28 32 2c 79  |(1,y)=board$(2,y|
00001c40  29 20 80 20 62 6f 61 72  64 24 28 32 2c 79 29 3d  |) . board$(2,y)=|
00001c50  62 6f 61 72 64 24 28 33  2c 79 29 20 80 20 62 6f  |board$(3,y) . bo|
00001c60  61 72 64 24 28 31 2c 79  29 3c 3e 22 22 20 8c 77  |ard$(1,y)<>"" .w|
00001c70  24 3d 62 6f 61 72 64 24  28 33 2c 79 29 0d 0c 08  |$=board$(3,y)...|
00001c80  05 ed 0d 0c 12 59 e7 20  62 6f 61 72 64 24 28 31  |.....Y. board$(1|
00001c90  2c 31 29 3d 62 6f 61 72  64 24 28 32 2c 32 29 20  |,1)=board$(2,2) |
00001ca0  80 20 62 6f 61 72 64 24  28 32 2c 32 29 3d 62 6f  |. board$(2,2)=bo|
00001cb0  61 72 64 24 28 33 2c 33  29 20 80 20 62 6f 61 72  |ard$(3,3) . boar|
00001cc0  64 24 28 31 2c 31 29 3c  3e 22 22 20 8c 77 24 3d  |d$(1,1)<>"" .w$=|
00001cd0  62 6f 61 72 64 24 28 33  2c 33 29 0d 0c 1c 59 e7  |board$(3,3)...Y.|
00001ce0  20 62 6f 61 72 64 24 28  33 2c 31 29 3d 62 6f 61  | board$(3,1)=boa|
00001cf0  72 64 24 28 32 2c 32 29  20 80 20 62 6f 61 72 64  |rd$(2,2) . board|
00001d00  24 28 32 2c 32 29 3d 62  6f 61 72 64 24 28 31 2c  |$(2,2)=board$(1,|
00001d10  33 29 20 80 20 62 6f 61  72 64 24 28 33 2c 31 29  |3) . board$(3,1)|
00001d20  3c 3e 22 22 20 8c 77 24  3d 62 6f 61 72 64 24 28  |<>"" .w$=board$(|
00001d30  33 2c 31 29 0d 0c 26 1d  e7 20 77 24 3d 22 22 20  |3,1)..&.. w$="" |
00001d40  80 20 a9 28 61 24 29 3d  39 20 8c 77 24 3d 22 6e  |. .(a$)=9 .w$="n|
00001d50  22 0d 0c 30 07 3d 77 24  0d 0c 3a 05 3a 0d 0c 44  |"..0.=w$..:.:..D|
00001d60  12 dd f2 63 68 65 63 6b  73 6f 63 6b 65 74 73 0d  |...checksockets.|
00001d70  0c 4e 13 e7 20 63 6f 6e  6e 65 63 74 24 3d 22 22  |.N.. connect$=""|
00001d80  20 8c 0d 0c 58 22 20 73  6f 63 6b 3d a4 73 6f 63  | ...X" sock=.soc|
00001d90  6b 65 74 5f 61 63 63 65  70 74 28 6c 69 73 74 65  |ket_accept(liste|
00001da0  6e 65 72 29 0d 0c 62 11  20 e7 20 73 6f 63 6b 3c  |ner)..b. . sock<|
00001db0  3e 2d 31 20 8c 0d 0c 6c  28 20 20 63 6f 6e 6e 65  |>-1 ...l(  conne|
00001dc0  63 74 24 3d a4 73 6f 63  6b 65 74 5f 67 65 74 70  |ct$=.socket_getp|
00001dd0  65 65 72 6e 61 6d 65 28  73 6f 63 6b 29 0d 0c 76  |eername(sock)..v|
00001de0  27 20 20 f2 73 65 74 69  63 6f 6e 74 65 78 74 28  |'  .seticontext(|
00001df0  6f 78 6f 77 69 6e 25 2c  31 33 2c 63 6f 6e 6e 65  |oxowin%,13,conne|
00001e00  63 74 24 29 0d 0c 80 11  20 20 f2 72 65 73 65 74  |ct$)....  .reset|
00001e10  28 22 78 22 29 0d 0c 8a  06 20 cd 0d 0c 94 05 cc  |("x").... ......|
00001e20  0d 0c 9e 1f 20 73 3d a4  73 6f 63 6b 65 74 5f 61  |.... s=.socket_a|
00001e30  63 63 65 70 74 28 6c 69  73 74 65 6e 65 72 29 0d  |ccept(listener).|
00001e40  0c a8 0e 20 e7 20 73 3c  3e 2d 31 20 8c 0d 0c b2  |... . s<>-1 ....|
00001e50  35 20 20 f2 73 6f 63 6b  65 74 5f 73 65 6e 64 6c  |5  .socket_sendl|
00001e60  69 6e 65 28 73 2c 22 41  6c 6c 20 63 6f 6e 6e 65  |ine(s,"All conne|
00001e70  63 74 69 6f 6e 73 20 61  72 65 20 74 61 6b 65 6e  |ctions are taken|
00001e80  22 29 0d 0c bc 16 20 20  f2 73 6f 63 6b 65 74 5f  |")....  .socket_|
00001e90  63 6c 6f 73 65 28 73 29  0d 0c c6 06 20 cd 0d 0c  |close(s).... ...|
00001ea0  d0 21 20 e7 20 a4 73 6f  63 6b 65 74 5f 69 6e 62  |.! . .socket_inb|
00001eb0  75 66 66 65 72 28 73 6f  63 6b 29 3e 30 20 8c 0d  |uffer(sock)>0 ..|
00001ec0  0c da 17 20 20 62 75 66  25 3d a4 63 6c 61 69 6d  |...  buf%=.claim|
00001ed0  28 32 30 34 38 29 0d 0c  e4 25 20 20 6c 65 6e 3d  |(2048)...%  len=|
00001ee0  a4 73 6f 63 6b 65 74 5f  72 65 61 64 64 61 74 61  |.socket_readdata|
00001ef0  28 73 6f 63 6b 2c 62 75  66 25 29 0d 0c ee 11 20  |(sock,buf%).... |
00001f00  20 74 79 70 65 3d 62 75  66 25 3f 30 0d 0c f8 10  | type=buf%?0....|
00001f10  20 20 c8 8e 20 73 74 61  74 65 20 ca 0d 0d 02 11  |  .. state .....|
00001f20  20 20 20 c9 20 5f 49 6e  69 74 69 61 6c 0d 0d 0c  |   . _Initial...|
00001f30  37 20 20 20 20 e7 20 74  79 70 65 3d 97 28 22 6f  |7    . type=.("o|
00001f40  22 29 20 80 20 62 75 66  25 3f 31 3d 97 28 22 78  |") . buf%?1=.("x|
00001f50  22 29 20 80 20 62 75 66  25 3f 32 3d 97 28 22 6f  |") . buf%?2=.("o|
00001f60  22 29 20 8c 0d 0d 16 26  20 20 20 20 20 73 74 61  |") ....&     sta|
00001f70  74 65 3d 5f 4d 6f 76 65  3a f2 6f 70 65 6e 77 69  |te=_Move:.openwi|
00001f80  6e 28 6f 78 6f 77 69 6e  25 29 0d 0d 20 09 20 20  |n(oxowin%).. .  |
00001f90  20 20 cc 0d 0d 2a 32 20  20 20 20 20 f2 73 6f 63  |  ...*2     .soc|
00001fa0  6b 65 74 5f 73 65 6e 64  6c 69 6e 65 28 73 6f 63  |ket_sendline(soc|
00001fb0  6b 2c 22 49 6e 76 61 6c  69 64 20 72 65 73 70 6f  |k,"Invalid respo|
00001fc0  6e 73 65 22 29 0d 0d 34  1c 20 20 20 20 20 f2 73  |nse")..4.     .s|
00001fd0  6f 63 6b 65 74 5f 63 6c  6f 73 65 28 73 6f 63 6b  |ocket_close(sock|
00001fe0  29 0d 0d 3e 14 20 20 20  20 20 63 6f 6e 6e 65 63  |)..>.     connec|
00001ff0  74 24 3d 22 22 0d 0d 48  09 20 20 20 20 cd 0d 0d  |t$=""..H.    ...|
00002000  52 0e 20 20 20 c9 20 5f  4d 6f 76 65 0d 0d 5c 14  |R.   . _Move..\.|
00002010  20 20 20 20 c8 8e 20 bd  28 74 79 70 65 29 20 ca  |    .. .(type) .|
00002020  0d 0d 66 31 20 20 20 20  20 c9 20 22 4d 22 3a f2  |..f1     . "M":.|
00002030  70 6c 61 63 65 70 69 65  63 65 28 62 75 66 25 3f  |placepiece(buf%?|
00002040  31 2c 62 75 66 25 3f 32  2c 70 6c 61 79 65 72 24  |1,buf%?2,player$|
00002050  29 0d 0d 70 1a 20 20 20  20 20 c9 20 22 43 22 3a  |)..p.     . "C":|
00002060  f2 63 6c 65 61 72 62 6f  61 72 64 0d 0d 7a 0e 20  |.clearboard..z. |
00002070  20 20 20 20 c9 20 22 51  22 0d 0d 84 38 20 20 20  |    . "Q"...8   |
00002080  20 20 20 72 65 70 6c 79  3d a4 65 72 72 6f 72 62  |   reply=.errorb|
00002090  6f 78 28 22 3e 4d 65 73  73 61 67 65 22 2c 22 3e  |ox(">Message",">|
000020a0  47 61 6d 65 4f 76 65 72  22 2c 25 31 30 30 31 30  |GameOver",%10010|
000020b0  29 0d 0d 8e 15 20 20 20  20 20 20 f2 64 69 73 63  |)....      .disc|
000020c0  6f 6e 6e 65 63 74 0d 0d  98 0e 20 20 20 20 20 c9  |onnect....     .|
000020d0  20 22 54 22 0d 0d a2 14  20 20 20 20 20 20 62 75  | "T"....      bu|
000020e0  66 25 3f 6c 65 6e 3d 30  0d 0d ac 22 20 20 20 20  |f%?len=0..."    |
000020f0  20 20 6d 24 3d c0 a4 73  74 72 69 6e 67 30 28 62  |  m$=..string0(b|
00002100  75 66 25 2b 31 29 2c 33  39 29 0d 0d b6 24 20 20  |uf%+1),39)...$  |
00002110  20 20 20 20 f2 73 65 74  69 63 6f 6e 74 65 78 74  |    .seticontext|
00002120  28 6d 73 67 77 69 6e 25  2c 30 2c 6d 24 29 0d 0d  |(msgwin%,0,m$)..|
00002130  c0 12 20 20 20 20 20 20  f2 6f 70 65 6e 6d 73 67  |..      .openmsg|
00002140  0d 0d ca 0a 20 20 20 20  20 7f 0d 0d d4 2d 20 20  |....     ....-  |
00002150  20 20 20 20 f2 73 6f 63  6b 65 74 5f 73 65 6e 64  |    .socket_send|
00002160  6c 69 6e 65 28 73 6f 63  6b 2c 22 49 6d 70 6f 73  |line(sock,"Impos|
00002170  74 65 72 20 21 22 29 0d  0d de 09 20 20 20 20 cb  |ter !")....    .|
00002180  0d 0d e8 07 20 20 cb 0d  0d f2 14 20 20 f2 72 65  |....  .....  .re|
00002190  6c 65 61 73 65 28 62 75  66 25 29 0d 0d fc 06 20  |lease(buf%).... |
000021a0  cc 0d 0e 06 1b 20 20 e7  20 a4 73 6f 63 6b 65 74  |.....  . .socket|
000021b0  5f 65 6f 66 28 73 6f 63  6b 29 20 8c 0d 0e 10 12  |_eof(sock) .....|
000021c0  20 20 20 f2 64 69 73 63  6f 6e 6e 65 63 74 0d 0e  |   .disconnect..|
000021d0  1a 33 20 20 20 72 65 70  6c 79 3d a4 65 72 72 6f  |.3   reply=.erro|
000021e0  72 62 6f 78 28 22 3e 4d  65 73 73 61 67 65 22 2c  |rbox(">Message",|
000021f0  22 3e 43 6c 6f 73 65 64  22 2c 25 31 30 30 31 30  |">Closed",%10010|
00002200  29 0d 0e 24 07 20 20 cd  0d 0e 2e 06 20 cd 0d 0e  |)..$.  ..... ...|
00002210  38 05 cd 0d 0e 42 05 e1  0d 0e 4c 05 3a 0d 0e 56  |8....B....L.:..V|
00002220  0f dd f2 64 6f 63 6f 6e  6e 65 63 74 0d 0e 60 25  |...doconnect..`%|
00002230  68 6f 73 74 24 3d a4 67  65 74 69 63 6f 6e 74 65  |host$=.geticonte|
00002240  78 74 28 63 6f 6e 6e 65  63 74 77 69 6e 25 2c 31  |xt(connectwin%,1|
00002250  29 0d 0e 6a 25 70 6f 72  74 24 3d a4 67 65 74 69  |)..j%port$=.geti|
00002260  63 6f 6e 74 65 78 74 28  63 6f 6e 6e 65 63 74 77  |context(connectw|
00002270  69 6e 25 2c 33 29 0d 0e  74 21 69 70 3d a4 69 6e  |in%,3)..t!ip=.in|
00002280  65 74 5f 67 65 74 68 6f  73 74 62 79 6e 61 6d 65  |et_gethostbyname|
00002290  28 68 6f 73 74 24 29 0d  0e 7e 29 70 6f 72 74 3d  |(host$)..~)port=|
000022a0  a4 69 6e 65 74 5f 67 65  74 73 65 72 76 62 79 6e  |.inet_getservbyn|
000022b0  61 6d 65 28 70 6f 72 74  24 2c 22 74 63 70 22 29  |ame(port$,"tcp")|
000022c0  0d 0e 88 1b 73 6f 63 6b  3d a4 73 6f 63 6b 65 74  |....sock=.socket|
000022d0  5f 63 72 65 61 74 65 69  6e 65 74 0d 0e 92 24 6f  |_createinet...$o|
000022e0  6b 3d a4 73 6f 63 6b 65  74 5f 63 6f 6e 6e 65 63  |k=.socket_connec|
000022f0  74 28 73 6f 63 6b 2c 69  70 2c 70 6f 72 74 29 0d  |t(sock,ip,port).|
00002300  0e 9c 0c e7 20 ac 20 6f  6b 20 8c 0d 0e a6 18 20  |.... . ok ..... |
00002310  f2 73 6f 63 6b 65 74 5f  63 6c 6f 73 65 28 73 6f  |.socket_close(so|
00002320  63 6b 29 0d 0e b0 34 20  72 65 70 6c 79 3d a4 65  |ck)...4 reply=.e|
00002330  72 72 6f 72 62 6f 78 28  22 3e 4d 65 73 73 61 67  |rrorbox(">Messag|
00002340  65 22 2c 22 3e 4e 6f 43  6f 6e 6e 65 63 74 22 2c  |e",">NoConnect",|
00002350  25 31 30 30 31 30 29 0d  0e ba 05 cc 0d 0e c4 27  |%10010)........'|
00002360  20 63 6f 6e 6e 65 63 74  24 3d a4 73 6f 63 6b 65  | connect$=.socke|
00002370  74 5f 67 65 74 70 65 65  72 6e 61 6d 65 28 73 6f  |t_getpeername(so|
00002380  63 6b 29 0d 0e ce 26 20  f2 73 65 74 69 63 6f 6e  |ck)...& .seticon|
00002390  74 65 78 74 28 6f 78 6f  77 69 6e 25 2c 31 33 2c  |text(oxowin%,13,|
000023a0  63 6f 6e 6e 65 63 74 24  29 0d 0e d8 10 20 f2 72  |connect$).... .r|
000023b0  65 73 65 74 28 22 6f 22  29 0d 0e e2 05 cd 0d 0e  |eset("o").......|
000023c0  ec 05 e1 0d 0e f6 05 3a  0d 0f 00 10 dd f2 64 69  |.......:......di|
000023d0  73 63 6f 6e 6e 65 63 74  0d 0f 0a 17 f2 73 6f 63  |sconnect.....soc|
000023e0  6b 65 74 5f 63 6c 6f 73  65 28 73 6f 63 6b 29 0d  |ket_close(sock).|
000023f0  0f 14 19 63 6f 6e 6e 65  63 74 24 3d 22 22 3a 77  |...connect$="":w|
00002400  65 61 72 65 24 3d 22 22  0d 0f 1e 10 f2 75 70 64  |eare$="".....upd|
00002410  61 74 65 74 69 74 6c 65  0d 0f 28 0d f2 63 6c 6f  |atetitle..(..clo|
00002420  73 65 6d 73 67 0d 0f 32  0e f2 63 6c 6f 73 65 73  |semsg..2..closes|
00002430  65 6e 64 0d 0f 3c 2d f2  6d 65 6e 75 73 68 61 64  |end..<-.menushad|
00002440  65 28 6d 61 69 6e 6d 65  6e 75 25 2c 30 2c 31 29  |e(mainmenu%,0,1)|
00002450  3a f4 20 53 68 61 64 65  20 27 63 6c 65 61 72 27  |:. Shade 'clear'|
00002460  0d 0f 46 32 f2 6d 65 6e  75 73 68 61 64 65 28 6d  |..F2.menushade(m|
00002470  61 69 6e 6d 65 6e 75 25  2c 31 2c 31 29 3a f4 20  |ainmenu%,1,1):. |
00002480  53 68 61 64 65 20 27 64  69 73 63 6f 6e 6e 65 63  |Shade 'disconnec|
00002490  74 27 0d 0f 50 2f f2 6d  65 6e 75 73 68 61 64 65  |t'..P/.menushade|
000024a0  28 6d 61 69 6e 6d 65 6e  75 25 2c 32 2c 31 29 3a  |(mainmenu%,2,1):|
000024b0  f4 20 53 68 61 64 65 20  27 6d 65 73 73 61 67 65  |. Shade 'message|
000024c0  27 0d 0f 5a 35 f2 69 63  6f 6e 73 68 61 64 65 28  |'..Z5.iconshade(|
000024d0  6f 78 6f 77 69 6e 25 2c  31 36 2c 31 29 3a f4 20  |oxowin%,16,1):. |
000024e0  53 68 61 64 65 20 27 6d  65 73 73 61 67 65 27 20  |Shade 'message' |
000024f0  62 75 74 74 6f 6e 0d 0f  64 05 e1 0d 0f 6e 05 3a  |button..d....n.:|
00002500  0d 0f 78 0f dd f2 72 65  73 65 74 28 78 24 29 0d  |..x...reset(x$).|
00002510  0f 82 26 3f 62 25 3d 97  28 22 6f 22 29 3a 62 25  |..&?b%=.("o"):b%|
00002520  3f 31 3d 97 28 22 78 22  29 3a 62 25 3f 32 3d 97  |?1=.("x"):b%?2=.|
00002530  28 22 6f 22 29 0d 0f 8c  1f f2 73 6f 63 6b 65 74  |("o").....socket|
00002540  5f 73 65 6e 64 64 61 74  61 28 73 6f 63 6b 2c 62  |_senddata(sock,b|
00002550  25 2c 33 29 0d 0f 96 25  77 65 61 72 65 24 3d 78  |%,3)...%weare$=x|
00002560  24 3a 70 6c 61 79 65 72  24 3d 22 78 22 3a f2 63  |$:player$="x":.c|
00002570  6c 65 61 72 62 6f 61 72  64 0d 0f a0 24 77 65 77  |learboard...$wew|
00002580  6f 6e 3d 30 3a 74 68 65  79 77 6f 6e 3d 30 3a 73  |on=0:theywon=0:s|
00002590  74 61 74 65 3d 5f 49 6e  69 74 69 61 6c 0d 0f aa  |tate=_Initial...|
000025a0  10 f2 75 70 64 61 74 65  74 69 74 6c 65 0d 0f b4  |..updatetitle...|
000025b0  10 f2 75 70 64 61 74 65  73 63 6f 72 65 0d 0f be  |..updatescore...|
000025c0  1a f2 63 6c 6f 73 65 77  69 6e 28 63 6f 6e 6e 65  |..closewin(conne|
000025d0  63 74 77 69 6e 25 29 0d  0f c8 16 f2 63 6c 6f 73  |ctwin%).....clos|
000025e0  65 77 69 6e 28 6f 78 6f  77 69 6e 25 29 0d 0f d2  |ewin(oxowin%)...|
000025f0  2d f2 6d 65 6e 75 73 68  61 64 65 28 6d 61 69 6e  |-.menushade(main|
00002600  6d 65 6e 75 25 2c 30 2c  31 29 3a f4 20 53 68 61  |menu%,0,1):. Sha|
00002610  64 65 20 27 63 6c 65 61  72 27 0d 0f dc 34 f2 6d  |de 'clear'...4.m|
00002620  65 6e 75 73 68 61 64 65  28 6d 61 69 6e 6d 65 6e  |enushade(mainmen|
00002630  75 25 2c 31 2c 30 29 3a  f4 20 55 6e 73 68 61 64  |u%,1,0):. Unshad|
00002640  65 20 27 64 69 73 63 6f  6e 6e 65 63 74 27 0d 0f  |e 'disconnect'..|
00002650  e6 31 f2 6d 65 6e 75 73  68 61 64 65 28 6d 61 69  |.1.menushade(mai|
00002660  6e 6d 65 6e 75 25 2c 32  2c 30 29 3a f4 20 55 6e  |nmenu%,2,0):. Un|
00002670  73 68 61 64 65 20 27 6d  65 73 73 61 67 65 27 0d  |shade 'message'.|
00002680  0f f0 37 f2 69 63 6f 6e  73 68 61 64 65 28 6f 78  |..7.iconshade(ox|
00002690  6f 77 69 6e 25 2c 31 36  2c 30 29 3a f4 20 55 6e  |owin%,16,0):. Un|
000026a0  73 68 61 64 65 20 27 6d  65 73 73 61 67 65 27 20  |shade 'message' |
000026b0  62 75 74 74 6f 6e 0d 0f  fa 05 e1 0d 10 04 05 3a  |button.........:|
000026c0  0d 10 0e 0c dd f2 64 6f  73 65 6e 64 0d 10 18 0e  |......dosend....|
000026d0  f2 63 6c 6f 73 65 73 65  6e 64 0d 10 22 38 6d 24  |.closesend.."8m$|
000026e0  3d a4 67 65 74 69 63 6f  6e 74 65 78 74 28 73 65  |=.geticontext(se|
000026f0  6e 64 77 69 6e 25 2c 30  29 3a 24 28 62 25 29 3d  |ndwin%,0):$(b%)=|
00002700  22 54 22 3a 24 28 62 25  2b 31 29 3d 6d 24 2b bd  |"T":$(b%+1)=m$+.|
00002710  31 33 0d 10 2c 25 f2 73  6f 63 6b 65 74 5f 73 65  |13..,%.socket_se|
00002720  6e 64 64 61 74 61 28 73  6f 63 6b 2c 62 25 2c 33  |nddata(sock,b%,3|
00002730  2b a9 28 6d 24 29 29 0d  10 36 05 e1 0d 10 40 05  |+.(m$))..6....@.|
00002740  3a 0d 10 4a 0e dd f2 6f  70 65 6e 73 65 6e 64 0d  |:..J...opensend.|
00002750  10 54 20 f2 67 65 74 63  61 72 65 74 70 6f 73 28  |.T .getcaretpos(|
00002760  77 69 6e 2c 69 63 6f 6e  2c 63 68 61 72 73 29 0d  |win,icon,chars).|
00002770  10 5e 15 e7 20 77 69 6e  3c 3e 73 65 6e 64 77 69  |.^.. win<>sendwi|
00002780  6e 25 20 8c 0d 10 68 2b  20 c8 99 20 22 57 69 6d  |n% ...h+ .. "Wim|
00002790  70 5f 47 65 74 43 61 72  65 74 50 6f 73 69 74 69  |p_GetCaretPositi|
000027a0  6f 6e 22 2c 2c 6c 61 73  74 63 61 72 65 74 25 0d  |on",,lastcaret%.|
000027b0  10 72 05 cd 0d 10 7c 1f  f2 73 65 74 69 63 6f 6e  |.r....|..seticon|
000027c0  74 65 78 74 28 73 65 6e  64 77 69 6e 25 2c 30 2c  |text(sendwin%,0,|
000027d0  22 22 29 0d 10 86 16 f2  6f 70 65 6e 77 69 6e 28  |"").....openwin(|
000027e0  73 65 6e 64 77 69 6e 25  29 0d 10 90 1f f2 73 65  |sendwin%).....se|
000027f0  74 63 61 72 65 74 70 6f  73 28 73 65 6e 64 77 69  |tcaretpos(sendwi|
00002800  6e 25 2c 30 2c 2d 31 29  0d 10 9a 05 e1 0d 10 a4  |n%,0,-1)........|
00002810  05 3a 0d 10 ae 0f dd f2  63 6c 6f 73 65 73 65 6e  |.:......closesen|
00002820  64 0d 10 b8 20 f2 67 65  74 63 61 72 65 74 70 6f  |d... .getcaretpo|
00002830  73 28 77 69 6e 2c 69 63  6f 6e 2c 63 68 61 72 73  |s(win,icon,chars|
00002840  29 0d 10 c2 14 e7 20 77  69 6e 3d 73 65 6e 64 77  |)..... win=sendw|
00002850  69 6e 25 20 8c 0d 10 cc  71 20 c8 99 20 22 58 57  |in% ....q .. "XW|
00002860  69 6d 70 5f 53 65 74 43  61 72 65 74 50 6f 73 69  |imp_SetCaretPosi|
00002870  74 69 6f 6e 22 2c 6c 61  73 74 63 61 72 65 74 25  |tion",lastcaret%|
00002880  21 30 2c 6c 61 73 74 63  61 72 65 74 25 21 34 2c  |!0,lastcaret%!4,|
00002890  6c 61 73 74 63 61 72 65  74 25 21 38 2c 6c 61 73  |lastcaret%!8,las|
000028a0  74 63 61 72 65 74 25 21  31 32 2c 6c 61 73 74 63  |tcaret%!12,lastc|
000028b0  61 72 65 74 25 21 31 36  2c 6c 61 73 74 63 61 72  |aret%!16,lastcar|
000028c0  65 74 25 21 32 30 0d 10  d6 05 cd 0d 10 e0 17 f2  |et%!20..........|
000028d0  63 6c 6f 73 65 77 69 6e  28 73 65 6e 64 77 69 6e  |closewin(sendwin|
000028e0  25 29 0d 10 ea 05 e1 0d  10 f4 05 3a 0d 10 fe 0d  |%).........:....|
000028f0  dd f2 6f 70 65 6e 6d 73  67 0d 11 08 20 f2 67 65  |..openmsg... .ge|
00002900  74 63 61 72 65 74 70 6f  73 28 77 69 6e 2c 69 63  |tcaretpos(win,ic|
00002910  6f 6e 2c 63 68 61 72 73  29 0d 11 12 14 e7 20 77  |on,chars)..... w|
00002920  69 6e 3c 3e 6d 73 67 77  69 6e 25 20 8c 0d 11 1c  |in<>msgwin% ....|
00002930  2b 20 c8 99 20 22 57 69  6d 70 5f 47 65 74 43 61  |+ .. "Wimp_GetCa|
00002940  72 65 74 50 6f 73 69 74  69 6f 6e 22 2c 2c 6c 61  |retPosition",,la|
00002950  73 74 63 61 72 65 74 25  0d 11 26 05 cd 0d 11 30  |stcaret%..&....0|
00002960  15 f2 6f 70 65 6e 77 69  6e 28 6d 73 67 77 69 6e  |..openwin(msgwin|
00002970  25 29 0d 11 3a 1f f2 73  65 74 63 61 72 65 74 70  |%)..:..setcaretp|
00002980  6f 73 28 6d 73 67 77 69  6e 25 2c 2d 31 2c 2d 31  |os(msgwin%,-1,-1|
00002990  29 0d 11 44 05 e1 0d 11  4e 05 3a 0d 11 58 0e dd  |)..D....N.:..X..|
000029a0  f2 63 6c 6f 73 65 6d 73  67 0d 11 62 13 e7 20 77  |.closemsg..b.. w|
000029b0  69 6e 3d 6d 73 67 77 69  6e 25 20 8c 0d 11 6c 71  |in=msgwin% ...lq|
000029c0  20 c8 99 20 22 58 57 69  6d 70 5f 53 65 74 43 61  | .. "XWimp_SetCa|
000029d0  72 65 74 50 6f 73 69 74  69 6f 6e 22 2c 6c 61 73  |retPosition",las|
000029e0  74 63 61 72 65 74 25 21  30 2c 6c 61 73 74 63 61  |tcaret%!0,lastca|
000029f0  72 65 74 25 21 34 2c 6c  61 73 74 63 61 72 65 74  |ret%!4,lastcaret|
00002a00  25 21 38 2c 6c 61 73 74  63 61 72 65 74 25 21 31  |%!8,lastcaret%!1|
00002a10  32 2c 6c 61 73 74 63 61  72 65 74 25 21 31 36 2c  |2,lastcaret%!16,|
00002a20  6c 61 73 74 63 61 72 65  74 25 21 32 30 0d 11 76  |lastcaret%!20..v|
00002a30  05 cd 0d 11 80 16 f2 63  6c 6f 73 65 77 69 6e 28  |.......closewin(|
00002a40  6d 73 67 77 69 6e 25 29  0d 11 8a 05 e1 0d ff     |msgwin%).......|
00002a4f