Switch Stubs [ HP Pascal/iX Programmer's Guide ] MPE/iX 5.0 Documentation
HP Pascal/iX Programmer's Guide
Switch Stubs
A switch stub is a program that allows your HP Pascal program, which is
compiled in Native Mode (the default on PA-RISC machines) to call a
routine compiled in Compatibility Mode (the default on earlier HP 3000
machines). The routine must reside in a Compatibility Mode SL.
Figure 9-1 shows how a switch stub works. When the program calls the
routine, what actually happens is that the program calls the switch stub
(in Pascal) and the switch stub calls the routine in the Compatibility
Mode SL. This is transparent to the program and routine (except for
performance, which is slower). It is the responsibility of the switch
stub to make whatever transformations are necessary to call the
Compatibility Mode routine.
Figure 9-1. How a Switch Stub Works
You must write a switch stub for each Compatibility Mode routine that
your program calls. The Switch Assist Tool (SWAT), an interactive
utility, can help you write your switch stubs (see step 2 of the example
in "Calling SPL from HP Pascal" ). For more information, refer to the
Switch Programming Guide.
MPE/iX 5.0 Documentation