Previous: Networking
Up: A Quick Reference to p-System Structures
Next: On p-System Code Structure
Previous Page: Networking
Next Page: On p-System Code Structure
This is an extremely brief description of the fundamentals of the
p-System's p-machine architecture as it affects the management of
executable code, and particularly, where it contrasts with DOS' model.
The appropriate reference for the subject is the
``p-System Architecture Guide''
most recently updated by Pecan Systems, the last known owners and
developers of the p-System.
The p-code segment is the smallest unit of code the UCSD Pascal
compiler produces. It is the packaging in which the system manages
and handles all code. Full details are given in
the Architecture
Manual, in editions (chronologically) from Softech Microsystems,
Network Consulting Inc (NCI) and from Pecan.
( NOTE: this was a major change in architecture from
the previous p-System versions.)
Segments come in four types:
- program segment
- This is the type of segment the compiler creates
for a p-System
program. Of the four, it is the only one directly callable
by the operating system. It is classified as a main segment,
meaning that it contains its own lists of references to other segments,
its own list of structured constants, and, if it needs it, its own
relocation list.
- unit segment
- This is the type of segment created for a UCSD Pascal
UNIT. Besides having all the structures that a program segment has,
it can contain the source text of the unit's interface section.
This text can be removed, to conserve space, if the unit is only
to be used for executing its client programs; but if any other unit
or program which uses this one is to be re-compiled, the interface
text must be present.
A Unit segment cannot be called directly from the operating system.
Like the program segment, it is classified as a main segment.
- routine segment
- This is the segment the compiler creates to hold
a SEGMENT PROCEDURE or a SEGMENT FUNCTION -- a procedure or function
belonging to a program or unit, but whose code is not loaded with
that program or unit's code until it is called. (``Its code'' includes
that of any routines nested within it.) It is classified as a
subsegment: it cannot exist
independently; it always belongs to a main segment, which is
the unit or program containing it, and whose name
becomes the routine segment's family name. If the routine segment
references other segments, or contains structured constants,
the main segment actually holds the references or constants.
Up to 16 routine segments can belong to one main segment.
- separate segment
- This is the segment created by the p-System's
adaptable assembler. It too is a subsegment. It is seldom
ever encountered in this form, since the machine code it contains
is usually
immediately linked into a unit or program segment -- usually the
former -- and the separate segment is discarded. Note that this
is the only place in the p-System where static linking is used,
rather than dynamic linking.
Previous: Networking
Up: A Quick Reference to p-System Structures
Next: On p-System Code Structure
Previous Page: Networking
Next Page: On p-System Code Structure