LDIR-B.DOC 17 Oct 87 ------------ This program is a "Library Directory" program. Older programs which performed the same general function were usually called LDIR.COM (in fact, you will want to rename it LDIR.COM if you are going to use it and it will be referred to by that name in the examples below). It has been rewritten from scratch, however, with the overall intent of pro- viding more information. Prior to a full explanation, consider these examples of what an RCP/M user might see when using LUX to examine the contents of 1) an .ARK file, and 2) an .LBR file. ---------------------------------------------------------------------- C7>LUX BISHOW34.ARK LUX v77 Archive File = BISHOW34.ARK Name Length Disk Method Ver Stored Saved Date Time CRC ============ ======= ==== ======== === ======= ===== ========= ====== ==== -READ .ME 256 4k Crunched 8 175 32% 28 Sep 87 12:39a E0CE 092587 .UPD 512 4k Crunched 8 319 38% 28 Sep 87 12:40a 375D BISHOW32.ME 1024 4k Crunched 8 596 42% 23 Oct 86 7:56a BB98 BISHOW33.DOC 3968 4k Crunched 8 2241 44% 23 Oct 86 7:57a DEC9 BISHOW34.ASM 51328 52k Crunched 8 26619 49% 25 Sep 87 12:41a C2D8 BISHOW34.COM 3328 4k Crunched 8 2775 17% 25 Sep 87 12:42a B0F3 ==== ======= ==== ======= === ==== Total 6 60416 72k 32725 46% 2657 LUX v77 - ^C, ^K or ^X to exit, ? for menu C7:BISHOW34.ARK --> Exiting LUX C7: ------------------------------------------------------------------------ Now consider the display produced when the file is a LBR: ------------------------------------------------------------------------ C7>LUX BISHOW34.LBR LUX v77 Drive C7: Files: 1/32k Free: 14116k BISHOW34.LBR 32k | ** Library directory for C7:BISHOW34.LBR 32k ** * -READ .ME 1k | 092587 .UZD 1k | BISHOW32.MZ 1k | BISHOW33.DZC 3k * BISHOW34.AZM 26k | BISHOW34.CZM 3k | ** There are 6 member files in 1 library(s) ** LUX v77 - ^C, ^K or ^X to exit, ? for menu C7:BISHOW34.LBR --> Exiting LUX LUX is being used as an example here; these are the displays currently generated when LUX is first invoked, or given a DIR command. The same displays could be generated without LUX - in the first case by typing: C7>UNARC BISHOW34.ARK and in the second by typing: C7>DIR BISHOW34.LBR $L (of course, those are exactly the commands LUX is initiating to gener- ate the displays). Now I think most people would agree that the .ARK display is quite a bit more readable and useful than the LBR display. And as far as LUX, why should the command "DIR" result in such radically different dis- plays anyway? This is where LDIR-B comes in. Under proper circum- stances (more on that later), we can now have the following: ---------------------------------------------------------------------- C7>LUX BISHOW34.LBR LUX v77B Library File = BISHOW34.LBR Name Length Method Date CRC Comments ============ ====== ======== ========= ==== ==================== -READ .ME 0.25k -- 28 Sep 87 5C88 092587 .UZD 0.37k Crunched 28 Sep 87 F0F5 Tell of new features BISHOW32.MZ 0.62k Crunched 23 Oct 86 9AA5 Short form usage doc BISHOW33.DZC 2.25k Crunched 23 Oct 86 D143 Full doc file BISHOW34.AZM 25.50k Crunched 25 Sep 87 5BBF Source code for v3.4 BISHOW34.CZM 2.87k Crunched 25 Sep 87 A080 Version for Kaypro LUX v77B - ^C, ^K or ^X to exit, ? for menu C7:BISHOW34.LBR --> Exiting LUX ------------------------------------------------------------------------ The above is the display, which would be created by the command line: C7>LDIR BISHOW34 has also been made to be the default LUX display of .LBR files in the LUX77B.COM file from the LUX77B.LBR. You will want to get that file if this new presentation appeals to you. Of course the full display as shown above required a little extra work in putting the BISHOW34.LBR file together. The Comments column is text extracted from the "[...]" feature of CRUNCH, eg BISHOW34.AZM had to be crunched using the command line: CRUNCH BISHOW34.ASM [SOURCE CODE FOR V3.4] (Note an additional advantage is that this comment gets typed to the console again later when the file is either uncrunched or typed). Of course, each file has to be crunched individually with it's own comment, and then the files have to be dated individually or in mass using a .LBR dating program (more on this later). Admittedly a little effort is involved. But even under the "worst" of circumstances i.e., when no such extra effort is expended or when the program is used on existing LBR's, a display similar to the following results: ---------------------------------------------------------------------- C7>LUX BISHOW34.LBR LUX v77B Library File = BISHOW34.LBR Name Length Method Date CRC Comments ============ ====== ======== ========= ==== ==================== -READ .ME 0.25k -- -- --- -- 5C88 092587 .UZD 0.37k Crunched -- --- -- AB02 ( --> 092587.UPD ) BISHOW32.MZ 0.62k Crunched -- --- -- 85EF ( --> BISHOW32.ME ) BISHOW33.DZC 2.25k Crunched -- --- -- 0F04 ( --> BISHOW33.DOC ) BISHOW34.AZM 25.50k Crunched -- --- -- C355 ( --> BISHOW34.ASM ) BISHOW34.CZM 2.75k Crunched -- --- -- 9E70 ( --> BISHOW34.COM ) LUX v77B - ^C, ^K or ^X to exit, ? for menu C7:BISHOW34.LBR --> Exiting LUX ---------------------------------------------------------------------- In this case the program automatically generates the "comments", since no explicit comment is available (and obviously no date is available). Personally, I find even this display much more useful than the one now produced (the first LBR example above). Additional notes: ---------------- The "Length" column denotes the the full number of kilobytes to the left of the decimal point, followed by a fractional part which can only be .00, .12, .25, .37, .50, .62, .75, or .87 indicating 0-7 ad- ditional records respectively. I considered this to be a compromise between displaying records only (precise, but difficult to relate to) and displaying a rounded up #of K only (so people who care about the precise value can look at digits to the right of the decimal point). The CRC value is the same as displayed by NULU or any other LBR pro- gram. A totals column may be added or other changes made after this initial release of this program. Notes about Dates: Though not a widely realized fact, when the .LBR structure was orig- inally defined by Gary P. Novosielski he had the foresight to include directory entry area for dates (in fact, bytes are defined for crea- tion date, creation time, update date, and update time, plus addition- al spare bytes). The exact format for encoding the date and time was defined as well. Since very few utilities support it, these bytes almost always go unused and wasted. The date displayed by this LDIR program is derived from this directory information in strict conform- ance with the standard definition of the LBR structure. Thus dating libraries will not add to their size, change the CRC's of the individ- ual files, or in any way affect compatibility with any program which processes LBR files. If no date is found in the directory itself, the LDIR program may attempt to derive the information from one or more other sources. One such program is a library date setting utilty written by Brent Powers. It called SETD.COM and has a built-in help guide. The date is entered in any of several conventional manners such as MM/DD/YY, (normal entry for American users), or EDD/MM/YY (E is used here to indiate European) for those who are accustomed to writing the date in that manner. The actual library display would be: 18 Oct 87 if SETD.COM was used on the day this guide is being written. For now, this program uses middle letter of the extension to determine whether a file is crunched. If so, a random access read of the first record of the file is made to extract real filename or possible "com- ment" information. Other files are not read at all. LDIR-B.COM is under 2K in length and should be ready to use "as is" with no config- uration necessary (for either RCP/M systems or private use). Usage with LUX77B: ----------------- LUX usually displays a library directory by internally initiating a "DIR $L", calling up some version of SDIR which must be available (usually on A0: or whatever). LUX77B on the other hand uses the LDIR-B.COM program we have been discussing (which you put on A0: as LDIR.COM; it can then be called by the user to display the contents of a .LBR file, or used automatically by LUX77B.COM for the same pur- pose.) - Steven Greenberg