Date: Wed, 30 Aug 2000 08:28:48 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Gary Slaughenhaupt cc: djgpp AT delorie DOT com Subject: Re: Newbie stuck. In-Reply-To: <8ohd8o$rsp$1@voder.nsc.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 29 Aug 2000, Gary Slaughenhaupt wrote: > int ShowXpressRomInfo() > { > unsigned char * pBIOSTable = (unsigned char *)0xF0000000L; > unsigned char xpressStart[12]= > {'X','p','r','e','s','s','S','t','a','r','t',0}; > unsigned char xpressInfo[250]; > int x = 0; > > // Get BIOS Info Table > do > { > if (memcmp((unsigned char *) &xpressStart,\ > pBIOSTable,\ > strlen((unsigned char *) &xpressStart))== 0) > { > pBIOSTable+=12; > break; > } else pBIOSTable++; > } while (pBIOSTable <= (unsigned char *) 0xF000FFF3L); > > But I get a segment violation when attempting to do the memcmp. You cannot use this to access conventional memory from a protected-mode program. You need to rewrite this code. One possibility is to use dosmemget library function to copy the entire block between 0xF0000000L and 0xF000FFF3L to a normal char array, then use memcmp as usual.