Re: Real mode int from protected mode and back



gerotica <spamtrap@xxxxxxxxxx> wrote:

f000:7250 is inside bios... 000f:7250 is not... right?

It said "eip = 000f7250". That means it's talking about a linear address.
Linear address 000f7250 is f000:7250 in real mode.

Well, if im wrong, then... Interesting... maybe some bios int call
from c file routines...?

Possible.

DOS c++.. I mean Im compiling the ISR using the old MS-DOS c++ 16 bit
compiler... I really don´t know how to explain it better...

There is no "MS-DOS c++ compiler". Do you mean Microsoft Visual C++ 1.52?
Or something older than that, like Microsoft C 7.00? Actually, I don't
think it matters.

I think my biggest problem here is not understand the whole concept of
DPMI. The first idea was just to make a int call to my ISR, a pure int
call using the registers as parameters... I think it would work ok if
i didnt need to make file manipulations inside my ISR, am i right?

No, not at all. You're in 32-bit protect mode. A software interrupt in
protect mode goes through the IDT and expects a protect mode handler. To
invoke a 16-bit real mode ISR, you're going to need DPMI.

Well, the workaround was to make the call using DPMI int, what im
doing now. But i dont understand the parameters needed for int 31h
300h... That pointer to a registers structure... Can it be null? Can
I use the stack to pass the parameters to the ISR?

No, you must supply the registers. It's very likely that your 32-bit stack
is not mapped into the lower megabyte of physical memory, and as such would
not be available in real mode. If you set SS:SP to 0, DPMI will set up an
empty stack for you, which is probably what you want.
--
Tim Roberts, timr@xxxxxxxxx
Providenza & Boekelheide, Inc.

.



Relevant Pages