Check that the terminal is logically active;
If there are characters in the “cooked” input queue or a call on “canon” (8274) is successful ...
transfer characters from the “cooked” input queue until either it is empty or enough characters have been transferred to suit the user’s requirements.