"Douglas H. Quebbeman" <dquebbeman(a)acm.org> wrote:
The emulator community is vigorously using a tape
image container
format known as TAP for precisely this purpose.
Each record from tape is written to file prefixed *and* suffixed
by a four-byte record length in little-endian format. A zero-
length record is represented by a 4-byte value of zero; although
intuition might call for 8-bytes (a prefix & suffix with nothing
in between), this is not the case. The convention appears to come
directly from FORTRAN 77's handling of unformatted sequential files.
And EOF is represented by two consecutive zero-length records.
Thanks, I've been curious about this spec for a while and had little
luck turning up a concise description of the format.
One question, if I want to write multiple consecutive EOFs (I'm
thinking of classic HP3000 MPE :STORE format tapes here) do I write
two zero-length records for each, or do I "compress out" the
zero-length records in the middle? Say I want to write two EOFs,
do I write {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} or
{0,0,0,0}, {0,0,0,0}, {0,0,0,0}? I'm hoping it's the former.
-Frank McConnell