{***********************************************************************}
{									}
{ __WhereScn  Return the cursor position and cursor size		}
{									}
{ procedure __WhereScn(var X,Y,TopScan,BotScan : byte); 		}
{									}
{	      X,Y	The column and row numbers where the cursor is	}
{			position on the current display page. The rows	}
{			are numbered 1 to 50 (Y) and the columns are	}
{			numbered 1 to 80 (X).				}
{	      TopScan	Cursor top scan line.  It is a value between 0	}
{			and 15. 					}
{	      BotScan	Cursor bottom scan line.  It is a value between }
{			0 and 15.					}
{									}
{ Description This procedure returns the cursor position and mode	}
{	      (that is, size as determined by the 'top' and 'bottom'	}
{	      scan lines or markers).  The cursor position is for the	}
{	      current display page (_CurDisplayPage).  Unlike the Turbo }
{	      Pascal functions WhereX and WhereY, the position is not	}
{	      relative to the current window.				}
{									}
{ Version     4.00 (C)Copyright Blaise Computing Inc.  1987		}
{_______________________________________________________________________}

procedure __WhereScn(var X,Y,TopScan,BotScan : byte);

  var
    Reg : registers;

  begin {__WhereScn}

    with Reg do
      begin
	AH := $03;		       { Call BIOS VIDEO with		}
	BH := _CurDisplayPage;	       { subfunction 3.  BH = the	}
	Intr(_VIDEO,Reg);	       { current display page.		}
	TopScan := CH and $0F;
	BotScan := CL and $0F;
	Y	:= DH + 1;	       { Physical screen location.	}
	X	:= DL + 1
      end

  end;	{__WhereScn}
