+------------------+---------------+-------------+----------------+---------------+-------------------+ | RECORD | | LOAD | | | | | MARK | RECLEN | OFFSET | RECTYP | USBA | CHKSUM | | ': ' | '02' | '0000' | '02' | | | +------------------+---------------+-------------+----------------+---------------+-------------------+ 1- byte 1- byte 2- bytes 1- byte 2- bytes 1- byte
The 16- bit Extended Segment Address Record is used to specify bits 4- 19 of the Segment Base Address (SBA), where bits 0- 3 of the SBA are zero. Bits 4- 19 of the SBA are referred to as the Upper Segment Base Address (USBA). The absolute memory address of a content byte in a subsequent Data Record is obtained by adding the SBA to an offset calculated by adding the LOAD OFFSET field of the containing Data Record to the index of the byte in the Data Record (0, 1, 2, ... n). This offset addition is done modulo 64K (i. e., 16- bits), ignoring any carry, so that offset wraparound loading (from OFFFFH to OOOOOH) results in wrapping around from the end to the beginning of the 64K segment defined by the SBA. The address at which a particular byte is loaded is calculated as:
SBA + ([ DRLO + DRI] MOD 64K)
where:
DRLO is the LOAD OFFSET field of a Data Record.
DRI is the data byte index within the Data Record. When an Extended Segment Address Record defines the value of SBA, it may appear anywhere within a 16- bit hexadecimal object file. This value remains in effect until another Extended Segment Address Record is encountered. The SBA defaults to zero until an Extended Segment Address Record is encountered.