Home » Archimedes archive » Archimedes World » AW-1996-03-Disc 2.adf » !HardBack_HardBack » !Backup/FileEns2

!Backup/FileEns2

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 » Archimedes World » AW-1996-03-Disc 2.adf » !HardBack_HardBack
Filename: !Backup/FileEns2
Read OK:
File size: 0361 bytes
Load address: 0000
Exec address: 0000
Duplicates

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

File contents
   10DIM blk1% 1024
   20DIM q% 256
   30$q%="file/a/g,command/a/g"
   40SYS "OS_GetEnv" TO f$
   50j$=FNgetword(f$,3)
   60com$=MID$(f$,ps%)
   70SYS "OS_ReadArgs",q%,com$,blk1%,1024
   80IF (!blk1%)<>0 THEN 
   90w%=!blk1%
   91l%=?(w%)
  100l%=l% OR ((w%?1)<<8)
  110file$=""
  120FOR a%=0 TO l%-1
  130file$+=CHR$(?(w%+2+a%))
  140NEXT a%
  150ELSE
  160file$=""
  170ENDIF
  180IF (blk1%!4)<>0 THEN
  190w%=blk1%!4
  191c%=?w%
  200c%=c% OR ((w%?1)<<8)
  210ifnot$=""
  220FOR a%=0 TO c%-1
  230ifnot$+=CHR$(?(w%+2+a%))
  240NEXT a%
  250ELSE
  260ifnot$=""
  261ENDIF
  270SYS "OS_File",5,file$ TO type%
  271IF type%=2 OR type%=0 THEN OSCLIifnot$
  272END
  280
  290DEFFNgetword(l$,w%)
  300IF w%>0 THEN
  310ps%=1
  320pe%=INSTR(l$," ")-1
  330wrd%=0
  340wuns%=TRUE
  350REPEAT
  360wrd%+=1
  370wrd$=MID$(l$,ps%,(pe%+1)-ps%)
  380ps%=pe%+2
  390pe%=INSTR(l$," ",ps%)-1
  400IF wuns% AND pe%=-1 pe%=LENl$:wuns%=FALSE
  410REMIF pe%<0 AND ps%<2 wrd%=w%:wrd$=""
  420IF wrd%<w% AND pe%<0 AND wuns%=FALSE THEN wrd%=w%:wrd$=""
  430UNTIL wrd%=w%
  440ELSE
  450wrd$=""
  460ENDIF
  470=wrd$

