LW_DWORD - write out data for LD_DATA.

Usage:

#include <ld.h>
lw_dword(tword);

Where:

ld_target_word tword;
represents the data that you want to write.

Description:

"lw_dword" is used when creating an LD_DATA/LD_RELOC directive pair. The LD utility functions let you create the LD_DATA directive and its associated LD_RELOC directive "simultaneously".

The first step in the process is to indicate the segment and offset where the data should be placed. This is done with external variables declared as

extern ld_dvalue lw_segment;
extern ld_dvalue lw_origin;

Assign the appropriate SEGREF to "lw_segment" and the offset of the data to "lw_origin".

Next, call "lw_reloc" to specify relocation information for the data. The first argument of "lw_reloc" gives the SEGREF of a relocatable symbol. The second argument gives the desired relocation code. If there are several relocations to be applied to the data, issue all of them via separate "lw_reloc" function calls.

Finally, issue an "lw_dword" call for the TWORD you want to write out. This call will increment "lw_origin" automatically, so you don't have to adjust "lw_origin" if you are going to output data to the next TWORD position in the same segment.

Information produced via "lw_reloc" and "lw_dword" will be accumulated as it is produced. Just before closing the file, you should call "lw_flush" to flush the accumulated data and relocation information, producing LD_DATA and LD_RELOC directives.

See Also:

expl ld lib lw_reloc

expl ld lib lw_flush

expl ld lib lw_lend

Copyright © 1996, Thinkage Ltd.