HP Pascal/iX Programmer's Guide (31502-90023)

A-: 28
For the integer subrange type of a packed record, any bit allocation from
one bit to 15 bits is possible, as are allocations of two and four bytes.
Bit allocations are bit-aligned, but never cross 2-byte boundaries. Two-
and 4-byte allocations are 2-byte aligned. See "Records" for more
information.
Example
VAR
r : PACKED RECORD
a : 0..1; {Requires 1 bit}
b : 0..255; {Requires 8 bits}
c : 0..16; {Requires 5 bits}
d : 0..4; {Requires 3 bits}
e : 10..40000; {Requires 4 bytes}
f : 0..MAXINT; {Requires 4 bytes}
END;
The fields of the record
r
are allocated the bits that they require.
Fields
a, b, c,
and
d
are bit-aligned, but cannot cross 2-byte boundaries
(notice where
d
and
e
start). Fields
e
and
f
are 2-byte-aligned.
Compiling, Linking, and Running Your Program
To make your HP Pascal program a valid MPE/iX process, you must compile,
link, and run it.
The HP Pascal compiler compiles your source program, which is in a
textfile. It translates your source code to binary form and stores it in
an object file or in an RL.
The MPE/iX linker prepares the object file for execution by binding the
procedures in the object modules together and defining the initial
requirements of the user data stack.
The MPE/iX operating system allocates space for the program, binds its
external routines to it, and runs it. (The external routines are in
executable libraries).
Additionally, the compiler looks for a system-wide file called
PASCNTL.PUB.SYS. If the file exists and is not empty, the compiler opens
and reads the file. The file should contain only compiler
options and comments. If there is anything else in the file,
the compiler emits an error message. If the file is empty, which is the
default, the compiler does not attempt to open it. For more information
on the system-wide file, refer to the section on compiler options in the