HPlogo HP C/HP-UX Programmer's Guide: HP 9000 Computers > Chapter 6 Migrating C Programs to HP-UX

Byte Order

» 

Technical documentation

Complete book in PDF

 » Table of Contents

The VAX computer has a different byte order from HP 9000 computers. Binary data files created on a VAX computer may need to be swapped before they can be interpreted on an HP 9000 workstation or server. Use the descriptions of storage and alignment on both systems to write a programming tool to reorder the data. The C library function swab (see the HP-UX Reference Manual) can be used to swap bytes, if that is sufficient for the particular application. Otherwise, you need to write a customized tool. ASCII code and data files should migrate to the HP 9000 workstation or server without change.

© Hewlett-Packard Development Company, L.P.