program regwin;
{$nomain}
{$nowalkback}

{
File		: DE:[22,60]regwin.pas
Author		: Peter Stadick
Origin date	: DEC 16,88
Edit History	:

       Last Edit: 17-DEC-1988 11:57:25 

Description:
	The routine fills in the Window Discriptor Block. The user
must set aside an 8 word area in global variables for the WDB.
For example:
TYPE
  WDB_type	: array [1..8] of integer;

VAR
i	: integer;	 insures word alignment
WDB     : WDB_type;	 Space for WDB 

}

%include lb:[22,320]general3.typ;
%include de:[22,320]region.typ;
procedure exitst(status:integer); external;

procedure regwin(VAR WDB  : WDB_type;
		     apr  : integer;
		     size : integer;
		     rid  : integer;
		     off  : integer;
		     len  : integer;
		     sts  : integer;
		     srb  : integer); external;

procedure regwin;

begin
  if (apr > 1) and (apr < 8) then
  begin
    WDB[1] := apr*256;
    WDB[3] := size;
    WDB[4] := rid;
    WDB[5] := off;
    WDB[6] := len;
    WDB[7] := sts;
    WDB[8] := srb;  
  end
  else
    exitst(4);
end;
