Bit Field Internal Representation - Texas Instruments TI-89 Software Manual

Sierra c assembler
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

66
Note: Since most computers do not allow bits to be addressed directly, it is illegal to take the
2.9.7.

Bit Field Internal Representation

Bit fields are packed into memory as efficiently as possible. Each bit field is
placed in the lowest order bits (highest address) available in the specified integer
type. If a bit field does not fit in the remainder of the current integer, it is placed in
a new one (i.e., it cannot span two integers). A bit field declaration without an
identifier is used to force a desired alignment. If the field width is nonzero, the
bits are allocated exactly as if an identifier was present in the declaration; if the
field width is zero, the remainder of the current integer is skipped. For example,
the following declaration causes memory to be allocated as shown:
31
29
31
31
TI-89 / TI-92 Plus Sierra C Assembler Reference Manual
address of a bit field. As a result, pointers to bit fields and arrays of bit fields are not
permitted. Furthermore, functions are not allowed to return bit fields.
struct tag {
long int a:10;
long int b:20;
long int c:5;
long int :5;
long int d:8;
long int :0;
long int e:12;
} s;
b
17
9
a
9
4
d
11
e
Not for Distribution
Section 2: Compiler
0
0
c
0
Beta Version February 2, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-89 plusTi-92 plus

Table of Contents