[inherit('sys$library:pascal$smg_routines')]

program termset(input,output);

var
   kbid : unsigned;
   i    : integer;
   res  : packed array [1..512] of char;
   desc : record
             case boolean of
                true  : (trick : array [1..8] of [byte] 0..255;);
                false : (real  : array [1..2] of integer;);
          end;
   term : packed array [0..255] of boolean;

begin
   desc.real[1]:=32;
   desc.real[2]:=iaddress(term);
   smg$create_virtual_keyboard(kbid);
   smg$read_string(kbid,res,'Try enter two A''s and terminate with return> ');
   writeln('OK');
   for i:=0 to 255 do term[i]:=false;
   term[ord('A')]:=true;
   smg$read_string(kbid,res,'Try enter two A''s and terminate with return> ',
                   terminator_set:=desc.trick);
   writeln('OK');
   for i:=0 to 255 do term[i]:=false;
   term[13]:=true;
   smg$read_string(kbid,res,'Try enter two A''s and terminate with return> ',
                   terminator_set:=desc.trick);
   writeln('OK');
   term[13]:=true;
   term[ord('A')]:=true;
   smg$read_string(kbid,res,'Try enter two A''s and terminate with return> ',
                   terminator_set:=desc.trick);
   writeln('OK');
end.
