Hi,
this is a question to all the protected mode specialists out there.
Im just writing a Vesa Svga unit for protected mode. (BP standard
DPMI interface).
What I need to complete the project is some info about calling
real mode interrupts.
Interrupts that dont need Pointers or dont return Pointers are no
problem.
---------------------------------------------------------------------
But when I initialize the Vesa-Interface I have to call the interrupt
with the address of a info-buffer to be filled in the es,di registers.
As my programm runs in protected mode the format of my pointer is :
selector:offset
I tried to convert this into a real mode address by the following
formula :
linear address = BaseAddress(selector)+Offset;
real segment = linear address and $FFFF
real offset = linear address div 16;
But as far as I know I cant set the register es with a value, that is
no valid selector.
So I tried the Pascal function Intr from the dos unit.
But as I called the Interrupt my buffer was still empty.
---------------------------------------------------------------------
My second problem are interrupts, that return pointers.
e.g. the Bios Interrupt, that returns the address of the Character
Table.
This interrupt (int 10 , function $1130 , subfunction $03) should
return the address of the table in es:bp.
But when I call the interrupt only the bp register has changed. The
es register is still the same as before. Pehaps this is again the
problem, that a segment register cant hold the value of a real mode
segment.
So how does pascal solve this problem ?
Do they have an extra structure, that contains the real mode segments
after an interrupt call ??
As I know the table is in Segment $C000 I can combine
$C000:bp to the pointer on the table by converting the segment to
a selector. But this is a very bad method to solve this problem.
I would be really happy if anyone could tell me how to fix these
problems
many thanks in advance
Chris
(Could you please reply by mail and posting , because this group
is to large for me to download everytime)
--------------------------------------------------------------------------------
Leharstrasse 15 | the bright side | Phone: 06205/13833
68799 Reilingen | of life | WWW : http://www.*-*-*.com/ ~un7d/