LIFUTILS Readme

Utilities to handle LIF files and LIF image files


LIFUTILS Overview
Documentation Overview
Command Reference
Acknowledgements
License
Revision History

LIFUTILS Overview

The LIFUTILS are command line utilities to handle LIF files and LIF image files. LIF, the Logical Interchange Format was developed by Hewlett Packard as a standard mass storage format that can be used for interchange of files among various HP computer systems. Although the scope of application was much broader, the LIFUTILS are limited to LIF files and image files for the HP calculators HP-41, HP-71 and HP-75.

Documentation Overview

The tutorial contains all the basic information you need to work with the LIFUTILS. You should read this document first!

On Linux and mac OS you can use the man command to get the command reference document for each utility. HTML-documents of the man pages are linked to the command reference table below.

HP calculator enthusiasts may find interesting information in the comments at the start of some source code files.

Command reference

The following table lists the available command line utilities in alphabetical order:

ProgramDescriptionLinux/Mac OS XWindows
barprt Diagnostic dump of a HP-41 intermediate barcode fileyesyes
barps Convert an intermediate barcode file to PostScriptyesyes
comp41Compile a HP-41 programyesyes
decomp41Decompile a HP-41 program raw fileyesyes
er41romconvert a scrambled Eramco MLDL-OS rom file to an unpacked HP-41 rom fileyesyes
hx41romconvert a packed HEPAX rom SDATA file to an unpacked HP-41 rom fileyesyes
inp41Translate a HP-41 hex program into a raw fileyesyes
in71Read a file from a HP-71 via (e.g.) a RS232 interfaceyesyes
key41Display a HP-41 key definition fileyesyes
lexcat71Display main and text table information of a HP-71 lex fileyesyes
lexcat75Display information of a HP-75 lex fileyesyes
lifdirPrint a directory of a LIF image fileyesyes
lifdumpDump a LIF image file to a physical LIF floppy diskLinux onlyno
liffix Fixes the header information of a LIF image fileyesyes
lifgetExtract a single file from a LIF image fileyesyes
lifheader Show the LIF header of a LIF fileyesyes
lifinit Initialize a LIF image fileyesyes
lifimagecreate a LIF image file from a physical LIF floppy diskLinux onlyno
liflabel Label a LIF image fileyesyes
lifmod Output the contents of HP-41 module filesyesyes
lifpack Packs a LIF image fileyesyes
lifpurge Purge a single file from a LIF image fileyesyes
lifputStore a single file into a LIF image fileyesyes
lifraw Remove the LIF header from a LIF fileyesyes
lifrename Rename a file in a LIF image fileyesyes
lifstat Display LIF image file statstics, show which file contains a certain blockyesyes
liftextDecode a LIF file of type TEXt (LIF1) to an ASCII fileyesyes
liftext75Decode a raw file of type HP-75 text into an ASCII fileyesyes
outp41Translate a HP-41 program raw file into hexyesyes
out71Send a file to a HP-71 via (e.g.) a RS232 interfaceyesyes
prog41bar Produce an intermediate barcode file from a HP-41 program raw fileyesyes
raw41lifconvert a HP-41 program raw file into a lif fileyesyes
regs41Display a HP-41 raw file as 'registers' (for analysis of unknown files)yesyes
rom41catDisplay list of function names in an unscrambled HP-41 rom fileyesyes
rom41erconvert an unscrambled HP-41 rom file to a scrambled Eramco MLDL-OS rom fileyesyes
rom41hxconvert an unscrambled HP-41 rom file to a packed HEPAX rom SDATA file yesyes
rom41lifconvert an unscrambled HP-41 rom file to an SDATA file that can be used to update the HP-41 CLyesyes
sdataInterpret a raw SDATA fileyesyes
sdatabar Convert a raw SDATA file into an intermediate barcode fileyesyes
textlifConvert an ASCII file to a LIF fileyesyes
textlif75Convert an ASCII file to a HP-75 text fileyesyes
stat41Display a raw HP-41 'status' fileyesyes
wall41Extract information from a raw HP-41 Write-All fileyesyes
wcat41Display a catalogue of the contents of a raw HP-41 Write-All fileyesyes

Acknowledgements

The LIF Utilities were originally developed by Tony Duell. You find his latest version here. Code was taken from hp41uc (Leo Duran) for comp41 and modfile (Warren Furlow, available on HP41.org) for lifmod.

License

This software is released under the GNU General Public License Version 2.

Revision History

