www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/07/15:34:21

From: Johan Karlsson <k AT sm DOT luth DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Protected mode
Date: Mon, 07 Jul 1997 09:21:08 +0200
Organization: Luleå University of Technology
Lines: 51
Message-ID: <33C098E4.2F1CF0FB@sm.luth.se>
References: <199707061551 DOT IAA10815 AT adit DOT ap DOT net>
NNTP-Posting-Host: my21.sm.luth.se
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019