The Museum of HP Calculators

HP Articles Forum

[Return to the Index ]
[ Previous | Next ]

liffile - HP9114 LIF disk image file

Posted by Tony Duell on 20 Mar 2002, 11:55 p.m.

This article describes the files that may be found at You may also be interested in the LIF Utilities for linux.


The HP9114 LIF disk image file format was designed as a simple way to store HP9114 disk images on a larger computer, and to allow programs to be written to process those images (including writing them back to a physical disk).


The file consists of a raw dump of the data blocks on the disk, in increasing numerical order. There are no headers or trailers added, either for the entire image or for each block. That is to say :

Bytes 0 to 255 are LIF logical block 0
Bytes 256 to 511 are LIF logical block 1
Bytes 512 to 767 are LIF logical block 2
and so on

As an HP9114 disk contains 2464 user blocks (organised as 77 cylinders, 2 heads, and 16 sectors per track, with each sector being 1 block), an image file is always 2464*256, or 630784, bytes long.


The correspondence between the logical block numbers described in the last section and the physical sector addresses on the disk is also straightforward. The cylinders on the disk are numbered from 0 to 76. the 2 heads (sides) are called 0 and 1, and the sectors on each track are numbered from 0 to 16. Then :

Block 0 is cylinder 0, head 0, sector 1
Block 1 is cylinder 0, head 0, sector 2
Continuing on cylinder 0, head 0, until...
Block 15 is cylinder 0, head 0, sector 16
Block 16 is cylinder 0, head 1, sector 1
Continuing on cylinder 0, head 1 until...
Block 31 is cylinder 0, head 1, sector 16
Block 32 is cylinder 1, head 0, sector 1
And continuing in this manner for all 77 cylinders


Assuming the necessary functions exist to seek the disk head to a particular cylinder ( seek() ) and to write a 256 byte sector ( writesector(cylinder,head,sector,data[])) then it is reasonably easy to write a program to transfer a disk image to a physical disk. The following pseudo-code gives the basic idea :

declare blockbuffer to be 256 bytes long
open(image file)
for cylinder=0 to 76
    for head = 0 to 1
        for sector = 1 to 16
            read next 256 bytes of image file into blockbuffer
        next sector
    next head
next cylinder
close(image file)


The logical block structure of a LIF device is given in appendix D of the HP-IL Module for the HP71 Owner's manual. The relationship between LIF logical blocks and physical disk sectors was determined experimentally.


Although the LIF Utilities for linux are released under the GNU public license, the only restriction placed on the use of this image file format is that no (other) restrictions may be placed on its use. Anybody is welcome to write programs using this file format (for example to convert the image files into other formats, or to transfer between physical disks and the image format) for any computer or operating system, and to distribute these programs under any license terms they choose.


The LIF image file format was designed by Tony Duell,


[ Return to the Message Index ]

Go back to the main exhibit hall