Mail Archives: djgpp/2009/09/03/18:00:44
Hi,
On Sep 3, 9:01=A0am, dirw <dirwdirw DOT DOT DOT AT yahoo DOT com DOT tw> 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!!
- Raw text -