8086 Object Module Formats

Version 4.0

(1)A 5 HORT-JMP is being made to an external subroutine. In this case, the TARGET should be specified as

TARGET: EI(subroutine) ,0000H

The reason is that when LINK-86 learns where the subroutine is located, it will probably be a known offset (dl) within some LSEG A. Thus, LINK-8~will convert the above TARGET to the form:

. TARGET: SI(A) ,dl

Now the programmer may be correct in dknowinq· that when the proqram is eventually LOCATE'd, the TARGET will be within 128 bytes of

LOCATION; however, this does not mean that dl is less than l28! Thus, as LINK-86 maintains the (possibly changing) value of dl as

various pieces of LSEG A are combined, it needs a full word to

maintain the offset. Since the LOCATION is a sinqle byte, the

translator must provide an offset field in the fixup record itself for LINK-86 to maintain intermediate fixup values.

(2)The translator wishes to reference ·backwards~ from the

REFERENT. For example, if the TARGET is the word in front of the external array ARY, and the reference is with respect to a base register that will contain the address of the LSEG named FOO, the translator would use

FRAME: SI(FOO)

TARGET: EI(ARY) ,0000H

and place the dneqative offset- FFFEH in LOCATION. R&L will perform access verification to the REFERENT ARY: however, access to the TARGET is not guaranteed, and is the programmer's responsibility.

Note: if Case 3 in the above diaqram were available, the translator could use

FRAME: SI(FOO)

TARGET: EI(ARY) ,-2

and R&L would perform access verification, not to the REFERENT ARY (as above), but to the actual TARGET (in front of ARY)!

(2)(continued) The calculation by LOCATE-Sfi involves 3

quantities: the MAS-location of FOO, the MAS-location of the LSEG

(say, BAZ) containing ARY, and the relative offset of ARY within

BAZ. LOCATE-86 can enforce that the final offset, which is the difference

(location of SAZ plus relative offset) - (location of FOO) r

is not qreater than ~5535r provided that all quantities enterinq into this difference are known.--rl~hetranslator had specified the fixup as

FRAME: SI(FOO)

TARGET: EI(ARY)

then LINK-86 would have had to maintain the (possibly chanqinq from

linkaqe to linkaae) relative offset of ARY within BAZ. in the

LOCATION itself, where it qets ~added~ to the content FFFEH. And because the R&L system cannot know if the FFFEH was a neoative 2 or a positive ~5534, the access verification of R~L may thNart the translator'S intentions.

20

Page 20
Image 20
Intel 121748-001 manual Frame Sifoo Target Eiary ,0000H, Frame Sifoo Target Eiary ,-2