The HP LIFUTIL (E2080A) *v1.4 / 13 oct 95 / gvg* * The HP LIFUTIL, part number E2080A, is a program that runs on personal computers running the DOS operating system; it can read, write, and format LIF disks in PC floppy-disk drives. The program is interactive and menu-driven; it can be controlled from the keyboard or with a mouse. The main menu provides the following functions: LIF to DOS Copy Get files from LIF disk. DOS to LIF Copy Put DOS files on LIF disk. LIF Catalog Catalog files on LIF disk. LIF Purge File Remove files from LIF disk. Zero LIF Disk Wipe out LIF catalog (don't reformat disk). LIF Disk Status Give information on LIF disk. LIF Hex Dump Read raw sectors from LIF disk. LIF Initialize Format LIF disk (all common media and formats). Files can be brought across as binary or (in some cases) DOS-compatible text with either NULL or CR-LF terminators; DFS headers can also be specified to allow files to be compatible with the HP Measurement Coprocessor or IBASIC for Windows. The LIFUTIL can be used in a "command-line" mode (as opposed to the interactive mode) to provide the same functions in batch-file operation. The LIFUTIL can also work with LIF disks in CS-80 / SS-80 disk drives connected to the PC through HP 82990 or 82335 HP-IB cards; such drives are designated by: SSBB[,UU[,V]] -- where: SS HP-IB card select code. BB Drive HP-IB address. UU Drive unit number (default 0). V Volume number (default 0). If you use an external hard disk, you need to tell LIFUTIL to scan the HPIB port for the disks if you want to have them listed in interactive mode. LIFUTIL is intended to be used to convert LIF text files (HP BASIC ASCII or FORMAT ON HP-UX) to DOS text files. HP BASIC programs can be ported to DOS as well, but only as long as they are SAVEd as text. While the LIFUTIL can convert HP BASIC BDAT files to DOS, they can only be converted to DOS-compatible text files if the data is stored using FORMAT ON (which is *not* the default). While BDAT FORMAT OFF files can be converted to DOS, the binary data will not be converted to text, as there is no information in the file to tell the LIFUTIL what kind of data is in the file. BDAT FORMAT OFF files will normally need to be converted to a text format before being ported ... more on this momentarily. The LIFUTIL can also read files off of Series-80 disks (which have a LIF format though different file types). Series-80 programs can be brought across as text DATA files created using the Series-80 SAVE statement; however, be warned that this statement is *not* a standard feature of Series-80 BASIC. LIFUTIL can convert *any* Series-80 DATA files to text, even DATA files with binary information -- since Series-80 binary data files include "tags" that identify data fields. The LIFUTIL comes with both 3.5-inch and 5.25-inch floppy disks. There is a 50-page manual, plus extensive online help information. * If you need to bring BDAT FORMAT OFF files over to a PC, as noted above the best way to do it is to convert them to a text format on your BASIC workstation first. To convert the BDAT file to a text file -- say, a FORMAT ON HP-UX file -- requires that you know exactly what data was written to the BDAT file in the first place, and so it is impossible to write a fixed program to perform such a task; however, it is possible to provide a sample: 10 ! **************************************************************** 20 ! 25 ! This program converts a sample BDAT file (named "BDATA") into an 30 ! HP-UX text file (named "TEXTDATA") so it can be converted to DOS. 35 ! 40 ! The BDAT sample file contains 100 records, each with two INTEGERs 45 ! followed by two REALs. Note that this program assumes that you 50 ! are using the HP BASIC HFS file system to create the file; if you 55 ! are using LIF instead, you will need to specify the HP-UX file 60 ! length needed to accommodate the strings when you perform the 65 ! CREATE. 70 ! 75 ! The size of the file in that case will be defined by the number of 80 ! characters you write to it; you can derive this from the format 85 ! codes you use to specify the number format (figuring in CR end- 90 ! of line characters). 95 ! 100 ! **************************************************************** 105 ! 110 INTEGER Ctr,Int_1,Int_2 115 REAL Real_3,Real_4 120 DIM B$[32],T$[32] 125 B$="BDATA" 130 T$="TEXTDATA" 135 ! 140 CLEAR SCREEN 145 ON ERROR GOTO Nofile 150 PURGE T$ ! Wipe text file if exists. 155 Nofile:OFF ERROR 160 CREATE T$,1 ! Create text file. 170 ! 180 ASSIGN @F TO B$;FORMAT OFF ! Open BDAT file. 190 ASSIGN @D TO T$;FORMAT ON ! Open text file. 200 ! 210 DISP "Converting BDAT file to HP-UX text!" 220 FOR Ctr=1 TO 100 230 ENTER @F;Int_1,Int_2,Real_3,Real_4 ! ENTER BDAT, OUTPUT Text. 240 OUTPUT @D USING Textimage;Int_1,Int_2,Real_3,Real_4 250 PRINT USING Textimage;Int_1,Int_2,Real_3,Real_4 260 Textimage:IMAGE 3D,X,5D,X,2(2D.3D,X) 270 NEXT Ctr 280 ! 290 ASSIGN @D TO * ! Close the files. 300 ASSIGN @F TO * 310 DISP "DONE!" 320 END 330 ! 340 ! ********************* That's All, Folks! *********************** * There are certain known problems you can run into when using the LIFUTIL: % LIFUTIL cannot recognize "spared tracks" on a LIF disk. To explain ... when you format a LIF disk, not all the tracks may be good; so the formatting process marks them as "bad" or "spared" and they are not used. LIFUTIL is incapable of distinguishing a spared track from any other; so it will suck in the spared track along with any other tracks in the file or directory, leading to corrupted files or catalog reads. There is no way around this. The customer will simply have to use a different disk. This is only infrequently a problem. % Beware of disk caches when using LIFUTIL. If you have a disk cache that is mapped to a floppy drive and attempt to access the floppy drive with LIFUTIL, the catalog reading will come back "sliced and diced" due to the remapping imposed by the disk cache ... it will look like someone took the catalog listing, cut it into pieces, and then rearranged it at random. Most disk cache software will allow you to disable mapping to floppy drives while retaining use of the disk cache on the hard disk (where it is useful). % We occasionally have severe problems with disk-drive sensitivity -- that is, floppies formatted on a workstation cannot be read on a PC while floppies formatted on a PC (in exactly the same format) can be read on a workstation. This appears to be due to differences in head alignment and other drive- mechanism factors (we have actually seen similar problems even with DOS floppies on 1.2MB 5.25-inch drives on PCs). There isn't much we can do about this one except recommend that all floppies be formatted on the PC. You could also try different formatting options. % The LIFUTIL relies on PC BIOS-level read and write calls. A LIF disk can use sector sizes of 256, 512, or 1024 bytes; while a PC only uses floppies with 512-byte sectors. This can lead to a problem, seen worst in cheap clones, where LIFUTIL cannot handle LIF floppies at all unless they have 512-byte sector size ... since the vendor never checked out the BIOS calls for anything but that sector size and didn't bother to see if the other calls worked. There is absolutely nothing we can do about this, since we are dependent on those BIOS calls, and if they don't work, LIFUTIL won't work. If you have trouble reading a floppy from a workstation in a PC, try formatting the floppy in the PC. If (even after stripping down your CONFIG.SYS and AUTOEXEC.BAT files) the PC can't recognize a floppy it formatted itself, the cause is probably hopeless. % Customers have on rare occasions been unable to access "extended" floppy drives ("D:", "E:", and so on) in some clones. While LIFUTIL will find additional floppies in an HP Vectra floppy extender (it finds that configuration in CMOS RAM) -- if a clone uses a different scheme, LIFUTIL has no way of knowing about it. (Using DOS ASSIGN to remap the drive doesn't help.) % LIF disks are usually obtained from BASIC workstations but are also sometimes obtained from instruments and other systems. Some of these systems have peculiarities that LIFTUIL handles poorly or not at all: - There is an 8541 diode-array spectrophotometer that was built around a Series-80 computer; it can generate data files on LIF disks as Series-80 DATA files, but if you try to convert them you only get junk ... the spectrophotometer performs some additional encoding and LIFUTIL cannot figure it out. - Pascal Workstations (a distant relative of the BASIC Workstation) have a number of file-system capabilities that BASIC Workstations lack and which LIFUTIL has trouble with. For example, Pascal can generate so-called "soft volumes" on HPIB hard disks, in which a single disk is divided into separate sections using a software scheme, rather than the hardware scheme usually used with HPIB hard disks. LIFUTIL is incapable of recognizing these soft volumes. % The current version of LIFUTIL has fixes for a number of bugs: - The original version of LIFUTIL (A.00.00) had an odd bug when trying to convert HP BASIC ASCII files to DOS -- if the file had "null string" entries, it would ignore them, while they should have been converted to CR-LFs. - Another old bug dealt with LIF disks created on an 8753C network analyzer: if an 8753 created files on a disk and then deleted one, all the subsequent files on the disk would vanish to LIFUTIL, though they would still be present. - We had problems getting LIFUTIL to work on a Toshiba portable because of the unit's BIOS problems. - We also ran into a strange bug with COMPAQS where if you tried to use LIFUTIL to convert a certain size of 3.5-inch disk, you would afterwards only be able to access that size of DOS disk. All these bugs are fixed in A.00.03. * Revision history: v1.0 / 15 mar 93 / gvg v1.1 / 04 apr 93 / gvg / Added debugging tricks. v1.2 / 16 may 93 / gvg / Added notes on converting BDAT files in DOS. v1.3 / 03 feb 94 / gvg / Added more debugging tricks. v1.4 / 13 oct 95 / gvg / Web update. [<>]