Home » Archimedes archive » Acorn User » AU 1997-07 B.adf » Printers » Disc1/!Scrap/!RunImage

Disc1/!Scrap/!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 1997-07 B.adf » Printers
Filename: Disc1/!Scrap/!RunImage
Read OK:
File size: 1AC8 bytes
Load address: 0000
Exec address: 0000
Duplicates

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

File contents
   10REM ==> !Scrap.!Runimage
   20REM
   30REM Version 1.80  30-Sep-93  Bruce Cockburn
   40REM Version 1.81  08-Oct-93  Bruce Cockburn, Changed SWI calls to not look up the name
   50REM Version 1.82  28-Oct-93  Jonathan Roach, Moved scrap directories into
   60REM                          ScrapDirs. This is to make FSLock's job doable.
   70REM Version 1.83  19-Jan-94  Bruce Cockburn, Fixed error messages to use + instead of
   80REM                          ; for string concatenation.  Bug MED-02318.
   90REM
  100:
  110Default$="ScrapDir"
  120Network$="ID"
  130ResultDir$="Wimp$ScrapDir"
  140ResultFile$="Wimp$Scrap"
  150:
  160OS_File%=&00008
  170OS_GetEnv%=&00010
  180OS_ReadVarVal%=&00023
  190OS_SetVarVal%=&00024
  200OS_GSTrans%=&00027
  210OS_FSControl%=&00029
  220OS_ReadMonotonicTime%=&00042
  230XOS_File%=&20008
  240XOS_ReadVarVal%=&20023
  250XEconet_ReadLocalStationAndNet%=&6000A
  260:
  270V%=FALSE: REM Verbose
  280:
  290BufferSize%=200
  300DIM Args$(9), Buffer% BufferSize%
  310Env$=FNShell_GetEnv
  320
  330NumberOfArgs%=FNShell_Array(Args$(),Env$)
  340CASE NumberOfArgs% OF
  350  WHEN 1:
  360    IF FNShell_String_UC(Args$(1))="-HELP" THEN
  370      PROCGiveHelp
  380    ELSE
  390      PROCRun(Args$(1))
  400    ENDIF
  410  WHEN 2:
  420    IF FNShell_String_UC(Args$(2))="-BOOT" THEN
  430      PROCBoot(Args$(1))
  440    ELSE
  450      PROCGiveHelp
  460    ENDIF
  470  OTHERWISE: PROCGiveHelp
  480ENDCASE
  490IF V% THEN PRINT "The scrap directory <"+ResultDir$+"> has been set to """+FNReadVariable(ResultDir$)+"""."
  500END
  510:
  520DEF PROCGiveHelp
  530PRINT "Syntax is: <Directory> [-boot]"
  540ENDPROC
  550:
  560DEF PROCRun(Dir$)
  570IF V% THEN PRINT "Scrap has been run"
  580IF V% THEN PRINT "Invocation string is """+Dir$+"""."
  590Dir$=FNGSTransAndCannonicalise(Dir$)
  600IF V% THEN PRINT "Invocation value is """+Dir$+"""."
  610CreateFailure$=FNCreatePermission(Dir$)
  620IF V% THEN PRINT "CreateFailure$="""+CreateFailure$+"""."
  630IF CreateFailure$="" THEN
  640  IF V% THEN PRINT "Invocation value is """+Dir$+"""."
  650  Scrap$=FNEvaluate
  660  IF V% THEN PRINT "Invocation value is """+Dir$+"""."
  670  IF V% THEN PRINT "Scrap evaluates to """+Scrap$+"""."
  680  PROCSetVariable(ResultDir$, Dir$+"."+Scrap$)
  690  PROCSetVariable(ResultFile$, Dir$+"."+Scrap$+".ScrapFile")
  700  OSCLI( "CDir "+Dir$+"."+Scrap$+" 1" )
  710ELSE
  720  ERROR EXT 6, "Unable to create files in """+Dir$+""", error returned is: """+CreateFailure$+""""
  730ENDIF
  740ENDPROC
  750:
  760DEF PROCBoot(Dir$)
  770LOCAL Current$
  780IF V% THEN PRINT "Scrap has been booted"
  790IF V% THEN PRINT "Invocation string is """+Dir$+"""."
  800Dir$=FNGSTransAndCannonicalise(Dir$)
  810IF V% THEN PRINT "Invocation value is """+Dir$+"""."
  820CreateFailure$=FNCreatePermission(Dir$)
  830IF V% THEN PRINT "CreateFailure$="""+CreateFailure$+"""."
  840IF CreateFailure$="" THEN
  850  Scrap$=FNEvaluate
  860  IF V% THEN PRINT "Scrap evaluates to """+Scrap$+"""."
  870  Current$=FNReadVariable( ResultDir$ )
  880  REM Now check to see if Wimp$ScrapDir is already set
  890  IF (Current$ = "") OR (Current$ = "System:ScrapDir") OR (Current$ = FNReadVariable( "System$Dir" )+".ScrapDir") THEN
  900    PROCSetVariable(ResultDir$, Dir$+"."+Scrap$)
  910    PROCSetVariable(ResultFile$, Dir$+"."+Scrap$+".ScrapFile")
  920    OSCLI( "CDir "+Dir$+"."+Scrap$+" 1" )
  930  ENDIF
  940ELSE
  950  REM Do nothing
  960ENDIF
  970ENDPROC
  980:
  990REM Function to get the environment string
 1000DEF FNShell_GetEnv
 1010LOCAL A$
 1020SYS OS_GetEnv% TO A$
 1030WHILE (LEFT$(A$,1) <> " ") AND (LEN(A$) <> 0)
 1040  A$=MID$(A$,2)
 1050ENDWHILE
 1060WHILE LEFT$(A$,1) = " "
 1070  A$=MID$(A$,2)
 1080ENDWHILE
 1090WHILE RIGHT$(A$,1)=" "
 1100  A$=LEFT$(A$)
 1110ENDWHILE
 1120IF FNShell_String_UC(LEFT$(A$,5))="-QUIT" THEN
 1130  A$=MID$(A$,7)
 1140  WHILE (LEFT$(A$,1) <> " ") AND (LEN(A$) <> 0)
 1150    A$=MID$(A$,2)
 1160  ENDWHILE
 1170  WHILE LEFT$(A$,1) = " "
 1180    A$=MID$(A$,2)
 1190  ENDWHILE
 1200ENDIF
 1210=A$
 1220:
 1230REM Function to convert string to upper case
 1240DEF FNShell_String_UC(A$)
 1250LOCAL Z%
 1260FOR Z%=1 TO LEN(A$)
 1270  IF (ASC(MID$(A$,Z%,1)) >= ASC"a") AND (ASC(MID$(A$,Z%,1)) <= ASC"z") THEN
 1280    MID$(A$,Z%,1)=CHR$(ASC(MID$(A$,Z%,1))-32)
 1290  ENDIF
 1300NEXT:=A$
 1310:
 1320REM Function to split string to array of strings and give number
 1330DEF FNShell_Array(A$(),A$)
 1340IF DIM(A$())<>1 ERROR EXT 7, "Wrong size array for Shell_Array call"
 1350LOCAL A%,B%
 1360A%=0
 1370B%=INSTR(A$," ")
 1380WHILE B%<>0
 1390  A%+=1
 1400  A$(A%)=LEFT$(A$,B%-1)
 1410  A$=MID$(A$,B%+1)
 1420  WHILE LEFT$(A$,1) = " "
 1430    A$=MID$(A$,2)
 1440  ENDWHILE
 1450  B%=INSTR(A$," ")
 1460ENDWHILE
 1470IF A$ <> "" THEN A%+=1: A$(A%)=A$
 1480=A%
 1490:
 1500DEF FNGSTransAndCannonicalise(Dir$)
 1510LOCAL Size%
 1520SYS OS_GSTrans%, Dir$, Buffer%, BufferSize% TO ,, Size%; Flags%
 1530IF (Flags% AND 2) = 0 THEN
 1540  Buffer%?Size%=13
 1550  Dir$=$Buffer%
 1560ELSE
 1570  ERROR EXT 4, "Buffer overflow in GSTrans of """+Dir$+""""
 1580ENDIF
 1590SYS OS_FSControl%, 37, Dir$, Buffer%, 0, 0, BufferSize% TO ,,,,, Size%
 1600IF Size% >= 1 THEN
 1610  Size%=BufferSize%-Size%
 1620  Buffer%?Size%=13
 1630  Dir$=$Buffer%
 1640ELSE
 1650  ERROR EXT 5, "Buffer overflow in cannonicalisation of """+Dir$+""""
 1660ENDIF
 1670REM Ensure ScrapDirs exists, but ignore any error as FSLock may have interfered
 1680SYS XOS_File%, 8, Dir$,,, 0
 1690=Dir$
 1700:
 1710DEF FNCreatePermission(Place$)
 1720LOCAL Result$, Type%, UID%, UID$, Error%, Flags%: Result$=""
 1730SYS OS_File%, 5, Place$ TO Type%
 1740IF V% THEN PRINT "Type is "+Type%
 1750IF (Type% AND 2) = 2 THEN
 1760  REPEAT
 1770    SYS OS_ReadMonotonicTime% TO UID%
 1780    UID$=Place$+"."+STR$~(UID%)
 1790    IF V% THEN PRINT "UID$="""+UID$+"""."
 1800    SYS OS_File%, 5, UID$ TO Type%
 1810  UNTIL Type%=0
 1820  IF V% THEN PRINT "UID selected is """+UID$+"""."
 1830  SYS XOS_File%, 7, UID$, 0, 0, 0, 1 TO Error%; Flags%
 1840  IF V% THEN PRINT "Created """+UID$+"""."
 1850  IF (Flags% AND 1) <> 1 THEN
 1860    SYS OS_File%, 6, UID$
 1870  ELSE
 1880    Error%+=4
 1890    WHILE Error%?0 <> 0
 1900      Result$=Result$+CHR$(Error%?0)
 1910      Error%+=1
 1920    ENDWHILE
 1930  ENDIF
 1940ELSE
 1950  Result$="The object """+Place$+""" is not a directory"
 1960ENDIF
 1970=Result$
 1980:
 1990DEF FNEvaluate
 2000LOCAL Result$, Existance%, Station%, Network%, Flags%: Result$=""
 2010SYS XOS_ReadVarVal%, "INet$LocalAddr", Buffer%, -1, 0, 0 TO ,, Existance%
 2020IF V% PRINT "Existance%="+Existance%
 2030IF Existance% < 0 THEN
 2040  SYS OS_ReadVarVal%, "INet$LocalAddr", Buffer%, BufferSize%, 0, 0 TO ,, Size%,, Type%
 2050  CASE Type% OF
 2060    WHEN 0: Buffer%?Size%=13: Result$=Network$+$Buffer%
 2070    WHEN 1: ERROR EXT 1, "The variable INet$LocalAddr is a number not a string"
 2080    WHEN 2: ERROR EXT 2, "The variable INet$LocalAddr is a macro not a string"
 2090    OTHERWISE: ERROR EXT 3, "The variable INet$LocalAddr has an unknown type"
 2100  ENDCASE
 2110ELSE
 2120  IF V% PRINT "INet$LocalAddr doesn't exist"
 2130ENDIF
 2140IF Result$ = "" THEN
 2150  SYS XEconet_ReadLocalStationAndNet% TO Station%, Network%; Flags%
 2160  IF V% PRINT "Station%="+Station%+" Network%="+Network%
 2170  IF (Flags% AND 1) = 0 THEN
 2180    Result$=Network$+RIGHT$("00"+STR$(Network%),3)+"!"+RIGHT$("00"+STR$(Station%),3)
 2190  ENDIF
 2200ENDIF
 2210IF Result$ = "" THEN
 2220  Result$=Default$
 2230ENDIF
 2240=Result$
 2250:
 2260DEF PROCSetVariable( Variable$, Value$ )
 2270IF V% THEN PRINT "Setting <"+Variable$+"> to """+Value$+"""."
 2280SYS OS_SetVarVal%, Variable$, Value$, LEN(Value$), 0, 4
 2290ENDPROC
 2300:
 2310DEF FNReadVariable( Variable$ )
 2320LOCAL Result$, Existance%: Result$=""
 2330SYS XOS_ReadVarVal%, Variable$, Buffer%, -1, 0, 3 TO ,, Existance%
 2340IF Existance% < 0 THEN
 2350  SYS OS_ReadVarVal%, Variable$, Buffer%, BufferSize%, 0, 3 TO ,, Size%,, Type%
 2360  CASE Type% OF
 2370    WHEN 0: Buffer%?Size%=13: Result$=$Buffer%
 2380    OTHERWISE: ERROR EXT 3, "The variable """+Variable+""" has an unknown type"
 2390  ENDCASE
 2400ENDIF
 2410=Result$

� ==> !Scrap.!Runimage
�
-� Version 1.80  30-Sep-93  Bruce Cockburn
(X� Version 1.81  08-Oct-93  Bruce Cockburn, Changed SWI calls to not look up the name
2K� Version 1.82  28-Oct-93  Jonathan Roach, Moved scrap directories into
<N�                          ScrapDirs. This is to make FSLock's job doable.
FW� Version 1.83  19-Jan-94  Bruce Cockburn, Fixed error messages to use + instead of
PJ�                          ; for string concatenation.  Bug MED-02318.
Z�
d:
nDefault$="ScrapDir"
xNetwork$="ID"
�ResultDir$="Wimp$ScrapDir"
�ResultFile$="Wimp$Scrap"
�:
�OS_File%=&00008
�OS_GetEnv%=&00010
�OS_ReadVarVal%=&00023
�OS_SetVarVal%=&00024
�OS_GSTrans%=&00027
�OS_FSControl%=&00029
� OS_ReadMonotonicTime%=&00042
�XOS_File%=&20008
�XOS_ReadVarVal%=&20023
�*XEconet_ReadLocalStationAndNet%=&6000A
:
V%=�: � Verbose
:
"BufferSize%=200
,#� Args$(9), Buffer% BufferSize%
6Env$=�Shell_GetEnv
@
J,NumberOfArgs%=�Shell_Array(Args$(),Env$)
TȎ NumberOfArgs% �
^
  � 1:
h.    � �Shell_String_UC(Args$(1))="-HELP" �
r      �GiveHelp
|	    �
�      �Run(Args$(1))
�	    �
�
  � 2:
�.    � �Shell_String_UC(Args$(2))="-BOOT" �
�      �Boot(Args$(1))
�	    �
�      �GiveHelp
�	    �
�  : �GiveHelp
��
�f� V% � � "The scrap directory <"+ResultDir$+"> has been set to """+�ReadVariable(ResultDir$)+"""."
��
�:
� �GiveHelp
&� "Syntax is: <Directory> [-boot]"
�
&:
0� �Run(Dir$)
:!� V% � � "Scrap has been run"
D1� V% � � "Invocation string is """+Dir$+"""."
N'Dir$=�GSTransAndCannonicalise(Dir$)
X0� V% � � "Invocation value is """+Dir$+"""."
b*CreateFailure$=�CreatePermission(Dir$)
l5� V% � � "CreateFailure$="""+CreateFailure$+"""."
v� CreateFailure$="" �
�2  � V% � � "Invocation value is """+Dir$+"""."
�  Scrap$=�Evaluate
�2  � V% � � "Invocation value is """+Dir$+"""."
�3  � V% � � "Scrap evaluates to """+Scrap$+"""."
�/  �SetVariable(ResultDir$, Dir$+"."+Scrap$)
�=  �SetVariable(ResultFile$, Dir$+"."+Scrap$+".ScrapFile")
�'  �( "CDir "+Dir$+"."+Scrap$+" 1" )
��
�`  � � 6, "Unable to create files in """+Dir$+""", error returned is: """+CreateFailure$+""""
��
��
�:
�� �Boot(Dir$)
� Current$
$� V% � � "Scrap has been booted"
1� V% � � "Invocation string is """+Dir$+"""."
 'Dir$=�GSTransAndCannonicalise(Dir$)
*0� V% � � "Invocation value is """+Dir$+"""."
4*CreateFailure$=�CreatePermission(Dir$)
>5� V% � � "CreateFailure$="""+CreateFailure$+"""."
H� CreateFailure$="" �
R  Scrap$=�Evaluate
\3  � V% � � "Scrap evaluates to """+Scrap$+"""."
f*  Current$=�ReadVariable( ResultDir$ )
p8  � Now check to see if Wimp$ScrapDir is already set
zs  � (Current$ = "") � (Current$ = "System:ScrapDir") � (Current$ = �ReadVariable( "System$Dir" )+".ScrapDir") �
�1    �SetVariable(ResultDir$, Dir$+"."+Scrap$)
�?    �SetVariable(ResultFile$, Dir$+"."+Scrap$+".ScrapFile")
�)    �( "CDir "+Dir$+"."+Scrap$+" 1" )
�  �
��
�  � Do nothing
��
��
�:
�,� Function to get the environment string
�� �Shell_GetEnv
�� A$
�ș OS_GetEnv% � A$
%ȕ (�A$,1) <> " ") � (�(A$) <> 0)
  A$=�A$,2)
�
$ȕ �A$,1) = " "
.  A$=�A$,2)
8�
Bȕ �A$,1)=" "
L
  A$=�A$)
V�
`(� �Shell_String_UC(�A$,5))="-QUIT" �
j  A$=�A$,7)
t'  ȕ (�A$,1) <> " ") � (�(A$) <> 0)
~    A$=�A$,2)
�  �
�  ȕ �A$,1) = " "
�    A$=�A$,2)
�  �
��
�=A$
�:
�.� Function to convert string to upper case
�� �Shell_String_UC(A$)
�� Z%
�� Z%=1 � �(A$)
�9  � (�(�A$,Z%,1)) >= �"a") � (�(�A$,Z%,1)) <= �"z") �
$    �A$,Z%,1)=�(�(�A$,Z%,1))-32)

  �
	�:=A$
:
(B� Function to split string to array of strings and give number
2� �Shell_Array(A$(),A$)
<?� �(A$())<>1 � � 7, "Wrong size array for Shell_Array call"
F� A%,B%
PA%=0
ZB%=�A$," ")
dȕ B%<>0
n  A%+=1
x  A$(A%)=�A$,B%-1)
�  A$=�A$,B%+1)
�  ȕ �A$,1) = " "
�    A$=�A$,2)
�  �
�  B%=�A$," ")
��
�!� A$ <> "" � A%+=1: A$(A%)=A$
�=A%
�:
�$� �GSTransAndCannonicalise(Dir$)
�� Size%
�Aș OS_GSTrans%, Dir$, Buffer%, BufferSize% � ,, Size%; Flags%
�� (Flags% � 2) = 0 �
  Buffer%?Size%=13
  Dir$=$Buffer%
�
"9  � � 4, "Buffer overflow in GSTrans of """+Dir$+""""
,�
6Hș OS_FSControl%, 37, Dir$, Buffer%, 0, 0, BufferSize% � ,,,,, Size%
@� Size% >= 1 �
J  Size%=BufferSize%-Size%
T  Buffer%?Size%=13
^  Dir$=$Buffer%
h�
rC  � � 5, "Buffer overflow in cannonicalisation of """+Dir$+""""
|�
�Q� Ensure ScrapDirs exists, but ignore any error as FSLock may have interfered
�ș XOS_File%, 8, Dir$,,, 0
�	=Dir$
�:
�� �CreatePermission(Place$)
�<� Result$, Type%, UID%, UID$, Error%, Flags%: Result$=""
�"ș OS_File%, 5, Place$ � Type%
�� V% � � "Type is "+Type%
�� (Type% � 2) = 2 �
�  �
�'    ș OS_ReadMonotonicTime% � UID%
�     UID$=Place$+"."+�~(UID%)
�%    � V% � � "UID$="""+UID$+"""."
$    ș OS_File%, 5, UID$ � Type%
  � Type%=0
.  � V% � � "UID selected is """+UID$+"""."
&8  ș XOS_File%, 7, UID$, 0, 0, 0, 1 � Error%; Flags%
0&  � V% � � "Created """+UID$+"""."
:  � (Flags% � 1) <> 1 �
D    ș OS_File%, 6, UID$
N  �
X    Error%+=4
b    ȕ Error%?0 <> 0
l%      Result$=Result$+�(Error%?0)
v      Error%+=1
�	    �
�  �
��
�<  Result$="The object """+Place$+""" is not a directory"
��
�=Result$
�:
�� �Evaluate
�A� Result$, Existance%, Station%, Network%, Flags%: Result$=""
�Kș XOS_ReadVarVal%, "INet$LocalAddr", Buffer%, -1, 0, 0 � ,, Existance%
�#� V% � "Existance%="+Existance%
�� Existance% < 0 �
�X  ș OS_ReadVarVal%, "INet$LocalAddr", Buffer%, BufferSize%, 0, 0 � ,, Size%,, Type%
  Ȏ Type% �
8    � 0: Buffer%?Size%=13: Result$=Network$+$Buffer%
J    � 1: � � 1, "The variable INet$LocalAddr is a number not a string"
 I    � 2: � � 2, "The variable INet$LocalAddr is a macro not a string"
*C    : � � 3, "The variable INet$LocalAddr has an unknown type"
4  �
>�
H+  � V% � "INet$LocalAddr doesn't exist"
R�
\� Result$ = "" �
fE  ș XEconet_ReadLocalStationAndNet% � Station%, Network%; Flags%
p7  � V% � "Station%="+Station%+" Network%="+Network%
z  � (Flags% � 1) = 0 �
�F    Result$=Network$+�"00"+�(Network%),3)+"!"+�"00"+�(Station%),3)
�  �
��
�� Result$ = "" �
�  Result$=Default$
��
�=Result$
�:
�'� �SetVariable( Variable$, Value$ )
�9� V% � � "Setting <"+Variable$+"> to """+Value$+"""."
�8ș OS_SetVarVal%, Variable$, Value$, �(Value$), 0, 4
��
�:
	 � �ReadVariable( Variable$ )
	%� Result$, Existance%: Result$=""
	Dș XOS_ReadVarVal%, Variable$, Buffer%, -1, 0, 3 � ,, Existance%
	$� Existance% < 0 �
	.Q  ș OS_ReadVarVal%, Variable$, Buffer%, BufferSize%, 0, 3 � ,, Size%,, Type%
	8  Ȏ Type% �
	B/    � 0: Buffer%?Size%=13: Result$=$Buffer%
	LE    : � � 3, "The variable """+Variable+""" has an unknown type"
	V  �
	`�
	j=Result$
�
00000000  0d 00 0a 1a f4 20 3d 3d  3e 20 21 53 63 72 61 70  |..... ==> !Scrap|
00000010  2e 21 52 75 6e 69 6d 61  67 65 0d 00 14 05 f4 0d  |.!Runimage......|
00000020  00 1e 2d f4 20 56 65 72  73 69 6f 6e 20 31 2e 38  |..-. Version 1.8|
00000030  30 20 20 33 30 2d 53 65  70 2d 39 33 20 20 42 72  |0  30-Sep-93  Br|
00000040  75 63 65 20 43 6f 63 6b  62 75 72 6e 0d 00 28 58  |uce Cockburn..(X|
00000050  f4 20 56 65 72 73 69 6f  6e 20 31 2e 38 31 20 20  |. Version 1.81  |
00000060  30 38 2d 4f 63 74 2d 39  33 20 20 42 72 75 63 65  |08-Oct-93  Bruce|
00000070  20 43 6f 63 6b 62 75 72  6e 2c 20 43 68 61 6e 67  | Cockburn, Chang|
00000080  65 64 20 53 57 49 20 63  61 6c 6c 73 20 74 6f 20  |ed SWI calls to |
00000090  6e 6f 74 20 6c 6f 6f 6b  20 75 70 20 74 68 65 20  |not look up the |
000000a0  6e 61 6d 65 0d 00 32 4b  f4 20 56 65 72 73 69 6f  |name..2K. Versio|
000000b0  6e 20 31 2e 38 32 20 20  32 38 2d 4f 63 74 2d 39  |n 1.82  28-Oct-9|
000000c0  33 20 20 4a 6f 6e 61 74  68 61 6e 20 52 6f 61 63  |3  Jonathan Roac|
000000d0  68 2c 20 4d 6f 76 65 64  20 73 63 72 61 70 20 64  |h, Moved scrap d|
000000e0  69 72 65 63 74 6f 72 69  65 73 20 69 6e 74 6f 0d  |irectories into.|
000000f0  00 3c 4e f4 20 20 20 20  20 20 20 20 20 20 20 20  |.<N.            |
00000100  20 20 20 20 20 20 20 20  20 20 20 20 20 20 53 63  |              Sc|
00000110  72 61 70 44 69 72 73 2e  20 54 68 69 73 20 69 73  |rapDirs. This is|
00000120  20 74 6f 20 6d 61 6b 65  20 46 53 4c 6f 63 6b 27  | to make FSLock'|
00000130  73 20 6a 6f 62 20 64 6f  61 62 6c 65 2e 0d 00 46  |s job doable...F|
00000140  57 f4 20 56 65 72 73 69  6f 6e 20 31 2e 38 33 20  |W. Version 1.83 |
00000150  20 31 39 2d 4a 61 6e 2d  39 34 20 20 42 72 75 63  | 19-Jan-94  Bruc|
00000160  65 20 43 6f 63 6b 62 75  72 6e 2c 20 46 69 78 65  |e Cockburn, Fixe|
00000170  64 20 65 72 72 6f 72 20  6d 65 73 73 61 67 65 73  |d error messages|
00000180  20 74 6f 20 75 73 65 20  2b 20 69 6e 73 74 65 61  | to use + instea|
00000190  64 20 6f 66 0d 00 50 4a  f4 20 20 20 20 20 20 20  |d of..PJ.       |
000001a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000001b0  20 20 20 3b 20 66 6f 72  20 73 74 72 69 6e 67 20  |   ; for string |
000001c0  63 6f 6e 63 61 74 65 6e  61 74 69 6f 6e 2e 20 20  |concatenation.  |
000001d0  42 75 67 20 4d 45 44 2d  30 32 33 31 38 2e 0d 00  |Bug MED-02318...|
000001e0  5a 05 f4 0d 00 64 05 3a  0d 00 6e 17 44 65 66 61  |Z....d.:..n.Defa|
000001f0  75 6c 74 24 3d 22 53 63  72 61 70 44 69 72 22 0d  |ult$="ScrapDir".|
00000200  00 78 11 4e 65 74 77 6f  72 6b 24 3d 22 49 44 22  |.x.Network$="ID"|
00000210  0d 00 82 1e 52 65 73 75  6c 74 44 69 72 24 3d 22  |....ResultDir$="|
00000220  57 69 6d 70 24 53 63 72  61 70 44 69 72 22 0d 00  |Wimp$ScrapDir"..|
00000230  8c 1c 52 65 73 75 6c 74  46 69 6c 65 24 3d 22 57  |..ResultFile$="W|
00000240  69 6d 70 24 53 63 72 61  70 22 0d 00 96 05 3a 0d  |imp$Scrap"....:.|
00000250  00 a0 13 4f 53 5f 46 69  6c 65 25 3d 26 30 30 30  |...OS_File%=&000|
00000260  30 38 0d 00 aa 15 4f 53  5f 47 65 74 45 6e 76 25  |08....OS_GetEnv%|
00000270  3d 26 30 30 30 31 30 0d  00 b4 19 4f 53 5f 52 65  |=&00010....OS_Re|
00000280  61 64 56 61 72 56 61 6c  25 3d 26 30 30 30 32 33  |adVarVal%=&00023|
00000290  0d 00 be 18 4f 53 5f 53  65 74 56 61 72 56 61 6c  |....OS_SetVarVal|
000002a0  25 3d 26 30 30 30 32 34  0d 00 c8 16 4f 53 5f 47  |%=&00024....OS_G|
000002b0  53 54 72 61 6e 73 25 3d  26 30 30 30 32 37 0d 00  |STrans%=&00027..|
000002c0  d2 18 4f 53 5f 46 53 43  6f 6e 74 72 6f 6c 25 3d  |..OS_FSControl%=|
000002d0  26 30 30 30 32 39 0d 00  dc 20 4f 53 5f 52 65 61  |&00029... OS_Rea|
000002e0  64 4d 6f 6e 6f 74 6f 6e  69 63 54 69 6d 65 25 3d  |dMonotonicTime%=|
000002f0  26 30 30 30 34 32 0d 00  e6 14 58 4f 53 5f 46 69  |&00042....XOS_Fi|
00000300  6c 65 25 3d 26 32 30 30  30 38 0d 00 f0 1a 58 4f  |le%=&20008....XO|
00000310  53 5f 52 65 61 64 56 61  72 56 61 6c 25 3d 26 32  |S_ReadVarVal%=&2|
00000320  30 30 32 33 0d 00 fa 2a  58 45 63 6f 6e 65 74 5f  |0023...*XEconet_|
00000330  52 65 61 64 4c 6f 63 61  6c 53 74 61 74 69 6f 6e  |ReadLocalStation|
00000340  41 6e 64 4e 65 74 25 3d  26 36 30 30 30 41 0d 01  |AndNet%=&6000A..|
00000350  04 05 3a 0d 01 0e 13 56  25 3d a3 3a 20 f4 20 56  |..:....V%=.: . V|
00000360  65 72 62 6f 73 65 0d 01  18 05 3a 0d 01 22 13 42  |erbose....:..".B|
00000370  75 66 66 65 72 53 69 7a  65 25 3d 32 30 30 0d 01  |ufferSize%=200..|
00000380  2c 23 de 20 41 72 67 73  24 28 39 29 2c 20 42 75  |,#. Args$(9), Bu|
00000390  66 66 65 72 25 20 42 75  66 66 65 72 53 69 7a 65  |ffer% BufferSize|
000003a0  25 0d 01 36 16 45 6e 76  24 3d a4 53 68 65 6c 6c  |%..6.Env$=.Shell|
000003b0  5f 47 65 74 45 6e 76 0d  01 40 04 0d 01 4a 2c 4e  |_GetEnv..@...J,N|
000003c0  75 6d 62 65 72 4f 66 41  72 67 73 25 3d a4 53 68  |umberOfArgs%=.Sh|
000003d0  65 6c 6c 5f 41 72 72 61  79 28 41 72 67 73 24 28  |ell_Array(Args$(|
000003e0  29 2c 45 6e 76 24 29 0d  01 54 16 c8 8e 20 4e 75  |),Env$)..T... Nu|
000003f0  6d 62 65 72 4f 66 41 72  67 73 25 20 ca 0d 01 5e  |mberOfArgs% ...^|
00000400  0a 20 20 c9 20 31 3a 0d  01 68 2e 20 20 20 20 e7  |.  . 1:..h.    .|
00000410  20 a4 53 68 65 6c 6c 5f  53 74 72 69 6e 67 5f 55  | .Shell_String_U|
00000420  43 28 41 72 67 73 24 28  31 29 29 3d 22 2d 48 45  |C(Args$(1))="-HE|
00000430  4c 50 22 20 8c 0d 01 72  13 20 20 20 20 20 20 f2  |LP" ...r.      .|
00000440  47 69 76 65 48 65 6c 70  0d 01 7c 09 20 20 20 20  |GiveHelp..|.    |
00000450  cc 0d 01 86 18 20 20 20  20 20 20 f2 52 75 6e 28  |.....      .Run(|
00000460  41 72 67 73 24 28 31 29  29 0d 01 90 09 20 20 20  |Args$(1))....   |
00000470  20 cd 0d 01 9a 0a 20 20  c9 20 32 3a 0d 01 a4 2e  | .....  . 2:....|
00000480  20 20 20 20 e7 20 a4 53  68 65 6c 6c 5f 53 74 72  |    . .Shell_Str|
00000490  69 6e 67 5f 55 43 28 41  72 67 73 24 28 32 29 29  |ing_UC(Args$(2))|
000004a0  3d 22 2d 42 4f 4f 54 22  20 8c 0d 01 ae 19 20 20  |="-BOOT" .....  |
000004b0  20 20 20 20 f2 42 6f 6f  74 28 41 72 67 73 24 28  |    .Boot(Args$(|
000004c0  31 29 29 0d 01 b8 09 20  20 20 20 cc 0d 01 c2 13  |1))....    .....|
000004d0  20 20 20 20 20 20 f2 47  69 76 65 48 65 6c 70 0d  |      .GiveHelp.|
000004e0  01 cc 09 20 20 20 20 cd  0d 01 d6 12 20 20 7f 3a  |...    .....  .:|
000004f0  20 f2 47 69 76 65 48 65  6c 70 0d 01 e0 05 cb 0d  | .GiveHelp......|
00000500  01 ea 66 e7 20 56 25 20  8c 20 f1 20 22 54 68 65  |..f. V% . . "The|
00000510  20 73 63 72 61 70 20 64  69 72 65 63 74 6f 72 79  | scrap directory|
00000520  20 3c 22 2b 52 65 73 75  6c 74 44 69 72 24 2b 22  | <"+ResultDir$+"|
00000530  3e 20 68 61 73 20 62 65  65 6e 20 73 65 74 20 74  |> has been set t|
00000540  6f 20 22 22 22 2b a4 52  65 61 64 56 61 72 69 61  |o """+.ReadVaria|
00000550  62 6c 65 28 52 65 73 75  6c 74 44 69 72 24 29 2b  |ble(ResultDir$)+|
00000560  22 22 22 2e 22 0d 01 f4  05 e0 0d 01 fe 05 3a 0d  |""".".........:.|
00000570  02 08 0f dd 20 f2 47 69  76 65 48 65 6c 70 0d 02  |.... .GiveHelp..|
00000580  12 26 f1 20 22 53 79 6e  74 61 78 20 69 73 3a 20  |.&. "Syntax is: |
00000590  3c 44 69 72 65 63 74 6f  72 79 3e 20 5b 2d 62 6f  |<Directory> [-bo|
000005a0  6f 74 5d 22 0d 02 1c 05  e1 0d 02 26 05 3a 0d 02  |ot]".......&.:..|
000005b0  30 10 dd 20 f2 52 75 6e  28 44 69 72 24 29 0d 02  |0.. .Run(Dir$)..|
000005c0  3a 21 e7 20 56 25 20 8c  20 f1 20 22 53 63 72 61  |:!. V% . . "Scra|
000005d0  70 20 68 61 73 20 62 65  65 6e 20 72 75 6e 22 0d  |p has been run".|
000005e0  02 44 31 e7 20 56 25 20  8c 20 f1 20 22 49 6e 76  |.D1. V% . . "Inv|
000005f0  6f 63 61 74 69 6f 6e 20  73 74 72 69 6e 67 20 69  |ocation string i|
00000600  73 20 22 22 22 2b 44 69  72 24 2b 22 22 22 2e 22  |s """+Dir$+"""."|
00000610  0d 02 4e 27 44 69 72 24  3d a4 47 53 54 72 61 6e  |..N'Dir$=.GSTran|
00000620  73 41 6e 64 43 61 6e 6e  6f 6e 69 63 61 6c 69 73  |sAndCannonicalis|
00000630  65 28 44 69 72 24 29 0d  02 58 30 e7 20 56 25 20  |e(Dir$)..X0. V% |
00000640  8c 20 f1 20 22 49 6e 76  6f 63 61 74 69 6f 6e 20  |. . "Invocation |
00000650  76 61 6c 75 65 20 69 73  20 22 22 22 2b 44 69 72  |value is """+Dir|
00000660  24 2b 22 22 22 2e 22 0d  02 62 2a 43 72 65 61 74  |$+"""."..b*Creat|
00000670  65 46 61 69 6c 75 72 65  24 3d a4 43 72 65 61 74  |eFailure$=.Creat|
00000680  65 50 65 72 6d 69 73 73  69 6f 6e 28 44 69 72 24  |ePermission(Dir$|
00000690  29 0d 02 6c 35 e7 20 56  25 20 8c 20 f1 20 22 43  |)..l5. V% . . "C|
000006a0  72 65 61 74 65 46 61 69  6c 75 72 65 24 3d 22 22  |reateFailure$=""|
000006b0  22 2b 43 72 65 61 74 65  46 61 69 6c 75 72 65 24  |"+CreateFailure$|
000006c0  2b 22 22 22 2e 22 0d 02  76 19 e7 20 43 72 65 61  |+"""."..v.. Crea|
000006d0  74 65 46 61 69 6c 75 72  65 24 3d 22 22 20 8c 0d  |teFailure$="" ..|
000006e0  02 80 32 20 20 e7 20 56  25 20 8c 20 f1 20 22 49  |..2  . V% . . "I|
000006f0  6e 76 6f 63 61 74 69 6f  6e 20 76 61 6c 75 65 20  |nvocation value |
00000700  69 73 20 22 22 22 2b 44  69 72 24 2b 22 22 22 2e  |is """+Dir$+""".|
00000710  22 0d 02 8a 16 20 20 53  63 72 61 70 24 3d a4 45  |"....  Scrap$=.E|
00000720  76 61 6c 75 61 74 65 0d  02 94 32 20 20 e7 20 56  |valuate...2  . V|
00000730  25 20 8c 20 f1 20 22 49  6e 76 6f 63 61 74 69 6f  |% . . "Invocatio|
00000740  6e 20 76 61 6c 75 65 20  69 73 20 22 22 22 2b 44  |n value is """+D|
00000750  69 72 24 2b 22 22 22 2e  22 0d 02 9e 33 20 20 e7  |ir$+"""."...3  .|
00000760  20 56 25 20 8c 20 f1 20  22 53 63 72 61 70 20 65  | V% . . "Scrap e|
00000770  76 61 6c 75 61 74 65 73  20 74 6f 20 22 22 22 2b  |valuates to """+|
00000780  53 63 72 61 70 24 2b 22  22 22 2e 22 0d 02 a8 2f  |Scrap$+""".".../|
00000790  20 20 f2 53 65 74 56 61  72 69 61 62 6c 65 28 52  |  .SetVariable(R|
000007a0  65 73 75 6c 74 44 69 72  24 2c 20 44 69 72 24 2b  |esultDir$, Dir$+|
000007b0  22 2e 22 2b 53 63 72 61  70 24 29 0d 02 b2 3d 20  |"."+Scrap$)...= |
000007c0  20 f2 53 65 74 56 61 72  69 61 62 6c 65 28 52 65  | .SetVariable(Re|
000007d0  73 75 6c 74 46 69 6c 65  24 2c 20 44 69 72 24 2b  |sultFile$, Dir$+|
000007e0  22 2e 22 2b 53 63 72 61  70 24 2b 22 2e 53 63 72  |"."+Scrap$+".Scr|
000007f0  61 70 46 69 6c 65 22 29  0d 02 bc 27 20 20 ff 28  |apFile")...'  .(|
00000800  20 22 43 44 69 72 20 22  2b 44 69 72 24 2b 22 2e  | "CDir "+Dir$+".|
00000810  22 2b 53 63 72 61 70 24  2b 22 20 31 22 20 29 0d  |"+Scrap$+" 1" ).|
00000820  02 c6 05 cc 0d 02 d0 60  20 20 85 20 a2 20 36 2c  |.......`  . . 6,|
00000830  20 22 55 6e 61 62 6c 65  20 74 6f 20 63 72 65 61  | "Unable to crea|
00000840  74 65 20 66 69 6c 65 73  20 69 6e 20 22 22 22 2b  |te files in """+|
00000850  44 69 72 24 2b 22 22 22  2c 20 65 72 72 6f 72 20  |Dir$+""", error |
00000860  72 65 74 75 72 6e 65 64  20 69 73 3a 20 22 22 22  |returned is: """|
00000870  2b 43 72 65 61 74 65 46  61 69 6c 75 72 65 24 2b  |+CreateFailure$+|
00000880  22 22 22 22 0d 02 da 05  cd 0d 02 e4 05 e1 0d 02  |""""............|
00000890  ee 05 3a 0d 02 f8 11 dd  20 f2 42 6f 6f 74 28 44  |..:..... .Boot(D|
000008a0  69 72 24 29 0d 03 02 0e  ea 20 43 75 72 72 65 6e  |ir$)..... Curren|
000008b0  74 24 0d 03 0c 24 e7 20  56 25 20 8c 20 f1 20 22  |t$...$. V% . . "|
000008c0  53 63 72 61 70 20 68 61  73 20 62 65 65 6e 20 62  |Scrap has been b|
000008d0  6f 6f 74 65 64 22 0d 03  16 31 e7 20 56 25 20 8c  |ooted"...1. V% .|
000008e0  20 f1 20 22 49 6e 76 6f  63 61 74 69 6f 6e 20 73  | . "Invocation s|
000008f0  74 72 69 6e 67 20 69 73  20 22 22 22 2b 44 69 72  |tring is """+Dir|
00000900  24 2b 22 22 22 2e 22 0d  03 20 27 44 69 72 24 3d  |$+""".".. 'Dir$=|
00000910  a4 47 53 54 72 61 6e 73  41 6e 64 43 61 6e 6e 6f  |.GSTransAndCanno|
00000920  6e 69 63 61 6c 69 73 65  28 44 69 72 24 29 0d 03  |nicalise(Dir$)..|
00000930  2a 30 e7 20 56 25 20 8c  20 f1 20 22 49 6e 76 6f  |*0. V% . . "Invo|
00000940  63 61 74 69 6f 6e 20 76  61 6c 75 65 20 69 73 20  |cation value is |
00000950  22 22 22 2b 44 69 72 24  2b 22 22 22 2e 22 0d 03  |"""+Dir$+"""."..|
00000960  34 2a 43 72 65 61 74 65  46 61 69 6c 75 72 65 24  |4*CreateFailure$|
00000970  3d a4 43 72 65 61 74 65  50 65 72 6d 69 73 73 69  |=.CreatePermissi|
00000980  6f 6e 28 44 69 72 24 29  0d 03 3e 35 e7 20 56 25  |on(Dir$)..>5. V%|
00000990  20 8c 20 f1 20 22 43 72  65 61 74 65 46 61 69 6c  | . . "CreateFail|
000009a0  75 72 65 24 3d 22 22 22  2b 43 72 65 61 74 65 46  |ure$="""+CreateF|
000009b0  61 69 6c 75 72 65 24 2b  22 22 22 2e 22 0d 03 48  |ailure$+"""."..H|
000009c0  19 e7 20 43 72 65 61 74  65 46 61 69 6c 75 72 65  |.. CreateFailure|
000009d0  24 3d 22 22 20 8c 0d 03  52 16 20 20 53 63 72 61  |$="" ...R.  Scra|
000009e0  70 24 3d a4 45 76 61 6c  75 61 74 65 0d 03 5c 33  |p$=.Evaluate..\3|
000009f0  20 20 e7 20 56 25 20 8c  20 f1 20 22 53 63 72 61  |  . V% . . "Scra|
00000a00  70 20 65 76 61 6c 75 61  74 65 73 20 74 6f 20 22  |p evaluates to "|
00000a10  22 22 2b 53 63 72 61 70  24 2b 22 22 22 2e 22 0d  |""+Scrap$+""".".|
00000a20  03 66 2a 20 20 43 75 72  72 65 6e 74 24 3d a4 52  |.f*  Current$=.R|
00000a30  65 61 64 56 61 72 69 61  62 6c 65 28 20 52 65 73  |eadVariable( Res|
00000a40  75 6c 74 44 69 72 24 20  29 0d 03 70 38 20 20 f4  |ultDir$ )..p8  .|
00000a50  20 4e 6f 77 20 63 68 65  63 6b 20 74 6f 20 73 65  | Now check to se|
00000a60  65 20 69 66 20 57 69 6d  70 24 53 63 72 61 70 44  |e if Wimp$ScrapD|
00000a70  69 72 20 69 73 20 61 6c  72 65 61 64 79 20 73 65  |ir is already se|
00000a80  74 0d 03 7a 73 20 20 e7  20 28 43 75 72 72 65 6e  |t..zs  . (Curren|
00000a90  74 24 20 3d 20 22 22 29  20 84 20 28 43 75 72 72  |t$ = "") . (Curr|
00000aa0  65 6e 74 24 20 3d 20 22  53 79 73 74 65 6d 3a 53  |ent$ = "System:S|
00000ab0  63 72 61 70 44 69 72 22  29 20 84 20 28 43 75 72  |crapDir") . (Cur|
00000ac0  72 65 6e 74 24 20 3d 20  a4 52 65 61 64 56 61 72  |rent$ = .ReadVar|
00000ad0  69 61 62 6c 65 28 20 22  53 79 73 74 65 6d 24 44  |iable( "System$D|
00000ae0  69 72 22 20 29 2b 22 2e  53 63 72 61 70 44 69 72  |ir" )+".ScrapDir|
00000af0  22 29 20 8c 0d 03 84 31  20 20 20 20 f2 53 65 74  |") ....1    .Set|
00000b00  56 61 72 69 61 62 6c 65  28 52 65 73 75 6c 74 44  |Variable(ResultD|
00000b10  69 72 24 2c 20 44 69 72  24 2b 22 2e 22 2b 53 63  |ir$, Dir$+"."+Sc|
00000b20  72 61 70 24 29 0d 03 8e  3f 20 20 20 20 f2 53 65  |rap$)...?    .Se|
00000b30  74 56 61 72 69 61 62 6c  65 28 52 65 73 75 6c 74  |tVariable(Result|
00000b40  46 69 6c 65 24 2c 20 44  69 72 24 2b 22 2e 22 2b  |File$, Dir$+"."+|
00000b50  53 63 72 61 70 24 2b 22  2e 53 63 72 61 70 46 69  |Scrap$+".ScrapFi|
00000b60  6c 65 22 29 0d 03 98 29  20 20 20 20 ff 28 20 22  |le")...)    .( "|
00000b70  43 44 69 72 20 22 2b 44  69 72 24 2b 22 2e 22 2b  |CDir "+Dir$+"."+|
00000b80  53 63 72 61 70 24 2b 22  20 31 22 20 29 0d 03 a2  |Scrap$+" 1" )...|
00000b90  07 20 20 cd 0d 03 ac 05  cc 0d 03 b6 12 20 20 f4  |.  ..........  .|
00000ba0  20 44 6f 20 6e 6f 74 68  69 6e 67 0d 03 c0 05 cd  | Do nothing.....|
00000bb0  0d 03 ca 05 e1 0d 03 d4  05 3a 0d 03 de 2c f4 20  |.........:...,. |
00000bc0  46 75 6e 63 74 69 6f 6e  20 74 6f 20 67 65 74 20  |Function to get |
00000bd0  74 68 65 20 65 6e 76 69  72 6f 6e 6d 65 6e 74 20  |the environment |
00000be0  73 74 72 69 6e 67 0d 03  e8 13 dd 20 a4 53 68 65  |string..... .She|
00000bf0  6c 6c 5f 47 65 74 45 6e  76 0d 03 f2 08 ea 20 41  |ll_GetEnv..... A|
00000c00  24 0d 03 fc 16 c8 99 20  4f 53 5f 47 65 74 45 6e  |$...... OS_GetEn|
00000c10  76 25 20 b8 20 41 24 0d  04 06 25 c8 95 20 28 c0  |v% . A$...%.. (.|
00000c20  41 24 2c 31 29 20 3c 3e  20 22 20 22 29 20 80 20  |A$,1) <> " ") . |
00000c30  28 a9 28 41 24 29 20 3c  3e 20 30 29 0d 04 10 0f  |(.(A$) <> 0)....|
00000c40  20 20 41 24 3d c1 41 24  2c 32 29 0d 04 1a 05 ce  |  A$=.A$,2).....|
00000c50  0d 04 24 13 c8 95 20 c0  41 24 2c 31 29 20 3d 20  |..$... .A$,1) = |
00000c60  22 20 22 0d 04 2e 0f 20  20 41 24 3d c1 41 24 2c  |" "....  A$=.A$,|
00000c70  32 29 0d 04 38 05 ce 0d  04 42 11 c8 95 20 c2 41  |2)..8....B... .A|
00000c80  24 2c 31 29 3d 22 20 22  0d 04 4c 0d 20 20 41 24  |$,1)=" "..L.  A$|
00000c90  3d c0 41 24 29 0d 04 56  05 ce 0d 04 60 28 e7 20  |=.A$)..V....`(. |
00000ca0  a4 53 68 65 6c 6c 5f 53  74 72 69 6e 67 5f 55 43  |.Shell_String_UC|
00000cb0  28 c0 41 24 2c 35 29 29  3d 22 2d 51 55 49 54 22  |(.A$,5))="-QUIT"|
00000cc0  20 8c 0d 04 6a 0f 20 20  41 24 3d c1 41 24 2c 37  | ...j.  A$=.A$,7|
00000cd0  29 0d 04 74 27 20 20 c8  95 20 28 c0 41 24 2c 31  |)..t'  .. (.A$,1|
00000ce0  29 20 3c 3e 20 22 20 22  29 20 80 20 28 a9 28 41  |) <> " ") . (.(A|
00000cf0  24 29 20 3c 3e 20 30 29  0d 04 7e 11 20 20 20 20  |$) <> 0)..~.    |
00000d00  41 24 3d c1 41 24 2c 32  29 0d 04 88 07 20 20 ce  |A$=.A$,2)....  .|
00000d10  0d 04 92 15 20 20 c8 95  20 c0 41 24 2c 31 29 20  |....  .. .A$,1) |
00000d20  3d 20 22 20 22 0d 04 9c  11 20 20 20 20 41 24 3d  |= " "....    A$=|
00000d30  c1 41 24 2c 32 29 0d 04  a6 07 20 20 ce 0d 04 b0  |.A$,2)....  ....|
00000d40  05 cd 0d 04 ba 07 3d 41  24 0d 04 c4 05 3a 0d 04  |......=A$....:..|
00000d50  ce 2e f4 20 46 75 6e 63  74 69 6f 6e 20 74 6f 20  |... Function to |
00000d60  63 6f 6e 76 65 72 74 20  73 74 72 69 6e 67 20 74  |convert string t|
00000d70  6f 20 75 70 70 65 72 20  63 61 73 65 0d 04 d8 1a  |o upper case....|
00000d80  dd 20 a4 53 68 65 6c 6c  5f 53 74 72 69 6e 67 5f  |. .Shell_String_|
00000d90  55 43 28 41 24 29 0d 04  e2 08 ea 20 5a 25 0d 04  |UC(A$)..... Z%..|
00000da0  ec 12 e3 20 5a 25 3d 31  20 b8 20 a9 28 41 24 29  |... Z%=1 . .(A$)|
00000db0  0d 04 f6 39 20 20 e7 20  28 97 28 c1 41 24 2c 5a  |...9  . (.(.A$,Z|
00000dc0  25 2c 31 29 29 20 3e 3d  20 97 22 61 22 29 20 80  |%,1)) >= ."a") .|
00000dd0  20 28 97 28 c1 41 24 2c  5a 25 2c 31 29 29 20 3c  | (.(.A$,Z%,1)) <|
00000de0  3d 20 97 22 7a 22 29 20  8c 0d 05 00 24 20 20 20  |= ."z") ....$   |
00000df0  20 c1 41 24 2c 5a 25 2c  31 29 3d bd 28 97 28 c1  | .A$,Z%,1)=.(.(.|
00000e00  41 24 2c 5a 25 2c 31 29  29 2d 33 32 29 0d 05 0a  |A$,Z%,1))-32)...|
00000e10  07 20 20 cd 0d 05 14 09  ed 3a 3d 41 24 0d 05 1e  |.  ......:=A$...|
00000e20  05 3a 0d 05 28 42 f4 20  46 75 6e 63 74 69 6f 6e  |.:..(B. Function|
00000e30  20 74 6f 20 73 70 6c 69  74 20 73 74 72 69 6e 67  | to split string|
00000e40  20 74 6f 20 61 72 72 61  79 20 6f 66 20 73 74 72  | to array of str|
00000e50  69 6e 67 73 20 61 6e 64  20 67 69 76 65 20 6e 75  |ings and give nu|
00000e60  6d 62 65 72 0d 05 32 1b  dd 20 a4 53 68 65 6c 6c  |mber..2.. .Shell|
00000e70  5f 41 72 72 61 79 28 41  24 28 29 2c 41 24 29 0d  |_Array(A$(),A$).|
00000e80  05 3c 3f e7 20 de 28 41  24 28 29 29 3c 3e 31 20  |.<?. .(A$())<>1 |
00000e90  85 20 a2 20 37 2c 20 22  57 72 6f 6e 67 20 73 69  |. . 7, "Wrong si|
00000ea0  7a 65 20 61 72 72 61 79  20 66 6f 72 20 53 68 65  |ze array for She|
00000eb0  6c 6c 5f 41 72 72 61 79  20 63 61 6c 6c 22 0d 05  |ll_Array call"..|
00000ec0  46 0b ea 20 41 25 2c 42  25 0d 05 50 08 41 25 3d  |F.. A%,B%..P.A%=|
00000ed0  30 0d 05 5a 0f 42 25 3d  a7 41 24 2c 22 20 22 29  |0..Z.B%=.A$," ")|
00000ee0  0d 05 64 0c c8 95 20 42  25 3c 3e 30 0d 05 6e 0b  |..d... B%<>0..n.|
00000ef0  20 20 41 25 2b 3d 31 0d  05 78 16 20 20 41 24 28  |  A%+=1..x.  A$(|
00000f00  41 25 29 3d c0 41 24 2c  42 25 2d 31 29 0d 05 82  |A%)=.A$,B%-1)...|
00000f10  12 20 20 41 24 3d c1 41  24 2c 42 25 2b 31 29 0d  |.  A$=.A$,B%+1).|
00000f20  05 8c 15 20 20 c8 95 20  c0 41 24 2c 31 29 20 3d  |...  .. .A$,1) =|
00000f30  20 22 20 22 0d 05 96 11  20 20 20 20 41 24 3d c1  | " "....    A$=.|
00000f40  41 24 2c 32 29 0d 05 a0  07 20 20 ce 0d 05 aa 11  |A$,2)....  .....|
00000f50  20 20 42 25 3d a7 41 24  2c 22 20 22 29 0d 05 b4  |  B%=.A$," ")...|
00000f60  05 ce 0d 05 be 21 e7 20  41 24 20 3c 3e 20 22 22  |.....!. A$ <> ""|
00000f70  20 8c 20 41 25 2b 3d 31  3a 20 41 24 28 41 25 29  | . A%+=1: A$(A%)|
00000f80  3d 41 24 0d 05 c8 07 3d  41 25 0d 05 d2 05 3a 0d  |=A$....=A%....:.|
00000f90  05 dc 24 dd 20 a4 47 53  54 72 61 6e 73 41 6e 64  |..$. .GSTransAnd|
00000fa0  43 61 6e 6e 6f 6e 69 63  61 6c 69 73 65 28 44 69  |Cannonicalise(Di|
00000fb0  72 24 29 0d 05 e6 0b ea  20 53 69 7a 65 25 0d 05  |r$)..... Size%..|
00000fc0  f0 41 c8 99 20 4f 53 5f  47 53 54 72 61 6e 73 25  |.A.. OS_GSTrans%|
00000fd0  2c 20 44 69 72 24 2c 20  42 75 66 66 65 72 25 2c  |, Dir$, Buffer%,|
00000fe0  20 42 75 66 66 65 72 53  69 7a 65 25 20 b8 20 2c  | BufferSize% . ,|
00000ff0  2c 20 53 69 7a 65 25 3b  20 46 6c 61 67 73 25 0d  |, Size%; Flags%.|
00001000  05 fa 18 e7 20 28 46 6c  61 67 73 25 20 80 20 32  |.... (Flags% . 2|
00001010  29 20 3d 20 30 20 8c 0d  06 04 16 20 20 42 75 66  |) = 0 .....  Buf|
00001020  66 65 72 25 3f 53 69 7a  65 25 3d 31 33 0d 06 0e  |fer%?Size%=13...|
00001030  13 20 20 44 69 72 24 3d  24 42 75 66 66 65 72 25  |.  Dir$=$Buffer%|
00001040  0d 06 18 05 cc 0d 06 22  39 20 20 85 20 a2 20 34  |......."9  . . 4|
00001050  2c 20 22 42 75 66 66 65  72 20 6f 76 65 72 66 6c  |, "Buffer overfl|
00001060  6f 77 20 69 6e 20 47 53  54 72 61 6e 73 20 6f 66  |ow in GSTrans of|
00001070  20 22 22 22 2b 44 69 72  24 2b 22 22 22 22 0d 06  | """+Dir$+""""..|
00001080  2c 05 cd 0d 06 36 48 c8  99 20 4f 53 5f 46 53 43  |,....6H.. OS_FSC|
00001090  6f 6e 74 72 6f 6c 25 2c  20 33 37 2c 20 44 69 72  |ontrol%, 37, Dir|
000010a0  24 2c 20 42 75 66 66 65  72 25 2c 20 30 2c 20 30  |$, Buffer%, 0, 0|
000010b0  2c 20 42 75 66 66 65 72  53 69 7a 65 25 20 b8 20  |, BufferSize% . |
000010c0  2c 2c 2c 2c 2c 20 53 69  7a 65 25 0d 06 40 12 e7  |,,,,, Size%..@..|
000010d0  20 53 69 7a 65 25 20 3e  3d 20 31 20 8c 0d 06 4a  | Size% >= 1 ...J|
000010e0  1d 20 20 53 69 7a 65 25  3d 42 75 66 66 65 72 53  |.  Size%=BufferS|
000010f0  69 7a 65 25 2d 53 69 7a  65 25 0d 06 54 16 20 20  |ize%-Size%..T.  |
00001100  42 75 66 66 65 72 25 3f  53 69 7a 65 25 3d 31 33  |Buffer%?Size%=13|
00001110  0d 06 5e 13 20 20 44 69  72 24 3d 24 42 75 66 66  |..^.  Dir$=$Buff|
00001120  65 72 25 0d 06 68 05 cc  0d 06 72 43 20 20 85 20  |er%..h....rC  . |
00001130  a2 20 35 2c 20 22 42 75  66 66 65 72 20 6f 76 65  |. 5, "Buffer ove|
00001140  72 66 6c 6f 77 20 69 6e  20 63 61 6e 6e 6f 6e 69  |rflow in cannoni|
00001150  63 61 6c 69 73 61 74 69  6f 6e 20 6f 66 20 22 22  |calisation of ""|
00001160  22 2b 44 69 72 24 2b 22  22 22 22 0d 06 7c 05 cd  |"+Dir$+""""..|..|
00001170  0d 06 86 51 f4 20 45 6e  73 75 72 65 20 53 63 72  |...Q. Ensure Scr|
00001180  61 70 44 69 72 73 20 65  78 69 73 74 73 2c 20 62  |apDirs exists, b|
00001190  75 74 20 69 67 6e 6f 72  65 20 61 6e 79 20 65 72  |ut ignore any er|
000011a0  72 6f 72 20 61 73 20 46  53 4c 6f 63 6b 20 6d 61  |ror as FSLock ma|
000011b0  79 20 68 61 76 65 20 69  6e 74 65 72 66 65 72 65  |y have interfere|
000011c0  64 0d 06 90 1e c8 99 20  58 4f 53 5f 46 69 6c 65  |d...... XOS_File|
000011d0  25 2c 20 38 2c 20 44 69  72 24 2c 2c 2c 20 30 0d  |%, 8, Dir$,,, 0.|
000011e0  06 9a 09 3d 44 69 72 24  0d 06 a4 05 3a 0d 06 ae  |...=Dir$....:...|
000011f0  1f dd 20 a4 43 72 65 61  74 65 50 65 72 6d 69 73  |.. .CreatePermis|
00001200  73 69 6f 6e 28 50 6c 61  63 65 24 29 0d 06 b8 3c  |sion(Place$)...<|
00001210  ea 20 52 65 73 75 6c 74  24 2c 20 54 79 70 65 25  |. Result$, Type%|
00001220  2c 20 55 49 44 25 2c 20  55 49 44 24 2c 20 45 72  |, UID%, UID$, Er|
00001230  72 6f 72 25 2c 20 46 6c  61 67 73 25 3a 20 52 65  |ror%, Flags%: Re|
00001240  73 75 6c 74 24 3d 22 22  0d 06 c2 22 c8 99 20 4f  |sult$=""...".. O|
00001250  53 5f 46 69 6c 65 25 2c  20 35 2c 20 50 6c 61 63  |S_File%, 5, Plac|
00001260  65 24 20 b8 20 54 79 70  65 25 0d 06 cc 1d e7 20  |e$ . Type%..... |
00001270  56 25 20 8c 20 f1 20 22  54 79 70 65 20 69 73 20  |V% . . "Type is |
00001280  22 2b 54 79 70 65 25 0d  06 d6 17 e7 20 28 54 79  |"+Type%..... (Ty|
00001290  70 65 25 20 80 20 32 29  20 3d 20 32 20 8c 0d 06  |pe% . 2) = 2 ...|
000012a0  e0 07 20 20 f5 0d 06 ea  27 20 20 20 20 c8 99 20  |..  ....'    .. |
000012b0  4f 53 5f 52 65 61 64 4d  6f 6e 6f 74 6f 6e 69 63  |OS_ReadMonotonic|
000012c0  54 69 6d 65 25 20 b8 20  55 49 44 25 0d 06 f4 20  |Time% . UID%... |
000012d0  20 20 20 20 55 49 44 24  3d 50 6c 61 63 65 24 2b  |    UID$=Place$+|
000012e0  22 2e 22 2b c3 7e 28 55  49 44 25 29 0d 06 fe 25  |"."+.~(UID%)...%|
000012f0  20 20 20 20 e7 20 56 25  20 8c 20 f1 20 22 55 49  |    . V% . . "UI|
00001300  44 24 3d 22 22 22 2b 55  49 44 24 2b 22 22 22 2e  |D$="""+UID$+""".|
00001310  22 0d 07 08 24 20 20 20  20 c8 99 20 4f 53 5f 46  |"...$    .. OS_F|
00001320  69 6c 65 25 2c 20 35 2c  20 55 49 44 24 20 b8 20  |ile%, 5, UID$ . |
00001330  54 79 70 65 25 0d 07 12  0f 20 20 fd 20 54 79 70  |Type%....  . Typ|
00001340  65 25 3d 30 0d 07 1c 2e  20 20 e7 20 56 25 20 8c  |e%=0....  . V% .|
00001350  20 f1 20 22 55 49 44 20  73 65 6c 65 63 74 65 64  | . "UID selected|
00001360  20 69 73 20 22 22 22 2b  55 49 44 24 2b 22 22 22  | is """+UID$+"""|
00001370  2e 22 0d 07 26 38 20 20  c8 99 20 58 4f 53 5f 46  |."..&8  .. XOS_F|
00001380  69 6c 65 25 2c 20 37 2c  20 55 49 44 24 2c 20 30  |ile%, 7, UID$, 0|
00001390  2c 20 30 2c 20 30 2c 20  31 20 b8 20 45 72 72 6f  |, 0, 0, 1 . Erro|
000013a0  72 25 3b 20 46 6c 61 67  73 25 0d 07 30 26 20 20  |r%; Flags%..0&  |
000013b0  e7 20 56 25 20 8c 20 f1  20 22 43 72 65 61 74 65  |. V% . . "Create|
000013c0  64 20 22 22 22 2b 55 49  44 24 2b 22 22 22 2e 22  |d """+UID$+"""."|
000013d0  0d 07 3a 1b 20 20 e7 20  28 46 6c 61 67 73 25 20  |..:.  . (Flags% |
000013e0  80 20 31 29 20 3c 3e 20  31 20 8c 0d 07 44 1c 20  |. 1) <> 1 ...D. |
000013f0  20 20 20 c8 99 20 4f 53  5f 46 69 6c 65 25 2c 20  |   .. OS_File%, |
00001400  36 2c 20 55 49 44 24 0d  07 4e 07 20 20 cc 0d 07  |6, UID$..N.  ...|
00001410  58 11 20 20 20 20 45 72  72 6f 72 25 2b 3d 34 0d  |X.    Error%+=4.|
00001420  07 62 18 20 20 20 20 c8  95 20 45 72 72 6f 72 25  |.b.    .. Error%|
00001430  3f 30 20 3c 3e 20 30 0d  07 6c 25 20 20 20 20 20  |?0 <> 0..l%     |
00001440  20 52 65 73 75 6c 74 24  3d 52 65 73 75 6c 74 24  | Result$=Result$|
00001450  2b bd 28 45 72 72 6f 72  25 3f 30 29 0d 07 76 13  |+.(Error%?0)..v.|
00001460  20 20 20 20 20 20 45 72  72 6f 72 25 2b 3d 31 0d  |      Error%+=1.|
00001470  07 80 09 20 20 20 20 ce  0d 07 8a 07 20 20 cd 0d  |...    .....  ..|
00001480  07 94 05 cc 0d 07 9e 3c  20 20 52 65 73 75 6c 74  |.......<  Result|
00001490  24 3d 22 54 68 65 20 6f  62 6a 65 63 74 20 22 22  |$="The object ""|
000014a0  22 2b 50 6c 61 63 65 24  2b 22 22 22 20 69 73 20  |"+Place$+""" is |
000014b0  6e 6f 74 20 61 20 64 69  72 65 63 74 6f 72 79 22  |not a directory"|
000014c0  0d 07 a8 05 cd 0d 07 b2  0c 3d 52 65 73 75 6c 74  |.........=Result|
000014d0  24 0d 07 bc 05 3a 0d 07  c6 0f dd 20 a4 45 76 61  |$....:..... .Eva|
000014e0  6c 75 61 74 65 0d 07 d0  41 ea 20 52 65 73 75 6c  |luate...A. Resul|
000014f0  74 24 2c 20 45 78 69 73  74 61 6e 63 65 25 2c 20  |t$, Existance%, |
00001500  53 74 61 74 69 6f 6e 25  2c 20 4e 65 74 77 6f 72  |Station%, Networ|
00001510  6b 25 2c 20 46 6c 61 67  73 25 3a 20 52 65 73 75  |k%, Flags%: Resu|
00001520  6c 74 24 3d 22 22 0d 07  da 4b c8 99 20 58 4f 53  |lt$=""...K.. XOS|
00001530  5f 52 65 61 64 56 61 72  56 61 6c 25 2c 20 22 49  |_ReadVarVal%, "I|
00001540  4e 65 74 24 4c 6f 63 61  6c 41 64 64 72 22 2c 20  |Net$LocalAddr", |
00001550  42 75 66 66 65 72 25 2c  20 2d 31 2c 20 30 2c 20  |Buffer%, -1, 0, |
00001560  30 20 b8 20 2c 2c 20 45  78 69 73 74 61 6e 63 65  |0 . ,, Existance|
00001570  25 0d 07 e4 23 e7 20 56  25 20 f1 20 22 45 78 69  |%...#. V% . "Exi|
00001580  73 74 61 6e 63 65 25 3d  22 2b 45 78 69 73 74 61  |stance%="+Exista|
00001590  6e 63 65 25 0d 07 ee 16  e7 20 45 78 69 73 74 61  |nce%..... Exista|
000015a0  6e 63 65 25 20 3c 20 30  20 8c 0d 07 f8 58 20 20  |nce% < 0 ....X  |
000015b0  c8 99 20 4f 53 5f 52 65  61 64 56 61 72 56 61 6c  |.. OS_ReadVarVal|
000015c0  25 2c 20 22 49 4e 65 74  24 4c 6f 63 61 6c 41 64  |%, "INet$LocalAd|
000015d0  64 72 22 2c 20 42 75 66  66 65 72 25 2c 20 42 75  |dr", Buffer%, Bu|
000015e0  66 66 65 72 53 69 7a 65  25 2c 20 30 2c 20 30 20  |fferSize%, 0, 0 |
000015f0  b8 20 2c 2c 20 53 69 7a  65 25 2c 2c 20 54 79 70  |. ,, Size%,, Typ|
00001600  65 25 0d 08 02 10 20 20  c8 8e 20 54 79 70 65 25  |e%....  .. Type%|
00001610  20 ca 0d 08 0c 38 20 20  20 20 c9 20 30 3a 20 42  | ....8    . 0: B|
00001620  75 66 66 65 72 25 3f 53  69 7a 65 25 3d 31 33 3a  |uffer%?Size%=13:|
00001630  20 52 65 73 75 6c 74 24  3d 4e 65 74 77 6f 72 6b  | Result$=Network|
00001640  24 2b 24 42 75 66 66 65  72 25 0d 08 16 4a 20 20  |$+$Buffer%...J  |
00001650  20 20 c9 20 31 3a 20 85  20 a2 20 31 2c 20 22 54  |  . 1: . . 1, "T|
00001660  68 65 20 76 61 72 69 61  62 6c 65 20 49 4e 65 74  |he variable INet|
00001670  24 4c 6f 63 61 6c 41 64  64 72 20 69 73 20 61 20  |$LocalAddr is a |
00001680  6e 75 6d 62 65 72 20 6e  6f 74 20 61 20 73 74 72  |number not a str|
00001690  69 6e 67 22 0d 08 20 49  20 20 20 20 c9 20 32 3a  |ing".. I    . 2:|
000016a0  20 85 20 a2 20 32 2c 20  22 54 68 65 20 76 61 72  | . . 2, "The var|
000016b0  69 61 62 6c 65 20 49 4e  65 74 24 4c 6f 63 61 6c  |iable INet$Local|
000016c0  41 64 64 72 20 69 73 20  61 20 6d 61 63 72 6f 20  |Addr is a macro |
000016d0  6e 6f 74 20 61 20 73 74  72 69 6e 67 22 0d 08 2a  |not a string"..*|
000016e0  43 20 20 20 20 7f 3a 20  85 20 a2 20 33 2c 20 22  |C    .: . . 3, "|
000016f0  54 68 65 20 76 61 72 69  61 62 6c 65 20 49 4e 65  |The variable INe|
00001700  74 24 4c 6f 63 61 6c 41  64 64 72 20 68 61 73 20  |t$LocalAddr has |
00001710  61 6e 20 75 6e 6b 6e 6f  77 6e 20 74 79 70 65 22  |an unknown type"|
00001720  0d 08 34 07 20 20 cb 0d  08 3e 05 cc 0d 08 48 2b  |..4.  ...>....H+|
00001730  20 20 e7 20 56 25 20 f1  20 22 49 4e 65 74 24 4c  |  . V% . "INet$L|
00001740  6f 63 61 6c 41 64 64 72  20 64 6f 65 73 6e 27 74  |ocalAddr doesn't|
00001750  20 65 78 69 73 74 22 0d  08 52 05 cd 0d 08 5c 14  | exist"..R....\.|
00001760  e7 20 52 65 73 75 6c 74  24 20 3d 20 22 22 20 8c  |. Result$ = "" .|
00001770  0d 08 66 45 20 20 c8 99  20 58 45 63 6f 6e 65 74  |..fE  .. XEconet|
00001780  5f 52 65 61 64 4c 6f 63  61 6c 53 74 61 74 69 6f  |_ReadLocalStatio|
00001790  6e 41 6e 64 4e 65 74 25  20 b8 20 53 74 61 74 69  |nAndNet% . Stati|
000017a0  6f 6e 25 2c 20 4e 65 74  77 6f 72 6b 25 3b 20 46  |on%, Network%; F|
000017b0  6c 61 67 73 25 0d 08 70  37 20 20 e7 20 56 25 20  |lags%..p7  . V% |
000017c0  f1 20 22 53 74 61 74 69  6f 6e 25 3d 22 2b 53 74  |. "Station%="+St|
000017d0  61 74 69 6f 6e 25 2b 22  20 4e 65 74 77 6f 72 6b  |ation%+" Network|
000017e0  25 3d 22 2b 4e 65 74 77  6f 72 6b 25 0d 08 7a 1a  |%="+Network%..z.|
000017f0  20 20 e7 20 28 46 6c 61  67 73 25 20 80 20 31 29  |  . (Flags% . 1)|
00001800  20 3d 20 30 20 8c 0d 08  84 46 20 20 20 20 52 65  | = 0 ....F    Re|
00001810  73 75 6c 74 24 3d 4e 65  74 77 6f 72 6b 24 2b c2  |sult$=Network$+.|
00001820  22 30 30 22 2b c3 28 4e  65 74 77 6f 72 6b 25 29  |"00"+.(Network%)|
00001830  2c 33 29 2b 22 21 22 2b  c2 22 30 30 22 2b c3 28  |,3)+"!"+."00"+.(|
00001840  53 74 61 74 69 6f 6e 25  29 2c 33 29 0d 08 8e 07  |Station%),3)....|
00001850  20 20 cd 0d 08 98 05 cd  0d 08 a2 14 e7 20 52 65  |  ........... Re|
00001860  73 75 6c 74 24 20 3d 20  22 22 20 8c 0d 08 ac 16  |sult$ = "" .....|
00001870  20 20 52 65 73 75 6c 74  24 3d 44 65 66 61 75 6c  |  Result$=Defaul|
00001880  74 24 0d 08 b6 05 cd 0d  08 c0 0c 3d 52 65 73 75  |t$.........=Resu|
00001890  6c 74 24 0d 08 ca 05 3a  0d 08 d4 27 dd 20 f2 53  |lt$....:...'. .S|
000018a0  65 74 56 61 72 69 61 62  6c 65 28 20 56 61 72 69  |etVariable( Vari|
000018b0  61 62 6c 65 24 2c 20 56  61 6c 75 65 24 20 29 0d  |able$, Value$ ).|
000018c0  08 de 39 e7 20 56 25 20  8c 20 f1 20 22 53 65 74  |..9. V% . . "Set|
000018d0  74 69 6e 67 20 3c 22 2b  56 61 72 69 61 62 6c 65  |ting <"+Variable|
000018e0  24 2b 22 3e 20 74 6f 20  22 22 22 2b 56 61 6c 75  |$+"> to """+Valu|
000018f0  65 24 2b 22 22 22 2e 22  0d 08 e8 38 c8 99 20 4f  |e$+"""."...8.. O|
00001900  53 5f 53 65 74 56 61 72  56 61 6c 25 2c 20 56 61  |S_SetVarVal%, Va|
00001910  72 69 61 62 6c 65 24 2c  20 56 61 6c 75 65 24 2c  |riable$, Value$,|
00001920  20 a9 28 56 61 6c 75 65  24 29 2c 20 30 2c 20 34  | .(Value$), 0, 4|
00001930  0d 08 f2 05 e1 0d 08 fc  05 3a 0d 09 06 20 dd 20  |.........:... . |
00001940  a4 52 65 61 64 56 61 72  69 61 62 6c 65 28 20 56  |.ReadVariable( V|
00001950  61 72 69 61 62 6c 65 24  20 29 0d 09 10 25 ea 20  |ariable$ )...%. |
00001960  52 65 73 75 6c 74 24 2c  20 45 78 69 73 74 61 6e  |Result$, Existan|
00001970  63 65 25 3a 20 52 65 73  75 6c 74 24 3d 22 22 0d  |ce%: Result$="".|
00001980  09 1a 44 c8 99 20 58 4f  53 5f 52 65 61 64 56 61  |..D.. XOS_ReadVa|
00001990  72 56 61 6c 25 2c 20 56  61 72 69 61 62 6c 65 24  |rVal%, Variable$|
000019a0  2c 20 42 75 66 66 65 72  25 2c 20 2d 31 2c 20 30  |, Buffer%, -1, 0|
000019b0  2c 20 33 20 b8 20 2c 2c  20 45 78 69 73 74 61 6e  |, 3 . ,, Existan|
000019c0  63 65 25 0d 09 24 16 e7  20 45 78 69 73 74 61 6e  |ce%..$.. Existan|
000019d0  63 65 25 20 3c 20 30 20  8c 0d 09 2e 51 20 20 c8  |ce% < 0 ....Q  .|
000019e0  99 20 4f 53 5f 52 65 61  64 56 61 72 56 61 6c 25  |. OS_ReadVarVal%|
000019f0  2c 20 56 61 72 69 61 62  6c 65 24 2c 20 42 75 66  |, Variable$, Buf|
00001a00  66 65 72 25 2c 20 42 75  66 66 65 72 53 69 7a 65  |fer%, BufferSize|
00001a10  25 2c 20 30 2c 20 33 20  b8 20 2c 2c 20 53 69 7a  |%, 0, 3 . ,, Siz|
00001a20  65 25 2c 2c 20 54 79 70  65 25 0d 09 38 10 20 20  |e%,, Type%..8.  |
00001a30  c8 8e 20 54 79 70 65 25  20 ca 0d 09 42 2f 20 20  |.. Type% ...B/  |
00001a40  20 20 c9 20 30 3a 20 42  75 66 66 65 72 25 3f 53  |  . 0: Buffer%?S|
00001a50  69 7a 65 25 3d 31 33 3a  20 52 65 73 75 6c 74 24  |ize%=13: Result$|
00001a60  3d 24 42 75 66 66 65 72  25 0d 09 4c 45 20 20 20  |=$Buffer%..LE   |
00001a70  20 7f 3a 20 85 20 a2 20  33 2c 20 22 54 68 65 20  | .: . . 3, "The |
00001a80  76 61 72 69 61 62 6c 65  20 22 22 22 2b 56 61 72  |variable """+Var|
00001a90  69 61 62 6c 65 2b 22 22  22 20 68 61 73 20 61 6e  |iable+""" has an|
00001aa0  20 75 6e 6b 6e 6f 77 6e  20 74 79 70 65 22 0d 09  | unknown type"..|
00001ab0  56 07 20 20 cb 0d 09 60  05 cd 0d 09 6a 0c 3d 52  |V.  ...`....j.=R|
00001ac0  65 73 75 6c 74 24 0d ff                           |esult$..|
00001ac8