v1.0Initial Release
v1.0.1Bug fixes: Directory length bug fixed for TEXT75 and DATA71 files; lifrmhdr made more tolerant of illegal sectors in the image
v1.1Directory entry types fixed for BASIC75 and added ROM75; Added text75 program; Added regs41 program; Split sdata.c into several files so functions can be used elsewhere
v1.2Fixed makefile problems; Added stat41 program; Added Directory entry type for HP75 Visicalc; Added inp41, outp41 programs; Added key41 program; Added hardware/ directory containing information on linking HPIL calculators and the PC.
v1.3Added wall41, wcat41 programs; Added in71 program; Added out71 program.
v1.3.1Added information and schematics for downloading files to calculators using a parallel interface Fixed bug in lifrmhdr. Now handles 'extra' sectors correctly.
v1.4Fixed file type for secure TEXT file in lif_dir_utils and lif_create_entry; Added lifstat program; Another bug in lifrmhdr fixed -- now reports correct sector number for missing sectors; Added sdatabar, barprt programs; Corrected typo in name of ADATE function in xroms/time.xrom; Added barps program; Added schematics and PIC source for a barcode download interface to the hardware directory; Added ROM41 filetype to lif_dir_utils; Added rom41, rom41cat programs; Eliminated unwanted spaces in octal escape sequence output; Added prog41bar program.
v1.5 Added lifput, texthp, lifstrip, rawlif; Corrected file_length of HP41 files in lif_dir_utils.c (checksum byte); install xroms in /usr/share/lifutils
v1.5.1 Corrected entry in xroms/hpil.xrom (PRUGE); Modified syntax of decompiled FOCAL programs to match syntax of nutstudio focal compiler: P->R and R->P to P-R and R-P (byte_tables.h), insert space before exponent (prog41.c); Introduce default path for xrom files. If they are located in /usr/share/lifutils/xroms only the file name without extension must be specified in the -x option. Otherwise the full pathname can be specified to preserve the old behaviour (prog41).
v1.5.2 Corrected syntax of decompile FOCAL programs to match syntax of nutstudio, FocalComp and hp41uc compilers X!=Y to X#Y,>DEC to DEC, >OCT to OCT,D->R to D-R, R->D to R-D, >HMS to HMS, >HR to HR; always output END instead of .END.; introduce -l option for optional line numbers; output hex constants for non printable characters;output leading > for append strings (prog41.c)
v1.6.0 removed files: lifaddhdr.c, lifrmhdr.c; removed pyhsical device support: lifdir.c, ifget.c, lifput.c, lifstat.c; new files: lifinit.c lifinit.1, lifpurge.c, lifpurge.1, lifrename.c, lifrename.1, lifpack.c lifpack.1 rom41hx.c, rom41hx.1, liflabel.c, liflabel.1)
v1.7.0 added Makefile.mingw (Windows), Makefile.macos (Mac OS X); changed mode of files to binary for mings32 compilation: (lifdir.c, lifget.c, lifput.c, lifinit.c, liflabel.c, lifpack.c, lifpurge.c, lifrename.c, lifstat.c, hptext.c, barprt.c, barps.c, in71.c, wall41.c, rawlif.c, sdata.c, wcat41.c, regs41.c, stat41.c, out71.c, rom41cat.c, lifstrip, inp41.c, outp41.c, rom41.c, text75.c, key41.c, rom41hx.c, texthp.c) new manpage file manpages/lifrename.1; manpages as html files; added output of label and medium layout in lifstat.c, lifdir.c; partially rewritten: lifinit.c, lifinit.1; removed -c flage: lifput.c lifput.1; new file: liffix.c, liffix.1; added ROM71, GRA71 file type: lif_dir_utils.c; correct error in lifput.c; changed behaviour of lifget.c, default is to keep the directory header; fixes in texthp.c; renamed prog41.c to decomp41.c; new file comp41.c, comp41.h, manfiles/comp41.1; renamed hptext.c to liftext.c
v1.7.1 Moved ROM info to xrom.c and xrom.h. Fixed various compiler warnings. Code refactoring and transition to GNU Build system. New files: lifmod.c, modfile.c, lifmod.1
v1.7.2 Reimplemented physical media access (LINUX only, experimental!), lifput fixes
v1.7.3 Check for already existing file name: lifrename.c , check if the name in the lif header of the input file is valid: lifget.c
v1.7.4 Do not check if old file name is valid: lifrename. Check if directory size exceeds 1/3 of the medium size: lifinit.c, New files: lexcat71, lexcat71.1. File types renamed and added: lif_dir_utils.c
v1.7.5 New files: lifheader.c, lifversion.c, hx41rom.c, lifheader.1, hx41rom.1
v1.7.6 comp41 now also accepts ST+, ST-, ST/, ST* command syntax in addition to STO+, STO-, STO/, STO*. rom41hx now corrects the rom checksum. This avoids a warning message if those files are loaded into HEPAX RAM. The files plotter.xrom, timecx.xrom, xfncx.xrom were added. The plotter emulator engine for the HP7470A plotter was added. This program is used as subprocess by the pyILPER application and not intended for stand alone use.
v1.7.7 New files: er41rom.c, er41rom.1, rom41er.c (renamed rom41.c), rom41er.1 (renamed rom41.1), rom41lif.c, rom41lif.1. New CMake build system. MSVC compatibility. Removed lifilper, in71, out71, inp41, outp41 from mac OS distribution. lifilper will be removed in the next LIFUTILS release. The textlif utility was enhanced to write HP-41 specific implementation bytes.
v1.7.8 Extended output options for lifdir and lifheader. Removed lifilper. Fixes in lif_phy_linux.c. Better error diagnostics in lif_img.c. Added switch in lifinit to zero the data area. Added tutorial. inp41, outp41, in71 and out71 are now available on all platforms. All existing documentation checked and updated.
v1.7.8 Merged pull request 3: make LIFUTILS build on non LINUX Unices, fix potential side effect in comp41.c. Add -l option to lifget, lifput, lifpurge, lifrename, textlif to relax file name checking of lif files and allow them to have underscores. Documented the -p switch for floppy disk access (LINUX only). Renamed the text75 program to liftext75 to ensure naming consistency. Added the textlif75 and lexcat75 utilites.


Joachim Siebold
Page last modified : 9th April 2018