Mail Archives: djgpp/1997/07/07/15:34:21
Nate Eldredge wrote:
>
> >I'm trying to write a small program that should read from a physical
> >address.
> Do you mean a memory address or a port address?
>
> >However I need to get my program to run in Protected mode to be able to
> >use these function. How can one get a program to run in protected mode.
> With DJGPP, all programs run in protected mode. So you don't need to worry
> about this.
I tried to use the dpmi interrupt 2fH ax = 1686H
see: http://www.delorie.com/djgpp/doc/dpmi/ch5.g.html
to get the CPU mode, but it return that the program runs in Real Mode.
Is there some problem with this code part:
__dpmi_regs r;
r.x.ax = 0x1686;
__dpmi_int(0x2f, &r)
Now if (r.x.ax == 0) then Protected mode else Real Mode.
And r.x.ax is not 0 when __dpmi_int returns.
This is why I asked the above question. However as you said the program
should run in Protected mode, so I guess it is, and I have some problems
with the __dpmi_int.
> I could give you an example if I had a better idea of what you are trying to do.
Some more info.
I have a PC 486 running msdos 6.20
The DPMI host running is qdpmi from qemm, dpmi version 0.9
(I have also installed cwsdpmi, but ist not running. Should I use this
one instead?)
I have a memory board on the ISA Bus which I want to access.
The memory is in the address range 0x00400000 to 0x0047fffe
I have tried some different ways but nothing seems to work.
When I do a read or write to the memory, say 0x0040000, I want the
address
to go out on the ISA bus. I have tried do detect the address on the bus
but not been able to. I think there is something wrong in my program.
I would realy appreciate some help with this.
Thanks for any help.
Johan Karlsson
mailto:k AT sm DOT luth DOT se
Department of Computer Science and Electrical Engineering
Luleå University of Technology
Sweden
- Raw text -