ContentsIndexPreviousNext

2.1.1.1 Native Code Options

ACUCOBOL-GT has options that allow it to generate and execute object files that contain native instructions for select families of processors. Those options may not be combined with other options into a single option. For example, it is an error to specify "-nv"; you must specify "-n -v" instead.

The compiler uses cblutil to produce the native-code object file. cblutil should be installed in the same directory as the compiler. The compiler will search the execution path if it cannot find cblutil in its own directory.

You run a native-code object module just like a portable-code object module. You may mix native-code objects and portable-code objects in the same run. Native objects may be placed in libraries just like portable objects.

You can use the debugger on a native-code module in the same fashion as you do for a portable-code module. The only restriction is that you may not begin execution at an arbitrary point in a native-code module (the "@!" command). Also, please note that in order to enable the debugger for a native-code object, you must specify one of the debugging options, such as "-Ga" or "-Gd", with the compile command. Otherwise, you will not be able to use the debugger at all, even for low-level debugging. The complete descriptions of the debugging options are given below.

Example:

To compile and run the "tour.cbl" program as a portable-code object, use the following commands:

ccbl tour.cbl
runcbl tour

To compile and run the same program as a native-code object, use the following:

ccbl -n tour.cbl
runcbl tour

These are the ACUCOBOL-GT compiler native code options:

-n This option causes the compiler to produce native code for the host machine instead of processor-independent portable code. If a host machine uses an unsupported processor, then an error is generated.

--intel This option causes the compiler to produce 32-bit native code for Intel-class processors (386, 486, Pentium, Pentium II, Pentium III, or compatible processors). You can use this option from any host machine. This is the same as specifying "-n" when the host machine is an Intel-class machine.

--sparc This option causes the compiler to produce 32-bit native code for Sparc (v7 - v9) processors. You can use this option from any host machine. This is the same as specifying "-n" when the host machine is a Sparc-based machine.