Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
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:
    The macro returns a far pointer.

See Also:
    FP_OFF, FP_SEG, segread

Example:
    #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

Systems:
    MACRO

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson