Home » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199201.adf » !ArcFS_ArcFSExtra » ArcConv

ArcConv

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 » Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199201.adf » !ArcFS_ArcFSExtra
Filename: ArcConv
Read OK:
File size: 0712 bytes
Load address: 0000
Exec address: 0000
Duplicates

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

File contents
   10 REM >ArcConv
   20 REM Old to New Archive format convertor
   30 REM for use with ArcFS 0.40 and later
   40 *RMEnsure ArcFS 0.40 Error Requires ArcFS v0.40 or later
   50 MODE 0
   60 INPUT "Old format Archive name ? "O$
   70 X=OPENINO$
   80 DIM newarc &100+EXT#X
   90 OSCLI"OpenArchive "+O$+" ArcConv"
  100 A%=0:REPEAT SYS"ArcFS_ArchiveInfo",A% TO name$,,headers%:A%+=1:UNTIL name$="ArcConv" OR A%=5
  110 IF name$<>"ArcConv" Error Failed to open archive
  120 headerp%=headers%
  130 level%=0
  140 pointer%=newarc
  150 $pointer%="Archive":pointer%?7=0:pointer%+=8
  160 !pointer%=40:pointer%!4=100:pointer%+=8
  170 FOR P%=pointer% TO pointer%+76 STEP 4
  180 !P%=0
  190 NEXT
  200 pointer%+=80
  210 headstart%=pointer%
  220 end=FALSE:WHILE level%>-1
  230 FOR P%=0 TO 32 STEP 4
  240 !(pointer%+P%)=!(headerp%+P%)
  250 NEXT
  260 IF (?pointer% AND &7F)=0 THEN
  270 level%-=1
  280 ELSE
  290 IF (!(pointer%+32) AND &80000000)=&80000000 THEN
  300 !(pointer%+32)=!(pointer%+32)-headers%
  310 !(pointer%+12)=&FFFFFFFF
  320 !(pointer%+16)=?(pointer%+16)+&FFFFFF00
  330 !(pointer%+28)=&FFFFFFFF
  340 level%+=1
  350 ENDIF
  360 ENDIF
  370 pointer%+=36:headerp%+=36
  380 ENDWHILE
  390 newarc!8=pointer%-headstart%
  400 newarc!12=pointer%-newarc
  410 mem%=pointer%
  420 datastart%=pointer%
  430 pointer%=headstart%
  440 level%=0
  450 WHILE level%>-1
  460 IF (?pointer% AND &7F)=0 THEN
  470 level%-=1
  480 ELSE
  490 IF (!(pointer%+32) AND &80000000)=&80000000 THEN
  500 PRINT STRING$(level%," ");:A%=1:REPEAT PRINT CHR$(?(pointer%+A%));:A%+=1:UNTIL ?(pointer%+A%-1)=0
  510 PRINT
  520 level%+=1
  530 ELSE
  540 PRINT STRING$(level%," ");:A%=1:REPEAT PRINT CHR$(?(pointer%+A%));:A%+=1:UNTIL ?(pointer%+A%-1)<32
  550 FOR B%=A% TO 12:PRINT" ";:NEXT
  560 PRINTRIGHT$("00000000"+STR$~(mem%-datastart%),8)
  570 offset%=mem%-datastart%
  580 SYS"OS_GBPB",3,X,mem%,!(pointer%+28),!(pointer%+32) TO ,,mem%
  590 !(pointer%+32)=offset%
  600 ENDIF
  610 ENDIF
  620 pointer%+=36
  630 ENDWHILE
  640 INPUT"New format Archive name ? "N$
  650 OSCLI"Save "+N$+" "+STR$~newarc+" "+STR$~mem%
  660 OSCLI"SetType "+N$+" &DDC"
  670 *CloseArc. ArcConv

 � >ArcConv
