
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ User's Guide - the "data_seg" pragma can be used to specify the name of the segment into
[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
The "data_seg" pragma can be used to specify the name of the segment into
which data is to be placed. The following describes the form of the
"data_seg" pragma.
+--------------------------------------------------------------------------+
| #pragma data_seg ( seg_name [, class_name] ) [;] |
| |
+--------------------------------------------------------------------------+
where
description
seg_name
is the name of the data segment enclosed in quotes. Also, seg_name may
be a macro as in:
#define seg_name "MY_DATA_SEG"
#pragma data_seg ( seg_name );
class_name
is the optional class name of the data segment enclosed in quotes.
Also, class_name may be a macro as in:
#define class_name "MY_CLASS"
#pragma data_seg ( "MY_DATA_SEG", class_name );
Consider the following example.
#pragma data_seg ( "my_data" );
static int i;
static int j;
The data for i and j will be placed in the segment my_data.
Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson