Guardian Application Conversion Guide

Converting a Pascal Program to Run at a High PIN
Converting Pascal Applications
6–10 096047 Tandem Computers Incorporated
You need to specify the HIGHPIN directive only once during a compilation.
However, you can specify it any number of times and the compiler will not generate
an error.
If you do not set the HIGHPIN attribute when you compile your program, you can set
it after compilation using Binder. For a single object file, use the Binder CHANGE
command:
@CHANGE HIGHPIN ON IN pasobj
If you are binding more than one object file into a single target object file, use the
Binder SET command to set the HIGHPIN object-file attribute in the target file. For the
target object file to have its HIGHPIN object-file attribute set, each constituent object
file must also have its HIGHPIN attribute set.
Using a Library File If your existing program uses a library file, the library file must also have its HIGHPIN
object-file attribute set. To determine the current setting of the HIGHPIN attribute for
a library file, use the Binder SHOW command:
@SHOW SET HIGHPIN FROM libfile
If necessary, set this attribute as described in the previous subsection (provided the
library file has been converted to support a high-PIN process).
Declaring CPU and PIN
Variables
As stated earlier under “Converting Basic Elements of a Pascal Program,” your
existing program might declare a 16-bit variable for both the CPU and PIN values:
VAR cpu_pin : INTEGER;
Or your program might declare an 8-bit variable for a PIN value:
VAR pin : BYTE;
Declare all PIN values, including backup-process PIN values, as 16-bit variables.
Declare a CPU value as a separate 16-bit variable:
VAR cpu, pin : INTEGER;
Converting MYPID
Procedure Calls
Your existing program might call the MYPID procedure to obtain its CPU and PIN
values:
VAR cpu_pin : INTEGER;
...
cpu_pin := MYPID;
If a high-PIN process calls MYPID, a trap condition occurs. You must convert MYPID
procedure calls into calls to the PROCESSHANDLE_DECOMPOSE_ procedure.