[Tfug] Byte Order
Jim Secan
jim at nwra.com
Sat Nov 18 12:02:53 MST 2006
Actually, we have already gone through the VERY careful process of
byte-level copying these old tapes (over a hundred of them) onto CDs.
Each file on the CD is one tape file record in MAGSAV format. I have a
code that reads these and breaks out the actual files just fine on a
Sun/Solaris system (ASCII ones, anyway), and I was trying to port this
code over to Intel/Linux. Snoopying around with the od app on both
platforms showed me what was going on (byte-order differences) so I've
been able to get things working. Some sign fiddling was needed (as noted
by others on this list), but things are working fine now.
And thanks to everyone for the input/suggestions.
Jim
Bexley Hall wrote:
>> read files taken from 9-track tapes built on an old
>> PR1ME minicomputer
>> using software written to work on a Sun/Solaris
>> system and it ain't working
>> on Linux/PC. Looks like a byte order problem.
>
> Be sure what you are reading is, indeed, shorts.
> Note that "text" stored on tapes is often stored
> in EBCDIC so it *almost* looks right -- but isn;t! :<
>
> Easiest approach is to read everything between
> file marks as a long unsigned char[] and store it
> as a file (even a 3600ft 6250 tape isn't more than
> a few hundred MB). Then, you can examine the file
> and reprocess it's contents to something that makes
> sense "at disk speed". (chances are you don't
> want to be rereading an old tape many times if
> the data is important to you!)
>
> HTH,
> --don
More information about the tfug
mailing list