www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/05/24/01:28:18

Date: Thu, 24 May 2001 08:29:22 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Martin Str|mberg <ams AT father DOT ludd DOT luth DOT se>
cc: djgpp AT delorie DOT com
Subject: Re: DJGPP and FreeDos
In-Reply-To: <990635658.652963@queeg.ludd.luth.se>
Message-ID: <Pine.SUN.3.91.1010524082324.17472C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019