Home » Archimedes archive » Acorn User » AU 1998-02 B.adf » JFShared » !JFShared/Skeleton/Standard/!RunImage

!JFShared/Skeleton/Standard/!RunImage

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

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

Tape/disk: Home » Archimedes archive » Acorn User » AU 1998-02 B.adf » JFShared
Filename: !JFShared/Skeleton/Standard/!RunImage
Read OK:
File size: 0DFF bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >!RunImage
   20testing%=FALSE
   30LIBRARY "<BasicLibrary$File>":PROCinitlibrary
   40ON ERROR PROCclosemessages:PROCeerror:IF testing%=TRUE THENOSCLI("Spool"):END ELSE END
   50IF testing%=TRUE THEN*Spool Spooled
   60IF testing%=TRUE THENTRACE ON
   70REM Appname$ is used for task manager & Appname$Dir
   80REM shortname$ is used for iconbar name and should usually be null
   90REM longname$ is used for info window
  100REM AppURL$ is used to for clicks on the version icon
  110Appname$="?????":version$="1.00 (?? ??? ????)"
  120shortname$="":longname$="?????"
  130Appdir$=FNsystemvar(Appname$+"$Dir")
  140AppURL$="http://users.essex.ac.uk/users/gerph/acorn/"
  150PROCinitwimp:PROCinitprog
  160quit%=FALSE:init%=FALSE
  170ON ERROR PROCerror
  180IF NOT init% THEN
  190 go$=FNGetEnv:init%=TRUE
  200 IF go$<>"" THENPROCloadfile(go$,FNfiletype(go$))
  210ENDIF
  220WHILE quit%=FALSE
  230 PROCPoll
  240ENDWHILE
  250SYS "Wimp_CloseDown"
  260PROCclosemessages
  270IF testing%=TRUE THEN*SPOOL
  280END
  290REM quit%=-1 for user quit, -2 for taskmanager quit
  300:
  310DEFPROCPoll
  320SYS "Wimp_Poll",1,b% TO reason%
  330CASE reason% OF
  340 REM 1 = Redraw window
  350 WHEN 2:SYS "Wimp_OpenWindow",,b%
  360 WHEN 3:SYS "Wimp_CloseWindow",,b%
  370 WHEN 6:PROCmouseclick(b%!8,b%!12,b%!16)
  380 REM 7 = Drag box dropped on another task
  390 WHEN 8:PROCprocesskey(b%!0,b%!4,b%!24)
  400 WHEN 9:PROCmenuchoice
  410 WHEN 17,18:PROCreceive(b%!16)
  420 WHEN 19:PROCreceiveack(b%!16)
  430ENDCASE
  440ENDPROC
  450:
  460REM Buttons : 1 = Adjust, 2 = Menu, 4 = Select
  470DEFPROCmouseclick(but,win,icon)
  480CASE win OF
  490 WHEN -2
  500  CASE but OF
  510   WHEN 2:PROCibmenu
  520  ENDCASE
  530 WHEN infobox%
  540  CASE icon OF
  541   WHEN 1:PROCshowfree
  550   WHEN 3:PROCFetchPage("http://users.essex.ac.uk/users/gerph/")
  560   WHEN 4:PROCFetchPage(AppURL$)
  570  ENDCASE
  580ENDCASE
  590ENDPROC
  600:
  610DEFPROCprocesskey(win,icon,key)
  620LOCAL keydone:keydone=FALSE
  630CASE win OF
  640ENDCASE
  650IF NOT keydone THENSYS "Wimp_ProcessKey",key
  660ENDPROC
  670:
  680DEFPROCmenuchoice
  690SYS"Wimp_GetPointerInfo",,message_buffer%:mbut%=message_buffer%!8
  700m$=FNdecodemenu(curmenu%)
  710CASE m$ OF
  720 WHEN "Quit":quit%=TRUE
  730ENDCASE
  740IF (mbut%AND1)=1 THENPROCrecreatemenu ELSEcurmenu%=-1
  750ENDPROC
  760:
  770DEFPROCreceive(mess)
  780CASE mess OF
  790 REM &400C1 = mode change
  800 REM &400C2 = task start up
  810 REM &400C3 = task shut down
  820 WHEN 0:quit%=TRUE*2
  830 WHEN 3,5:type=b%!40
  840  IF type = &8888 THEN
  850   b%!12=b%!8:b%!16=4
  860   SYS"Wimp_SendMessage",17,b%,b%!4
  870   PROCloadfile(FNstring0(b%+44),b%!40)
  880  ENDIF
  890 WHEN &502:PROCHelp(b%!32,b%!36,b%!4)
  900 WHEN 10:PROCdesktopsave(b%!20)
  930ENDCASE
  940ENDPROC
  950:
  960DEFPROCreceiveack(mess)
  970CASE mess OF
 1000ENDCASE
 1010ENDPROC
 1020:
 1030DEFPROCdesktopsave(file%)
 1040LOCAL ERROR
 1050ON ERROR LOCAL b%!12=b%!8:SYS "Wimp_SendMessage",19,b%,b%!4:RESTORE ERROR:ENDPROC
 1060REM The above line acknowledges the message if an error occurs
 1070REM aborting the desktop save.
 1080BPUT#file%,"Run "+Appdir$
 1090ENDPROC
 1091:
 1092DEFPROCloadfile(file$,type)
 1093CASE type OF
 1094ENDCASE
 1095ENDPROC
 1100:
 1110REM Any messages to be received MUST be noted
 1120DEFPROCinitwimp
 1130DIM messagelist% 256:messptr%=0
 1140PROCnotemessage(&502):PROCnotemessage(10)
 1160PROCnotemessage(0)
 1170SYS "Wimp_Initialise",310,&4B534154,Appname$,messagelist% TO wimpversion,taskhandle
 1180indl%=1024:menul%=1024:DIM b% 2048,ind% indl%,menu% menul%,wspc% &800
 1190curmenu%=-1
 1200PROCopenmessages
 1210REM sprites%=FNloadsprites(Appdir$+".Sprites")
 1220infobox%=FNloadtemplate("Info",1)
 1230PROCseticontext(infobox%,1,Appname$)
 1240PROCseticontext(infobox%,2,longname$)
 1250PROCseticontext(infobox%,4,version$)
 1260ibhandle=FNCreateIconBarIcon("!"+Appname$,shortname$,1)
 1270ibmenu%=FNcreatemenu(Appname$+"|Info]>infobox%|Quit")
 1280iboptions%=options%
 1290ENDPROC
 1300:
 1310DEFPROCinitprog
 1320ENDPROC
 1330:
 1340DEFPROCHelp(win,icon,to)
 1350RESTORE 1380:PROCreadhelp(win,icon,to)
 1360ENDPROC
 1370REM Windows
 1380DATA infobox%,">HInfobox"
 1390DATA 3,">HInfobox3"
 1400DATA 4,">HInfobox4"
 1410DATA -2,">HIconbar"
 1420DATA -1,-1
 1430REM Menus
 1440DATA -2,-2,-2,-2
 1450:
 1460DEFPROCFetchPage(f$)
 1470REM XURI_Dispatch - this protocol is still being decided !
 1480SYS &6E381,%000,f$+CHR$0
 1490ENDPROC

