{ Copyright 1984 by ABComputing 				       }
{								       }
{		     ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿	       }
{		     ³ File Name: ÛÛ	 list1.pas  ÛÛ	³	       }
{		     ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ	       }


{**********************************************************************}
{								       }
{  SPACE  Example illustrating the use of the ADS type for addressing  }
{	  data beyond the 64K data space.  Storage for the record type }
{	  is allocated using the external MS-Pascal function ALLMQQ,   }
{	  and the returned segment address is assigned to the ADS      }
{	  variable.						       }
{______________________________________________________________________}

program space(input,output);

  type
    comdata = record
		msg_no	: integer;
		msg_cnt : integer;
		msg	: lstring(128)
	      end;

  var
    comdata_ptr : ads of comdata;

  function allmqq(no_bytes : word) : adsmem; external;

  begin {space}

    comdata_ptr := allmqq(132);    ! Segment, offset address of record
    comdata_ptr^.msg_no  := 1;
    comdata_ptr^.msg_cnt := 0;
    comdata_ptr^.msg	 := 'Hello World';

    if (comdata_ptr^.msg_no > 0) then
       writeln(output,comdata_ptr^.msg);

   end.  {space}
(fmtstr,list)
	char		*fmtstr;