Mail Archives: djgpp/2001/05/24/01:28:18
On Wed, 23 May 2001, Martin Str|mberg wrote:
> Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:
> : The problem with Less might be worth investigating (unless the reason
> : is already known). It might be some bug in the port or in the
> : library.
>
> Every problem is worth investigating, but time is limited.
Tell me about that ;-)
> FWIW, it seems less is looping issuing the two service calls INT21
> AX=0x4400, BX=0 (which returns DX=0x80f3) and IN21 AX=0x4406, BX=0
> (which returns AL=0) repeatedly. (Alas I'm not sure whether the carry
> flag is set or not as the trace printouts don't contain that.)
How did you see that? Where did you add those ``trace printouts''?
This sequence looks like Less is stuck inside `select' library function,
more specifically it repeatedly calls its internal subroutine
`fd_input_ready'. There are some comments there which explain what does
that function do.
The fact that it is looping is normal when you don't touch the keyboard:
Less is simply idle, waiting for any keyboard input to appear. What is
_not_ normal is that once you do type something, the next call to
function 4406h of Int 21h should return FFh in AL, meaning there's some
input available in the keyboard buffer.
You could play with a short test program that calls `select', to see
what's going on.
> gdb behaves similarly.
GDB uses `select' as well, so it isn't surprising.
- Raw text -