Home » Personal collection » Acorn ADFS disks » Archimedes » Fasttrax_2.ADF » !SysMerge/!RunImage

!SysMerge/!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 » Personal collection » Acorn ADFS disks » Archimedes » Fasttrax_2.ADF
Filename: !SysMerge/!RunImage
Read OK:
File size: 1D68 bytes
Load address: FFFFFB42
Exec address: BF8BBDDC
File contents
   10REM > !RunImage
   20REM Authors : Neil Gardner, Updates by James Bye
   30version$="1.02 (31-Oct-90)"
   40PROCinitialise
   50ON ERROR PROCerror
   60REPEAT
   70 SYS"Wimp_Poll",0,q1% TO r%
   80 CASE r% OF
   90 WHEN 0    : IFstage%=3 PROCcopy_files
  100 WHEN 2    : SYS"Wimp_OpenWindow",,q1%
  110 WHEN 3    : SYS"Wimp_CloseWindow",,q1%
  120             IF!q1%=SysUpdate% PROCshutdown:END
  130 WHEN 6    : PROCmouseclick
  140 WHEN 7    : PROCdecodedrag
  150 WHEN 9    : PROCmenuselect
  160 WHEN 17,18: PROCreceive(r%)
  170 ENDCASE
  180UNTIL FALSE
  190END
  200:
  210DEFPROCinitialise
  220error_flag%=3
  230DIM ws% 2048:wsend%=ws%+2048
  240DIM menufree% 256:menuend%=menufree%+256
  250DIM q1% 256, q2% 512
  260SYS"Wimp_Initialise",200,&4B534154,"SysMerge"
  270SYS"Wimp_OpenTemplate",,"<SysUpdate$Dir>.Templates"
  280SYS"Wimp_LoadTemplate",,q2%,ws%,wsend%,-1,"info",0 TO ,,ws%
  290$(q2%!(88+96+20))=version$
  300SYS"Wimp_CreateWindow",,q2% TO info%
  310SYS"Wimp_LoadTemplate",,q2%,ws%,wsend%,-1,"system",0 TO ,,ws%,,,,r6%
  320file1%=q2%!(88+64+20)
  330file2%=q2%!(88+96+20)
  340prompt%=q2%!(88+128+20)
  350SYS"Wimp_CreateWindow",,q2% TO SysUpdate%
  360SYS"Wimp_CloseTemplate"
  370mainmenu%=FNcrmenu
  380 DATA"#SysMerge,Info>info%,Quit"
  390PROCinit_sys_window
  400saveref%=0
  410error_flag%=3
  420PROCgetmodeinfo
  430!q1%=SysUpdate%:SYS"Wimp_GetWindowState",,q1%:SYS"Wimp_OpenWindow",,q1%
  440ENDPROC
  450:
  460DEFPROCinit_sys_window
  470$file1%=""
  480$file2%=""
  490$prompt%="Drag the original !System into this window."
  500stage%=1
  510PROCrefresh_sys_window
  520ENDPROC
  530:
  540DEFPROCgetmodeinfo
  550q1%!0 = 4
  560q1%!4 = 5
  570q1%!8 = 11
  580q1%!12= 12
  590q1%!16= -1
  600SYS"OS_ReadVduVariables",q1%,q1%+20
  610dx%=1<<(q1%!20)
  620dy%=1<<(q1%!24)
  630scrx1%=(q1%!28+1)*dx%
  640scry1%=(q1%!32+1)*dy%
  650ENDPROC
  660:
  670DEFPROCmouseclick
  680LOCAL p%
  690CASEq1%!8 OF
  700WHEN2:   IFq1%!12=SysUpdate% PROCdomenu(mainmenu%,!q1%-64,q1%!4)
  710ENDCASE
  720ENDPROC
  730:
  740DEFPROCdecodedrag
  750LOCAL f1%,f2%,h%,i%,mx%,my%,ext%
  760f1%=OPENIN("<SysUpdate$Dir>.Output"):ext%=EXT#f1%:CLOSE#f1%
  770f1%=filename%
  780REPEAT
  790 f2%=f1%
  800 f1%+=INSTR($f1%,".")
  810UNTIL f1%=f2%
  820SYS"Wimp_GetPointerInfo",,q1%
  830mx%=!q1%
  840my%=q1%!4
  850h%=q1%!12
  860i%=q1%!16
  870!q1%=(48+LEN$f1%)ANDNOT3
  880q1%!12=0
  890q1%!16=1
  900q1%!20=h%
  910q1%!24=i%
  920q1%!28=mx%
  930q1%!32=my%
  940q1%!36=ext%
  950q1%!40=&FFF
  960$(q1%+44)=$f1%
  970?(q1%+44+LEN$(q1%+44))=0
  980SYS"Wimp_SendMessage",17,q1%,h%,i%
  990saveref%=q1%!8
 1000ENDPROC
 1010:
 1020DEFPROCdomenu(h%,x%,y%)
 1030menudata%=h%:menux%=x%:menuy%=y%
 1040SYS"Wimp_CreateMenu",,h%,x%,y%
 1050ENDPROC
 1060:
 1070DEFPROCmenuselect
 1080LOCAL a$,i%
 1090SYS"Wimp_DecodeMenu",,menudata%,q1%,STRING$(200," ") TO ,,,a$
 1100IFa$="" ENDPROC
 1110IFa$="Quit" PROCshutdown:END
 1120ENDPROC
 1130:
 1140DEFFNrtoz(p%)
 1150LOCAL q$
 1160WHILE ?p%<>0 q$+=CHR$?p%:p%+=1:ENDWHILE
 1170=q$
 1180:
 1190DEFPROCreceive(r%)
 1200LOCAL name$,i%,x%
 1210CASE q1%!16 OF
 1220WHEN0: PROCshutdown:END
 1230WHEN1: REM file dropped from application - return filename
 1240       PROCok("Application data cannot be merged")
 1250       ENDPROC
 1260WHEN3: REM file dropped from Filer - identify object
 1270  CASE stage% OF
 1280  WHEN1: PROCcheck_type
 1290         $file1%=FNrtoz(q1%+44)
 1300         $prompt%="Drag the new !System into this window"
 1310         PROCrefresh_sys_window
 1320         stage%=2
 1330  WHEN2: PROCcheck_type
 1340         $file2%=FNrtoz(q1%+44)
 1350         IF$file1%=$file2% THEN
 1360          PROCinit_sys_window
 1370          PROCok("The files are identical")
 1380         ENDIF
 1390         $prompt%="Please wait ... processing files"
 1400         PROCrefresh_sys_window
 1410         stage%=3
 1420  ENDCASE
 1430WHEN&502: PROCinteractive_help
 1440WHEN&400C1: PROCgetmodeinfo
 1450ENDCASE
 1460ENDPROC
 1470:
 1480DEFPROCinteractive_help
 1490LOCAL t$
 1500CASE q1%!32 OF
 1510WHENSysUpdate%: t$="This is the SysMerge window.|M"
 1520 CASE stage% OF
 1530 WHEN1: t$+="Drop the original !System on it."
 1540 WHEN2: t$+="Drop the new !System on it."
 1550 WHEN4: t$+="!System update was successful.|MClick SELECT on close icon to quit."
 1560 ENDCASE
 1570ENDCASE
 1580IFt$<>"" THEN
 1590 q1%!12=q1%!8
 1600 q1%!16=&503
 1610 $(q1%+20)=t$+CHR$0
 1620 !q1%=(25+LENt$)ANDNOT3
 1630 SYS"Wimp_SendMessage",17,q1%,q1%!4
 1640ENDIF
 1650ENDPROC
 1660:
 1670DEFPROCcheck_type
 1680IFq1%!40<>&2000 OR RIGHT$(FNupper(FNrtoz(q1%+44)),8)<>".!SYSTEM" THEN PROCok("This is not a system resource directory")
 1690ENDPROC
 1700:
 1710DEFPROCrefresh_sys_window
 1720!q2%=SysUpdate%:q2%!4=2:q2%!8=0:q2%!12=0:SYS"Wimp_SetIconState",,q2%
 1730!q2%=SysUpdate%:q2%!4=3:q2%!8=0:q2%!12=0:SYS"Wimp_SetIconState",,q2%
 1740!q2%=SysUpdate%:q2%!4=4:q2%!8=0:q2%!12=0:SYS"Wimp_SetIconState",,q2%
 1750ENDPROC
 1760:
 1770DEFPROCshutdown
 1780SYS"Wimp_CloseDown"
 1790ENDPROC
 1800:
 1810DEFPROCerror
 1820IFerror_flag%=3 THEN
 1830 PROCerrorbox("Unexpected error :- "+REPORT$+" ("+STR$(ERL)+")")
 1840ELSE
 1850 PROCerrorbox(REPORT$)
 1860ENDIF
 1870error_flag%=3
 1880ENDPROC
 1890:
 1900DEFPROCok(e$)
 1910error_flag%=1
 1920ERROR 1,e$
 1930ENDPROC
 1940:
 1950DEFPROCfatal(e$)
 1960error_flag%=2
 1970ERROR 1,e$
 1980ENDPROC
 1990:
 2000DEFPROCerrorbox(r$)
 2010LOCAL r%
 2020!q1%=ERR:$(q1%+4)=r$+CHR$0
 2030SYS"Wimp_ReportError",q1%,error_flag%,"SysMerge utility" TO ,r%
 2040IFr%=2 SYS"Wimp_CloseDown":END
 2050ENDPROC
 2060:
 2070DEFFNcrmenu
 2080LOCAL m%,menu$,m$
 2090IF (menufree%+28>menuend%) PROCfatal("Menu area full")
 2100READ menu$
 2110WHILE RIGHT$(menu$,2)="++"
 2120 READ m$
 2130 menu$=LEFT$(menu$,LENmenu$-2)+m$
 2140ENDWHILE
 2150menuptr%=menufree%
 2160i%=0
 2170IF LEFT$(menu$,1)="#" i%=1:menutitle$=FNpar(",") ELSE menutitle$=""
 2180$menuptr%=menutitle$
 2190menuptr%?12=7
 2200menuptr%?13=2
 2210menuptr%?14=7
 2220menuptr%?15=1
 2230menuptr%!16=196
 2240menuptr%!20=44
 2250menuptr%!24=0
 2260menuptr%+=28
 2270maxx%=LENmenutitle$-3
 2280REPEAT
 2290 item$=FNpar(",")
 2300 PROCmenuitem(item$)
 2310UNTIL item$=""
 2320m%=menufree%
 2330m%!16=(maxx%*8+6)*2
 2340menufree%=menuptr%
 2350=m%
 2360:
 2370DEFPROCmenuitem(text$)
 2380LOCAL i%,flg%,subptr%,L%
 2390IF text$="" menuptr%!-24=(menuptr%!-24)OR&80:ENDPROC
 2400IF (menuptr%+24>menuend%) PROCfatal("Menu area full")
 2410flg%=&00
 2420i%=INSTR(text$,">")
 2430IF i%>0 THEN
 2440 subptr%=EVALMID$(text$,i%+1)
 2450 text$=LEFT$(text$,i%-1)
 2460ELSE
 2470 subptr%=-1
 2480ENDIF
 2490IF RIGHT$(text$,1)="#" text$=LEFT$(text$,LENtext$-1):flg%+=&02
 2500menuptr%!0=flg%
 2510menuptr%!4=subptr%
 2520menuptr%!8=&07000021
 2530IF LEFT$(text$,1)="$" THEN
 2540 !menuptr%+=&04
 2550 menuptr%!8+=&100
 2560 i%=INSTR(text$,"(")
 2570 IF i%>0 THEN
 2580  L%=VALMID$(text$,i%+1)
 2590  text$=LEFT$(text$,i%-1)
 2600 ELSE
 2610  L%=12
 2620 ENDIF
 2630 menuptr%!12=EVALMID$(text$,2)
 2640 menuptr%!16=-1
 2650 menuptr%!20=L%
 2660 IFL%>16 L%=16
 2670 text$=STRING$(L%," ")
 2680ELSE
 2690 IFLENtext$<=12THEN
 2700  $(menuptr%+12)=text$
 2710 ELSE
 2720  I%=FNworkspace(LENtext$+1):$I%=text$
 2730  menuptr%!12=I%:menuptr%!16=-1:menuptr%!20=LENtext$+1
 2740  menuptr%!8=menuptr%!8 OR &100
 2750 ENDIF
 2760ENDIF
 2770IF LENtext$>maxx% maxx%=LENtext$
 2780menuptr%+=24
 2790ENDPROC
 2800:
 2810DEFFNpar(sep$)
 2820LOCAL i1%
 2830i1%=i%+1
 2840i%=INSTR(menu$+sep$,sep$,i1%)
 2850=MID$(menu$,i1%,i%-i1%)
 2860:
 2870DEFPROCshade(menuhandle%,item%)
 2880menuhandle%!(28+8+24*item%)=menuhandle%!(28+8+24*item%)EOR&400000
 2890ENDPROC
 2900:
 2910DEFFNshade_status(menuhandle%,item%)
 2920= -((menuhandle%!(28+8+24*item%) AND &400000)=&400000)
 2930:
 2940DEFPROCset_shade(menuhandle%,item%,value%)
 2950IFFNshade_status(menuhandle%,item%)<>value% PROCshade(menuhandle%,item%)
 2960ENDPROC
 2970:
 2980DEFPROCtick(menuhandle%,item%)
 2990menuhandle%!(28+24*item%)=menuhandle%!(28+24*item%)EOR1
 3000ENDPROC
 3010:
 3020DEFFNtick_status(menuhandle%,item%)
 3030= menuhandle%!(28+24*item%)AND1
 3040:
 3050DEFPROCset_tick(menuhandle%,item%,value%)
 3060IFFNtick_status(menuhandle%,item%)<>value% PROCtick(menuhandle%,item%)
 3070ENDPROC
 3080:
 3090DEFFNworkspace(L%)
 3100IF curws%+L%>ws%+maxws% THEN PROCfatal("No more workspace")
 3110curws%+=L%
 3120=curws%-L%
 3130:
 3140DEFPROCcopy_files
 3150SYS"Hourglass_On"
 3160SYS"XOS_FSControl",26,$file2%,$file1%,%101001000000011 TO r0%;reg%
 3170IF (reg%AND 1)=1 THEN
 3180 error_flag%=1:PROCerrorbox(FNrtoz(r0%+4)):error_flag%=3
 3190 $file1%=""
 3200 $file2%=""
 3210 $prompt%="!System Update failed.  Correct the problem then drag the original !System into this window."
 3220 stage%=1
 3230 PROCrefresh_sys_window
 3240 ENDPROC
 3250ENDIF
 3260REM OSCLI"copy "+$file2%+" "+$file1%+" rnf~c~va~dl~p~q~s~t"1
 3270stage%=4
 3280$prompt%="!System updated."
 3290PROCrefresh_sys_window
 3300SYS"Hourglass_Off"
 3310ENDPROC
 3320:
 3330DEFFNupper(str$)
 3340LOCALrtn$, l%, c$
 3350rtn$=""
 3360FOR l%=1 TO LENstr$
 3370  c$=MID$(str$,l%,1)
 3380  IF c$>="a" AND c$<="z" THEN
 3390     rtn$+=CHR$(ASCc$EOR&20)
 3400  ELSE
 3410     rtn$+=c$
 3420  ENDIF
 3430NEXT
 3440=rtn$

� > !RunImage
2� Authors : Neil Gardner, Updates by James Bye
version$="1.02 (31-Oct-90)"
(�initialise
2� � �error
<�
F ș"Wimp_Poll",0,q1% � r%
P Ȏ r% �
Z# � 0    : �stage%=3 �copy_files
d& � 2    : ș"Wimp_OpenWindow",,q1%
n' � 3    : ș"Wimp_CloseWindow",,q1%
x-             �!q1%=SysUpdate% �shutdown:�
� � 6    : �mouseclick
� � 7    : �decodedrag
� � 9    : �menuselect
� � 17,18: �receive(r%)
� �
�� �
��
�:
���initialise
�error_flag%=3
�� ws% 2048:wsend%=ws%+2048
�*� menufree% 256:menuend%=menufree%+256
�� q1% 256, q2% 512
0ș"Wimp_Initialise",200,&4B534154,"SysMerge"
6ș"Wimp_OpenTemplate",,"<SysUpdate$Dir>.Templates"
=ș"Wimp_LoadTemplate",,q2%,ws%,wsend%,-1,"info",0 � ,,ws%
"$(q2%!(88+96+20))=version$
,&ș"Wimp_CreateWindow",,q2% � info%
6Fș"Wimp_LoadTemplate",,q2%,ws%,wsend%,-1,"system",0 � ,,ws%,,,,r6%
@file1%=q2%!(88+64+20)
Jfile2%=q2%!(88+96+20)
Tprompt%=q2%!(88+128+20)
^+ș"Wimp_CreateWindow",,q2% � SysUpdate%
hș"Wimp_CloseTemplate"
rmainmenu%=�crmenu
|! �"#SysMerge,Info>info%,Quit"
��init_sys_window
�saveref%=0
�error_flag%=3
��getmodeinfo
�I!q1%=SysUpdate%:ș"Wimp_GetWindowState",,q1%:ș"Wimp_OpenWindow",,q1%
��
�:
���init_sys_window
�$file1%=""
�$file2%=""
�:$prompt%="Drag the original !System into this window."
�stage%=1
��refresh_sys_window
�
:
��getmodeinfo
&
q1%!0 = 4
0
q1%!4 = 5
:q1%!8 = 11
Dq1%!12= 12
Nq1%!16= -1
X&ș"OS_ReadVduVariables",q1%,q1%+20
bdx%=1<<(q1%!20)
ldy%=1<<(q1%!24)
vscrx1%=(q1%!28+1)*dx%
�scry1%=(q1%!32+1)*dy%
��
�:
���mouseclick
�� p%
�
Ȏq1%!8 �
�=�2:   �q1%!12=SysUpdate% �domenu(mainmenu%,!q1%-64,q1%!4)
��
��
�:
���decodedrag
� � f1%,f2%,h%,i%,mx%,my%,ext%
�4f1%=�("<SysUpdate$Dir>.Output"):ext%=�#f1%:�#f1%
f1%=filename%
�
 f2%=f1%
  f1%+=�$f1%,".")
*
� f1%=f2%
4 ș"Wimp_GetPointerInfo",,q1%
>mx%=!q1%
H
my%=q1%!4
R
h%=q1%!12
\
i%=q1%!16
f!q1%=(48+�$f1%)��3
pq1%!12=0
zq1%!16=1
�
q1%!20=h%
�
q1%!24=i%
�q1%!28=mx%
�q1%!32=my%
�q1%!36=ext%
�q1%!40=&FFF
�$(q1%+44)=$f1%
�?(q1%+44+�$(q1%+44))=0
�%ș"Wimp_SendMessage",17,q1%,h%,i%
�saveref%=q1%!8
��
�:
���domenu(h%,x%,y%)
$menudata%=h%:menux%=x%:menuy%=y%
!ș"Wimp_CreateMenu",,h%,x%,y%
�
$:
.��menuselect
8� a$,i%
B8ș"Wimp_DecodeMenu",,menudata%,q1%,�200," ") � ,,,a$
L�a$="" �
V�a$="Quit" �shutdown:�
`�
j:
tݤrtoz(p%)
~� q$
�ȕ ?p%<>0 q$+=�?p%:p%+=1:�
�=q$
�:
���receive(r%)
�� name$,i%,x%
�Ȏ q1%!16 �
��0: �shutdown:�
�9�1: � file dropped from application - return filename
�3       �ok("Application data cannot be merged")
�       �
�3�3: � file dropped from Filer - identify object
�  Ȏ stage% �
  �1: �check_type

"         $file1%=�rtoz(q1%+44)
=         $prompt%="Drag the new !System into this window"
          �refresh_sys_window
(         stage%=2
2  �2: �check_type
<"         $file2%=�rtoz(q1%+44)
F         �$file1%=$file2% �
P          �init_sys_window
Z,          �ok("The files are identical")
d         �
n8         $prompt%="Please wait ... processing files"
x          �refresh_sys_window
�         stage%=3
�  �
��&502: �interactive_help
��&400C1: �getmodeinfo
��
��
�:
���interactive_help
�� t$
�Ȏ q1%!32 �
�4�SysUpdate%: t$="This is the SysMerge window.|M"
� Ȏ stage% �
�/ �1: t$+="Drop the original !System on it."
* �2: t$+="Drop the new !System on it."
R �4: t$+="!System update was successful.|MClick SELECT on close icon to quit."
 �
"�
,
�t$<>"" �
6 q1%!12=q1%!8
@ q1%!16=&503
J $(q1%+20)=t$+�0
T !q1%=(25+�t$)��3
^& ș"Wimp_SendMessage",17,q1%,q1%!4
h�
r�
|:
���check_type
�k�q1%!40<>&2000 � ¤upper(�rtoz(q1%+44)),8)<>".!SYSTEM" � �ok("This is not a system resource directory")
��
�:
���refresh_sys_window
�G!q2%=SysUpdate%:q2%!4=2:q2%!8=0:q2%!12=0:ș"Wimp_SetIconState",,q2%
�G!q2%=SysUpdate%:q2%!4=3:q2%!8=0:q2%!12=0:ș"Wimp_SetIconState",,q2%
�G!q2%=SysUpdate%:q2%!4=4:q2%!8=0:q2%!12=0:ș"Wimp_SetIconState",,q2%
��
�:
���shutdown
�ș"Wimp_CloseDown"
��
:
��error
�error_flag%=3 �
&7 �errorbox("Unexpected error :- "+�$+" ("+�(�)+")")
0�
: �errorbox(�$)
D�
Nerror_flag%=3
X�
b:
l��ok(e$)
verror_flag%=1
�
� 1,e$
��
�:
���fatal(e$)
�error_flag%=2
�
� 1,e$
��
�:
���errorbox(r$)
�� r%
�!q1%=�:$(q1%+4)=r$+�0
�Aș"Wimp_ReportError",q1%,error_flag%,"SysMerge utility" � ,r%
��r%=2 ș"Wimp_CloseDown":�
�
:
ݤcrmenu
 � m%,menu$,m$
*6� (menufree%+28>menuend%) �fatal("Menu area full")
4� menu$
>ȕ �menu$,2)="++"
H	 � m$
R menu$=�menu$,�menu$-2)+m$
\�
fmenuptr%=menufree%
pi%=0
z=� �menu$,1)="#" i%=1:menutitle$=�par(",") � menutitle$=""
�$menuptr%=menutitle$
�menuptr%?12=7
�menuptr%?13=2
�menuptr%?14=7
�menuptr%?15=1
�menuptr%!16=196
�menuptr%!20=44
�menuptr%!24=0
�menuptr%+=28
�maxx%=�menutitle$-3
��
� item$=�par(",")
� �menuitem(item$)
	� item$=""
	m%=menufree%
	m%!16=(maxx%*8+6)*2
	$menufree%=menuptr%
	.=m%
	8:
	B��menuitem(text$)
	L� i%,flg%,subptr%,L%
	V0� text$="" menuptr%!-24=(menuptr%!-24)�&80:�
	`5� (menuptr%+24>menuend%) �fatal("Menu area full")
	jflg%=&00
	ti%=�text$,">")
	~� i%>0 �
	� subptr%=��text$,i%+1)
	� text$=�text$,i%-1)
	��
	� subptr%=-1
	��
	�4� �text$,1)="#" text$=�text$,�text$-1):flg%+=&02
	�menuptr%!0=flg%
	�menuptr%!4=subptr%
	�menuptr%!8=&07000021
	�� �text$,1)="$" �
	� !menuptr%+=&04
	� menuptr%!8+=&100
 i%=�text$,"(")


 � i%>0 �
  L%=��text$,i%+1)
  text$=�text$,i%-1)
