> GetBack 1.06 maintain%= P FS-Retriever Ver. 1.06 LH/af - Copyright Acorn Computers plc 1985 and 1987 6initialize: Date display repaired JGH 12/03/2002  initmc oscli("OPT 1") (B : :fs(dfile%):#0:fs(net%):#0: =17 :" at ";: 2S$title%="File Server Archiver Retrieval Utility":12'''$title%'ĩ$title%,"*")' <: Ftab%=6:tab1%=2 P.'tab1%)"C"tab%)"Catalogue Archive disc" ZFtab1%)"B"tab%)"Retrieve both files and"'" sub-directories" d*tab1%)"F"tab%)"Retrieve files only" ntab1%)"Q"tab%)"Quit" x%'"Your choice"'" :";:t$=: t$; $t$="*" ""t$:oscli(t$):0:' +command%=("CBFQ*cbfq",t$))5:command% * command%=4 ''" ** Finished **"': $ command%=2 command%=3 df@ ffs(net%):X%=&70:A%=0:Y%=0:R%= osargs% &FF: R%<>net% '"Net filing system must be present": C command%=2 ''"Retrieving both files and"'"sub-directories" - command%=3 ''"Retrieving files only" H X%=command("Pathname of directory to retrieve from"):$opath%=$var% G X%=command("Pathname of directory to retrieve to"):$topath%=$var% Z fs(net%): $topath%<>"": examine(topath%)<>directory:" directory not found":dC@ 4 :"Object specifier"'" :"$oname%: $oname%<10  $oname%=0:$oname%="*" : w:''"Select filing system used for archive (A=Adfs, D=Disc)"'" :";:dfile%=:(dfile%);:f%="ADad",dfile%): f% 8 f% 2 dfile%=adfs%:"dfs" dfile%=disc%:"isc"  B $prompt%="ADFS drive": dfile%=disc% $prompt%=$prompt%,2)  command($prompt%) 6 $ok%="0123": dfile%=adfs% $ok%="0145aAbBeEfF" " $ok%,$var%) ,< "AaBbEeFf",$var%) T%=($var% &5F)-&11:$var%=(T%) 6Nfs(dfile%): dfile%=disc% oscli("Dr. :"+$var%) oscli("Dir :"+$var%) @YX%=&70:A%=0:Y%=0:R%= osargs% &FF: R%<>dfile% "Filing system must be present": J&command("Name of archive file") T#h%=open($var%,&40): h% DJA ^3':$sfile%=$var%:r%=examine(var%):mlen%=cb%!&A hstart%=0:Retrieve r DF@: END |: Retrieve  X%   command%<>1: fs(dfile%) @ X%=0::path%?X%=#h%:X%=X%+1:(path%?(X%-1)=&0D) X%>&100 5 X%>&100:"File fault, retreive aborted":CAUSE $ Y%=X%:flag%=:mlen%=mlen%-(X%)  X%=tail(path%)  s%=0  & name%?s%=path%?(X%+s%):s%=s%+1 \ s%=Y%-X%-1:path%?X%=&0D:name%?s%=&0D: $name%,".")=1 $name%=$name%,( $name%-1))  stype%=#h%:seq%=#h% ) stype%=1 stype%=2 not$:DXB &< X%=2 18:cb1%?X%=#h%::slen%=cb1%!&A:mlen%=mlen%-19 0O start% seq%<>1 "This is not the first disc in the sequence":#h%: : name(name%,stype%,cb1%) Dl stype%=directory sortdirectory(path%,name%,command%,cb1%) copydata(path%,name%,slen%,command%) N mlen%=0 Xfs(dfile%):#h% b l: v.sortdirectory(path%,name%,command%,cb1%) ! command%=1 command%=3  fs(net%) > $path%<>"":$buffer%=$path%+"."+$name%::$buffer%=$name% )tail%=eq(buffer%,opath%): tail%=0:  $tail%="":  $opath%<>0:tail%=tail%+1 " $topath%:$tail%="."+$tail%  $buffer3%=$topath%+$tail%  $buffer3%::  r%=examine(buffer3%) = r%=0 '"Creating "+$buffer3%':oscli("CDIR "+$buffer3%)  r%=0 oscli("Access "+$buffer3%):cb2%!0=&13004000:cb2%!4=&05000000:cb2%?&8=cb1%?&F:cb2%?9=cb1%?&10:$(cb2%+&A)=$buffer3%:X%=cb2%:Y%=X% &100:A%=&14: osword%:oscli("Access "+$buffer3%+" L")  r%=file :::  '$buffer3%;  $path%=tails(buffer3%) O command("exists as a file - Please rename the file as "+$path%) d}B  oscli("ACC. "+$buffer3%+" wr"):oscli("REN. "+$buffer3%+" "+$path%+$var%):?cb%=var%:cb%?1=var% &100:X%=cb%:Y%=X% &100:A%=4: osfile%   * 4: >ݤexamine(n%) H !cb%=n% RX%=cb% 256:Y%=cb% 256 \A%=5 fR%=(osfile%) &FF k acc%=cb%?&E p=R% z: ݤopen($n%,a%) X%=n% 256:Y%=n% 256  A%=a% # call(osfind%) error(0):=  =?tempa : close(h%) +Y%=h%:A%=0: call(osfind%) error(0)  : name(name%,stype%,block%) > $path%="" $buffer%=$name% $buffer%=$path%+"."+$name% H stype%=directory "Dir. "$buffer%" "; "File "$buffer%" "; "size(block%,block%?&E,stype%)  : $size(A%,E%,stype%) .@%=&A0A:pos%=80 8$attstr%=access(E%,stype%) B$dat%=dates(A%) LQ$load1%=display(A%!2,8):$exec1%=display(A%!6,8):$length1%=display(A%!&A,8) V] pos%)+$load1%;pos%+10)+$exec1%;pos%+20)+$length1%;pos%+30)+$attstr%;pos%+40)+$dat% ` j: t initmc ~ pass%=0 2 2  P%=space% [ OPT pass% '.trap sta tempa:stx tempx:sty tempy /lda brkvec:sta copy:lda brkvec+1:sta copy+1 $tsx:stx sp:lda #0:sta error_flag #lda# (brkcode &FF):sta brkvec %lda# (brkcode /&100):sta brkvec+1 .lda tempa:ldx tempx:ldy tempy:jsr indirect sta tempa:\ return A <.restore lda copy:sta brkvec:lda copy+1:sta brkvec+1:rts \ -.brkcode ldy#0:lda (&FD),Y:sta error_flag ldx sp:txs:iny  8.loop lda (&FD),Y:beq exit:sta errmsg,Y:iny:bne loop *.exit lda #13:sta errmsg,Y:jmp restore .indirect jmp (go) (] 2 < F: Pinitialize Zdosfind%=&FFCE:osgbpb%=&FFD1:osargs%=&FFDA:osfile%=&FFDD:osword%=&FFF1:osbyte%=&FFF4:oscli%=&FFF7 \ cb% 30,cb1% 30,cb2% &130,name% 50,name1% 50,errmsg (30),path%&100,topath%&100,space% &100,var% &100,n% &100,buffer% &200,buffer2% &100,buffer3% &100 ` title% &40,opath% &80,oname% &10,ok% &20,sfile% &30,prompt% &80,attstr% &100,load1% &20,exec1% &20,length1% &20,dat% &20,string% &100 dfile=1:directory=2 n @%=3:15 xbrkvec=&202:oldbrk=!brkvec sp=&70:copy=&71 Gtempa=copy+2:tempx=tempa+1:tempy=tempx+1:go=tempy+1:error_flag=go+2 Kadfs%=8:disc%=4:net%=5:seq%=1:seq1%=0:size_left%=0:to_write%=0:fsize%=0 / ZZ% -1:size%=-ZZ%-&1300: buffer1% size% fs(net%):dfile%=0 ¬$="This is not an archive file"  : oscli($buffer2%) X%=buffer2%:Y%=X% &100  call(oscli%) error(0) " ,: 6ݤcall(addr) @'?go=addr:go?1=(addr &FF00) &100 J trap T=?error_flag<>0 ^error(trap%) h& ?error_flag=trap% $(errmsg+1) r |: ݤcommand($string%) $var%="":'$string%'" :";  ""$var% 3 $var%,1)=" " $var%=$var%,$var%-1): tdF ) $var%=&20 $var%=$var%,2): tnF ( $var%="*" oscli($var%): tPF =($var%<>0) : +fs(f%):A%=&8F:X%=&12:Y%=f%:osbyte%: : *copydata(path%,name%,slen%,command%)  T%,tail%,match%:match%= &> $path%<>"":$buffer%=$path%+"."+$name%::$buffer%=$name% 0 command%=1 DNG 5 fs(net%) :? tail%=eq(buffer%,opath%): tail%:match%=eq(name%,oname%) < match% :DNG =' $opath%=0:T%=tail%::T%=tail%+1 >. command%=3 $T%<>$name%:match%=:DNG E? $topath%<>0:$buffer3%=$topath%+"."+$T%::$buffer3%=$T% I'"Copying "$buffer%," as "$buffer3% N bV command%=1 match%=0 ftype%=0:copyit%=0 copyit%=1:ftype%=examine(buffer3%) vI ftype%=0 ftype%=file:copynothing(buffer3%,copyit%,command%):1: ' ftype%=directory renamesave:0  : ,copynothing(buffer3%,copyit%,command%)  copyit%=0 to%=0: dZG  ftype%=0:dFG D (acc% &88) ( maintain%):" Locked":copyit%=0:to%=0:dZG 5 (acc% &88):oscli("ACCESS "+$buffer3%+" WR")  to%=open($buffer3%,&80) 2 to% "Unable to copy "+$buffer3%:copyit%=0  G MLEN AND SLEN CHANGE BY AMOUNT SO ALL CONDITIONALS ARE CONSTANT ߐ mlen%<>slen% : size%slen% : size%: H4getput(amount%,dfshandle%,adfshandle%,copyit%) R command%<>1:fs(dfile%) \7 copyit% :#dfshandle%=#dfshandle%+amount%:tXH f8?cb%=dfshandle%:cb%!1=buffer1%:cb%!5=amount%:cb%!9=0 p&X%=cb%:Y%=X% &100:A%=4: osgbpb% z fs(net%) 9?cb%=adfshandle%:cb%!1=buffer1%:cb%!5=amount%:cb%!9=0 &X%=cb%:Y%=X% &100:A%=2: osgbpb% +mlen%=mlen%-amount%:slen%=slen%-amount%  : split_it sperror%:sperror%= fs(dfile%)  stype1%=#h%:seq1%=#h%:#h% ? $path% $buffer1%=$path%+"."+$name% $buffer1%=$name%  ]:"Please insert next disc in sequence"'"and press RETURN":resp$=:resp$=&0D:start%=-1  M $prompt%="New DFS drive": dfile%=adfs% $prompt%="New ADFS drive"  command($prompt%) 4$ok%="0123": dfile%=adfs% $ok%="0145AaBbEeFf" $$ok%,$var%) .< "AaBbEeFf",$var%) T%=($var% &5F)-&11:$var%=(T%) 8Nfs(dfile%): dfile%=disc% oscli("Dr. :"+$var%) oscli("Dir :"+$var%) B:h%=open($sfile%,&40): h% $buffer%=$sfile% DtI L3r%=examine(buffer%):mlen%=cb%!&A:tempml%=mlen% V=X%=0::name1%?X%=#h%:X%=X%+1:name1%?(X%-1)=&0D X%>254 Z X%>254:not$:DtI [9mlen%=mlen%-X%: $name1%=$buffer1% slen%=0 DtI `3stype%=#h%: stype%=stype1% slen%=0 DtI j7seq%=#h%:mlen%=mlen%-2: seq%=seq1%+1 sperror%= tD sperror% '"That is not the next disc in the sequence"':#h% ~ sperror%= Nslen%=0 #h%=0:mlen%=tempml% X%=2 18:cb1%?X%=#h%::mlen%=mlen%-17  : renamesave $path%=tails(buffer3%) P'$buffer3%;:command("exists as a directory - save this file as "+$path%) $buffer3%=$path%+$var%  # (ݤaccess(atts1%,x%) 2 sgg$:sgg$="" < x%=directory sgg$="D" F atts1% 8 sgg$=sgg$+"L" P atts1% 2 sgg$=sgg$+"W" Z atts1% 1 sgg$=sgg$+"R" dsgg$=sgg$+"/" n" atts1% &20 sgg$=sgg$+"W" x" atts1% &10 sgg$=sgg$+"R" =sgg$ : ݤdates(A%) S=d0(A%?1531,2)+"/"+d0(A%?1615,2)+"/"+d0(1981+(A%?16)16+((A%?15)&E0)2,4) : ݤeq(A%,B%)  $B%="":=A%  ? (?A% &5F)=(?B% &5F) ?B%="#":A%=A%+1:B%=B%+1:d\J  ?B%="*": :1:= " A%=A%+1: ?A%="." ?A%=13 " B%=B%+1: ?B%="." ?B%=13  ?A%=13 ?B%=13  ?B%<>13:= ?A%=13 ?A%=".":=A%:=0  : ^#ݤd0(A%,N%)="00000000"+A%,N%) h#ݤh0(A%,N%)="0000000"+~A%,N%)  tail(N%)  L%:L%=$N%  L%=L%-1  N%?L%=&2E L%=0  =L%   tails(N%)  L%,T%,path$ 6 L%=tail(N%):T%=N%?L%:N%?L%=13:path$=$N%:N%?L%=T%  path$:path$=path$+"." & =path$