Re: portability of binary files

From: Pink Floyd (floyd@south.mit.edu)
Date: 12/14/95


   > stuff concerning binary files <snip>

   problems with the binary playerfile since the byte ordering was different.
   I solved it by writing an 'M' or 'I' as the first byte of pfile, to
   indicate motorola/intel order. Then when reading the various int/numeric
   fields, just swap the bytes if the file was written on the wrong type of
   machine. 

   This could be adaptable for the binary world file scheme you suggested.
   BTW you wouldn't need to do this between linux and dos, since they both 
   have the same byte ordering.

What about the fact that DOS is a 16-bit OS and Linux is 32-bit?  Do I need
to worry about that, since an int on my Linux machine is 32 bits and an int
on a DOS machine could be 16 bits?  (Is it? Or is that determined by the
chip, and not the OS?)
Should binaries be completely portable between any two intel machines, 
(assuming 386+) regardless of whether they're running Win95, Linux, OS/2
or whatever?



This archive was generated by hypermail 2b30 : 12/07/00 PST