[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: accessing PCI memory in Windows 95 DOS Box
In a DOS session outside Windows (without a memory manager), memory
is mapped one-to-one linear to physical.
Inside Windows, it's not. Instead, your program needs to recognize
that it is inside Windows (use a DOS API such as INT 2Fh, AX=1600h),
and then when it is, map the physical memory you want to access to
linear memory by (among other ways) calling a DPMI API (such as INT
31h, AX=0800h). Only then can you reference the physical memory, and
then only via the linear address retunred by the DPMI API.
If you need more details, message me separately.
JohanHZ@Sycron-IT.com wrote:
>
> Hi,
>
> We want to access PCI memory in a windows 95 DosBox.
> The PCI memory resides eg on address 0xe4000000 to 0xe40800000
>
> Everytime we access the memory, we get an invalid page exception.
> The program is written in turbo pascal and works great in plain DOS (so no
> DOSBOX), so I am pretty sure the code is correct .
>
> Do we have to reserve the memory or ..... any other suggestions?
>
> JOHan.
>
> "There are two ways to write error-free programs; only the third one works."
> -
> Alan J. Perlis.
_______________________________________________________________
Bob Smith - bsmith@sudleyplace.com - http://www.sudleyplace.com
a.k.a. bsmith@qualitas.com - http://www.qualitas.com