� >!RunImage
testing%=�
)ț "<BasicLibrary$File>":�initlibrary
(=� � �closemessages:�eerror:� testing%=� ��("Spool"):� � �
2 � testing%=� �*Spool Spooled
<� testing%=� �� �
F5� Appname$ is used for task manager & Appname$Dir
PD� shortname$ is used for iconbar name and should usually be null
Z'� longname$ is used for info window
d7� AppURL$ is used to for clicks on the version icon
n2Appname$="?????":version$="1.00 (?? ??? ????)"
x#shortname$="":longname$="?????"
�'Appdir$=�systemvar(Appname$+"$Dir")
�9AppURL$="http://users.essex.ac.uk/users/gerph/acorn/"
��initwimp:�initprog
�quit%=�:init%=�
�� � �error
�� � init% �
� go$=�GetEnv:init%=�
�- � go$<>"" ��loadfile(go$,�filetype(go$))
��
�ȕ quit%=�
�
 �Poll
��
�ș "Wimp_CloseDown"
�closemessages
� testing%=� �*SPOOL
�
"5� quit%=-1 for user quit, -2 for taskmanager quit
,:
6
��Poll
@!ș "Wimp_Poll",1,b% � reason%
JȎ reason% �
T � 1 = Redraw window
^! � 2:ș "Wimp_OpenWindow",,b%
h" � 3:ș "Wimp_CloseWindow",,b%
r& � 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
  �
 � infobox%
  Ȏ icon �
   � 1:�showfree
&>   � 3:�FetchPage("http://users.essex.ac.uk/users/gerph/")
0   � 4:�FetchPage(AppURL$)
:  �
D�
N�
X:
b��processkey(win,icon,key)
l� keydone:keydone=�
vȎ win �
��
�)� � keydone �ș "Wimp_ProcessKey",key
��
�:
���menuchoice
�Dș"Wimp_GetPointerInfo",,message_buffer%:mbut%=message_buffer%!8
�m$=�decodemenu(curmenu%)
�Ȏ m$ �
� � "Quit":quit%=�
��
�-� (mbut%�1)=1 ��recreatemenu �curmenu%=-1
��
�:
��receive(mess)

Ȏ mess �
 � &400C1 = mode change
  � &400C2 = task start up
