Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Dos Protected Mode Interface - <b>physical address mapping</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
        PHYSICAL ADDRESS MAPPING


            Memory mapped  devices such as network adapters and displays
            sometimes have  memory mapped at physical addresses that lie
            outside of  the normal  1Mb of memory that is addressable in
            real  mode.     Under  many  implementations  of  DPMI,  all
            addresses are  linear addresses  since they  use the  paging
            mechanism of  the 80386.  This service can be used by device
            drivers to convert a physical address into a linear address.
            The linear  address can  then be  used to  access the device
            memory.

            Some implementations  of DPMI  may  not  support  this  call
            because it  could be  used to  circumvent system protection.
            This call  should only  be used  by programs that absolutely
            require direct access to a memory mapped device.

            To Call

                 AX = 0800h
                 BX:CX = Physical address of memory
                 SI:DI = Size of region to map in bytes

            Returns

                 If function was successful:
                 Carry flag is clear.
                 BX:CX =  Linear address  that can be used to access the
                      physical memory

                 If function was not successful:
                 Carry flag is set.

            Programmer's Notes

                 o    Under DPMI  implementations that  do not  use  the
                      80386 paging  mechanism, the  function will always
                      succeed and  the address returned will be equal to
                      the physical  address parameter  passed into  this
                      function.
                 o    It is  up to  the caller  to build  an appropriate
                      selector to access the memory.
                 o    Do not  use this  service to access memory that is
                      mapped in the first megabyte of address space (the
                      real mode addressable region).

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