text stringlengths 0 99.6k |
|---|
GET previous track,sector and change |
link to 0,255 |
PRINT "archive has been repaired." |
ENDIF |
ENDIF |
DONE fixing archive. |
ARC VERSION 2.20 PAGE - 48 |
ARC TRICKS AND TIPS. |
1) Manipulating Archives. |
If you were to use a disk doctor to look at an archive, |
you would notice that every file in the archive begins at |
the beginning of a CBM disk sector and ends at the end of a |
sector. This fact can be used to advantage, and will be in |
future ARCs, in a number of ways. |
First of all, it makes it possible to break an archive |
up into a number of smaller archives simply by manipulating |
the directory and a few track,sector links. Since it is not |
necessary to move any data, this should be a relatively fast |
proceedure. You could split an archive in two with a disk |
doctor as follows: |
1) create a dummy file on the same disk as the archive. |
2) scratch the dummy file. |
3) locate the archive and follow the sector links until |
you see the filename of the archive entry which is |
to be the first filename in the second archive. |
4) jot down the track and sector you are looking at. |
5) backup to the previous sector and change the link |
to 0,255 |
6) get back to the directory and locate the dummy |
file from (1) |
7) change the filetype from (6) to program (130) |
8) change the track,sector to the ones you jotted |
down in (4) |
You now have two separate archives. The block count for |
these files will not be correct in the directory, and should |
be fixed, but no errors should arise if they are not. |
A similar proceedure could be used to delete an archive |
entry. Simply manipulate the sector links to point around |
the entry to be deleted and then validate the disk. |
You could also re-arrange the order of the archive |
entries in an archive, append one archive to another, |
transfer an archive entry to another archive and so on and |
so forth... All of this could be done without having to move |
a single byte of data! |
ARC VERSION 2.20 PAGE - 49 |
2) Random Access Archives. |
An archive could be made random access in each of two |
ways. |
The first method would be to follow the track,sector |
links and read the number of CBM disk blocks in each archive |
entry. This information could then be used to calculate |
where each archive entry begins. |
A second method would be to convert the archive to a |
relative file. Simply create the archive by normal |
proceedures, and then use ARC to archive the archive you |
just created. Now load and run your favorite disk sector |
editor and view the first sector of the archive of the |
archive. Change the file's type to "R" for RELative in the |
archive header. (You will see the filetype as a "P" two |
bytes before the filename) Now all you have to do is |
unarchive it and it will become a relative file with record |
length 254 and can be accessed randomly. |
But why would you want a random access archive |
anyway??? |
We plan to write a simple un-squash routine that can be |
accessed as a subroutine by a BASIC or Machine Language |
programmer. Unfortuneately the CRUNCH routines require a |
great deal of workspace (about 28K) and would not be of much |
use to most applications. However, a small routine could |
reside inside about 2K bytes which would un-pack, un- |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.