* � &400C3 = task shut down
4 � 0:quit%=�*2
> � 3,5:type=b%!40
H  � type = &8888 �
R   b%!12=b%!8:b%!16=4
\&   ș"Wimp_SendMessage",17,b%,b%!4
f'   �loadfile(�string0(b%+44),b%!40)
p  �
z# � &502:�Help(b%!32,b%!36,b%!4)
� � 10:�desktopsave(b%!20)
��
��
�:
���receiveack(mess)
�
Ȏ mess �
��
��
�:
��desktopsave(file%)
� �
;� � � b%!12=b%!8:ș "Wimp_SendMessage",19,b%,b%!4:� �:�
$@� The above line acknowledges the message if an error occurs
. � aborting the desktop save.
8�#file%,"Run "+Appdir$
B�
C:
D��loadfile(file$,type)
E
Ȏ type �
F�
G�
L:
V/� Any messages to be received MUST be noted
`��initwimp
j!� messagelist% 256:messptr%=0
t'�notemessage(&502):�notemessage(10)
��notemessage(0)
�Uș "Wimp_Initialise",310,&4B534154,Appname$,messagelist% � wimpversion,taskhandle
�Gindl%=1024:menul%=1024:� b% 2048,ind% indl%,menu% menul%,wspc% &800
�curmenu%=-1
��openmessages
�0� sprites%=FNloadsprites(Appdir$+".Sprites")
�$infobox%=�loadtemplate("Info",1)
�%�seticontext(infobox%,1,Appname$)
�&�seticontext(infobox%,2,longname$)
�%�seticontext(infobox%,4,version$)
�:ibhandle=�CreateIconBarIcon("!"+Appname$,shortname$,1)
�8ibmenu%=�createmenu(Appname$+"|Info]>infobox%|Quit")
iboptions%=options%

�
:
��initprog
(�
2:
<��Help(win,icon,to)
F!� �DdE:�readhelp(win,icon,to)
P�
Z
� Windows
d� infobox%,">HInfobox"
n� 3,">HInfobox3"
x� 4,">HInfobox4"
�� -2,">HIconbar"
�� -1,-1
�� Menus
�� -2,-2,-2,-2
�:
���FetchPage(f$)
�<� XURI_Dispatch - this protocol is still being decided !
�ș &6E381,%000,f$+�0
��
�
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 29 c8 9b 20 22 3c 42  61 73 69 63 4c 69 62 72  |.).. "<BasicLibr|
00000030  61 72 79 24 46 69 6c 65  3e 22 3a f2 69 6e 69 74  |ary$File>":.init|
00000040  6c 69 62 72 61 72 79 0d  00 28 3d ee 20 85 20 f2  |library..(=. . .|
00000050  63 6c 6f 73 65 6d 65 73  73 61 67 65 73 3a f2 65  |closemessages:.e|
00000060  65 72 72 6f 72 3a e7 20  74 65 73 74 69 6e 67 25  |error:. testing%|
00000070  3d b9 20 8c ff 28 22 53  70 6f 6f 6c 22 29 3a e0  |=. ..("Spool"):.|
00000080  20 8b 20 e0 0d 00 32 20  e7 20 74 65 73 74 69 6e  | . ...2 . testin|
00000090  67 25 3d b9 20 8c 2a 53  70 6f 6f 6c 20 53 70 6f  |g%=. .*Spool Spo|
000000a0  6f 6c 65 64 0d 00 3c 15  e7 20 74 65 73 74 69 6e  |oled..<.. testin|
000000b0  67 25 3d b9 20 8c fc 20  ee 0d 00 46 35 f4 20 41  |g%=. .. ...F5. A|
000000c0  70 70 6e 61 6d 65 24 20  69 73 20 75 73 65 64 20  |ppname$ is used |
000000d0  66 6f 72 20 74 61 73 6b  20 6d 61 6e 61 67 65 72  |for task manager|
000000e0  20 26 20 41 70 70 6e 61  6d 65 24 44 69 72 0d 00  | & Appname$Dir..|
000000f0  50 44 f4 20 73 68 6f 72  74 6e 61 6d 65 24 20 69  |PD. shortname$ i|
00000100  73 20 75 73 65 64 20 66  6f 72 20 69 63 6f 6e 62  |s used for iconb|
00000110  61 72 20 6e 61 6d 65 20  61 6e 64 20 73 68 6f 75  |ar name and shou|
00000120  6c 64 20 75 73 75 61 6c  6c 79 20 62 65 20 6e 75  |ld usually be nu|
00000130  6c 6c 0d 00 5a 27 f4 20  6c 6f 6e 67 6e 61 6d 65  |ll..Z'. longname|
00000140  24 20 69 73 20 75 73 65  64 20 66 6f 72 20 69 6e  |$ is used for in|
00000150  66 6f 20 77 69 6e 64 6f  77 0d 00 64 37 f4 20 41  |fo window..d7. A|
00000160  70 70 55 52 4c 24 20 69  73 20 75 73 65 64 20 74  |ppURL$ is used t|
00000170  6f 20 66 6f 72 20 63 6c  69 63 6b 73 20 6f 6e 20  |o for clicks on |
00000180  74 68 65 20 76 65 72 73  69 6f 6e 20 69 63 6f 6e  |the version icon|
00000190  0d 00 6e 32 41 70 70 6e  61 6d 65 24 3d 22 3f 3f  |..n2Appname$="??|
000001a0  3f 3f 3f 22 3a 76 65 72  73 69 6f 6e 24 3d 22 31  |???":version$="1|
000001b0  2e 30 30 20 28 3f 3f 20  3f 3f 3f 20 3f 3f 3f 3f  |.00 (?? ??? ????|
000001c0  29 22 0d 00 78 23 73 68  6f 72 74 6e 61 6d 65 24  |)"..x#shortname$|
000001d0  3d 22 22 3a 6c 6f 6e 67  6e 61 6d 65 24 3d 22 3f  |="":longname$="?|
000001e0  3f 3f 3f 3f 22 0d 00 82  27 41 70 70 64 69 72 24  |????"...'Appdir$|
000001f0  3d a4 73 79 73 74 65 6d  76 61 72 28 41 70 70 6e  |=.systemvar(Appn|
00000200  61 6d 65 24 2b 22 24 44  69 72 22 29 0d 00 8c 39  |ame$+"$Dir")...9|
00000210  41 70 70 55 52 4c 24 3d  22 68 74 74 70 3a 2f 2f  |AppURL$="http://|
00000220  75 73 65 72 73 2e 65 73  73 65 78 2e 61 63 2e 75  |users.essex.ac.u|
00000230  6b 2f 75 73 65 72 73 2f  67 65 72 70 68 2f 61 63  |k/users/gerph/ac|
00000240  6f 72 6e 2f 22 0d 00 96  17 f2 69 6e 69 74 77 69  |orn/".....initwi|
00000250  6d 70 3a f2 69 6e 69 74  70 72 6f 67 0d 00 a0 13  |mp:.initprog....|
00000260  71 75 69 74 25 3d a3 3a  69 6e 69 74 25 3d a3 0d  |quit%=.:init%=..|
00000270  00 aa 0e ee 20 85 20 f2  65 72 72 6f 72 0d 00 b4  |.... . .error...|
00000280  0f e7 20 ac 20 69 6e 69  74 25 20 8c 0d 00 be 18  |.. . init% .....|
00000290  20 67 6f 24 3d a4 47 65  74 45 6e 76 3a 69 6e 69  | go$=.GetEnv:ini|
000002a0  74 25 3d b9 0d 00 c8 2d  20 e7 20 67 6f 24 3c 3e  |t%=....- . go$<>|
000002b0  22 22 20 8c f2 6c 6f 61  64 66 69 6c 65 28 67 6f  |"" ..loadfile(go|
000002c0  24 2c a4 66 69 6c 65 74  79 70 65 28 67 6f 24 29  |$,.filetype(go$)|
000002d0  29 0d 00 d2 05 cd 0d 00  dc 0e c8 95 20 71 75 69  |)........... qui|
000002e0  74 25 3d a3 0d 00 e6 0a  20 f2 50 6f 6c 6c 0d 00  |t%=..... .Poll..|
000002f0  f0 05 ce 0d 00 fa 17 c8  99 20 22 57 69 6d 70 5f  |......... "Wimp_|
00000300  43 6c 6f 73 65 44 6f 77  6e 22 0d 01 04 12 f2 63  |CloseDown".....c|
00000310  6c 6f 73 65 6d 65 73 73  61 67 65 73 0d 01 0e 18  |losemessages....|
00000320  e7 20 74 65 73 74 69 6e  67 25 3d b9 20 8c 2a 53  |. testing%=. .*S|
00000330  50 4f 4f 4c 0d 01 18 05  e0 0d 01 22 35 f4 20 71  |POOL......."5. q|
00000340  75 69 74 25 3d 2d 31 20  66 6f 72 20 75 73 65 72  |uit%=-1 for user|
00000350  20 71 75 69 74 2c 20 2d  32 20 66 6f 72 20 74 61  | quit, -2 for ta|
00000360  73 6b 6d 61 6e 61 67 65  72 20 71 75 69 74 0d 01  |skmanager quit..|
00000370  2c 05 3a 0d 01 36 0a dd  f2 50 6f 6c 6c 0d 01 40  |,.:..6...Poll..@|
00000380  21 c8 99 20 22 57 69 6d  70 5f 50 6f 6c 6c 22 2c  |!.. "Wimp_Poll",|
00000390  31 2c 62 25 20 b8 20 72  65 61 73 6f 6e 25 0d 01  |1,b% . reason%..|
000003a0  4a 10 c8 8e 20 72 65 61  73 6f 6e 25 20 ca 0d 01  |J... reason% ...|
000003b0  54 18 20 f4 20 31 20 3d  20 52 65 64 72 61 77 20  |T. . 1 = Redraw |
000003c0  77 69 6e 64 6f 77 0d 01  5e 21 20 c9 20 32 3a c8  |window..^! . 2:.|
000003d0  99 20 22 57 69 6d 70 5f  4f 70 65 6e 57 69 6e 64  |. "Wimp_OpenWind|
000003e0  6f 77 22 2c 2c 62 25 0d  01 68 22 20 c9 20 33 3a  |ow",,b%..h" . 3:|
000003f0  c8 99 20 22 57 69 6d 70  5f 43 6c 6f 73 65 57 69  |.. "Wimp_CloseWi|
00000400  6e 64 6f 77 22 2c 2c 62  25 0d 01 72 26 20 c9 20  |ndow",,b%..r& . |
00000410  36 3a f2 6d 6f 75 73 65  63 6c 69 63 6b 28 62 25  |6:.mouseclick(b%|
00000420  21 38 2c 62 25 21 31 32  2c 62 25 21 31 36 29 0d  |!8,b%!12,b%!16).|
00000430  01 7c 2b 20 f4 20 37 20  3d 20 44 72 61 67 20 62  |.|+ . 7 = Drag b|
00000440  6f 78 20 64 72 6f 70 70  65 64 20 6f 6e 20 61 6e  |ox dropped on an|
00000450  6f 74 68 65 72 20 74 61  73 6b 0d 01 86 25 20 c9  |other task...% .|
00000460  20 38 3a f2 70 72 6f 63  65 73 73 6b 65 79 28 62  | 8:.processkey(b|
00000470  25 21 30 2c 62 25 21 34  2c 62 25 21 32 34 29 0d  |%!0,b%!4,b%!24).|
00000480  01 90 14 20 c9 20 39 3a  f2 6d 65 6e 75 63 68 6f  |... . 9:.menucho|
00000490  69 63 65 0d 01 9a 1c 20  c9 20 31 37 2c 31 38 3a  |ice.... . 17,18:|
000004a0  f2 72 65 63 65 69 76 65  28 62 25 21 31 36 29 0d  |.receive(b%!16).|
000004b0  01 a4 1c 20 c9 20 31 39  3a f2 72 65 63 65 69 76  |... . 19:.receiv|
000004c0  65 61 63 6b 28 62 25 21  31 36 29 0d 01 ae 05 cb  |eack(b%!16).....|
000004d0  0d 01 b8 05 e1 0d 01 c2  05 3a 0d 01 cc 30 f4 20  |.........:...0. |
000004e0  42 75 74 74 6f 6e 73 20  3a 20 31 20 3d 20 41 64  |Buttons : 1 = Ad|
000004f0  6a 75 73 74 2c 20 32 20  3d 20 4d 65 6e 75 2c 20  |just, 2 = Menu, |
00000500  34 20 3d 20 53 65 6c 65  63 74 0d 01 d6 1e dd f2  |4 = Select......|
00000510  6d 6f 75 73 65 63 6c 69  63 6b 28 62 75 74 2c 77  |mouseclick(but,w|
00000520  69 6e 2c 69 63 6f 6e 29  0d 01 e0 0c c8 8e 20 77  |in,icon)...... w|
00000530  69 6e 20 ca 0d 01 ea 09  20 c9 20 2d 32 0d 01 f4  |in ..... . -2...|
00000540  0e 20 20 c8 8e 20 62 75  74 20 ca 0d 01 fe 12 20  |.  .. but ..... |
00000550  20 20 c9 20 32 3a f2 69  62 6d 65 6e 75 0d 02 08  |  . 2:.ibmenu...|
00000560  07 20 20 cb 0d 02 12 0f  20 c9 20 69 6e 66 6f 62  |.  ..... . infob|
00000570  6f 78 25 0d 02 1c 0f 20  20 c8 8e 20 69 63 6f 6e  |ox%....  .. icon|
00000580  20 ca 0d 02 1d 14 20 20  20 c9 20 31 3a f2 73 68  | .....   . 1:.sh|
00000590  6f 77 66 72 65 65 0d 02  26 3e 20 20 20 c9 20 33  |owfree..&>   . 3|
000005a0  3a f2 46 65 74 63 68 50  61 67 65 28 22 68 74 74  |:.FetchPage("htt|
000005b0  70 3a 2f 2f 75 73 65 72  73 2e 65 73 73 65 78 2e  |p://users.essex.|
000005c0  61 63 2e 75 6b 2f 75 73  65 72 73 2f 67 65 72 70  |ac.uk/users/gerp|
000005d0  68 2f 22 29 0d 02 30 1e  20 20 20 c9 20 34 3a f2  |h/")..0.   . 4:.|
000005e0  46 65 74 63 68 50 61 67  65 28 41 70 70 55 52 4c  |FetchPage(AppURL|
000005f0  24 29 0d 02 3a 07 20 20  cb 0d 02 44 05 cb 0d 02  |$)..:.  ...D....|
00000600  4e 05 e1 0d 02 58 05 3a  0d 02 62 1e dd f2 70 72  |N....X.:..b...pr|
00000610  6f 63 65 73 73 6b 65 79  28 77 69 6e 2c 69 63 6f  |ocesskey(win,ico|
00000620  6e 2c 6b 65 79 29 0d 02  6c 17 ea 20 6b 65 79 64  |n,key)..l.. keyd|
00000630  6f 6e 65 3a 6b 65 79 64  6f 6e 65 3d a3 0d 02 76  |one:keydone=...v|
00000640  0c c8 8e 20 77 69 6e 20  ca 0d 02 80 05 cb 0d 02  |... win ........|
00000650  8a 29 e7 20 ac 20 6b 65  79 64 6f 6e 65 20 8c c8  |.). . keydone ..|
00000660  99 20 22 57 69 6d 70 5f  50 72 6f 63 65 73 73 4b  |. "Wimp_ProcessK|
00000670  65 79 22 2c 6b 65 79 0d  02 94 05 e1 0d 02 9e 05  |ey",key.........|
00000680  3a 0d 02 a8 10 dd f2 6d  65 6e 75 63 68 6f 69 63  |:......menuchoic|
00000690  65 0d 02 b2 44 c8 99 22  57 69 6d 70 5f 47 65 74  |e...D.."Wimp_Get|
000006a0  50 6f 69 6e 74 65 72 49  6e 66 6f 22 2c 2c 6d 65  |PointerInfo",,me|
000006b0  73 73 61 67 65 5f 62 75  66 66 65 72 25 3a 6d 62  |ssage_buffer%:mb|
000006c0  75 74 25 3d 6d 65 73 73  61 67 65 5f 62 75 66 66  |ut%=message_buff|
000006d0  65 72 25 21 38 0d 02 bc  1c 6d 24 3d a4 64 65 63  |er%!8....m$=.dec|
000006e0  6f 64 65 6d 65 6e 75 28  63 75 72 6d 65 6e 75 25  |odemenu(curmenu%|
000006f0  29 0d 02 c6 0b c8 8e 20  6d 24 20 ca 0d 02 d0 15  |)...... m$ .....|
00000700  20 c9 20 22 51 75 69 74  22 3a 71 75 69 74 25 3d  | . "Quit":quit%=|
00000710  b9 0d 02 da 05 cb 0d 02  e4 2d e7 20 28 6d 62 75  |.........-. (mbu|
00000720  74 25 80 31 29 3d 31 20  8c f2 72 65 63 72 65 61  |t%.1)=1 ..recrea|
00000730  74 65 6d 65 6e 75 20 8b  63 75 72 6d 65 6e 75 25  |temenu .curmenu%|
00000740  3d 2d 31 0d 02 ee 05 e1  0d 02 f8 05 3a 0d 03 02  |=-1.........:...|
00000750  13 dd f2 72 65 63 65 69  76 65 28 6d 65 73 73 29  |...receive(mess)|
00000760  0d 03 0c 0d c8 8e 20 6d  65 73 73 20 ca 0d 03 16  |...... mess ....|
00000770  1b 20 f4 20 26 34 30 30  43 31 20 3d 20 6d 6f 64  |. . &400C1 = mod|
00000780  65 20 63 68 61 6e 67 65  0d 03 20 1d 20 f4 20 26  |e change.. . . &|
00000790  34 30 30 43 32 20 3d 20  74 61 73 6b 20 73 74 61  |400C2 = task sta|
000007a0  72 74 20 75 70 0d 03 2a  1e 20 f4 20 26 34 30 30  |rt up..*. . &400|
000007b0  43 33 20 3d 20 74 61 73  6b 20 73 68 75 74 20 64  |C3 = task shut d|
000007c0  6f 77 6e 0d 03 34 12 20  c9 20 30 3a 71 75 69 74  |own..4. . 0:quit|
000007d0  25 3d b9 2a 32 0d 03 3e  15 20 c9 20 33 2c 35 3a  |%=.*2..>. . 3,5:|
000007e0  74 79 70 65 3d 62 25 21  34 30 0d 03 48 16 20 20  |type=b%!40..H.  |
000007f0  e7 20 74 79 70 65 20 3d  20 26 38 38 38 38 20 8c  |. type = &8888 .|
00000800  0d 03 52 19 20 20 20 62  25 21 31 32 3d 62 25 21  |..R.   b%!12=b%!|
00000810  38 3a 62 25 21 31 36 3d  34 0d 03 5c 26 20 20 20  |8:b%!16=4..\&   |
00000820  c8 99 22 57 69 6d 70 5f  53 65 6e 64 4d 65 73 73  |.."Wimp_SendMess|
00000830  61 67 65 22 2c 31 37 2c  62 25 2c 62 25 21 34 0d  |age",17,b%,b%!4.|
00000840  03 66 27 20 20 20 f2 6c  6f 61 64 66 69 6c 65 28  |.f'   .loadfile(|
00000850  a4 73 74 72 69 6e 67 30  28 62 25 2b 34 34 29 2c  |.string0(b%+44),|
00000860  62 25 21 34 30 29 0d 03  70 07 20 20 cd 0d 03 7a  |b%!40)..p.  ...z|
00000870  23 20 c9 20 26 35 30 32  3a f2 48 65 6c 70 28 62  |# . &502:.Help(b|
00000880  25 21 33 32 2c 62 25 21  33 36 2c 62 25 21 34 29  |%!32,b%!36,b%!4)|
00000890  0d 03 84 1d 20 c9 20 31  30 3a f2 64 65 73 6b 74  |.... . 10:.deskt|
000008a0  6f 70 73 61 76 65 28 62  25 21 32 30 29 0d 03 a2  |opsave(b%!20)...|
000008b0  05 cb 0d 03 ac 05 e1 0d  03 b6 05 3a 0d 03 c0 16  |...........:....|
000008c0  dd f2 72 65 63 65 69 76  65 61 63 6b 28 6d 65 73  |..receiveack(mes|
000008d0  73 29 0d 03 ca 0d c8 8e  20 6d 65 73 73 20 ca 0d  |s)...... mess ..|
000008e0  03 e8 05 cb 0d 03 f2 05  e1 0d 03 fc 05 3a 0d 04  |.............:..|
000008f0  06 18 dd f2 64 65 73 6b  74 6f 70 73 61 76 65 28  |....desktopsave(|
00000900  66 69 6c 65 25 29 0d 04  10 07 ea 20 85 0d 04 1a  |file%)..... ....|
00000910  3b ee 20 85 20 ea 20 62  25 21 31 32 3d 62 25 21  |;. . . b%!12=b%!|
00000920  38 3a c8 99 20 22 57 69  6d 70 5f 53 65 6e 64 4d  |8:.. "Wimp_SendM|
00000930  65 73 73 61 67 65 22 2c  31 39 2c 62 25 2c 62 25  |essage",19,b%,b%|
00000940  21 34 3a f7 20 85 3a e1  0d 04 24 40 f4 20 54 68  |!4:. .:...$@. Th|
00000950  65 20 61 62 6f 76 65 20  6c 69 6e 65 20 61 63 6b  |e above line ack|
00000960  6e 6f 77 6c 65 64 67 65  73 20 74 68 65 20 6d 65  |nowledges the me|
00000970  73 73 61 67 65 20 69 66  20 61 6e 20 65 72 72 6f  |ssage if an erro|
00000980  72 20 6f 63 63 75 72 73  0d 04 2e 20 f4 20 61 62  |r occurs... . ab|
00000990  6f 72 74 69 6e 67 20 74  68 65 20 64 65 73 6b 74  |orting the deskt|
000009a0  6f 70 20 73 61 76 65 2e  0d 04 38 1a d5 23 66 69  |op save...8..#fi|
000009b0  6c 65 25 2c 22 52 75 6e  20 22 2b 41 70 70 64 69  |le%,"Run "+Appdi|
000009c0  72 24 0d 04 42 05 e1 0d  04 43 05 3a 0d 04 44 1a  |r$..B....C.:..D.|
000009d0  dd f2 6c 6f 61 64 66 69  6c 65 28 66 69 6c 65 24  |..loadfile(file$|
000009e0  2c 74 79 70 65 29 0d 04  45 0d c8 8e 20 74 79 70  |,type)..E... typ|
000009f0  65 20 ca 0d 04 46 05 cb  0d 04 47 05 e1 0d 04 4c  |e ...F....G....L|
00000a00  05 3a 0d 04 56 2f f4 20  41 6e 79 20 6d 65 73 73  |.:..V/. Any mess|
00000a10  61 67 65 73 20 74 6f 20  62 65 20 72 65 63 65 69  |ages to be recei|
00000a20  76 65 64 20 4d 55 53 54  20 62 65 20 6e 6f 74 65  |ved MUST be note|
00000a30  64 0d 04 60 0e dd f2 69  6e 69 74 77 69 6d 70 0d  |d..`...initwimp.|
00000a40  04 6a 21 de 20 6d 65 73  73 61 67 65 6c 69 73 74  |.j!. messagelist|
00000a50  25 20 32 35 36 3a 6d 65  73 73 70 74 72 25 3d 30  |% 256:messptr%=0|
00000a60  0d 04 74 27 f2 6e 6f 74  65 6d 65 73 73 61 67 65  |..t'.notemessage|
00000a70  28 26 35 30 32 29 3a f2  6e 6f 74 65 6d 65 73 73  |(&502):.notemess|
00000a80  61 67 65 28 31 30 29 0d  04 88 13 f2 6e 6f 74 65  |age(10).....note|
00000a90  6d 65 73 73 61 67 65 28  30 29 0d 04 92 55 c8 99  |message(0)...U..|
00000aa0  20 22 57 69 6d 70 5f 49  6e 69 74 69 61 6c 69 73  | "Wimp_Initialis|
00000ab0  65 22 2c 33 31 30 2c 26  34 42 35 33 34 31 35 34  |e",310,&4B534154|
00000ac0  2c 41 70 70 6e 61 6d 65  24 2c 6d 65 73 73 61 67  |,Appname$,messag|
00000ad0  65 6c 69 73 74 25 20 b8  20 77 69 6d 70 76 65 72  |elist% . wimpver|
00000ae0  73 69 6f 6e 2c 74 61 73  6b 68 61 6e 64 6c 65 0d  |sion,taskhandle.|
00000af0  04 9c 47 69 6e 64 6c 25  3d 31 30 32 34 3a 6d 65  |..Gindl%=1024:me|
00000b00  6e 75 6c 25 3d 31 30 32  34 3a de 20 62 25 20 32  |nul%=1024:. b% 2|
00000b10  30 34 38 2c 69 6e 64 25  20 69 6e 64 6c 25 2c 6d  |048,ind% indl%,m|
00000b20  65 6e 75 25 20 6d 65 6e  75 6c 25 2c 77 73 70 63  |enu% menul%,wspc|
00000b30  25 20 26 38 30 30 0d 04  a6 0f 63 75 72 6d 65 6e  |% &800....curmen|
00000b40  75 25 3d 2d 31 0d 04 b0  11 f2 6f 70 65 6e 6d 65  |u%=-1.....openme|
00000b50  73 73 61 67 65 73 0d 04  ba 30 f4 20 73 70 72 69  |ssages...0. spri|
00000b60  74 65 73 25 3d 46 4e 6c  6f 61 64 73 70 72 69 74  |tes%=FNloadsprit|
00000b70  65 73 28 41 70 70 64 69  72 24 2b 22 2e 53 70 72  |es(Appdir$+".Spr|
00000b80  69 74 65 73 22 29 0d 04  c4 24 69 6e 66 6f 62 6f  |ites")...$infobo|
00000b90  78 25 3d a4 6c 6f 61 64  74 65 6d 70 6c 61 74 65  |x%=.loadtemplate|
00000ba0  28 22 49 6e 66 6f 22 2c  31 29 0d 04 ce 25 f2 73  |("Info",1)...%.s|
00000bb0  65 74 69 63 6f 6e 74 65  78 74 28 69 6e 66 6f 62  |eticontext(infob|
00000bc0  6f 78 25 2c 31 2c 41 70  70 6e 61 6d 65 24 29 0d  |ox%,1,Appname$).|
00000bd0  04 d8 26 f2 73 65 74 69  63 6f 6e 74 65 78 74 28  |..&.seticontext(|
00000be0  69 6e 66 6f 62 6f 78 25  2c 32 2c 6c 6f 6e 67 6e  |infobox%,2,longn|
00000bf0  61 6d 65 24 29 0d 04 e2  25 f2 73 65 74 69 63 6f  |ame$)...%.setico|
00000c00  6e 74 65 78 74 28 69 6e  66 6f 62 6f 78 25 2c 34  |ntext(infobox%,4|
00000c10  2c 76 65 72 73 69 6f 6e  24 29 0d 04 ec 3a 69 62  |,version$)...:ib|
00000c20  68 61 6e 64 6c 65 3d a4  43 72 65 61 74 65 49 63  |handle=.CreateIc|
00000c30  6f 6e 42 61 72 49 63 6f  6e 28 22 21 22 2b 41 70  |onBarIcon("!"+Ap|
00000c40  70 6e 61 6d 65 24 2c 73  68 6f 72 74 6e 61 6d 65  |pname$,shortname|
00000c50  24 2c 31 29 0d 04 f6 38  69 62 6d 65 6e 75 25 3d  |$,1)...8ibmenu%=|
00000c60  a4 63 72 65 61 74 65 6d  65 6e 75 28 41 70 70 6e  |.createmenu(Appn|
00000c70  61 6d 65 24 2b 22 7c 49  6e 66 6f 5d 3e 69 6e 66  |ame$+"|Info]>inf|
00000c80  6f 62 6f 78 25 7c 51 75  69 74 22 29 0d 05 00 17  |obox%|Quit")....|
00000c90  69 62 6f 70 74 69 6f 6e  73 25 3d 6f 70 74 69 6f  |iboptions%=optio|
00000ca0  6e 73 25 0d 05 0a 05 e1  0d 05 14 05 3a 0d 05 1e  |ns%.........:...|
00000cb0  0e dd f2 69 6e 69 74 70  72 6f 67 0d 05 28 05 e1  |...initprog..(..|
00000cc0  0d 05 32 05 3a 0d 05 3c  17 dd f2 48 65 6c 70 28  |..2.:..<...Help(|
00000cd0  77 69 6e 2c 69 63 6f 6e  2c 74 6f 29 0d 05 46 21  |win,icon,to)..F!|
00000ce0  f7 20 8d 44 64 45 3a f2  72 65 61 64 68 65 6c 70  |. .DdE:.readhelp|
00000cf0  28 77 69 6e 2c 69 63 6f  6e 2c 74 6f 29 0d 05 50  |(win,icon,to)..P|
00000d00  05 e1 0d 05 5a 0d f4 20  57 69 6e 64 6f 77 73 0d  |....Z.. Windows.|
00000d10  05 64 1a dc 20 69 6e 66  6f 62 6f 78 25 2c 22 3e  |.d.. infobox%,">|
00000d20  48 49 6e 66 6f 62 6f 78  22 0d 05 6e 14 dc 20 33  |HInfobox"..n.. 3|
00000d30  2c 22 3e 48 49 6e 66 6f  62 6f 78 33 22 0d 05 78  |,">HInfobox3"..x|
00000d40  14 dc 20 34 2c 22 3e 48  49 6e 66 6f 62 6f 78 34  |.. 4,">HInfobox4|
00000d50  22 0d 05 82 14 dc 20 2d  32 2c 22 3e 48 49 63 6f  |"..... -2,">HIco|
00000d60  6e 62 61 72 22 0d 05 8c  0b dc 20 2d 31 2c 2d 31  |nbar"..... -1,-1|
00000d70  0d 05 96 0b f4 20 4d 65  6e 75 73 0d 05 a0 11 dc  |..... Menus.....|
00000d80  20 2d 32 2c 2d 32 2c 2d  32 2c 2d 32 0d 05 aa 05  | -2,-2,-2,-2....|
00000d90  3a 0d 05 b4 13 dd f2 46  65 74 63 68 50 61 67 65  |:......FetchPage|
00000da0  28 66 24 29 0d 05 be 3c  f4 20 58 55 52 49 5f 44  |(f$)...<. XURI_D|
00000db0  69 73 70 61 74 63 68 20  2d 20 74 68 69 73 20 70  |ispatch - this p|
00000dc0  72 6f 74 6f 63 6f 6c 20  69 73 20 73 74 69 6c 6c  |rotocol is still|
00000dd0  20 62 65 69 6e 67 20 64  65 63 69 64 65 64 20 21  | being decided !|
00000de0  0d 05 c8 18 c8 99 20 26  36 45 33 38 31 2c 25 30  |...... &6E381,%0|
00000df0  30 30 2c 66 24 2b bd 30  0d 05 d2 05 e1 0d ff     |00,f$+.0.......|
00000dff