Previous: RTL Routine Changes Up: VICAR Porting Guide Next: Porting C

Data Types and Host Representations

This section deals with data types for image files. Handling different host data formats correctly is one of the biggest porting challenges.

Different host computers have different ways of representing data internally. Some machines are ``big-endian'', meaning the high-order byte of an integer is stored first in memory, while others are ``little-endian'', meaning the low-order byte is stored first. Data that are to be transferred between those types of machines must be byte-swapped. In the floating point area, most machines use the IEEE standard, but VAXes have their own standard. Some of the IEEE-format machines are byte-swapped relative to each other, too. Data being transferred among these machines must be converted as well.