Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

For Rayer - shared resources between DOS and WinXP (Announce)

posted by Japheth Homepage, Germany (South), 11.07.2008, 20:39

> > You must distinguish between the VDD and other Win32 applications. The
> VDD
> > is loaded in the very same process as NTVDM.EXE, that is, it can access
> the
> > full DOS memory and a valid address in DOS is also valid for the VDD.
>
> Aha, understand. So I need to make VDD first (and probably last). You say
> it can access DOS memory in NTVDM and how about DPMI memory? As I
> understad you said there's some hack how to access also the DPMI memory. I
> downloaded hxdpmi but the asm is not very readable for me. I'd like to do
> all things in (gc)c - it shouldn't be problem.

the hack is for the "RegisterModule" call, because it uses some pointers which must fit into DS:SI and ES:DI - which might be a problem if your DOS app is 32bit and running in flat protected-mode.

Accessing DPMI memory is no problem at all, since such memory is a simple Win32 virtual memory block. Usually, inside the VDD, if you got addresses from the DOS app, you will translate them by a call of VdmMapFlat() - this call translates SEGMENT:OFFSET or SELECTOR:OFFSET into FLAT. Additionally, you can always inquire the VM's current state with function getMSW() - bit 0 will tell if it is in "real-mode" or protected-mode.

---
MS-DOS forever!

 

Complete thread:

Back to the forum
Board view  Mix view
22782 Postings in 2123 Threads, 402 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum