X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Rugxulo Newsgroups: comp.os.msdos.djgpp Subject: Re: How to access 0xFF800000 data ? Date: Thu, 3 Sep 2009 14:47:13 -0700 (PDT) Organization: http://groups.google.com Lines: 56 Message-ID: <5b184576-9f64-46a0-a183-97d812ce9a6d@w36g2000yqm.googlegroups.com> References: <850b568b-640c-435e-b6ca-deb8953ef1d5 AT y10g2000prf DOT googlegroups DOT com> <1f6bf27d-a58c-4242-8411-acc03958afc2 AT x25g2000prf DOT googlegroups DOT com> NNTP-Posting-Host: 65.13.115.246 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1252014434 25797 127.0.0.1 (3 Sep 2009 21:47:14 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Thu, 3 Sep 2009 21:47:14 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: w36g2000yqm.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.43 Safari/530.5,gzip(gfe),gzip(gfe) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, On Sep 3, 9:01=A0am, dirw wrote: > > Thanks for your great help. > I already can read the 0xFF800000 data in the MS DOS 6.11 mode. > But I still have some question. > > 1. In the MS DOS 6.11 mode , I call __dpmi_physical_address_mapping > (&mi) , it will return *successfully*. > =A0 =A0But in the Windows XP DOS mode, I call > __dpmi_physical_address_mapping (&mi) , it will return *FAIL*. XP's DPMI 0.9 is much wimpier than others (CWSDPMI). For the record, MS declares DOS dead ever since XP, and I can attest that Vista's NTVDM pretty much acts worse in almost every way (hence future MS OSes won't support it very well, if at all, e.g. x86-64). > =A0 =A0Could you please give me some suggestion about this issue ? > =A0 =A0Is it possible use *djgpp* to write a BIOS flash application for > windows XP DOS mode ? Unlikely since DPMI is heavily virtualized under Windows. My Vista laptop does flash the BIOS from within Windows, though. My "old" Dell P4 uses a DOS binary, though (hence have to reboot with FreeDOS floppy). > 2. In the MS DOS 6.11 mode, it need csdpmi5b.zip to provide the DPMI > server for djgpp DPMI funtion. Run "exe2coff myfile.exe" then "copy /b cwsdstub.exe + myfile myfile- standalone.exe" if that bothers you. > =A0 =A0 In the Windows XP DOS mode, does it already have DPMI server ? Yes, but you're stuck with it (can't replace it). CWSDPMI isn't needed there and won't help you even if you have it. :-( > 3. If I want to write Windows XP application to read/write 0xFF800000 > data, may I use *djgpp" ? Doubtful. > =A0 =A0Or I must use Visual C++ and MASM to call DPMI to meet my request = ? DPMI is only for DOS, so it doesn't apply to Win32 programming. > =A0 =A0(MSFT memory access information :http://support.microsoft.com/kb/1= 31426/en-us/) Yes, I suspect, if you truly want to run under Windows (only), that you'll have to use MS tools and APIs (Win32). But I'm not sure it will be easy. I suspect MS won't publicly be very forthcoming with all the low-level details needed to flash BIOSes (for security reasons). But good luck anyways!!