* � Old to New Archive format convertor
( � for use with ArcFS 0.40 and later
(= *RMEnsure ArcFS 0.40 Error Requires ArcFS v0.40 or later
2 � 0
<% � "Old format Archive name ? "O$
F
 X=�O$
P � newarc &100+�#X
Z" �"OpenArchive "+O$+" ArcConv"
dU A%=0:� ș"ArcFS_ArchiveInfo",A% � name$,,headers%:A%+=1:� name$="ArcConv" � A%=5
n4 � name$<>"ArcConv" Error Failed to open archive
x headerp%=headers%
�
 level%=0
� pointer%=newarc
�1 $pointer%="Archive":pointer%?7=0:pointer%+=8
�, !pointer%=40:pointer%!4=100:pointer%+=8
�$ � P%=pointer% � pointer%+76 � 4
�
 !P%=0
� �
� pointer%+=80
� headstart%=pointer%
� end=�:ȕ level%>-1
� � P%=0 � 32 � 4
�" !(pointer%+P%)=!(headerp%+P%)
� �
 � (?pointer% � &7F)=0 �
 level%-=1
 �
"/ � (!(pointer%+32) � &80000000)=&80000000 �
,+ !(pointer%+32)=!(pointer%+32)-headers%
6 !(pointer%+12)=&FFFFFFFF
@, !(pointer%+16)=?(pointer%+16)+&FFFFFF00
J !(pointer%+28)=&FFFFFFFF
T level%+=1
^ �
h �
r pointer%+=36:headerp%+=36
| �
�! newarc!8=pointer%-headstart%
� newarc!12=pointer%-newarc
� mem%=pointer%
� datastart%=pointer%
� pointer%=headstart%
�
 level%=0
� ȕ level%>-1
� � (?pointer% � &7F)=0 �
� level%-=1
� �
�/ � (!(pointer%+32) � &80000000)=&80000000 �
�K � �level%," ");:A%=1:� � �(?(pointer%+A%));:A%+=1:� ?(pointer%+A%-1)=0
� �
 level%+=1
 �
L � �level%," ");:A%=1:� � �(?(pointer%+A%));:A%+=1:� ?(pointer%+A%-1)<32
& � B%=A% � 12:�" ";:�
0( ��"00000000"+�~(mem%-datastart%),8)
: offset%=mem%-datastart%
D@ ș"OS_GBPB",3,X,mem%,!(pointer%+28),!(pointer%+32) � ,,mem%
N !(pointer%+32)=offset%
X �
b �
l pointer%+=36
v �
�$ �"New format Archive name ? "N$
�( �"Save "+N$+" "+�~newarc+" "+�~mem%
� �"SetType "+N$+" &DDC"
� *CloseArc. ArcConv
�
00000000  0d 00 0a 0f 20 f4 20 3e  41 72 63 43 6f 6e 76 0d  |.... . >ArcConv.|
00000010  00 14 2a 20 f4 20 4f 6c  64 20 74 6f 20 4e 65 77  |..* . Old to New|
00000020  20 41 72 63 68 69 76 65  20 66 6f 72 6d 61 74 20  | Archive format |
00000030  63 6f 6e 76 65 72 74 6f  72 0d 00 1e 28 20 f4 20  |convertor...( . |
00000040  66 6f 72 20 75 73 65 20  77 69 74 68 20 41 72 63  |for use with Arc|
00000050  46 53 20 30 2e 34 30 20  61 6e 64 20 6c 61 74 65  |FS 0.40 and late|
00000060  72 0d 00 28 3d 20 2a 52  4d 45 6e 73 75 72 65 20  |r..(= *RMEnsure |
00000070  41 72 63 46 53 20 30 2e  34 30 20 45 72 72 6f 72  |ArcFS 0.40 Error|
00000080  20 52 65 71 75 69 72 65  73 20 41 72 63 46 53 20  | Requires ArcFS |
00000090  76 30 2e 34 30 20 6f 72  20 6c 61 74 65 72 0d 00  |v0.40 or later..|
000000a0  32 08 20 eb 20 30 0d 00  3c 25 20 e8 20 22 4f 6c  |2. . 0..<% . "Ol|
000000b0  64 20 66 6f 72 6d 61 74  20 41 72 63 68 69 76 65  |d format Archive|
000000c0  20 6e 61 6d 65 20 3f 20  22 4f 24 0d 00 46 0a 20  | name ? "O$..F. |
000000d0  58 3d 8e 4f 24 0d 00 50  16 20 de 20 6e 65 77 61  |X=.O$..P. . newa|
000000e0  72 63 20 26 31 30 30 2b  a2 23 58 0d 00 5a 22 20  |rc &100+.#X..Z" |
000000f0  ff 22 4f 70 65 6e 41 72  63 68 69 76 65 20 22 2b  |."OpenArchive "+|
00000100  4f 24 2b 22 20 41 72 63  43 6f 6e 76 22 0d 00 64  |O$+" ArcConv"..d|
00000110  55 20 41 25 3d 30 3a f5  20 c8 99 22 41 72 63 46  |U A%=0:. .."ArcF|
00000120  53 5f 41 72 63 68 69 76  65 49 6e 66 6f 22 2c 41  |S_ArchiveInfo",A|
00000130  25 20 b8 20 6e 61 6d 65  24 2c 2c 68 65 61 64 65  |% . name$,,heade|
00000140  72 73 25 3a 41 25 2b 3d  31 3a fd 20 6e 61 6d 65  |rs%:A%+=1:. name|
00000150  24 3d 22 41 72 63 43 6f  6e 76 22 20 84 20 41 25  |$="ArcConv" . A%|
00000160  3d 35 0d 00 6e 34 20 e7  20 6e 61 6d 65 24 3c 3e  |=5..n4 . name$<>|
00000170  22 41 72 63 43 6f 6e 76  22 20 45 72 72 6f 72 20  |"ArcConv" Error |
00000180  46 61 69 6c 65 64 20 74  6f 20 6f 70 65 6e 20 61  |Failed to open a|
00000190  72 63 68 69 76 65 0d 00  78 16 20 68 65 61 64 65  |rchive..x. heade|
000001a0  72 70 25 3d 68 65 61 64  65 72 73 25 0d 00 82 0d  |rp%=headers%....|
000001b0  20 6c 65 76 65 6c 25 3d  30 0d 00 8c 14 20 70 6f  | level%=0.... po|
000001c0  69 6e 74 65 72 25 3d 6e  65 77 61 72 63 0d 00 96  |inter%=newarc...|
000001d0  31 20 24 70 6f 69 6e 74  65 72 25 3d 22 41 72 63  |1 $pointer%="Arc|
000001e0  68 69 76 65 22 3a 70 6f  69 6e 74 65 72 25 3f 37  |hive":pointer%?7|
000001f0  3d 30 3a 70 6f 69 6e 74  65 72 25 2b 3d 38 0d 00  |=0:pointer%+=8..|
00000200  a0 2c 20 21 70 6f 69 6e  74 65 72 25 3d 34 30 3a  |., !pointer%=40:|
00000210  70 6f 69 6e 74 65 72 25  21 34 3d 31 30 30 3a 70  |pointer%!4=100:p|
00000220  6f 69 6e 74 65 72 25 2b  3d 38 0d 00 aa 24 20 e3  |ointer%+=8...$ .|
00000230  20 50 25 3d 70 6f 69 6e  74 65 72 25 20 b8 20 70  | P%=pointer% . p|
00000240  6f 69 6e 74 65 72 25 2b  37 36 20 88 20 34 0d 00  |ointer%+76 . 4..|
00000250  b4 0a 20 21 50 25 3d 30  0d 00 be 06 20 ed 0d 00  |.. !P%=0.... ...|
00000260  c8 11 20 70 6f 69 6e 74  65 72 25 2b 3d 38 30 0d  |.. pointer%+=80.|
00000270  00 d2 18 20 68 65 61 64  73 74 61 72 74 25 3d 70  |... headstart%=p|
00000280  6f 69 6e 74 65 72 25 0d  00 dc 17 20 65 6e 64 3d  |ointer%.... end=|
00000290  a3 3a c8 95 20 6c 65 76  65 6c 25 3e 2d 31 0d 00  |.:.. level%>-1..|
000002a0  e6 14 20 e3 20 50 25 3d  30 20 b8 20 33 32 20 88  |.. . P%=0 . 32 .|
000002b0  20 34 0d 00 f0 22 20 21  28 70 6f 69 6e 74 65 72  | 4..." !(pointer|
000002c0  25 2b 50 25 29 3d 21 28  68 65 61 64 65 72 70 25  |%+P%)=!(headerp%|
000002d0  2b 50 25 29 0d 00 fa 06  20 ed 0d 01 04 1c 20 e7  |+P%).... ..... .|
000002e0  20 28 3f 70 6f 69 6e 74  65 72 25 20 80 20 26 37  | (?pointer% . &7|
000002f0  46 29 3d 30 20 8c 0d 01  0e 0e 20 6c 65 76 65 6c  |F)=0 ..... level|
00000300  25 2d 3d 31 0d 01 18 06  20 cc 0d 01 22 2f 20 e7  |%-=1.... ..."/ .|
00000310  20 28 21 28 70 6f 69 6e  74 65 72 25 2b 33 32 29  | (!(pointer%+32)|
00000320  20 80 20 26 38 30 30 30  30 30 30 30 29 3d 26 38  | . &80000000)=&8|
00000330  30 30 30 30 30 30 30 20  8c 0d 01 2c 2b 20 21 28  |0000000 ...,+ !(|
00000340  70 6f 69 6e 74 65 72 25  2b 33 32 29 3d 21 28 70  |pointer%+32)=!(p|
00000350  6f 69 6e 74 65 72 25 2b  33 32 29 2d 68 65 61 64  |ointer%+32)-head|
00000360  65 72 73 25 0d 01 36 1d  20 21 28 70 6f 69 6e 74  |ers%..6. !(point|
00000370  65 72 25 2b 31 32 29 3d  26 46 46 46 46 46 46 46  |er%+12)=&FFFFFFF|
00000380  46 0d 01 40 2c 20 21 28  70 6f 69 6e 74 65 72 25  |F..@, !(pointer%|
00000390  2b 31 36 29 3d 3f 28 70  6f 69 6e 74 65 72 25 2b  |+16)=?(pointer%+|
000003a0  31 36 29 2b 26 46 46 46  46 46 46 30 30 0d 01 4a  |16)+&FFFFFF00..J|
000003b0  1d 20 21 28 70 6f 69 6e  74 65 72 25 2b 32 38 29  |. !(pointer%+28)|
000003c0  3d 26 46 46 46 46 46 46  46 46 0d 01 54 0e 20 6c  |=&FFFFFFFF..T. l|
000003d0  65 76 65 6c 25 2b 3d 31  0d 01 5e 06 20 cd 0d 01  |evel%+=1..^. ...|
000003e0  68 06 20 cd 0d 01 72 1e  20 70 6f 69 6e 74 65 72  |h. ...r. pointer|
000003f0  25 2b 3d 33 36 3a 68 65  61 64 65 72 70 25 2b 3d  |%+=36:headerp%+=|
00000400  33 36 0d 01 7c 06 20 ce  0d 01 86 21 20 6e 65 77  |36..|. ....! new|
00000410  61 72 63 21 38 3d 70 6f  69 6e 74 65 72 25 2d 68  |arc!8=pointer%-h|
00000420  65 61 64 73 74 61 72 74  25 0d 01 90 1e 20 6e 65  |eadstart%.... ne|
00000430  77 61 72 63 21 31 32 3d  70 6f 69 6e 74 65 72 25  |warc!12=pointer%|
00000440  2d 6e 65 77 61 72 63 0d  01 9a 12 20 6d 65 6d 25  |-newarc.... mem%|
00000450  3d 70 6f 69 6e 74 65 72  25 0d 01 a4 18 20 64 61  |=pointer%.... da|
00000460  74 61 73 74 61 72 74 25  3d 70 6f 69 6e 74 65 72  |tastart%=pointer|
00000470  25 0d 01 ae 18 20 70 6f  69 6e 74 65 72 25 3d 68  |%.... pointer%=h|
00000480  65 61 64 73 74 61 72 74  25 0d 01 b8 0d 20 6c 65  |eadstart%.... le|
00000490  76 65 6c 25 3d 30 0d 01  c2 11 20 c8 95 20 6c 65  |vel%=0.... .. le|
000004a0  76 65 6c 25 3e 2d 31 0d  01 cc 1c 20 e7 20 28 3f  |vel%>-1.... . (?|
000004b0  70 6f 69 6e 74 65 72 25  20 80 20 26 37 46 29 3d  |pointer% . &7F)=|
000004c0  30 20 8c 0d 01 d6 0e 20  6c 65 76 65 6c 25 2d 3d  |0 ..... level%-=|
000004d0  31 0d 01 e0 06 20 cc 0d  01 ea 2f 20 e7 20 28 21  |1.... ..../ . (!|
000004e0  28 70 6f 69 6e 74 65 72  25 2b 33 32 29 20 80 20  |(pointer%+32) . |
000004f0  26 38 30 30 30 30 30 30  30 29 3d 26 38 30 30 30  |&80000000)=&8000|
00000500  30 30 30 30 20 8c 0d 01  f4 4b 20 f1 20 c4 6c 65  |0000 ....K . .le|
00000510  76 65 6c 25 2c 22 20 22  29 3b 3a 41 25 3d 31 3a  |vel%," ");:A%=1:|
00000520  f5 20 f1 20 bd 28 3f 28  70 6f 69 6e 74 65 72 25  |. . .(?(pointer%|
00000530  2b 41 25 29 29 3b 3a 41  25 2b 3d 31 3a fd 20 3f  |+A%));:A%+=1:. ?|
00000540  28 70 6f 69 6e 74 65 72  25 2b 41 25 2d 31 29 3d  |(pointer%+A%-1)=|
00000550  30 0d 01 fe 06 20 f1 0d  02 08 0e 20 6c 65 76 65  |0.... ..... leve|
00000560  6c 25 2b 3d 31 0d 02 12  06 20 cc 0d 02 1c 4c 20  |l%+=1.... ....L |
00000570  f1 20 c4 6c 65 76 65 6c  25 2c 22 20 22 29 3b 3a  |. .level%," ");:|
00000580  41 25 3d 31 3a f5 20 f1  20 bd 28 3f 28 70 6f 69  |A%=1:. . .(?(poi|
00000590  6e 74 65 72 25 2b 41 25  29 29 3b 3a 41 25 2b 3d  |nter%+A%));:A%+=|
000005a0  31 3a fd 20 3f 28 70 6f  69 6e 74 65 72 25 2b 41  |1:. ?(pointer%+A|
000005b0  25 2d 31 29 3c 33 32 0d  02 26 19 20 e3 20 42 25  |%-1)<32..&. . B%|
000005c0  3d 41 25 20 b8 20 31 32  3a f1 22 20 22 3b 3a ed  |=A% . 12:." ";:.|
000005d0  0d 02 30 28 20 f1 c2 22  30 30 30 30 30 30 30 30  |..0( .."00000000|
000005e0  22 2b c3 7e 28 6d 65 6d  25 2d 64 61 74 61 73 74  |"+.~(mem%-datast|
000005f0  61 72 74 25 29 2c 38 29  0d 02 3a 1c 20 6f 66 66  |art%),8)..:. off|
00000600  73 65 74 25 3d 6d 65 6d  25 2d 64 61 74 61 73 74  |set%=mem%-datast|
00000610  61 72 74 25 0d 02 44 40  20 c8 99 22 4f 53 5f 47  |art%..D@ .."OS_G|
00000620  42 50 42 22 2c 33 2c 58  2c 6d 65 6d 25 2c 21 28  |BPB",3,X,mem%,!(|
00000630  70 6f 69 6e 74 65 72 25  2b 32 38 29 2c 21 28 70  |pointer%+28),!(p|
00000640  6f 69 6e 74 65 72 25 2b  33 32 29 20 b8 20 2c 2c  |ointer%+32) . ,,|
00000650  6d 65 6d 25 0d 02 4e 1b  20 21 28 70 6f 69 6e 74  |mem%..N. !(point|
00000660  65 72 25 2b 33 32 29 3d  6f 66 66 73 65 74 25 0d  |er%+32)=offset%.|
00000670  02 58 06 20 cd 0d 02 62  06 20 cd 0d 02 6c 11 20  |.X. ...b. ...l. |
00000680  70 6f 69 6e 74 65 72 25  2b 3d 33 36 0d 02 76 06  |pointer%+=36..v.|
00000690  20 ce 0d 02 80 24 20 e8  22 4e 65 77 20 66 6f 72  | ....$ ."New for|
000006a0  6d 61 74 20 41 72 63 68  69 76 65 20 6e 61 6d 65  |mat Archive name|
000006b0  20 3f 20 22 4e 24 0d 02  8a 28 20 ff 22 53 61 76  | ? "N$...( ."Sav|
000006c0  65 20 22 2b 4e 24 2b 22  20 22 2b c3 7e 6e 65 77  |e "+N$+" "+.~new|
000006d0  61 72 63 2b 22 20 22 2b  c3 7e 6d 65 6d 25 0d 02  |arc+" "+.~mem%..|
000006e0  94 1b 20 ff 22 53 65 74  54 79 70 65 20 22 2b 4e  |.. ."SetType "+N|
000006f0  24 2b 22 20 26 44 44 43  22 0d 02 9e 17 20 2a 43  |$+" &DDC".... *C|
00000700  6c 6f 73 65 41 72 63 2e  20 41 72 63 43 6f 6e 76  |loseArc. ArcConv|
00000710  0d ff                                             |..|
00000712