HP 3000 Manuals

Compatibility Mode [ Switch Programming User's Guide ] MPE/iX 5.0 Documentation


Switch Programming User's Guide

Compatibility Mode 

Compatibility Mode (CM) is an emulation of the MPE V/E operating
environment.  Consequently, it is very compatible with HP 3000 object
code from MPE V/E-based systems, allowing applications newly restored
from MPE V/E-based systems to run immediately and transparently on 900
Series HP 3000s (with certain exceptions, as noted below in "Emulation
and Translation Considerations" ).

Compatibility Mode is available to simplify the migration to the 900
Series of the HP 3000 family.  You can move programs written in
high-level languages (Pascal/V, FORTRAN 77/V, and COBOL II/V) to Native
Mode by recompilation with an NM compiler.  But you cannot recompile a
program or procedure written in SPL in Native Mode, because HP does not
provide an NM SPL compiler.  For best performance, you should completely
rewrite such code in a language having an NM compiler.  However, if you
must use an SPL program or procedure, it will run only in Compatibility
Mode.

You have two options for running applications in the Compatibility Mode
(CM) environment with few, if any, source code changes (discussed in more
detail below):

 *  You can run applications directly in HP 3000 Compatibility Mode
    (using the Emulator).

 *  For better performance while still executing in Compatibility Mode,
    you can pass MPE V/E-based application program files through the
    Object Code Translator (OCT) and then run them.

Neither alternative requires any source code modification.  A translated
(processed by OCT) application program will generally execute somewhat
faster than the same program executing under emulation.  Recompiled
programs should execute faster than either their translated or emulated
versions.

Emulator 

Under MPE XL, HP 3000 Compatibility Mode is implemented as an emulator
for the CPU of MPE V/E-based systems and as an interface between
supported MPE V/E intrinsic calls and MPE XL intrinsics.  The Emulator
functions as an object code interpreter.  900 Series machines have
several features that make them good interpreters:

 *  Simplicity of the instruction set

 *  Simplicity of control paths

The HP 3000 object code Emulator works by interpreting (reading and
initiating appropriate machine activity), at run time, each MPE V/E-based
instruction into a functionally equivalent sequence of 900 Series
instructions.  Because the machine instruction set on MPE XL-based
systems has been simplified from that found on MPE V/E-based systems, it
often takes several 900 Series instructions to emulate a single MPE
V/E-based instruction.

Thus, even though interpreted execution is slower than direct execution
of the same instructions, the advanced features of the 900 Series machine
yield performance under emulation (running in Compatibility Mode) similar
to that of a HP 3000 Series 70.

Object Code Translator 

The Object Code Translator (OCT) converts the MPE V/E-based instructions
in a CM program file into 900 Series instructions.  This Object Code
Translator is valuable for programs whose source is not available and as
a low-cost speed-up of compute-bound CM programs.

You invoke the Object Code Translator by means of the :OCTCOMP command.
OCT not only translates the CM instructions to NM instructions; it also
does whatever low-level optimizations are possible without reference to
the program's source.  OCT performs an optimized translation of code once
and saves the result, eliminating the need for reading and decoding each
time the program is run.  OCT produces an output file, either permanent
or temporary depending on the option selected.  Consequently, overhead
during execution is greatly reduced, but the translated MPE V/E program
or SL will require greater disc space (currently up to 10 times more
space; the actual file size usually expands by about 3-4 times) than the
original program file.

Emulation and Translation Considerations 

A code size expansion occurs when translating MPE V/E-based object code
to its 900 Series equivalent using the Object Code Translator.  You have
a choice between higher performance execution using the Object Code
Translator or more efficient disc space utilization using the Emulator.

Another tradeoff involves the ease of debugging.  Since original MPE V/E
program files are unchanged when emulated, they can be debugged using the
CM portion of the MPE XL Debugger.  In contrast, MPE V/E programs that
have been translated by means of the Object Code Translator consist of
optimized 900 Series instructions.  This requires use of the NM debugger
on mechanically-translated object code and is more difficult than using
the NM debugger on CM programs.

Both the Emulator and the Object Code Translator need to know MPE
V/E-based instructions and stack architecture.  The Emulator creates MPE
V/E-based program and stack structures when a CM program is run.  Object
code compatibility is provided by exactly emulating the MPE V/E-based
environment.  You are subject to the same addressing and stack
limitations found on MPE V/E-based systems.  OCT executes in Native Mode
on a CM program file.  Its output, a translated program, executes in
Compatibility Mode on CM data, thus still having the addressing and stack
limitations.  If you require additional features and performance, you
need to migrate your application(s) to Native Mode.

You can use Compatibility Mode not only to run MPE V/E applications
immediately following migration, but also, over the long term, to execute
those applications that perform acceptably on MPE V/E-based systems
today.


NOTE Applications running in Compatibility Mode must not execute privileged instructions and must call only documented, callable MPE V/E or subsystem intrinsics. However, you can enter Privileged Mode and call MPE V/E privileged intrinsics from Compatibility Mode.

CAUTION The normal checks and limitations that apply to standard users in MPE XL are bypassed in Privileged Mode. A Privileged Mode program could destroy file integrity, including the MPE XL operating system software itself. Hewlett-Packard will investigate and attempt to resolve problems resulting from the use of Privileged Mode code. This service, which is not provided under the standard service contract, is available on a time and materials billing basis. Hewlett-Packard will not support, correct, or attend to any modification of the MPE XL operating system software.


MPE/iX 5.0 Documentation