C/C++ Programmer's Guide (G06.27+, H06.03+)

Table Of Contents
HP C/C++ Programmer’s Guide for NonStop Systems429301-010
19-1
19
Running and Debugging C and C++
Programs
Running Programs in the Guardian Environment
Running Programs in the OSS Environment on page 19-2
Program Initialization on page 19-3
Program Termination on page 19-6
Two Memory Models: Large and Small on page 19-7
Two Data Models: 16-Bit and 32-Bit on page 19-9
Selecting Memory and Data Models on page 19-9
Converting Programs to the 32-Bit Data Model on page 19-11
Debugging C and C++ Programs on page 19-12
Running Programs in the Guardian
Environment
When you run a C or C++ program, the NonStop OS creates a new process from the
program file you specify. This new process passes through three phases of execution:
1. Program initialization: the C and C++ libraries and CRE perform startup tasks.
2. Program execution: the program controls the flow of execution.
3. Program termination: the C and C++ libraries and CRE perform shutdown tasks.
To run a C or C++ program in the Guardian environment, you use the command
interpreter RUN command. This diagram shows the general form of the RUN
command. For more detail, see the TACL Reference Manual.
program-file
is the name of the C or C++ object file you want to run.
run-options
is a comma-separated list of options to the RUN command. Note that this list is
enclosed by slashes (/). Two of the most frequently used RUN options are IN
and OUT.
[RUN] program-file [ / run-options / ] [ args-list ]