Date: Mon, 13 Jun 94 17:32:47 EDT From: hvb AT netrix DOT com To: dj AT ctron DOT com (DJ Delorie) Cc: DJGPP AT sun DOT soe DOT clarkson DOT edu Subject: Access to the 1MB memory in protected mode Reply-To: hvb AT netrix DOT com DJ Delorie writes: > > In non-DPMI mode, you can try adding 0xe0000000 to the physical > address and go32 may map it for you. ^^^ ||| Dear DJ, This is in refer to your reply on the subject a while ago. What do you mean by the word 'may' above? How do I force go32 to set up the mapping? I have a memory mapped hardware device which is mapped to the 0xd0000-0xd3fff address range. In the program I included below, it does not seem to access the real physical address unless I have a debug32 breakpoint set up. Once the debug32 breakpoint is entered I am able to access the memory location. I have tried to make a bdos call to force a protected-to-real switching but it did not seem to work either. -------------- Program example ----------------- void main ( int argc, /* number of command line arguments */ char *argv[] /* array of pointers to command line arguments */ ) { unsigned short *rom_init = (unsigned short *)0xd0000412; bdos (0x0b, 0, 0); /* Try to force a protected-to-real switch */ outpb (0x240, 0x40); /* This code sets up the board mapping/ outpb (0x240, 0); /* to 0xd0000 */ outpb (0x242, 0xd000 >> 9); outpb (0x240, 0x20); *rom_init = 0; /* This does not happen unless a breakpoint is entered prior to this point. */ } ---------------- End of example ---------------------- Thanks, ============================================================== Hung Bui Internet: hvb AT netrix DOT com Netrix Corporation Phone: +1 703 793 1016 13595 Dulles Technology Drive Fax: +1 703 713 3805 Herndon Va 22071 ==============================================================