Re: Real mode int from protected mode and back
- From: Tim Roberts <spamtrap@xxxxxxxxxx>
- Date: Sat, 23 Feb 2008 20:28:09 GMT
gerotica <spamtrap@xxxxxxxxxx> wrote:
On 21 fev, 01:31, Tim Roberts <spamt...@xxxxxxxxxx> wrote:
What operating system and compiler are you using? You have a strange mix
of 16-bit and 32-bit concepts here.
MS-DOS. The main program is in protected mode, dont know the
compiler.
Yes, I think I simply failed to understand a big chunk of your plan. The
program you are patching is in 32-bit protect mode using a DOS extender of
some kind. But, you have installed an ISR using a 16-bit compiler. Right?
If so, then my comments are mostly just litter on the information
superhighway.
Apparently, I've been away from MS-DOS way too long...
How did you compile and install the interrupt handler? Remember that aI am compiling the ISR in DOS c++. The install is made in main(),
software interrupt is going to expect to all 16-bit code.
using dos int to stay resident.
What do you mean by "DOS c++"? It has to be 16-bit code, but since the
compiler has the "interrupt" keyword, I'm guessing that it is.
Yeah, that's my problem. I really dont know the issues about
mixing 16 and 32 bit codes. Using int 31h 300h I thought DPMI would
take care of the needed conversions or whatever.
Yes, I was thinking about it backwards. You are right. DPMI will shift to
16-bit real mode to make the call, and your ISR will run.
You can't call C run-time functions like fprintf inside an interrupt
handler. Where do you think it's going to find the C runtime library?
Hum.. ok. fprintf maybe... but I've used file functions from ISR
successfuly. As long as I take care of reentrancy, right?
I thought runtime routines were compiled toghether in the code...
Yes, my brain no longer thinks automatically of the single-tasking MS-DOS
environment. Your ISR should have its own 16-bit C runtime library
available to it.
So, let's get back to your issue:
Page fault at eip=000f7250, error=0006
F7250 is inside the BIOS (f000:7250), so somehow you're getting a bad
pointer into the BIOS. Was there a register dump?
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.
.
- Follow-Ups:
- Re: Real mode int from protected mode and back
- From: gerotica
- Re: Real mode int from protected mode and back
- References:
- Real mode int from protected mode and back
- From: gerotica
- Re: Real mode int from protected mode and back
- From: Tim Roberts
- Re: Real mode int from protected mode and back
- From: gerotica
- Real mode int from protected mode and back
- Prev by Date: Re: Accessing Physical Memory & Other Process's Address Space
- Next by Date: Re: Can 64 bit Vista support a 32 bit application with 4 GB?
- Previous by thread: Re: Real mode int from protected mode and back
- Next by thread: Re: Real mode int from protected mode and back
- Index(es):
Relevant Pages
|