* DPMI: Interrupt vector overwritten
@ 2002-10-16 22:07 John Elliott
0 siblings, 0 replies; 4+ messages in thread
From: John Elliott @ 2002-10-16 22:07 UTC (permalink / raw)
To: linux-msdos
These lines come from /src/dosext/dpmi/dpmi.c, line 1328 or so. They cause
dosemu to abort if DPMI function 0x300 is used to call interrupt 0xE0 or
higher; is this correct, and if so, why is it doing it?
if (inumber==0x0300) {
REG(cs) = ((us *) 0)[(_LO(bx) << 1) + 1];
REG(eip) = ((us *) 0)[_LO(bx) << 1];
if ((_LO(bx) >= 0xe0) && (REG(cs) < 0xf000)) { /* avoid hardreboot
!! */
D_printf("DPMI: Interrupt vector overwritten!");
leavedos(99);
}
--
John Elliott
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: DPMI: Interrupt vector overwritten
@ 2002-10-17 3:51 Stas Sergeev
2002-10-17 5:08 ` Bart Oldeman
0 siblings, 1 reply; 4+ messages in thread
From: Stas Sergeev @ 2002-10-17 3:51 UTC (permalink / raw)
To: linux-msdos; +Cc: John Elliott
Hello.
John Elliott wrote:
> They cause
> dosemu to abort if DPMI function 0x300 is used to call interrupt 0xE0
> or higher;
What exactly interrupt from this range do
you want to execute?
> is this correct,
Of course it is not. If your program installs
the realmode handler for that ints, it will
just crash dosemu with that code.
It was even worse when this was done not only
for 0x300, but also for 0x301 and 0x302, so it
crashed dosemu *randomly* because bx is meaningless
for those.
I moved it under "if (inumber == 0x300)" rather
than remove, because it was a hard times and it
was nearly impossible to get included something
more than an absolutely trivial patch. Removal
patch would just have been ignored most likely,
so the compromiss was to put it under "if".
Now, as the devel branch is in progress, the
things are much better.
> and if so, why is it doing it?
For no reasons, feel free to remove it if it hurts
you, which is still strange. Why do you need that
vectors?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: DPMI: Interrupt vector overwritten
2002-10-17 3:51 Stas Sergeev
@ 2002-10-17 5:08 ` Bart Oldeman
0 siblings, 0 replies; 4+ messages in thread
From: Bart Oldeman @ 2002-10-17 5:08 UTC (permalink / raw)
To: Stas Sergeev; +Cc: linux-msdos, John Elliott
On Thu, 17 Oct 2002, Stas Sergeev wrote:
> John Elliott wrote:
> > They cause
> > dosemu to abort if DPMI function 0x300 is used to call interrupt 0xE0
> > or higher;
> What exactly interrupt from this range do
> you want to execute?
>
> > is this correct,
> Of course it is not. If your program installs
> the realmode handler for that ints, it will
> just crash dosemu with that code.
if ((_LO(bx) >= 0xe0) && (REG(cs) < 0xf000)) { /* avoid hardreboot!! */
I should add that this test is more bogus than it used to be because these
high vectors are initialized to 0 in development versions of DOSEMU and no
longer point to the DOSEMU BIOS interrupt trampoline.
It looks a lot like something that was added to do some custom sanity
checking while debugging some DOS program, but the person forgot to remove
it later.
The comment is puzzling: hardreboot of what? Linux?
Bart
^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <no.id>]
end of thread, other threads:[~2002-10-18 19:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-16 22:07 DPMI: Interrupt vector overwritten John Elliott
-- strict thread matches above, loose matches on Subject: below --
2002-10-17 3:51 Stas Sergeev
2002-10-17 5:08 ` Bart Oldeman
[not found] <no.id>
2002-10-18 19:53 ` John Elliott
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox