[Previous]
[Contents]
[Next]

MK_FP()

build a far pointer value from a segment and an offset

Synopsis:

#include <i86.h>
void __far *MK_FP( unsigned int segment,
                   unsigned int offset );

Description:

The MK_FP() macro can be used to obtain the far pointer value given by the segment segment value and the offset offset value. These values may be obtained by using the FP_SEG() and FP_OFF() macros.

Returns:

A far pointer.

Examples:

#include <i86.h>
#include <stdio.h>

void main()
  {
    unsigned short __far *bios_prtr_port_1;

    bios_prtr_port_1 =
        (unsigned short __far *) MK_FP( 0x40, 0x8 );
    printf( "Port address is %x\n", *bios_prtr_port_1 );
  }

Classification:

Intel

Safety:
Interrupt handler Yes
Signal handler Yes
Thread Yes

Caveats:

MK_FP() is a macro.

See also:

FP_OFF(), FP_SEG(), segread()


[Previous]
[Contents]
[Next]