forlang.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
LOADDS Attribute
                                             Up Contents Index Back
─────LOADDS Attribute───────────────────────────────────────────────────────
 
     The LOADDS attribute is applied only to separately compiled
     subprograms and functions. It directs the compiler to create a
     separate data segment for the data within that procedure; the
     base address (DGROUP) of this new data segment is automatically
     loaded into DS when the procedure is called. The use of a
     separate data segment permits the procedure's data to be called
     with 16-bit NEAR references rather than 32-bit FAR references.
     This speeds up data access. The default data segment for the
     program is automatically reloaded when execution of the procedure
     terminates.
 
     The LOADDS attribute is applied primarily to user─written
     routines that are to be included in an OS/2 dynamic link library
     (DLL). It is not needed for procedures that run in DOS programs,
     because the FL command-line option /ND (name data segment)
     automatically assures that the new data segment's base address is
     loaded.
 
     Restrictions: Applies only to subprograms or functions compiled
     separately from the main program
 
     See Also: /ND Compiler Option
                                    -♦-