MaxZ80 - Chapter 8

There are several other programs written in Turbo Pascal here. One of
them is FATCAT. FATCAT is a disc file cataloguing system.

There are a couple of provisos you need to be aware of if you use
FATCAT. One is you need to place a 0K file that has a name like -.203
or -.314 in the drive / user area you want to catalog. You accomplish
this by logging into the drive / user area you want to put files in (and
catalogue), for example, by typing

C3:

and then you issue the command

SAVE 0 -.303

FATCAT can catalogue members of library files (.LBRs). If you have
several library files in a given drive / user area, there may be more
library members than FATCAT can handle. The workaround is to spread your
LBRs over several different drive / user areas.

To run FATCAT, type FATCAT after logging into either A0: or B0: or C0:.
There's a file named STANDARD.CFG on each drive that tells FATCAT that
you want to catalogue the files on that drive.

Then, from the menu that comes up, type H, which means you want to
catalogue the files on the Hard disc. Then, after hitting the Esc key in
response to a question about looking at the .CFG file, just hit the C
key to Continue up to 16 times, one for each user area. If you have lots
of files in a given user area, you can type N, for Next, to see the file
names. Type Esc as soon as you've done as many user areas as you want.
Then type U, to Update the catalogue with the new files it has
discovered. Again, hit the Esc key to get past a warning about having
the correct discs in your drive. You'll be shown a screen that says what
got added, removed etc. Sometimes this report misses a few but the
catalogue itself is properly updated. At the end of the update report
you'll see that a few files get closed or erased. You'll be asked to Hit
Any Key and then a final step that involves re-indexing the library file
part of the database takes place.

The two files MASTER.RCX and MASTER.LCX on A0: are the "regular" and
"library" catalogue files managed by FATCAT.

If you issue the command

DIR MASTER.* /S

you'll learn that there are actually 5, not 2, files supporting the
FATCAT database, but 3 of them have been made "system" files. Typically,
files are made "system" files when you don't want to see them when you
issue DIR commands and also when they are used / updated by application
programs or the operating system itself, not you. Do you see how the
middle letter of the file type is highlighted for the "system" files?
This is not only a hint as to how such files are identified as "system"
files but it also is the first time we've mentioned Z-System's ability
to use its Terminal Capabilities segment, which holds, among other
things, the highlight / dim commands for the terminal. We'll hear more
about this elsewhere in the tutorial.

The O (letter) pick from FATCAT's menu will Output the catalogue.

I wrote a program called SUMDIG.MSE which adds the digits of a number
you enter and then displays the remainder (from 0 to 2) when you divide
this sum by 3. This was written because there's a interesting fact about
numbers which says that if the sum of the digits in a number is
divisible by 3, then so is the number. I had a huge number that I needed
to test so I wrote this program. I must have deleted this program after
testing it because when I wanted to use it recently, I couldn't find it.
Fortunately I had a copy of it in the DOS environment, so I re-IMPORTed
it and then catalogued it. Doing this will help me locate it in the
future.

Here are several screen shots showing FATCAT and OUTCAT, which is a
separate .COM file, like FATCAT.COM, which can be run on its own, in
action.


------------------------------------------------------------------------------ Main FATCAT Menu ------------------------------------------------------------------------------ ----> C> to Catalog Floppy Disks ----> H> to Catalog A Hard Disk ----> D> to Delete a Disk from the catalog ----> T> to Toggle cleanup mode now: < On> ----> P> to change default Parameters ----> U> to Update catalog ----> O> to Output catalog in FATCAT format ----> X> to Output catalog in X-REF format ----> M> to Make new .RCX and .LCX files ----> R> to ReIndex new .RIX and .LIX files ----> I> to output disk Information ----> to quit FATCAT : : ------------------------------------------------------------------------------
------------------------------------------------------------------------------ FATCAT Clean-Up Mode - Drive A: - User 0 - Page 2 of 2 - 98 FILES FILE USER FILE USER FILE USER FILE USER ---- ---- ---- ---- ---- ---- ---- ---- OLDMACDO.MSE 0 SPACES . 0 ZLOAD10 .CFG 0 OUTCAT .000 0 STANDARD.CFG 0 ZLOAD10 .COM 0 OUTCAT .001 0 SUMDIG .MSE 0 OUTCAT .COM 0 TEMPCON3.MSE 0 PACKLIST. 0 TERMINAL.COM 0 PRIME .MSE 0 TEST .MSE 0 PRIME4G .MSE 0 TYPE .COM 0 PRIMEX .MSE 0 X .COM 0 QSORT .MSE 0 Z3LOC .TXT 0 QUATRIS .COM 0 Z80 .MSE 0 QUATRIS .SCO 0 ZDB .COM 0 REMIND .REM 0 ZDB24 .CFG 0 ROMAN10 .COM 0 ZDB24 .HLP 0 ROMAN10 .LBR 0 ZDE .COM 0 SELFGEN .MSE 0 ZDT .DTA 0 SOLVE .MSE 0 ZFILER .CMD 0 Move: U>p/D>own Page: N>ext/P>revious A>dd File E>rase File R>ename File Size in K> C>ontinue Abort
Now reading record # 665 Catalog contains 620 Regular Files and 1677 Library Files. Closing A:MASTER.LIX Closing A:MASTER.RIX Erasing A:MASTER.TCX Hit Any Key. Making A:MASTER.LCX from A:MASTER.LIX 1677 File Names Indexed Making A:MASTER.RCX from A:MASTER.RIX 620 File Names Indexed Hit Any Key.
File User Disk Library File User Disk Library 99BOT .MSE 0 - .100 | ASCII .MSE 0 - .100 CALC .MSE 0 - .100 | COCONUT .MSE 0 - .100 COW .MSE 0 - .100 | COWS .MSE 0 - .100 EASTER .MSE 0 - .100 | FRACTION.MSE 0 - .100 HANOI .MSE 0 - .100 | HELLO .MSE 0 - .100 HELP .MSE 0 - .100 | HILBERTC.MSE 0 - .100 INFIX .MSE 0 - .100 | NUMBER .MSE 0 - .100 NUMBERS .MSE 0 - .100 | OLDMACDO.MSE 0 - .100 PRIME .MSE 0 - .100 | PRIME4G .MSE 0 - .100 PRIMEX .MSE 0 - .100 | QSORT .MSE 0 - .100 SELFGEN .MSE 0 - .100 | SOLVE .MSE 0 - .100 SUMDIG .MSE 0 - .100 | TEMPCON3.MSE 0 - .100 TEST .MSE 0 - .100 | Z80 .MSE 0 - .100 Files Matching ????????.MSE on disks #1-999: A:MASTER.RCX contains 26 Matching REGULAR FILES. A:MASTER.LCX contains 0 Matching LIBRARY FILES. 26 Total Matching Files.