Mail Archives: djgpp/1999/04/13/11:08:04
yjtseng <yjtseng AT micron DOT com> asked:
> I wrote inline assembly to access CR0. There was general protection fault at
> run time. After suggestions given by Salvador Eduardo Tropea and Nate
> Eldredge, I tried cwsdpr0.exe and it worked. I was able to access CR0.
>
> Questions:
>
> First:
> Acording to cwsdpmi.doc, cwsdpr0.exe runs with virtual memory disabled. But,
> the value of CR0 that I read is 0x80000011 which means the paging mechanism
> is on. Any idea anybody?
Paging mechanism isn't virtual memory. If I remmember OK the EMM386 driver
uses it in DOS. It allows to remap the memory using pages, of course that's
needed for virtula memory but not the reverse.
There are a DPMI call to know if VM is available.
> Second:
> How can I pick cwsdpr0.exe as the DPMI host at compilation instead of using
> stubedit my.exe dpmi=cwsdpr0.exe
> after the executable is generated?
I think there is no easier way, you could tell the linker to use an external
stub file, but I think the stubedit step is easier.
SET
P.S. As you can see that's a priviledged instruction ;-)
------------------------------------ 0 --------------------------------
Visit my home page: http://welcome.to/SetSoft
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(5411) 4759 0013
- Raw text -