� blk1% 1024
� q% 256
$q%="file/a/g,command/a/g"
(ș "OS_GetEnv" � f$
2j$=�getword(f$,3)
<com$=�f$,ps%)
F'ș "OS_ReadArgs",q%,com$,blk1%,1024
P� (!blk1%)<>0 � 
Z
w%=!blk1%
[l%=?(w%)
dl%=l% � ((w%?1)<<8)
nfile$=""
x� a%=0 � l%-1
�file$+=�(?(w%+2+a%))
�� a%
��
�file$=""
��
�� (blk1%!4)<>0 �
�w%=blk1%!4
�
c%=?w%
�c%=c% � ((w%?1)<<8)
�
ifnot$=""
�� a%=0 � c%-1
�ifnot$+=�(?(w%+2+a%))
�� a%
��

ifnot$=""
�
 ș "OS_File",5,file$ � type%
!� type%=2 � type%=0 � �ifnot$
�

"ݤgetword(l$,w%)
,� w%>0 �
6	ps%=1
@pe%=�l$," ")-1
J
wrd%=0
Twuns%=�
^�
hwrd%+=1
rwrd$=�l$,ps%,(pe%+1)-ps%)
|
ps%=pe%+2
�pe%=�l$," ",ps%)-1
�$� wuns% � pe%=-1 pe%=�l$:wuns%=�
�'�IF pe%<0 AND ps%<2 wrd%=w%:wrd$=""
�1� wrd%<w% � pe%<0 � wuns%=� � wrd%=w%:wrd$=""
�
� wrd%=w%
��
�wrd$=""
��
�	=wrd$
�
00000000  0d 00 0a 10 de 20 62 6c  6b 31 25 20 31 30 32 34  |..... blk1% 1024|
00000010  0d 00 14 0c de 20 71 25  20 32 35 36 0d 00 1e 1e  |..... q% 256....|
00000020  24 71 25 3d 22 66 69 6c  65 2f 61 2f 67 2c 63 6f  |$q%="file/a/g,co|
00000030  6d 6d 61 6e 64 2f 61 2f  67 22 0d 00 28 17 c8 99  |mmand/a/g"..(...|
00000040  20 22 4f 53 5f 47 65 74  45 6e 76 22 20 b8 20 66  | "OS_GetEnv" . f|
00000050  24 0d 00 32 15 6a 24 3d  a4 67 65 74 77 6f 72 64  |$..2.j$=.getword|
00000060  28 66 24 2c 33 29 0d 00  3c 11 63 6f 6d 24 3d c1  |(f$,3)..<.com$=.|
00000070  66 24 2c 70 73 25 29 0d  00 46 27 c8 99 20 22 4f  |f$,ps%)..F'.. "O|
00000080  53 5f 52 65 61 64 41 72  67 73 22 2c 71 25 2c 63  |S_ReadArgs",q%,c|
00000090  6f 6d 24 2c 62 6c 6b 31  25 2c 31 30 32 34 0d 00  |om$,blk1%,1024..|
000000a0  50 14 e7 20 28 21 62 6c  6b 31 25 29 3c 3e 30 20  |P.. (!blk1%)<>0 |
000000b0  8c 20 0d 00 5a 0d 77 25  3d 21 62 6c 6b 31 25 0d  |. ..Z.w%=!blk1%.|
000000c0  00 5b 0c 6c 25 3d 3f 28  77 25 29 0d 00 64 17 6c  |.[.l%=?(w%)..d.l|
000000d0  25 3d 6c 25 20 84 20 28  28 77 25 3f 31 29 3c 3c  |%=l% . ((w%?1)<<|
000000e0  38 29 0d 00 6e 0c 66 69  6c 65 24 3d 22 22 0d 00  |8)..n.file$=""..|
000000f0  78 11 e3 20 61 25 3d 30  20 b8 20 6c 25 2d 31 0d  |x.. a%=0 . l%-1.|
00000100  00 82 18 66 69 6c 65 24  2b 3d bd 28 3f 28 77 25  |...file$+=.(?(w%|
00000110  2b 32 2b 61 25 29 29 0d  00 8c 08 ed 20 61 25 0d  |+2+a%))..... a%.|
00000120  00 96 05 cc 0d 00 a0 0c  66 69 6c 65 24 3d 22 22  |........file$=""|
00000130  0d 00 aa 05 cd 0d 00 b4  14 e7 20 28 62 6c 6b 31  |.......... (blk1|
00000140  25 21 34 29 3c 3e 30 20  8c 0d 00 be 0e 77 25 3d  |%!4)<>0 .....w%=|
00000150  62 6c 6b 31 25 21 34 0d  00 bf 0a 63 25 3d 3f 77  |blk1%!4....c%=?w|
00000160  25 0d 00 c8 17 63 25 3d  63 25 20 84 20 28 28 77  |%....c%=c% . ((w|
00000170  25 3f 31 29 3c 3c 38 29  0d 00 d2 0d 69 66 6e 6f  |%?1)<<8)....ifno|
00000180  74 24 3d 22 22 0d 00 dc  11 e3 20 61 25 3d 30 20  |t$=""..... a%=0 |
00000190  b8 20 63 25 2d 31 0d 00  e6 19 69 66 6e 6f 74 24  |. c%-1....ifnot$|
000001a0  2b 3d bd 28 3f 28 77 25  2b 32 2b 61 25 29 29 0d  |+=.(?(w%+2+a%)).|
000001b0  00 f0 08 ed 20 61 25 0d  00 fa 05 cc 0d 01 04 0d  |.... a%.........|
000001c0  69 66 6e 6f 74 24 3d 22  22 0d 01 05 05 cd 0d 01  |ifnot$="".......|
000001d0  0e 20 c8 99 20 22 4f 53  5f 46 69 6c 65 22 2c 35  |. .. "OS_File",5|
000001e0  2c 66 69 6c 65 24 20 b8  20 74 79 70 65 25 0d 01  |,file$ . type%..|
000001f0  0f 21 e7 20 74 79 70 65  25 3d 32 20 84 20 74 79  |.!. type%=2 . ty|
00000200  70 65 25 3d 30 20 8c 20  ff 69 66 6e 6f 74 24 0d  |pe%=0 . .ifnot$.|
00000210  01 10 05 e0 0d 01 18 04  0d 01 22 14 dd a4 67 65  |.........."...ge|
00000220  74 77 6f 72 64 28 6c 24  2c 77 25 29 0d 01 2c 0c  |tword(l$,w%)..,.|
00000230  e7 20 77 25 3e 30 20 8c  0d 01 36 09 70 73 25 3d  |. w%>0 ...6.ps%=|
00000240  31 0d 01 40 12 70 65 25  3d a7 6c 24 2c 22 20 22  |1..@.pe%=.l$," "|
00000250  29 2d 31 0d 01 4a 0a 77  72 64 25 3d 30 0d 01 54  |)-1..J.wrd%=0..T|
00000260  0b 77 75 6e 73 25 3d b9  0d 01 5e 05 f5 0d 01 68  |.wuns%=...^....h|
00000270  0b 77 72 64 25 2b 3d 31  0d 01 72 1d 77 72 64 24  |.wrd%+=1..r.wrd$|
00000280  3d c1 6c 24 2c 70 73 25  2c 28 70 65 25 2b 31 29  |=.l$,ps%,(pe%+1)|
00000290  2d 70 73 25 29 0d 01 7c  0d 70 73 25 3d 70 65 25  |-ps%)..|.ps%=pe%|
000002a0  2b 32 0d 01 86 16 70 65  25 3d a7 6c 24 2c 22 20  |+2....pe%=.l$," |
000002b0  22 2c 70 73 25 29 2d 31  0d 01 90 24 e7 20 77 75  |",ps%)-1...$. wu|
000002c0  6e 73 25 20 80 20 70 65  25 3d 2d 31 20 70 65 25  |ns% . pe%=-1 pe%|
000002d0  3d a9 6c 24 3a 77 75 6e  73 25 3d a3 0d 01 9a 27  |=.l$:wuns%=....'|
000002e0  f4 49 46 20 70 65 25 3c  30 20 41 4e 44 20 70 73  |.IF pe%<0 AND ps|
000002f0  25 3c 32 20 77 72 64 25  3d 77 25 3a 77 72 64 24  |%<2 wrd%=w%:wrd$|
00000300  3d 22 22 0d 01 a4 31 e7  20 77 72 64 25 3c 77 25  |=""...1. wrd%<w%|
00000310  20 80 20 70 65 25 3c 30  20 80 20 77 75 6e 73 25  | . pe%<0 . wuns%|
00000320  3d a3 20 8c 20 77 72 64  25 3d 77 25 3a 77 72 64  |=. . wrd%=w%:wrd|
00000330  24 3d 22 22 0d 01 ae 0d  fd 20 77 72 64 25 3d 77  |$=""..... wrd%=w|
00000340  25 0d 01 b8 05 cc 0d 01  c2 0b 77 72 64 24 3d 22  |%.........wrd$="|
00000350  22 0d 01 cc 05 cd 0d 01  d6 09 3d 77 72 64 24 0d  |".........=wrd$.|
00000360  ff                                                |.|
00000361