.tf INTRO IIa 4/21/86
.sp 2
.in 0
.if t .ta 3  10
.ce
.if t .ft3
INTRODUCTION TO KERNEL INTERFACE TYPES
.if t .ft
.sp
Section IIa of this manual describes all the types used by the Kernel
Call Interface (section II).  The kernel types defined in the interface
are composed of 7 different basic types and 3 structure types.  All the
kernel type definitions are built from these types.  Understanding
these types is essential for using and building future kernel call
interfaces.
.s3
.lp 18, 12
char
is an eight bit unsigned quantity.
It is used to represent
variables with up to 256 distinct values.
A char field must be and'ed with a 377(8) mask when converted to
a 16 bit quantity because of the PDP-11 hardware sign extension on
byte to word data transfer instructions.
.s3
.lp 18, 12
boolean
is also an eight bit quantity.
A boolean variable may have one of two values -
true
or
false.
The false value is defined always to be zero.
The true value is any nonzero value.
.s3
.lp 18, 12
bits
is a 16 bit quantity.
The bits are numbered right to left starting with zero
(i.e. bit 0 is the rightmost ( least significant)
bit).
.s3
.lp 18, 12
bits32
as suggested by its name, is 32 bits long.
However, the bits are
numbered
left
to right starting with zero
(i.e., bit 0 is the
leftmost
(most significant) bit).
If
bits32
is accessed as an array of
bits, a[0] contains bits 0 through 15 and
a[1] contains bits 16 to 31.
.s3
.lp 18, 12
integer
is a 16 bit signed quantity in two's
complement notation.
.s3
.lp 18, 12
cardinal
is a 16 bit unsigned quantity which may range in value from 0 to 65535.
.s3
.lp 18, 12
cardinal32
is a 32 bit unsigned quantity.
If
cardinal32
is accessed as an array of
cardinal, a[0] contains the high order word
and a[1] contains the low order word.
.i0
.s3
The structured types are used to build data structures from the
basic types.  The structured types are enumerations, records and
arrays.

.lp 20 14
.In Enumerations
An enumeration is a list of identifiers which denote
the values constituting a data type.
These identifiers may be used as constants in programs.
They, and no other values, belong to the enumerated type.
An ordering relation is defined on these values
by their sequence in the enumeration.
.lp 20 14
.In Records
A record structure consists of a number of components
where each component is identified by a unique field identifier.
Field identifiers are known only within the record
structure definition and within field designators,
i.e., when they are preceded by a
qualifying record variable identifier.
.lp 20 14
.In Arrays
An array structure consists of a number of components.
Each component is identified by a number of indices
whose range is specified in the
declaration of the array structure.
.i0
.sh "FILES"
NEWcalls.mod
.sh "SEE ALSO"
Modula Specifications, Guide to Writing Modula Programs
for KSOS(Appendix B)
