Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Packing the DFT Code Segments

IP.com Disclosure Number: IPCOM000099404D
Original Publication Date: 1990-Jan-01
Included in the Prior Art Database: 2005-Mar-14
Document File: 1 page(s) / 38K

Publishing Venue

IBM

Related People

DuBois, LL: AUTHOR [+2]

Abstract

The OS/2* Extended Edition product contains some Data Link Control .DLL files consisting of several 'C' and 'MASM' files that are linked together.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 85% of the total text.

Packing the DFT Code Segments

       The OS/2* Extended Edition product contains some Data Link
Control .DLL files consisting of several 'C' and 'MASM' files that
are linked together.

      One of the subroutines linked in this manner requires IOPL, or
I/O Privilege Level.  IOPL is required in order to read from and
write to hardware ports. Since the subroutine runs at IOPL, the
segment that the IOPL routine is linked into is also marked as IOPL.

      One drawback of having a segment at IOPL is that the IBM OS/2
linker program by default causes each source file to be linked into a
separate segment. This not only wastes LDT entries, but bytes are
also lost due to the requirement that segments be aligned on
paragraph boundaries.

      In order to minimize the number of LDT entries that are used by
the OS/2 Extended Edition code, and to minimize the size of code
running at IOPL, it was necessary to find a way to pack as much of
the code into one segment as possible, and yet still keep a minimum
amount of code at IOPL.

      The solution is twofold.  First, the IOPL subroutine is placed
into a separate GROUP.  Next, the IBM OS/2 linker is instructed to
pack all segments together by specifying the 'PACKCODE' option.  The
linker will only pack together segments that are in the same GROUP.
Since the IOPL routine is now in its own group, it gets placed into a
separate segment, and the rest of the code gets placed into a
different segment.

      Th...