Intel 121748-001 manual SEGMENT-RELATIVE Fixups

Models: 121748-001

1 122
Download 122 pages 57.59 Kb
Page 18
Image 18

8086 Object Module Formats

Version 4.0

If the LOCATION is a BASE. POINTER. or HIBYTE. it is unclear

what the translator had in mind, and the action taken by R&L is defined by LINK-86 and/or LOCATE-86 EPS·s.

SEGMENT-RELATIVE FIXUPS

A seqment-relative fixup operates in the followinq way: a non- neqative l~-bitnumber, FBVAL, is defined as the FRAME NUMBER of the

FRAME specified by the fixup, and a signed 20-bit number, FOVAL, is defined as the distance from the base of the FRAME to the TARGET. If this signed 20-bit number is less than 0 or qreater than 65535, then R&L will report an error. Otherwise FBVAL and FOVAL are used to fixup LOCATION in the following fashion:

(1) if LOCATION is a POINTER" then FBVAL is added (modulo 65536) to the high order word of POINTER, and FOVAL is added (modulo 65536) to the low order word of POINTER.

(2) if LOCATION is a BASE, then FBVAL is added (modulo ~5536) to the BASE; FOVAL is ignored.

(3) if LOCATION is an OFFSET. then FOVAL is added (modulo 65535) to the OFFSET; FBVAL is ignored.

(4) if LOCATION is a HIBYTE, then (FOVAL / 25~) is added (modulo 25~) to the HI8YTEi FBVAL is iqnored. (The indicated division is dinteqer division d • i.e •• the remainder is discarded.)

(5)if LOCATION is a LOBYTE, then (FOVAL modulo 255) is added (modulo 256) to the LOBYTE; FaVAL is iqnored.

IN'rERMEDIATE VALUES in FIXUP ARITHI\1ETIC

The 8086 Object Module Formats quarantee fixups in the sense

that, if a TARGET can not be accessed from a LOCATION with the assumed FRAME, then that failure can be detected and R&L can issue a

warninq messaqe. This checkinq is called daccess verification·l • In order to perform this checkinq, LINK-8~and LOCATE-8~need to retain

intermediate values of its address arithmetic. These intermediate values are retained either in the DATA Record, or in the FIXUP Record. The followinq diaqram illustrates three cases:

18

Page 18
Image 18
Intel 121748-001 manual SEGMENT-RELATIVE Fixups