Portability and BS
hutchson at convex.UUCP
hutchson at convex.UUCP
Fri May 20 01:25:00 AEST 1988
This alignment issue is not so simple. In the IBM 360 family, the 360
machines required "ints" to be aligned mod 4; the 370 and
later processors did not. In the M68xxx family, the 68008 imposes no
alignment restrictions; the 68000 requires "shorts" and "ints" to be aligned
mod 2; the 68010 (fill in the blank); the 68020 again relaxes the alignment
restrictions.
Conclusion: regardless of what your favorite language standard says,
if (2^n)-byte quantities (n<4) are not aligned mode (2^n), the resulting
program is not portable. Having used various members of the 68000/360/600
families, I automatically align everything. Tisn't difficult, not at all...
More information about the Comp.lang.c
mailing list