Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Mac OS Runtime Architectures /
Chapter 11 - Classic 68K Runtime Conventions


Data Types

Table 11-1 lists the various binary data types and their sizes in the classic 68K runtime environment.

Table 11-1 Data types in the classic 68K runtime environment
TypeSize
(bytes)
Alignment
(bytes)
RangeNotes
UInt8110 to 255 
SInt811-128 to 127 
SInt1622-32,768 to 32,767 
UInt16220 to 65,535 
SInt3242-2-31 to 231 -1 
UInt32420 to 232-1 
Boolean11 0 = false, nonzero = true
float42\xB1(2-149 to 2127)IEEE 754 standard
double82\xB1(2-1074 to 21023)IEEE 754 standard
Pointer420 to FFFFFFFF 
extended10 or 122 SANE or MC68881
data type

All numeric and pointer data types are stored in big-endian format (that is, high bytes first, then low bytes). Signed integers use two's-complement representation.

IMPORTANT
The layout of the extended data type is either that of the SANE 80-bit data type or that of the 96-bit MC68881 data type, depending on the software development environment used.
The size of data structures and unions must be a multiple of two (2-byte alignment), and an extra byte may be added at the end to meet this requirement. Items inside a data structure (except for types UInt8 and SInt8) are placed on a 2-byte boundary with an extra padding byte inserted if necessary. Type UInt8 and type SInt8 items (single variables or arrays) are merely placed in the next available byte.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 MARCH 1997