Binder Manual (G06.24+, H06.03+)

BIND Commands
Binder Manual528613-003
3-7
ADD Command
Usually, Binder minimizes the number of TNS code segments used, by filling each
64K-instruction segment as fully as possible. The rarely-used ADD SPACE
command causes Binder to leave the current code segment unfilled, sending all
procs from subsequent include lists or search lists into the next segment(s).
Consecutive ADD SPACE commands will create one or more empty segments. For
example, when SYSGEN invokes BIND to create the TNS SC System Code
library, SYSGEN uses ADD SPACE commands to have the first nonempty segment
be addressed as SC.06 instead of the default SC.00. Another possible use for the
ADD SPACE command or the MOVE IN NEW SPACE command is to manually
arrange that frequently-called procs are located in the same segment as their
primary callers. A program codefile cannot have more than 32 TNS code
segments, numbered 0..31.
Considerations
Binding Modules Compiled for Different Run-Time Environments
For a description of the rules Binder applies when binding modules compiled for
different run-time environments, see Section 2, Using Binder
Entry Point or Data Block Names Not on the Include Lists
If you specify an entry or data block name for a block not already on an include list,
the ADD command adds the name to the end of the list, regardless of whether you
specify DELETE. If you specify an entry or data block name for a block already on
the include list, ADD adds the name to the end of the list only if you also specify
the DELETE option. Otherwise, Binder ignores the ADD command. For entry
points, Binder also issues a warning message indicating that the specified entry
point is already on the include list.
Entry Point in an ADD Command
Naming an entry point in an ADD command automatically inserts the code block
that contains the entry point in the include code block list. Usually, data blocks are
added implicitly (by means of references in included code). You can add
FORTRAN COMMON blocks, TAL BLOCKs, C external variables, Pascal public
variables, and COBOL85 EXTERNAL blocks explicitly. This option lets you define a
different set of initial values.
Pascal Procedures
If you want to use the ADD, DELETE option of the ADD command to replace one
copy of a Pascal procedure with another copy that has the same name, you must
export the procedure in both modules. Otherwise, Binder considers them to be
separate procedures. For example, if module A and module B both contain
procedure C and you do not export the procedure in each module, Binder names
one A.C and the other B.C. In this case, the command ADD CODE C FROM B,
DELETE adds B.C to the file without deleting A.C.
Target File Order