From: Gordon Brown Newsgroups: comp.os.msdos.djgpp Subject: DPMI Physical Address Mapping Date: Thu, 17 Jul 1997 11:58:26 +0100 Organization: DERA Message-ID: <33CDFAD2.74B@signal.dra.hmg.gb> NNTP-Posting-Host: 146.80.9.20 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 26 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I am trying to access physical memory location 0x3d00000 so I am using __dpmi_physical_address_mapping. But this did not work so I wrote some in-line assembler and this does. So what's the difference between /* Map in the board's physical address */ my_map->size = 0x01000000; my_map->address = 0x3d000000; if((linear = __dpmi_physical_address_mapping(my_map)) == -1) printf("Failed to map physical address\n"); and this ? regs.x.ax = DPMI_PHYSICAL_ADDRESS_MAPPING; regs.x.bx = (0x3d000000 >> 16) & 0xffff; regs.x.cx = 0x3d000000 & 0xffff; regs.x.si = (0x01000000 >> 16) & 0xffff; regs.x.di = 0x01000000 & 0xffff; int86( 0x31, ®s, ®s ); if (regs.x.cflag) printf( "Failed to map in registers. Error %x.\n", regs.x.ax ); linear = regs.x.cx | (regs.x.bx << 16);