( �
2  L%=12
< �
F menuptr%!12=��text$,2)
P menuptr%!16=-1
Z menuptr%!20=L%
d �L%>16 L%=16
n text$=�L%," ")
x�
� �text$<=12�
�  $(menuptr%+12)=text$
� �
�'  I%=�workspace(�text$+1):$I%=text$
�8  menuptr%!12=I%:menuptr%!16=-1:menuptr%!20=�text$+1
�"  menuptr%!8=menuptr%!8 � &100
� �
��
�� �text$>maxx% maxx%=�text$
�menuptr%+=24
��
�:
�ݤpar(sep$)
	� i1%
i1%=i%+1
i%=�menu$+sep$,sep$,i1%)
"=�menu$,i1%,i%-i1%)
,:
6��shade(menuhandle%,item%)
@Cmenuhandle%!(28+8+24*item%)=menuhandle%!(28+8+24*item%)�&400000
J�
T:
^%ݤshade_status(menuhandle%,item%)
h8= -((menuhandle%!(28+8+24*item%) � &400000)=&400000)
r:
|)��set_shade(menuhandle%,item%,value%)
�G�shade_status(menuhandle%,item%)<>value% �shade(menuhandle%,item%)
��
�:
���tick(menuhandle%,item%)
�9menuhandle%!(28+24*item%)=menuhandle%!(28+24*item%)�1
��
�:
�$ݤtick_status(menuhandle%,item%)
�!= menuhandle%!(28+24*item%)�1
�:
�(��set_tick(menuhandle%,item%,value%)
�E�tick_status(menuhandle%,item%)<>value% �tick(menuhandle%,item%)
��
:
ݤworkspace(L%)
8� curws%+L%>ws%+maxws% � �fatal("No more workspace")
&curws%+=L%
0=curws%-L%
::
D��copy_files
Nș"Hourglass_On"
XDș"XOS_FSControl",26,$file2%,$file1%,%101001000000011 � r0%;reg%
b� (reg%� 1)=1 �
l8 error_flag%=1:�errorbox(�rtoz(r0%+4)):error_flag%=3
v $file1%=""
� $file2%=""
�l $prompt%="!System Update failed.  Correct the problem then drag the original !System into this window."
�
 stage%=1
� �refresh_sys_window
� �
��
�>� OSCLI"copy "+$file2%+" "+$file1%+" rnf~c~va~dl~p~q~s~t"1
�stage%=4
�$prompt%="!System updated."
��refresh_sys_window
�ș"Hourglass_Off"
��
�:

ݤupper(str$)

�rtn$, l%, c$

rtn$=""

 � l%=1 � �str$

*  c$=�str$,l%,1)

4  � c$>="a" � c$<="z" �

>     rtn$+=�(�c$�&20)

H  �

R     rtn$+=c$

\  �

f�

p	=rtn$
�
00000000  0d 00 0a 11 f4 20 3e 20  21 52 75 6e 49 6d 61 67  |..... > !RunImag|
00000010  65 0d 00 14 32 f4 20 41  75 74 68 6f 72 73 20 3a  |e...2. Authors :|
00000020  20 4e 65 69 6c 20 47 61  72 64 6e 65 72 2c 20 55  | Neil Gardner, U|
00000030  70 64 61 74 65 73 20 62  79 20 4a 61 6d 65 73 20  |pdates by James |
00000040  42 79 65 0d 00 1e 1f 76  65 72 73 69 6f 6e 24 3d  |Bye....version$=|
00000050  22 31 2e 30 32 20 28 33  31 2d 4f 63 74 2d 39 30  |"1.02 (31-Oct-90|
00000060  29 22 0d 00 28 0f f2 69  6e 69 74 69 61 6c 69 73  |)"..(..initialis|
00000070  65 0d 00 32 0e ee 20 85  20 f2 65 72 72 6f 72 0d  |e..2.. . .error.|
00000080  00 3c 05 f5 0d 00 46 1d  20 c8 99 22 57 69 6d 70  |.<....F. .."Wimp|
00000090  5f 50 6f 6c 6c 22 2c 30  2c 71 31 25 20 b8 20 72  |_Poll",0,q1% . r|
000000a0  25 0d 00 50 0c 20 c8 8e  20 72 25 20 ca 0d 00 5a  |%..P. .. r% ...Z|
000000b0  23 20 c9 20 30 20 20 20  20 3a 20 e7 73 74 61 67  |# . 0    : .stag|
000000c0  65 25 3d 33 20 f2 63 6f  70 79 5f 66 69 6c 65 73  |e%=3 .copy_files|
000000d0  0d 00 64 26 20 c9 20 32  20 20 20 20 3a 20 c8 99  |..d& . 2    : ..|
000000e0  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
000000f0  22 2c 2c 71 31 25 0d 00  6e 27 20 c9 20 33 20 20  |",,q1%..n' . 3  |
00000100  20 20 3a 20 c8 99 22 57  69 6d 70 5f 43 6c 6f 73  |  : .."Wimp_Clos|
00000110  65 57 69 6e 64 6f 77 22  2c 2c 71 31 25 0d 00 78  |eWindow",,q1%..x|
00000120  2d 20 20 20 20 20 20 20  20 20 20 20 20 20 e7 21  |-             .!|
00000130  71 31 25 3d 53 79 73 55  70 64 61 74 65 25 20 f2  |q1%=SysUpdate% .|
00000140  73 68 75 74 64 6f 77 6e  3a e0 0d 00 82 19 20 c9  |shutdown:..... .|
00000150  20 36 20 20 20 20 3a 20  f2 6d 6f 75 73 65 63 6c  | 6    : .mousecl|
00000160  69 63 6b 0d 00 8c 19 20  c9 20 37 20 20 20 20 3a  |ick.... . 7    :|
00000170  20 f2 64 65 63 6f 64 65  64 72 61 67 0d 00 96 19  | .decodedrag....|
00000180  20 c9 20 39 20 20 20 20  3a 20 f2 6d 65 6e 75 73  | . 9    : .menus|
00000190  65 6c 65 63 74 0d 00 a0  1a 20 c9 20 31 37 2c 31  |elect.... . 17,1|
000001a0  38 3a 20 f2 72 65 63 65  69 76 65 28 72 25 29 0d  |8: .receive(r%).|
000001b0  00 aa 06 20 cb 0d 00 b4  07 fd 20 a3 0d 00 be 05  |... ...... .....|
000001c0  e0 0d 00 c8 05 3a 0d 00  d2 10 dd f2 69 6e 69 74  |.....:......init|
000001d0  69 61 6c 69 73 65 0d 00  dc 11 65 72 72 6f 72 5f  |ialise....error_|
000001e0  66 6c 61 67 25 3d 33 0d  00 e6 1e de 20 77 73 25  |flag%=3..... ws%|
000001f0  20 32 30 34 38 3a 77 73  65 6e 64 25 3d 77 73 25  | 2048:wsend%=ws%|
00000200  2b 32 30 34 38 0d 00 f0  2a de 20 6d 65 6e 75 66  |+2048...*. menuf|
00000210  72 65 65 25 20 32 35 36  3a 6d 65 6e 75 65 6e 64  |ree% 256:menuend|
00000220  25 3d 6d 65 6e 75 66 72  65 65 25 2b 32 35 36 0d  |%=menufree%+256.|
00000230  00 fa 16 de 20 71 31 25  20 32 35 36 2c 20 71 32  |.... q1% 256, q2|
00000240  25 20 35 31 32 0d 01 04  30 c8 99 22 57 69 6d 70  |% 512...0.."Wimp|
00000250  5f 49 6e 69 74 69 61 6c  69 73 65 22 2c 32 30 30  |_Initialise",200|
00000260  2c 26 34 42 35 33 34 31  35 34 2c 22 53 79 73 4d  |,&4B534154,"SysM|
00000270  65 72 67 65 22 0d 01 0e  36 c8 99 22 57 69 6d 70  |erge"...6.."Wimp|
00000280  5f 4f 70 65 6e 54 65 6d  70 6c 61 74 65 22 2c 2c  |_OpenTemplate",,|
00000290  22 3c 53 79 73 55 70 64  61 74 65 24 44 69 72 3e  |"<SysUpdate$Dir>|
000002a0  2e 54 65 6d 70 6c 61 74  65 73 22 0d 01 18 3d c8  |.Templates"...=.|
000002b0  99 22 57 69 6d 70 5f 4c  6f 61 64 54 65 6d 70 6c  |."Wimp_LoadTempl|
000002c0  61 74 65 22 2c 2c 71 32  25 2c 77 73 25 2c 77 73  |ate",,q2%,ws%,ws|
000002d0  65 6e 64 25 2c 2d 31 2c  22 69 6e 66 6f 22 2c 30  |end%,-1,"info",0|
000002e0  20 b8 20 2c 2c 77 73 25  0d 01 22 1e 24 28 71 32  | . ,,ws%..".$(q2|
000002f0  25 21 28 38 38 2b 39 36  2b 32 30 29 29 3d 76 65  |%!(88+96+20))=ve|
00000300  72 73 69 6f 6e 24 0d 01  2c 26 c8 99 22 57 69 6d  |rsion$..,&.."Wim|
00000310  70 5f 43 72 65 61 74 65  57 69 6e 64 6f 77 22 2c  |p_CreateWindow",|
00000320  2c 71 32 25 20 b8 20 69  6e 66 6f 25 0d 01 36 46  |,q2% . info%..6F|
00000330  c8 99 22 57 69 6d 70 5f  4c 6f 61 64 54 65 6d 70  |.."Wimp_LoadTemp|
00000340  6c 61 74 65 22 2c 2c 71  32 25 2c 77 73 25 2c 77  |late",,q2%,ws%,w|
00000350  73 65 6e 64 25 2c 2d 31  2c 22 73 79 73 74 65 6d  |send%,-1,"system|
00000360  22 2c 30 20 b8 20 2c 2c  77 73 25 2c 2c 2c 2c 72  |",0 . ,,ws%,,,,r|
00000370  36 25 0d 01 40 19 66 69  6c 65 31 25 3d 71 32 25  |6%..@.file1%=q2%|
00000380  21 28 38 38 2b 36 34 2b  32 30 29 0d 01 4a 19 66  |!(88+64+20)..J.f|
00000390  69 6c 65 32 25 3d 71 32  25 21 28 38 38 2b 39 36  |ile2%=q2%!(88+96|
000003a0  2b 32 30 29 0d 01 54 1b  70 72 6f 6d 70 74 25 3d  |+20)..T.prompt%=|
000003b0  71 32 25 21 28 38 38 2b  31 32 38 2b 32 30 29 0d  |q2%!(88+128+20).|
000003c0  01 5e 2b c8 99 22 57 69  6d 70 5f 43 72 65 61 74  |.^+.."Wimp_Creat|
000003d0  65 57 69 6e 64 6f 77 22  2c 2c 71 32 25 20 b8 20  |eWindow",,q2% . |
000003e0  53 79 73 55 70 64 61 74  65 25 0d 01 68 1a c8 99  |SysUpdate%..h...|
000003f0  22 57 69 6d 70 5f 43 6c  6f 73 65 54 65 6d 70 6c  |"Wimp_CloseTempl|
00000400  61 74 65 22 0d 01 72 15  6d 61 69 6e 6d 65 6e 75  |ate"..r.mainmenu|
00000410  25 3d a4 63 72 6d 65 6e  75 0d 01 7c 21 20 dc 22  |%=.crmenu..|! ."|
00000420  23 53 79 73 4d 65 72 67  65 2c 49 6e 66 6f 3e 69  |#SysMerge,Info>i|
00000430  6e 66 6f 25 2c 51 75 69  74 22 0d 01 86 14 f2 69  |nfo%,Quit".....i|
00000440  6e 69 74 5f 73 79 73 5f  77 69 6e 64 6f 77 0d 01  |nit_sys_window..|
00000450  90 0e 73 61 76 65 72 65  66 25 3d 30 0d 01 9a 11  |..saveref%=0....|
00000460  65 72 72 6f 72 5f 66 6c  61 67 25 3d 33 0d 01 a4  |error_flag%=3...|
00000470  10 f2 67 65 74 6d 6f 64  65 69 6e 66 6f 0d 01 ae  |..getmodeinfo...|
00000480  49 21 71 31 25 3d 53 79  73 55 70 64 61 74 65 25  |I!q1%=SysUpdate%|
00000490  3a c8 99 22 57 69 6d 70  5f 47 65 74 57 69 6e 64  |:.."Wimp_GetWind|
000004a0  6f 77 53 74 61 74 65 22  2c 2c 71 31 25 3a c8 99  |owState",,q1%:..|
000004b0  22 57 69 6d 70 5f 4f 70  65 6e 57 69 6e 64 6f 77  |"Wimp_OpenWindow|
000004c0  22 2c 2c 71 31 25 0d 01  b8 05 e1 0d 01 c2 05 3a  |",,q1%.........:|
000004d0  0d 01 cc 15 dd f2 69 6e  69 74 5f 73 79 73 5f 77  |......init_sys_w|
000004e0  69 6e 64 6f 77 0d 01 d6  0e 24 66 69 6c 65 31 25  |indow....$file1%|
000004f0  3d 22 22 0d 01 e0 0e 24  66 69 6c 65 32 25 3d 22  |=""....$file2%="|
00000500  22 0d 01 ea 3a 24 70 72  6f 6d 70 74 25 3d 22 44  |"...:$prompt%="D|
00000510  72 61 67 20 74 68 65 20  6f 72 69 67 69 6e 61 6c  |rag the original|
00000520  20 21 53 79 73 74 65 6d  20 69 6e 74 6f 20 74 68  | !System into th|
00000530  69 73 20 77 69 6e 64 6f  77 2e 22 0d 01 f4 0c 73  |is window."....s|
00000540  74 61 67 65 25 3d 31 0d  01 fe 17 f2 72 65 66 72  |tage%=1.....refr|
00000550  65 73 68 5f 73 79 73 5f  77 69 6e 64 6f 77 0d 02  |esh_sys_window..|
00000560  08 05 e1 0d 02 12 05 3a  0d 02 1c 11 dd f2 67 65  |.......:......ge|
00000570  74 6d 6f 64 65 69 6e 66  6f 0d 02 26 0d 71 31 25  |tmodeinfo..&.q1%|
00000580  21 30 20 3d 20 34 0d 02  30 0d 71 31 25 21 34 20  |!0 = 4..0.q1%!4 |
00000590  3d 20 35 0d 02 3a 0e 71  31 25 21 38 20 3d 20 31  |= 5..:.q1%!8 = 1|
000005a0  31 0d 02 44 0e 71 31 25  21 31 32 3d 20 31 32 0d  |1..D.q1%!12= 12.|
000005b0  02 4e 0e 71 31 25 21 31  36 3d 20 2d 31 0d 02 58  |.N.q1%!16= -1..X|
000005c0  26 c8 99 22 4f 53 5f 52  65 61 64 56 64 75 56 61  |&.."OS_ReadVduVa|
000005d0  72 69 61 62 6c 65 73 22  2c 71 31 25 2c 71 31 25  |riables",q1%,q1%|
000005e0  2b 32 30 0d 02 62 13 64  78 25 3d 31 3c 3c 28 71  |+20..b.dx%=1<<(q|
000005f0  31 25 21 32 30 29 0d 02  6c 13 64 79 25 3d 31 3c  |1%!20)..l.dy%=1<|
00000600  3c 28 71 31 25 21 32 34  29 0d 02 76 19 73 63 72  |<(q1%!24)..v.scr|
00000610  78 31 25 3d 28 71 31 25  21 32 38 2b 31 29 2a 64  |x1%=(q1%!28+1)*d|
00000620  78 25 0d 02 80 19 73 63  72 79 31 25 3d 28 71 31  |x%....scry1%=(q1|
00000630  25 21 33 32 2b 31 29 2a  64 79 25 0d 02 8a 05 e1  |%!32+1)*dy%.....|
00000640  0d 02 94 05 3a 0d 02 9e  10 dd f2 6d 6f 75 73 65  |....:......mouse|
00000650  63 6c 69 63 6b 0d 02 a8  08 ea 20 70 25 0d 02 b2  |click..... p%...|
00000660  0d c8 8e 71 31 25 21 38  20 ca 0d 02 bc 3d c9 32  |...q1%!8 ....=.2|
00000670  3a 20 20 20 e7 71 31 25  21 31 32 3d 53 79 73 55  |:   .q1%!12=SysU|
00000680  70 64 61 74 65 25 20 f2  64 6f 6d 65 6e 75 28 6d  |pdate% .domenu(m|
00000690  61 69 6e 6d 65 6e 75 25  2c 21 71 31 25 2d 36 34  |ainmenu%,!q1%-64|
000006a0  2c 71 31 25 21 34 29 0d  02 c6 05 cb 0d 02 d0 05  |,q1%!4).........|
000006b0  e1 0d 02 da 05 3a 0d 02  e4 10 dd f2 64 65 63 6f  |.....:......deco|
000006c0  64 65 64 72 61 67 0d 02  ee 20 ea 20 66 31 25 2c  |dedrag... . f1%,|
000006d0  66 32 25 2c 68 25 2c 69  25 2c 6d 78 25 2c 6d 79  |f2%,h%,i%,mx%,my|
000006e0  25 2c 65 78 74 25 0d 02  f8 34 66 31 25 3d 8e 28  |%,ext%...4f1%=.(|
000006f0  22 3c 53 79 73 55 70 64  61 74 65 24 44 69 72 3e  |"<SysUpdate$Dir>|
00000700  2e 4f 75 74 70 75 74 22  29 3a 65 78 74 25 3d a2  |.Output"):ext%=.|
00000710  23 66 31 25 3a d9 23 66  31 25 0d 03 02 11 66 31  |#f1%:.#f1%....f1|
00000720  25 3d 66 69 6c 65 6e 61  6d 65 25 0d 03 0c 05 f5  |%=filename%.....|
00000730  0d 03 16 0c 20 66 32 25  3d 66 31 25 0d 03 20 14  |.... f2%=f1%.. .|
00000740  20 66 31 25 2b 3d a7 24  66 31 25 2c 22 2e 22 29  | f1%+=.$f1%,".")|
00000750  0d 03 2a 0d fd 20 66 31  25 3d 66 32 25 0d 03 34  |..*.. f1%=f2%..4|
00000760  20 c8 99 22 57 69 6d 70  5f 47 65 74 50 6f 69 6e  | .."Wimp_GetPoin|
00000770  74 65 72 49 6e 66 6f 22  2c 2c 71 31 25 0d 03 3e  |terInfo",,q1%..>|
00000780  0c 6d 78 25 3d 21 71 31  25 0d 03 48 0d 6d 79 25  |.mx%=!q1%..H.my%|
00000790  3d 71 31 25 21 34 0d 03  52 0d 68 25 3d 71 31 25  |=q1%!4..R.h%=q1%|
000007a0  21 31 32 0d 03 5c 0d 69  25 3d 71 31 25 21 31 36  |!12..\.i%=q1%!16|
000007b0  0d 03 66 16 21 71 31 25  3d 28 34 38 2b a9 24 66  |..f.!q1%=(48+.$f|
000007c0  31 25 29 80 ac 33 0d 03  70 0c 71 31 25 21 31 32  |1%)..3..p.q1%!12|
000007d0  3d 30 0d 03 7a 0c 71 31  25 21 31 36 3d 31 0d 03  |=0..z.q1%!16=1..|
000007e0  84 0d 71 31 25 21 32 30  3d 68 25 0d 03 8e 0d 71  |..q1%!20=h%....q|
000007f0  31 25 21 32 34 3d 69 25  0d 03 98 0e 71 31 25 21  |1%!24=i%....q1%!|
00000800  32 38 3d 6d 78 25 0d 03  a2 0e 71 31 25 21 33 32  |28=mx%....q1%!32|
00000810  3d 6d 79 25 0d 03 ac 0f  71 31 25 21 33 36 3d 65  |=my%....q1%!36=e|
00000820  78 74 25 0d 03 b6 0f 71  31 25 21 34 30 3d 26 46  |xt%....q1%!40=&F|
00000830  46 46 0d 03 c0 12 24 28  71 31 25 2b 34 34 29 3d  |FF....$(q1%+44)=|
00000840  24 66 31 25 0d 03 ca 1a  3f 28 71 31 25 2b 34 34  |$f1%....?(q1%+44|
00000850  2b a9 24 28 71 31 25 2b  34 34 29 29 3d 30 0d 03  |+.$(q1%+44))=0..|
00000860  d4 25 c8 99 22 57 69 6d  70 5f 53 65 6e 64 4d 65  |.%.."Wimp_SendMe|
00000870  73 73 61 67 65 22 2c 31  37 2c 71 31 25 2c 68 25  |ssage",17,q1%,h%|
00000880  2c 69 25 0d 03 de 12 73  61 76 65 72 65 66 25 3d  |,i%....saveref%=|
00000890  71 31 25 21 38 0d 03 e8  05 e1 0d 03 f2 05 3a 0d  |q1%!8.........:.|
000008a0  03 fc 16 dd f2 64 6f 6d  65 6e 75 28 68 25 2c 78  |.....domenu(h%,x|
000008b0  25 2c 79 25 29 0d 04 06  24 6d 65 6e 75 64 61 74  |%,y%)...$menudat|
000008c0  61 25 3d 68 25 3a 6d 65  6e 75 78 25 3d 78 25 3a  |a%=h%:menux%=x%:|
000008d0  6d 65 6e 75 79 25 3d 79  25 0d 04 10 21 c8 99 22  |menuy%=y%...!.."|
000008e0  57 69 6d 70 5f 43 72 65  61 74 65 4d 65 6e 75 22  |Wimp_CreateMenu"|
000008f0  2c 2c 68 25 2c 78 25 2c  79 25 0d 04 1a 05 e1 0d  |,,h%,x%,y%......|
00000900  04 24 05 3a 0d 04 2e 10  dd f2 6d 65 6e 75 73 65  |.$.:......menuse|
00000910  6c 65 63 74 0d 04 38 0b  ea 20 61 24 2c 69 25 0d  |lect..8.. a$,i%.|
00000920  04 42 38 c8 99 22 57 69  6d 70 5f 44 65 63 6f 64  |.B8.."Wimp_Decod|
00000930  65 4d 65 6e 75 22 2c 2c  6d 65 6e 75 64 61 74 61  |eMenu",,menudata|
00000940  25 2c 71 31 25 2c c4 32  30 30 2c 22 20 22 29 20  |%,q1%,.200," ") |
00000950  b8 20 2c 2c 2c 61 24 0d  04 4c 0c e7 61 24 3d 22  |. ,,,a$..L..a$="|
00000960  22 20 e1 0d 04 56 1a e7  61 24 3d 22 51 75 69 74  |" ...V..a$="Quit|
00000970  22 20 f2 73 68 75 74 64  6f 77 6e 3a e0 0d 04 60  |" .shutdown:...`|
00000980  05 e1 0d 04 6a 05 3a 0d  04 74 0e dd a4 72 74 6f  |....j.:..t...rto|
00000990  7a 28 70 25 29 0d 04 7e  08 ea 20 71 24 0d 04 88  |z(p%)..~.. q$...|
000009a0  1e c8 95 20 3f 70 25 3c  3e 30 20 71 24 2b 3d bd  |... ?p%<>0 q$+=.|
000009b0  3f 70 25 3a 70 25 2b 3d  31 3a ce 0d 04 92 07 3d  |?p%:p%+=1:.....=|
000009c0  71 24 0d 04 9c 05 3a 0d  04 a6 11 dd f2 72 65 63  |q$....:......rec|
000009d0  65 69 76 65 28 72 25 29  0d 04 b0 11 ea 20 6e 61  |eive(r%)..... na|
000009e0  6d 65 24 2c 69 25 2c 78  25 0d 04 ba 0f c8 8e 20  |me$,i%,x%...... |
000009f0  71 31 25 21 31 36 20 ca  0d 04 c4 13 c9 30 3a 20  |q1%!16 ......0: |
00000a00  f2 73 68 75 74 64 6f 77  6e 3a e0 0d 04 ce 39 c9  |.shutdown:....9.|
00000a10  31 3a 20 f4 20 66 69 6c  65 20 64 72 6f 70 70 65  |1: . file droppe|
00000a20  64 20 66 72 6f 6d 20 61  70 70 6c 69 63 61 74 69  |d from applicati|
00000a30  6f 6e 20 2d 20 72 65 74  75 72 6e 20 66 69 6c 65  |on - return file|
00000a40  6e 61 6d 65 0d 04 d8 33  20 20 20 20 20 20 20 f2  |name...3       .|
00000a50  6f 6b 28 22 41 70 70 6c  69 63 61 74 69 6f 6e 20  |ok("Application |
00000a60  64 61 74 61 20 63 61 6e  6e 6f 74 20 62 65 20 6d  |data cannot be m|
00000a70  65 72 67 65 64 22 29 0d  04 e2 0c 20 20 20 20 20  |erged")....     |
00000a80  20 20 e1 0d 04 ec 33 c9  33 3a 20 f4 20 66 69 6c  |  ....3.3: . fil|
00000a90  65 20 64 72 6f 70 70 65  64 20 66 72 6f 6d 20 46  |e dropped from F|
00000aa0  69 6c 65 72 20 2d 20 69  64 65 6e 74 69 66 79 20  |iler - identify |
00000ab0  6f 62 6a 65 63 74 0d 04  f6 11 20 20 c8 8e 20 73  |object....  .. s|
00000ac0  74 61 67 65 25 20 ca 0d  05 00 15 20 20 c9 31 3a  |tage% .....  .1:|
00000ad0  20 f2 63 68 65 63 6b 5f  74 79 70 65 0d 05 0a 22  | .check_type..."|
00000ae0  20 20 20 20 20 20 20 20  20 24 66 69 6c 65 31 25  |         $file1%|
00000af0  3d a4 72 74 6f 7a 28 71  31 25 2b 34 34 29 0d 05  |=.rtoz(q1%+44)..|
00000b00  14 3d 20 20 20 20 20 20  20 20 20 24 70 72 6f 6d  |.=         $prom|
00000b10  70 74 25 3d 22 44 72 61  67 20 74 68 65 20 6e 65  |pt%="Drag the ne|
00000b20  77 20 21 53 79 73 74 65  6d 20 69 6e 74 6f 20 74  |w !System into t|
00000b30  68 69 73 20 77 69 6e 64  6f 77 22 0d 05 1e 20 20  |his window"...  |
00000b40  20 20 20 20 20 20 20 20  f2 72 65 66 72 65 73 68  |        .refresh|
00000b50  5f 73 79 73 5f 77 69 6e  64 6f 77 0d 05 28 15 20  |_sys_window..(. |
00000b60  20 20 20 20 20 20 20 20  73 74 61 67 65 25 3d 32  |        stage%=2|
00000b70  0d 05 32 15 20 20 c9 32  3a 20 f2 63 68 65 63 6b  |..2.  .2: .check|
00000b80  5f 74 79 70 65 0d 05 3c  22 20 20 20 20 20 20 20  |_type..<"       |
00000b90  20 20 24 66 69 6c 65 32  25 3d a4 72 74 6f 7a 28  |  $file2%=.rtoz(|
00000ba0  71 31 25 2b 34 34 29 0d  05 46 1f 20 20 20 20 20  |q1%+44)..F.     |
00000bb0  20 20 20 20 e7 24 66 69  6c 65 31 25 3d 24 66 69  |    .$file1%=$fi|
00000bc0  6c 65 32 25 20 8c 0d 05  50 1e 20 20 20 20 20 20  |le2% ...P.      |
00000bd0  20 20 20 20 f2 69 6e 69  74 5f 73 79 73 5f 77 69  |    .init_sys_wi|
00000be0  6e 64 6f 77 0d 05 5a 2c  20 20 20 20 20 20 20 20  |ndow..Z,        |
00000bf0  20 20 f2 6f 6b 28 22 54  68 65 20 66 69 6c 65 73  |  .ok("The files|
00000c00  20 61 72 65 20 69 64 65  6e 74 69 63 61 6c 22 29  | are identical")|
00000c10  0d 05 64 0e 20 20 20 20  20 20 20 20 20 cd 0d 05  |..d.         ...|
00000c20  6e 38 20 20 20 20 20 20  20 20 20 24 70 72 6f 6d  |n8         $prom|
00000c30  70 74 25 3d 22 50 6c 65  61 73 65 20 77 61 69 74  |pt%="Please wait|
00000c40  20 2e 2e 2e 20 70 72 6f  63 65 73 73 69 6e 67 20  | ... processing |
00000c50  66 69 6c 65 73 22 0d 05  78 20 20 20 20 20 20 20  |files"..x       |
00000c60  20 20 20 f2 72 65 66 72  65 73 68 5f 73 79 73 5f  |   .refresh_sys_|
00000c70  77 69 6e 64 6f 77 0d 05  82 15 20 20 20 20 20 20  |window....      |
00000c80  20 20 20 73 74 61 67 65  25 3d 33 0d 05 8c 07 20  |   stage%=3.... |
00000c90  20 cb 0d 05 96 1c c9 26  35 30 32 3a 20 f2 69 6e  | ......&502: .in|
00000ca0  74 65 72 61 63 74 69 76  65 5f 68 65 6c 70 0d 05  |teractive_help..|
00000cb0  a0 19 c9 26 34 30 30 43  31 3a 20 f2 67 65 74 6d  |...&400C1: .getm|
00000cc0  6f 64 65 69 6e 66 6f 0d  05 aa 05 cb 0d 05 b4 05  |odeinfo.........|
00000cd0  e1 0d 05 be 05 3a 0d 05  c8 16 dd f2 69 6e 74 65  |.....:......inte|
00000ce0  72 61 63 74 69 76 65 5f  68 65 6c 70 0d 05 d2 08  |ractive_help....|
00000cf0  ea 20 74 24 0d 05 dc 0f  c8 8e 20 71 31 25 21 33  |. t$...... q1%!3|
00000d00  32 20 ca 0d 05 e6 34 c9  53 79 73 55 70 64 61 74  |2 ....4.SysUpdat|
00000d10  65 25 3a 20 74 24 3d 22  54 68 69 73 20 69 73 20  |e%: t$="This is |
00000d20  74 68 65 20 53 79 73 4d  65 72 67 65 20 77 69 6e  |the SysMerge win|
00000d30  64 6f 77 2e 7c 4d 22 0d  05 f0 10 20 c8 8e 20 73  |dow.|M".... .. s|
00000d40  74 61 67 65 25 20 ca 0d  05 fa 2f 20 c9 31 3a 20  |tage% ..../ .1: |
00000d50  74 24 2b 3d 22 44 72 6f  70 20 74 68 65 20 6f 72  |t$+="Drop the or|
00000d60  69 67 69 6e 61 6c 20 21  53 79 73 74 65 6d 20 6f  |iginal !System o|
00000d70  6e 20 69 74 2e 22 0d 06  04 2a 20 c9 32 3a 20 74  |n it."...* .2: t|
00000d80  24 2b 3d 22 44 72 6f 70  20 74 68 65 20 6e 65 77  |$+="Drop the new|
00000d90  20 21 53 79 73 74 65 6d  20 6f 6e 20 69 74 2e 22  | !System on it."|
00000da0  0d 06 0e 52 20 c9 34 3a  20 74 24 2b 3d 22 21 53  |...R .4: t$+="!S|
00000db0  79 73 74 65 6d 20 75 70  64 61 74 65 20 77 61 73  |ystem update was|
00000dc0  20 73 75 63 63 65 73 73  66 75 6c 2e 7c 4d 43 6c  | successful.|MCl|
00000dd0  69 63 6b 20 53 45 4c 45  43 54 20 6f 6e 20 63 6c  |ick SELECT on cl|
00000de0  6f 73 65 20 69 63 6f 6e  20 74 6f 20 71 75 69 74  |ose icon to quit|
00000df0  2e 22 0d 06 18 06 20 cb  0d 06 22 05 cb 0d 06 2c  |.".... ..."....,|
00000e00  0d e7 74 24 3c 3e 22 22  20 8c 0d 06 36 11 20 71  |..t$<>"" ...6. q|
00000e10  31 25 21 31 32 3d 71 31  25 21 38 0d 06 40 10 20  |1%!12=q1%!8..@. |
00000e20  71 31 25 21 31 36 3d 26  35 30 33 0d 06 4a 14 20  |q1%!16=&503..J. |
00000e30  24 28 71 31 25 2b 32 30  29 3d 74 24 2b bd 30 0d  |$(q1%+20)=t$+.0.|
00000e40  06 54 15 20 21 71 31 25  3d 28 32 35 2b a9 74 24  |.T. !q1%=(25+.t$|
00000e50  29 80 ac 33 0d 06 5e 26  20 c8 99 22 57 69 6d 70  |)..3..^& .."Wimp|
00000e60  5f 53 65 6e 64 4d 65 73  73 61 67 65 22 2c 31 37  |_SendMessage",17|
00000e70  2c 71 31 25 2c 71 31 25  21 34 0d 06 68 05 cd 0d  |,q1%,q1%!4..h...|
00000e80  06 72 05 e1 0d 06 7c 05  3a 0d 06 86 10 dd f2 63  |.r....|.:......c|
00000e90  68 65 63 6b 5f 74 79 70  65 0d 06 90 6b e7 71 31  |heck_type...k.q1|
00000ea0  25 21 34 30 3c 3e 26 32  30 30 30 20 84 20 c2 a4  |%!40<>&2000 . ..|
00000eb0  75 70 70 65 72 28 a4 72  74 6f 7a 28 71 31 25 2b  |upper(.rtoz(q1%+|
00000ec0  34 34 29 29 2c 38 29 3c  3e 22 2e 21 53 59 53 54  |44)),8)<>".!SYST|
00000ed0  45 4d 22 20 8c 20 f2 6f  6b 28 22 54 68 69 73 20  |EM" . .ok("This |
00000ee0  69 73 20 6e 6f 74 20 61  20 73 79 73 74 65 6d 20  |is not a system |
00000ef0  72 65 73 6f 75 72 63 65  20 64 69 72 65 63 74 6f  |resource directo|
00000f00  72 79 22 29 0d 06 9a 05  e1 0d 06 a4 05 3a 0d 06  |ry").........:..|
00000f10  ae 18 dd f2 72 65 66 72  65 73 68 5f 73 79 73 5f  |....refresh_sys_|
00000f20  77 69 6e 64 6f 77 0d 06  b8 47 21 71 32 25 3d 53  |window...G!q2%=S|
00000f30  79 73 55 70 64 61 74 65  25 3a 71 32 25 21 34 3d  |ysUpdate%:q2%!4=|
00000f40  32 3a 71 32 25 21 38 3d  30 3a 71 32 25 21 31 32  |2:q2%!8=0:q2%!12|
00000f50  3d 30 3a c8 99 22 57 69  6d 70 5f 53 65 74 49 63  |=0:.."Wimp_SetIc|
00000f60  6f 6e 53 74 61 74 65 22  2c 2c 71 32 25 0d 06 c2  |onState",,q2%...|
00000f70  47 21 71 32 25 3d 53 79  73 55 70 64 61 74 65 25  |G!q2%=SysUpdate%|
00000f80  3a 71 32 25 21 34 3d 33  3a 71 32 25 21 38 3d 30  |:q2%!4=3:q2%!8=0|
00000f90  3a 71 32 25 21 31 32 3d  30 3a c8 99 22 57 69 6d  |:q2%!12=0:.."Wim|
00000fa0  70 5f 53 65 74 49 63 6f  6e 53 74 61 74 65 22 2c  |p_SetIconState",|
00000fb0  2c 71 32 25 0d 06 cc 47  21 71 32 25 3d 53 79 73  |,q2%...G!q2%=Sys|
00000fc0  55 70 64 61 74 65 25 3a  71 32 25 21 34 3d 34 3a  |Update%:q2%!4=4:|
00000fd0  71 32 25 21 38 3d 30 3a  71 32 25 21 31 32 3d 30  |q2%!8=0:q2%!12=0|
00000fe0  3a c8 99 22 57 69 6d 70  5f 53 65 74 49 63 6f 6e  |:.."Wimp_SetIcon|
00000ff0  53 74 61 74 65 22 2c 2c  71 32 25 0d 06 d6 05 e1  |State",,q2%.....|
00001000  0d 06 e0 05 3a 0d 06 ea  0e dd f2 73 68 75 74 64  |....:......shutd|
00001010  6f 77 6e 0d 06 f4 16 c8  99 22 57 69 6d 70 5f 43  |own......"Wimp_C|
00001020  6c 6f 73 65 44 6f 77 6e  22 0d 06 fe 05 e1 0d 07  |loseDown".......|
00001030  08 05 3a 0d 07 12 0b dd  f2 65 72 72 6f 72 0d 07  |..:......error..|
00001040  1c 14 e7 65 72 72 6f 72  5f 66 6c 61 67 25 3d 33  |...error_flag%=3|
00001050  20 8c 0d 07 26 37 20 f2  65 72 72 6f 72 62 6f 78  | ...&7 .errorbox|
00001060  28 22 55 6e 65 78 70 65  63 74 65 64 20 65 72 72  |("Unexpected err|
00001070  6f 72 20 3a 2d 20 22 2b  f6 24 2b 22 20 28 22 2b  |or :- "+.$+" ("+|
00001080  c3 28 9e 29 2b 22 29 22  29 0d 07 30 05 cc 0d 07  |.(.)+")")..0....|
00001090  3a 12 20 f2 65 72 72 6f  72 62 6f 78 28 f6 24 29  |:. .errorbox(.$)|
000010a0  0d 07 44 05 cd 0d 07 4e  11 65 72 72 6f 72 5f 66  |..D....N.error_f|
000010b0  6c 61 67 25 3d 33 0d 07  58 05 e1 0d 07 62 05 3a  |lag%=3..X....b.:|
000010c0  0d 07 6c 0c dd f2 6f 6b  28 65 24 29 0d 07 76 11  |..l...ok(e$)..v.|
000010d0  65 72 72 6f 72 5f 66 6c  61 67 25 3d 31 0d 07 80  |error_flag%=1...|
000010e0  0a 85 20 31 2c 65 24 0d  07 8a 05 e1 0d 07 94 05  |.. 1,e$.........|
000010f0  3a 0d 07 9e 0f dd f2 66  61 74 61 6c 28 65 24 29  |:......fatal(e$)|
00001100  0d 07 a8 11 65 72 72 6f  72 5f 66 6c 61 67 25 3d  |....error_flag%=|
00001110  32 0d 07 b2 0a 85 20 31  2c 65 24 0d 07 bc 05 e1  |2..... 1,e$.....|
00001120  0d 07 c6 05 3a 0d 07 d0  12 dd f2 65 72 72 6f 72  |....:......error|
00001130  62 6f 78 28 72 24 29 0d  07 da 08 ea 20 72 25 0d  |box(r$)..... r%.|
00001140  07 e4 19 21 71 31 25 3d  9f 3a 24 28 71 31 25 2b  |...!q1%=.:$(q1%+|
00001150  34 29 3d 72 24 2b bd 30  0d 07 ee 41 c8 99 22 57  |4)=r$+.0...A.."W|
00001160  69 6d 70 5f 52 65 70 6f  72 74 45 72 72 6f 72 22  |imp_ReportError"|
00001170  2c 71 31 25 2c 65 72 72  6f 72 5f 66 6c 61 67 25  |,q1%,error_flag%|
00001180  2c 22 53 79 73 4d 65 72  67 65 20 75 74 69 6c 69  |,"SysMerge utili|
00001190  74 79 22 20 b8 20 2c 72  25 0d 07 f8 1e e7 72 25  |ty" . ,r%.....r%|
000011a0  3d 32 20 c8 99 22 57 69  6d 70 5f 43 6c 6f 73 65  |=2 .."Wimp_Close|
000011b0  44 6f 77 6e 22 3a e0 0d  08 02 05 e1 0d 08 0c 05  |Down":..........|
000011c0  3a 0d 08 16 0c dd a4 63  72 6d 65 6e 75 0d 08 20  |:......crmenu.. |
000011d0  11 ea 20 6d 25 2c 6d 65  6e 75 24 2c 6d 24 0d 08  |.. m%,menu$,m$..|
000011e0  2a 36 e7 20 28 6d 65 6e  75 66 72 65 65 25 2b 32  |*6. (menufree%+2|
000011f0  38 3e 6d 65 6e 75 65 6e  64 25 29 20 f2 66 61 74  |8>menuend%) .fat|
00001200  61 6c 28 22 4d 65 6e 75  20 61 72 65 61 20 66 75  |al("Menu area fu|
00001210  6c 6c 22 29 0d 08 34 0b  f3 20 6d 65 6e 75 24 0d  |ll")..4.. menu$.|
00001220  08 3e 15 c8 95 20 c2 6d  65 6e 75 24 2c 32 29 3d  |.>... .menu$,2)=|
00001230  22 2b 2b 22 0d 08 48 09  20 f3 20 6d 24 0d 08 52  |"++"..H. . m$..R|
00001240  1e 20 6d 65 6e 75 24 3d  c0 6d 65 6e 75 24 2c a9  |. menu$=.menu$,.|
00001250  6d 65 6e 75 24 2d 32 29  2b 6d 24 0d 08 5c 05 ce  |menu$-2)+m$..\..|
00001260  0d 08 66 16 6d 65 6e 75  70 74 72 25 3d 6d 65 6e  |..f.menuptr%=men|
00001270  75 66 72 65 65 25 0d 08  70 08 69 25 3d 30 0d 08  |ufree%..p.i%=0..|
00001280  7a 3d e7 20 c0 6d 65 6e  75 24 2c 31 29 3d 22 23  |z=. .menu$,1)="#|
00001290  22 20 69 25 3d 31 3a 6d  65 6e 75 74 69 74 6c 65  |" i%=1:menutitle|
000012a0  24 3d a4 70 61 72 28 22  2c 22 29 20 8b 20 6d 65  |$=.par(",") . me|
000012b0  6e 75 74 69 74 6c 65 24  3d 22 22 0d 08 84 18 24  |nutitle$=""....$|
000012c0  6d 65 6e 75 70 74 72 25  3d 6d 65 6e 75 74 69 74  |menuptr%=menutit|
000012d0  6c 65 24 0d 08 8e 11 6d  65 6e 75 70 74 72 25 3f  |le$....menuptr%?|
000012e0  31 32 3d 37 0d 08 98 11  6d 65 6e 75 70 74 72 25  |12=7....menuptr%|
000012f0  3f 31 33 3d 32 0d 08 a2  11 6d 65 6e 75 70 74 72  |?13=2....menuptr|
00001300  25 3f 31 34 3d 37 0d 08  ac 11 6d 65 6e 75 70 74  |%?14=7....menupt|
00001310  72 25 3f 31 35 3d 31 0d  08 b6 13 6d 65 6e 75 70  |r%?15=1....menup|
00001320  74 72 25 21 31 36 3d 31  39 36 0d 08 c0 12 6d 65  |tr%!16=196....me|
00001330  6e 75 70 74 72 25 21 32  30 3d 34 34 0d 08 ca 11  |nuptr%!20=44....|
00001340  6d 65 6e 75 70 74 72 25  21 32 34 3d 30 0d 08 d4  |menuptr%!24=0...|
00001350  10 6d 65 6e 75 70 74 72  25 2b 3d 32 38 0d 08 de  |.menuptr%+=28...|
00001360  17 6d 61 78 78 25 3d a9  6d 65 6e 75 74 69 74 6c  |.maxx%=.menutitl|
00001370  65 24 2d 33 0d 08 e8 05  f5 0d 08 f2 14 20 69 74  |e$-3......... it|
00001380  65 6d 24 3d a4 70 61 72  28 22 2c 22 29 0d 08 fc  |em$=.par(",")...|
00001390  15 20 f2 6d 65 6e 75 69  74 65 6d 28 69 74 65 6d  |. .menuitem(item|
000013a0  24 29 0d 09 06 0e fd 20  69 74 65 6d 24 3d 22 22  |$)..... item$=""|
000013b0  0d 09 10 10 6d 25 3d 6d  65 6e 75 66 72 65 65 25  |....m%=menufree%|
000013c0  0d 09 1a 17 6d 25 21 31  36 3d 28 6d 61 78 78 25  |....m%!16=(maxx%|
000013d0  2a 38 2b 36 29 2a 32 0d  09 24 16 6d 65 6e 75 66  |*8+6)*2..$.menuf|
000013e0  72 65 65 25 3d 6d 65 6e  75 70 74 72 25 0d 09 2e  |ree%=menuptr%...|
000013f0  07 3d 6d 25 0d 09 38 05  3a 0d 09 42 15 dd f2 6d  |.=m%..8.:..B...m|
00001400  65 6e 75 69 74 65 6d 28  74 65 78 74 24 29 0d 09  |enuitem(text$)..|
00001410  4c 18 ea 20 69 25 2c 66  6c 67 25 2c 73 75 62 70  |L.. i%,flg%,subp|
00001420  74 72 25 2c 4c 25 0d 09  56 30 e7 20 74 65 78 74  |tr%,L%..V0. text|
00001430  24 3d 22 22 20 6d 65 6e  75 70 74 72 25 21 2d 32  |$="" menuptr%!-2|
00001440  34 3d 28 6d 65 6e 75 70  74 72 25 21 2d 32 34 29  |4=(menuptr%!-24)|
00001450  84 26 38 30 3a e1 0d 09  60 35 e7 20 28 6d 65 6e  |.&80:...`5. (men|
00001460  75 70 74 72 25 2b 32 34  3e 6d 65 6e 75 65 6e 64  |uptr%+24>menuend|
00001470  25 29 20 f2 66 61 74 61  6c 28 22 4d 65 6e 75 20  |%) .fatal("Menu |
00001480  61 72 65 61 20 66 75 6c  6c 22 29 0d 09 6a 0c 66  |area full")..j.f|
00001490  6c 67 25 3d 26 30 30 0d  09 74 12 69 25 3d a7 74  |lg%=&00..t.i%=.t|
000014a0  65 78 74 24 2c 22 3e 22  29 0d 09 7e 0c e7 20 69  |ext$,">")..~.. i|
000014b0  25 3e 30 20 8c 0d 09 88  1a 20 73 75 62 70 74 72  |%>0 ..... subptr|
000014c0  25 3d a0 c1 74 65 78 74  24 2c 69 25 2b 31 29 0d  |%=..text$,i%+1).|
000014d0  09 92 17 20 74 65 78 74  24 3d c0 74 65 78 74 24  |... text$=.text$|
000014e0  2c 69 25 2d 31 29 0d 09  9c 05 cc 0d 09 a6 0f 20  |,i%-1)......... |
000014f0  73 75 62 70 74 72 25 3d  2d 31 0d 09 b0 05 cd 0d  |subptr%=-1......|
00001500  09 ba 34 e7 20 c2 74 65  78 74 24 2c 31 29 3d 22  |..4. .text$,1)="|
00001510  23 22 20 74 65 78 74 24  3d c0 74 65 78 74 24 2c  |#" text$=.text$,|
00001520  a9 74 65 78 74 24 2d 31  29 3a 66 6c 67 25 2b 3d  |.text$-1):flg%+=|
00001530  26 30 32 0d 09 c4 13 6d  65 6e 75 70 74 72 25 21  |&02....menuptr%!|
00001540  30 3d 66 6c 67 25 0d 09  ce 16 6d 65 6e 75 70 74  |0=flg%....menupt|
00001550  72 25 21 34 3d 73 75 62  70 74 72 25 0d 09 d8 18  |r%!4=subptr%....|
00001560  6d 65 6e 75 70 74 72 25  21 38 3d 26 30 37 30 30  |menuptr%!8=&0700|
00001570  30 30 32 31 0d 09 e2 15  e7 20 c0 74 65 78 74 24  |0021..... .text$|
00001580  2c 31 29 3d 22 24 22 20  8c 0d 09 ec 13 20 21 6d  |,1)="$" ..... !m|
00001590  65 6e 75 70 74 72 25 2b  3d 26 30 34 0d 09 f6 15  |enuptr%+=&04....|
000015a0  20 6d 65 6e 75 70 74 72  25 21 38 2b 3d 26 31 30  | menuptr%!8+=&10|
000015b0  30 0d 0a 00 13 20 69 25  3d a7 74 65 78 74 24 2c  |0.... i%=.text$,|
000015c0  22 28 22 29 0d 0a 0a 0d  20 e7 20 69 25 3e 30 20  |"(").... . i%>0 |
000015d0  8c 0d 0a 14 16 20 20 4c  25 3d bb c1 74 65 78 74  |.....  L%=..text|
000015e0  24 2c 69 25 2b 31 29 0d  0a 1e 18 20 20 74 65 78  |$,i%+1)....  tex|
000015f0  74 24 3d c0 74 65 78 74  24 2c 69 25 2d 31 29 0d  |t$=.text$,i%-1).|
00001600  0a 28 06 20 cc 0d 0a 32  0b 20 20 4c 25 3d 31 32  |.(. ...2.  L%=12|
00001610  0d 0a 3c 06 20 cd 0d 0a  46 1b 20 6d 65 6e 75 70  |..<. ...F. menup|
00001620  74 72 25 21 31 32 3d a0  c1 74 65 78 74 24 2c 32  |tr%!12=..text$,2|
00001630  29 0d 0a 50 13 20 6d 65  6e 75 70 74 72 25 21 31  |)..P. menuptr%!1|
00001640  36 3d 2d 31 0d 0a 5a 13  20 6d 65 6e 75 70 74 72  |6=-1..Z. menuptr|
00001650  25 21 32 30 3d 4c 25 0d  0a 64 11 20 e7 4c 25 3e  |%!20=L%..d. .L%>|
00001660  31 36 20 4c 25 3d 31 36  0d 0a 6e 13 20 74 65 78  |16 L%=16..n. tex|
00001670  74 24 3d c4 4c 25 2c 22  20 22 29 0d 0a 78 05 cc  |t$=.L%," ")..x..|
00001680  0d 0a 82 11 20 e7 a9 74  65 78 74 24 3c 3d 31 32  |.... ..text$<=12|
00001690  8c 0d 0a 8c 1a 20 20 24  28 6d 65 6e 75 70 74 72  |.....  $(menuptr|
000016a0  25 2b 31 32 29 3d 74 65  78 74 24 0d 0a 96 06 20  |%+12)=text$.... |
000016b0  cc 0d 0a a0 27 20 20 49  25 3d a4 77 6f 72 6b 73  |....'  I%=.works|
000016c0  70 61 63 65 28 a9 74 65  78 74 24 2b 31 29 3a 24  |pace(.text$+1):$|
000016d0  49 25 3d 74 65 78 74 24  0d 0a aa 38 20 20 6d 65  |I%=text$...8  me|
000016e0  6e 75 70 74 72 25 21 31  32 3d 49 25 3a 6d 65 6e  |nuptr%!12=I%:men|
000016f0  75 70 74 72 25 21 31 36  3d 2d 31 3a 6d 65 6e 75  |uptr%!16=-1:menu|
00001700  70 74 72 25 21 32 30 3d  a9 74 65 78 74 24 2b 31  |ptr%!20=.text$+1|
00001710  0d 0a b4 22 20 20 6d 65  6e 75 70 74 72 25 21 38  |..."  menuptr%!8|
00001720  3d 6d 65 6e 75 70 74 72  25 21 38 20 84 20 26 31  |=menuptr%!8 . &1|
00001730  30 30 0d 0a be 06 20 cd  0d 0a c8 05 cd 0d 0a d2  |00.... .........|
00001740  1f e7 20 a9 74 65 78 74  24 3e 6d 61 78 78 25 20  |.. .text$>maxx% |
00001750  6d 61 78 78 25 3d a9 74  65 78 74 24 0d 0a dc 10  |maxx%=.text$....|
00001760  6d 65 6e 75 70 74 72 25  2b 3d 32 34 0d 0a e6 05  |menuptr%+=24....|
00001770  e1 0d 0a f0 05 3a 0d 0a  fa 0f dd a4 70 61 72 28  |.....:......par(|
00001780  73 65 70 24 29 0d 0b 04  09 ea 20 69 31 25 0d 0b  |sep$)..... i1%..|
00001790  0e 0c 69 31 25 3d 69 25  2b 31 0d 0b 18 1c 69 25  |..i1%=i%+1....i%|
000017a0  3d a7 6d 65 6e 75 24 2b  73 65 70 24 2c 73 65 70  |=.menu$+sep$,sep|
000017b0  24 2c 69 31 25 29 0d 0b  22 17 3d c1 6d 65 6e 75  |$,i1%)..".=.menu|
000017c0  24 2c 69 31 25 2c 69 25  2d 69 31 25 29 0d 0b 2c  |$,i1%,i%-i1%)..,|
000017d0  05 3a 0d 0b 36 1e dd f2  73 68 61 64 65 28 6d 65  |.:..6...shade(me|
000017e0  6e 75 68 61 6e 64 6c 65  25 2c 69 74 65 6d 25 29  |nuhandle%,item%)|
000017f0  0d 0b 40 43 6d 65 6e 75  68 61 6e 64 6c 65 25 21  |..@Cmenuhandle%!|
00001800  28 32 38 2b 38 2b 32 34  2a 69 74 65 6d 25 29 3d  |(28+8+24*item%)=|
00001810  6d 65 6e 75 68 61 6e 64  6c 65 25 21 28 32 38 2b  |menuhandle%!(28+|
00001820  38 2b 32 34 2a 69 74 65  6d 25 29 82 26 34 30 30  |8+24*item%).&400|
00001830  30 30 30 0d 0b 4a 05 e1  0d 0b 54 05 3a 0d 0b 5e  |000..J....T.:..^|
00001840  25 dd a4 73 68 61 64 65  5f 73 74 61 74 75 73 28  |%..shade_status(|
00001850  6d 65 6e 75 68 61 6e 64  6c 65 25 2c 69 74 65 6d  |menuhandle%,item|
00001860  25 29 0d 0b 68 38 3d 20  2d 28 28 6d 65 6e 75 68  |%)..h8= -((menuh|
00001870  61 6e 64 6c 65 25 21 28  32 38 2b 38 2b 32 34 2a  |andle%!(28+8+24*|
00001880  69 74 65 6d 25 29 20 80  20 26 34 30 30 30 30 30  |item%) . &400000|
00001890  29 3d 26 34 30 30 30 30  30 29 0d 0b 72 05 3a 0d  |)=&400000)..r.:.|
000018a0  0b 7c 29 dd f2 73 65 74  5f 73 68 61 64 65 28 6d  |.|)..set_shade(m|
000018b0  65 6e 75 68 61 6e 64 6c  65 25 2c 69 74 65 6d 25  |enuhandle%,item%|
000018c0  2c 76 61 6c 75 65 25 29  0d 0b 86 47 e7 a4 73 68  |,value%)...G..sh|
000018d0  61 64 65 5f 73 74 61 74  75 73 28 6d 65 6e 75 68  |ade_status(menuh|
000018e0  61 6e 64 6c 65 25 2c 69  74 65 6d 25 29 3c 3e 76  |andle%,item%)<>v|
000018f0  61 6c 75 65 25 20 f2 73  68 61 64 65 28 6d 65 6e  |alue% .shade(men|
00001900  75 68 61 6e 64 6c 65 25  2c 69 74 65 6d 25 29 0d  |uhandle%,item%).|
00001910  0b 90 05 e1 0d 0b 9a 05  3a 0d 0b a4 1d dd f2 74  |........:......t|
00001920  69 63 6b 28 6d 65 6e 75  68 61 6e 64 6c 65 25 2c  |ick(menuhandle%,|
00001930  69 74 65 6d 25 29 0d 0b  ae 39 6d 65 6e 75 68 61  |item%)...9menuha|
00001940  6e 64 6c 65 25 21 28 32  38 2b 32 34 2a 69 74 65  |ndle%!(28+24*ite|
00001950  6d 25 29 3d 6d 65 6e 75  68 61 6e 64 6c 65 25 21  |m%)=menuhandle%!|
00001960  28 32 38 2b 32 34 2a 69  74 65 6d 25 29 82 31 0d  |(28+24*item%).1.|
00001970  0b b8 05 e1 0d 0b c2 05  3a 0d 0b cc 24 dd a4 74  |........:...$..t|
00001980  69 63 6b 5f 73 74 61 74  75 73 28 6d 65 6e 75 68  |ick_status(menuh|
00001990  61 6e 64 6c 65 25 2c 69  74 65 6d 25 29 0d 0b d6  |andle%,item%)...|
000019a0  21 3d 20 6d 65 6e 75 68  61 6e 64 6c 65 25 21 28  |!= menuhandle%!(|
000019b0  32 38 2b 32 34 2a 69 74  65 6d 25 29 80 31 0d 0b  |28+24*item%).1..|
000019c0  e0 05 3a 0d 0b ea 28 dd  f2 73 65 74 5f 74 69 63  |..:...(..set_tic|
000019d0  6b 28 6d 65 6e 75 68 61  6e 64 6c 65 25 2c 69 74  |k(menuhandle%,it|
000019e0  65 6d 25 2c 76 61 6c 75  65 25 29 0d 0b f4 45 e7  |em%,value%)...E.|
000019f0  a4 74 69 63 6b 5f 73 74  61 74 75 73 28 6d 65 6e  |.tick_status(men|
00001a00  75 68 61 6e 64 6c 65 25  2c 69 74 65 6d 25 29 3c  |uhandle%,item%)<|
00001a10  3e 76 61 6c 75 65 25 20  f2 74 69 63 6b 28 6d 65  |>value% .tick(me|
00001a20  6e 75 68 61 6e 64 6c 65  25 2c 69 74 65 6d 25 29  |nuhandle%,item%)|
00001a30  0d 0b fe 05 e1 0d 0c 08  05 3a 0d 0c 12 13 dd a4  |.........:......|
00001a40  77 6f 72 6b 73 70 61 63  65 28 4c 25 29 0d 0c 1c  |workspace(L%)...|
00001a50  38 e7 20 63 75 72 77 73  25 2b 4c 25 3e 77 73 25  |8. curws%+L%>ws%|
00001a60  2b 6d 61 78 77 73 25 20  8c 20 f2 66 61 74 61 6c  |+maxws% . .fatal|
00001a70  28 22 4e 6f 20 6d 6f 72  65 20 77 6f 72 6b 73 70  |("No more worksp|
00001a80  61 63 65 22 29 0d 0c 26  0e 63 75 72 77 73 25 2b  |ace")..&.curws%+|
00001a90  3d 4c 25 0d 0c 30 0e 3d  63 75 72 77 73 25 2d 4c  |=L%..0.=curws%-L|
00001aa0  25 0d 0c 3a 05 3a 0d 0c  44 10 dd f2 63 6f 70 79  |%..:.:..D...copy|
00001ab0  5f 66 69 6c 65 73 0d 0c  4e 14 c8 99 22 48 6f 75  |_files..N..."Hou|
00001ac0  72 67 6c 61 73 73 5f 4f  6e 22 0d 0c 58 44 c8 99  |rglass_On"..XD..|
00001ad0  22 58 4f 53 5f 46 53 43  6f 6e 74 72 6f 6c 22 2c  |"XOS_FSControl",|
00001ae0  32 36 2c 24 66 69 6c 65  32 25 2c 24 66 69 6c 65  |26,$file2%,$file|
00001af0  31 25 2c 25 31 30 31 30  30 31 30 30 30 30 30 30  |1%,%101001000000|
00001b00  30 31 31 20 b8 20 72 30  25 3b 72 65 67 25 0d 0c  |011 . r0%;reg%..|
00001b10  62 13 e7 20 28 72 65 67  25 80 20 31 29 3d 31 20  |b.. (reg%. 1)=1 |
00001b20  8c 0d 0c 6c 38 20 65 72  72 6f 72 5f 66 6c 61 67  |...l8 error_flag|
00001b30  25 3d 31 3a f2 65 72 72  6f 72 62 6f 78 28 a4 72  |%=1:.errorbox(.r|
00001b40  74 6f 7a 28 72 30 25 2b  34 29 29 3a 65 72 72 6f  |toz(r0%+4)):erro|
00001b50  72 5f 66 6c 61 67 25 3d  33 0d 0c 76 0f 20 24 66  |r_flag%=3..v. $f|
00001b60  69 6c 65 31 25 3d 22 22  0d 0c 80 0f 20 24 66 69  |ile1%="".... $fi|
00001b70  6c 65 32 25 3d 22 22 0d  0c 8a 6c 20 24 70 72 6f  |le2%=""...l $pro|
00001b80  6d 70 74 25 3d 22 21 53  79 73 74 65 6d 20 55 70  |mpt%="!System Up|
00001b90  64 61 74 65 20 66 61 69  6c 65 64 2e 20 20 43 6f  |date failed.  Co|
00001ba0  72 72 65 63 74 20 74 68  65 20 70 72 6f 62 6c 65  |rrect the proble|
00001bb0  6d 20 74 68 65 6e 20 64  72 61 67 20 74 68 65 20  |m then drag the |
00001bc0  6f 72 69 67 69 6e 61 6c  20 21 53 79 73 74 65 6d  |original !System|
00001bd0  20 69 6e 74 6f 20 74 68  69 73 20 77 69 6e 64 6f  | into this windo|
00001be0  77 2e 22 0d 0c 94 0d 20  73 74 61 67 65 25 3d 31  |w.".... stage%=1|
00001bf0  0d 0c 9e 18 20 f2 72 65  66 72 65 73 68 5f 73 79  |.... .refresh_sy|
00001c00  73 5f 77 69 6e 64 6f 77  0d 0c a8 06 20 e1 0d 0c  |s_window.... ...|
00001c10  b2 05 cd 0d 0c bc 3e f4  20 4f 53 43 4c 49 22 63  |......>. OSCLI"c|
00001c20  6f 70 79 20 22 2b 24 66  69 6c 65 32 25 2b 22 20  |opy "+$file2%+" |
00001c30  22 2b 24 66 69 6c 65 31  25 2b 22 20 72 6e 66 7e  |"+$file1%+" rnf~|
00001c40  63 7e 76 61 7e 64 6c 7e  70 7e 71 7e 73 7e 74 22  |c~va~dl~p~q~s~t"|
00001c50  31 0d 0c c6 0c 73 74 61  67 65 25 3d 34 0d 0c d0  |1....stage%=4...|
00001c60  1f 24 70 72 6f 6d 70 74  25 3d 22 21 53 79 73 74  |.$prompt%="!Syst|
00001c70  65 6d 20 75 70 64 61 74  65 64 2e 22 0d 0c da 17  |em updated."....|
00001c80  f2 72 65 66 72 65 73 68  5f 73 79 73 5f 77 69 6e  |.refresh_sys_win|
00001c90  64 6f 77 0d 0c e4 15 c8  99 22 48 6f 75 72 67 6c  |dow......"Hourgl|
00001ca0  61 73 73 5f 4f 66 66 22  0d 0c ee 05 e1 0d 0c f8  |ass_Off"........|
00001cb0  05 3a 0d 0d 02 11 dd a4  75 70 70 65 72 28 73 74  |.:......upper(st|
00001cc0  72 24 29 0d 0d 0c 11 ea  72 74 6e 24 2c 20 6c 25  |r$).....rtn$, l%|
00001cd0  2c 20 63 24 0d 0d 16 0b  72 74 6e 24 3d 22 22 0d  |, c$....rtn$="".|
00001ce0  0d 20 12 e3 20 6c 25 3d  31 20 b8 20 a9 73 74 72  |. .. l%=1 . .str|
00001cf0  24 0d 0d 2a 14 20 20 63  24 3d c1 73 74 72 24 2c  |$..*.  c$=.str$,|
00001d00  6c 25 2c 31 29 0d 0d 34  1b 20 20 e7 20 63 24 3e  |l%,1)..4.  . c$>|
00001d10  3d 22 61 22 20 80 20 63  24 3c 3d 22 7a 22 20 8c  |="a" . c$<="z" .|
00001d20  0d 0d 3e 19 20 20 20 20  20 72 74 6e 24 2b 3d bd  |..>.     rtn$+=.|
00001d30  28 97 63 24 82 26 32 30  29 0d 0d 48 07 20 20 cc  |(.c$.&20)..H.  .|
00001d40  0d 0d 52 11 20 20 20 20  20 72 74 6e 24 2b 3d 63  |..R.     rtn$+=c|
00001d50  24 0d 0d 5c 07 20 20 cd  0d 0d 66 05 ed 0d 0d 70  |$..\.  ...f....p|
00001d60  09 3d 72 74 6e 24 0d ff                           |.=rtn$..|
00001d68
!SysMerge/!RunImage.m0
!SysMerge/!RunImage.m1
!SysMerge/!RunImage.m2
!SysMerge/!RunImage.m4
!SysMerge/!RunImage.m5