Mail Archives: djgpp/1998/09/10/13:12:54
On Thu, 10 Sep 1998 default AT is DOT elta DOT co DOT il wrote:
> > Interrupt-driven transmitting is tricky. Please post the code that
> > initializes the UART, the key to this mystery might be there.
>
> The big problem is not the Initialization, everything works fine in real
> mode
The fact that it works in real mode is, in my opinion, no proof that your
problem is indeed in how you hook the PM interrupt. Since the interrupts
begin to work once you read the UART, it seems like the interrupt is
hooked okay anyway.
DJGPP differs from real-mode compilers in other ways, beyond the
protected mode issue. It can well be that one of these differences make
your initialization code not work when compiled with DJGPP. That is why
I asked to see the initialization code.
Of course, it is up to whether you need help badly enough to post that
code.
> It just seems like there is some subtle point that I'm missing in declaring
> the PM interrupt. Maybe my main loop is performing a mode switch somewhere?
The loop that you posted does a mode switch inside `kbhit' and again
inside `delay'.
But don't worry about mode switches: the interrupts are always reflected
to your protected-mode handler, even if the interrupt happens while the CPU
is in real mode. So this shouldn't be your problem.
- Raw text -